max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
5_1.asm | CodingWorker/tempfiles | 1 | 96774 | data segment
x dw 9,-6,34
y dw 3 dup(?)
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov cx,3
mov si,0
let0:
mov ax,x[si]
cmp ax,0
jge let1
mov bx,ax
imul bx
jmp out1
let1:
cmp ax,10
jge let2
mov bx,2
imul bx
add ax,3
jmp out1
let2:
mov bl,6
idiv bl
mov ah,0
jmp out1
out1:
mov y[si],ax
add si,2
dec cx
cmp cx,0
jnz let0
mov ah,4ch
int 21
code ends
end start
|
tests/nasm/push.asm | brenden7158/v86 | 12,700 | 163863 | global _start
section .data
align 16
myaddress:
dd 0xdeadbeef
%include "header.inc"
;; push r/m - push edx
db 0xff
db 0xf2
;; push r/m - push bx
db 0x66
db 0xff
db 0xf3
;; push imm
push 0xdeadbeef
push WORD 0xd00d
;; push r/m - mem
push DWORD [myaddress]
lea eax, [myaddress]
push WORD [eax]
;; push reg
mov ecx, 0xcafe
push cx
push ecx
xor eax, eax
pop ax
pop eax
pop cx
pop ecx
pop dx
pop ebx
pop si
pop di
%include "footer.inc"
|
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_IterateSprChar_callee.asm | jpoikela/z88dk | 640 | 88947 | ; void sp1_IterateSprChar(struct sp1_ss *s, void *hook1)
SECTION code_clib
SECTION code_temp_sp1
PUBLIC _sp1_IterateSprChar_callee
EXTERN asm_sp1_IterateSprChar
_sp1_IterateSprChar_callee:
pop af
pop hl
pop ix
push af
jp asm_sp1_IterateSprChar
|
examples/unapi-rom.asm | Konamiman/MSX-UNAPI-specification | 6 | 247787 | ;--- Sample implementation of a MSX-UNAPI specification in ROM
; By Konamiman, 5-2019
;
; This code implements a sample mathematical specification, "SIMPLE_MATH",
; which has just two functions:
; Function 1: Returns HL = L + E
; Function 2: Returns HL = L * E
;
; You can compile it with sjasm (https://github.com/Konamiman/Sjasm/releases):
; sjasm unapi-rom.asm math.rom
;
; Search for "TODO" comments for what to change/extend when creating your own implementation.
;*******************
;*** CONSTANTS ***
;*******************
;--- System variables and routines
CHPUT: equ 00A2h
HOKVLD: equ 0FB20h
EXPTBL: equ 0FCC1h
EXTBIO: equ 0FFCAh
SLTWRK: equ 0FD09h
ARG: equ 0F847h
;--- API version and implementation version
;TODO: Adjust for your implementation
API_V_P: equ 1
API_V_S: equ 0
ROM_V_P: equ 1
ROM_V_S: equ 0
;--- Maximum number of available standard and implementation-specific function numbers
;TODO: Adjust for your implementation
;Must be 0 to 127
MAX_FN: equ 2
;Must be either zero (if no implementation-specific functions available), or 128 to 254
MAX_IMPFN: equ 0
;********************************************
;*** ROM HEADER AND INITIALIZATION CODE ***
;********************************************
org 4000h
;--- ROM header
db "AB"
dw INIT
ds 12
INIT:
;--- Initialize EXTBIO hook if necessary
ld a,(HOKVLD)
bit 0,a
jr nz,OK_INIEXTB
ld hl,EXTBIO
ld de,EXTBIO+1
ld bc,5-1
ld (hl),0C9h ;code for RET
ldir
or 1
ld (HOKVLD),a
OK_INIEXTB:
;--- Save previous EXTBIO hook
call GETSLT
call GETWRK
ex de,hl
ld hl,EXTBIO
ld bc,5
ldir
;--- Patch EXTBIO hook
di
ld a,0F7h ;code for "RST 30h"
ld (EXTBIO),a
call GETSLT
ld (EXTBIO+1),a
ld hl,DO_EXTBIO
ld (EXTBIO+2),hl
ei
;>>> UNAPI initialization finished, now perform
; other ROM initialization tasks.
ROM_INIT:
;TODO: extend (or replace) with other initialization code as needed by your implementation
;--- Show informative message
ld hl,INITMSG
PRINT_LOOP:
ld a,(hl)
or a
jp z,INIT2
call CHPUT
inc hl
jr PRINT_LOOP
INIT2:
ret
;*******************************
;*** EXTBIO HOOK EXECUTION ***
;*******************************
DO_EXTBIO:
push hl
push bc
push af
ld a,d
cp 22h
jr nz,JUMP_OLD
cp e
jr nz,JUMP_OLD
;Check API ID
ld hl,UNAPI_ID
ld de,ARG
LOOP: ld a,(de)
call TOUPPER
cp (hl)
jr nz,JUMP_OLD2
inc hl
inc de
or a
jr nz,LOOP
;A=255: Jump to old hook
pop af
push af
inc a
jr z,JUMP_OLD2
;A=0: B=B+1 and jump to old hook
call GETSLT
call GETWRK
pop af
pop bc
or a
jr nz,DO_EXTBIO2
inc b
ex (sp),hl
ld de,2222h
ret
DO_EXTBIO2:
;A=1: Return A=Slot, B=Segment, HL=UNAPI entry address
dec a
jr nz,DO_EXTBIO3
pop hl
call GETSLT
ld b,0FFh
ld hl,UNAPI_ENTRY
ld de,2222h
ret
;A>1: A=A-1, and jump to old hook
DO_EXTBIO3: ;A=A-1 already done
ex (sp),hl
ld de,2222h
ret
;--- Jump here to execute old EXTBIO code
JUMP_OLD2:
ld de,2222h
JUMP_OLD: ;Assumes "push hl,bc,af" done
push de
call GETSLT
call GETWRK
pop de
pop af
pop bc
ex (sp),hl
ret
;************************************
;*** FUNCTIONS ENTRY POINT CODE ***
;************************************
UNAPI_ENTRY:
push hl
push af
ld hl,FN_TABLE
bit 7,a
if MAX_IMPFN >= 128
jr z,IS_STANDARD
ld hl,IMPFN_TABLE
and 01111111b
cp MAX_IMPFN-128
jr z,OK_FNUM
jr nc,UNDEFINED
IS_STANDARD:
else
jr nz,UNDEFINED
endif
cp MAX_FN
jr z,OK_FNUM
jr nc,UNDEFINED
OK_FNUM:
add a,a
push de
ld e,a
ld d,0
add hl,de
pop de
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
pop af
ex (sp),hl
ret
;--- Undefined function: return with registers unmodified
UNDEFINED:
pop af
pop hl
ret
;***********************************
;*** FUNCTIONS ADDRESSES TABLE ***
;***********************************
;TODO: Adjust for the routines of your implementation
;--- Standard routines addresses table
FN_TABLE:
FN_0: dw FN_INFO
FN_1: dw FN_ADD
FN_2: dw FN_MULT
;--- Implementation-specific routines addresses table
if MAX_IMPFN >= 128
IMPFN_TABLE:
FN_128: dw FN_DUMMY
endif
;************************
;*** FUNCTIONS CODE ***
;************************
;--- Mandatory routine 0: return API information
; Input: A = 0
; Output: HL = Descriptive string for this implementation, on this slot, zero terminated
; DE = API version supported, D.E
; BC = This implementation version, B.C.
; A = 0 and Cy = 0
FN_INFO:
ld bc,256*ROM_V_P+ROM_V_S
ld de,256*API_V_P+API_V_S
ld hl,APIINFO
xor a
ret
;TODO: Replace the FN_* routines below with the appropriate routines for your implementation
;--- Sample routine 1: adds two 8-bit numbers
; Input: E, L = Numbers to add
; Output: HL = Result
FN_ADD:
ld h,0
ld d,0
add hl,de
ret
;--- Sample routine 2: multiplies two 8-bit numbers
; Input: E, L = Numbers to multiply
; Output: HL = Result
FN_MULT:
ld b,e
ld e,l
ld d,0
ld hl,0
MULT_LOOP:
add hl,de
djnz MULT_LOOP
ret
;****************************
;*** AUXILIARY ROUTINES ***
;****************************
;--- Get slot connected on page 1
; Input: -
; Output: A = Slot number
; Modifies: AF, HL, E, BC
GETSLT:
di
exx
in a,(0A8h)
ld e,a
and 00001100b
sra a
sra a
ld c,a ;C = Slot
ld b,0
ld hl,EXPTBL
add hl,bc
bit 7,(hl)
jr z,NOEXP1
EXP1: inc hl
inc hl
inc hl
inc hl
ld a,(hl)
and 00001100b
or c
or 80h
ld c,a
NOEXP1: ld a,c
exx
ei
ret
;--- Obtain slot work area (8 bytes) on SLTWRK
; Input: A = Slot number
; Output: HL = Work area address
; Modifies: AF, BC
GETWRK:
ld b,a
rrca
rrca
rrca
and 01100000b
ld c,a ;C = Slot * 32
ld a,b
rlca
and 00011000b ;A = Subslot * 8
or c
ld c,a
ld b,0
ld hl,SLTWRK
add hl,bc
ret
;--- Convert a character to upper-case if it is a lower-case letter
TOUPPER:
cp "a"
ret c
cp "z"+1
ret nc
and 0DFh
ret
;**************
;*** DATA ***
;**************
;TODO: Adjust this data for your implementation
;--- Specification identifier (up to 15 chars)
UNAPI_ID:
db "SIMPLE_MATH",0
;--- Implementation identifier (up to 63 chars and zero terminated)
APIINFO:
db "Konamiman's ROM implementation of SIMPLE_MATH UNAPI",0
;--- Other data
INITMSG:
db 13,10,"UNAPI Sample ROM 1.0 (SIMPLE_MATH)",13,10
db "(c) 2019 by Konamiman",13,10
db 13,10
db 0
ds 0C000h-$ ;Padding to make a 32K ROM
|
src/flyweights/flyweights_lists_spec.ads | jhumphry/auto_counters | 5 | 16338 | -- flyweights_lists_spec.ads
-- A specification package that summarises the requirements for list packages
-- used in the Flyweights hashtables
-- Copyright (c) 2016, <NAME>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
pragma Profile (No_Implementation_Extensions);
generic
type Element_Access is private;
type List is private;
Empty_List : List;
with procedure Insert (L : in out List;
E : in out Element_Access);
with procedure Increment (L : in out List;
E : in Element_Access);
with procedure Remove (L : in out List;
Data_Ptr : in Element_Access);
package Flyweights_Lists_Spec is
end Flyweights_Lists_Spec;
|
Transynther/x86/_processed/AVXALIGN/_ht_/i7-7700_9_0xca_notsx.log_21829_462.asm | ljhsiun2/medusa | 9 | 171628 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x41d6, %rdx
nop
nop
nop
nop
nop
cmp %r9, %r9
movb $0x61, (%rdx)
nop
nop
and $2075, %r10
lea addresses_UC_ht+0x9a96, %rdi
nop
cmp %r12, %r12
mov (%rdi), %ax
xor %r9, %r9
lea addresses_normal_ht+0xa2d6, %rbp
dec %rdi
mov $0x6162636465666768, %rax
movq %rax, %xmm4
and $0xffffffffffffffc0, %rbp
vmovaps %ymm4, (%rbp)
nop
nop
nop
nop
add $57738, %r9
lea addresses_D_ht+0xbc56, %rbp
inc %rdi
movups (%rbp), %xmm4
vpextrq $0, %xmm4, %r9
nop
and %rdx, %rdx
lea addresses_normal_ht+0xfb76, %rax
nop
nop
nop
nop
xor $14064, %r9
vmovups (%rax), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %rdx
nop
nop
nop
nop
nop
sub %r10, %r10
lea addresses_D_ht+0x9216, %r12
nop
nop
nop
inc %rax
movw $0x6162, (%r12)
nop
nop
nop
nop
and $52289, %rax
lea addresses_D_ht+0x396, %rsi
lea addresses_A_ht+0x1ce2e, %rdi
nop
nop
nop
sub $1315, %rdx
mov $108, %rcx
rep movsw
dec %r10
lea addresses_UC_ht+0x7e62, %r10
nop
nop
nop
nop
dec %rax
movw $0x6162, (%r10)
nop
nop
nop
nop
xor $52068, %rdi
lea addresses_UC_ht+0x1b456, %rax
nop
nop
and %rbp, %rbp
movw $0x6162, (%rax)
nop
inc %rsi
lea addresses_D_ht+0x9b56, %rsi
cmp $27883, %rdi
movl $0x61626364, (%rsi)
nop
sub $16156, %r9
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %r8
push %rcx
push %rsi
// Store
lea addresses_RW+0x15b96, %r13
nop
nop
sub %r12, %r12
mov $0x5152535455565758, %rcx
movq %rcx, %xmm6
vmovups %ymm6, (%r13)
nop
nop
nop
nop
nop
dec %rcx
// Faulty Load
lea addresses_UC+0x1e456, %rsi
nop
nop
and %r12, %r12
vmovaps (%rsi), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %r13
lea oracles, %rcx
and $0xff, %r13
shlq $12, %r13
mov (%rcx,%r13,1), %r13
pop %rsi
pop %rcx
pop %r8
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_RW'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 4, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'44': 19584, '46': 2245}
44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 46 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 46 46 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 46 44 46 44 44 46 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 46 44 44 46 44 44 44 44 46 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 46 46 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 46 44 46 44 44 44 44 46 44 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 46 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 46 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 46 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 44 44 46 44 44 44 44 44 46 44 44 44 44 46 44 44 44 44 44 44 46 44 44 44 44 44 44 46 44 44 44 46 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 46 46 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 46 44 44 44 44 46 44 44 44 44 44 46 44 46 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 46 44 44
*/
|
antlr4/FoostacheLexer.g4 | daxee/foostache | 0 | 4843 | lexer grammar FoostacheLexer;
/* scanner rules */
COMMENT : '{{!' .*? '}}' -> skip ;
OPENL : '{{"' -> pushMode(inLiteral) ;
OPEN : '{{' -> pushMode(inTag) ;
TEXT : (~'{')+ | '{';
mode inLiteral;
CLOSEL : '"}}' -> popMode ;
TEXTL : . ;
mode inTag;
CLOSE : '}}' -> popMode ;
WS : [ \t\r\n]+ -> skip ;
OPENQS: '"' -> pushMode(inQuotedString) ;
AFTER : ':after' ;
BEFORE : ':before' ;
BETWEEN : ':between' ;
ELSE : ':else' ;
ELSEIF : ':elseif' ;
END : ':end' ;
ESCAPE : ':escape' ;
FILTER : ':filter' ;
IF : ':if' ;
ITERATE : ':iterate' ;
WITH : ':with' ;
TYPE : 'string' | 'number' | 'object' | 'array' | 'boolean' | 'null' ;
AND : 'and' ;
EXISTS : 'exists' ;
IS : 'is' ;
NOT : 'not' ;
OR : 'or' ;
LPAREN : '(' ;
RPAREN : ')' ;
DOT : '.' ;
LBRACKET : '[' ;
RBRACKET : ']' ;
CARET : '^' ;
COLON : ':' ;
PIPE : '|' ;
PERCENT : '%' -> pushMode(inNumSpec) ;
INTEGER : '0' | ('-'? [1-9][0-9]*) ;
ID : [a-zA-Z0-9_]+ ;
mode inNumSpec;
ZERO : '0' ;
DOTN : '.' ;
PINTEGERN : [1-9][0-9]* ;
NUMBER_SPECIFIER : ( 'd' | 'f' ) -> popMode ;
// PINTEGER : [1-9][0-9]* ;
// NUMBER_FORMAT : '%' '0'? PINTEGER? (DOT PINTEGER)? ('d' | 'f' | 'e') ;
mode inQuotedString;
fragment
HEXDIGIT : [0-9a-fA-F] ;
ESCCHARQS : '\\' ( '"' | '\\' | '/' | 'b' | 'f' | 'n' | 'r' | 't' | 'u' HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT ) ;
CLOSEQS: '"' -> popMode ;
CHARQS: . ;
// STRING: '"' (ESC| ~('\\' | '"'))*? '"' ;
|
home/16bit.asm | FieryMewtwo/aedx | 0 | 1274 | ___conversion_table_homecall: MACRO
; macro arguments: homecall type, function label
; all functions clobber af and hl (except for outputs) and preserve bc and de
; homecall types:
; - read: index to ID conversion (in: a = 8-bit ID; out: hl = 16-bit index)
; - write: ID to index conversion (in: hl = 16-bit index; out: a = 8-bit ID)
; - lock: ID locking (in: a = ID (or zero to unlock), l = position; out: a = preserved)
if strcmp("\1", "read") && strcmp("\1", "write") && strcmp("\1", "lock")
fail "16-bit homecall: invalid call type"
endc
if "\1" != "write"
ld h, a
endc
ldh a, [hROMBank]
push af
ld a, BANK(\2)
rst Bankswitch
if "\1" == "read"
ld a, h
endc
call \2
if "\1" != "read"
ld l, a
endc
pop af
rst Bankswitch
if "\1" != "read"
ld a, l
endc
ret
ENDM
___conversion_table_homecall_readlocked: MACRO
; macro argument: table name
; in: a = position
; out: a = 8-bit index; everything else preserved
push hl
add a, LOW(\1LockedEntries)
ld l, a
ldh a, [rSVBK]
ld h, a
ld a, BANK(\1LockedEntries)
ldh [rSVBK], a
ld a, h
ld h, HIGH(\1LockedEntries)
ld l, [hl]
ldh [rSVBK], a
ld a, l
pop hl
ret
ENDM
|
programs/oeis/341/A341346.asm | neoneye/loda | 22 | 90486 | <gh_stars>10-100
; A341346: a(n) = A048673(2n-1) mod 3.
; 1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,1,0,0,0,1,1,0,1,0,1,0,0,1,1,1,1,0,0,0,1,1,1,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,1,1,0,1,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,1,0,0,0,1,1,1,0,1,1,1
mul $0,2
seq $0,3961 ; Completely multiplicative with a(prime(k)) = prime(k+1).
mod $0,3
mod $0,2
|
scripts/SafariZoneCenterRestHouse.asm | AmateurPanda92/pokemon-rby-dx | 9 | 5683 | SafariZoneCenterRestHouse_Script:
jp EnableAutoTextBoxDrawing
SafariZoneCenterRestHouse_TextPointers:
dw SafariZoneRestHouse1Text1
dw SafariZoneRestHouse1Text2
SafariZoneRestHouse1Text1:
TX_FAR _SafariZoneRestHouse1Text1
db "@"
SafariZoneRestHouse1Text2:
TX_FAR _SafariZoneRestHouse1Text2
db "@"
|
oeis/270/A270567.asm | neoneye/loda-programs | 11 | 29448 | <filename>oeis/270/A270567.asm
; A270567: Expansion of (1+4*x)/(1-5*x).
; 1,9,45,225,1125,5625,28125,140625,703125,3515625,17578125,87890625,439453125,2197265625,10986328125,54931640625,274658203125,1373291015625,6866455078125,34332275390625,171661376953125,858306884765625,4291534423828125,21457672119140625,107288360595703125,536441802978515625,2682209014892578125,13411045074462890625,67055225372314453125,335276126861572265625,1676380634307861328125,8381903171539306640625,41909515857696533203125,209547579288482666015625,1047737896442413330078125
mov $1,5
pow $1,$0
mul $1,9
div $1,5
mov $0,$1
|
laborator/lab-04/5-min/min.asm | Matei-Iordache/IOCLA-labs | 0 | 19135 | %include "../io.mac"
section .text
global main
extern printf
main:
;cele doua numere se gasesc in eax si ebx
; TODO: aflati minimul
mov eax, 4
mov ebx, 1
cmp eax, ebx
jl min
xchg eax, ebx
min:
PRINTF32 `%d\n\x0`, eax ; afiseaza minimul
ret
|
src/main/antlr/io/kpatel/algbeans/parser/AlgBeans.g4 | kpatel20538/AlgBeans | 0 | 2444 | <filename>src/main/antlr/io/kpatel/algbeans/parser/AlgBeans.g4
grammar AlgBeans;
@header{
package io.kpatel.algbeans.parser;
}
/*
* TODO: Field Annotations : (Annotion Targeting may not be trivial)
*/
fragment JAVA_LETTER : '_' | ('A' .. 'Z') | ('a' .. 'z');
fragment JAVA_NUMBER : '0' .. '9';
fragment JAVA_LETTER_NUMBER : JAVA_NUMBER | JAVA_LETTER ;
fragment SIGN : '-' | '+' ;
fragment BASE : '0x'|'0o'|'0b' ;
fragment ISUFFIX : 'L' ;
fragment FSUFFIX : 'f' | 'd' ;
fragment EXPONENT : 'e' | 'E' ;
fragment DIGIT : '_' | '0' .. '9';
WS : [\p{White_Space}]+ -> skip;
COMMENT_BLOCK : '/*' .*? '*/' -> skip;
COMMENT_LINE : '//' .*? [\n\r]+ -> skip;
/*
OPERATOR : '<<=' | '<<' | '<=' | '<' | '!=' | '!' | '>>>=' | '>>>' | '>>=' | '>>' | '>=' | '>'
| '==' | '=' | '++' | '+=' | '+' | '--' | '-=' | '-' | '*=' | '*' | '/=' | '/' | '%='
| '%' | '~' | '&&' | '&' | '&=' | '|=' | '||' | '|' | '^=' | '^' | ':' | '?'; */
PRIMITIVE : 'float' | 'double' | 'byte' | 'short' | 'int' | 'long' | 'char' | 'boolean';
MODIFIER : 'transient' | 'volatile' | 'synchronized';
FINAL : 'final';
PACKAGE : 'package';
IMPORT : 'import';
STATIC : 'static';
EXTENDS : 'extends';
SUPER : 'super';
THIS : 'this';
VOID : 'void' ;
CLASS : 'class';
BOOLVALUE : 'true' | 'false';
NULLVALUE : 'null';
CHAR : '\'' .*? '\'';
STRING : '"' ('\\"'|.)*? '"';
JAVA_IDENTIFIER : JAVA_LETTER JAVA_LETTER_NUMBER*;
INTEGRAL : SIGN? BASE? DIGIT+ ISUFFIX?;
FLOATING : SIGN? DIGIT+ ('.' DIGIT+)? (EXPONENT SIGN? DIGIT+)? FSUFFIX?;
document : packageLine? importLine* unionLine* EOF;
packageLine : PACKAGE packageName ';';
importLine : IMPORT STATIC? packagePattern ';';
unionLine : unionType '=' productType ('|' productType)* ';';
packageName : identifier ('.' identifier )*;
packagePattern : packageName '.*'?;
identifier : JAVA_IDENTIFIER;
unionType : annotation* identifier typeParameters?;
productType : identifier '(' fields? ')';
// productType : annotation* identifier '(' fields? ')';
fields : fieldDeclaration (',' fieldDeclaration)* ','?;
fieldDeclaration : (FINAL | MODIFIER)* typeName identifier ('=' fieldInit)?;
// fieldDeclaration : fieldModifier* typeName identifier ('=' fieldInit)?;
// fieldModifier : MODIFIER | annotation;
fieldInit : arrayInitializer | expression;
arrayInitializer : '{' fieldInit (',' fieldInit)* ','? '}';
expression : ((expressionName | primary) ('=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|='))* (lambdaExpression | conditionalExpression);
lambdaExpression : lambdaParameters '->' lambdaBody;
lambdaParameters : '(' formalParameterList? ')' | '(' identifier (',' identifier)* ')' | identifier;
formalParameterList : (receiverParameter ',') ? formalParameter (',' formalParameter)* (',' varargParameter);
receiverParameter : annotation* typeName (identifier '.')? THIS;
varargParameter : variableModifier* typeName annotation* '...' variableDeclaratorId;
formalParameter : variableModifier* typeName variableDeclaratorId;
variableModifier : annotation | FINAL;
variableDeclaratorId : identifier dims;
dims : (annotation* '[' ']')+;
dimExpr : annotation* '[' expression ']';
lambdaBody : expression | block;
block : '{' (block|.)*? '}';
expressionName : identifier ('.' identifier)*;
conditionalExpression : conditionalOrExpression ('?' expression ':' (conditionalExpression | lambdaExpression) )*;
conditionalOrExpression : conditionalAndExpression ('||' conditionalAndExpression)*;
conditionalAndExpression : inclusiveOrExpression ('&&' inclusiveOrExpression)*;
inclusiveOrExpression : exclusiveOrExpression ('|' exclusiveOrExpression)*;
exclusiveOrExpression : andExpression ('^' andExpression)*;
andExpression : equalityExpression ('&' equalityExpression)*;
equalityExpression : relationalExpression ( ('==' | '!=') relationalExpression)*;
relationalExpression : shiftExpression ( ( '<=' | '>=' |'<' | '>' | 'instanceof' ) shiftExpression)*;
shiftExpression : additiveExpression ( ('<' '<' | '>' '>' | '>' '>' '>') additiveExpression)*;
additiveExpression : multiplicativeExpression ( ('+' | '-') multiplicativeExpression)*;
multiplicativeExpression : unaryExpression ( ('*' | '/' | '%') unaryExpression)*;
unaryExpression : ('+' | '-')* unaryNotPMExpression;
unaryNotPMExpression : ('~' | '!')* (postfixExpression | castExpression);
postfixExpression : (expressionName | primary) ('+' '+' | '-' '-')*;
castExpression : '(' typeName ('&' typeName)* ')' (unaryNotPMExpression | lambdaExpression);
primary : (literal | typeName | keywordLiterals | ('(' expression ')') | methodInvocationSuffix | classInstanceCreationExpressionSuffix | ('new' typeName ((dimExpr+ dims*) | (dims+ arrayInitializer)) ))
( ('.' keywordLiterals) | fieldAccessSuffix | arrayAccessSuffix | ('.' typeArguments? methodInvocationSuffix) | methodReferenceSuffix | classInstanceCreationExpressionSuffix)*;
classInstanceCreationExpressionSuffix : 'new' typeArguments? annotation* identifier ('.' annotation* identifier)* typeArguments? block?;
fieldAccessSuffix : '.' identifier;
arrayAccessSuffix : '[' expression ']';
methodInvocationSuffix : identifier '(' (expression (',' expression)*)? ')';
methodReferenceSuffix : '::' typeArguments? ('new' | identifier);
literal : INTEGRAL | FLOATING | BOOLVALUE | STRING | CHAR | NULLVALUE;
keywordLiterals : THIS | SUPER | VOID | CLASS;
annotation : '@' typeName ('(' (elementValue | (elementPair (',' elementPair)*))? ')')?;
elementPair : identifier '=' elementValue;
elementValue : conditionalExpression | elementValueArrayInitializer | annotation;
elementValueArrayInitializer : '{' (elementValue (',' elementValue)*)? ','? '}' ;
typeParameters : '<' typeParameter (',' typeParameter)* '>';
typeParameter : identifier typeBounds?;
typeBounds : EXTENDS referenceType ('&' referenceType)*;
typeArguments : '<' typeArgument (',' typeArgument)* '>';
typeArgument : referenceType | ('?' ((EXTENDS | SUPER) referenceType)?);
typeName : (primitiveType | referenceType) arraySuffix?;
referenceType : typeDecl ('.' typeDecl )* typeArguments?;
primitiveType : PRIMITIVE;
typeDecl : identifier typeArguments?;
arraySuffix : '[' ']';
|
Old Programmes/8085/BCD to HEX/BCDtoHEX.asm | illuminati-inc-2020/school | 0 | 98301 | LDA 00A0H
MOV B,A
MVI C,64H
CALL MULTIPLY
MOV E,B
LDA 00A1H
MOV D,A
ANI 0F0H
ADI 00H
RAR
RAR
RAR
RAR
MOV B,A
MVI C,0AH
CALL MULTIPLY
MOV A,E
ADD B
MOV E,A
MOV A,D
ANI 0FH
ADD E
STA 00B0H
HLT
;Input : B,C
;Output : B
MULTIPLY: SUB A
MUL_LOOP: ADD B
DCR C
JNZ MUL_LOOP
MOV B,A
RET |
programs/oeis/001/A001652.asm | neoneye/loda | 22 | 94789 | <reponame>neoneye/loda
; A001652: a(n) = 6*a(n-1) - a(n-2) + 2 with a(0) = 0, a(1) = 3.
; 0,3,20,119,696,4059,23660,137903,803760,4684659,27304196,159140519,927538920,5406093003,31509019100,183648021599,1070379110496,6238626641379,36361380737780,211929657785303,1235216565974040,7199369738058939,41961001862379596,244566641436218639,1425438846754932240,8308066439093374803,48422959787805316580,282229692287738524679,1644955193938625831496,9587501471344016464299,55880053634125472954300,325692820333408821261503,1898276868366327454614720,11063968389864555906426819,64485533470821007983946196,375849232435061491997250359,2190609861139547943999555960,12767809934402226172000085403,74416249745273809088000956460,433729688537240628356005653359,2527961881478169961048032963696,14734041600331779137932192128819,85876287720512504866545119809220,500523684722743250061338526726503,2917265820615946995501486040549800,17003071238972938722947577716572299,99101161613221685342183980258883996,577603898440357173330156303836731679
mov $1,4
mov $2,8
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $1,$2
add $2,$1
lpe
div $1,8
mov $0,$1
|
programs/oeis/048/A048763.asm | neoneye/loda | 22 | 26160 | <filename>programs/oeis/048/A048763.asm
; A048763: Smallest cube >= n.
; 0,1,8,8,8,8,8,8,8,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125
mov $2,$0
lpb $0
mov $0,$2
add $3,1
mov $1,$3
pow $1,3
trn $0,$1
lpe
mov $0,$1
|
source/serialization-xml.adb | ytomino/xml-ada | 0 | 13281 | <reponame>ytomino/xml-ada<filename>source/serialization-xml.adb<gh_stars>0
with Ada.Unchecked_Deallocation;
package body Serialization.XML is
use type Ada.Strings.Unbounded.String_Access;
use type Standard.XML.Event_Type;
Null_String : aliased String := "";
procedure Free_And_Null (X : in out Ada.Strings.Unbounded.String_Access) is
begin
if X /= Null_String'Access then
Ada.Strings.Unbounded.Free (X);
X := Null_String'Access;
end if;
end Free_And_Null;
Sequence_Item_Name : aliased String := "item";
procedure Free is
new Ada.Unchecked_Deallocation (Serializer, Serializer_Access);
procedure Free is
new Ada.Unchecked_Deallocation (XML_Reader, XML_Reader_Access);
procedure Free is
new Ada.Unchecked_Deallocation (XML_Writer, XML_Writer_Access);
-- private implementation
overriding procedure Finalize (Object : in out Reference_Type) is
begin
Free (Object.Serializer_Body);
if Object.Reader_Body /= null then
if Object.Reader_Body.Next_Name /= Null_String'Access then
Ada.Strings.Unbounded.Free (Object.Reader_Body.Next_Name);
end if;
if Object.Reader_Body.Next_Value /= Null_String'Access then
Ada.Strings.Unbounded.Free (Object.Reader_Body.Next_Value);
end if;
if Object.Reader_Body.Next_Next_Name /= Sequence_Item_Name'Access then
Ada.Strings.Unbounded.Free (Object.Reader_Body.Next_Next_Name);
end if;
Free (Object.Reader_Body);
end if;
if Object.Writer_Body /= null then
Free (Object.Writer_Body);
end if;
end Finalize;
-- reading
procedure Handle_Name (
Object : not null access XML_Reader;
Position : in State;
Event : in Standard.XML.Event;
Root_Tag : in String) is
begin
case Event.Event_Type is
when Standard.XML.Element_Start =>
Object.Next_Kind := Value; -- flag to Read_Value
if Object.Level = 0 then
if Event.Name.all /= Root_Tag then
raise Standard.XML.Data_Error;
end if;
else
case Position is
when In_Mapping =>
Object.Next_Name := new String'(Event.Name.all);
when In_Sequence =>
if Event.Name.all /= Sequence_Item_Name then
raise Standard.XML.Data_Error;
end if;
end case;
end if;
Object.Level := Object.Level + 1;
when Standard.XML.Element_End =>
Object.Level := Object.Level - 1;
case Position is
when In_Mapping =>
Object.Next_Kind := Leave_Mapping;
when In_Sequence =>
Object.Next_Kind := Leave_Sequence;
end case;
when Standard.XML.No_Event =>
Object.Next_Kind := End_Of_Stream;
when others =>
raise Standard.XML.Data_Error;
end case;
end Handle_Name;
procedure Read_Name (
Object : not null access XML_Reader;
Position : in State) is
begin
if Object.Next_Next_Name /= null then
Object.Next_Kind := Value;
if Object.Next_Next_Name /= Sequence_Item_Name'Access then
Object.Next_Name := Object.Next_Next_Name;
end if;
Object.Next_Next_Name := null;
else
declare
Parsing_Entry : aliased Standard.XML.Parsing_Entry_Type;
begin
Standard.XML.Get (Object.Reader.all, Parsing_Entry);
Handle_Name (
Object,
Position,
Standard.XML.Value (Parsing_Entry).Element.all,
"");
end;
end if;
end Read_Name;
procedure Read_Name_On_Start (
Object : not null access XML_Reader;
Tag : in String)
is
procedure Process (Event : in Standard.XML.Event) is
begin
case Event.Event_Type is
when Standard.XML.Document_Type =>
if Event.Name.all /= Tag then
raise Standard.XML.Data_Error
with """" & Event.Name.all & """ is not expected tag (""" & Tag & """) .";
end if;
when others =>
Handle_Name (Object, In_Mapping, Event, Tag);
end case;
end Process;
begin
declare
Parsing_Entry : aliased Standard.XML.Parsing_Entry_Type;
begin
Standard.XML.Get (Object.Reader.all, Parsing_Entry);
Process (Standard.XML.Value (Parsing_Entry).Element.all);
end;
if Object.Level = 0 then
declare
Parsing_Entry : aliased Standard.XML.Parsing_Entry_Type;
begin
Standard.XML.Get (Object.Reader.all, Parsing_Entry);
Process (Standard.XML.Value (Parsing_Entry).Element.all);
end;
if Object.Level = 0 then
raise Standard.XML.Data_Error
with "expected tag (""" & Tag & """) was not found.";
end if;
end if;
end Read_Name_On_Start;
procedure Read_Value (Object : not null access XML_Reader) is
begin
declare
Parsing_Entry : aliased Standard.XML.Parsing_Entry_Type;
begin
Standard.XML.Get (Object.Reader.all, Parsing_Entry);
case Standard.XML.Value (Parsing_Entry).Element.Event_Type is
when Standard.XML.Text | Standard.XML.CDATA =>
Object.Next_Kind := Value;
Object.Next_Value :=
new String'(Standard.XML.Value (Parsing_Entry).Element.Content.all);
when Standard.XML.Element_Start =>
if Standard.XML.Value (Parsing_Entry).Element.Name.all =
Sequence_Item_Name
then
Object.Next_Kind := Enter_Sequence;
Object.Next_Next_Name := Sequence_Item_Name'Access;
else
Object.Next_Kind := Enter_Mapping;
Object.Next_Next_Name :=
new String'(Standard.XML.Value (Parsing_Entry).Element.Name.all);
end if;
when others =>
raise Standard.XML.Data_Error;
end case;
end;
if Object.Next_Kind = Value then
declare
Parsing_Entry : aliased Standard.XML.Parsing_Entry_Type;
begin
Standard.XML.Get (Object.Reader.all, Parsing_Entry);
if Standard.XML.Value (Parsing_Entry).Element.Event_Type /=
Standard.XML.Element_End
then
raise Standard.XML.Data_Error;
end if;
end;
end if;
end Read_Value;
-- implementation of reading
function Reading (Reader : not null access Standard.XML.Reader; Tag : String)
return Reference_Type
is
pragma Suppress (Accessibility_Check);
R : XML_Reader_Access;
S : Serializer_Access;
In_Controlled : Boolean := False;
begin
R :=
new XML_Reader'(
Reader => Reader,
Next_Kind => End_Of_Stream,
Next_Name => Null_String'Access,
Next_Value => Null_String'Access,
Next_Next_Name => null,
Level => 0);
S := new Serializer'(Direction => Reading, Reader => R);
return Result : constant Reference_Type :=
(Ada.Finalization.Limited_Controlled
with
Serializer => S,
Serializer_Body => S,
Reader_Body => R,
Writer_Body => null)
do
pragma Unreferenced (Result);
In_Controlled := True;
Read_Name_On_Start (R, Tag);
if R.Next_Kind = Value then
Read_Value (R);
end if;
end return;
exception
when others =>
if not In_Controlled then
if R /= null then
if R.Next_Name /= Null_String'Access then
Ada.Strings.Unbounded.Free (R.Next_Name);
end if;
if R.Next_Value /= Null_String'Access then
Ada.Strings.Unbounded.Free (R.Next_Value);
end if;
if R.Next_Next_Name /= Sequence_Item_Name'Access then
Ada.Strings.Unbounded.Free (R.Next_Next_Name);
end if;
Free (R);
end if;
Free (S);
end if;
raise;
end Reading;
overriding function Next_Kind (Object : not null access XML_Reader)
return Stream_Element_Kind is
begin
return Object.Next_Kind;
end Next_Kind;
overriding function Next_Name (Object : not null access XML_Reader)
return not null access constant String is
begin
return Object.Next_Name;
end Next_Name;
overriding function Next_Value (Object : not null access XML_Reader)
return not null access constant String is
begin
return Object.Next_Value;
end Next_Value;
overriding procedure Advance (
Object : not null access XML_Reader;
Position : in State) is
begin
Free_And_Null (Object.Next_Name);
Free_And_Null (Object.Next_Value);
Read_Name (Object, Position);
if Object.Next_Kind = Value then
Read_Value (Object);
end if;
end Advance;
-- writing
procedure Write_Element_Start (
Object : not null access XML_Writer;
Name : in String) is
begin
Standard.XML.Put (
Object.Writer.all,
(Event_Type => Standard.XML.Element_Start, Name => Name'Unrestricted_Access));
end Write_Element_Start;
procedure Write_Element_End (Object : not null access XML_Writer) is
begin
Standard.XML.Put (Object.Writer.all, (Event_Type => Standard.XML.Element_End));
end Write_Element_End;
-- implementation of writing
function Writing (Writer : not null access Standard.XML.Writer; Tag : String)
return Reference_Type
is
pragma Suppress (Accessibility_Check);
W : XML_Writer_Access;
S : Serializer_Access;
In_Controlled : Boolean := False;
begin
W := new XML_Writer'(Writer => Writer, Level => 0);
S := new Serializer'(Direction => Writing, Writer => W);
return Result : constant Reference_Type :=
(Ada.Finalization.Limited_Controlled
with
Serializer => S,
Serializer_Body => S,
Reader_Body => null,
Writer_Body => W)
do
pragma Unreferenced (Result);
In_Controlled := True;
Standard.XML.Put_Document_Start (Writer.all);
Standard.XML.Put (
Writer.all,
(Event_Type => Standard.XML.Document_Type,
Name => Tag'Unrestricted_Access,
Public_Id => null,
System_Id => null,
Subset => null));
Write_Element_Start (W, Tag);
end return;
exception
when others =>
if not In_Controlled then
Free (W);
Free (S);
end if;
raise;
end Writing;
overriding procedure Put (
Object : not null access XML_Writer;
Name : in String;
Item : in String) is
begin
if Name /= "" then
Write_Element_Start (Object, Name);
end if;
Standard.XML.Put (
Object.Writer.all,
(Event_Type => Standard.XML.Text, Content => Item'Unrestricted_Access));
if Name /= "" then
Write_Element_End (Object);
end if;
if Object.Level = 0 then
Write_Element_End (Object);
Standard.XML.Put_Document_End (Object.Writer.all);
end if;
end Put;
overriding procedure Enter_Mapping (
Object : not null access XML_Writer;
Name : in String) is
begin
if Object.Level > 0 then
if Name /= "" then
Write_Element_Start (Object, Name);
else
Write_Element_Start (Object, Sequence_Item_Name);
end if;
end if;
Object.Level := Object.Level + 1;
end Enter_Mapping;
overriding procedure Leave_Mapping (Object : not null access XML_Writer) is
begin
Write_Element_End (Object);
Object.Level := Object.Level - 1;
if Object.Level = 0 then
Standard.XML.Put_Document_End (Object.Writer.all);
end if;
end Leave_Mapping;
overriding procedure Enter_Sequence (
Object : not null access XML_Writer;
Name : in String)
renames Enter_Mapping;
overriding procedure Leave_Sequence (Object : not null access XML_Writer)
renames Leave_Mapping;
end Serialization.XML;
|
LibraBFT/Impl/Base/Types.agda | cwjnkins/bft-consensus-agda | 0 | 8578 | <filename>LibraBFT/Impl/Base/Types.agda
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
module LibraBFT.Impl.Base.Types where
open import LibraBFT.Prelude
open import LibraBFT.Hash
NodeId : Set
NodeId = ℕ
_≟NodeId_ : (n1 n2 : NodeId) → Dec (n1 ≡ n2)
_≟NodeId_ = _≟ℕ_
UID : Set
UID = Hash
_≟UID_ : (u₀ u₁ : UID) → Dec (u₀ ≡ u₁)
_≟UID_ = _≟Hash_
|
oeis/173/A173484.asm | neoneye/loda-programs | 11 | 879 | ; A173484: a(n) = the smallest number ending in n+1 zeros divisible by n.
; Submitted by <NAME>
; 100,1000,30000,100000,1000000,30000000,700000000,1000000000,90000000000,100000000000,11000000000000,30000000000000,1300000000000000,7000000000000000,30000000000000000,100000000000000000,17000000000000000000,90000000000000000000,1900000000000000000000,1000000000000000000000,210000000000000000000000,1100000000000000000000000,23000000000000000000000000,30000000000000000000000000,100000000000000000000000000,13000000000000000000000000000,270000000000000000000000000000,700000000000000000000000000000
mov $1,$0
add $1,1
mov $0,$1
mov $2,10
pow $2,$1
mul $0,$2
gcd $1,$2
div $0,$1
mul $0,9
div $0,90
mul $0,100
|
Function/DomainRaise.agda | Lolirofle/stuff-in-agda | 6 | 219 | <filename>Function/DomainRaise.agda
module Function.DomainRaise where
open import Data
open import Data.Boolean
import Functional as Fn
import Lvl
open import Numeral.Natural
open import Numeral.Natural.Oper.Comparisons
open import Syntax.Number
open import Type
private variable ℓ ℓ₁ ℓ₂ : Lvl.Level
private variable T X Y Z : Type{ℓ}
private variable n : ℕ
-- Repeated function type like an n-ary operator.
-- Examples:
-- (a →̂ b)(0) = (b)
-- (a →̂ b)(1) = (a → b)
-- (a →̂ b)(2) = (a → a → b)
-- (a →̂ b)(3) = (a → a → a → b)
-- (a →̂ b)(4) = (a → a → a → a → b)
_→̂_ : Type{ℓ₁} → Type{ℓ₂} → (n : ℕ) → Type{if positive?(n) then (ℓ₁ Lvl.⊔ ℓ₂) else ℓ₂} -- TODO: Is the level thing really working?
(A →̂ B)(𝟎) = B
(A →̂ B)(𝐒(𝟎)) = A → B
(A →̂ B)(𝐒(𝐒(n))) = A → (A →̂ B)(𝐒(n))
open import Data.Tuple
open import Data.Tuple.Raise
apply₁ : let _ = n in X → (X →̂ Y)(𝐒(n)) → (X →̂ Y)(n)
apply₁ {𝟎} = Fn.apply
apply₁ {𝐒 _} = Fn.apply
apply₊ : let _ = n in (X ^ n) → (X →̂ Y)(n) → Y
apply₊ {𝟎} <> f = f
apply₊ {𝐒(𝟎)} x f = f(x)
apply₊ {𝐒(𝐒(n))} (x , xs) f = apply₊ {𝐒(n)} xs (f(x))
-- Applies the same argument on all arguments.
-- Examples:
-- f : (a →̂ b)(5)
-- applyRepeated{0} f(x) = f
-- applyRepeated{1} f(x) = f(x)
-- applyRepeated{2} f(x) = f(x)(x)
-- applyRepeated{3} f(x) = f(x)(x)(x)
-- applyRepeated{2}(applyRepeated{3} f(x)) (y) = f(x)(x)(y)(y)(y)
applyRepeated : let _ = n in (X →̂ Y)(n) → (X → Y)
applyRepeated{𝟎} f(x) = f
applyRepeated{𝐒(𝟎)} f(x) = f(x)
applyRepeated{𝐒(𝐒(n))} f(x) = applyRepeated{𝐒(n)} (f(x)) (x)
{-
-- Applies arguments from a function.
-- Almost (not really) like a composition operation.
-- Examples:
-- f : (a →̂ b)(3)
-- applyFn f g = f (g(2)) (g(1)) (g(0))
applyFn : ∀{n}{T₁}{T₂} → (T₁ →̂ T₂)(n) → (𝕟(n) → T₁) → T₂
applyFn{𝟎} f g = f
applyFn{𝐒(n)} f g = applyFn{n} (f(g(ℕ-to-𝕟 (n) {𝐒(n)} ⦃ [<?]-𝐒 {n} ⦄))) (g ∘ (bound-𝐒{n}))
-- TODO: Examples:
-- swapReverse {3} f (y₂) (y₁) (y₀)
-- = swapReverse {2} (f(y₂)) (y₁) (y₀)
-- = swapReverse {1} (f(y₂) (y₁)) (y₀)
-- = swapReverse {0} (f(y₂) (y₁) (y₀))
-- = f(y₂) (y₁) (y₀)
-- swapReverse : ∀{n}{T₁}{T₂} → (T₁ →̂ T₂)(n) → (T₁ →̂ T₂)(n)
-- swapReverse {𝟎} y₀ = y₀
-- swapReverse {𝐒(n)} f(yₙ) = (swapReverse {n} f) ∘ (f(yₙ))
-- directOp : ∀{n}{X}{Y} → ((X → Y) →̂ ((X ^ n) → (Y ^ n)))(n)
-}
-- Function composition on a multi-argument function (Like PrimitiveRecursion.Composition).
-- Examples:
-- (f ∘₄ g) x₁ x₂ x₃ x₄
-- = (f ∘₃ g x₁) x₂ x₃ x₄
-- = (f ∘₂ g x₁ x₂) x₃ x₄
-- = (f ∘₁ g x₁ x₂ x₃) x₄
-- = (f ∘ g x₁ x₂ x₃) x₄
-- = f(g x₁ x₂ x₃ x₄)
_∘_ : let _ = n ; _ = X ; _ = Y ; _ = Z in (Y → Z) → (X →̂ Y)(n) → (X →̂ Z)(n)
_∘_ {𝟎} = Fn.id
_∘_ {𝐒(𝟎)} = Fn._∘_
_∘_ {𝐒(𝐒(n))} = Fn._∘_ Fn.∘ (_∘_) -- (f ∘ₙ₊₂ g)(x) = f ∘ₙ₊₁ g(x)
_∘[_]_ : let _ = X ; _ = Y ; _ = Z in (Y → Z) → (n : ℕ) → (X →̂ Y)(n) → (X →̂ Z)(n)
f ∘[ n ] g = _∘_ {n = n} f g
_∘₀_ = _∘_ {0}
_∘₁_ = _∘_ {1}
_∘₂_ = _∘_ {2}
_∘₃_ = _∘_ {3}
_∘₄_ = _∘_ {4}
_∘₅_ = _∘_ {5}
_∘₆_ = _∘_ {6}
_∘₇_ = _∘_ {7}
_∘₈_ = _∘_ {8}
_∘₉_ = _∘_ {9}
-- TODO: Flip the arguments and make n explicit
-- Single function composition on every argument.
-- (f on g)(y₁)(y₂).. = g (f(y₁)) (f(y₂)) ..
-- Examples:
-- _on_ {3} f g (y₂) (y₁) (y₀)
-- = _on_ {2} f (g (f(y₂))) (y₁) (y₀)
-- = _on_ {1} f (g (f(y₂)) (f(y₁))) (y₀)
-- = _on_ {0} f (g (f(y₂)) (f(y₁)) (f(y₀)))
-- = g (f(y₂)) (f(y₁)) (f(y₀))
on : let _ = n ; _ = X ; _ = Y ; _ = Z in (Y →̂ Z)(n) → (X → Y) → (X →̂ Z)(n)
on {n = 𝟎} = Fn.const
on {n = 𝐒(𝟎)} = Fn._∘_
on {n = 𝐒(𝐒(n))} f g(yₙ) = on {n = 𝐒(n)} (f(g(yₙ))) g
-- applyOnFn : ∀{n}{X}{Y} → (Y →̂ Y)(n) → ((X → Y) →̂ (X → Y))(n)
-- applyOnFn
-- Constructs a left-associated n-ary operator from a binary operator.
-- Example:
-- naryₗ{3} (_▫_) x₁ x₂ x₃ x₄ x₅
-- = ((naryₗ{2} (_▫_)) Fn.∘ (x₁ ▫_)) x₂ x₃ x₄
-- = (naryₗ{2} (_▫_) (x₁ ▫ x₂)) x₃ x₄ x₅
-- = ((naryₗ{1} (_▫_)) Fn.∘ ((x₁ ▫ x₂) ▫_)) x₃ x₄ x₅
-- = (naryₗ{1} (_▫_) ((x₁ ▫ x₂) ▫ x₃)) x₄ x₅
-- = ((naryₗ{0} (_▫_)) Fn.∘ (((x₁ ▫ x₂) ▫ x₃) ▫_)) x₃ x₄ x₅
-- = (naryₗ{0} (_▫_) (((x₁ ▫ x₂) ▫ x₃) ▫ x₄)) x₅
-- = ((_▫_) (((x₁ ▫ x₂) ▫ x₃) ▫ x₄)) x₅
-- = ((((x₁ ▫ x₂) ▫ x₃) ▫ x₄) ▫_) x₅
-- = (((x₁ ▫ x₂) ▫ x₃) ▫ x₄) x₅
naryₗ : (n : ℕ) → (X → X → X) → (X →̂ X)(𝐒(𝐒(n)))
naryₗ(𝟎) (_▫_) = (_▫_)
naryₗ(𝐒(n)) (_▫_) x = (naryₗ(n) (_▫_)) Fn.∘ (x ▫_)
-- Constructs a right-associated n-ary operator from a binary operator.
-- Example:
-- naryᵣ{3} (_▫_) x₁ x₂ x₃ x₄ x₅
-- = ((x₁ ▫_) ∘[ 4 ] (naryᵣ{2} (_▫_))) x₂ x₃ x₄ x₅
-- = x₁ ▫ (naryᵣ{2} (_▫_) x₂ x₃ x₄ x₅)
-- = x₁ ▫ (((x₂ ▫_) ∘[ 3 ] (naryᵣ{1} (_▫_))) x₃ x₄ x₅)
-- = x₁ ▫ (x₂ ▫ (naryᵣ{1} (_▫_) x₃ x₄ x₅))
-- = x₁ ▫ (x₂ ▫ (((x₃ ▫_) ∘[ 2 ] (naryᵣ{0} (_▫_))) x₄ x₅))
-- = x₁ ▫ (x₂ ▫ (x₃ ▫ (naryᵣ{0} (_▫_) x₄ x₅)))
-- = x₁ ▫ (x₂ ▫ (x₃ ▫ ((_▫_) x₄ x₅)))
-- = x₁ ▫ (x₂ ▫ (x₃ ▫ (x₄ ▫ x₅)))
naryᵣ : (n : ℕ) → (X → X → X) → (X →̂ X)(𝐒(𝐒(n)))
naryᵣ(𝟎) (_▫_) = (_▫_)
naryᵣ(𝐒(n)) (_▫_) x = (x ▫_) ∘[ 𝐒(𝐒(n)) ] (naryᵣ(n) (_▫_))
{-
[→̂]-to-[⇉] : (n : ℕ) → ∀{X : Type{ℓ₁}}{Y : Type{ℓ₂}} → (X →̂ Y)(n) → (RaiseType.repeat(n) X ⇉ Y)
[→̂]-to-[⇉] 0 f = f
[→̂]-to-[⇉] 1 f = f
[→̂]-to-[⇉] (𝐒(𝐒(n))) f = [→̂]-to-[⇉] (𝐒(n)) ∘ f
-}
|
programs/oeis/092/A092092.asm | karttu/loda | 0 | 88128 | <reponame>karttu/loda
; A092092: Back and Forth Summant S(n, _3): a(n) = Sum_{i=0..floor(2n/3)} (n-3i).
; 1,1,0,3,2,0,5,3,0,7,4,0,9,5,0,11,6,0,13,7,0,15,8,0,17,9,0,19,10,0,21,11,0,23,12,0,25,13,0,27,14,0,29,15,0,31,16,0,33,17,0,35,18,0,37,19,0,39,20,0,41,21,0,43,22,0,45,23,0,47,24,0,49,25,0,51,26,0,53,27,0,55,28,0,57,29,0,59,30,0,61,31,0,63,32,0,65,33,0,67,34,0,69,35,0,71,36,0,73,37,0,75,38,0,77,39,0,79,40,0,81,41,0,83,42,0,85,43,0,87,44,0,89,45,0,91,46,0,93,47,0,95,48,0,97,49,0,99,50,0,101,51,0,103,52,0,105,53,0,107,54,0,109,55,0,111,56,0,113,57,0,115,58,0,117,59,0,119,60,0,121,61,0,123,62,0,125,63,0,127,64,0,129,65,0,131,66,0,133,67,0,135,68,0,137,69,0,139,70,0,141,71,0,143,72,0,145,73,0,147,74,0,149,75,0,151,76,0,153,77,0,155,78,0,157,79,0,159,80,0,161,81,0,163,82,0,165,83,0,167
mov $2,$0
mul $0,2
mov $1,1
lpb $0,1
sub $0,1
sub $1,$2
trn $1,1
add $1,$0
trn $0,2
lpe
|
test/Fail/Issue4768.agda | shlevy/agda | 1,989 | 7453 | <filename>test/Fail/Issue4768.agda
-- Andreas, 2020-06-21, issue #4768
-- Problem was: @0 appearing in "Not a finite domain" message.
open import Agda.Builtin.Bool
open import Agda.Primitive.Cubical
f : (i : I) → IsOne i → Set
f i (i0 = i1) = Bool
-- EXPECTED:
-- Not a finite domain: IsOne i
-- when checking that the pattern (i0 = i1) has type IsOne i
|
Working Disassembly/General/Title/Map - SK Banner.asm | TeamASM-Blur/Sonic-3-Blue-Balls-Edition | 5 | 91246 | <filename>Working Disassembly/General/Title/Map - SK Banner.asm
Map_CB994: dc.w word_CB996-Map_CB994
word_CB996: dc.w $1E ; DATA XREF: ROM:000CB994o
dc.b $D8, $F, $60, 0, $FF, $9C
dc.b $D8, $F, $60, $10, $FF, $BC
dc.b $D8, $F, $60, $20, $FF, $DC
dc.b $D8, $F, $60, $30, $FF, $FC
dc.b $D8, $B, $60, $40, 0, $1C
dc.b $E0, $E, $60, $4C, 0, $34
dc.b $F8, $C, $60, $58, $FF, $84
dc.b $F8, $C, $60, $5C, $FF, $A4
dc.b $F8, $C, $60, $60, $FF, $C4
dc.b $F8, $C, $60, $64, $FF, $E4
dc.b $F8, $C, $60, $68, 0, 4
dc.b $F8, $C, $60, $6C, 0, $24
dc.b $F8, $C, $60, $70, 0, $44
dc.b $F8, 8, $60, $74, 0, $64
dc.b 0, $F, $20, $77, $FF, $84
dc.b 0, $F, $20, $87, $FF, $A4
dc.b 0, $F, $20, $97, $FF, $C4
dc.b 0, $F, $20, $A7, $FF, $E4
dc.b 0, $F, $20, $B7, 0, 4
dc.b 0, $F, $20, $C7, 0, $24
dc.b 0, $F, $20, $D7, 0, $44
dc.b 0, $B, $20, $E7, 0, $64
dc.b $20, $C, $20, $F3, $FF, $84
dc.b $20, $C, $20, $F7, $FF, $A4
dc.b $20, $C, $20, $FB, $FF, $C4
dc.b $20, $C, $20, $FF, $FF, $E4
dc.b $20, $C, $21, 3, 0, 4
dc.b $20, $C, $21, 7, 0, $24
dc.b $20, $C, $21, $B, 0, $44
dc.b $20, 8, $21, $F, 0, $64
|
src/kafka.adb | Latence-Technologies/Kafka-Ada | 0 | 9718 | <gh_stars>0
with System.Address_To_Access_Conversions;
package body Kafka is
Error_Buffer_Size : constant size_t := 512;
function Version return String is
begin
return Interfaces.C.Strings.Value(rd_kafka_version_str);
end;
function Get_Error_Name(Error_Code: Kafka_Response_Error_Type) return String is
begin
return Interfaces.C.Strings.Value(rd_kafka_err2name(Error_Code));
end;
function Create_Handle(HandleType : Kafka_Handle_Type;
Config : Config_Type) return Handle_Type is
C_Err : chars_ptr := Alloc(Error_Buffer_Size);
Handle : Handle_Type;
begin
Handle := rd_kafka_new(HandleType, Config, C_Err, Error_Buffer_Size);
if Handle = Handle_Type(System.Null_Address) then
declare
Error : String := Interfaces.C.Strings.Value(C_Err);
begin
Free(C_Err);
raise Kafka_Error with Error;
end;
end if;
Free(C_Err);
return Handle;
end Create_Handle;
procedure Flush(Handle : Handle_Type;
Timeout : Duration) is
Response : Kafka_Response_Error_Type;
begin
Response := rd_kafka_flush(Handle, int(Timeout * 1000));
if Response = RD_KAFKA_RESP_ERR_u_TIMED_OUT then
raise Timeout_Reached;
elsif Response /= RD_KAFKA_RESP_ERR_NO_ERROR then
raise Kafka_Error with "Unknown error returned by rd_kafka_flush: " & Kafka.Get_Error_Name(Response);
end if;
end Flush;
function Poll(Handle : Handle_Type;
Timeout : Duration) return Integer is
begin
return Integer(rd_kafka_poll(Handle, int(Timeout * 1000)));
end Poll;
procedure Poll(Handle : Handle_Type;
Timeout : Duration) is
Result : Integer;
begin
Result := Poll(Handle, Timeout);
end Poll;
procedure Produce(Topic : Topic_Type;
Partition : Integer_32;
Message_Flags : Kafka_Message_Flag_Type;
Payload : System.Address;
Payload_Length : size_t;
Key : System.Address;
Key_Length : size_t;
Message_Opaque : System.Address) is
Result : int;
begin
Result := rd_kafka_produce(Topic, Partition, Message_Flags, Payload, Payload_Length, Key, Key_Length, Message_Opaque);
if(Result /= 0) then
raise Kafka_Error with Get_Error_Name(Get_Last_Error);
end if;
end Produce;
procedure Produce(Topic : Topic_Type;
Partition : Integer_32;
Payload : String;
Key : String;
Message_Opaque : System.Address) is
type Byte_Array is array (Positive range <>) of aliased Interfaces.Unsigned_8;
-- Does not matter since we are passing length to the C function, specifying the bound
pragma Warnings (Off, "To_Pointer results may not have bounds");
package Byte_Conv is new System.Address_To_Access_Conversions(Byte_Array);
pragma Warnings (On);
Payload_Bytes : aliased Byte_Array := (1 .. Payload'Length => 0);
Key_Bytes : aliased Byte_Array := (1 .. Key'Length => 0);
begin
for Index in 1 .. Payload'Length loop
Payload_Bytes(Index) := Character'Pos(Payload(Payload'First + Index - 1));
end loop;
for Index in 1 .. Key'Length loop
Key_Bytes(Index) := Character'Pos(Key(Key'First + Index - 1));
end loop;
Produce(Topic,
Partition,
RD_KAFKA_MSG_F_COPY,
Byte_Conv.To_Address(Payload_Bytes'Access),
Payload_Bytes'Length,
Byte_Conv.To_Address(Key_Bytes'Access),
Key_Bytes'Length,
Message_Opaque);
end Produce;
procedure Subscribe(Handle : Handle_Type;
Partition_List : Partition_List_Type) is
Response : Kafka_Response_Error_Type;
begin
Response := rd_kafka_subscribe(Handle, Partition_List);
if Response /= RD_KAFKA_RESP_ERR_NO_ERROR then
raise Kafka_Error with "Error returned by rd_kafka_subscribe: " & Kafka.Get_Error_Name(Response);
end if;
end Subscribe;
procedure Unsubscribe(Handle : Handle_Type) is
Response : Kafka_Response_Error_Type;
begin
Response := rd_kafka_unsubscribe(Handle);
if Response /= RD_KAFKA_RESP_ERR_NO_ERROR then
raise Kafka_Error with "Error returned by rd_kafka_unsubscribe: " & Kafka.Get_Error_Name(Response);
end if;
end Unsubscribe;
end Kafka;
|
programs/oeis/086/A086746.asm | karttu/loda | 1 | 161708 | ; A086746: Multiples of 3018.
; 3018,6036,9054,12072,15090,18108,21126,24144,27162,30180,33198,36216,39234,42252,45270,48288,51306,54324,57342,60360,63378,66396,69414,72432,75450,78468,81486,84504,87522,90540,93558,96576,99594,102612
mov $1,$0
mul $1,3018
add $1,3018
|
c2000/C2000Ware_1_00_06_00/libraries/dsp/VCU/c28/examples/fft/2837x_vcu0_cfft_128/cfft_128_data.asm | ramok/Themis_ForHPSDR | 0 | 242674 | ;******************************************************************************
;******************************************************************************
;
; FILE: cfft_128_data.asm
;
; DESCRIPTION: Input test data for the FFT
;
;******************************************************************************
; $TI Release: C28x VCU Library V2.10.00.00 $
; $Release Date: Oct 18, 2018 $
; $Copyright: Copyright (C) 2018 Texas Instruments Incorporated -
; http://www.ti.com/ ALL RIGHTS RESERVED $
;******************************************************************************
; This software is licensed for use with Texas Instruments C28x
; family DSCs. This license was provided to you prior to installing
; the software. You may review this license by consulting a copy of
; the agreement in the doc directory of this library.
; ------------------------------------------------------------------------
;******************************************************************************
;.cdecls C,LIST,"fft.h"
;############################################################################
;
;/*! \page CFFT_128_DATA (Input test data to the FFT)
;
; The input test data is a two tone function. We run the fft on this
; data and compare to the expected output.
;*/
;############################################################################
.sect .econst
.align 256
.global _CFFT16_128p_in_data,_CFFT16_128p_out_data
; FFT input data, two-tone test
_CFFT16_128p_in_data:
.word 0, 2232, 0, 1930, 0, 1165, 0, 286
.word 0, -347, 0, -560, 0, -445, 0, -286
.word 0, -373, 0, -809, 0, -1440, 0, -1930
.word 0, -1957, 0, -1406, 0, -445, 0, 560
.word 0, 1237, 0, 1406, 0, 1165, 0, 809
.word 0, 648, 0, 809, 0, 1165, 0, 1406
.word 0, 1237, 0, 560, 0, -445, 0, -1406
.word 0, -1957, 0, -1930, 0, -1440, 0, -809
.word 0, -373, 0, -286, 0, -445, 0, -560
.word 0, -347, 0, 286, 0, 1165, 0, 1930
.word 0, 2232, 0, 1930, 0, 1165, 0, 286
.word 0, -347, 0, -560, 0, -445, 0, -286
.word 0, -373, 0, -809, 0, -1440, 0, -1930
.word 0, -1957, 0, -1406, 0, -445, 0, 560
.word 0, 1237, 0, 1406, 0, 1165, 0, 809
.word 0, 648, 0, 809, 0, 1165, 0, 1406
.word 0, 1237, 0, 560, 0, -445, 0, -1406
.word 0, -1957, 0, -1930, 0, -1440, 0, -809
.word 0, -373, 0, -286, 0, -445, 0, -560
.word 0, -347, 0, 286, 0, 1165, 0, 1930
.word 0, 2232, 0, 1930, 0, 1165, 0, 286
.word 0, -347, 0, -560, 0, -445, 0, -286
.word 0, -373, 0, -809, 0, -1440, 0, -1930
.word 0, -1957, 0, -1406, 0, -445, 0, 560
.word 0, 1237, 0, 1406, 0, 1165, 0, 809
.word 0, 648, 0, 809, 0, 1165, 0, 1406
.word 0, 1237, 0, 560, 0, -445, 0, -1406
.word 0, -1957, 0, -1930, 0, -1440, 0, -809
.word 0, -373, 0, -286, 0, -445, 0, -560
.word 0, -347, 0, 286, 0, 1165, 0, 1930
.word 0, 2232, 0, 1930, 0, 1165, 0, 286
.word 0, -347, 0, -560, 0, -445, 0, -286
; FFT output data
_CFFT16_128p_out_data:
.word 0, 31, 11, 31, 22, 34, 39, 37
.word 66, 45, 130, 64, 502, 183, -360, -97
.word -143, -27, -92, -11, -70, -4, -56, 0
.word -47, 2, -40, 3, -37, 5, -33, 6
.word -29, 401, -27, 6, -24, 7, -23, 7
.word -21, 8, -20, 7, -19, 8, -17, 9
.word -17, 9, -15, 8, -15, 9, -13, 9
.word -13, 9, -12, 8, -12, 10, -12, 9
.word -11, 9, -11, 9, -10, 9, -9, 9
.word -9, 9, -8, 9, -8, 9, -7, 10
.word -7, 9, -6, 9, -6, 10, -6, 10
.word -5, 9, -6, 10, -4, 9, -4, 10
.word -4, 10, -4, 9, -4, 9, -3, 10
.word -3, 10, -3, 9, -3, 9, -2, 9
.word -2, 10, -2, 10, -1, 10, -2, 10
.word -2, 9, -1, 10, -1, 9, 0, 10
.word 0, 10, 0, 10, 1, 9, 1, 10
.word 2, 9, 2, 10, 1, 10, 2, 10
.word 2, 10, 2, 9, 3, 9, 3, 9
.word 3, 10, 3, 10, 4, 9, 4, 9
.word 4, 10, 4, 10, 4, 9, 6, 10
.word 5, 9, 6, 10, 6, 10, 6, 9
.word 7, 9, 7, 10, 8, 9, 8, 9
.word 9, 9, 9, 9, 10, 9, 11, 9
.word 11, 9, 12, 9, 12, 10, 12, 8
.word 13, 9, 13, 9, 15, 9, 15, 8
.word 17, 9, 17, 9, 19, 8, 20, 7
.word 21, 8, 23, 7, 24, 7, 27, 6
.word 29, 401, 33, 6, 37, 5, 40, 3
.word 47, 2, 56, 0, 70, -4, 92, -11
.word 143, -27, 360, -97, -502, 183, -130, 64
.word -66, 45, -39, 37, -22, 34, -11, 31
|
gutta-apievolution-dsl/src/main/antlr4/gutta/apievolution/dsl/parser/ApiRevision.g4 | CexyChris/gutta-apievolution | 0 | 6827 | grammar ApiRevision;
apiDefinition:
annotations+=annotation*
refToken='api' name=qualifiedName replaces=apiReplacesClause? '{'
elements+=userDefinedTypeOrService*
'}'
;
apiReplacesClause:
refToken='replaces' target=qualifiedName
;
annotation:
typeToken=ANNOTATION_NAME '(' value=STRING_LITERAL ')'
;
userDefinedTypeOrService:
enumType |
recordType |
service |
exceptionType
;
replacesClause:
refToken='replaces' (itemName=identifier | nothing='nothing')
;
asClause:
refToken='as' aliasName=identifier
;
enumType:
refToken='enum' name=identifier replaces=replacesClause? as=asClause? '{'
members+=enumMember*
'}'
;
enumMember:
name=identifier replaces=replacesClause? as=asClause?
;
recordType:
annotations+=annotation*
modifiers+=recordModifier* refToken='record' name=identifier ('extends' superType=identifier)? replaces=replacesClause? as=asClause? '{'
fields+=field*
'}'
;
recordModifier:
K_ABSTRACT |
K_OPTIONAL |
K_OPTIN |
K_MANDATORY
;
field:
modifier=fieldModifier? type=typeReference name=identifier replaces=fieldReplacesClause? as=asClause?
;
fieldModifier:
K_OPTIONAL |
K_OPTIN |
K_MANDATORY
;
fieldReplacesClause:
refToken='replaces' (items+=qualifiedName (',' items+=qualifiedName)* | nothing='nothing')
;
typeReference:
atomicType |
boundedType |
userDefinedTypeReference |
typeReference (unbounded='*' | '[' cardinality=INT_LITERAL ']')
;
atomicType:
K_INT32 | K_INT64
;
boundedType:
type='string' ('(' bound=INT_LITERAL ')')? |
type='numeric' ('(' integerPlaces=INT_LITERAL (',' fractionalPlaces=INT_LITERAL)? ')')?
;
userDefinedTypeReference:
typeName=identifier
;
service:
annotations+=annotation*
refToken='service' name=identifier replaces=replacesClause? as=asClause? '{'
operations+=serviceOperation*
'}'
;
serviceOperation:
resultType=userDefinedTypeReference name=identifier '(' (parameterType=userDefinedTypeReference)? ')' ('throws' exceptions+=userDefinedTypeReference (',' exceptions+=userDefinedTypeReference)*)? replaces=replacesClause? as=asClause?
;
exceptionType:
annotations+=annotation*
modifier='abstract'? refToken='exception' name=identifier ('extends' superType=identifier)? replaces=replacesClause? as=asClause? '{'
fields+=field*
'}'
;
qualifiedName:
parts+=identifier ('.' parts+=identifier)*
;
identifier:
id=ID | literal=LITERAL_ID
;
// ------------- Lexer Rules
K_ABSTRACT:
'abstract'
;
K_INT32:
'int32'
;
K_INT64:
'int64'
;
K_MANDATORY:
'mandatory'
;
K_OPTIN:
'optin'
;
K_OPTIONAL:
'optional'
;
COMMENT:
'//' ~[\n]* ('\n' | EOF) -> skip
;
ANNOTATION_NAME:
'@'[A-Za-z0-9]+
;
INT_LITERAL:
[0-9]+
;
STRING_LITERAL:
'"'~["]*'"'
;
LITERAL_ID:
'\''~[']*'\''
;
ID:
[A-Za-z][A-Za-z0-9_]*
;
WS:
[ \r\t\n]+ -> skip
;
|
src/asis/a4g-contt-dp.adb | My-Colaborations/dynamo | 15 | 11917 | ------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . C O N T T . D P --
-- --
-- B o d y --
-- --
-- Copyright (C) 1995-2012, Free Software Foundation, Inc. --
-- --
-- ASIS-for-GNAT is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General --
-- Public License for more details. You should have received a copy of the --
-- GNU General Public License distributed with ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 51 Franklin --
-- Street, Fifth Floor, Boston, MA 02110-1301, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by AdaCore --
-- (http://www.adac<EMAIL>). --
-- --
------------------------------------------------------------------------------
pragma Ada_2005;
with Ada.Containers.Ordered_Sets;
with Ada.Unchecked_Deallocation;
with Asis.Set_Get; use Asis.Set_Get;
with A4G.Contt.UT; use A4G.Contt.UT;
with A4G.Get_Unit; use A4G.Get_Unit;
with Atree; use Atree;
with Nlists; use Nlists;
with Namet; use Namet;
with Sinfo; use Sinfo;
with Lib; use Lib;
package body A4G.Contt.Dp is
-----------------------
-- Local Subprograms --
-----------------------
function Get_First_Stub (Body_Node : Node_Id) return Node_Id;
function Get_Next_Stub (Stub_Node : Node_Id) return Node_Id;
-- these two functions implement the iterator through the body stubs
-- contained in the given compilation unit. The iterator should
-- be started from calling Get_First_Stub for the node pointed to
-- the body (that is, for the node of ..._Body kind). The Empty node
-- is returned if there is no first/next body stub node
procedure Set_All_Unit_Dependencies (U : Unit_Id);
-- Computes the full lists of supporters and dependents of U in the current
-- Context from the list of direct supporters of U and sets these lists as
-- values of Supporters and Dependents lists in the Unit Table
procedure Add_Unit_Supporters (U : Unit_Id; L : in out Elist_Id);
-- Add all the supporters of U, excluding U itself to L. This procedure
-- traverses all the transitive semantic dependencies.
procedure Fix_Direct_Supporters (Unit : Unit_Id);
-- This procedure adds missed direct dependencies to the unit. It is
-- supposed that before the call the list of direct supporters contains
-- only units extracted from the unit context clause. So, if U is a body,
-- this procedure adds the spec to the list of direct supporters, if it is
-- a subunit - the parent body is added, if it is a child unit - the
-- parent spec is added etc. The procedure adds these supporters in a
-- transitive manner - that is, in case of a subunit, it adds the parent
-- body, its spec (if any), its parent (if any) etc.
-- This function supposes that Current Context is correctly set before
-- the call.
function In_List
(U : Unit_Id;
L : Unit_Id_List;
Up_To : Natural)
return Boolean;
-- Checks if U is a member of the first Up_To components of L. (If
-- Up_To is 0, False is returned
procedure CU_To_Unit_Id_List
(CU_List : Compilation_Unit_List;
Result_Unit_Id_List : in out Unit_Id_List;
Result_List_Len : out Natural);
-- Converts the ASIS Compilation Unit list into the list of Unit Ids and
-- places this list into Result_Unit_Id_List. (Probably, we should replace
-- this routine with a function...)
-- For each ASIS Compilation Unit from CU_List the Result_Unit_Id_List
-- contains exactly one Id for the corresponding unit. Result_List_Len is
-- set to represent the index of the last Unit Id in Result_List_Len (0
-- in case if Result_List_Len is empty). This routine expects that
-- Result_Unit_Id_List'Length >= CU_List'Length
--------------------------------------
-- Dynamic Unit_Id list abstraction --
--------------------------------------
-- All the subprograms implementing Unit_Id list abstraction do not
-- reset Context
-- Is this package body the right place for defining this abstraction?
-- May be, we should move it into A4G.A_Types???
type Unit_Id_List_Access is access Unit_Id_List;
Tmp_Unit_Id_List_Access : Unit_Id_List_Access;
procedure Free is new Ada.Unchecked_Deallocation
(Unit_Id_List, Unit_Id_List_Access);
function In_Unit_Id_List
(U : Unit_Id;
L : Unit_Id_List_Access)
return Boolean;
-- Checks if U is a member of L.
procedure Append_Unit_To_List
(U : Unit_Id;
L : in out Unit_Id_List_Access);
-- (Unconditionally) appends U to L.
procedure Add_To_Unit_Id_List
(U : Unit_Id;
L : in out Unit_Id_List_Access);
-- If not In_Unit_Id_List (U, L), U is appended to L (if L is null,
-- new Unit_Id_List value is created)
procedure Reorder_Sem_Dependencies (Units : Unit_Id_List_Access);
-- This procedure takes the unit list with is supposed to be the result of
-- one of the Set_All_<Relation> functions above (that is, its parameter
-- is not supposed to be null and it contains only existing units). It
-- reorders it in the way required by
-- Asis.Compilation_Units.Relations.Semantic_Dependence_Order - that is,
-- with no forward semantic dependencies.
-------------------
-- Add_To_Parent --
-------------------
procedure Add_To_Parent (C : Context_Id; U : Unit_Id) is
Parent_Id : Unit_Id;
Unit_Kind : constant Unit_Kinds := Kind (C, U);
begin
if U = Standard_Id then
return;
end if;
Reset_Context (C); -- ???
Get_Name_String (U, Norm_Ada_Name);
if Not_Root then
Form_Parent_Name;
if Unit_Kind in A_Subunit then
A_Name_Buffer (A_Name_Len) := 'b';
end if;
Parent_Id := Name_Find (C);
-- Parent_Id cannot be Nil_Unit here
Append_Elmt
(Unit => U,
To => Unit_Table.Table (Parent_Id).Subunits_Or_Childs);
else
Append_Elmt
(Unit => U,
To => Unit_Table.Table (Standard_Id).Subunits_Or_Childs);
end if;
end Add_To_Parent;
-------------------------
-- Add_Unit_Supporters --
-------------------------
procedure Add_Unit_Supporters (U : Unit_Id; L : in out Elist_Id) is
Supporters : Elist_Id renames Unit_Table.Table (U).Supporters;
Direct_Supporters : Elist_Id renames
Unit_Table.Table (U).Direct_Supporters;
Next_Support_Elmt : Elmt_Id;
Next_Support_Unit : Unit_Id;
begin
if Is_Empty_Elmt_List (Direct_Supporters) then
-- end of the recursion
return;
elsif not Is_Empty_Elmt_List (Supporters) then
-- no need to traverse indirect dependencies
Next_Support_Elmt := First_Elmt (Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
Add_To_Elmt_List
(Unit => Next_Support_Unit,
List => L);
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
else
-- And here we have to traverse the recursive dependencies:
Next_Support_Elmt := First_Elmt (Direct_Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
-- The old code currently commented out caused a huge delay
-- when opening one tree context (8326-002). We will keep it
-- till the new code is tested for queries from
-- Asis.Compilation_Units.Relations
-- ???Old code start
-- Here we can not be sure, that if Next_Support_Unit already
-- is in the list, all its supporters also are in the list
-- Add_To_Elmt_List
-- (Unit => Next_Support_Unit,
-- List => L);
-- Add_Unit_Supporters (Next_Support_Unit, L);
-- ???Old code end
-- ???New code start
if not In_Elmt_List (Next_Support_Unit, L) then
Append_Elmt
(Unit => Next_Support_Unit,
To => L);
Add_Unit_Supporters (Next_Support_Unit, L);
end if;
-- ???New code end
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
end if;
end Add_Unit_Supporters;
-------------------------
-- Append_Subunit_Name --
-------------------------
procedure Append_Subunit_Name (Def_S_Name : Node_Id) is
begin
-- Here we need unqualified name, because the name
-- which comes from the stub is qualified by parent body
-- name
Get_Unqualified_Decoded_Name_String (Chars (Def_S_Name));
A_Name_Buffer (A_Name_Len - 1) := '.';
A_Name_Buffer (A_Name_Len .. A_Name_Len + Name_Len - 1) :=
Name_Buffer (1 .. Name_Len);
A_Name_Len := A_Name_Len + Name_Len + 1;
A_Name_Buffer (A_Name_Len - 1) := '%';
A_Name_Buffer (A_Name_Len) := 'b';
end Append_Subunit_Name;
------------------------
-- CU_To_Unit_Id_List --
------------------------
procedure CU_To_Unit_Id_List
(CU_List : Compilation_Unit_List;
Result_Unit_Id_List : in out Unit_Id_List;
Result_List_Len : out Natural)
is
Next_Unit : Unit_Id;
begin
Result_List_Len := 0;
for I in CU_List'Range loop
Next_Unit := Get_Unit_Id (CU_List (I));
if not In_List (Next_Unit, Result_Unit_Id_List, Result_List_Len) then
Result_List_Len := Result_List_Len + 1;
Result_Unit_Id_List (Result_List_Len) := Next_Unit;
end if;
end loop;
end CU_To_Unit_Id_List;
---------------------------
-- Fix_Direct_Supporters --
---------------------------
procedure Fix_Direct_Supporters (Unit : Unit_Id) is
function Next_Supporter (U : Unit_Id) return Unit_Id;
-- Computes the next supporter to be added (from subunit to the parent
-- body, from body to the spec, from child to the parent etc). Ends up
-- with Standard and then with Nil_Unit as its parent
Next_Supporter_Id : Unit_Id;
function Next_Supporter (U : Unit_Id) return Unit_Id is
C : constant Context_Id := Current_Context;
Arg_Unit_Kind : constant Unit_Kinds := Kind (C, U);
Result_Id : Unit_Id := Nil_Unit;
begin
case Arg_Unit_Kind is
when A_Procedure |
A_Function |
A_Package |
A_Generic_Procedure |
A_Generic_Function |
A_Generic_Package |
A_Procedure_Instance |
A_Function_Instance |
A_Package_Instance |
A_Procedure_Renaming |
A_Function_Renaming |
A_Package_Renaming |
A_Generic_Procedure_Renaming |
A_Generic_Function_Renaming |
A_Generic_Package_Renaming =>
Result_Id := Get_Parent_Unit (C, U);
when A_Procedure_Body |
A_Function_Body =>
if Class (C, U) = A_Public_Declaration_And_Body then
Result_Id := Get_Parent_Unit (C, U);
else
Result_Id := Get_Declaration (C, U);
end if;
when A_Package_Body =>
Result_Id := Get_Declaration (C, U);
when A_Procedure_Body_Subunit |
A_Function_Body_Subunit |
A_Package_Body_Subunit |
A_Task_Body_Subunit |
A_Protected_Body_Subunit =>
Result_Id := Get_Subunit_Parent_Body (C, U);
when others =>
pragma Assert (False);
null;
end case;
return Result_Id;
end Next_Supporter;
begin
Next_Supporter_Id := Next_Supporter (Unit);
while Present (Next_Supporter_Id) loop
Append_Elmt (Unit => Next_Supporter_Id,
To => Unit_Table.Table (Unit).Direct_Supporters);
Next_Supporter_Id := Next_Supporter (Next_Supporter_Id);
end loop;
end Fix_Direct_Supporters;
--------------------
-- Get_First_Stub --
--------------------
function Get_First_Stub (Body_Node : Node_Id) return Node_Id is
Decls : List_Id;
Decl : Node_Id;
begin
Decls := Declarations (Body_Node);
if No (Decls) then
return Empty;
else
Decl := Nlists.First (Decls);
while Present (Decl) loop
if Nkind (Decl) in N_Body_Stub then
return Decl;
end if;
Decl := Next (Decl);
end loop;
return Empty;
end if;
end Get_First_Stub;
-------------------
-- Get_Next_Stub --
-------------------
function Get_Next_Stub (Stub_Node : Node_Id) return Node_Id is
Next_Decl : Node_Id;
begin
Next_Decl := Next (Stub_Node);
while Present (Next_Decl) loop
if Nkind (Next_Decl) in N_Body_Stub then
return Next_Decl;
end if;
Next_Decl := Next (Next_Decl);
end loop;
return Empty;
end Get_Next_Stub;
-------------
-- In_List --
-------------
function In_List
(U : Unit_Id;
L : Unit_Id_List;
Up_To : Natural)
return Boolean
is
Len : constant Natural := Natural'Min (Up_To, L'Length);
Result : Boolean := False;
begin
for I in 1 .. Len loop
if L (I) = U then
Result := True;
exit;
end if;
end loop;
return Result;
end In_List;
------------------
-- Process_Stub --
------------------
procedure Process_Stub (C : Context_Id; U : Unit_Id; Stub : Node_Id) is
Def_S_Name : Node_Id;
Subunit_Id : Unit_Id;
begin
-- We should save (and then restore) the content of A_Name_Buffer in
-- case when more than one stub is to be processed. (A_Name_Buffer
-- contains the Ada name of the parent body)
NB_Save;
if Nkind (Stub) = N_Subprogram_Body_Stub then
Def_S_Name := Defining_Unit_Name (Specification (Stub));
else
Def_S_Name := Defining_Identifier (Stub);
end if;
Append_Subunit_Name (Def_S_Name);
Subunit_Id := Name_Find (C);
if No (Subunit_Id) then
Subunit_Id := Allocate_Nonexistent_Unit_Entry (C);
Append_Elmt (Unit => Subunit_Id,
To => Unit_Table.Table (U).Subunits_Or_Childs);
end if;
NB_Restore;
end Process_Stub;
------------------------------
-- Reorder_Sem_Dependencies --
------------------------------
procedure Reorder_Sem_Dependencies (Units : Unit_Id_List_Access) is
More_Inversion : Boolean := True;
Tmp_Unit : Unit_Id;
begin
if Units'Length = 0 then
return;
end if;
-- The idea is simple: for all the units in Units list we have the
-- lists of all the unit's supporters already computed. If we order
-- units so that the lengths of supporter lists will increase we will
-- get the order in which there will be no forward semantic
-- dependencies: if unit A depends on unit B, then A also depends on
-- all the supporters of B, so it has the list of supporters longer
-- then B has
while More_Inversion loop
More_Inversion := False;
for J in Units'First .. Units'Last - 1 loop
if List_Length (Unit_Table.Table (Units (J)).Supporters) >
List_Length (Unit_Table.Table (Units (J + 1)).Supporters)
then
Tmp_Unit := Units (J + 1);
Units (J + 1) := Units (J);
Units (J) := Tmp_Unit;
More_Inversion := True;
end if;
end loop;
end loop;
end Reorder_Sem_Dependencies;
--------------------------
-- Set_All_Dependencies --
--------------------------
procedure Set_All_Dependencies (Use_First_New_Unit : Boolean := False) is
Starting_Unit : Unit_Id;
begin
if Use_First_New_Unit then
Starting_Unit := First_New_Unit;
if No (Starting_Unit) then
-- This may happen, when, for the incremental Context, we
-- process the tree which is the main tree for some body unit,
-- and this body unit has been already included in the Context
-- (See Lib (spec, (h))
return;
end if;
else
Starting_Unit := Config_Comp_Id + 1;
-- Config_Comp_Id corresponds to last predefined unit set in the
-- unit table
end if;
for U in Starting_Unit .. Last_Unit loop
Set_All_Unit_Dependencies (U);
end loop;
end Set_All_Dependencies;
-------------------------------
-- Set_All_Unit_Dependencies --
-------------------------------
procedure Set_All_Unit_Dependencies (U : Unit_Id) is
Supporters : Elist_Id renames Unit_Table.Table (U).Supporters;
Direct_Supporters : Elist_Id renames
Unit_Table.Table (U).Direct_Supporters;
Next_Support_Elmt : Elmt_Id;
Next_Support_Unit : Unit_Id;
begin
Fix_Direct_Supporters (U);
-- Setting all the unit supporters
Next_Support_Elmt := First_Elmt (Direct_Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
-- If Next_Support_Unit already is in Supporters list,
-- all its supporters also are already included in Supporters.
if not In_Elmt_List (Next_Support_Unit, Supporters) then
Append_Elmt
(Unit => Next_Support_Unit,
To => Supporters);
Add_Unit_Supporters (Next_Support_Unit, Supporters);
end if;
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
-- And now - adding U as depended unit to the list of Dependents for
-- all its supporters
Next_Support_Elmt := First_Elmt (Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
Append_Elmt
(Unit => U,
To => Unit_Table.Table (Next_Support_Unit).Dependents);
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
end Set_All_Unit_Dependencies;
---------------------------
-- Set_Direct_Dependents --
---------------------------
procedure Set_Direct_Dependents (U : Unit_Id) is
Next_Support_Elmt : Elmt_Id;
Next_Support_Unit : Unit_Id;
begin
Next_Support_Elmt := First_Elmt (Unit_Table.Table (U).Direct_Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
Append_Elmt
(Unit => U,
To => Unit_Table.Table (Next_Support_Unit).Direct_Dependents);
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
end Set_Direct_Dependents;
-----------------------
-- Set_All_Ancestors --
-----------------------
procedure Set_All_Ancestors
(Compilation_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Arg_List_Len : Natural := 0;
Result_List : Unit_Id_List_Access := null;
Next_Ancestor_Unit : Unit_Id;
begin
-- For the current version, we are supposing, that we have only one
-- Context opened at a time
CU_To_Unit_Id_List (Compilation_Units, Arg_List, Arg_List_Len);
-- Standard is an ancestor of any unit, and if we are here,
-- Compilation_Units can not be Nil_Compilation_Unit_List. So we set
-- it as the first element of the result list:
Append_Unit_To_List (Standard_Id, Result_List);
for I in 1 .. Arg_List_Len loop
Next_Ancestor_Unit := Arg_List (I);
if Next_Ancestor_Unit /= Standard_Id then
while Kind (Cont, Next_Ancestor_Unit) in A_Subunit loop
Next_Ancestor_Unit :=
Get_Subunit_Parent_Body (Cont, Next_Ancestor_Unit);
end loop;
if Class (Cont, Next_Ancestor_Unit) = A_Public_Body or else
Class (Cont, Next_Ancestor_Unit) = A_Private_Body
then
Next_Ancestor_Unit :=
Get_Declaration (Cont, Next_Ancestor_Unit);
end if;
while Next_Ancestor_Unit /= Standard_Id loop
if not In_Unit_Id_List (Next_Ancestor_Unit, Result_List) then
Append_Unit_To_List (Next_Ancestor_Unit, Result_List);
Next_Ancestor_Unit :=
Get_Parent_Unit (Cont, Next_Ancestor_Unit);
else
exit;
end if;
end loop;
end if;
end loop;
-- And here we have to order Result_List to eliminate forward
-- semantic dependencies
-- Result_List can not be null - it contains at least Standard_Id
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
end Set_All_Ancestors;
------------------------
-- Set_All_Dependents --
------------------------
procedure Set_All_Dependents
(Compilation_Units : Asis.Compilation_Unit_List;
Dependent_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Arg_List_Len : Natural := 0;
Dep_List : Unit_Id_List (1 .. Dependent_Units'Length) :=
(others => Nil_Unit);
Dep_List_Len : Natural := 0;
Result_List : Unit_Id_List_Access := null;
Next_Dependent_Elmt : Elmt_Id;
Next_Dependent_Unit : Unit_Id;
begin
-- For the current version, we are supposing, that we have only one
-- Context opened at a time
CU_To_Unit_Id_List (Compilation_Units, Arg_List, Arg_List_Len);
CU_To_Unit_Id_List (Dependent_Units, Dep_List, Dep_List_Len);
-- Now, collecting all the dependents for Compilation_Units
for I in 1 .. Arg_List_Len loop
Next_Dependent_Elmt :=
First_Elmt (Unit_Table.Table (Arg_List (I)).Dependents);
while Present (Next_Dependent_Elmt) loop
Next_Dependent_Unit := Unit (Next_Dependent_Elmt);
if Dep_List_Len = 0 or else
In_List (Next_Dependent_Unit, Dep_List, Dep_List_Len)
then
Add_To_Unit_Id_List (Next_Dependent_Unit, Result_List);
end if;
Next_Dependent_Elmt := Next_Elmt (Next_Dependent_Elmt);
end loop;
end loop;
-- And here we have to order Result_List to eliminate forward
-- semantic dependencies
if Result_List /= null then
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
else
Result := new Compilation_Unit_List (1 .. 0);
end if;
end Set_All_Dependents;
-------------------------
-- Set_All_Descendants --
-------------------------
procedure Set_All_Descendants
(Compilation_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Arg_List_Len : Natural := 0;
Result_List : Unit_Id_List_Access := null;
Next_Descendant_Elmt : Elmt_Id;
Next_Unit : Unit_Id;
procedure Add_All_Descendants
(Desc_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access);
-- If Desc_Unit is not in Result_List, this procedure adds it and
-- (recursively) all its descendants which are not in Result_List to
-- the list.
procedure Add_All_Descendants
(Desc_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access)
is
Child_Elmt : Elmt_Id;
Child_Unit : Unit_Id;
begin
if not In_Unit_Id_List (Desc_Unit, Result_List) then
Append_Unit_To_List (Desc_Unit, Result_List);
if Kind (Cont, Desc_Unit) = A_Package or else
Kind (Cont, Desc_Unit) = A_Generic_Package or else
Kind (Cont, Desc_Unit) = A_Package_Renaming or else
Kind (Cont, Desc_Unit) = A_Generic_Package_Renaming
then
Child_Elmt :=
First_Elmt (Unit_Table.Table (Desc_Unit).Subunits_Or_Childs);
while Present (Child_Elmt) loop
Child_Unit := Unit (Child_Elmt);
Add_All_Descendants (Child_Unit, Result_List);
Child_Elmt := Next_Elmt (Child_Elmt);
end loop;
end if;
end if;
end Add_All_Descendants;
begin
-- We can not use CU_To_Unit_Id_List routine, because we have to
-- filter out subunits, nonexistent units (?) and bodies for which the
-- Context does not contain a spec - such units can not have
-- descendants. For bodies, only the corresponding specs contain the
-- lists of descendants.
for I in Compilation_Units'Range loop
Next_Unit := Get_Unit_Id (Compilation_Units (I));
if Kind (Cont, Next_Unit) not in A_Procedure_Body_Subunit ..
A_Nonexistent_Body
then
if Kind (Cont, Next_Unit) in A_Library_Unit_Body then
Next_Unit := Get_Declaration (Cont, Next_Unit);
end if;
if Present (Next_Unit) and then
(not In_List (Next_Unit, Arg_List, Arg_List_Len))
then
Arg_List_Len := Arg_List_Len + 1;
Arg_List (Arg_List_Len) := Next_Unit;
end if;
end if;
end loop;
for J in 1 .. Arg_List_Len loop
Next_Descendant_Elmt :=
First_Elmt (Unit_Table.Table (Arg_List (J)).Subunits_Or_Childs);
while Present (Next_Descendant_Elmt) loop
Next_Unit := Unit (Next_Descendant_Elmt);
Add_All_Descendants (Next_Unit, Result_List);
Next_Descendant_Elmt := Next_Elmt (Next_Descendant_Elmt);
end loop;
end loop;
if Result_List /= null then
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
else
Result := new Compilation_Unit_List (1 .. 0);
end if;
end Set_All_Descendants;
----------------------
-- Set_All_Families --
----------------------
procedure Set_All_Families
(Compilation_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Arg_List_Len : Natural := 0;
Result_List : Unit_Id_List_Access := null;
procedure Collect_Spec_Family
(Spec_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access);
-- If Spec_Unit is not in Result_List, this procedure adds it and
-- (recursively) all members of its family which are not in Result_List
-- to the list. In case of a spec, the corresponding body's family is
-- also added
procedure Collect_Body_Family
(Body_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access);
-- If Body_Unit is not in Result_List, this procedure adds it and
-- (recursively) all members of its family which are not in Result_List
-- to the list. In case of a body, only the subunit tree rooted by this
-- body may be added
procedure Collect_Spec_Family
(Spec_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access)
is
Child_Elmt : Elmt_Id;
Child_Unit : Unit_Id;
begin
if not In_Unit_Id_List (Spec_Unit, Result_List) then
Append_Unit_To_List (Spec_Unit, Result_List);
-- We have to add all descendants (if any) and their families
if Kind (Cont, Spec_Unit) = A_Package or else
Kind (Cont, Spec_Unit) = A_Generic_Package or else
Kind (Cont, Spec_Unit) = A_Package_Renaming or else
Kind (Cont, Spec_Unit) = A_Generic_Package_Renaming
then
Child_Elmt :=
First_Elmt (Unit_Table.Table (Spec_Unit).Subunits_Or_Childs);
while Present (Child_Elmt) loop
Child_Unit := Unit (Child_Elmt);
if Kind (Cont, Child_Unit) in
A_Procedure .. A_Generic_Package_Renaming
then
Collect_Spec_Family (Child_Unit, Result_List);
elsif Kind (Cont, Child_Unit) in
A_Procedure_Body .. A_Protected_Body_Subunit
then
Collect_Body_Family (Child_Unit, Result_List);
end if;
Child_Elmt := Next_Elmt (Child_Elmt);
end loop;
end if;
end if;
end Collect_Spec_Family;
procedure Collect_Body_Family
(Body_Unit : Unit_Id;
Result_List : in out Unit_Id_List_Access)
is
Child_Elmt : Elmt_Id;
Child_Unit : Unit_Id;
begin
if not In_Unit_Id_List (Body_Unit, Result_List) then
Append_Unit_To_List (Body_Unit, Result_List);
-- We have to add all descendants (if any) and their families
if Kind (Cont, Body_Unit) in
A_Procedure_Body .. A_Protected_Body_Subunit
then
Child_Elmt :=
First_Elmt (Unit_Table.Table (Body_Unit).Subunits_Or_Childs);
while Present (Child_Elmt) loop
Child_Unit := Unit (Child_Elmt);
Collect_Body_Family (Child_Unit, Result_List);
Child_Elmt := Next_Elmt (Child_Elmt);
end loop;
end if;
end if;
end Collect_Body_Family;
begin
CU_To_Unit_Id_List (Compilation_Units, Arg_List, Arg_List_Len);
for J in 1 .. Arg_List_Len loop
case Class (Cont, Arg_List (J)) is
when A_Public_Declaration |
A_Private_Declaration =>
Collect_Spec_Family (Arg_List (J), Result_List);
when Not_A_Class =>
-- This should never happen, so just in case we
-- raise an exception
null;
pragma Assert (False);
when others =>
-- Here we can have only a body or a separate body
Collect_Body_Family (Arg_List (J), Result_List);
end case;
end loop;
-- And here we have to order Result_List to eliminate forward
-- semantic dependencies
if Result_List /= null then
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
else
Result := new Compilation_Unit_List (1 .. 0);
end if;
end Set_All_Families;
------------------------
-- Set_All_Supporters --
------------------------
package Unit_Container is new Ada.Containers.Ordered_Sets
(Element_Type => Unit_Id);
procedure Unit_List_To_Set
(Unit_List : Elist_Id;
Unit_Set : in out Unit_Container.Set);
-- Assuming that Unit_List does not contain repeating elements, creates
-- Unit_Set as the set containing Unit IDs from Unit_List. If Unit_Set is
-- non-empty before the call, the old content of the set is lost.
function Unit_Set_To_List
(Unit_Set : Unit_Container.Set)
return Unit_Id_List;
-- Converts the unit id set into array
Result_Set : Unit_Container.Set;
New_Set : Unit_Container.Set;
Newer_Set : Unit_Container.Set;
Next_Direct_Supporter : Unit_Container.Cursor;
procedure Unit_List_To_Set
(Unit_List : Elist_Id;
Unit_Set : in out Unit_Container.Set)
is
Next_El : Elmt_Id;
begin
Unit_Container.Clear (Unit_Set);
Next_El := First_Elmt (Unit_List);
while Present (Next_El) loop
Unit_Container.Insert (Unit_Set, Unit (Next_El));
Next_El := Next_Elmt (Next_El);
end loop;
end Unit_List_To_Set;
function Unit_Set_To_List
(Unit_Set : Unit_Container.Set)
return Unit_Id_List
is
Next_Unit : Unit_Container.Cursor;
Result : Unit_Id_List (1 .. Natural (Unit_Container.Length (Unit_Set)));
Next_Idx : Natural := Result'First;
begin
Next_Unit := Unit_Container.First (Unit_Set);
while Unit_Container.Has_Element (Next_Unit) loop
Result (Next_Idx) := Unit_Container.Element (Next_Unit);
Next_Idx := Next_Idx + 1;
Next_Unit := Unit_Container.Next (Next_Unit);
end loop;
return Result;
end Unit_Set_To_List;
procedure Set_All_Supporters
(Compilation_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Result_List : Unit_Id_List_Access := null;
Arg_List_Len : Natural := 0;
pragma Unreferenced (Arg_List_Len);
procedure Collect_Supporters (U : Unit_Id);
-- If U is not presented in Result, adds (recursively) all its
-- supporters to Result_List
-- Uses workpile algorithm to avoid cycling (cycling is possible because
-- of limited with)
procedure Collect_Supporters (U : Unit_Id) is
Next_Supporter : Elmt_Id;
begin
Unit_Container.Clear (New_Set);
Unit_Container.Clear (Newer_Set);
Unit_List_To_Set
(Unit_List => Unit_Table.Table (U).Supporters,
Unit_Set => New_Set);
Unit_Container.Union
(Target => Result_Set,
Source => New_Set);
while not Unit_Container.Is_Empty (New_Set) loop
Next_Direct_Supporter := Unit_Container.First (New_Set);
Next_Supporter :=
First_Elmt (Unit_Table.Table
(Unit_Container.Element (Next_Direct_Supporter)).Supporters);
while Present (Next_Supporter) loop
if not Unit_Container.Contains
(Result_Set, Unit (Next_Supporter))
then
Unit_Container.Insert (Newer_Set, Unit (Next_Supporter));
end if;
Next_Supporter := Next_Elmt (Next_Supporter);
end loop;
Unit_Container.Delete_First (New_Set);
if not Unit_Container.Is_Empty (Newer_Set) then
Unit_Container.Union (Result_Set, Newer_Set);
Unit_Container.Union (New_Set, Newer_Set);
Unit_Container.Clear (Newer_Set);
end if;
end loop;
end Collect_Supporters;
begin
Unit_Container.Clear (Result_Set);
Unit_Container.Insert (Result_Set, Standard_Id);
-- For the current version, we are supposing, that we have only one
-- Context opened at a time
CU_To_Unit_Id_List (Compilation_Units, Arg_List, Arg_List_Len);
-- Now, collecting all the supporters for Compilation_Units
-- Standard is a supporter of any unit, and if we are here,
-- Compilation_Units can not be Nil_Compilation_Unit_List. So we set
-- it as the first element of the result list:
for J in Compilation_Units'Range loop
Collect_Supporters (Get_Unit_Id (Compilation_Units (J)));
end loop;
Result_List := new Unit_Id_List'(Unit_Set_To_List (Result_Set));
-- And here we have to order Result_List to eliminate forward
-- semantic dependencies
-- Result_List can not be null - it contains at least Standard_Id
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
end Set_All_Supporters;
--------------------------
-- Set_All_Needed_Units --
--------------------------
procedure Set_All_Needed_Units
(Compilation_Units : Asis.Compilation_Unit_List;
Result : in out Compilation_Unit_List_Access;
Missed : in out Compilation_Unit_List_Access)
is
Cont : constant Context_Id := Current_Context;
Cont_Tree_Mode : constant Tree_Mode := Tree_Processing_Mode (Cont);
Arg_List : Unit_Id_List (1 .. Compilation_Units'Length) :=
(others => Nil_Unit);
Arg_List_Len : Natural := 0;
Result_List : Unit_Id_List_Access := null;
Missed_List : Unit_Id_List_Access := null;
procedure Set_One_Unit (U : Unit_Id);
-- Provided that U is an (existing) unit which is not in the
-- Result_List, this procedure adds this unit and all the units
-- needed by it to result lists.
procedure Add_Needed_By_Spec (Spec_Unit : Unit_Id);
-- Provided that Spec_Unit denotes an (existing) spec, this procedure
-- adds to the result lists units which are needed by this unit only,
-- that is, excluding this unit (it is supposed to be already added at
-- the moment of the call), its body and units needed by the body (if
-- any, they are processed separately)
procedure Add_Needed_By_Body (Body_Unit : Unit_Id);
-- Provided that Body_Unit denotes an (existing) body, this procedure
-- adds to the result lists units which are needed by this unit,
-- excluding the unit itself (it is supposed to be already added at
-- the moment of the call). That is, the spec of this unit and units
-- which are needed by the spec (if any) are also needed, if they have
-- not been added before
------------------------
-- Add_Needed_By_Body --
------------------------
procedure Add_Needed_By_Body (Body_Unit : Unit_Id) is
Spec_Unit : Unit_Id;
Subunit_List : constant Unit_Id_List := Subunits (Cont, Body_Unit);
Next_Support_Elmt : Elmt_Id;
Next_Support_Unit : Unit_Id;
begin
-- First, check if there is a separate spec then it has to be
-- processed
if Class (Cont, Body_Unit) /= A_Public_Declaration_And_Body then
Spec_Unit := Body_Unit;
while Class (Cont, Spec_Unit) = A_Separate_Body loop
Spec_Unit := Get_Subunit_Parent_Body (Cont, Spec_Unit);
end loop;
Spec_Unit := Get_Declaration (Cont, Spec_Unit);
-- We can not get Nil or nonexistent unit here
if not In_Unit_Id_List (Spec_Unit, Result_List) then
Add_Needed_By_Spec (Spec_Unit);
end if;
end if;
-- Now process body's supporters:
Next_Support_Elmt :=
First_Elmt (Unit_Table.Table (Body_Unit).Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
if not In_Unit_Id_List (Next_Support_Unit, Result_List) then
Set_One_Unit (Next_Support_Unit);
end if;
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
-- And, finally, subunits:
for J in Subunit_List'Range loop
if Kind (Cont, Subunit_List (J)) = A_Nonexistent_Body then
Append_Unit_To_List (Subunit_List (J), Missed_List);
elsif not In_Unit_Id_List (Subunit_List (J), Result_List) then
Append_Unit_To_List (Subunit_List (J), Result_List);
Add_Needed_By_Body (Subunit_List (J));
end if;
end loop;
end Add_Needed_By_Body;
------------------------
-- Add_Needed_By_Spec --
------------------------
procedure Add_Needed_By_Spec (Spec_Unit : Unit_Id) is
Next_Support_Elmt : Elmt_Id;
Next_Support_Unit : Unit_Id;
begin
Next_Support_Elmt :=
First_Elmt (Unit_Table.Table (Spec_Unit).Supporters);
while Present (Next_Support_Elmt) loop
Next_Support_Unit := Unit (Next_Support_Elmt);
if not In_Unit_Id_List (Next_Support_Unit, Result_List) then
Set_One_Unit (Next_Support_Unit);
end if;
Next_Support_Elmt := Next_Elmt (Next_Support_Elmt);
end loop;
end Add_Needed_By_Spec;
------------------
-- Set_One_Unit --
------------------
procedure Set_One_Unit (U : Unit_Id) is
U_Body : Unit_Id;
begin
Append_Unit_To_List (U, Result_List);
case Class (Cont, U) is
when A_Public_Declaration |
A_Private_Declaration =>
Add_Needed_By_Spec (U);
if Is_Body_Required (Cont, U) then
U_Body := Get_Body (Cont, U);
if No (U_Body) and then
(Cont_Tree_Mode = On_The_Fly
or else
Cont_Tree_Mode = Mixed)
then
-- Is it a correct thing to compile something on the fly
-- Inside the query from Relations???
U_Body := Get_One_Unit
(Name => To_Program_Text
(Unit_Name (Get_Comp_Unit (U, Cont))),
Context => Cont,
Spec => False);
end if;
if Present (U_Body) then
if Kind (Cont, U_Body) in A_Nonexistent_Declaration ..
A_Nonexistent_Body
then
Add_To_Unit_Id_List (U_Body, Missed_List);
elsif not In_Unit_Id_List (U_Body, Result_List) then
Append_Unit_To_List (U_Body, Result_List);
Add_Needed_By_Body (U_Body);
end if;
else
U_Body := Get_Nonexistent_Unit (Cont);
Append_Unit_To_List (U_Body, Missed_List);
end if;
end if;
when Not_A_Class =>
-- This should never happen, so just in case we
-- raise an exception
null;
pragma Assert (False);
when others =>
Add_Needed_By_Body (U);
end case;
end Set_One_Unit;
begin -- Set_All_Needed_Units
CU_To_Unit_Id_List (Compilation_Units, Arg_List, Arg_List_Len);
-- Standard is a supporter of any unit, and if we are here,
-- Compilation_Units can not be Nil_Compilation_Unit_List. So we set
-- it as the first element of the result list:
Append_Unit_To_List (Standard_Id, Result_List);
for J in 1 .. Arg_List_Len loop
if not In_Unit_Id_List (Arg_List (J), Result_List) then
Set_One_Unit (Arg_List (J));
end if;
end loop;
-- Result_List can not be null - it contains at least Standard_Id
Reorder_Sem_Dependencies (Result_List);
Result := new Compilation_Unit_List'
(Get_Comp_Unit_List (Result_List.all, Cont));
Free (Result_List);
if Missed_List /= null then
Missed := new Compilation_Unit_List'
(Get_Comp_Unit_List (Missed_List.all, Cont));
Free (Missed_List);
else
Missed := new Compilation_Unit_List (1 .. 0);
end if;
end Set_All_Needed_Units;
------------------
-- Set_Subunits --
------------------
procedure Set_Subunits (C : Context_Id; U : Unit_Id; Top : Node_Id) is
Body_Node : Node_Id;
Stub_Node : Node_Id;
begin
Get_Name_String (U, Norm_Ada_Name);
Body_Node := Unit (Top);
if Nkind (Body_Node) = N_Subunit then
Body_Node := Proper_Body (Body_Node);
end if;
Stub_Node := Get_First_Stub (Body_Node);
if No (Stub_Node) then
return;
end if;
while Present (Stub_Node) loop
Process_Stub (C, U, Stub_Node);
Stub_Node := Get_Next_Stub (Stub_Node);
end loop;
Unit_Table.Table (U).Subunits_Computed := True;
end Set_Subunits;
--------------------
-- Set_Supporters --
--------------------
procedure Set_Supporters (C : Context_Id; U : Unit_Id; Top : Node_Id) is
begin
Set_Withed_Units (C, U, Top);
Set_Direct_Dependents (U);
end Set_Supporters;
----------------------
-- Set_Withed_Units --
----------------------
procedure Set_Withed_Units (C : Context_Id; U : Unit_Id; Top : Node_Id)
is
With_Clause_Node : Node_Id;
Cunit_Node : Node_Id;
Cunit_Number : Unit_Number_Type;
Current_Supporter : Unit_Id;
Tmp : Unit_Id;
Include_Unit : Boolean := False;
begin
-- the maim control structure - cycle through the with clauses
-- in the tree
if No (Context_Items (Top)) then
return;
end if;
With_Clause_Node := First_Non_Pragma (Context_Items (Top));
while Present (With_Clause_Node) loop
-- here we simply get the name of the next supporting unit from
-- the GNAT Units Table (defined in Lib)
Cunit_Node := Library_Unit (With_Clause_Node);
Cunit_Number := Get_Cunit_Unit_Number (Cunit_Node);
Get_Decoded_Name_String (Unit_Name (Cunit_Number));
Set_Norm_Ada_Name_String_With_Check (Cunit_Number, Include_Unit);
if Include_Unit then
Current_Supporter := Name_Find (C);
if A_Name_Buffer (A_Name_Len) = 'b' then
A_Name_Buffer (A_Name_Len) := 's';
Tmp := Name_Find (C);
if Present (Tmp) then
-- OPEN PROBLEM: is this the best solution for this problem?
--
-- Here we are in the potentially hard-to-report-about and
-- definitely involving inconsistent unit set situation.
-- The last version of U depends on subprogram body at least
-- in one of the consistent trees, but the Context contains
-- a spec (that is, a library_unit_declaration or a
-- library_unit_renaming_declaration) for the same full
-- expanded Ada name. The current working decision is
-- to set this dependency as if U depends on the spec.
--
-- Another (crazy!) problem: in one consistent tree
-- U depends on the package P (and P does not require a
-- body), and in another consistent tree U depends on
-- the procedure P which is presented by its body only.
-- It may be quite possible, if these trees were created
-- with different search paths. Is our decision reasonable
-- for this crazy situation :-[ ??!!??
Current_Supporter := Tmp;
end if;
end if;
-- and now we store this dependency - we have to use
-- Add_To_Elmt_List instead of Append_Elmt - some units
-- may be mentioned several times in the context clause:
if Implicit_With (With_Clause_Node) then
Add_To_Elmt_List
(Unit => Current_Supporter,
List => Unit_Table.Table (U).Implicit_Supporters);
else
Add_To_Elmt_List
(Unit => Current_Supporter,
List => Unit_Table.Table (U).Direct_Supporters);
end if;
end if;
With_Clause_Node := Next_Non_Pragma (With_Clause_Node);
while Present (With_Clause_Node) and then
Nkind (With_Clause_Node) /= N_With_Clause
loop
With_Clause_Node := Next_Non_Pragma (With_Clause_Node);
end loop;
end loop;
end Set_Withed_Units;
-------------------------------------------------------
-- Dynamic Unit_Id list abstraction (implementation) --
-------------------------------------------------------
----------------------
-- In_Unit_Id_List --
----------------------
function In_Unit_Id_List
(U : Unit_Id;
L : Unit_Id_List_Access)
return Boolean
is
begin
if L /= null then
for I in L'Range loop
if U = L (I) then
return True;
end if;
end loop;
end if;
return False;
end In_Unit_Id_List;
--------------------------
-- Add_To_Unit_Id_List --
--------------------------
procedure Add_To_Unit_Id_List
(U : Unit_Id;
L : in out Unit_Id_List_Access)
is
begin
if not In_Unit_Id_List (U, L) then
Append_Unit_To_List (U, L);
end if;
end Add_To_Unit_Id_List;
-------------------------
-- Append_Unit_To_List --
-------------------------
procedure Append_Unit_To_List
(U : Unit_Id;
L : in out Unit_Id_List_Access)
is
begin
if L = null then
L := new Unit_Id_List'(1 => U);
else
Free (Tmp_Unit_Id_List_Access);
Tmp_Unit_Id_List_Access := new Unit_Id_List'(L.all & U);
Free (L);
L := new Unit_Id_List'(Tmp_Unit_Id_List_Access.all);
end if;
end Append_Unit_To_List;
end A4G.Contt.Dp;
|
alloy4fun_models/trashltl/models/11/cf5atQ9pjABboGBE2.als | Kaixi26/org.alloytools.alloy | 0 | 2465 | <gh_stars>0
open main
pred idcf5atQ9pjABboGBE2_prop12 {
eventually some f:File | f not in Trash implies always f in Trash'
}
pred __repair { idcf5atQ9pjABboGBE2_prop12 }
check __repair { idcf5atQ9pjABboGBE2_prop12 <=> prop12o } |
cards/bn6/ModCards/137-A003 ColdBear.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | 10 | 177380 | <filename>cards/bn6/ModCards/137-A003 ColdBear.asm<gh_stars>1-10
.include "defaults_mod.asm"
table_file_jp equ "exe6-utf8.tbl"
table_file_en equ "bn6-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252354A // BR5J
game_code_2 equ 0x42523545 // BR5E
game_code_3 equ 0x42523550 // BR5P
card_type equ 1
card_id equ 3
card_no equ "003"
card_sub equ "Mod Card 003"
card_sub_x equ 64
card_desc_len equ 2
card_desc_1 equ "ColdBear"
card_desc_2 equ "18MB"
card_desc_3 equ ""
card_name_jp_full equ "コルドベア"
card_name_jp_game equ "コルドベア"
card_name_en_full equ "ColdBear"
card_name_en_game equ "ColdBear"
card_address equ ""
card_address_id equ 0
card_bug equ 0
card_wrote_en equ ""
card_wrote_jp equ "" |
programs/oeis/076/A076505.asm | neoneye/loda | 22 | 93612 | <filename>programs/oeis/076/A076505.asm
; A076505: 3 people at a party are saying Hello to each other. Person 1 says Hello. Person 2 counts the times Hello has been said and says Hello twice that number. Person 3 says Hello 3 times the sum of Hello's and then it is Person 1 again. This is how many Hello's each person says.
; 1,2,9,12,48,216,288,1152,5184,6912,27648,124416,165888,663552,2985984,3981312,15925248,71663616,95551488,382205952,1719926784,2293235712,9172942848,41278242816,55037657088,220150628352,990677827584
add $0,2
seq $0,76507 ; Three people (P1, P2, P3) are in a circle and are saying Hello to each other. They start with P2 saying "Hello, Hello". Thereafter Pn says "Hello" for n times the total number of Hello's so far.
sub $0,16
div $0,16
add $0,1
|
programs/oeis/017/A017259.asm | neoneye/loda | 22 | 1469 | ; A017259: a(n) = (9*n + 8)^3.
; 512,4913,17576,42875,85184,148877,238328,357911,512000,704969,941192,1225043,1560896,1953125,2406104,2924207,3511808,4173281,4913000,5735339,6644672,7645373,8741816,9938375,11239424,12649337,14172488,15813251,17576000,19465109,21484952,23639903,25934336,28372625,30959144,33698267,36594368,39651821,42875000,46268279,49836032,53582633,57512456,61629875,65939264,70444997,75151448,80062991,85184000,90518849,96071912,101847563,107850176,114084125,120553784,127263527,134217728,141420761,148877000,156590819,164566592,172808693,181321496,190109375,199176704,208527857,218167208,228099131,238328000,248858189,259694072,270840023,282300416,294079625,306182024,318611987,331373888,344472101,357911000,371694959,385828352,400315553,415160936,430368875,445943744,461889917,478211768,494913671,512000000,529475129,547343432,565609283,584277056,603351125,622835864,642735647,663054848,683797841,704969000,726572699
mul $0,9
add $0,8
pow $0,3
|
Expr.g4 | mengdemao/AntlrExpr | 1 | 4588 | grammar Expr;
prog : stat+;
stat: expr NEWLINE # printExpr
| ID '=' expr NEWLINE # assign
| NEWLINE # blank
;
expr: expr op = (MUL | DIV | MOD) expr # MulDiv
| expr op = (ADD | SUB) expr # AddSub
| INT # int
| ID # id
| '('expr')' # parens
;
ASG : '=' ;
MOD : '%' ;
MUL : '*' ;
DIV : '/' ;
ADD : '+' ;
SUB : '-' ;
ID : [a-zA-Z]+ ;
INT : [0-9]+ ;
NEWLINE :'\r'? '\n' ;
WS : [ \t]+ -> skip;
|
testcases/ds_fetch/ds_fetch.adb | jrmarino/AdaBase | 30 | 8106 | with AdaBase;
with Connect;
with CommonText;
with Ada.Text_IO;
with AdaBase.Results.Sets;
procedure DS_Fetch is
package CON renames Connect;
package TIO renames Ada.Text_IO;
package ARS renames AdaBase.Results.Sets;
package CT renames CommonText;
begin
CON.DR.set_trait_character_set (""); -- Native charset (Latin1), not UTF-8
CON.connect_database;
declare
sql : constant String := "SELECT * FROM fruits WHERE color = 'orange'";
stmt : CON.Stmt_Type := CON.DR.query (sql);
row : ARS.Datarow;
begin
TIO.Put_Line (" Query successful: " & stmt.successful'Img);
TIO.Put_Line (" Data Discarded: " & stmt.data_discarded'Img);
TIO.Put_Line ("Number of columns:" & stmt.column_count'Img);
TIO.Put_Line (" Number of rows:" & stmt.rows_returned'Img);
TIO.Put_Line ("");
for c in Natural range 1 .. stmt.column_count loop
TIO.Put_Line ("Column" & c'Img & ":");
TIO.Put_Line (" TABLE: " & stmt.column_table (c));
TIO.Put_Line (" NAME: " & stmt.column_name (c));
TIO.Put_Line (" TYPE: " & stmt.column_native_type (c)'Img);
end loop;
TIO.Put_Line ("");
loop
row := stmt.fetch_next;
exit when row.data_exhausted;
TIO.Put (CT.zeropad (Natural (row.column (1).as_byte2), 2) & " ");
declare
fruit : String := row.column ("fruit").as_string;
frlen : Natural := fruit'Length;
rest : String (1 .. 12 - frlen) := (others => ' ');
begin
TIO.Put (rest & fruit);
end;
TIO.Put (" (" & row.column ("color").as_string & ") calories =");
TIO.Put_Line (row.column (4).as_byte2'Img);
end loop;
end;
CON.DR.disconnect;
end DS_Fetch;
|
source/image/required/s-widlli.adb | ytomino/drake | 33 | 21479 | with System.Formatting;
with System.Long_Long_Integer_Types;
package body System.Wid_LLI is
use type Long_Long_Integer_Types.Long_Long_Unsigned;
subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned;
subtype Long_Long_Unsigned is Long_Long_Integer_Types.Long_Long_Unsigned;
-- implementation
function Width_Long_Long_Integer (Lo, Hi : Long_Long_Integer)
return Natural is
begin
if Lo > Hi then
return 0;
else
declare
Max_Abs : Long_Long_Unsigned;
Digits_Width : Natural;
begin
if Hi <= 0 then
Max_Abs := -Long_Long_Unsigned'Mod (Lo);
elsif Lo >= 0 then
Max_Abs := Long_Long_Unsigned (Hi);
else -- Lo < 0 and then Hi > 0
Max_Abs := Long_Long_Unsigned'Max (
-Long_Long_Unsigned'Mod (Lo),
Long_Long_Unsigned (Hi));
end if;
if Long_Long_Integer'Size <= Standard'Word_Size then
Digits_Width :=
Formatting.Digits_Width (Word_Unsigned (Max_Abs));
else
Digits_Width := Formatting.Digits_Width (Max_Abs);
end if;
return Digits_Width + 1; -- sign
end;
end if;
end Width_Long_Long_Integer;
end System.Wid_LLI;
|
oeis/212/A212573.asm | neoneye/loda-programs | 11 | 5830 | ; A212573: Number of (w,x,y,z) with all terms in {1,...,n} and |w-x|>|x-y|+|y-z|.
; 0,0,2,10,36,92,202,386,680,1112,1730,2570,3692,5140,6986,9282,12112,15536,19650,24522,30260,36940,44682,53570,63736,75272,88322,102986,119420,137732,158090,180610,205472,232800,262786,295562,331332,370236,412490,458242,507720,561080,618562,680330,746636,817652,893642,974786,1061360,1153552,1251650,1355850,1466452,1583660,1707786,1839042,1977752,2124136,2278530,2441162,2612380,2792420,2981642,3180290,3388736,3607232,3836162,4075786,4326500,4588572,4862410,5148290,5446632,5757720,6081986,6419722
lpb $0
mov $2,$0
sub $2,2
mov $0,$2
max $2,0
seq $2,7904 ; Crystal ball sequence for diamond.
add $1,$2
lpe
mul $1,2
mov $0,$1
|
TimerDisplay.applescript | Red-Menace/AppleScriptObjC-Stuff | 2 | 3108 |
use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions
# Provide a timer in an app window and/or in a menu bar status item.
# Add LSUIElement key to the application's Info.plist to make an agent (no app menu or dock tile).
property mainWindow : missing value -- the app's main window
property textField : missing value -- a text field for the window
property statusItem : missing value -- the status bar item
property timerMenu : missing value -- a menu for the timer
property timer : missing value -- a repeating timer (for updating elapsed time)
property updateInterval : 1 -- time between updates (seconds)
property colorIntervals : {30, 60} -- green>yellow and yellow>red color change intervals (seconds)
global elapsed, paused -- total elapsed time and a flag to pause the timer update
global titleFont
global greenColor, yellowColor, redColor
on run -- example will run as an app and from the Script Editor for testing
if current application's NSThread's isMainThread() as boolean then
my setup()
else
my performSelectorOnMainThread:"setup" withObject:(missing value) waitUntilDone:true
end if
end run
to setup() -- set stuff up and start timer
try
set elapsed to 0
set paused to true
# font and colors
set titleFont to current application's NSFont's fontWithName:"Courier New Bold" |size|:16 -- boldSystemFontOfSize:14
set greenColor to current application's NSDictionary's dictionaryWithObjects:{current application's NSColor's systemGreenColor} forKeys:{current application's NSForegroundColorAttributeName}
set yellowColor to current application's NSDictionary's dictionaryWithObjects:{current application's NSColor's systemYellowColor} forKeys:{current application's NSForegroundColorAttributeName}
set redColor to current application's NSDictionary's dictionaryWithObjects:{current application's NSColor's systemRedColor} forKeys:{current application's NSForegroundColorAttributeName}
# UI items
buildMenu()
buildWindow() -- comment to remove window
buildStatusItem() -- comment to remove status item
# start a repeating timer
set my timer to current application's NSTimer's timerWithTimeInterval:updateInterval target:me selector:"updateElapsed:" userInfo:(missing value) repeats:true
current application's NSRunLoop's mainRunLoop's addTimer:timer forMode:(current application's NSDefaultRunLoopMode)
on error errmess number errnum -- quit on error
display alert "Error " & errnum message errmess
terminate()
end try
end setup
to buildMenu() -- build a menu for the window and status item
tell (current application's NSMenu's alloc's initWithTitle:"")
its setAutoenablesItems:false
(its addItemWithTitle:"Start" action:"startStop:" keyEquivalent:"")'s setTarget:me
set menuItem to its addItemWithTitle:"Pause" action:"pauseContinue:" keyEquivalent:""
menuItem's setTarget:me
menuItem's setEnabled:false
(its addItemWithTitle:"Reset" action:"reset:" keyEquivalent:"")'s setTarget:me
(its addItemWithTitle:"Quit" action:"terminate" keyEquivalent:"")'s setTarget:me
set my timerMenu to it
end tell
end buildMenu
to buildWindow() -- build the main window
tell ((current application's NSWindow's alloc)'s initWithContentRect:[[0, 0], [110, 45]] styleMask:1 backing:2 defer:false)
its setLevel:(current application's NSFloatingWindowLevel)
its |center|()
its setTitle:"Timer"
set its delegate to me
set my mainWindow to it
end tell
buildTextField()
mainWindow's contentView's addSubview:textField
mainWindow's contentView's setMenu:timerMenu
mainWindow's orderFront:me
end buildWindow
to buildTextField() -- build a text field for the timer display
tell (current application's NSTextField's alloc's initWithFrame:[[15, 0], [100, 32]])
its setRefusesFirstResponder:true
its setBezeled:false
its setDrawsBackground:false
its setSelectable:false
its setFont:titleFont
its setStringValue:(my formatTime(0))
set my textField to it
end tell
end buildTextField
on buildStatusItem() -- build a menu bar status item for the timer display
tell (current application's NSStatusBar's systemStatusBar's statusItemWithLength:(current application's NSVariableStatusItemLength))
its (button's setFont:titleFont)
its (button's setTitle:(text 4 thru -1 of my formatTime(0)))
its button's sizeToFit()
its setMenu:timerMenu
set my statusItem to it
end tell
end buildStatusItem
to updateElapsed:sender -- called by the repeating timer to update the elapsed time display(s)
if paused then return -- skip it
set elapsed to elapsed + updateInterval
try
set newTime to formatTime(elapsed) -- plain text
set attrText to current application's NSMutableAttributedString's alloc's initWithString:newTime
tell colorIntervals to if elapsed ≤ its first item then -- first color
attrText's setAttributes:greenColor range:{0, attrText's |length|()}
else if elapsed > its first item and elapsed ≤ its second item then -- middle color
attrText's setAttributes:yellowColor range:{0, attrText's |length|()}
else -- last color
attrText's setAttributes:redColor range:{0, attrText's |length|()}
end if
attrText's addAttribute:(current application's NSFontAttributeName) value:titleFont range:{0, attrText's |length|()}
if mainWindow is not missing value then textField's setAttributedStringValue:attrText
if statusItem is not missing value then
attrText's deleteCharactersInRange:[0, 3] -- shorten for menu bar
statusItem's button's setAttributedTitle:attrText
end if
on error errmess number errnum -- quit on error
display alert "Error " & errnum message errmess
terminate()
end try
end updateElapsed:
on startStop:sender -- start or stop the timer
set itemTitle to sender's title as text
if itemTitle is "Start" then
set paused to false
sender's setTitle:"Stop"
my reset:(missing value)
(timerMenu's itemAtIndex:1)'s setEnabled:true
else -- stop
set paused to true
sender's setTitle:"Start"
(timerMenu's itemAtIndex:1)'s setEnabled:false
(timerMenu's itemAtIndex:1)'s setTitle:"Pause"
end if
end startStop:
on pauseContinue:sender -- pause or continue the timer
set itemTitle to sender's title as text
if itemTitle is "Pause" then
set paused to true
sender's setTitle:"Continue"
else
set paused to false
sender's setTitle:"Pause"
end if
end pauseContinue:
to reset:sender -- reset the elapsed time
set elapsed to 0
set newTime to formatTime(elapsed) -- plain text
if mainWindow is not missing value then textField's setStringValue:newTime
if statusItem is not missing value then statusItem's button's setTitle:(text 4 thru -1 of newTime)
end reset:
to formatTime(theSeconds) -- return formatted string (hh:mm:ss) from seconds
if class of theSeconds is integer then tell "000000" & ¬
(10000 * (theSeconds mod days div hours) ¬
+ 100 * (theSeconds mod hours div minutes) ¬
+ (theSeconds mod minutes)) ¬
to set theSeconds to (text -6 thru -5) & ":" & (text -4 thru -3) & ":" & (text -2 thru -1)
return theSeconds
end formatTime
to terminate() -- quit handler not called from normal NSApplication terminate:
if timer is not missing value then timer's invalidate()
if statusItem is not missing value then current application's NSStatusBar's systemStatusBar's removeStatusItem:statusItem
if mainWindow is not missing value then mainWindow's |close|()
if name of current application does not start with "Script" then tell me to quit
end terminate
|
Kernel/asm/_keyboard.asm | FrBernad/TP-2---Advanced-OS | 0 | 175053 | GLOBAL hasKey
GLOBAL getKey
section .text
hasKey:
push rbp
mov rbp,rsp
mov rax,0
in al,64h
and al,0x01
leave
ret
getKey:
push rbp
mov rbp,rsp
mov rax,0
in al,60h
leave
ret |
Library/User/Help/helpHelp.asm | steakknife/pcgeos | 504 | 172118 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1993 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: helpHelp.asm
AUTHOR: <NAME>, Feb 23, 1993
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 2/23/93 Initial revision
DESCRIPTION:
Code for help on help
$Id: helpHelp.asm,v 1.1 97/04/07 11:47:46 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HelpControlCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HelpControlBringUpHelp
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Bring up help on help
CALLED BY: MSG_META_BRING_UP_HELP
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of HelpControlClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/23/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HelpControlBringUpHelp method dynamic HelpControlClass,
MSG_META_BRING_UP_HELP,
MSG_HC_BRING_UP_HELP
uses cx, dx, bp
HELP_LOCALS
;
; We borrow stack space because the we may have used a lot
; of stack space getting here, and the VMOpen() we'll do
; requires a decent amount, too.
;
mov di, 1000
call ThreadBorrowStackSpace
push di
.enter
;
; Get child block and features for a controller into local vars
;
call HUGetChildBlockAndFeaturesLocals
test ss:features, mask HPCF_HELP
jz openError ;don't bring up help on help
; ; if no help button
; Get the name "TOC"
;
mov di, offset TableOfContents
call HNGetStandardName
;
; Get the appropriate file name based on whether we are on a
; keyboard only system or not
;
mov di, offset MouseHelpOnHelp
call FlowGetUIButtonFlags
test al, mask UIBF_KEYBOARD_ONLY
jz notKeyboardOnly
mov di, offset KbdHelpOnHelp
notKeyboardOnly:
lea bx, ss:filename
call HNGetStandardNameCommon
;
; Bring up the help on help. Display the new text
;
call HLDisplayText
jc openError ;branch if error
;
; Update various things for history
;
call HHUpdateHistoryForLink
openError:
.leave
pop di
call ThreadReturnStackSpace
ret
HelpControlBringUpHelp endm
HelpControlCode ends
|
libsrc/_DEVELOPMENT/arch/zx/esxdos/c/sccz80/esxdos_disk_info_callee.asm | jpoikela/z88dk | 640 | 82510 | <gh_stars>100-1000
; int esxdos_disk_info(uchar device, void *buf)
SECTION code_clib
SECTION code_esxdos
PUBLIC esxdos_disk_info_callee
EXTERN asm_esxdos_disk_info
esxdos_disk_info_callee:
pop af
pop hl
pop bc
push af
ld a,c
jp asm_esxdos_disk_info
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _esxdos_disk_info_callee
defc _esxdos_disk_info_callee = esxdos_disk_info_callee
ENDIF
|
oeis/273/A273368.asm | neoneye/loda-programs | 11 | 98918 | ; A273368: Numbers k such that 10*k+9 is a perfect square.
; 0,4,16,28,52,72,108,136,184,220,280,324,396,448,532,592,688,756,864,940,1060,1144,1276,1368,1512,1612,1768,1876,2044,2160,2340,2464,2656,2788,2992,3132,3348,3496,3724,3880,4120,4284,4536,4708,4972,5152,5428,5616,5904,6100,6400,6604,6916,7128,7452,7672,8008,8236,8584,8820,9180,9424,9796,10048,10432,10692,11088,11356,11764,12040,12460,12744,13176,13468,13912,14212,14668,14976,15444,15760,16240,16564,17056,17388,17892,18232,18748,19096,19624,19980,20520,20884,21436,21808,22372,22752,23328,23716
mul $0,5
div $0,2
add $0,2
bin $0,2
div $0,5
mul $0,4
|
third_party/antlr_grammars_v4/fortran77/Fortran77Parser.g4 | mikhan808/rsyntaxtextarea-antlr4-extension | 2 | 2267 | /*
* Fortran 77 grammar for ANTLR 2.7.5
* Adadpted from Fortran 77 PCCTS grammar by <NAME>
* Original PCCTS grammar by <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
*/
/**
* ported to Antlr4 by <NAME>
*/
/*
* Updated by <NAME>, 2018
*/
parser grammar Fortran77Parser;
options
{ tokenVocab = Fortran77Lexer; }
// multi-line comments?
commentStatement
: COMMENT+
;
program
: commentStatement* (executableUnit commentStatement*)+ EOL*
;
executableUnit
: functionSubprogram
| mainProgram
| subroutineSubprogram
| blockdataSubprogram
;
mainProgram
: (programStatement)? subprogramBody
;
functionSubprogram
: functionStatement subprogramBody
;
subroutineSubprogram
: subroutineStatement subprogramBody
;
blockdataSubprogram
: blockdataStatement subprogramBody
;
otherSpecificationStatement
: dimensionStatement
| equivalenceStatement
| intrinsicStatement
| saveStatement
;
executableStatement
: (assignmentStatement | gotoStatement | ifStatement | doStatement | continueStatement | stopStatement | pauseStatement | readStatement | writeStatement | printStatement | rewindStatement | backspaceStatement | openStatement | closeStatement | endfileStatement | inquireStatement | callStatement | returnStatement)
;
programStatement
: PROGRAM NAME EOL
;
entryStatement
: ENTRY NAME (LPAREN namelist RPAREN)?
;
functionStatement
: type? FUNCTION NAME LPAREN namelist? RPAREN EOL?
;
blockdataStatement
: BLOCK NAME
;
subroutineStatement
: SUBROUTINE NAME (LPAREN namelist? RPAREN)? EOL?
;
namelist
: identifier (COMMA identifier)*
;
statement
: entryStatement
| implicitStatement
| parameterStatement
| typeStatement
| commonStatement
| pointerStatement
| externalStatement
| otherSpecificationStatement
| dataStatement
| (statementFunctionStatement) statementFunctionStatement
| executableStatement
;
subprogramBody
: commentStatement* (wholeStatement commentStatement*)+ endStatement
;
wholeStatement
: LABEL? statement EOL
;
endStatement
: LABEL? END
;
dimensionStatement
: DIMENSION arrayDeclarators
;
arrayDeclarator
: (NAME | REAL) LPAREN arrayDeclaratorExtents RPAREN
;
arrayDeclarators
: arrayDeclarator (COMMA arrayDeclarator)*
;
arrayDeclaratorExtents
: arrayDeclaratorExtent (COMMA arrayDeclaratorExtent)*
;
arrayDeclaratorExtent
: iexprCode (COLON (iexprCode | STAR))?
| STAR
;
equivalenceStatement
: EQUIVALENCE equivEntityGroup (COMMA equivEntityGroup)*
;
equivEntityGroup
: LPAREN equivEntity (COMMA equivEntity)* RPAREN
;
equivEntity
: varRef
;
commonStatement
: COMMON (commonBlock (COMMA commonBlock)* | commonItems)
;
commonName
: DIV (NAME DIV | DIV)
;
commonItem
: NAME
| arrayDeclarator
;
commonItems
: commonItem (COMMA commonItem)*
;
commonBlock
: commonName commonItems
;
typeStatement
: typename typeStatementNameList
| characterWithLen typeStatementNameCharList
;
typeStatementNameList
: typeStatementName (COMMA typeStatementName)*
;
typeStatementName
: NAME
| arrayDeclarator
;
typeStatementNameCharList
: typeStatementNameChar (COMMA typeStatementNameChar)*
;
typeStatementNameChar
: typeStatementName (typeStatementLenSpec)?
;
typeStatementLenSpec
: STAR lenSpecification
;
typename
: (REAL | COMPLEX (STAR ICON?)? | DOUBLE COMPLEX | DOUBLE PRECISION | INTEGER | LOGICAL | CHARACTER)
;
type
: typename
| characterWithLen
;
typenameLen
: STAR ICON
;
pointerStatement
: POINTER pointerDecl (COMMA pointerDecl)*
;
pointerDecl
: LPAREN NAME COMMA NAME RPAREN
;
implicitStatement
: IMPLICIT (implicitNone | implicitSpecs)
;
implicitSpec
: type LPAREN implicitLetters RPAREN
;
implicitSpecs
: implicitSpec (COMMA implicitSpec)*
;
implicitNone
: NONE
;
implicitLetter
: NAME
;
implicitRange
: implicitLetter (MINUS implicitLetter)?
;
implicitLetters
: implicitRange (COMMA implicitRange)*
;
lenSpecification
: (LPAREN STAR RPAREN) LPAREN STAR RPAREN
| ICON
| LPAREN intConstantExpr RPAREN
;
characterWithLen
: characterExpression (cwlLen)?
;
cwlLen
: STAR lenSpecification
;
parameterStatement
: PARAMETER LPAREN paramlist RPAREN
;
paramlist
: paramassign (COMMA paramassign)*
;
paramassign
: NAME ASSIGN constantExpr
;
externalStatement
: EXTERNAL namelist
;
intrinsicStatement
: INTRINSIC namelist
;
saveStatement
: SAVE (saveEntity (COMMA saveEntity)*)?
;
saveEntity
: (NAME | DIV NAME DIV)
;
dataStatement
: DATA dataStatementEntity ((COMMA)? dataStatementEntity)*
;
dataStatementItem
: varRef
| dataImpliedDo
;
dataStatementMultiple
: ((ICON | NAME) STAR)? (constant | NAME)
;
dataStatementEntity
: dse1 dse2
;
dse1
: dataStatementItem (COMMA dataStatementItem)* DIV
;
dse2
: dataStatementMultiple (COMMA dataStatementMultiple)* DIV
;
dataImpliedDo
: LPAREN dataImpliedDoList COMMA dataImpliedDoRange RPAREN
;
dataImpliedDoRange
: NAME ASSIGN intConstantExpr COMMA intConstantExpr (COMMA intConstantExpr)?
;
dataImpliedDoList
: dataImpliedDoListWhat
| COMMA dataImpliedDoList
;
dataImpliedDoListWhat
: (varRef | dataImpliedDo)
;
gotoStatement
: ((GO | GOTO) to) (unconditionalGoto | computedGoto | assignedGoto)
;
unconditionalGoto
: lblRef
;
computedGoto
: LPAREN labelList RPAREN (COMMA)? integerExpr
;
lblRef
: ICON
;
labelList
: lblRef (COMMA lblRef)*
;
assignedGoto
: NAME ((COMMA)? LPAREN labelList RPAREN)?
;
ifStatement
: IF LPAREN logicalExpression RPAREN (blockIfStatement | logicalIfStatement | arithmeticIfStatement)
;
arithmeticIfStatement
: lblRef COMMA lblRef COMMA lblRef
;
logicalIfStatement
: executableStatement
;
blockIfStatement
: firstIfBlock elseIfStatement* elseStatement? endIfStatement
;
firstIfBlock
: THEN EOL? commentStatement* (wholeStatement commentStatement*)+
;
elseIfStatement
: (ELSEIF | (ELSE IF)) LPAREN logicalExpression RPAREN THEN EOL? wholeStatement+
;
elseStatement
: ELSE EOL? commentStatement* (wholeStatement commentStatement*)+
;
endIfStatement
: (ENDIF | END IF)
;
doStatement
: DO (doWithLabel | doWithEndDo)
;
doVarArgs
: variableName ASSIGN intRealDpExpr COMMA intRealDpExpr (COMMA intRealDpExpr)?
;
doWithLabel
: lblRef COMMA? doVarArgs EOL? doBody EOL? continueStatement
;
doBody
: (wholeStatement) +
;
doWithEndDo
: doVarArgs EOL? doBody EOL? enddoStatement
;
enddoStatement
: (ENDDO | (END DO))
;
continueStatement
: lblRef* CONTINUE
;
stopStatement
: STOP (ICON | HOLLERITH)?
;
pauseStatement
: PAUSE (ICON | HOLLERITH)
;
writeStatement
: WRITE LPAREN controlInfoList RPAREN ((COMMA? ioList) +)?
;
readStatement
: READ (formatIdentifier ((COMMA ioList) +)?)
;
printStatement
: PRINT (formatIdentifier ((COMMA ioList) +)?)
;
assignmentStatement
: varRef ASSIGN expression
;
controlInfoList
: controlInfoListItem (COMMA controlInfoListItem)*
;
controlErrSpec
: controlErr ASSIGN (lblRef | NAME)
;
controlInfoListItem
: unitIdentifier
| (HOLLERITH | SCON)
| controlFmt ASSIGN formatIdentifier
| controlUnit ASSIGN unitIdentifier
| controlRec ASSIGN integerExpr
| controlEnd ASSIGN lblRef
| controlErrSpec
| controlIostat ASSIGN varRef
;
ioList
: (ioListItem COMMA NAME ASSIGN) ioListItem
| (ioListItem COMMA ioListItem) ioListItem COMMA ioList
| ioListItem
;
ioListItem
: (LPAREN ioList COMMA NAME ASSIGN) ioImpliedDoList
| expression
;
ioImpliedDoList
: LPAREN ioList COMMA NAME ASSIGN intRealDpExpr COMMA intRealDpExpr (COMMA intRealDpExpr)? RPAREN
;
openStatement
: OPEN LPAREN openControl (COMMA openControl)* RPAREN
;
openControl
: unitIdentifier
| controlUnit ASSIGN unitIdentifier
| controlErrSpec
| controlFile ASSIGN characterExpression
| controlStatus ASSIGN characterExpression
| (controlAccess | controlPosition) ASSIGN characterExpression
| controlForm ASSIGN characterExpression
| controlRecl ASSIGN integerExpr
| controlBlank ASSIGN characterExpression
| controlIostat ASSIGN varRef
;
controlFmt
: FMT
;
controlUnit
: UNIT
;
controlRec
: NAME
;
controlEnd
: END
;
controlErr
: ERR
;
controlIostat
: IOSTART
;
controlFile
: FILE
;
controlStatus
: STATUS
;
controlAccess
: ACCESS
;
controlPosition
: POSITION
;
controlForm
: FORM
;
controlRecl
: RECL
;
controlBlank
: BLANK
;
controlExist
: EXIST
;
controlOpened
: OPENED
;
controlNumber
: NUMBER
;
controlNamed
: NAMED
;
controlName
: NAME
;
controlSequential
: SEQUENTIAL
;
controlDirect
: NAME
;
controlFormatted
: FORMATTED
;
controlUnformatted
: UNFORMATTED
;
controlNextrec
: NEXTREC
;
closeStatement
: CLOSE LPAREN closeControl (COMMA closeControl)* RPAREN
;
closeControl
: unitIdentifier
| controlUnit ASSIGN unitIdentifier
| controlErrSpec
| controlStatus ASSIGN characterExpression
| controlIostat ASSIGN varRef
;
inquireStatement
: INQUIRE LPAREN inquireControl (COMMA inquireControl)* RPAREN
;
inquireControl
: controlUnit ASSIGN unitIdentifier
| controlFile ASSIGN characterExpression
| controlErrSpec
| (controlIostat | controlExist | controlOpened | controlNumber | controlNamed | controlName | controlAccess | controlSequential | controlDirect | controlForm | controlFormatted | controlUnformatted | controlRecl | controlNextrec | controlBlank) ASSIGN varRef
| unitIdentifier
;
backspaceStatement
: BACKSPACE berFinish
;
endfileStatement
: ENDFILE berFinish
;
rewindStatement
: REWIND berFinish
;
berFinish
: (unitIdentifier (unitIdentifier) | LPAREN berFinishItem (COMMA berFinishItem)* RPAREN)
;
berFinishItem
: unitIdentifier
| controlUnit ASSIGN unitIdentifier
| controlErrSpec
| controlIostat ASSIGN varRef
;
unitIdentifier
: iexpr
| STAR
;
formatIdentifier
: (SCON | HOLLERITH)
| iexpr
| STAR
;
formatStatement
: FORMAT LPAREN fmtSpec RPAREN
;
fmtSpec
: (formatedit | formatsep (formatedit)?) (formatsep (formatedit)? | COMMA (formatedit | formatsep (formatedit)?))*
;
formatsep
: DIV
| COLON
| DOLLAR
;
formatedit
: XCON
| editElement
| ICON editElement
| (PLUS | MINUS)? PCON ((ICON)? editElement)?
;
editElement
: (FCON | SCON | HOLLERITH | NAME)
| LPAREN fmtSpec RPAREN
;
statementFunctionStatement
: LET sfArgs ASSIGN expression
;
sfArgs
: NAME LPAREN namelist RPAREN
;
callStatement
: CALL subroutineCall
;
subroutineCall
: NAME (LPAREN (callArgumentList)? RPAREN)?
;
callArgumentList
: callArgument (COMMA callArgument)*
;
callArgument
: expression
| STAR lblRef
;
returnStatement
: RETURN (integerExpr)?
;
expression
: ncExpr (COLON ncExpr)?
;
ncExpr
: lexpr0 (concatOp lexpr0)*
;
lexpr0
: lexpr1 ((NEQV | EQV) lexpr1)*
;
lexpr1
: lexpr2 (LOR lexpr2)*
;
lexpr2
: lexpr3 (LAND lexpr3)*
;
lexpr3
: LNOT lexpr3
| lexpr4
;
lexpr4
: aexpr0 ((LT | LE | EQ | NE | GT | GE) aexpr0)?
;
aexpr0
: aexpr1 ((PLUS | MINUS) aexpr1)*
;
aexpr1
: aexpr2 ((STAR | DIV) aexpr2)*
;
aexpr2
: (PLUS | MINUS)* aexpr3
;
aexpr3
: aexpr4 (POWER aexpr4)*
;
aexpr4
: unsignedArithmeticConstant
| (HOLLERITH | SCON)
| logicalConstant
| varRef
| LPAREN expression RPAREN
;
iexpr
: iexpr1 ((PLUS | MINUS) iexpr1)*
;
iexprCode
: iexpr1 ((PLUS | MINUS) iexpr1)*
;
iexpr1
: iexpr2 ((STAR | DIV) iexpr2)*
;
iexpr2
: (PLUS | MINUS)* iexpr3
;
iexpr3
: iexpr4 (POWER iexpr3)?
;
iexpr4
: ICON
| varRefCode
| LPAREN iexprCode RPAREN
;
constantExpr
: expression
;
arithmeticExpression
: expression
;
integerExpr
: iexpr
;
intRealDpExpr
: expression
;
arithmeticConstExpr
: expression
;
intConstantExpr
: expression
;
characterExpression
: expression
;
concatOp
: DIV DIV
;
logicalExpression
: expression
;
logicalConstExpr
: expression
;
arrayElementName
: NAME LPAREN integerExpr (COMMA integerExpr)* RPAREN
;
subscripts
: LPAREN (expression (COMMA expression)*)? RPAREN
;
varRef
: (NAME | REAL) (subscripts (substringApp)?)?
;
varRefCode
: NAME (subscripts (substringApp)?)?
;
substringApp
: LPAREN (ncExpr)? COLON (ncExpr)? RPAREN
;
variableName
: NAME
;
arrayName
: NAME
;
subroutineName
: NAME
;
functionName
: NAME
;
constant
: ((PLUS | MINUS))? unsignedArithmeticConstant
| (SCON | HOLLERITH)
| logicalConstant
;
unsignedArithmeticConstant
: (ICON | RCON)
| complexConstant
;
complexConstant
: LPAREN ((PLUS | MINUS))? (ICON | RCON) COMMA ((PLUS | MINUS))? (ICON | RCON) RPAREN
;
logicalConstant
: (TRUE | FALSE)
;
// needed because Fortran doesn't have reserved keywords. Putting the rule
// 'keyword" instead of a few select keywords breaks the parser with harmful
// non-determinisms
identifier
: NAME
| REAL
;
to
: NAME
;
|
test.asm | sk2sat/disas | 0 | 242939 | <gh_stars>0
start:
JMP start
|
oeis/090/A090729.asm | neoneye/loda-programs | 11 | 97614 | <filename>oeis/090/A090729.asm<gh_stars>10-100
; A090729: a(n) = 21a(n-1) - a(n-2), starting with a(0) = 2 and a(1) = 21.
; Submitted by <NAME>
; 2,21,439,9198,192719,4037901,84603202,1772629341,37140612959,778180242798,16304644485799,341619353958981,7157701788652802,149970118207749861,3142214780574094279,65836540273848229998,1379425130970238735679,28902091210101165219261,605564490281154230868802,12687952204694137683025581,265841431808295737112668399,5569982115769516341683010798,116703782999351547438230558359,2445209460870612979861158714741,51232694895283521029646102451202,1073441383340083328642706992760501
mov $3,1
lpb $0
sub $0,1
mul $1,19
add $3,$1
add $2,$3
mov $1,$2
add $3,2
lpe
mov $0,$1
mul $0,19
add $0,2
|
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_667.asm | ljhsiun2/medusa | 9 | 165362 | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x2816, %rsi
lea addresses_A_ht+0x15531, %rdi
nop
nop
nop
nop
nop
inc %r9
mov $73, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %r13, %r13
lea addresses_WT_ht+0x4ec6, %r15
nop
nop
nop
nop
and %rcx, %rcx
mov (%r15), %esi
nop
sub %r15, %r15
lea addresses_UC_ht+0xdf01, %r13
nop
nop
nop
nop
xor $64735, %r8
mov (%r13), %r9w
nop
nop
nop
nop
xor $62918, %r9
lea addresses_D_ht+0x1ac96, %rsi
nop
nop
nop
nop
nop
sub $3740, %rcx
mov (%rsi), %r8d
nop
nop
nop
xor $41823, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r9
push %rax
push %rbp
push %rbx
push %rdi
push %rdx
push %rsi
// Faulty Load
lea addresses_normal+0x1096, %rdx
sub %r9, %r9
mov (%rdx), %rax
lea oracles, %rsi
and $0xff, %rax
shlq $12, %rax
mov (%rsi,%rax,1), %rax
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r9
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': True, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}, '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
*/
|
extern/game_support/stm32f4/src/stm32f4-lcd.ads | AdaCore/training_material | 15 | 24397 | with System;
with STM32F4.GPIO; use STM32F4.GPIO;
with STM32F4.SPI; use STM32F4.SPI;
with STM32F4.RCC; use STM32F4.RCC;
with STM32F429_Discovery; use STM32F429_Discovery;
with Ada.Unchecked_Conversion;
package STM32F4.LCD is
LCD_PIXEL_WIDTH : constant := 240;
LCD_PIXEL_HEIGHT : constant := 320;
type LCD_Layer is (Layer1, Layer2);
subtype Width is Natural range 0 .. (LCD_PIXEL_WIDTH - 1);
subtype Height is Natural range 0 .. (LCD_PIXEL_HEIGHT - 1);
subtype Pixel is Half_Word;
type Pixel_Color is record
B : Bits_5;
G : Bits_5;
R : Bits_5;
A : Bits_1;
end record with Size => Half_Word'Size;
for Pixel_Color use record
B at 0 range 0 .. 4;
G at 0 range 5 .. 9;
R at 1 range 2 .. 6;
A at 1 range 7 .. 7;
end record;
function Pixel_Color_To_Pixel is new Ada.Unchecked_Conversion(Pixel_Color, Pixel);
Black : constant Pixel := 16#8000#;
White : constant Pixel := 16#FFFF#;
Red : constant Pixel := 2**15 or (31 * (2**10));
Green : constant Pixel := 2**15 or (31 * (2**5));
Blue : constant Pixel := 2**15 or 31;
Gray : constant Pixel := 2**15 or 23 * (2**10) or 23 * (2**5) or 23;
Light_Gray : constant Pixel := 2**15 or 30 * (2**10) or 30 * (2**5) or 30;
Sky_Blue : constant Pixel := 2**15 or 19 * (2**17) or 26 * (2**5) or 31;
Yellow : constant Pixel := 2**15 or 31 * (2**10) or 31 * (2**5);
Orange : constant Pixel := 2**15 or 31 * (2**10) or 21 * (2**5);
Pink : constant Pixel := 2**15 or 31 * (2**10) or 13 * (2**5) or 23;
Violet : constant Pixel := 2**15 or 19 * (2**10) or 6 * (2**5) or 26;
type Frame_Buffer_Range is
range 0 .. (LCD_PIXEL_HEIGHT * LCD_PIXEL_WIDTH) - 1;
type Frame_Buffer is array (Frame_Buffer_Range) of Pixel
with Pack, Volatile;
type Frame_Buffer_Access is not null access all Frame_Buffer;
-- Pixel_Fmt_ARGB8888 : constant := 2#000#;
-- Pixel_Fmt_RGB888 : constant := 2#001#;
Pixel_Fmt_RGB565 : constant := 2#010#;
Pixel_Fmt_ARGB1555 : constant := 2#011#;
Pixel_Fmt_ARGB4444 : constant := 2#100#;
-- Pixel_Fmt_L8 : constant := 2#101#;
-- Pixel_Fmt_AL44 : constant := 2#110#;
-- Pixel_Fmt_AL88 : constant := 2#111#;
BF1_Constant_Alpha : constant := 2#100#;
BF1_Pixel_Alpha : constant := 2#110#;
BF2_Constant_Alpha : constant := 2#101#;
BF2_Pixel_Alpha : constant := 2#111#;
Default_Pixel_Fmt : constant := Pixel_Fmt_ARGB1555;
type Layer_State is (Enabled, Disabled);
procedure Initialize;
procedure Initialize_Layer
(Layer : LCD_Layer;
Pixel_Fmt : Word;
Blending_Factor_1 : Bits_3;
Blending_Factor_2 : Bits_3);
procedure Set_Background (R, G, B : Byte);
procedure Set_Layer_State
(Layer : LCD_Layer;
State : Layer_State);
function Current_Frame_Buffer
(Layer : LCD_Layer)
return Frame_Buffer_Access;
procedure Set_Pixel
(Layer : LCD_Layer;
X : Width;
Y : Height;
Value : Pixel);
function Pixel_Value
(Layer : LCD_Layer;
X : Width;
Y : Height)
return Pixel;
procedure Flip_Buffers;
procedure Flip_Copy_Buffers;
private
NCS_GPIO : GPIO_Port renames GPIO_C;
WRX_GPIO : GPIO_Port renames GPIO_D;
NCS_Pin : GPIO_Pin renames Pin_2;
WRX_Pin : GPIO_Pin renames Pin_13;
SCK_GPIO : GPIO_Port renames GPIO_F;
MISO_GPIO : GPIO_Port renames GPIO_F;
MOSI_GPIO : GPIO_Port renames GPIO_F;
SCK_Pin : GPIO_Pin renames Pin_7;
MISO_Pin : GPIO_Pin renames Pin_8;
MOSI_Pin : GPIO_Pin renames Pin_9;
SCK_AF : GPIO_Alternate_Function renames GPIO_AF_SPI5;
MISO_AF : GPIO_Alternate_Function renames GPIO_AF_SPI5;
MOSI_AF : GPIO_Alternate_Function renames GPIO_AF_SPI5;
LCD_SPI : SPI_Port renames SPI_5;
-- Layer Control Register
type LC_Registers is record
Len : Bits_1; -- Layer Enable
Colken : Bits_1; -- Color Keying Enable
Reserved_1 : Bits_2;
Cluten : Bits_1; -- Color Look-Up Table Enable
Reserved_2 : Bits_27;
end record with Pack, Volatile, Size => 32;
-- Layerx Window Horizontal Position Configuration Register
type LWHPC_Registers is record
Horizontal_Start : Bits_12; -- Window Horizontal Start Position
Reserved_1 : Bits_4;
Horizontal_Stop : Bits_12; -- Window Horizontal Stop Position
Reserved_2 : Bits_4;
end record with Pack, Volatile, Size => 32;
-- Layerx Window Vertical Position Configuration Register
type LWVPC_Registers is record
Vertical_Start : Bits_11; -- Window Vertical Start Position
Reserved_1 : Bits_5;
Vertical_Stop : Bits_11; -- Window Vertical Stop Position
Reserved_2 : Bits_5;
end record with Pack, Volatile, Size => 32;
-- Layerx Color Keying Configuration Register
type LCKC_Registers is record
CKBlue : Byte;
CKGreen : Byte;
CKRed : Byte;
Reserved_1 : Byte;
end record with Pack, Volatile, Size => 32;
-- Layerx Pixel Format Configuration Register
subtype LPFC_Register is Word;
-- Layer Constant Alpha Configuration Register
type LCAC_Registers is record
CONSTA : Byte;
Reserved : Bits_24;
end record with Pack, Volatile, Size => 32;
-- Layer Default Color Configuration Register
type LDCC_Registers is record
DCBlue : Byte;
DCGreen : Byte;
DCRed : Byte;
DCAlpha : Byte;
end record with Pack, Volatile, Size => 32;
-- Layer Blending Factors Configuration Register
type LBFC_Registers is record
BF2 : Bits_3; -- Blending Factor 2
Reserved_1 : Bits_5;
BF1 : Bits_3; -- Blending Factor 1
Reserved_2 : Bits_21;
end record with Pack, Volatile, Size => 32;
-- Layer Color Frame Buffer Length Register
type LCFBL_Registers is record
CFBLL : Bits_13; -- Color Frame Buffer Line Length
Reserved_1 : Bits_3;
CFBP : Bits_13; -- Color Frame Pitch in bytes
Reserved_2 : Bits_3;
end record with Pack, Volatile, Size => 32;
-- Layer Color Frame Buffer Line Number Register
type LCFBLN_Registers is record
CFBLNBR : Bits_11; -- Frame Buffer Line Number
Reserved : Bits_21;
end record with Pack, Volatile, Size => 32;
-- Layer CLUT Write Register
type LCLUTW_Registers is record
Blue : Byte;
Green : Byte;
Red : Byte;
CLUTADD : Byte;
end record with Pack, Volatile, Size => 32;
type Layer is record
Ctrl : LC_Registers;
WHPC : LWHPC_Registers;
WVPC : LWVPC_Registers;
CKC : LCKC_Registers;
PFC : LPFC_Register;
CAC : LCAC_Registers;
DCC : LDCC_Registers;
BFC : LBFC_Registers;
Reserved_1 : Word;
Reserved_2 : Word;
-- Layer Color Frame Buffer Address Register
CFBA : Word;
CFBL : LCFBL_Registers;
CFBLN : LCFBLN_Registers;
Reserved_3 : Word;
Reserved_4 : Word;
Reserved_5 : Word;
CLUTW : LCLUTW_Registers;
end record with Pack, Volatile, Size => 17 * 32;
-- Synchronization Size Configuration Register
type SSC_Registers is record
VSH : Bits_11; -- Vertical Synchronization Height
Reserved_1 : Bits_5;
HSW : Bits_12; -- Horizontal Synchronization Width
Reserved_2 : Bits_4;
end record with Pack, Volatile, Size => 32;
-- Back Porch Configuration Register
type BPC_Registers is record
AVBP : Bits_11; -- Accumulated Vertical back porch
Reserved_1 : Bits_5;
AHBP : Bits_12; -- Accumulated Horizontal back porch
Reserved_2 : Bits_4;
end record with Pack, Volatile, Size => 32;
-- Active Width Configuration Register
type AWC_Registers is record
AAH : Bits_11; -- Accumulated Active Height
Reserved_1 : Bits_5;
AAW : Bits_12; -- Accumulated Active Width
Reserved_2 : Bits_4;
end record with Pack, Volatile, Size => 32;
-- Total Width Configuration Register
type TWC_Registers is record
TOTALH : Bits_11; -- Total Height
Reserved_1 : Bits_5;
TOTALW : Bits_12; -- Total Width
Reserved_2 : Bits_4;
end record with Pack, Volatile, Size => 32;
-- Global Control Register
type GC_Registers is record
LTDCEN : Bits_1; -- Controller Enable
Reserved_1 : Bits_3;
DBW : Bits_3; -- Dither Blue Width
Reserved_2 : Bits_1;
DGW : Bits_3; -- Dither Green Width
Reserved_3 : Bits_1;
DRW : Bits_3; -- Dither Red Width
Reserved_4 : Bits_1;
DEN : Bits_1; -- Dither Enable
Reserved_5 : Bits_11;
PCPOL : Bits_1; -- Pixel Clock Polarity
DEPOL : Bits_1; -- Data Enable Polarity
VSPOL : Bits_1; -- Vertical Synchronization Polarity
HSPOL : Bits_1; -- Horizontal Synchronization Polarity
end record with Pack, Volatile, Size => 32;
-- Shadow Reload Configuration Register
type SRC_Registers is record
IMR : Bits_1; -- Immediate Reload
VBR : Bits_1; -- Vertical Blanking Reload
Reserved : Bits_30;
end record with Pack, Volatile, Size => 32;
-- Background Color Configuration Register
type BCC_Registers is record
BCBlue : Byte;
BCGreen : Byte;
BCRed : Byte;
Reserved : Byte;
end record with Pack, Volatile, Size => 32;
-- Interrupt Enable Register
type IE_Registers is record
LIE : Bits_1; -- Line Interrupt Enable
FUIE : Bits_1; -- FIFO Underrun Interrupt Enable
TERRIE : Bits_1; -- Transfer Error Interrupt Enable
RRIE : Bits_1; -- Register Reload interrupt enable
Reserved : Bits_28;
end record with Pack, Volatile, Size => 32;
-- Interrupt Status Register
type IS_Registers is record
LIF : Bits_1; -- Line Interrupt flag
FUIF : Bits_1; -- FIFO Underrun Interrupt flag
TERRIF : Bits_1; -- Transfer Error Interrupt flag
RRIF : Bits_1; -- Register Reload interrupt flag
Reserved : Bits_28;
end record with Pack, Volatile, Size => 32;
-- Interrupt Clear Register
type IC_Registers is record
CLIF : Bits_1; -- Clear Line Interrupt flag
CFUIF : Bits_1; -- Clear FIFO Underrun Interrupt flag
CTERRIF : Bits_1; -- Clear Transfer Error Interrupt flag
CRRIF : Bits_1; -- Clear Register Reload interrupt flag
Reserved : Bits_28;
end record with Pack, Volatile, Size => 32;
-- Line Interrupt Position Configuration Register
type LIPC_Registers is record
LIPOS : Bits_11; -- Line Interrupt Position
Reserved : Bits_21;
end record with Pack, Volatile, Size => 32;
-- Current Position Status Register
type CPS_Registers is record
CYPOS : Bits_16;
CXPOS : Bits_16;
end record with Pack, Volatile, Size => 32;
-- Current Display Status Register
type CDS_Registers is record
VDES : Bits_1; -- Vertical Data Enable display Status
HDES : Bits_1; -- Horizontal Data Enable display Status
VSYNCS : Bits_1; -- Vertical Synchronization Enable display Status
HSYNCS : Bits_1; -- Horizontal Synchronization Enable display Status
Reserved : Bits_28;
end record with Pack, Volatile, Size => 32;
Polarity_Active_Low : constant := 0;
Polarity_Active_High : constant := 1;
type LTDCR is record
SSC : SSC_Registers;
BPC : BPC_Registers;
AWC : AWC_Registers;
TWC : TWC_Registers;
GC : GC_Registers;
Reserved_1 : Word;
Reserved_2 : Word;
SRC : SRC_Registers;
Reserved_3 : Word;
BCC : BCC_Registers;
Reserved_4 : Word;
IE : IE_Registers;
ISR : IS_Registers;
IC : IC_Registers;
LIPC : LIPC_Registers;
CPS : CPS_Registers;
CDS : CDS_Registers;
end record with Pack, Volatile, Size => 17 * 32;
Peripheral_Base : constant := 16#4000_0000#;
APB2_Peripheral_Base : constant := Peripheral_Base + 16#0001_0000#;
LTDC_Base : constant := APB2_Peripheral_Base + 16#6800#;
SSCR_Base : constant := LTDC_Base + 16#008#;
Layer1_Base : constant := LTDC_Base + 16#084#;
Layer2_Base : constant := LTDC_Base + 16#104#;
LTDC : LTDCR with Volatile, Address => System'To_Address (SSCR_Base);
Layer1_Reg : aliased Layer
with Volatile, Address => System'To_Address (Layer1_Base);
Layer2_Reg : aliased Layer
with Volatile, Address => System'To_Address (Layer2_Base);
type Layer_Access is access all Layer;
type Nb_Frame_Buffers is mod 2;
Current_Frame_Buffer_Index : Nb_Frame_Buffers := 0;
Frame_Buffer_Array : array (LCD_Layer, Nb_Frame_Buffers) of aliased Frame_Buffer
with Volatile, Address => System'To_Address (16#D000_0000#);
-- LCD Registers
LCD_SLEEP_OUT : constant := 16#11#; -- Sleep out register
LCD_GAMMA : constant := 16#26#; -- Gamma register
LCD_DISPLAY_OFF : constant := 16#28#; -- Display off register
LCD_DISPLAY_ON : constant := 16#29#; -- Display on register
LCD_COLUMN_ADDR : constant := 16#2A#; -- Colomn address register
LCD_PAGE_ADDR : constant := 16#2B#; -- Page address register
LCD_GRAM : constant := 16#2C#; -- GRAM register
LCD_MAC : constant := 16#36#; -- Memory Access Control register
LCD_PIXEL_FORMAT : constant := 16#3A#; -- Pixel Format register
LCD_WDB : constant := 16#51#; -- Write Brightness Display register
LCD_WCD : constant := 16#53#; -- Write Control Display register
LCD_RGB_INTERFACE : constant := 16#B0#; -- RGB Interface Signal Control
LCD_FRC : constant := 16#B1#; -- Frame Rate Control register
LCD_BPC : constant := 16#B5#; -- Blanking Porch Control register
LCD_DFC : constant := 16#B6#; -- Display Function Control register
LCD_POWER1 : constant := 16#C0#; -- Power Control 1 register
LCD_POWER2 : constant := 16#C1#; -- Power Control 2 register
LCD_VCOM1 : constant := 16#C5#; -- VCOM Control 1 register
LCD_VCOM2 : constant := 16#C7#; -- VCOM Control 2 register
LCD_POWERA : constant := 16#CB#; -- Power control A register
LCD_POWERB : constant := 16#CF#; -- Power control B register
LCD_PGAMMA : constant := 16#E0#; -- Positive Gamma Correction register
LCD_NGAMMA : constant := 16#E1#; -- Negative Gamma Correction register
LCD_DTCA : constant := 16#E8#; -- Driver timing control A
LCD_DTCB : constant := 16#EA#; -- Driver timing control B
LCD_POWER_SEQ : constant := 16#ED#; -- Power on sequence register
LCD_3GAMMA_EN : constant := 16#F2#; -- 3 Gamma enable register
LCD_INTERFACE : constant := 16#F6#; -- Interface control register
LCD_PRC : constant := 16#F7#; -- Pump ratio control register
end STM32F4.LCD;
|
engine/battle/wild_encounters.asm | longlostsoul/EvoYellow | 16 | 95792 | ; try to initiate a wild pokemon encounter
; returns success in Z
TryDoWildEncounter:
ld a, [wNPCMovementScriptPointerTableNum]
and a
ret nz
ld a, [wd736]
and a
ret nz
callab IsPlayerStandingOnDoorTileOrWarpTile
jr nc, .notStandingOnDoorOrWarpTile
.CantEncounter
ld a, $1
and a
ret
.notStandingOnDoorOrWarpTile
callab IsPlayerJustOutsideMap
jr z, .CantEncounter
ld a, [wRepelRemainingSteps]
and a
jr z, .next
dec a
jr z, .lastRepelStep
ld [wRepelRemainingSteps], a
.next
; determine if wild pokemon can appear in the half-block we're standing in
; is the bottom left tile (8,9) of the half-block we're standing in a grass/water tile?
; note that by using the bottom left tile, this prevents the "left-shore" tiles from generating grass encounters
coord hl, 8, 9
ld c, [hl]
ld a, [wGrassTile]
cp c
ld a, [wGrassRate]
jr z, .CanEncounter
ld a, $14 ; in all tilesets with a water tile, this is its id
cp c
ld a, [wWaterRate]
jr z, .CanEncounter
; even if not in grass/water, standing anywhere we can encounter pokemon
; so long as the map is "indoor" and has wild pokemon defined.
; ...as long as it's not Viridian Forest or Safari Zone.
ld a, [wCurMap]
cp REDS_HOUSE_1F ; is this an indoor map?
jr c, .CantEncounter2
ld a, [wCurMapTileset]
cp FOREST ; Viridian Forest/Safari Zone
jr z, .CantEncounter2
ld a, [wGrassRate]
.CanEncounter
; compare encounter chance with a random number to determine if there will be an encounter
ld b, a
ld a, [hRandomAdd]
cp b
jr nc, .CantEncounter2
ld a, [hRandomSub]
ld b, a
ld hl, WildMonEncounterSlotChances
.determineEncounterSlot
ld a, [hli]
cp b
jr nc, .gotEncounterSlot
inc hl
jr .determineEncounterSlot
.gotEncounterSlot
; determine which wild pokemon (grass or water) can appear in the half-block we're standing in
ld c, [hl]
ld hl, wGrassMons
aCoord 8, 9
cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile?
jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default
ld hl, wWaterMons
.gotWildEncounterType
ld a, 10
ld [wTemp],a;an override for bank_3dbattle attempt. no particular reason for = 10.
ld b, 0
add hl, bc
ld a, [hli]
ld [wCurEnemyLVL], a ;over-ride in alt mode
jp .Mew
.getwildmon
ld [wcf91], a
ld [wEnemyMonSpecies2], a
ld a, [wRepelRemainingSteps]
and a
;jr z, .willEncounter
;ld a, [wPartyMon1Level]
;ld b, a
;ld a, [wCurEnemyLVL]
;cp b
jr nz, .CantEncounter2 ;jr c, repel prevents encounters if the leading party mon's level is higher than the wild mon, change to always work.
jr .willEncounter
.lastRepelStep
ld [wRepelRemainingSteps], a
ld a, TEXT_REPEL_WORE_OFF
ld [hSpriteIndexOrTextID], a
call EnableAutoTextBoxDrawing
call DisplayTextID
jp .CantEncounter2
.Mew
ld a,[hl]
ld [wFlag],a
callab MewRoam
ld a,[wPokeBallCaptureCalcTemp]
cp 0
jr z, .noRoam
jp .Roam
.noRoam
ld a,[wFlag]
.Roam
jp .getwildmon
.CantEncounter2
ld a, 0
ld [wTemp],a
ld a, $1
and a
ret
.willEncounter
xor a
ret
WildMonEncounterSlotChances:
; There are 10 slots for wild pokemon, and this is the table that defines how common each of
; those 10 slots is. A random number is generated and then the first byte of each pair in this
; table is compared against that random number. If the random number is less than or equal
; to the first byte, then that slot is chosen. The second byte is double the slot number.
db $32, $00 ; 51/256 = 19.9% chance of slot 0
db $65, $02 ; 51/256 = 19.9% chance of slot 1
db $8C, $04 ; 39/256 = 15.2% chance of slot 2
db $A5, $06 ; 25/256 = 9.8% chance of slot 3
db $BE, $08 ; 25/256 = 9.8% chance of slot 4
db $D7, $0A ; 25/256 = 9.8% chance of slot 5
db $E4, $0C ; 13/256 = 5.1% chance of slot 6
db $F1, $0E ; 13/256 = 5.1% chance of slot 7
db $FC, $10 ; 11/256 = 4.3% chance of slot 8
db $FF, $12 ; 3/256 = 1.2% chance of slot 9
|
tests/data_simple/22.asm | NullMember/customasm | 414 | 3582 | <reponame>NullMember/customasm
#d8 256`8 ; = 0x00 |
Source/SNLoader/ReadSector.asm | pgrabas/Supernova | 0 | 174205 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Reads a sector using BIOS Int 13h fn 2 ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Input: DX:AX = LBA ;;
;; CX = sector count ;;
;; ES:BX -> buffer address ;;
;; Output: CF = 1 if error ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;/
ReadSector:
pusha
xor dx, dx
ReadSectorNext:
mov di, 5 ; attempts to read
ReadSectorRetry:
pusha
div word [sectors_per_track]
; ax = LBA / SPT
; dx = LBA % SPT = sector - 1
mov cx, dx
inc cx
; cx = sector no.
xor dx, dx
div word [number_of_heads]
; ax = (LBA / SPT) / HPC = cylinder
; dx = (LBA / SPT) % HPC = head
mov ch, al
; ch = LSB 0...7 of cylinder no.
shl ah, 6
or cl, ah
; cl = MSB 8...9 of cylinder no. + sector no.
mov dh, dl
; dh = head no.
mov dl, [Drive_Number]
; dl = drive no.
mov ax, 201h
; al = sector count
; ah = 2 = read function no.
int 13h ; read sectors
jnc ReadSectorDone ; CF = 0 if no error
xor ah, ah ; ah = 0 = reset function
int 13h ; reset drive
popa
dec di
jnz ReadSectorRetry ; extra attempt
jmp boot_fail
ReadSectorDone:
popa
dec cx
jz ReadSectorDone2 ; last sector
add bx, [bytes_per_sector] ; adjust offset for next sector
jnc RS_SkipAddSeg
mov bx, es
add bx, 0x1000
mov es, bx
xor bx, bx
RS_SkipAddSeg:
add ax, 1
adc dx, 0 ; adjust LBA for next sector
jmp short ReadSectorNext
ReadSectorDone2:
popa
ret
|
programs/oeis/020/A020517.asm | neoneye/loda | 22 | 243264 | <filename>programs/oeis/020/A020517.asm
; A020517: 9th cyclotomic polynomial evaluated at powers of 2.
; 3,73,4161,262657,16781313,1073774593,68719738881,4398048608257,281474993487873,18014398643699713,1152921505680588801,73786976303428141057,4722366482938364690433,302231454904207049490433,19342813113838464841809921,1237940039285415459271213057,79228162514264619068520660993,5070602400912919857786626506753,324518553658426744797554530058241,20769187434139310658237173392736257
mov $1,8
pow $1,$0
add $1,1
bin $1,2
sub $1,1
mul $1,2
add $1,3
mov $0,$1
|
src/ada/src/services/spark/lmcp_message_conversions.adb | VVCAS-Sean/OpenUxAS | 88 | 18190 | <filename>src/ada/src/services/spark/lmcp_message_conversions.adb
with AFRL.CMASI.AutomationResponse; use AFRL.CMASI.AutomationResponse;
with AFRL.CMASI.Enumerations;
with AFRL.CMASI.MissionCommand; use AFRL.CMASI.MissionCommand;
with AFRL.CMASI.ServiceStatus; use AFRL.CMASI.ServiceStatus;
with AFRL.CMASI.VehicleActionCommand; use AFRL.CMASI.VehicleActionCommand;
with AFRL.Impact.ImpactAutomationResponse; use AFRL.Impact.ImpactAutomationResponse;
with AVTAS.LMCP.Types;
with Common;
with UxAS.Messages.lmcptask.PlanningState; use UxAS.Messages.lmcptask.PlanningState;
with UxAS.Messages.lmcptask.TaskAssignment; use UxAS.Messages.lmcptask.TaskAssignment;
with UxAS.Messages.lmcptask.TaskAssignmentSummary; use UxAS.Messages.lmcptask.TaskAssignmentSummary;
with UxAS.Messages.lmcptask.TaskAutomationResponse; use UxAS.Messages.lmcptask.TaskAutomationResponse;
with UxAS.Messages.lmcptask.TaskOptionCost; use UxAS.Messages.lmcptask.TaskOptionCost;
with UxAS.Messages.Route.RouteResponse; use UxAS.Messages.Route.RouteResponse;
package body LMCP_Message_Conversions is
-----------------------
-- Local subprograms --
-----------------------
function As_AssignmentCostMatrix_Acc
(Msg : LMCP_Messages.AssignmentCostMatrix'Class)
return AssignmentCostMatrix_Acc;
function As_AutomationResponse_Acc
(Msg : LMCP_Messages.AutomationResponse'Class)
return AutomationResponse_Acc;
function As_ImpactAutomationResponse_Acc
(Msg : LMCP_Messages.ImpactAutomationResponse'Class)
return ImpactAutomationResponse_Acc;
function As_KeyValuePair_Acc
(Msg : LMCP_Messages.KeyValuePair)
return KeyValuePair_Acc;
function As_Location3D_Any
(Msg : LMCP_Messages.Location3D)
return Location3D_Any;
function As_MissionCommand_Acc
(Msg : LMCP_Messages.MissionCommand)
return MissionCommand_Acc;
function As_MissionCommand_Message
(Msg : MissionCommand_Acc)
return LMCP_Messages.MissionCommand;
function As_RouteConstraints_Acc
(Msg : LMCP_Messages.RouteConstraints)
return RouteConstraints_Acc;
function As_RoutePlanRequest_Acc
(Msg : LMCP_Messages.RoutePlanRequest'Class)
return RoutePlanRequest_Acc;
function As_RoutePlanResponse_Acc
(Msg : LMCP_Messages.RoutePlanResponse'Class)
return RoutePlanResponse_Acc;
function As_RouteRequest_Acc
(Msg : LMCP_Messages.RouteRequest'Class)
return RouteRequest_Acc;
function As_RouteResponse_Acc
(Msg : LMCP_Messages.RouteResponse'Class)
return RouteResponse_Acc;
function As_ServiceStatus_Acc
(Msg : LMCP_Messages.ServiceStatus'Class)
return ServiceStatus_Acc;
function As_TaskAssignmentSummary_Acc
(Msg : LMCP_Messages.TaskAssignmentSummary'Class)
return TaskAssignmentSummary_Acc;
function As_TaskAssignment_Acc
(Msg : LMCP_Messages.TaskAssignment)
return TaskAssignment_Acc;
function As_TaskAutomationResponse_Acc
(Msg : LMCP_Messages.TaskAutomationResponse'Class)
return TaskAutomationResponse_Acc;
function As_TaskOptionCost_Acc
(Msg : LMCP_Messages.TaskOptionCost)
return TaskOptionCost_Acc;
function As_TaskOptionCost_Message
(Arg : not null TaskOptionCost_Acc)
return LMCP_Messages.TaskOptionCost;
function As_UniqueAutomationRequest_Acc
(Msg : LMCP_Messages.UniqueAutomationRequest'Class)
return UniqueAutomationRequest_Acc;
function As_VehicleActionCommand_Any
(Msg : LMCP_Messages.VehicleActionCommand)
return VehicleActionCommand_Any;
function As_VehicleActionCommand_Message
(Msg : VehicleActionCommand_Any)
return LMCP_Messages.VehicleActionCommand;
function As_VehicleAction_Acc
(Msg : LMCP_Messages.VehicleAction)
return VehicleAction_Acc;
function As_Waypoint_Acc
(Msg : LMCP_Messages.Waypoint)
return Waypoint_Acc;
---------------------------------
-- As_AssignmentCostMatrix_Acc --
---------------------------------
function As_AssignmentCostMatrix_Acc
(Msg : LMCP_Messages.AssignmentCostMatrix'Class)
return AssignmentCostMatrix_Acc
is
Result : constant AssignmentCostMatrix_Acc := new AssignmentCostMatrix;
use AVTAS.LMCP.Types;
begin
Result.all.setCorrespondingAutomationRequestID (Int64 (Msg.CorrespondingAutomationRequestID));
for TaskId of Msg.TaskList loop
Result.getTaskList.Append (Int64 (TaskId));
end loop;
Result.all.setOperatingRegion (Int64 (Msg.OperatingRegion));
for TOC of Msg.CostMatrix loop
Result.getCostMatrix.Append (As_TaskOptionCost_Acc (TOC));
end loop;
return Result;
end As_AssignmentCostMatrix_Acc;
-------------------------------------
-- As_AssignmentCostMatrix_Message --
-------------------------------------
function As_AssignmentCostMatrix_Message
(Msg : not null AssignmentCostMatrix_Any)
return LMCP_Messages.AssignmentCostMatrix
is
use all type Common.Int64_Seq;
use all type LMCP_Messages.TOC_Seq;
Result : LMCP_Messages.AssignmentCostMatrix;
begin
Result.CorrespondingAutomationRequestID := Common.Int64 (Msg.all.getCorrespondingAutomationRequestID);
Result.OperatingRegion := Common.Int64 (Msg.all.getOperatingRegion);
for TaskId of Msg.all.getTaskList.all loop
Result.TaskList := Add (Result.TaskList, Common.Int64 (TaskId));
end loop;
for TaskOptionCost of Msg.all.getCostMatrix.all loop
Result.CostMatrix := Add (Result.CostMatrix, As_TaskOptionCost_Message (TaskOptionCost));
end loop;
return Result;
end As_AssignmentCostMatrix_Message;
----------------------------------
-- As_AutomationRequest_Message --
----------------------------------
function As_AutomationRequest_Message
(Msg : not null AutomationRequest_Any)
return LMCP_Messages.AutomationRequest
is
Result : LMCP_Messages.AutomationRequest;
use Common;
begin
for EntityId of Msg.all.getEntityList.all loop
Result.EntityList := Add (Result.EntityList, Int64 (EntityId));
end loop;
Result.OperatingRegion := Int64 (Msg.all.getOperatingRegion);
for TaskId of Msg.all.getTaskList.all loop
Result.TaskList := Add (Result.TaskList, Int64 (TaskId));
end loop;
Result.TaskRelationships := Msg.all.getTaskRelationships;
Result.RedoAllTasks := Msg.all.getRedoAllTasks;
return Result;
end As_AutomationRequest_Message;
-------------------------------
-- As_AutomationResponse_Acc --
-------------------------------
function As_AutomationResponse_Acc
(Msg : LMCP_Messages.AutomationResponse'Class)
return AutomationResponse_Acc
is
Result : constant AutomationResponse_Acc := new AutomationResponse;
begin
for MissionCommand of Msg.MissionCommandList loop
Result.getMissionCommandList.Append (As_MissionCommand_Acc (MissionCommand));
end loop;
for VehicleActionCommand of Msg.VehicleCommandList loop
Result.getVehicleCommandList.Append (As_VehicleActionCommand_Any (VehicleActionCommand));
end loop;
for KVP of Msg.Info loop
Result.getInfo.Append (As_KeyValuePair_Acc (KVP));
end loop;
return Result;
end As_AutomationResponse_Acc;
----------------------------
-- As_EntityState_Message --
----------------------------
function As_EntityState_Message
(Msg : not null EntityState_Any)
return LMCP_Messages.EntityState
is
Result : LMCP_Messages.EntityState;
use Common;
begin
Result.Id := Int64 (Msg.getID);
Result.Location := As_Location3D_Message (Msg.getLocation);
Result.Heading := Real32 (Msg.getHeading);
return Result;
end As_EntityState_Message;
----------------------------------------
-- As_ImpactAutomationRequest_Message --
----------------------------------------
function As_ImpactAutomationRequest_Message
(Msg : not null ImpactAutomationRequest_Any)
return LMCP_Messages.ImpactAutomationRequest
is
Result : LMCP_Messages.ImpactAutomationRequest;
use Common;
begin
Result.RequestID := Int64 (Msg.all.getRequestID);
for EntityId of Msg.all.getTrialRequest.getEntityList.all loop
Result.EntityList := Add (Result.EntityList, Int64 (EntityId));
end loop;
Result.OperatingRegion := Int64 (Msg.all.getTrialRequest.getOperatingRegion);
for TaskId of Msg.all.getTrialRequest.getTaskList.all loop
Result.TaskList := Add (Result.TaskList, Int64 (TaskId));
end loop;
Result.TaskRelationships := Msg.all.getTrialRequest.getTaskRelationships;
Result.PlayID := Int64 (Msg.all.getPlayID);
Result.SolutionID := Int64 (Msg.all.getSolutionID);
Result.RedoAllTasks := Msg.all.getTrialRequest.getRedoAllTasks;
return Result;
end As_ImpactAutomationRequest_Message;
-------------------------------------
-- As_ImpactAutomationResponse_Acc --
-------------------------------------
function As_ImpactAutomationResponse_Acc
(Msg : LMCP_Messages.ImpactAutomationResponse'Class)
return ImpactAutomationResponse_Acc
is
Result : constant ImpactAutomationResponse_Acc := new ImpactAutomationResponse;
use AVTAS.LMCP.Types;
begin
Result.setResponseID (Int64 (Msg.ResponseID));
for MissionCommand of Msg.MissionCommandList loop
Result.getTrialResponse.getMissionCommandList.Append (As_MissionCommand_Acc (MissionCommand));
end loop;
for VehicleActionCommand of Msg.VehicleCommandList loop
Result.getTrialResponse.getVehicleCommandList.Append (As_VehicleActionCommand_Any (VehicleActionCommand));
end loop;
for KVP of Msg.Info loop
Result.getTrialResponse.getInfo.Append (As_KeyValuePair_Acc (KVP));
end loop;
Result.setPlayID (Int64 (Msg.PlayId));
Result.setSolutionID (Int64 (Msg.SolutionId));
Result.setSandbox (Msg.Sandbox);
return Result;
end As_ImpactAutomationResponse_Acc;
-------------------------
-- As_KeyValuePair_Acc --
-------------------------
function As_KeyValuePair_Acc
(Msg : LMCP_Messages.KeyValuePair)
return KeyValuePair_Acc
is
Result : constant KeyValuePair_Acc := new KeyValuePair;
begin
Result.setKey (Msg.Key);
Result.setValue (Msg.Value);
return Result;
end As_KeyValuePair_Acc;
-----------------------------
-- As_KeyValuePair_Message --
-----------------------------
function As_KeyValuePair_Message
(Msg : not null KeyValuePair_Acc)
return LMCP_Messages.KeyValuePair
is
Result : LMCP_Messages.KeyValuePair;
begin
Result.Key := Msg.getKey;
Result.Value := Msg.getValue;
return Result;
end As_KeyValuePair_Message;
-----------------------
-- As_Location3D_Any --
-----------------------
function As_Location3D_Any
(Msg : LMCP_Messages.Location3D)
return Location3D_Any
is
Result : constant Location3D_Acc := new Location3D;
begin
Result.setLatitude (AVTAS.LMCP.Types.Real64 (Msg.Latitude));
Result.setLongitude (AVTAS.LMCP.Types.Real64 (Msg.Longitude));
Result.setAltitude (AVTAS.LMCP.Types.Real32 (Msg.Altitude));
case Msg.AltitudeType is
when LMCP_Messages.AGL => Result.setAltitudeType (AFRL.CMASI.Enumerations.AGL);
when LMCP_Messages.MSL => Result.setAltitudeType (AFRL.CMASI.Enumerations.MSL);
end case;
return Location3D_Any (Result);
end As_Location3D_Any;
---------------------------
-- As_Location3D_Message --
---------------------------
function As_Location3D_Message
(Msg : not null Location3D_Any)
return LMCP_Messages.Location3D
is
Result : LMCP_Messages.Location3D;
begin
Result.Latitude := Common.Real64 (Msg.getLatitude);
Result.Longitude := Common.Real64 (Msg.getLongitude);
Result.Altitude := Common.Real32 (Msg.getAltitude);
-- For this enumeration type component we could use 'Val and 'Pos to
-- convert the values, but that would not be robust in the face of
-- independent changes to either one of the two enumeration type
-- decls, especially the order. Therefore we do an explicit comparison.
case Msg.getAltitudeType is
when AFRL.CMASI.Enumerations.AGL => Result.AltitudeType := LMCP_Messages.AGL;
when AFRL.CMASI.Enumerations.MSL => Result.AltitudeType := LMCP_Messages.MSL;
end case;
return Result;
end As_Location3D_Message;
---------------------------
-- As_MissionCommand_Acc --
---------------------------
function As_MissionCommand_Acc
(Msg : LMCP_Messages.MissionCommand)
return MissionCommand_Acc
is
Result : constant MissionCommand_Acc := new MissionCommand;
use AVTAS.LMCP.Types;
begin
Result.setCommandID (Int64 (Msg.CommandId));
Result.setVehicleID (Int64 (Msg.VehicleId));
for VehicleAction of Msg.VehicleActionList loop
Result.getVehicleActionList.Append (VehicleAction_Any (As_VehicleAction_Acc (VehicleAction)));
end loop;
case Msg.Status is
when LMCP_Messages.Pending => Result.setStatus (AFRL.CMASI.Enumerations.Pending);
when LMCP_Messages.Approved => Result.setStatus (AFRL.CMASI.Enumerations.Approved);
when LMCP_Messages.InProcess => Result.setStatus (AFRL.CMASI.Enumerations.InProcess);
when LMCP_Messages.Executed => Result.setStatus (AFRL.CMASI.Enumerations.Executed);
when LMCP_Messages.Cancelled => Result.setStatus (AFRL.CMASI.Enumerations.Cancelled);
end case;
for Waypoint of Msg.WaypointList loop
Result.getWaypointList.Append (Waypoint_Any (As_Waypoint_Acc (Waypoint)));
end loop;
Result.setFirstWaypoint (Int64 (Msg.FirstWaypoint));
return Result;
end As_MissionCommand_Acc;
-------------------------------
-- As_MissionCommand_Message --
-------------------------------
function As_MissionCommand_Message
(Msg : MissionCommand_Acc)
return LMCP_Messages.MissionCommand
is
Result : LMCP_Messages.MissionCommand;
use Common;
use all type LMCP_Messages.VA_Seq;
use all type LMCP_Messages.WP_Seq;
begin
Result.CommandId := Int64 (Msg.all.getCommandID);
Result.VehicleId := Int64 (Msg.all.getVehicleID);
for VehicleAction of Msg.all.getVehicleActionList.all loop
Result.VehicleActionList :=
Add (Result.VehicleActionList,
As_VehicleAction_Message (VehicleAction));
end loop;
case Msg.all.getStatus is
when AFRL.CMASI.Enumerations.Pending => Result.Status := LMCP_Messages.Pending;
when AFRL.CMASI.Enumerations.Approved => Result.Status := LMCP_Messages.Approved;
when AFRL.CMASI.Enumerations.InProcess => Result.Status := LMCP_Messages.InProcess;
when AFRL.CMASI.Enumerations.Executed => Result.Status := LMCP_Messages.Executed;
when AFRL.CMASI.Enumerations.Cancelled => Result.Status := LMCP_Messages.Cancelled;
end case;
for Waypoint of Msg.all.getWaypointList.all loop
Result.WaypointList :=
Add (Result.WaypointList,
As_Waypoint_Message (Waypoint));
end loop;
Result.FirstWaypoint := Int64 (Msg.all.getFirstWaypoint);
return Result;
end As_MissionCommand_Message;
-------------------
-- As_Object_Any --
-------------------
function As_Object_Any
(Msg : LMCP_Messages.Message_Root'Class)
return AVTAS.LMCP.Object.Object_Any
is
Result : AVTAS.LMCP.Object.Object_Any;
begin
-- TODO: Consider using the stream 'Write routines (not the 'Output
-- versions) to write the message objects to a byte array, then use
-- Unpack to get the LMCP pointer type from that. We'd need a function
-- mapping Message_Root tags to the LMCP enumeration identifying message
-- types (which handles the necessary ommision of writing the tags)
if Msg in LMCP_Messages.RoutePlanRequest'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_RoutePlanRequest_Acc (LMCP_Messages.RoutePlanRequest'Class (Msg)));
elsif Msg in LMCP_Messages.RoutePlanResponse'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_RoutePlanResponse_Acc (LMCP_Messages.RoutePlanResponse'Class (Msg)));
elsif Msg in LMCP_Messages.RouteRequest'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_RouteRequest_Acc (LMCP_Messages.RouteRequest'Class (Msg)));
elsif Msg in LMCP_Messages.RouteResponse'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_RouteResponse_Acc (LMCP_Messages.RouteResponse'Class (Msg)));
elsif Msg in LMCP_Messages.AssignmentCostMatrix'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_AssignmentCostMatrix_Acc (LMCP_Messages.AssignmentCostMatrix'Class (Msg)));
elsif Msg in LMCP_Messages.TaskAssignmentSummary'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_TaskAssignmentSummary_Acc (LMCP_Messages.TaskAssignmentSummary'Class (Msg)));
elsif Msg in LMCP_Messages.UniqueAutomationRequest'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_UniqueAutomationRequest_Acc (LMCP_Messages.UniqueAutomationRequest'Class (Msg)));
elsif Msg in LMCP_Messages.ServiceStatus'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_ServiceStatus_Acc (LMCP_Messages.ServiceStatus'Class (Msg)));
elsif Msg in LMCP_Messages.ImpactAutomationResponse'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_ImpactAutomationResponse_Acc (LMCP_Messages.ImpactAutomationResponse'Class (Msg)));
elsif Msg in LMCP_Messages.TaskAutomationResponse'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_TaskAutomationResponse_Acc (LMCP_Messages.TaskAutomationResponse'Class (Msg)));
elsif Msg in LMCP_Messages.AutomationResponse'Class then
Result := AVTAS.LMCP.Object.Object_Any (As_AutomationResponse_Acc (LMCP_Messages.AutomationResponse'Class (Msg)));
else
raise Program_Error with "unexpected message kind in Route_Aggregator_Message_Conversions.As_Object_Any";
-- UniqueAutomationRequest is in the class but not sent
end if;
return Result;
end As_Object_Any;
-----------------------------
-- As_RouteConstraints_Acc --
-----------------------------
function As_RouteConstraints_Acc
(Msg : LMCP_Messages.RouteConstraints)
return RouteConstraints_Acc
is
Result : constant RouteConstraints_Acc := new RouteConstraints;
begin
Result.setRouteID (AVTAS.LMCP.Types.Int64 (Msg.RouteID));
Result.setStartLocation (As_Location3D_Any (Msg.StartLocation));
Result.setStartHeading (AVTAS.LMCP.Types.Real32 (Msg.StartHeading));
Result.setUseStartHeading (Msg.UseStartHeading);
Result.setEndLocation (As_Location3D_Any (Msg.EndLocation));
Result.setEndHeading (AVTAS.LMCP.Types.Real32 (Msg.EndHeading));
Result.setUseEndHeading (Msg.UseEndHeading);
return Result;
end As_RouteConstraints_Acc;
---------------------------------
-- As_RouteConstraints_Message --
---------------------------------
function As_RouteConstraints_Message
(Msg : not null RouteConstraints_Any)
return LMCP_Messages.RouteConstraints
is
Result : LMCP_Messages.RouteConstraints;
begin
Result.RouteID := Common.Int64 (Msg.getRouteID);
Result.StartLocation := As_Location3D_Message (Msg.getStartLocation);
Result.StartHeading := Common.Real32 (Msg.getStartHeading);
Result.UseStartHeading := Msg.getUseStartHeading;
Result.EndLocation := As_Location3D_Message (Msg.getEndLocation);
Result.EndHeading := Common.Real32 (Msg.getEndHeading);
Result.UseEndHeading := Msg.getUseEndHeading;
return Result;
end As_RouteConstraints_Message;
------------------------------
-- As_RoutePlanRequest_Acc --
------------------------------
function As_RoutePlanRequest_Acc
(Msg : LMCP_Messages.RoutePlanRequest'Class)
return RoutePlanRequest_Acc
is
Result : constant RoutePlanRequest_Acc := new RoutePlanRequest;
begin
Result.setRequestID (AVTAS.LMCP.Types.Int64 (Msg.RequestID));
Result.setAssociatedTaskID (AVTAS.LMCP.Types.Int64 (Msg.AssociatedTaskID));
Result.setVehicleID (AVTAS.LMCP.Types.Int64 (Msg.VehicleID));
Result.setOperatingRegion (AVTAS.LMCP.Types.Int64 (Msg.OperatingRegion));
Result.setIsCostOnlyRequest (Msg.IsCostOnlyRequest);
for RC : LMCP_Messages.RouteConstraints of Msg.RouteRequests loop
Result.getRouteRequests.Append (As_RouteConstraints_Acc (RC));
end loop;
return Result;
end As_RoutePlanRequest_Acc;
---------------------------------
-- As_RoutePlanRequest_Message --
---------------------------------
function As_RoutePlanRequest_Message
(Msg : not null RoutePlanRequest_Any)
return LMCP_Messages.RoutePlanRequest
is
Result : LMCP_Messages.RoutePlanRequest;
begin
Result.RequestID := Common.Int64 (Msg.getRequestID);
Result.AssociatedTaskID := Common.Int64 (Msg.getAssociatedTaskID);
Result.VehicleID := Common.Int64 (Msg.getVehicleID);
Result.OperatingRegion := Common.Int64 (Msg.getOperatingRegion);
Result.IsCostOnlyRequest := Msg.getIsCostOnlyRequest;
for RC of Msg.getRouteRequests.all loop
Result.RouteRequests := LMCP_Messages.Add (Result.RouteRequests, As_RouteConstraints_Message (RouteConstraints_Any (RC)));
end loop;
return Result;
end As_RoutePlanRequest_Message;
------------------------------
-- As_RoutePlanResponse_Acc --
------------------------------
function As_RoutePlanResponse_Acc
(Msg : LMCP_Messages.RoutePlanResponse'Class)
return RoutePlanResponse_Acc
is
Result : constant RoutePlanResponse_Acc := new RoutePlanResponse;
New_Route_Plan : UxAS.Messages.Route.RoutePlan.RoutePlan_Acc;
begin
Result.setResponseID (AVTAS.LMCP.Types.Int64 (Msg.ResponseID));
Result.setAssociatedTaskID (AVTAS.LMCP.Types.Int64 (Msg.AssociatedTaskID));
Result.setVehicleID (AVTAS.LMCP.Types.Int64 (Msg.VehicleID));
Result.setOperatingRegion (AVTAS.LMCP.Types.Int64 (Msg.OperatingRegion));
for Plan_Msg : LMCP_Messages.RoutePlan of Msg.RouteResponses loop
New_Route_Plan := new UxAS.Messages.Route.RoutePlan.RoutePlan;
New_Route_Plan.setRouteID (AVTAS.LMCP.Types.Int64 (Plan_Msg.RouteID));
New_Route_Plan.setRouteCost (AVTAS.LMCP.Types.Int64 (Plan_Msg.RouteCost));
-- waypoints...
for WP : LMCP_Messages.Waypoint of Plan_Msg.Waypoints loop
New_Route_Plan.getWaypoints.Append (Waypoint_Any (As_Waypoint_Acc (WP)));
end loop;
-- route errors...
for KVP : LMCP_Messages.KeyValuePair of Plan_Msg.RouteError loop
New_Route_Plan.getRouteError.Append (As_KeyValuePair_Acc (KVP));
end loop;
Result.getRouteResponses.Append (New_Route_Plan);
end loop;
return Result;
end As_RoutePlanResponse_Acc;
----------------------------------
-- As_RoutePlanResponse_Message --
----------------------------------
function As_RoutePlanResponse_Message
(Msg : not null RoutePlanResponse_Any)
return LMCP_Messages.RoutePlanResponse
is
Result : LMCP_Messages.RoutePlanResponse;
New_RoutePlan : LMCP_Messages.RoutePlan;
use LMCP_Messages;
use Common;
begin
Result.ResponseID := Int64 (Msg.getResponseID);
Result.AssociatedTaskID := Int64 (Msg.getAssociatedTaskID);
Result.VehicleID := Int64 (Msg.getVehicleID);
Result.OperatingRegion := Int64 (Msg.getOperatingRegion);
for Plan of Msg.getRouteResponses.all loop
New_RoutePlan.RouteID := Int64 (Plan.getRouteID);
New_RoutePlan.RouteCost := Int64 (Plan.getRouteCost);
for WP of Plan.getWaypoints.all loop
New_RoutePlan.Waypoints := Add (New_RoutePlan.Waypoints, As_Waypoint_Message (WP));
end loop;
for Error of Plan.getRouteError.all loop
New_RoutePlan.RouteError := Add (New_RoutePlan.RouteError, As_KeyValuePair_Message (Error));
end loop;
Result.RouteResponses := Add (Result.RouteResponses, New_RoutePlan);
end loop;
return Result;
end As_RoutePlanResponse_Message;
--------------------------
-- As_RoutePlan_Message --
--------------------------
function As_RoutePlan_Message
(Msg : not null RoutePlan_Any)
return LMCP_Messages.RoutePlan
is
Result : LMCP_Messages.RoutePlan;
use LMCP_Messages;
begin
Result.RouteID := Common.Int64 (Msg.getRouteID);
for WP of Msg.getWaypoints.all loop
Result.Waypoints := Add (Result.Waypoints, As_Waypoint_Message (WP));
end loop;
Result.RouteCost := Common.Int64 (Msg.getRouteCost);
for Error of Msg.getRouteError.all loop
Result.RouteError := Add (Result.RouteError, As_KeyValuePair_Message (Error));
end loop;
return Result;
end As_RoutePlan_Message;
-------------------------
-- As_RouteRequest_Acc --
-------------------------
function As_RouteRequest_Acc
(Msg : LMCP_Messages.RouteRequest'Class)
return RouteRequest_Acc
is
Result : constant RouteRequest_Acc := new RouteRequest;
begin
Result.setRequestID (AVTAS.LMCP.Types.Int64 (Msg.RequestID));
Result.setAssociatedTaskID (AVTAS.LMCP.Types.Int64 (Msg.AssociatedTaskID));
for VID of Msg.VehicleID loop
Result.getVehicleID.Append (AVTAS.LMCP.Types.Int64 (VID));
end loop;
Result.setOperatingRegion (AVTAS.LMCP.Types.Int64 (Msg.OperatingRegion));
Result.setIsCostOnlyRequest (Msg.IsCostOnlyRequest);
for RC of Msg.RouteRequests loop
Result.getRouteRequests.Append (As_RouteConstraints_Acc (RC));
end loop;
return Result;
end As_RouteRequest_Acc;
-----------------------------
-- As_RouteRequest_Message --
-----------------------------
function As_RouteRequest_Message
(Msg : not null RouteRequest_Any)
return LMCP_Messages.RouteRequest
is
Result : LMCP_Messages.RouteRequest;
begin
Result.RequestID := Common.Int64 (Msg.getRequestID);
Result.AssociatedTaskID := Common.Int64 (Msg.getAssociatedTaskID);
for VID of Msg.getVehicleID.all loop
Result.VehicleID := Common.Add (Result.VehicleID, Common.Int64 (VID));
end loop;
Result.OperatingRegion := Common.Int64 (Msg.getOperatingRegion);
Result.IsCostOnlyRequest := Msg.getIsCostOnlyRequest;
for RC of Msg.getRouteRequests.all loop
Result.RouteRequests := LMCP_Messages.Add (Result.RouteRequests, As_RouteConstraints_Message (RouteConstraints_Any (RC)));
end loop;
return Result;
end As_RouteRequest_Message;
--------------------------
-- As_RouteResponse_Acc --
--------------------------
function As_RouteResponse_Acc
(Msg : LMCP_Messages.RouteResponse'Class)
return RouteResponse_Acc
is
Result : constant RouteResponse_Acc := new RouteResponse;
begin
Result.setResponseID (AVTAS.LMCP.Types.Int64 (Msg.ResponseID));
for RP : LMCP_Messages.RoutePlanResponse of Msg.Routes loop
Result.getRoutes.Append (As_RoutePlanResponse_Acc (RP));
end loop;
return Result;
end As_RouteResponse_Acc;
--------------------------
-- As_ServiceStatus_Acc --
--------------------------
function As_ServiceStatus_Acc
(Msg : LMCP_Messages.ServiceStatus'Class)
return ServiceStatus_Acc
is
Result : constant ServiceStatus_Acc := new ServiceStatus;
use AVTAS.LMCP.Types;
begin
Result.setPercentComplete (Real32 (Msg.PercentComplete));
for KVP of Msg.Info loop
Result.getInfo.Append (As_KeyValuePair_Acc (KVP));
end loop;
case Msg.StatusType is
when LMCP_Messages.Information => Result.setStatusType (AFRL.CMASI.Enumerations.Information);
when LMCP_Messages.Warning => Result.setStatusType (AFRL.CMASI.Enumerations.Warning);
when LMCP_Messages.Error => Result.setStatusType (AFRL.CMASI.Enumerations.Error);
end case;
return Result;
end As_ServiceStatus_Acc;
----------------------------------
-- As_TaskAssignmentSummary_Acc --
----------------------------------
function As_TaskAssignmentSummary_Acc
(Msg : LMCP_Messages.TaskAssignmentSummary'Class)
return TaskAssignmentSummary_Acc
is
Result : constant TaskAssignmentSummary_Acc := new TaskAssignmentSummary;
use AVTAS.LMCP.Types;
begin
Result.setCorrespondingAutomationRequestID (Int64 (Msg.CorrespondingAutomationRequestID));
Result.setOperatingRegion (Int64 (Msg.OperatingRegion));
for TaskAssignment of Msg.TaskList loop
Result.getTaskList.Append (As_TaskAssignment_Acc (TaskAssignment));
end loop;
return Result;
end As_TaskAssignmentSummary_Acc;
---------------------------
-- As_TaskAssignment_Acc --
---------------------------
function As_TaskAssignment_Acc
(Msg : LMCP_Messages.TaskAssignment)
return TaskAssignment_Acc
is
Result : constant TaskAssignment_Acc := new TaskAssignment;
use AVTAS.LMCP.Types;
begin
Result.setTaskID (Int64 (Msg.TaskID));
Result.setOptionID (Int64 (Msg.OptionID));
Result.setAssignedVehicle (Int64 (Msg.AssignedVehicle));
Result.setTimeThreshold (Int64 (Msg.TimeThreshold));
Result.setTimeTaskCompleted (Int64 (Msg.TimeTaskCompleted));
return Result;
end As_TaskAssignment_Acc;
--------------------------------------
-- As_TaskAutomationRequest_Message --
--------------------------------------
function As_TaskAutomationRequest_Message
(Msg : not null TaskAutomationRequest_Any)
return LMCP_Messages.TaskAutomationRequest
is
Result : LMCP_Messages.TaskAutomationRequest;
use Common;
use all type LMCP_Messages.PlanningState_Seq;
begin
Result.RequestID := Int64 (Msg.all.getRequestID);
for EntityId of Msg.all.getOriginalRequest.getEntityList.all loop
Result.EntityList := Add (Result.EntityList, Int64 (EntityId));
end loop;
Result.OperatingRegion := Int64 (Msg.all.getOriginalRequest.getOperatingRegion);
for MsgPlanningState of Msg.all.getPlanningStates.all loop
declare
PlanningState : LMCP_Messages.PlanningState;
begin
PlanningState.EntityID := Int64 (MsgPlanningState.all.getEntityID);
PlanningState.PlanningPosition := As_Location3D_Message (MsgPlanningState.all.getPlanningPosition);
PlanningState.PlanningHeading := Real32 (MsgPlanningState.all.getPlanningHeading);
Result.PlanningStates := Add (Result.PlanningStates, PlanningState);
end;
end loop;
for TaskId of Msg.all.getOriginalRequest.getTaskList.all loop
Result.TaskList := Add (Result.TaskList, Int64 (TaskId));
end loop;
Result.TaskRelationships := Msg.all.getOriginalRequest.getTaskRelationships;
Result.RedoAllTasks := Msg.all.getOriginalRequest.getRedoAllTasks;
return Result;
end As_TaskAutomationRequest_Message;
-----------------------------------
-- As_TaskAutomationResponse_Acc --
-----------------------------------
function As_TaskAutomationResponse_Acc
(Msg : LMCP_Messages.TaskAutomationResponse'Class)
return TaskAutomationResponse_Acc
is
Result : constant TaskAutomationResponse_Acc := new TaskAutomationResponse;
use AVTAS.LMCP.Types;
begin
Result.setResponseID (Int64 (Msg.ResponseID));
for MissionCommand of Msg.MissionCommandList loop
Result.getOriginalResponse.getMissionCommandList.Append (As_MissionCommand_Acc (MissionCommand));
end loop;
for VehicleActionCommand of Msg.VehicleCommandList loop
Result.getOriginalResponse.getVehicleCommandList.Append (As_VehicleActionCommand_Any (VehicleActionCommand));
end loop;
for KVP of Msg.Info loop
Result.getOriginalResponse.getInfo.Append (As_KeyValuePair_Acc (KVP));
end loop;
for Msg_FState of Msg.FinalStates loop
declare
FinalState : constant PlanningState_Acc := new PlanningState;
begin
FinalState.setEntityID (Int64 (Msg_FState.EntityID));
FinalState.setPlanningPosition (As_Location3D_Any (Msg_FState.PlanningPosition));
FinalState.setPlanningHeading (Real32 (Msg_FState.PlanningHeading));
Result.getFinalStates.Append (FinalState);
end;
end loop;
return Result;
end As_TaskAutomationResponse_Acc;
---------------------------
-- As_TaskOptionCost_Acc --
---------------------------
function As_TaskOptionCost_Acc
(Msg : LMCP_Messages.TaskOptionCost)
return TaskOptionCost_Acc
is
Result : constant TaskOptionCost_Acc := new TaskOptionCost;
use AVTAS.LMCP.Types;
begin
Result.all.setVehicleID (Int64 (Msg.VehicleID));
Result.all.setIntialTaskID (Int64 (Msg.InitialTaskID));
Result.all.setIntialTaskOption (Int64 (Msg.InitialTaskOption));
Result.all.setDestinationTaskID (Int64 (Msg.DestinationTaskID));
Result.all.setDestinationTaskOption (Int64 (Msg.DestinationTaskOption));
Result.all.setTimeToGo (Int64 (Msg.TimeToGo));
return Result;
end As_TaskOptionCost_Acc;
-------------------------------
-- As_TaskOptionCost_Message --
-------------------------------
function As_TaskOptionCost_Message
(Arg : not null TaskOptionCost_Acc)
return LMCP_Messages.TaskOptionCost
is
Result : LMCP_Messages.TaskOptionCost;
begin
Result.VehicleID := Common.Int64 (Arg.getVehicleID);
Result.InitialTaskID := Common.Int64 (Arg.getIntialTaskID);
Result.InitialTaskOption := Common.Int64 (Arg.getIntialTaskOption);
Result.DestinationTaskID := Common.Int64 (Arg.getDestinationTaskID);
Result.DestinationTaskOption := Common.Int64 (Arg.getDestinationTaskOption);
Result.TimeToGo := Common.Int64 (Arg.getTimeToGo);
return Result;
end As_TaskOptionCost_Message;
-------------------------------
-- As_TaskPlanOption_Message --
-------------------------------
function As_TaskPlanOption_Message
(Msg : not null TaskPlanOptions_Any)
return LMCP_Messages.TaskPlanOptions
is
Result : LMCP_Messages.TaskPlanOptions;
use Common;
use all type Int64_Seq;
use all type LMCP_Messages.TaskOption_Seq;
begin
Result.CorrespondingAutomationRequestID :=
Int64 (Msg.getCorrespondingAutomationRequestID);
Result.TaskID :=
Int64 (Msg.getTaskID);
Result.Composition := Msg.getComposition;
for MsgOption of Msg.getOptions.all loop
declare
Option : LMCP_Messages.TaskOption;
begin
Option.TaskID := Int64 (MsgOption.all.getTaskID);
Option.OptionID := Int64 (MsgOption.all.getOptionID);
Option.Cost := Int64 (MsgOption.all.getCost);
Option.StartLocation :=
As_Location3D_Message (MsgOption.all.getStartLocation);
Option.StartHeading := Real32 (MsgOption.all.getStartHeading);
Option.EndLocation :=
As_Location3D_Message (MsgOption.all.getEndLocation);
Option.EndHeading := Real32 (MsgOption.all.getEndHeading);
for Entity of MsgOption.all.getEligibleEntities.all loop
Option.EligibleEntities := Add (Option.EligibleEntities, Int64 (Entity));
end loop;
Result.Options := Add (Result.Options, Option);
end;
end loop;
return Result;
end As_TaskPlanOption_Message;
------------------------------------
-- As_UniqueAutomationRequest_Acc --
------------------------------------
function As_UniqueAutomationRequest_Acc
(Msg : LMCP_Messages.UniqueAutomationRequest'Class)
return UniqueAutomationRequest_Acc
is
Result : constant UniqueAutomationRequest_Acc := new UniqueAutomationRequest;
use AVTAS.LMCP.Types;
begin
for Msg_PState of Msg.PlanningStates loop
declare
PState : constant PlanningState_Acc := new PlanningState;
begin
PState.all.setEntityID (Int64 (Msg_PState.EntityID));
PState.all.setPlanningPosition (As_Location3D_Any (Msg_PState.PlanningPosition));
PState.all.setPlanningHeading (Real32 (Msg_PState.PlanningHeading));
Result.all.getPlanningStates.Append (PState);
end;
end loop;
for EntityId of Msg.EntityList loop
Result.getOriginalRequest.getEntityList.Append (Int64 (EntityId));
end loop;
for TaskId of Msg.TaskList loop
Result.getOriginalRequest.getTaskList.Append (Int64 (TaskId));
end loop;
Result.all.setRequestID (Int64 (Msg.RequestID));
Result.all.getOriginalRequest.setTaskRelationships (Msg.TaskRelationships);
Result.all.getOriginalRequest.setOperatingRegion (Int64 (Msg.OperatingRegion));
Result.all.getOriginalRequest.setRedoAllTasks (Msg.RedoAllTasks);
Result.all.setSandBoxRequest (Msg.SandboxRequest);
return Result;
end As_UniqueAutomationRequest_Acc;
----------------------------------------
-- As_UniqueAutomationRequest_Message --
----------------------------------------
function As_UniqueAutomationRequest_Message
(Msg : not null UniqueAutomationRequest_Any)
return LMCP_Messages.UniqueAutomationRequest
is
Result : LMCP_Messages.UniqueAutomationRequest;
use Common;
use all type LMCP_Messages.PlanningState_Seq;
begin
Result.RequestID := Int64 (Msg.all.getRequestID);
for EntityId of Msg.all.getOriginalRequest.getEntityList.all loop
Result.EntityList := Add (Result.EntityList, Int64 (EntityId));
end loop;
Result.OperatingRegion := Int64 (Msg.all.getOriginalRequest.getOperatingRegion);
for MsgPlanningState of Msg.all.getPlanningStates.all loop
declare
PlanningState : LMCP_Messages.PlanningState;
begin
PlanningState.EntityID := Int64 (MsgPlanningState.all.getEntityID);
PlanningState.PlanningPosition := As_Location3D_Message (MsgPlanningState.all.getPlanningPosition);
PlanningState.PlanningHeading := Real32 (MsgPlanningState.all.getPlanningHeading);
Result.PlanningStates := Add (Result.PlanningStates, PlanningState);
end;
end loop;
for TaskId of Msg.all.getOriginalRequest.getTaskList.all loop
Result.TaskList := Add (Result.TaskList, Int64 (TaskId));
end loop;
Result.TaskRelationships := Msg.all.getOriginalRequest.getTaskRelationships;
Result.RedoAllTasks := Msg.all.getOriginalRequest.getRedoAllTasks;
return Result;
end As_UniqueAutomationRequest_Message;
-----------------------------------------
-- As_UniqueAutomationResponse_Message --
-----------------------------------------
function As_UniqueAutomationResponse_Message
(Msg : not null UniqueAutomationResponse_Any)
return LMCP_Messages.UniqueAutomationResponse
is
Result : LMCP_Messages.UniqueAutomationResponse;
use Common;
use all type LMCP_Messages.PlanningState_Seq;
use all type LMCP_Messages.MissionCommand_Seq;
use all type LMCP_Messages.VehicleActionCommand_Seq;
use all type LMCP_Messages.KVP_Seq;
begin
for MissionCommand of Msg.all.getOriginalResponse.getMissionCommandList.all loop
Result.MissionCommandList :=
Add (Result.MissionCommandList,
As_MissionCommand_Message (MissionCommand));
end loop;
for VehicleActionCommand of Msg.all.getOriginalResponse.getVehicleCommandList.all loop
Result.VehicleCommandList :=
Add (Result.VehicleCommandList,
As_VehicleActionCommand_Message (VehicleActionCommand));
end loop;
for KVP of Msg.all.getOriginalResponse.getInfo.all loop
Result.Info := Add (Result.Info, As_KeyValuePair_Message (KVP));
end loop;
Result.ResponseID := Int64 (Msg.all.getResponseID);
for MsgFinalState of Msg.all.getFinalStates.all loop
declare
FinalState : LMCP_Messages.PlanningState;
begin
FinalState.EntityID := Int64 (MsgFinalState.all.getEntityID);
FinalState.PlanningPosition := As_Location3D_Message (MsgFinalState.all.getPlanningPosition);
FinalState.PlanningHeading := Real32 (MsgFinalState.all.getPlanningHeading);
Result.FinalStates := Add (Result.FinalStates, FinalState);
end;
end loop;
return Result;
end As_UniqueAutomationResponse_Message;
---------------------------------
-- As_VehicleActionCommand_Any --
---------------------------------
function As_VehicleActionCommand_Any
(Msg : LMCP_Messages.VehicleActionCommand)
return VehicleActionCommand_Any
is
Result : constant VehicleActionCommand_Any := new VehicleActionCommand;
use AVTAS.LMCP.Types;
begin
Result.setCommandID (Int64 (Msg.CommandId));
Result.setVehicleID (Int64 (Msg.VehicleId));
for VehicleAction of Msg.VehicleActionList loop
Result.getVehicleActionList.Append (VehicleAction_Any (As_VehicleAction_Acc (VehicleAction)));
end loop;
case Msg.Status is
when LMCP_Messages.Pending => Result.setStatus (AFRL.CMASI.Enumerations.Pending);
when LMCP_Messages.Approved => Result.setStatus (AFRL.CMASI.Enumerations.Approved);
when LMCP_Messages.InProcess => Result.setStatus (AFRL.CMASI.Enumerations.InProcess);
when LMCP_Messages.Executed => Result.setStatus (AFRL.CMASI.Enumerations.Executed);
when LMCP_Messages.Cancelled => Result.setStatus (AFRL.CMASI.Enumerations.Cancelled);
end case;
return Result;
end As_VehicleActionCommand_Any;
-------------------------------------
-- As_VehicleActionCommand_Message --
-------------------------------------
function As_VehicleActionCommand_Message
(Msg : VehicleActionCommand_Any)
return LMCP_Messages.VehicleActionCommand
is
Result : LMCP_Messages.VehicleActionCommand;
use Common;
use all type LMCP_Messages.VA_Seq;
begin
Result.CommandId := Int64 (Msg.all.getCommandID);
Result.VehicleId := Int64 (Msg.all.getVehicleID);
for VehicleAction of Msg.all.getVehicleActionList.all loop
Result.VehicleActionList :=
Add (Result.VehicleActionList,
As_VehicleAction_Message (VehicleAction));
end loop;
case Msg.all.getStatus is
when AFRL.CMASI.Enumerations.Pending => Result.Status := LMCP_Messages.Pending;
when AFRL.CMASI.Enumerations.Approved => Result.Status := LMCP_Messages.Approved;
when AFRL.CMASI.Enumerations.InProcess => Result.Status := LMCP_Messages.InProcess;
when AFRL.CMASI.Enumerations.Executed => Result.Status := LMCP_Messages.Executed;
when AFRL.CMASI.Enumerations.Cancelled => Result.Status := LMCP_Messages.Cancelled;
end case;
return Result;
end As_VehicleActionCommand_Message;
--------------------------
-- As_VehicleAction_Acc --
--------------------------
function As_VehicleAction_Acc
(Msg : LMCP_Messages.VehicleAction)
return VehicleAction_Acc
is
Result : constant VehicleAction_Acc := new VehicleAction;
begin
for Id : Common.Int64 of Msg.AssociatedTaskList loop
Result.getAssociatedTaskList.Append (AVTAS.LMCP.Types.Int64 (Id));
end loop;
return Result;
end As_VehicleAction_Acc;
------------------------------
-- As_VehicleAction_Message --
------------------------------
function As_VehicleAction_Message
(Msg : not null VehicleAction_Any)
return LMCP_Messages.VehicleAction
is
Result : LMCP_Messages.VehicleAction;
use Common;
begin
for VA of Msg.getAssociatedTaskList.all loop
Result.AssociatedTaskList := Add (Result.AssociatedTaskList, Common.Int64 (VA));
end loop;
return Result;
end As_VehicleAction_Message;
---------------------
-- As_Waypoint_Acc --
---------------------
function As_Waypoint_Acc
(Msg : LMCP_Messages.Waypoint)
return Waypoint_Acc
is
Result : constant Waypoint_Acc := new AFRL.CMASI.Waypoint.Waypoint;
begin
-- the Location3D components
Result.setLatitude (AVTAS.LMCP.Types.Real64 (Msg.Latitude));
Result.setLongitude (AVTAS.LMCP.Types.Real64 (Msg.Longitude));
Result.setAltitude (AVTAS.LMCP.Types.Real32 (Msg.Altitude));
case Msg.AltitudeType is
when LMCP_Messages.AGL => Result.setAltitudeType (AFRL.CMASI.Enumerations.AGL);
when LMCP_Messages.MSL => Result.setAltitudeType (AFRL.CMASI.Enumerations.MSL);
end case;
-- the waypoint extensions
Result.setNumber (AVTAS.LMCP.Types.Int64 (Msg.Number));
Result.setNextWaypoint (AVTAS.LMCP.Types.Int64 (Msg.NextWaypoint));
Result.setSpeed (AVTAS.LMCP.Types.Real32 (Msg.Speed));
case Msg.SpeedType is
when LMCP_Messages.Airspeed => Result.setSpeedType (AFRL.CMASI.Enumerations.Airspeed);
when LMCP_Messages.Groundspeed => Result.setSpeedType (AFRL.CMASI.Enumerations.Groundspeed);
end case;
Result.setClimbRate (AVTAS.LMCP.Types.Real32 (Msg.ClimbRate));
case Msg.TurnType is
when LMCP_Messages.TurnShort => Result.setTurnType (AFRL.CMASI.Enumerations.TurnShort);
when LMCP_Messages.FlyOver => Result.setTurnType (AFRL.CMASI.Enumerations.FlyOver);
end case;
for VA of Msg.VehicleActionList loop
Result.getVehicleActionList.Append (VehicleAction_Any (As_VehicleAction_Acc (VA)));
end loop;
Result.setContingencyWaypointA (AVTAS.LMCP.Types.Int64 (Msg.ContingencyWaypointA));
Result.setContingencyWaypointB (AVTAS.LMCP.Types.Int64 (Msg.ContingencyWaypointB));
for Id of Msg.AssociatedTasks loop
Result.getAssociatedTasks.Append (AVTAS.LMCP.Types.Int64 (Id));
end loop;
return Result;
end As_Waypoint_Acc;
-------------------------
-- As_Waypoint_Message --
-------------------------
function As_Waypoint_Message
(Msg : not null Waypoint_Any)
return LMCP_Messages.Waypoint
is
Result : LMCP_Messages.Waypoint;
begin
-- the Location3D components
LMCP_Messages.Location3D (Result) := As_Location3D_Message (Location3D_Any (Msg));
-- the Waypoint extension components
Result.Number := Common.Int64 (Msg.getNumber);
Result.NextWaypoint := Common.Int64 (Msg.getNextWaypoint);
Result.Speed := Common.Real32 (Msg.getSpeed);
case Msg.getSpeedType is
when AFRL.CMASI.Enumerations.Airspeed => Result.SpeedType := LMCP_Messages.Airspeed;
when AFRL.CMASI.Enumerations.Groundspeed => Result.SpeedType := LMCP_Messages.Groundspeed;
end case;
Result.ClimbRate := Common.Real32 (Msg.getClimbRate);
case Msg.getTurnType is
when AFRL.CMASI.Enumerations.TurnShort => Result.TurnType := LMCP_Messages.TurnShort;
when AFRL.CMASI.Enumerations.FlyOver => Result.TurnType := LMCP_Messages.FlyOver;
end case;
for VA of Msg.getVehicleActionList.all loop
Result.VehicleActionList := LMCP_Messages.Add (Result.VehicleActionList, As_VehicleAction_Message (VA));
end loop;
Result.ContingencyWaypointA := Common.Int64 (Msg.getContingencyWaypointA);
Result.ContingencyWaypointB := Common.Int64 (Msg.getContingencyWaypointB);
for Id of Msg.getAssociatedTasks.all loop
Result.AssociatedTasks := Common.Add (Result.AssociatedTasks, Common.Int64 (Id));
end loop;
return Result;
end As_Waypoint_Message;
end LMCP_Message_Conversions;
|
PJ Grammar/types.g4 | Diolor/PJ | 0 | 4520 | parser grammar types;
typeParameters
: '<' typeParameter (',' typeParameter)* '>'
;
typeParameter
: Identifier ('extends' typeBound)?
;
typeBound
: type ('&' type)*
;
typeList
: type (',' type)*
;
type
: classOrInterfaceType (lbrackRule rbrackRule)*
| primitiveType (lbrackRule rbrackRule)*
;
classOrInterfaceType
: identifierRule typeArguments? (dotRule identifierRule typeArguments? )*
;
typeArguments
: ltRule typeArgument (commaRule typeArgument)* gtRule
;
typeArgument
: type
| '?' (('extends' | 'super') type)?
;
typeArgumentsOrDiamond
: ltRule gtRule
| typeArguments
;
primitiveType
: 'boolean'
| 'char'
| 'byte'
| 'short'
| 'int'
| 'long'
| 'float'
| 'double'
; |
MIPS-Sim/Examples/mips example 2.asm | sawyermade/architecture | 16 | 105390 | <filename>MIPS-Sim/Examples/mips example 2.asm
.data
value: .word 12
var1: .byte 'A', 'E', 127, -1, '\n'
var2: .half -10, 0xffff
var3: .word 0x12345678:100
var4: .float 12.3, -0.1
vart5: .double 1.5e-10
array: .space 100
str1: .ascii "A String\n"
str2: .asciiz "NULL Terminated String" |
study/argument.asm | caio-vinicius/libasm | 0 | 240653 | <reponame>caio-vinicius/libasm
section .text
global argument
argument:
mov edi, 7
call argument2
add eax, 1
ret
argument2:
mov eax, edi
ret
|
libsrc/target/osca/osca/force_load_callee.asm | ahjelm/z88dk | 640 | 171121 | ;
; Old School Computer Architecture - interfacing FLOS
; <NAME>, 2012
;
; int force_load(int address, int bank);
;
; forces a file to be loaded to a particular address - kjt_find_file MUST be called first!
;
; Input Registers :
;
; HL = Load address.
; B = Bank of load address.
;
; Output Registers : FLOS style error handling
;
;
; $Id: force_load_callee.asm,v 1.4 2016-06-22 22:13:09 dom Exp $
;
INCLUDE "target/osca/def/flos.def"
SECTION code_clib
PUBLIC force_load_callee
PUBLIC _force_load_callee
EXTERN flos_err
PUBLIC asm_force_load
force_load_callee:
_force_load_callee:
pop de
pop bc ; bank
pop hl ; data position
push de
asm_force_load:
ld b,c
call kjt_force_load
jp flos_err
|
slvUI.asm | qynvi/laserturret | 0 | 247460 | NAME SLVUI
$INCLUDE(serial.inc)
$INCLUDE(motor.inc)
$INCLUDE(ace.inc)
CGROUP GROUP CODE
DGROUP GROUP DATA, STACK
CODE SEGMENT PUBLIC 'CODE'
ASSUME CS:CGROUP
ASSUME DS:DGROUP
EXTRN InitMotor:NEAR
EXTRN InitParallel:NEAR
EXTRN InitSerial:NEAR
EXTRN InitSP:NEAR
EXTRN SRspreset:NEAR
EXTRN InitCS:NEAR
EXTRN InitTimer0:NEAR
EXTRN InitTimer1:NEAR
EXTRN InitIllegalEvH:NEAR
EXTRN InitMtrEvH:NEAR
EXTRN InitStepEvH:NEAR
EXTRN InitSrlEvH:NEAR
EXTRN Slave:NEAR
START:
MAIN:
MOV AX, DGROUP ;initialize the stack pointer
MOV SS, AX
MOV SP, OFFSET(DGROUP:TopOfStack)
MOV AX, DGROUP ;initialize the data segment
MOV DS, AX
CALL InitCS ;set up chip selects (does not setup LCS/UCS)
CALL InitParallel
CALL InitIllegalEvH ;hook all event handlers
CALL InitMtrEvH
CALL InitStepEvH
CALL InitSrlEvH
CALL InitTimer0 ;start the timer and the muxing
CALL InitTimer1
CALL InitMotor ;initialize the motors, stepper, and parallel port
CALL InitSP
CALL SRspreset
MOV AX, SERIAL_BR_DFLTDVSR ;set a baud rate
MOV BL, ACE_LCR_PAR_OFF ;no parity
CALL InitSerial ;initialize the serial port
STI
loopforever:
CALL Slave
JMP loopforever
CODE ENDS
DATA SEGMENT PUBLIC 'DATA'
DATA ENDS
STACK SEGMENT STACK 'STACK'
DB 80 DUP ('Stack ') ;240 words
TopOfStack LABEL WORD
STACK ENDS
END START |
examples/boot_04_count.asm | Obijuan/simplez-grammar | 3 | 13720 | ;-------------------------------------------------------------------------------------------
;-- Programa de ejemplo para Bootloader.
;-- Contador de 4 bits por los leds
;--
;-- Este programa se carga mediante el bootloader
;--------------------------------------------------------------------------------------------
;-- Acceso a los perifericos
leds EQU 507
;-- Comienzo del programa:
;-- Direccion h'40: para cargarlo con el bootloader
org h'40
ld /val1 ; Inicializar acumulador
st /leds ; Mostrarlo por los leds
bucle WAIT
add /uno ; Incrementar en uno
st /leds ; Sacarlo por los leds
BR /bucle ; Repetir
;--- Datos
val1 DATA h'1
uno DATA h'1
end
|
benchmark/categories/Language.agda | cruhland/agda | 1,989 | 12873 | <filename>benchmark/categories/Language.agda
------------------------------------------------------------------------
-- A small definition of a dependently typed language, using the
-- technique from McBride's "Outrageous but Meaningful Coincidences"
------------------------------------------------------------------------
-- The code contains an example, a partial definition of categories,
-- which triggers the use of an enormous amount of memory (with the
-- development version of Agda which is current at the time of
-- writing). I'm not entirely sure if the code is correct: 2.5G heap
-- doesn't seem to suffice to typecheck this code. /NAD
module Language where
------------------------------------------------------------------------
-- Prelude
record ⊤ : Set₁ where
record Σ (A : Set₁) (B : A → Set₁) : Set₁ where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σ
uncurry : ∀ {A : Set₁} {B : A → Set₁} {C : Σ A B → Set₁} →
((x : A) (y : B x) → C (x , y)) →
((p : Σ A B) → C p)
uncurry f (x , y) = f x y
record ↑ (A : Set) : Set₁ where
constructor lift
field
lower : A
------------------------------------------------------------------------
-- Contexts
-- The definition of contexts is parametrised by a universe.
module Context (U : Set₁) (El : U → Set₁) where
mutual
-- Contexts.
data Ctxt : Set₁ where
ε : Ctxt
_▻_ : (Γ : Ctxt) → Ty Γ → Ctxt
-- Types.
Ty : Ctxt → Set₁
Ty Γ = Env Γ → U
-- Environments.
Env : Ctxt → Set₁
Env ε = ⊤
Env (Γ ▻ σ) = Σ (Env Γ) λ γ → El (σ γ)
-- Variables (de Bruijn indices).
infix 4 _∋_
data _∋_ : (Γ : Ctxt) → Ty Γ → Set₁ where
zero : ∀ {Γ σ} → Γ ▻ σ ∋ λ γ → σ (proj₁ γ)
suc : ∀ {Γ σ τ} (x : Γ ∋ τ) → Γ ▻ σ ∋ λ γ → τ (proj₁ γ)
-- A lookup function.
lookup : ∀ {Γ σ} → Γ ∋ σ → (γ : Env Γ) → El (σ γ)
lookup zero (γ , v) = v
lookup (suc x) (γ , v) = lookup x γ
------------------------------------------------------------------------
-- A universe
mutual
data U : Set₁ where
set : U
el : Set → U
σ π : (a : U) → (El a → U) → U
El : U → Set₁
El set = Set
El (el A) = ↑ A
El (σ a b) = Σ (El a) λ x → El (b x)
El (π a b) = (x : El a) → El (b x)
open Context U El
-- Abbreviations.
infixr 20 _⊗_
infixr 10 _⇾_
_⇾_ : U → U → U
a ⇾ b = π a λ _ → b
_⊗_ : U → U → U
a ⊗ b = σ a λ _ → b
-- Example.
raw-categoryU : U
raw-categoryU =
σ set λ obj →
σ (el obj ⇾ el obj ⇾ set) λ hom →
(π (el obj) λ x → el (hom x x))
⊗
(π (el obj) λ x → π (el obj) λ y → π (el obj) λ z →
el (hom x y) ⇾ el (hom y z) ⇾ el (hom x z))
------------------------------------------------------------------------
-- A language
mutual
infixl 30 _·_
infix 4 _⊢_
-- Syntax for types.
data Type : (Γ : Ctxt) → Ty Γ → Set₁ where
set : ∀ {Γ} → Type Γ (λ _ → set)
el : ∀ {Γ} (x : Γ ⊢ λ _ → set) → Type Γ (λ γ → el (⟦ x ⟧ γ))
σ : ∀ {Γ a b} → Type Γ a → Type (Γ ▻ a) b →
Type Γ (λ γ → σ (a γ) (λ v → b (γ , v)))
π : ∀ {Γ a b} → Type Γ a → Type (Γ ▻ a) b →
Type Γ (λ γ → π (a γ) (λ v → b (γ , v)))
-- Terms.
data _⊢_ : (Γ : Ctxt) → Ty Γ → Set₁ where
var : ∀ {Γ a} → Γ ∋ a → Γ ⊢ a
ƛ : ∀ {Γ a b} → Γ ▻ a ⊢ uncurry b →
Γ ⊢ (λ γ → π (a γ) (λ v → b γ v))
_·_ : ∀ {Γ a} {b : (γ : Env Γ) → El (a γ) → U} →
Γ ⊢ (λ γ → π (a γ) (λ v → b γ v)) →
(t₂ : Γ ⊢ a) → Γ ⊢ (λ γ → b γ (⟦ t₂ ⟧ γ))
-- The semantics of a term.
⟦_⟧ : ∀ {Γ a} → Γ ⊢ a → (γ : Env Γ) → El (a γ)
⟦ var x ⟧ γ = lookup x γ
⟦ ƛ t ⟧ γ = λ v → ⟦ t ⟧ (γ , v)
⟦ t₁ · t₂ ⟧ γ = (⟦ t₁ ⟧ γ) (⟦ t₂ ⟧ γ)
-- Example.
raw-category : Type ε (λ _ → raw-categoryU)
raw-category =
-- Objects.
σ set
-- Morphisms.
(σ (π (el (var zero)) (π (el (var (suc zero))) set))
-- Identity.
(σ (π (el (var (suc zero)))
(el (var (suc zero) · var zero · var zero)))
-- Composition.
(π (el (var (suc (suc zero)))) -- X.
(π (el (var (suc (suc (suc zero))))) -- Y.
(π (el (var (suc (suc (suc (suc zero)))))) -- Z.
(π (el (var (suc (suc (suc (suc zero)))) ·
var (suc (suc zero)) ·
var (suc zero))) -- Hom X Y.
(π (el (var (suc (suc (suc (suc (suc zero))))) ·
var (suc (suc zero)) ·
var (suc zero))) -- Hom Y Z.
(el (var (suc (suc (suc (suc (suc (suc zero)))))) ·
var (suc (suc (suc (suc zero)))) ·
var (suc (suc zero))))) -- Hom X Z.
))))))
|
programs/oeis/190/A190004.asm | karttu/loda | 0 | 170107 | ; A190004: A190002/2.
; 2,4,7,9,11,14,16,19,21,23,26,28,30,33,35,38,40,42,45,47,50,52,54,57,59,61,64,66,69,71,73,76,78,80,83,85,88,90,92,95,97,100,102,104,107,109,111,114,116,119,121,123,126,128,130,133,135,138,140,142,145,147,150,152,154,157,159,161,164,166,169,171,173,176,178,180,183,185,188,190,192,195,197,200,202,204,207,209,211,214,216,219,221,223,226,228,230,233,235,238,240,242,245,247,250,252,254,257,259,261,264,266,269,271,273,276,278,280,283,285,288,290,292,295,297,300,302,304,307,309,311,314,316,319,321,323,326,328,330,333,335,338,340,342,345,347,350,352,354,357,359,361,364,366,369,371,373,376,378,380,383,385,388,390,392,395,397,400,402,404,407,409,411,414,416,419,421,423,426,428,430,433,435,438,440,442,445,447,450,452,454,457,459,461,464,466,469,471,473,476,478,480,483,485,488,490,492,495,497,500,502,504,507,509,511,514,516,519,521,523,526,528,530,533,535,538,540,542,545,547,550,552,554,557,559,561,564,566,569,571,573,576,578,580,583,585,588,590,592,595
mov $4,$0
add $0,1
mul $0,4
lpb $0,1
add $1,$0
mul $1,2
add $2,1
mod $0,$2
div $1,21
add $1,21
lpe
sub $1,19
mov $3,$4
mul $3,2
add $1,$3
|
Application Support/BBEdit/Scripts/Markdown Syntax.applescript | bhdicaire/bbeditSetup | 0 | 2788 | -- Markdown Syntax
--
-- Displays Markdown Syntax guide
--
-- Installation:
--
-- Copy script to either location:
-- ~/Library/Application Support/BBEdit/Scripts
-- ~/Dropbox/Application Support/BBEdit/Scripts
--
-- To add a shortcut key:
--
-- Window -> Palettes -> Scripts
-- Select Markdown Syntax and click Set Key ...
-- Enter a shortcut key combination (recommend Command + Option + M)
--
-- Credits:
--
-- Markdown Syntax source by <NAME>
-- http://daringfireball.net/projects/markdown/syntax.text
--
-- Author: <NAME> <<EMAIL>>
-- Version: 0.1
--
-- Copyright (c) 2011 <NAME>
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in
-- all copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-- THE SOFTWARE.
on fetchMarkdown()
set markdownUrl to "http://daringfireball.net/projects/markdown/syntax.text"
set cmd to "curl " & markdownUrl
log ("Fetch markdown text => " & markdownUrl)
set markdownText to do shell script cmd
-- Clean up the submenu links to reference Daring Fireball
tell application "BBEdit"
set markdownText to replace "/projects/markdown/" using "http://daringfireball.net/projects/markdown/" searchingString markdownText
end tell
return markdownText
end fetchMarkdown
on findWindowByName(theName)
tell application "BBEdit"
repeat with x from 1 to the count of windows
set _window to window x
if name of _window is equal to theName then
log ("Found window " & theName)
return _window
end if
end repeat
log ("Did not find " & theName)
return missing value
end tell
end findWindowByName
on markdownDoc(theTitle)
tell application "BBEdit"
set markdownText to fetchMarkdown() of me
set _window to make new text window with properties {contents:markdownText, visible:false}
set _doc to document of _window
set source language of _doc to "Markdown"
set name of _doc to theTitle
set bounds of _window to {0, 0, 1, 1}
return _window
end tell
end markdownDoc
on previewMarkdown(sourceWindow)
tell application "BBEdit"
activate
set collapsed of sourceWindow to false
select sourceWindow
log ("Use Preview in BBEdit for markdown")
tell application "System Events"
tell process "BBEdit"
click menu item "Preview in BBEdit" of menu 1 of menu bar item "Markup" of menu bar 1
end tell
end tell
end tell
end previewMarkdown
set theWindowTitle to "Markdown Syntax"
set theDoc to missing value
set theWindow to missing value
set thePreviewWindow to missing value
tell application "BBEdit"
-- Is the preview window already available?
set thePreviewWindow to findWindowByName("Preview: " & theWindowTitle) of me
if thePreviewWindow is equal to missing value then
-- Is there already a window with Markdown Syntax?
set theWindow to findWindowByName(theWindowTitle) of me
if theWindow is equal to missing value then
set theWindow to markdownDoc(theWindowTitle) of me
set theDoc to document of theWindow
else
set theDoc to the document of theWindow
end if
if theWindow is equal to missing value then
-- Abort
log ("No markdown syntax window")
beep
return
end if
-- Preview in BBEdit
previewMarkdown(theWindow) of me
end if
-- Focus on the preview
set thePreviewWindow to findWindowByName("Preview: " & theWindowTitle) of me
if thePreviewWindow is not equal to missing value then
select thePreviewWindow
end if
if theWindow is not equal to missing value then
-- Minimize syntax window
log ("Minimize the syntax window")
-- set collapsed of theWindow to true
end if
end tell |
alfred/src/applescript/stopPomo.scpt | lh00000000/pomodoro-alfred | 34 | 1042 | tell application "Tomato One" to activate
tell application "Tomato One" to stop
|
vendor/stdlib/src/Algebra/FunctionProperties/Core.agda | isabella232/Lemmachine | 56 | 3128 | <gh_stars>10-100
------------------------------------------------------------------------
-- Properties of functions, such as associativity and commutativity
------------------------------------------------------------------------
-- This file contains some core definitions which are reexported by
-- Algebra.FunctionProperties. They are placed here because
-- Algebra.FunctionProperties is a parameterised module, and the
-- parameters are irrelevant for these definitions.
module Algebra.FunctionProperties.Core where
------------------------------------------------------------------------
-- Unary and binary operations
Op₁ : Set → Set
Op₁ A = A → A
Op₂ : Set → Set
Op₂ A = A → A → A
|
test/Fail/Issue2075.agda | cruhland/agda | 1,989 | 9944 | data Unit : Set where
unit : Unit
F : Unit → Set₁
F {x = unit} = Set
|
kData.asm | satadriver/LiunuxOS | 0 | 99785 | <reponame>satadriver/LiunuxOS
include vesadata.asm
include tss.ASM
include descriptor.asm
include deviceData.asm
SIZE_OF_CHAR EQU 1
SIZE_OF_SHORT EQU 2
SIZE_OF_INT EQU 4
SIZE_OF_FWORD EQU 6
SIZE_OF_QWORD EQU 8
PAGE_SIZE EQU 4096
PAGE_INDEX_COUNT EQU PAGE_SIZE/SIZE_OF_INT
SYSTEM_TSS_SIZE EQU (104+ 32 + 8192+1)
MAX_TASK_LIMIT EQU 256
KERNEL_TASK_LIMIT EQU 64
KERNEL_TASK_STACK_SIZE EQU 10000H
;USER_TASK_LIMIT EQU (MAX_TASK_LIMIT - KERNEL_TASK_LIMIT)
USER_TASK_STACK_SIZE EQU 100000h
TASK_STACK0_SIZE EQU 10000H
STACK_TOP_DUMMY EQU 20H
BIT16SEGMENT_SIZE EQU 10000H
BIT16_STACK_TOP equ (BIT16SEGMENT_SIZE - STACK_TOP_DUMMY)
RM_EMS_BASE EQU 100000H
PTE_ENTRY_VALUE EQU 110000H
;页目录表必须位于一个自然页内(4KB对齐), 故其物理地址的低12位是全0
PDE_ENTRY_VALUE EQU 510000H
CMOS_DATETIME_STRING EQU 512000H
TIMER0_FREQUENCY_ADDR EQU CMOS_DATETIME_STRING + 40H
CMOS_SECONDS_TOTAL EQU CMOS_DATETIME_STRING + 100h
CMOS_TICK_COUNT EQU CMOS_SECONDS_TOTAL + 16
TIMER0_TICK_COUNT EQU CMOS_TICK_COUNT + 16
GP_EXEPTION_SHOW_TOTAL EQU TIMER0_TICK_COUNT + 16
VESA_INFO_BASE EQU 513000H
KEYBOARD_BUFFER EQU 514000H
MOUSE_BUFFER EQU 518000H
LDT_BASE EQU 5d0000H
;CALLGATE_BASE EQU 5E0000H
CURRENT_TASK_TSS_BASE EQU 540000H
V86_TSS_BASE EQU 544000H
CMOS_TSS_BASE EQU 548000h
INVALID_TSS_BASE EQU 54C000h
TIMER_TSS_BASE EQU 550000h
KERNEL_TASK_STACK_BASE EQU 560000h
;不能注释掉,应为时钟中断指向的TSS需要指明esp的值,不指定的话,发生中断时跳转到tss预先定义好的环境中执行,一定会发生错误
TSSEXP_STACK_ADDRESS EQU 600000H
TSSEXP_STACK_TOP EQU (TSSEXP_STACK_ADDRESS + KERNEL_TASK_STACK_SIZE - STACK_TOP_DUMMY)
TSSTIMER_STACK_ADDRESS EQU TSSEXP_STACK_TOP + STACK_TOP_DUMMY
TSSTIMER_STACK_TOP EQU (TSSTIMER_STACK_ADDRESS + KERNEL_TASK_STACK_SIZE - STACK_TOP_DUMMY)
TSSCMOS_STACK_ADDRESS EQU TSSTIMER_STACK_TOP + STACK_TOP_DUMMY
TSSCMOS_STACK_TOP EQU (TSSCMOS_STACK_ADDRESS + KERNEL_TASK_STACK_SIZE - STACK_TOP_DUMMY)
TSSINT13H_STACK_ADDRESS EQU TSSCMOS_STACK_TOP + STACK_TOP_DUMMY
TSSINT13H_STACK_TOP EQU (TSSINT13H_STACK_ADDRESS + KERNEL_TASK_STACK_SIZE - STACK_TOP_DUMMY)
TSSV86_STACK_ADDRESS EQU TSSINT13H_STACK_TOP + STACK_TOP_DUMMY
TSSV86_STACK_TOP EQU (TSSV86_STACK_ADDRESS + KERNEL_TASK_STACK_SIZE - STACK_TOP_DUMMY)
TSSEXP_STACK0_ADDRESS EQU 700000H
TSSEXP_STACK0_TOP EQU (TSSEXP_STACK0_ADDRESS + TASK_STACK0_SIZE - STACK_TOP_DUMMY)
TSSTIMER_STACK0_ADDRESS EQU TSSEXP_STACK0_TOP + STACK_TOP_DUMMY
TSSTIMER_STACK0_TOP EQU (TSSTIMER_STACK0_ADDRESS + TASK_STACK0_SIZE - STACK_TOP_DUMMY)
TSSCMOS_STACK0_ADDRESS EQU TSSTIMER_STACK0_TOP + STACK_TOP_DUMMY
TSSCMOS_STACK0_TOP EQU (TSSCMOS_STACK0_ADDRESS + TASK_STACK0_SIZE - STACK_TOP_DUMMY)
TSSINT13H_STACK0_ADDRESS EQU TSSCMOS_STACK0_TOP + STACK_TOP_DUMMY
TSSINT13H_STACK0_TOP EQU (TSSINT13H_STACK0_ADDRESS + TASK_STACK0_SIZE - STACK_TOP_DUMMY)
TSSV86_STACK0_ADDRESS EQU TSSINT13H_STACK0_TOP + STACK_TOP_DUMMY
TSSV86_STACK0_TOP EQU (TSSV86_STACK0_ADDRESS + TASK_STACK0_SIZE - STACK_TOP_DUMMY)
KERNEL_DLL_BASE EQU 1000000h
TASKS_STACK0_BASE EQU 1800000h
;TSS_STACK0BASE_TOP EQU (TSS_STACK0BASE + MAX_TASK_LIMIT*TASK_STACK0_SIZE)
LOADER_BASE_SEGMENT equ 800h
KERNEL_BASE_SEGMENT equ 1000h
LIMIT_V86_PROC_COUNT equ 6
V86TASK_FIRST_SEG EQU 2000H
;从90000h到a0000h的内存地址属性,有可能是不连续的
GRAPHFONT_LOAD_SEG EQU 9000H
GRAPHFONT_LOAD_OFFSET EQU 0
GRAPHFONT_LOAD_ADDRESS equ (GRAPHFONT_LOAD_SEG*16 + GRAPHFONT_LOAD_OFFSET)
MEMORYINFO_LOAD_SEG EQU 9000H
MEMORYINFO_LOAD_OFFSET EQU 1000H
MEMORYINFO_LOAD_ADDRESS equ (MEMORYINFO_LOAD_SEG*16 + MEMORYINFO_LOAD_OFFSET)
V86VMIPARAMS_SEG EQU 9000H
V86VMIPARAMS_OFFSET EQU 2000H
V86VMIPARAMS_ADDRESS EQU (V86VMIPARAMS_SEG*16 + V86VMIPARAMS_OFFSET)
V86VMIDATA_SEG EQU 9000h
V86VMIDATA_OFFSET EQU 2100H
V86VMIDATA_ADDRESS EQU (V86VMIDATA_SEG*16 + V86VMIDATA_OFFSET)
V86_TASKCONTROL_SEG EQU 9000h
V86_TASKCONTROL_OFFSET EQU 2200H
V86_TASKCONTROL_ADDRESS EQU (V86_TASKCONTROL_SEG*16 + V86_TASKCONTROL_OFFSET)
VESA_STATE_SEG EQU 9000h
VESA_STATE_OFFSET EQU 2300h
VESA_STATE_ADDRESS EQU (VESA_STATE_SEG * 16 + VESA_STATE_OFFSET)
VSKDLL_LOAD_SEG EQU 4000H
VSKDLL_LOAD_OFFSET EQU 0
VSKDLL_LOAD_ADDRESS equ (VSKDLL_LOAD_SEG*16 + VSKDLL_LOAD_OFFSET)
VSMAINDLL_LOAD_SEG EQU 6000H
VSMAINDLL_LOAD_OFFSET EQU 0
VSMAINDLL_LOAD_ADDRESS equ (VSMAINDLL_LOAD_SEG*16 + VSMAINDLL_LOAD_OFFSET)
INT13_RM_FILEBUF_SEG EQU 8000H
INT13_RM_FILEBUF_OFFSET EQU 0
INT13_RM_FILEBUF_ADDR EQU (INT13_RM_FILEBUF_SEG*16 + INT13_RM_FILEBUF_OFFSET)
BIOS_GRAPHCHARS_SEG EQU 0f000h
BIOS_GRAPHCHARS_OFFSET EQU 0fa6eH
BIOS_GRAPHCHARS_BASE EQU (BIOS_GRAPHCHARS_SEG*16 + BIOS_GRAPHCHARS_OFFSET)
BIOS_GRAPHCHAR_HEIGHT EQU 8
BIOS_GRAPHCHAR_WIDTH EQU 8
GRAPH_TASK_HEIGHT equ (BIOS_GRAPHCHAR_HEIGHT*4)
VIDEO_MODE_3 equ 3
VIDEO_MODE_112 equ 112h
VIDEO_MODE_115 equ 115h
VIDEO_MODE_118 equ 118h
VIDEO_MODE_11B equ 11bh
VIDEO_MODE_11F equ 11fh
VIDEO_MODE_319 equ 319
VIDEO_MODE_320 equ 320
VIDEO_MODE_321 equ 321
VIDEO_MODE_324 equ 324
VIDEO_MODE_326 equ 326
VIDEOMODE_TEXT_DATASEG EQU 0b800h
VIDEOMODE_TEXT_DATABASE EQU (VIDEOMODE_TEXT_DATASEG * 16)
VIDEOMODE_TEXT_BYTESPERLINE EQU 160
VIDEOMODE_TEXT_MAX_LINE EQU 25
VIDEOMODE_TEXT_MAX_OFFSET equ (VIDEOMODE_TEXT_MAX_LINE * VIDEOMODE_TEXT_BYTESPERLINE )
TEXTMODE_FONTCOLOR_ERR equ 0ch
TEXTMODE_FONTCOLOR_NORMAL equ 0ah
VIDEOMODE_FONTCOLOR_ERR equ 00ff0000h
VIDEOMODE_FONTCOLOR_NORMAL equ 0
BACKGROUND_COLOR equ 00B0E0E6h
;SYSTEM_TIMER0_FACTOR EQU 23864
SYSTEM_TIMER0_FACTOR EQU 11932
kernelData segment para use32
_kernelSectorInfo DATALOADERSECTOR <0>
align 10h
gdtNullSelector equ 0
gdtNullDescriptor dq 0000000000000000h ;0
;内核代码段
reCode32Seg =$ - gdtNullDescriptor ;8
reCode32Descriptor dq 00cf9a000000ffffh
;00cf96000000ffffh means data segment increment from high to low,the offset in segment must above the segment limit
;do not use this to make a stack segment
;内核堆栈段和数据段
rwData32Seg =$ - gdtNullDescriptor ;16
rwDataDescriptor dq 00cf92000000ffffh
;用户代码段
reUsrCode32Seg =$ - gdtNullDescriptor ;24
reUsrCode32Descriptor dq 00cffa000000ffffh
;用户堆栈段数据段
rwUsrData32Seg =$ - gdtNullDescriptor ;32
rwUsrStackDescriptor dq 00cff2000000ffffh
;必要的跳转段
reCode32TempSeg =$ - gdtNullDescriptor ;40
reCode32TempDescriptor dq 00cf9a000000ffffh
int13CodeSeg =$ - gdtNullDescriptor ;48
int13CodeDescriptor dq 00cf9a000000ffffh
;16位测试段
rwData16Seg = $ - gdtNullDescriptor ;56
rwData16Descriptor dq 000092000000ffffh
reCode16Seg = $-gdtNullDescriptor ;64
reCode16Descriptor dq 00009a000000ffffh
kTssSelector =$-gdtNullDescriptor ;72
kTssDescriptor dq 0000e90000000000h
kTssExpSelector =$-gdtNullDescriptor ;80
kTssExpDescriptor dq 0000e90000000000h
kTssTimerSelector =$-gdtNullDescriptor ;88
kTssTimerDescriptor dq 0000e90000000000h
kTssCmosSelector =$-gdtNullDescriptor ;96
kTssCmosDescriptor dq 0000e90000000000h
kTssInt13hSelector =$-gdtNullDescriptor ;104
kTssInt13hDescriptor dq 0000e90000000000h
kTssV86Selector =$-gdtNullDescriptor ;112
kTssV86Descriptor dq 0000e90000000000h
ldtSelector =$-gdtNullDescriptor ;120
ldtDescriptor dq 0000e20000000000h
callGateSelector =$-gdtNullDescriptor ;128
callGateDescriptor dq 0000ec0000000000h
;32位测试段
eoCode32Seg =$ - gdtNullDescriptor ;136
eoCode32Descriptor dq 00cf98000000ffffh
roData32Seg =$ - gdtNullDescriptor ;144
roDataDescriptor dq 00cf90000000ffffh
;v86TGSelector =$-gdtNullDescriptor
;v86TGDescriptor dq 0000e50000000000h
gdtLimit = $-gdtNullDescriptor -1
align 10h
gdtReg df 0
align 10h
_rmGdtReg df 0
align 10h
;exceptions or traps
idtOffset equ $
tDivEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tDebugEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tNmiEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tBreakPointEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tOverFlowEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tBoundErrEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tUnlawfulOpcodeEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tNoneCoprocessorEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tDoubleFaultEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tCoprocessorBoundEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tInvalidTssEntry GATEDESCRIPTOR<0,0,0, TASKGATE + DPL3,0>
tSegNonePresentEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tStackSegErrEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
;GP fault:
;bit0:external
;bit1:interrupt
;bit2:ldt
tGPEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tPageFaultEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tUnused15 GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0> ;15 dummy exception
tFpuFaultEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tAlignmentCheckErrEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tMachineCheckErrEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tSimdFaultEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tVirtualErrorEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tUnknowns0 dq 11 dup (0000ef0000000000h) ;20-31
tUnknowns1 dq 20h dup (0000ef0000000000h) ;20h - 3fh
;first 8259 interruptions
;在任务切换过程中,任务门描述符中DPL字段控制访问TSS描述符。当程序通过任务门调用和跳转到一个任务时,CPL和门选择符的RPL字段必须小于等于任务门描述符中的DPL
IFDEF SINGLE_TASK_TSS
iSysTimerEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
ELSE
iSysTimerEntry GATEDESCRIPTOR<0,0,0, TASKGATE + DPL3,0>
ENDIF
iKbdEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iNmiEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iCom2Entry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iCom1Entry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iAudioEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iFloppyEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iParallelEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
;second 8259 interruptions
;iCMOSEntry GATEDESCRIPTOR<0,0,0, TASKGATE + DPL3,0>
iCMOSEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iNetworkEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iUSBEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iScsiEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iMouseEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iCoprocessorEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iDriverEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
iCDROMEntry GATEDESCRIPTOR<0,0,0, INTRGATE + DPL3,0>
tUnknowns2 dq 30h dup (0000ef0000000000h) ;50h - 7fh
tSysSvcEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0> ;80h
;tSysSvcEntry GATEDESCRIPTOR<0,0,0, CALLGATE + DPL3,0> ;80h
tUnknowns3 dq 07ah dup (0000ef0000000000h) ;81h - 0fah
tintFBEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tintFCEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tintFDEntry GATEDESCRIPTOR<0,0,0, TRAPGATE + DPL3,0>
tInt13Entry GATEDESCRIPTOR<0,0,0, TASKGATE + DPL3,0> ;0feh
tV86Entry GATEDESCRIPTOR<0,0,0, TASKGATE + DPL3,0> ;0ffh
idtLimit = $ - idtOffset - 1
align 10h
idtReg df 0
;tss do not need to align,can be any where,ignore alignment
;tss must be in one page!!!
;align 10h
_tssTimer TASKSTATESEG <0>
_tssCmos TASKSTATESEG <0>
_tssExp TASKSTATESEG <0>
_tssInt13h TASKSTATESEG <0>
_tssVM86 TASKSTATESEG <0>
align 10h
_rmModeIdtReg df 0
_rmPicElcr dw 0
_rmMode8259Mask dw 0
_realModeStack dd 0
_textShowPos dd 640
_graphShowX dd 0
_graphShowY dd 0
_videoBufTotal dd 0
_videoInfo VESAInformation <?>
_videoBlockInfo VESAInfoBlock <>
_videoTypes dw 64 dup (0) ;mode width height bits base
;_videoTypes VESAModeInfo 16 dup <>
_videoMode dw 0
_videoBase dd 0
_bytesPerLine dd 0
_bytesPerPixel dd 0
_videoHeight dd 0
_videoWidth dd 0
_windowHeight dd 0
_graphWindowLimit dd 0
_videoFrameTotal dd 0
_graphFontLines dd 0
_graphFontRows dd 0
_bytesXPerChar dd 0
_graphFontLSize dd 0
_graphCharBase dd 0
_backGroundColor EQU 00B0E0E6h
_taskBarColor EQU 00CFCFCFh
_timerZoneColor EQU 00E8E8E8h
_mouseColor EQU 005C9C00H
MOUSE_BORDER_COLOR EQU 0
_mouseBorderSize EQU 4
_mouseRatioSize EQU 40
_kTaskSchedule dd 0
_kernelDllEntry dd 0
;_kUser dd 0
_kDebugger dd 0
_kBreakPoint dd 0
_kSoundCardInt dd 0
_kPrintScreen dd 0
_kScreenProtect dd 0
_kCmosAlarmProc dd 0
_kCom1Proc dd 0
_kCom2Proc dd 0
_kMouseProc dd 0
_kException dd 0
_kCmosTimer dd 0
_kKbdProc dd 0
_kServicesProc dd 0
_kFloppyIntrProc dd 0
_kCoprocessor dd 0
_kCallGateProc dd 0
_kCmosExactTimerProc dd 0
_kernelDllEntryFz db '__kernelEntry',0
_kTaskScheduleFz db '__kTaskSchedule',0
;_kUserFz db '__user',0
_kDebuggerFz db '__kDebugger',0
_kBreakPointFz db '__kBreakPoint',0
_kSoundCardIntFz db '__kSoundInterruptionProc',0
_kPrintScreenFz db '__kPrintScreen',0
_kScreenProtectFz db '__kScreenProtect',0
_kCmosAlarmProcFz db '__kCmosAlarmProc',0
_kCom1ProcFz db '__kCom1Proc',0
_kCom2ProcFz db '__kCom2Proc',0
_kMouseProcFz db '__kMouseProc',0
_kExceptionFz db '__kException',0
_kCmosTimerFz db '__kCmosTimer',0
_kKbdProcFz db '__kKeyboardProc',0
_kServicesProcFz db '__kServicesProc',0
_kFloppyIntrProcFz db '__kFloppyIntrProc',0
_kCoprocessorFz db '__kCoprocessor',0
_kCallGateProcFz db '__kCallGateProc',0
_kCmosExactTimerProcFz db '__kCmosExactTimerProc',0
_sectorNumber dd 0
_sectorCount dd 0
_fileBuffer dd 0
_fileBufferSize dd 0
_int13ESP dd 0
_int13SS dd 0
_int13Result dd 0
;page index entry must be aligned 1000h,else will cause GP error,so here is not suitable
;align 10h
;pageTableIndex dd 1024 dup (0)
_mondayStr db 'Monday',0
_tuesdayStr db 'Tuesday',0
_wednesdayStr db 'Wednesday',0
_ThursdayStr db 'Thursday',0
_FridayStr db 'Friday',0
_saturdayStr db 'Saturday',0
_sundayStr db 'Sunday',0
_exceptionInfo db 'System Kernel Exception'
db ',Type:0x'
_exceptionType db 8 dup (0)
db ',ErrorCode:0x'
_exceptionErrCode db 8 dup (0)
db ',EIP:0x'
_exceptionEIP db 8 dup (0)
db ',CS:0x'
_exceptionCS db 8 dup (0)
db ',Eflags:0x'
_exceptionEflags db 8 dup (0)
db ',ESP:0x'
_exceptionESP db 8 dup (0)
db ',SS:0x'
_exceptionSS db 8 dup (0)
db 0ah
db 0
_graphShowInfo db '('
_screenX db 8 dup (0)
db ','
_screenY db 8 dup (0)
db ','
_screenColor db 8 dup (0)
db '),'
db '('
_mousePosX db 8 dup (0)
db ','
_mousePosY db 8 dup (0)
db ','
_mouseW db 8 dup (0)
db ','
_mouseH db 8 dup (0)
db ')',0
_screenInfoPos dd 0
comment *
_memInfo db 'Memory Address low:'
_memSegLow db 8 dup (0)
db ',Memory Address high:'
_memSegHigh db 8 dup (0)
db ',Memory Length low:'
_memLenLow db 8 dup (0)
db ',Memory Length high:'
_memLenHigh db 8 dup (0)
db ',Memory Type:'
_memType db 8 dup (0)
db 0ah
db 0
*
_gDateOfMonth db 31,28,31,30,31,30,31,31,30,31,30,31
;f1 - f10 = 3b - 44 f11=85 f12=86
;e0 2a/e0 37 PrintScreen/SysRq
;Pause/Break e1 1d 45/e1 9d c5
;fill with 0 if without scancode
;0, left ctrl
;leftshift,rightshift,printscreen,alt,capslock,f1,f2,f3,f4,f5
;f6,f7,f8,f9,f10,numbslock,scrolllock
ScanCodesBuf db 0 ,1bh,'1','2','3','4','5','6','7','8','9','0','-','=', 8, 9, 'q','w','e','r','t','y','u','i','o','p','[',']',0ah, 0, 'a','s'
db 'd','f','g','h','j','k','l',';',"'",'`', 0, '\','z','x','c','v', 'b','n','m',',','.','/', 0, 0 , 0, ' ', 0, 0 , 0, 0, 0, 0
db 0, 0, 0, 0, 0, 0, 0, '7','8','9','-','4','5','6','+','1', '2','3','0','.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
ScanCodesTransBuf db 0, 1bh,'!','@','#','$','%','^','&','*','(',')','_','+', 8, 9, 'Q','W','E','R','T','Y','U','I','O','P','{','}',0ah, 0, 'A','S'
db 'D','F','G','H','J','K','L',':','"','~', 0, '|','Z','X','C','V', 'B','N','M','<','>','?', 0, '*', 0, ' ', 0, 0, 0, 0, 0, 0
db 0, 0, 0, 0, 0, 0, 0, '7','8','9','-','4','5','6','+','1', '2','3','0','.', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
kernelData ends |
win32/VC10/Win32/libxml2_Debug/globals.asm | txwizard/libxml2_x64_and_ARM | 0 | 81604 | ; 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\globals.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
PUBLIC _xmlMalloc
PUBLIC _xmlMallocAtomic
PUBLIC _xmlRealloc
PUBLIC _xmlFree
PUBLIC _xmlMemStrdup
PUBLIC _xmlParserVersion
PUBLIC ??_C@_0CB@CPJCIMMP@20909?9GITv2?49?49?9rc2?92?9g7c4949af@ ; `string'
PUBLIC _xmlBufferAllocScheme
PUBLIC _xmlDefaultBufferSize
PUBLIC _oldXMLWDcompatibility
PUBLIC _xmlParserDebugEntities
PUBLIC _xmlDoValidityCheckingDefaultValue
PUBLIC _xmlGetWarningsDefaultValue
PUBLIC _xmlLoadExtDtdDefaultValue
PUBLIC _xmlPedanticParserDefaultValue
PUBLIC _xmlLineNumbersDefaultValue
PUBLIC _xmlKeepBlanksDefaultValue
PUBLIC _xmlSubstituteEntitiesDefaultValue
PUBLIC _xmlRegisterNodeDefaultValue
PUBLIC _xmlDeregisterNodeDefaultValue
PUBLIC _xmlParserInputBufferCreateFilenameValue
PUBLIC _xmlOutputBufferCreateFilenameValue
PUBLIC _xmlGenericError
PUBLIC _xmlStructuredError
PUBLIC _xmlGenericErrorContext
PUBLIC _xmlStructuredErrorContext
PUBLIC _xmlIndentTreeOutput
PUBLIC _xmlTreeIndentString
PUBLIC ??_C@_02KNHHEEKP@?5?5@ ; `string'
PUBLIC _xmlSaveNoEmptyTags
PUBLIC _xmlDefaultSAXHandler
PUBLIC _xmlDefaultSAXLocator
PUBLIC _htmlDefaultSAXHandler
PUBLIC _docbDefaultSAXHandler
EXTRN _xmlSAX2GetPublicId:PROC
EXTRN _xmlSAX2GetSystemId:PROC
EXTRN _xmlSAX2SetDocumentLocator:PROC
EXTRN _xmlSAX2GetLineNumber:PROC
EXTRN _xmlSAX2GetColumnNumber:PROC
EXTRN _xmlSAX2IsStandalone:PROC
EXTRN _xmlSAX2HasInternalSubset:PROC
EXTRN _xmlSAX2HasExternalSubset:PROC
EXTRN _xmlSAX2InternalSubset:PROC
EXTRN _xmlSAX2ExternalSubset:PROC
EXTRN _xmlSAX2GetEntity:PROC
EXTRN _xmlSAX2GetParameterEntity:PROC
EXTRN _xmlSAX2ResolveEntity:PROC
EXTRN _xmlSAX2EntityDecl:PROC
EXTRN _xmlSAX2AttributeDecl:PROC
EXTRN _xmlSAX2ElementDecl:PROC
EXTRN _xmlSAX2NotationDecl:PROC
EXTRN _xmlSAX2UnparsedEntityDecl:PROC
EXTRN _xmlSAX2StartDocument:PROC
EXTRN _xmlSAX2EndDocument:PROC
EXTRN _xmlSAX2StartElement:PROC
EXTRN _xmlSAX2EndElement:PROC
EXTRN _xmlSAX2Reference:PROC
EXTRN _xmlSAX2Characters:PROC
EXTRN _xmlSAX2IgnorableWhitespace:PROC
EXTRN _xmlSAX2ProcessingInstruction:PROC
EXTRN _xmlSAX2Comment:PROC
EXTRN _xmlSAX2CDataBlock:PROC
EXTRN _xmlGenericErrorDefaultFunc:PROC
EXTRN _malloc:PROC
EXTRN _free:PROC
EXTRN _realloc:PROC
EXTRN _xmlParserError:PROC
EXTRN _xmlParserWarning:PROC
_BSS SEGMENT
_oldXMLWDcompatibility DD 01H DUP (?)
_xmlParserDebugEntities DD 01H DUP (?)
_xmlDoValidityCheckingDefaultValue DD 01H DUP (?)
_xmlLoadExtDtdDefaultValue DD 01H DUP (?)
_xmlPedanticParserDefaultValue DD 01H DUP (?)
_xmlLineNumbersDefaultValue DD 01H DUP (?)
_xmlSubstituteEntitiesDefaultValue DD 01H DUP (?)
_xmlRegisterNodeDefaultValue DD 01H DUP (?)
_xmlDeregisterNodeDefaultValue DD 01H DUP (?)
_xmlParserInputBufferCreateFilenameValue DD 01H DUP (?)
_xmlOutputBufferCreateFilenameValue DD 01H DUP (?)
_xmlStructuredError DD 01H DUP (?)
_xmlGenericErrorContext DD 01H DUP (?)
_xmlStructuredErrorContext DD 01H DUP (?)
_BSS ENDS
_DATA SEGMENT
COMM _xmlLastError:BYTE:034H
_DATA ENDS
_BSS SEGMENT
_xmlSaveNoEmptyTags DD 01H DUP (?)
_BSS ENDS
_DATA SEGMENT
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
__DB69A600_globals@c DB 01H
msvcjmc ENDS
; COMDAT ??_C@_02KNHHEEKP@?5?5@
CONST SEGMENT
??_C@_02KNHHEEKP@?5?5@ DB ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CB@CPJCIMMP@20909?9GITv2?49?49?9rc2?92?9g7c4949af@
CONST SEGMENT
??_C@_0CB@CPJCIMMP@20909?9GITv2?49?49?9rc2?92?9g7c4949af@ DB '20909-GITv2'
DB '.9.9-rc2-2-g7c4949afa', 00H ; `string'
CONST ENDS
_DATA SEGMENT
_xmlMalloc DD FLAT:_malloc
_xmlMallocAtomic DD FLAT:_malloc
_xmlRealloc DD FLAT:_realloc
_xmlFree DD FLAT:_free
_xmlMemStrdup DD FLAT:_xmlPosixStrdup
_xmlParserVersion DD FLAT:??_C@_0CB@CPJCIMMP@20909?9GITv2?49?49?9rc2?92?9g7c4949af@
_xmlBufferAllocScheme DD 01H
_xmlDefaultBufferSize DD 01000H
_xmlGetWarningsDefaultValue DD 01H
_xmlKeepBlanksDefaultValue DD 01H
_xmlGenericError DD FLAT:_xmlGenericErrorDefaultFunc
_xmlIndentTreeOutput DD 01H
_xmlTreeIndentString DD FLAT:??_C@_02KNHHEEKP@?5?5@
ORG $+4
_xmlDefaultSAXHandler DD FLAT:_xmlSAX2InternalSubset
DD FLAT:_xmlSAX2IsStandalone
DD FLAT:_xmlSAX2HasInternalSubset
DD FLAT:_xmlSAX2HasExternalSubset
DD FLAT:_xmlSAX2ResolveEntity
DD FLAT:_xmlSAX2GetEntity
DD FLAT:_xmlSAX2EntityDecl
DD FLAT:_xmlSAX2NotationDecl
DD FLAT:_xmlSAX2AttributeDecl
DD FLAT:_xmlSAX2ElementDecl
DD FLAT:_xmlSAX2UnparsedEntityDecl
DD FLAT:_xmlSAX2SetDocumentLocator
DD FLAT:_xmlSAX2StartDocument
DD FLAT:_xmlSAX2EndDocument
DD FLAT:_xmlSAX2StartElement
DD FLAT:_xmlSAX2EndElement
DD FLAT:_xmlSAX2Reference
DD FLAT:_xmlSAX2Characters
DD FLAT:_xmlSAX2Characters
DD FLAT:_xmlSAX2ProcessingInstruction
DD FLAT:_xmlSAX2Comment
DD FLAT:_xmlParserWarning
DD FLAT:_xmlParserError
DD FLAT:_xmlParserError
DD FLAT:_xmlSAX2GetParameterEntity
DD FLAT:_xmlSAX2CDataBlock
DD FLAT:_xmlSAX2ExternalSubset
DD 00H
_xmlDefaultSAXLocator DD FLAT:_xmlSAX2GetPublicId
DD FLAT:_xmlSAX2GetSystemId
DD FLAT:_xmlSAX2GetLineNumber
DD FLAT:_xmlSAX2GetColumnNumber
_htmlDefaultSAXHandler DD FLAT:_xmlSAX2InternalSubset
DD 00H
DD 00H
DD 00H
DD 00H
DD FLAT:_xmlSAX2GetEntity
DD 00H
DD 00H
DD 00H
DD 00H
DD 00H
DD FLAT:_xmlSAX2SetDocumentLocator
DD FLAT:_xmlSAX2StartDocument
DD FLAT:_xmlSAX2EndDocument
DD FLAT:_xmlSAX2StartElement
DD FLAT:_xmlSAX2EndElement
DD 00H
DD FLAT:_xmlSAX2Characters
DD FLAT:_xmlSAX2IgnorableWhitespace
DD FLAT:_xmlSAX2ProcessingInstruction
DD FLAT:_xmlSAX2Comment
DD FLAT:_xmlParserWarning
DD FLAT:_xmlParserError
DD FLAT:_xmlParserError
DD FLAT:_xmlSAX2GetParameterEntity
DD FLAT:_xmlSAX2CDataBlock
DD 00H
DD 00H
_docbDefaultSAXHandler DD FLAT:_xmlSAX2InternalSubset
DD FLAT:_xmlSAX2IsStandalone
DD FLAT:_xmlSAX2HasInternalSubset
DD FLAT:_xmlSAX2HasExternalSubset
DD FLAT:_xmlSAX2ResolveEntity
DD FLAT:_xmlSAX2GetEntity
DD FLAT:_xmlSAX2EntityDecl
DD 00H
DD 00H
DD 00H
DD 00H
DD FLAT:_xmlSAX2SetDocumentLocator
DD FLAT:_xmlSAX2StartDocument
DD FLAT:_xmlSAX2EndDocument
DD FLAT:_xmlSAX2StartElement
DD FLAT:_xmlSAX2EndElement
DD FLAT:_xmlSAX2Reference
DD FLAT:_xmlSAX2Characters
DD FLAT:_xmlSAX2IgnorableWhitespace
DD 00H
DD FLAT:_xmlSAX2Comment
DD FLAT:_xmlParserWarning
DD FLAT:_xmlParserError
DD FLAT:_xmlParserError
DD FLAT:_xmlSAX2GetParameterEntity
DD 00H
DD 00H
DD 00H
_DATA ENDS
PUBLIC _xmlInitGlobals
PUBLIC _xmlCleanupGlobals
PUBLIC _xmlInitializeGlobalState
PUBLIC _xmlThrDefSetGenericErrorFunc
PUBLIC _xmlThrDefSetStructuredErrorFunc
PUBLIC _xmlRegisterNodeDefault
PUBLIC _xmlThrDefRegisterNodeDefault
PUBLIC _xmlDeregisterNodeDefault
PUBLIC _xmlThrDefDeregisterNodeDefault
PUBLIC _xmlThrDefOutputBufferCreateFilenameDefault
PUBLIC _xmlThrDefParserInputBufferCreateFilenameDefault
PUBLIC ___docbDefaultSAXHandler
PUBLIC ___htmlDefaultSAXHandler
PUBLIC ___xmlLastError
PUBLIC ___oldXMLWDcompatibility
PUBLIC ___xmlBufferAllocScheme
PUBLIC _xmlThrDefBufferAllocScheme
PUBLIC ___xmlDefaultBufferSize
PUBLIC _xmlThrDefDefaultBufferSize
PUBLIC ___xmlDefaultSAXHandler
PUBLIC ___xmlDefaultSAXLocator
PUBLIC ___xmlDoValidityCheckingDefaultValue
PUBLIC _xmlThrDefDoValidityCheckingDefaultValue
PUBLIC ___xmlGenericError
PUBLIC ___xmlStructuredError
PUBLIC ___xmlGenericErrorContext
PUBLIC ___xmlStructuredErrorContext
PUBLIC ___xmlGetWarningsDefaultValue
PUBLIC _xmlThrDefGetWarningsDefaultValue
PUBLIC ___xmlIndentTreeOutput
PUBLIC _xmlThrDefIndentTreeOutput
PUBLIC ___xmlTreeIndentString
PUBLIC _xmlThrDefTreeIndentString
PUBLIC ___xmlKeepBlanksDefaultValue
PUBLIC _xmlThrDefKeepBlanksDefaultValue
PUBLIC ___xmlLineNumbersDefaultValue
PUBLIC _xmlThrDefLineNumbersDefaultValue
PUBLIC ___xmlLoadExtDtdDefaultValue
PUBLIC _xmlThrDefLoadExtDtdDefaultValue
PUBLIC ___xmlParserDebugEntities
PUBLIC _xmlThrDefParserDebugEntities
PUBLIC ___xmlParserVersion
PUBLIC ___xmlPedanticParserDefaultValue
PUBLIC _xmlThrDefPedanticParserDefaultValue
PUBLIC ___xmlSaveNoEmptyTags
PUBLIC _xmlThrDefSaveNoEmptyTags
PUBLIC ___xmlSubstituteEntitiesDefaultValue
PUBLIC _xmlThrDefSubstituteEntitiesDefaultValue
PUBLIC ___xmlRegisterNodeDefaultValue
PUBLIC ___xmlDeregisterNodeDefaultValue
PUBLIC ___xmlParserInputBufferCreateFilenameValue
PUBLIC ___xmlOutputBufferCreateFilenameValue
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_05BGCJPHN@20909@ ; `string'
EXTRN _xmlStrdup:PROC
EXTRN _xmlCharStrdup:PROC
EXTRN ___xmlGlobalInitMutexDestroy:PROC
EXTRN __imp__free:PROC
EXTRN __imp__malloc:PROC
EXTRN __imp__realloc:PROC
EXTRN ___xmlParserInputBufferCreateFilename:PROC
EXTRN ___xmlOutputBufferCreateFilename:PROC
EXTRN _xmlNewMutex:PROC
EXTRN _xmlMutexLock:PROC
EXTRN _xmlMutexUnlock:PROC
EXTRN _xmlFreeMutex:PROC
EXTRN _xmlIsMainThread:PROC
EXTRN _xmlGetGlobalState:PROC
EXTRN _initxmlDefaultSAXHandler:PROC
EXTRN _inithtmlDefaultSAXHandler:PROC
EXTRN _initdocbDefaultSAXHandler:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_InitBase:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN _memset:PROC
EXTRN ___xmlRegisterCallbacks:DWORD
_BSS SEGMENT
_xmlThrDefMutex DD 01H DUP (?)
_xmlParserDebugEntitiesThrDef DD 01H DUP (?)
_xmlDoValidityCheckingDefaultValueThrDef DD 01H DUP (?)
_xmlLoadExtDtdDefaultValueThrDef DD 01H DUP (?)
_xmlPedanticParserDefaultValueThrDef DD 01H DUP (?)
_xmlLineNumbersDefaultValueThrDef DD 01H DUP (?)
_xmlSubstituteEntitiesDefaultValueThrDef DD 01H DUP (?)
_xmlRegisterNodeDefaultValueThrDef DD 01H DUP (?)
_xmlDeregisterNodeDefaultValueThrDef DD 01H DUP (?)
_xmlParserInputBufferCreateFilenameValueThrDef DD 01H DUP (?)
_xmlOutputBufferCreateFilenameValueThrDef DD 01H DUP (?)
_xmlStructuredErrorThrDef DD 01H DUP (?)
_xmlGenericErrorContextThrDef DD 01H DUP (?)
_xmlStructuredErrorContextThrDef DD 01H DUP (?)
_xmlSaveNoEmptyTagsThrDef DD 01H DUP (?)
_BSS ENDS
; 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@_05BGCJPHN@20909@
CONST SEGMENT
??_C@_05BGCJPHN@20909@ DB '20909', 00H ; `string'
CONST ENDS
_DATA SEGMENT
_xmlBufferAllocSchemeThrDef DD 01H
_xmlDefaultBufferSizeThrDef DD 01000H
_xmlGetWarningsDefaultValueThrDef DD 01H
_xmlKeepBlanksDefaultValueThrDef DD 01H
_xmlGenericErrorThrDef DD FLAT:_xmlGenericErrorDefaultFunc
_xmlIndentTreeOutputThrDef DD 01H
_xmlTreeIndentStringThrDef DD FLAT:??_C@_02KNHHEEKP@?5?5@
_DATA 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\globals.c
; COMDAT _xmlPosixStrdup
_TEXT SEGMENT
_cur$ = 8 ; size = 4
_xmlPosixStrdup PROC ; COMDAT
; 135 : xmlPosixStrdup(const char *cur) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 136 : return((char*) xmlCharStrdup(cur));
mov eax, DWORD PTR _cur$[ebp]
push eax
call _xmlCharStrdup
add esp, 4
; 137 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlPosixStrdup 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\globals.c
; COMDAT ___xmlOutputBufferCreateFilenameValue
_TEXT SEGMENT
___xmlOutputBufferCreateFilenameValue PROC ; COMDAT
; 1118 : __xmlOutputBufferCreateFilenameValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1119 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlOutputB
; 1120 : return (&xmlOutputBufferCreateFilenameValue);
mov eax, OFFSET _xmlOutputBufferCreateFilenameValue
jmp SHORT $LN1@xmlOutputB
jmp SHORT $LN1@xmlOutputB
$LN2@xmlOutputB:
; 1121 : else
; 1122 : return (&xmlGetGlobalState()->xmlOutputBufferCreateFilenameValue);
call _xmlGetGlobalState
add eax, 508 ; 000001fcH
$LN1@xmlOutputB:
; 1123 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlOutputBufferCreateFilenameValue 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\globals.c
; COMDAT ___xmlParserInputBufferCreateFilenameValue
_TEXT SEGMENT
___xmlParserInputBufferCreateFilenameValue PROC ; COMDAT
; 1109 : __xmlParserInputBufferCreateFilenameValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1110 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlParserI
; 1111 : return (&xmlParserInputBufferCreateFilenameValue);
mov eax, OFFSET _xmlParserInputBufferCreateFilenameValue
jmp SHORT $LN1@xmlParserI
jmp SHORT $LN1@xmlParserI
$LN2@xmlParserI:
; 1112 : else
; 1113 : return (&xmlGetGlobalState()->xmlParserInputBufferCreateFilenameValue);
call _xmlGetGlobalState
add eax, 504 ; 000001f8H
$LN1@xmlParserI:
; 1114 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlParserInputBufferCreateFilenameValue 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\globals.c
; COMDAT ___xmlDeregisterNodeDefaultValue
_TEXT SEGMENT
___xmlDeregisterNodeDefaultValue PROC ; COMDAT
; 1100 : __xmlDeregisterNodeDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1101 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlDeregis
; 1102 : return (&xmlDeregisterNodeDefaultValue);
mov eax, OFFSET _xmlDeregisterNodeDefaultValue
jmp SHORT $LN1@xmlDeregis
jmp SHORT $LN1@xmlDeregis
$LN2@xmlDeregis:
; 1103 : else
; 1104 : return (&xmlGetGlobalState()->xmlDeregisterNodeDefaultValue);
call _xmlGetGlobalState
add eax, 444 ; 000001bcH
$LN1@xmlDeregis:
; 1105 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlDeregisterNodeDefaultValue 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\globals.c
; COMDAT ___xmlRegisterNodeDefaultValue
_TEXT SEGMENT
___xmlRegisterNodeDefaultValue PROC ; COMDAT
; 1091 : __xmlRegisterNodeDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1092 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlRegiste
; 1093 : return (&xmlRegisterNodeDefaultValue);
mov eax, OFFSET _xmlRegisterNodeDefaultValue
jmp SHORT $LN1@xmlRegiste
jmp SHORT $LN1@xmlRegiste
$LN2@xmlRegiste:
; 1094 : else
; 1095 : return (&xmlGetGlobalState()->xmlRegisterNodeDefaultValue);
call _xmlGetGlobalState
add eax, 440 ; 000001b8H
$LN1@xmlRegiste:
; 1096 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlRegisterNodeDefaultValue 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\globals.c
; COMDAT _xmlThrDefSubstituteEntitiesDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefSubstituteEntitiesDefaultValue PROC ; COMDAT
; 1080 : int xmlThrDefSubstituteEntitiesDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1081 : int ret;
; 1082 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 1083 : ret = xmlSubstituteEntitiesDefaultValueThrDef;
mov ecx, DWORD PTR _xmlSubstituteEntitiesDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 1084 : xmlSubstituteEntitiesDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlSubstituteEntitiesDefaultValueThrDef, edx
; 1085 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 1086 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 1087 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefSubstituteEntitiesDefaultValue 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\globals.c
; COMDAT ___xmlSubstituteEntitiesDefaultValue
_TEXT SEGMENT
___xmlSubstituteEntitiesDefaultValue PROC ; COMDAT
; 1074 : __xmlSubstituteEntitiesDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1075 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlSubstit
; 1076 : return (&xmlSubstituteEntitiesDefaultValue);
mov eax, OFFSET _xmlSubstituteEntitiesDefaultValue
jmp SHORT $LN1@xmlSubstit
jmp SHORT $LN1@xmlSubstit
$LN2@xmlSubstit:
; 1077 : else
; 1078 : return (&xmlGetGlobalState()->xmlSubstituteEntitiesDefaultValue);
call _xmlGetGlobalState
add eax, 396 ; 0000018cH
$LN1@xmlSubstit:
; 1079 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlSubstituteEntitiesDefaultValue 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\globals.c
; COMDAT _xmlThrDefSaveNoEmptyTags
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefSaveNoEmptyTags PROC ; COMDAT
; 1063 : int xmlThrDefSaveNoEmptyTags(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1064 : int ret;
; 1065 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 1066 : ret = xmlSaveNoEmptyTagsThrDef;
mov ecx, DWORD PTR _xmlSaveNoEmptyTagsThrDef
mov DWORD PTR _ret$[ebp], ecx
; 1067 : xmlSaveNoEmptyTagsThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlSaveNoEmptyTagsThrDef, edx
; 1068 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 1069 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 1070 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefSaveNoEmptyTags 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\globals.c
; COMDAT ___xmlSaveNoEmptyTags
_TEXT SEGMENT
___xmlSaveNoEmptyTags PROC ; COMDAT
; 1057 : __xmlSaveNoEmptyTags(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1058 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlSaveNoE
; 1059 : return (&xmlSaveNoEmptyTags);
mov eax, OFFSET _xmlSaveNoEmptyTags
jmp SHORT $LN1@xmlSaveNoE
jmp SHORT $LN1@xmlSaveNoE
$LN2@xmlSaveNoE:
; 1060 : else
; 1061 : return (&xmlGetGlobalState()->xmlSaveNoEmptyTags);
call _xmlGetGlobalState
add eax, 428 ; 000001acH
$LN1@xmlSaveNoE:
; 1062 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlSaveNoEmptyTags 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\globals.c
; COMDAT _xmlThrDefPedanticParserDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefPedanticParserDefaultValue PROC ; COMDAT
; 1046 : int xmlThrDefPedanticParserDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1047 : int ret;
; 1048 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 1049 : ret = xmlPedanticParserDefaultValueThrDef;
mov ecx, DWORD PTR _xmlPedanticParserDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 1050 : xmlPedanticParserDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlPedanticParserDefaultValueThrDef, edx
; 1051 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 1052 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 1053 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefPedanticParserDefaultValue 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\globals.c
; COMDAT ___xmlPedanticParserDefaultValue
_TEXT SEGMENT
___xmlPedanticParserDefaultValue PROC ; COMDAT
; 1040 : __xmlPedanticParserDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1041 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlPedanti
; 1042 : return (&xmlPedanticParserDefaultValue);
mov eax, OFFSET _xmlPedanticParserDefaultValue
jmp SHORT $LN1@xmlPedanti
jmp SHORT $LN1@xmlPedanti
$LN2@xmlPedanti:
; 1043 : else
; 1044 : return (&xmlGetGlobalState()->xmlPedanticParserDefaultValue);
call _xmlGetGlobalState
add eax, 424 ; 000001a8H
$LN1@xmlPedanti:
; 1045 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlPedanticParserDefaultValue 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\globals.c
; COMDAT ___xmlParserVersion
_TEXT SEGMENT
___xmlParserVersion PROC ; COMDAT
; 1031 : __xmlParserVersion(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1032 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlParserV
; 1033 : return (&xmlParserVersion);
mov eax, OFFSET _xmlParserVersion
jmp SHORT $LN1@xmlParserV
jmp SHORT $LN1@xmlParserV
$LN2@xmlParserV:
; 1034 : else
; 1035 : return (&xmlGetGlobalState()->xmlParserVersion);
call _xmlGetGlobalState
$LN1@xmlParserV:
; 1036 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlParserVersion 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\globals.c
; COMDAT _xmlThrDefParserDebugEntities
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefParserDebugEntities PROC ; COMDAT
; 1020 : int xmlThrDefParserDebugEntities(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1021 : int ret;
; 1022 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 1023 : ret = xmlParserDebugEntitiesThrDef;
mov ecx, DWORD PTR _xmlParserDebugEntitiesThrDef
mov DWORD PTR _ret$[ebp], ecx
; 1024 : xmlParserDebugEntitiesThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlParserDebugEntitiesThrDef, edx
; 1025 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 1026 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 1027 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefParserDebugEntities 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\globals.c
; COMDAT ___xmlParserDebugEntities
_TEXT SEGMENT
___xmlParserDebugEntities PROC ; COMDAT
; 1014 : __xmlParserDebugEntities(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1015 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlParserD
; 1016 : return (&xmlParserDebugEntities);
mov eax, OFFSET _xmlParserDebugEntities
jmp SHORT $LN1@xmlParserD
jmp SHORT $LN1@xmlParserD
$LN2@xmlParserD:
; 1017 : else
; 1018 : return (&xmlGetGlobalState()->xmlParserDebugEntities);
call _xmlGetGlobalState
add eax, 420 ; 000001a4H
$LN1@xmlParserD:
; 1019 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlParserDebugEntities 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\globals.c
; COMDAT _xmlThrDefLoadExtDtdDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefLoadExtDtdDefaultValue PROC ; COMDAT
; 1003 : int xmlThrDefLoadExtDtdDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 1004 : int ret;
; 1005 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 1006 : ret = xmlLoadExtDtdDefaultValueThrDef;
mov ecx, DWORD PTR _xmlLoadExtDtdDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 1007 : xmlLoadExtDtdDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlLoadExtDtdDefaultValueThrDef, edx
; 1008 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 1009 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 1010 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefLoadExtDtdDefaultValue 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\globals.c
; COMDAT ___xmlLoadExtDtdDefaultValue
_TEXT SEGMENT
___xmlLoadExtDtdDefaultValue PROC ; COMDAT
; 997 : __xmlLoadExtDtdDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 998 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlLoadExt
; 999 : return (&xmlLoadExtDtdDefaultValue);
mov eax, OFFSET _xmlLoadExtDtdDefaultValue
jmp SHORT $LN1@xmlLoadExt
jmp SHORT $LN1@xmlLoadExt
$LN2@xmlLoadExt:
; 1000 : else
; 1001 : return (&xmlGetGlobalState()->xmlLoadExtDtdDefaultValue);
call _xmlGetGlobalState
add eax, 416 ; 000001a0H
$LN1@xmlLoadExt:
; 1002 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlLoadExtDtdDefaultValue 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\globals.c
; COMDAT _xmlThrDefLineNumbersDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefLineNumbersDefaultValue PROC ; COMDAT
; 986 : int xmlThrDefLineNumbersDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 987 : int ret;
; 988 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 989 : ret = xmlLineNumbersDefaultValueThrDef;
mov ecx, DWORD PTR _xmlLineNumbersDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 990 : xmlLineNumbersDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlLineNumbersDefaultValueThrDef, edx
; 991 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 992 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 993 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefLineNumbersDefaultValue 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\globals.c
; COMDAT ___xmlLineNumbersDefaultValue
_TEXT SEGMENT
___xmlLineNumbersDefaultValue PROC ; COMDAT
; 980 : __xmlLineNumbersDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 981 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlLineNum
; 982 : return (&xmlLineNumbersDefaultValue);
mov eax, OFFSET _xmlLineNumbersDefaultValue
jmp SHORT $LN1@xmlLineNum
jmp SHORT $LN1@xmlLineNum
$LN2@xmlLineNum:
; 983 : else
; 984 : return (&xmlGetGlobalState()->xmlLineNumbersDefaultValue);
call _xmlGetGlobalState
add eax, 412 ; 0000019cH
$LN1@xmlLineNum:
; 985 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlLineNumbersDefaultValue 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\globals.c
; COMDAT _xmlThrDefKeepBlanksDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefKeepBlanksDefaultValue PROC ; COMDAT
; 969 : int xmlThrDefKeepBlanksDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 970 : int ret;
; 971 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 972 : ret = xmlKeepBlanksDefaultValueThrDef;
mov ecx, DWORD PTR _xmlKeepBlanksDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 973 : xmlKeepBlanksDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlKeepBlanksDefaultValueThrDef, edx
; 974 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 975 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 976 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefKeepBlanksDefaultValue 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\globals.c
; COMDAT ___xmlKeepBlanksDefaultValue
_TEXT SEGMENT
___xmlKeepBlanksDefaultValue PROC ; COMDAT
; 963 : __xmlKeepBlanksDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 964 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlKeepBla
; 965 : return (&xmlKeepBlanksDefaultValue);
mov eax, OFFSET _xmlKeepBlanksDefaultValue
jmp SHORT $LN1@xmlKeepBla
jmp SHORT $LN1@xmlKeepBla
$LN2@xmlKeepBla:
; 966 : else
; 967 : return (&xmlGetGlobalState()->xmlKeepBlanksDefaultValue);
call _xmlGetGlobalState
add eax, 408 ; 00000198H
$LN1@xmlKeepBla:
; 968 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlKeepBlanksDefaultValue 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\globals.c
; COMDAT _xmlThrDefTreeIndentString
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefTreeIndentString PROC ; COMDAT
; 952 : const char * xmlThrDefTreeIndentString(const char * v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 953 : const char * ret;
; 954 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 955 : ret = xmlTreeIndentStringThrDef;
mov ecx, DWORD PTR _xmlTreeIndentStringThrDef
mov DWORD PTR _ret$[ebp], ecx
; 956 : xmlTreeIndentStringThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlTreeIndentStringThrDef, edx
; 957 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 958 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 959 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefTreeIndentString 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\globals.c
; COMDAT ___xmlTreeIndentString
_TEXT SEGMENT
___xmlTreeIndentString PROC ; COMDAT
; 946 : __xmlTreeIndentString(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 947 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlTreeInd
; 948 : return (&xmlTreeIndentString);
mov eax, OFFSET _xmlTreeIndentString
jmp SHORT $LN1@xmlTreeInd
jmp SHORT $LN1@xmlTreeInd
$LN2@xmlTreeInd:
; 949 : else
; 950 : return (&xmlGetGlobalState()->xmlTreeIndentString);
call _xmlGetGlobalState
add eax, 436 ; 000001b4H
$LN1@xmlTreeInd:
; 951 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlTreeIndentString 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\globals.c
; COMDAT _xmlThrDefIndentTreeOutput
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefIndentTreeOutput PROC ; COMDAT
; 935 : int xmlThrDefIndentTreeOutput(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 936 : int ret;
; 937 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 938 : ret = xmlIndentTreeOutputThrDef;
mov ecx, DWORD PTR _xmlIndentTreeOutputThrDef
mov DWORD PTR _ret$[ebp], ecx
; 939 : xmlIndentTreeOutputThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlIndentTreeOutputThrDef, edx
; 940 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 941 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 942 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefIndentTreeOutput 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\globals.c
; COMDAT ___xmlIndentTreeOutput
_TEXT SEGMENT
___xmlIndentTreeOutput PROC ; COMDAT
; 929 : __xmlIndentTreeOutput(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 930 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlIndentT
; 931 : return (&xmlIndentTreeOutput);
mov eax, OFFSET _xmlIndentTreeOutput
jmp SHORT $LN1@xmlIndentT
jmp SHORT $LN1@xmlIndentT
$LN2@xmlIndentT:
; 932 : else
; 933 : return (&xmlGetGlobalState()->xmlIndentTreeOutput);
call _xmlGetGlobalState
add eax, 432 ; 000001b0H
$LN1@xmlIndentT:
; 934 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlIndentTreeOutput 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\globals.c
; COMDAT _xmlThrDefGetWarningsDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefGetWarningsDefaultValue PROC ; COMDAT
; 918 : int xmlThrDefGetWarningsDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 919 : int ret;
; 920 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 921 : ret = xmlGetWarningsDefaultValueThrDef;
mov ecx, DWORD PTR _xmlGetWarningsDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 922 : xmlGetWarningsDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlGetWarningsDefaultValueThrDef, edx
; 923 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 924 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 925 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefGetWarningsDefaultValue 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\globals.c
; COMDAT ___xmlGetWarningsDefaultValue
_TEXT SEGMENT
___xmlGetWarningsDefaultValue PROC ; COMDAT
; 912 : __xmlGetWarningsDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 913 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlGetWarn
; 914 : return (&xmlGetWarningsDefaultValue);
mov eax, OFFSET _xmlGetWarningsDefaultValue
jmp SHORT $LN1@xmlGetWarn
jmp SHORT $LN1@xmlGetWarn
$LN2@xmlGetWarn:
; 915 : else
; 916 : return (&xmlGetGlobalState()->xmlGetWarningsDefaultValue);
call _xmlGetGlobalState
add eax, 404 ; 00000194H
$LN1@xmlGetWarn:
; 917 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlGetWarningsDefaultValue 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\globals.c
; COMDAT ___xmlStructuredErrorContext
_TEXT SEGMENT
___xmlStructuredErrorContext PROC ; COMDAT
; 903 : __xmlStructuredErrorContext(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 904 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlStructu
; 905 : return (&xmlStructuredErrorContext);
mov eax, OFFSET _xmlStructuredErrorContext
jmp SHORT $LN1@xmlStructu
jmp SHORT $LN1@xmlStructu
$LN2@xmlStructu:
; 906 : else
; 907 : return (&xmlGetGlobalState()->xmlStructuredErrorContext);
call _xmlGetGlobalState
add eax, 512 ; 00000200H
$LN1@xmlStructu:
; 908 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlStructuredErrorContext 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\globals.c
; COMDAT ___xmlGenericErrorContext
_TEXT SEGMENT
___xmlGenericErrorContext PROC ; COMDAT
; 894 : __xmlGenericErrorContext(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 895 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlGeneric
; 896 : return (&xmlGenericErrorContext);
mov eax, OFFSET _xmlGenericErrorContext
jmp SHORT $LN1@xmlGeneric
jmp SHORT $LN1@xmlGeneric
$LN2@xmlGeneric:
; 897 : else
; 898 : return (&xmlGetGlobalState()->xmlGenericErrorContext);
call _xmlGetGlobalState
add eax, 380 ; 0000017cH
$LN1@xmlGeneric:
; 899 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlGenericErrorContext 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\globals.c
; COMDAT ___xmlStructuredError
_TEXT SEGMENT
___xmlStructuredError PROC ; COMDAT
; 885 : __xmlStructuredError(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 886 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlStructu
; 887 : return (&xmlStructuredError);
mov eax, OFFSET _xmlStructuredError
jmp SHORT $LN1@xmlStructu
jmp SHORT $LN1@xmlStructu
$LN2@xmlStructu:
; 888 : else
; 889 : return (&xmlGetGlobalState()->xmlStructuredError);
call _xmlGetGlobalState
add eax, 376 ; 00000178H
$LN1@xmlStructu:
; 890 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlStructuredError 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\globals.c
; COMDAT ___xmlGenericError
_TEXT SEGMENT
___xmlGenericError PROC ; COMDAT
; 876 : __xmlGenericError(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 877 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlGeneric
; 878 : return (&xmlGenericError);
mov eax, OFFSET _xmlGenericError
jmp SHORT $LN1@xmlGeneric
jmp SHORT $LN1@xmlGeneric
$LN2@xmlGeneric:
; 879 : else
; 880 : return (&xmlGetGlobalState()->xmlGenericError);
call _xmlGetGlobalState
add eax, 372 ; 00000174H
$LN1@xmlGeneric:
; 881 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlGenericError 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\globals.c
; COMDAT _xmlThrDefDoValidityCheckingDefaultValue
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefDoValidityCheckingDefaultValue PROC ; COMDAT
; 865 : int xmlThrDefDoValidityCheckingDefaultValue(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 866 : int ret;
; 867 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 868 : ret = xmlDoValidityCheckingDefaultValueThrDef;
mov ecx, DWORD PTR _xmlDoValidityCheckingDefaultValueThrDef
mov DWORD PTR _ret$[ebp], ecx
; 869 : xmlDoValidityCheckingDefaultValueThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlDoValidityCheckingDefaultValueThrDef, edx
; 870 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 871 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 872 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefDoValidityCheckingDefaultValue 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\globals.c
; COMDAT ___xmlDoValidityCheckingDefaultValue
_TEXT SEGMENT
___xmlDoValidityCheckingDefaultValue PROC ; COMDAT
; 859 : __xmlDoValidityCheckingDefaultValue(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 860 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlDoValid
; 861 : return (&xmlDoValidityCheckingDefaultValue);
mov eax, OFFSET _xmlDoValidityCheckingDefaultValue
jmp SHORT $LN1@xmlDoValid
jmp SHORT $LN1@xmlDoValid
$LN2@xmlDoValid:
; 862 : else
; 863 : return (&xmlGetGlobalState()->xmlDoValidityCheckingDefaultValue);
call _xmlGetGlobalState
add eax, 400 ; 00000190H
$LN1@xmlDoValid:
; 864 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlDoValidityCheckingDefaultValue 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\globals.c
; COMDAT ___xmlDefaultSAXLocator
_TEXT SEGMENT
___xmlDefaultSAXLocator PROC ; COMDAT
; 850 : __xmlDefaultSAXLocator(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 851 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlDefault
; 852 : return (&xmlDefaultSAXLocator);
mov eax, OFFSET _xmlDefaultSAXLocator
jmp SHORT $LN1@xmlDefault
jmp SHORT $LN1@xmlDefault
$LN2@xmlDefault:
; 853 : else
; 854 : return (&xmlGetGlobalState()->xmlDefaultSAXLocator);
call _xmlGetGlobalState
add eax, 4
$LN1@xmlDefault:
; 855 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlDefaultSAXLocator 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\globals.c
; COMDAT ___xmlDefaultSAXHandler
_TEXT SEGMENT
___xmlDefaultSAXHandler PROC ; COMDAT
; 840 : __xmlDefaultSAXHandler(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 841 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlDefault
; 842 : return (&xmlDefaultSAXHandler);
mov eax, OFFSET _xmlDefaultSAXHandler
jmp SHORT $LN1@xmlDefault
jmp SHORT $LN1@xmlDefault
$LN2@xmlDefault:
; 843 : else
; 844 : return (&xmlGetGlobalState()->xmlDefaultSAXHandler);
call _xmlGetGlobalState
add eax, 20 ; 00000014H
$LN1@xmlDefault:
; 845 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlDefaultSAXHandler 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\globals.c
; COMDAT _xmlThrDefDefaultBufferSize
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefDefaultBufferSize PROC ; COMDAT
; 828 : int xmlThrDefDefaultBufferSize(int v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 829 : int ret;
; 830 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 831 : ret = xmlDefaultBufferSizeThrDef;
mov ecx, DWORD PTR _xmlDefaultBufferSizeThrDef
mov DWORD PTR _ret$[ebp], ecx
; 832 : xmlDefaultBufferSizeThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlDefaultBufferSizeThrDef, edx
; 833 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 834 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 835 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefDefaultBufferSize 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\globals.c
; COMDAT ___xmlDefaultBufferSize
_TEXT SEGMENT
___xmlDefaultBufferSize PROC ; COMDAT
; 822 : __xmlDefaultBufferSize(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 823 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlDefault
; 824 : return (&xmlDefaultBufferSize);
mov eax, OFFSET _xmlDefaultBufferSize
jmp SHORT $LN1@xmlDefault
jmp SHORT $LN1@xmlDefault
$LN2@xmlDefault:
; 825 : else
; 826 : return (&xmlGetGlobalState()->xmlDefaultBufferSize);
call _xmlGetGlobalState
add eax, 392 ; 00000188H
$LN1@xmlDefault:
; 827 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlDefaultBufferSize 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\globals.c
; COMDAT _xmlThrDefBufferAllocScheme
_TEXT SEGMENT
_ret$ = -4 ; size = 4
_v$ = 8 ; size = 4
_xmlThrDefBufferAllocScheme PROC ; COMDAT
; 811 : xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 812 : xmlBufferAllocationScheme ret;
; 813 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 814 : ret = xmlBufferAllocSchemeThrDef;
mov ecx, DWORD PTR _xmlBufferAllocSchemeThrDef
mov DWORD PTR _ret$[ebp], ecx
; 815 : xmlBufferAllocSchemeThrDef = v;
mov edx, DWORD PTR _v$[ebp]
mov DWORD PTR _xmlBufferAllocSchemeThrDef, edx
; 816 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 817 : return ret;
mov eax, DWORD PTR _ret$[ebp]
; 818 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefBufferAllocScheme 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\globals.c
; COMDAT ___xmlBufferAllocScheme
_TEXT SEGMENT
___xmlBufferAllocScheme PROC ; COMDAT
; 805 : __xmlBufferAllocScheme(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 806 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlBufferA
; 807 : return (&xmlBufferAllocScheme);
mov eax, OFFSET _xmlBufferAllocScheme
jmp SHORT $LN1@xmlBufferA
jmp SHORT $LN1@xmlBufferA
$LN2@xmlBufferA:
; 808 : else
; 809 : return (&xmlGetGlobalState()->xmlBufferAllocScheme);
call _xmlGetGlobalState
add eax, 388 ; 00000184H
$LN1@xmlBufferA:
; 810 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlBufferAllocScheme 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\globals.c
; COMDAT ___oldXMLWDcompatibility
_TEXT SEGMENT
___oldXMLWDcompatibility PROC ; COMDAT
; 796 : __oldXMLWDcompatibility(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 797 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@oldXMLWDco
; 798 : return (&oldXMLWDcompatibility);
mov eax, OFFSET _oldXMLWDcompatibility
jmp SHORT $LN1@oldXMLWDco
jmp SHORT $LN1@oldXMLWDco
$LN2@oldXMLWDco:
; 799 : else
; 800 : return (&xmlGetGlobalState()->oldXMLWDcompatibility);
call _xmlGetGlobalState
add eax, 384 ; 00000180H
$LN1@oldXMLWDco:
; 801 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___oldXMLWDcompatibility 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\globals.c
; COMDAT ___xmlLastError
_TEXT SEGMENT
___xmlLastError PROC ; COMDAT
; 728 : __xmlLastError(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 729 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@xmlLastErr
; 730 : return (&xmlLastError);
mov eax, OFFSET _xmlLastError
jmp SHORT $LN1@xmlLastErr
jmp SHORT $LN1@xmlLastErr
$LN2@xmlLastErr:
; 731 : else
; 732 : return (&xmlGetGlobalState()->xmlLastError);
call _xmlGetGlobalState
add eax, 452 ; 000001c4H
$LN1@xmlLastErr:
; 733 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___xmlLastError 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\globals.c
; COMDAT ___htmlDefaultSAXHandler
_TEXT SEGMENT
___htmlDefaultSAXHandler PROC ; COMDAT
; 718 : __htmlDefaultSAXHandler(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 719 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@htmlDefaul
; 720 : return (&htmlDefaultSAXHandler);
mov eax, OFFSET _htmlDefaultSAXHandler
jmp SHORT $LN1@htmlDefaul
jmp SHORT $LN1@htmlDefaul
$LN2@htmlDefaul:
; 721 : else
; 722 : return (&xmlGetGlobalState()->htmlDefaultSAXHandler);
call _xmlGetGlobalState
add eax, 244 ; 000000f4H
$LN1@htmlDefaul:
; 723 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___htmlDefaultSAXHandler 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\globals.c
; COMDAT ___docbDefaultSAXHandler
_TEXT SEGMENT
___docbDefaultSAXHandler PROC ; COMDAT
; 707 : __docbDefaultSAXHandler(void) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 708 : if (IS_MAIN_THREAD)
call _xmlIsMainThread
test eax, eax
je SHORT $LN2@docbDefaul
; 709 : return (&docbDefaultSAXHandler);
mov eax, OFFSET _docbDefaultSAXHandler
jmp SHORT $LN1@docbDefaul
jmp SHORT $LN1@docbDefaul
$LN2@docbDefaul:
; 710 : else
; 711 : return (&xmlGetGlobalState()->docbDefaultSAXHandler);
call _xmlGetGlobalState
add eax, 132 ; 00000084H
$LN1@docbDefaul:
; 712 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
___docbDefaultSAXHandler 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\globals.c
; COMDAT _xmlThrDefParserInputBufferCreateFilenameDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlThrDefParserInputBufferCreateFilenameDefault PROC ; COMDAT
; 671 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 672 : xmlParserInputBufferCreateFilenameFunc old;
; 673 :
; 674 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 675 : old = xmlParserInputBufferCreateFilenameValueThrDef;
mov ecx, DWORD PTR _xmlParserInputBufferCreateFilenameValueThrDef
mov DWORD PTR _old$[ebp], ecx
; 676 : if (old == NULL) {
cmp DWORD PTR _old$[ebp], 0
jne SHORT $LN2@xmlThrDefP
; 677 : old = __xmlParserInputBufferCreateFilename;
mov DWORD PTR _old$[ebp], OFFSET ___xmlParserInputBufferCreateFilename
$LN2@xmlThrDefP:
; 678 : }
; 679 :
; 680 : xmlParserInputBufferCreateFilenameValueThrDef = func;
mov edx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlParserInputBufferCreateFilenameValueThrDef, edx
; 681 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 682 :
; 683 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 684 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefParserInputBufferCreateFilenameDefault 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\globals.c
; COMDAT _xmlThrDefOutputBufferCreateFilenameDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlThrDefOutputBufferCreateFilenameDefault PROC ; COMDAT
; 688 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 689 : xmlOutputBufferCreateFilenameFunc old;
; 690 :
; 691 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 692 : old = xmlOutputBufferCreateFilenameValueThrDef;
mov ecx, DWORD PTR _xmlOutputBufferCreateFilenameValueThrDef
mov DWORD PTR _old$[ebp], ecx
; 693 : #ifdef LIBXML_OUTPUT_ENABLED
; 694 : if (old == NULL) {
cmp DWORD PTR _old$[ebp], 0
jne SHORT $LN2@xmlThrDefO
; 695 : old = __xmlOutputBufferCreateFilename;
mov DWORD PTR _old$[ebp], OFFSET ___xmlOutputBufferCreateFilename
$LN2@xmlThrDefO:
; 696 : }
; 697 : #endif
; 698 : xmlOutputBufferCreateFilenameValueThrDef = func;
mov edx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlOutputBufferCreateFilenameValueThrDef, edx
; 699 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 700 :
; 701 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 702 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefOutputBufferCreateFilenameDefault 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\globals.c
; COMDAT _xmlThrDefDeregisterNodeDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlThrDefDeregisterNodeDefault PROC ; COMDAT
; 656 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 657 : xmlDeregisterNodeFunc old;
; 658 :
; 659 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 660 : old = xmlDeregisterNodeDefaultValueThrDef;
mov ecx, DWORD PTR _xmlDeregisterNodeDefaultValueThrDef
mov DWORD PTR _old$[ebp], ecx
; 661 :
; 662 : __xmlRegisterCallbacks = 1;
mov DWORD PTR ___xmlRegisterCallbacks, 1
; 663 : xmlDeregisterNodeDefaultValueThrDef = func;
mov edx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlDeregisterNodeDefaultValueThrDef, edx
; 664 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 665 :
; 666 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 667 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefDeregisterNodeDefault 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\globals.c
; COMDAT _xmlDeregisterNodeDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlDeregisterNodeDefault PROC ; COMDAT
; 646 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 647 : xmlDeregisterNodeFunc old = xmlDeregisterNodeDefaultValue;
mov eax, DWORD PTR _xmlDeregisterNodeDefaultValue
mov DWORD PTR _old$[ebp], eax
; 648 :
; 649 : __xmlRegisterCallbacks = 1;
mov DWORD PTR ___xmlRegisterCallbacks, 1
; 650 : xmlDeregisterNodeDefaultValue = func;
mov ecx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlDeregisterNodeDefaultValue, ecx
; 651 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 652 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlDeregisterNodeDefault 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\globals.c
; COMDAT _xmlThrDefRegisterNodeDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlThrDefRegisterNodeDefault PROC ; COMDAT
; 623 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 624 : xmlRegisterNodeFunc old;
; 625 :
; 626 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 627 : old = xmlRegisterNodeDefaultValueThrDef;
mov ecx, DWORD PTR _xmlRegisterNodeDefaultValueThrDef
mov DWORD PTR _old$[ebp], ecx
; 628 :
; 629 : __xmlRegisterCallbacks = 1;
mov DWORD PTR ___xmlRegisterCallbacks, 1
; 630 : xmlRegisterNodeDefaultValueThrDef = func;
mov edx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlRegisterNodeDefaultValueThrDef, edx
; 631 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 632 :
; 633 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 634 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlThrDefRegisterNodeDefault 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\globals.c
; COMDAT _xmlRegisterNodeDefault
_TEXT SEGMENT
_old$ = -4 ; size = 4
_func$ = 8 ; size = 4
_xmlRegisterNodeDefault PROC ; COMDAT
; 613 : {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 614 : xmlRegisterNodeFunc old = xmlRegisterNodeDefaultValue;
mov eax, DWORD PTR _xmlRegisterNodeDefaultValue
mov DWORD PTR _old$[ebp], eax
; 615 :
; 616 : __xmlRegisterCallbacks = 1;
mov DWORD PTR ___xmlRegisterCallbacks, 1
; 617 : xmlRegisterNodeDefaultValue = func;
mov ecx, DWORD PTR _func$[ebp]
mov DWORD PTR _xmlRegisterNodeDefaultValue, ecx
; 618 : return(old);
mov eax, DWORD PTR _old$[ebp]
; 619 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlRegisterNodeDefault 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\globals.c
; COMDAT _xmlThrDefSetStructuredErrorFunc
_TEXT SEGMENT
_ctx$ = 8 ; size = 4
_handler$ = 12 ; size = 4
_xmlThrDefSetStructuredErrorFunc PROC ; COMDAT
; 596 : xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 597 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 598 : xmlStructuredErrorContextThrDef = ctx;
mov ecx, DWORD PTR _ctx$[ebp]
mov DWORD PTR _xmlStructuredErrorContextThrDef, ecx
; 599 : xmlStructuredErrorThrDef = handler;
mov edx, DWORD PTR _handler$[ebp]
mov DWORD PTR _xmlStructuredErrorThrDef, edx
; 600 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 601 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlThrDefSetStructuredErrorFunc 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\globals.c
; COMDAT _xmlThrDefSetGenericErrorFunc
_TEXT SEGMENT
_ctx$ = 8 ; size = 4
_handler$ = 12 ; size = 4
_xmlThrDefSetGenericErrorFunc PROC ; COMDAT
; 585 : xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler) {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 586 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 587 : xmlGenericErrorContextThrDef = ctx;
mov ecx, DWORD PTR _ctx$[ebp]
mov DWORD PTR _xmlGenericErrorContextThrDef, ecx
; 588 : if (handler != NULL)
cmp DWORD PTR _handler$[ebp], 0
je SHORT $LN2@xmlThrDefS
; 589 : xmlGenericErrorThrDef = handler;
mov edx, DWORD PTR _handler$[ebp]
mov DWORD PTR _xmlGenericErrorThrDef, edx
jmp SHORT $LN3@xmlThrDefS
$LN2@xmlThrDefS:
; 590 : else
; 591 : xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
mov DWORD PTR _xmlGenericErrorThrDef, OFFSET _xmlGenericErrorDefaultFunc
$LN3@xmlThrDefS:
; 592 : xmlMutexUnlock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexUnlock
add esp, 4
; 593 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlThrDefSetGenericErrorFunc 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\globals.c
; COMDAT _xmlInitializeGlobalState
_TEXT SEGMENT
_gs$ = 8 ; size = 4
_xmlInitializeGlobalState PROC ; COMDAT
; 507 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 508 : #ifdef DEBUG_GLOBALS
; 509 : fprintf(stderr, "Initializing globals at %lu for thread %d\n",
; 510 : (unsigned long) gs, xmlGetThreadId());
; 511 : #endif
; 512 :
; 513 : /*
; 514 : * Perform initialization as required by libxml
; 515 : */
; 516 : if (xmlThrDefMutex == NULL)
cmp DWORD PTR _xmlThrDefMutex, 0
jne SHORT $LN2@xmlInitial
; 517 : xmlInitGlobals();
call _xmlInitGlobals
$LN2@xmlInitial:
; 518 :
; 519 : xmlMutexLock(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlMutexLock
add esp, 4
; 520 :
; 521 : #if defined(LIBXML_DOCB_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
; 522 : initdocbDefaultSAXHandler(&gs->docbDefaultSAXHandler);
mov ecx, DWORD PTR _gs$[ebp]
add ecx, 132 ; 00000084H
push ecx
call _initdocbDefaultSAXHandler
add esp, 4
; 523 : #endif
; 524 : #if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_LEGACY_ENABLED) && defined(LIBXML_SAX1_ENABLED)
; 525 : inithtmlDefaultSAXHandler(&gs->htmlDefaultSAXHandler);
mov edx, DWORD PTR _gs$[ebp]
add edx, 244 ; 000000f4H
push edx
call _inithtmlDefaultSAXHandler
add esp, 4
; 526 : #endif
; 527 :
; 528 : gs->oldXMLWDcompatibility = 0;
mov eax, DWORD PTR _gs$[ebp]
mov DWORD PTR [eax+384], 0
; 529 : gs->xmlBufferAllocScheme = xmlBufferAllocSchemeThrDef;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlBufferAllocSchemeThrDef
mov DWORD PTR [ecx+388], edx
; 530 : gs->xmlDefaultBufferSize = xmlDefaultBufferSizeThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlDefaultBufferSizeThrDef
mov DWORD PTR [eax+392], ecx
; 531 : #if defined(LIBXML_SAX1_ENABLED) && defined(LIBXML_LEGACY_ENABLED)
; 532 : initxmlDefaultSAXHandler(&gs->xmlDefaultSAXHandler, 1);
push 1
mov edx, DWORD PTR _gs$[ebp]
add edx, 20 ; 00000014H
push edx
call _initxmlDefaultSAXHandler
add esp, 8
; 533 : #endif /* LIBXML_SAX1_ENABLED */
; 534 : gs->xmlDefaultSAXLocator.getPublicId = xmlSAX2GetPublicId;
mov eax, DWORD PTR _gs$[ebp]
mov DWORD PTR [eax+4], OFFSET _xmlSAX2GetPublicId
; 535 : gs->xmlDefaultSAXLocator.getSystemId = xmlSAX2GetSystemId;
mov ecx, DWORD PTR _gs$[ebp]
mov DWORD PTR [ecx+8], OFFSET _xmlSAX2GetSystemId
; 536 : gs->xmlDefaultSAXLocator.getLineNumber = xmlSAX2GetLineNumber;
mov edx, DWORD PTR _gs$[ebp]
mov DWORD PTR [edx+12], OFFSET _xmlSAX2GetLineNumber
; 537 : gs->xmlDefaultSAXLocator.getColumnNumber = xmlSAX2GetColumnNumber;
mov eax, DWORD PTR _gs$[ebp]
mov DWORD PTR [eax+16], OFFSET _xmlSAX2GetColumnNumber
; 538 : gs->xmlDoValidityCheckingDefaultValue =
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlDoValidityCheckingDefaultValueThrDef
mov DWORD PTR [ecx+400], edx
; 539 : xmlDoValidityCheckingDefaultValueThrDef;
; 540 : #if defined(DEBUG_MEMORY_LOCATION) | defined(DEBUG_MEMORY)
; 541 : gs->xmlFree = (xmlFreeFunc) xmlMemFree;
; 542 : gs->xmlMalloc = (xmlMallocFunc) xmlMemMalloc;
; 543 : gs->xmlMallocAtomic = (xmlMallocFunc) xmlMemMalloc;
; 544 : gs->xmlRealloc = (xmlReallocFunc) xmlMemRealloc;
; 545 : gs->xmlMemStrdup = (xmlStrdupFunc) xmlMemoryStrdup;
; 546 : #else
; 547 : gs->xmlFree = (xmlFreeFunc) free;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR __imp__free
mov DWORD PTR [eax+356], ecx
; 548 : gs->xmlMalloc = (xmlMallocFunc) malloc;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR __imp__malloc
mov DWORD PTR [edx+360], eax
; 549 : gs->xmlMallocAtomic = (xmlMallocFunc) malloc;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR __imp__malloc
mov DWORD PTR [ecx+448], edx
; 550 : gs->xmlRealloc = (xmlReallocFunc) realloc;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR __imp__realloc
mov DWORD PTR [eax+368], ecx
; 551 : gs->xmlMemStrdup = (xmlStrdupFunc) xmlStrdup;
mov edx, DWORD PTR _gs$[ebp]
mov DWORD PTR [edx+364], OFFSET _xmlStrdup
; 552 : #endif
; 553 : gs->xmlGetWarningsDefaultValue = xmlGetWarningsDefaultValueThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlGetWarningsDefaultValueThrDef
mov DWORD PTR [eax+404], ecx
; 554 : gs->xmlIndentTreeOutput = xmlIndentTreeOutputThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlIndentTreeOutputThrDef
mov DWORD PTR [edx+432], eax
; 555 : gs->xmlTreeIndentString = xmlTreeIndentStringThrDef;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlTreeIndentStringThrDef
mov DWORD PTR [ecx+436], edx
; 556 : gs->xmlKeepBlanksDefaultValue = xmlKeepBlanksDefaultValueThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlKeepBlanksDefaultValueThrDef
mov DWORD PTR [eax+408], ecx
; 557 : gs->xmlLineNumbersDefaultValue = xmlLineNumbersDefaultValueThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlLineNumbersDefaultValueThrDef
mov DWORD PTR [edx+412], eax
; 558 : gs->xmlLoadExtDtdDefaultValue = xmlLoadExtDtdDefaultValueThrDef;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlLoadExtDtdDefaultValueThrDef
mov DWORD PTR [ecx+416], edx
; 559 : gs->xmlParserDebugEntities = xmlParserDebugEntitiesThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlParserDebugEntitiesThrDef
mov DWORD PTR [eax+420], ecx
; 560 : gs->xmlParserVersion = LIBXML_VERSION_STRING;
mov edx, DWORD PTR _gs$[ebp]
mov DWORD PTR [edx], OFFSET ??_C@_05BGCJPHN@20909@
; 561 : gs->xmlPedanticParserDefaultValue = xmlPedanticParserDefaultValueThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlPedanticParserDefaultValueThrDef
mov DWORD PTR [eax+424], ecx
; 562 : gs->xmlSaveNoEmptyTags = xmlSaveNoEmptyTagsThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlSaveNoEmptyTagsThrDef
mov DWORD PTR [edx+428], eax
; 563 : gs->xmlSubstituteEntitiesDefaultValue =
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlSubstituteEntitiesDefaultValueThrDef
mov DWORD PTR [ecx+396], edx
; 564 : xmlSubstituteEntitiesDefaultValueThrDef;
; 565 :
; 566 : gs->xmlGenericError = xmlGenericErrorThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlGenericErrorThrDef
mov DWORD PTR [eax+372], ecx
; 567 : gs->xmlStructuredError = xmlStructuredErrorThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlStructuredErrorThrDef
mov DWORD PTR [edx+376], eax
; 568 : gs->xmlGenericErrorContext = xmlGenericErrorContextThrDef;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlGenericErrorContextThrDef
mov DWORD PTR [ecx+380], edx
; 569 : gs->xmlStructuredErrorContext = xmlStructuredErrorContextThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlStructuredErrorContextThrDef
mov DWORD PTR [eax+512], ecx
; 570 : gs->xmlRegisterNodeDefaultValue = xmlRegisterNodeDefaultValueThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlRegisterNodeDefaultValueThrDef
mov DWORD PTR [edx+440], eax
; 571 : gs->xmlDeregisterNodeDefaultValue = xmlDeregisterNodeDefaultValueThrDef;
mov ecx, DWORD PTR _gs$[ebp]
mov edx, DWORD PTR _xmlDeregisterNodeDefaultValueThrDef
mov DWORD PTR [ecx+444], edx
; 572 :
; 573 : gs->xmlParserInputBufferCreateFilenameValue = xmlParserInputBufferCreateFilenameValueThrDef;
mov eax, DWORD PTR _gs$[ebp]
mov ecx, DWORD PTR _xmlParserInputBufferCreateFilenameValueThrDef
mov DWORD PTR [eax+504], ecx
; 574 : gs->xmlOutputBufferCreateFilenameValue = xmlOutputBufferCreateFilenameValueThrDef;
mov edx, DWORD PTR _gs$[ebp]
mov eax, DWORD PTR _xmlOutputBufferCreateFilenameValueThrDef
mov DWORD PTR [edx+508], eax
; 575 : memset(&gs->xmlLastError, 0, sizeof(xmlError));
push 52 ; 00000034H
push 0
mov ecx, DWORD PTR _gs$[ebp]
add ecx, 452 ; 000001c4H
push ecx
call _memset
add esp, 12 ; 0000000cH
; 576 :
; 577 : xmlMutexUnlock(xmlThrDefMutex);
mov edx, DWORD PTR _xmlThrDefMutex
push edx
call _xmlMutexUnlock
add esp, 4
; 578 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlInitializeGlobalState 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\globals.c
; COMDAT _xmlCleanupGlobals
_TEXT SEGMENT
_xmlCleanupGlobals PROC ; COMDAT
; 59 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 60 : if (xmlThrDefMutex != NULL) {
cmp DWORD PTR _xmlThrDefMutex, 0
je SHORT $LN2@xmlCleanup
; 61 : xmlFreeMutex(xmlThrDefMutex);
mov eax, DWORD PTR _xmlThrDefMutex
push eax
call _xmlFreeMutex
add esp, 4
; 62 : xmlThrDefMutex = NULL;
mov DWORD PTR _xmlThrDefMutex, 0
$LN2@xmlCleanup:
; 63 : }
; 64 : __xmlGlobalInitMutexDestroy();
call ___xmlGlobalInitMutexDestroy
; 65 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlCleanupGlobals 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\globals.c
; COMDAT _xmlInitGlobals
_TEXT SEGMENT
_xmlInitGlobals PROC ; COMDAT
; 48 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DB69A600_globals@c
call @__CheckForDebuggerJustMyCode@4
; 49 : if (xmlThrDefMutex == NULL)
cmp DWORD PTR _xmlThrDefMutex, 0
jne SHORT $LN1@xmlInitGlo
; 50 : xmlThrDefMutex = xmlNewMutex();
call _xmlNewMutex
mov DWORD PTR _xmlThrDefMutex, eax
$LN1@xmlInitGlo:
; 51 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlInitGlobals ENDP
_TEXT ENDS
END
|
assembly/lab6/src/task1/dos.asm | sabertazimi/hust-lab | 29 | 4917 | .386
code segment use16 para public 'code'
assume cs: code
start:
mov ax, 3510h ; 获取10h的中断矢量
int 21h ; 段址保存在 es, 偏移址保存在 bx
mov ah, 4ch
int 21h
code ends
end start
|
Cubical/HITs/AssocList/Base.agda | dan-iel-lee/cubical | 0 | 16469 | {-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.AssocList.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat using (ℕ; _+_)
private
variable
ℓ : Level
A : Type ℓ
infixr 5 ⟨_,_⟩∷_
data AssocList (A : Type ℓ) : Type ℓ where
⟨⟩ : AssocList A
⟨_,_⟩∷_ : (a : A) (n : ℕ) (xs : AssocList A) → AssocList A
per : ∀ a b xs → ⟨ a , 1 ⟩∷ ⟨ b , 1 ⟩∷ xs
≡ ⟨ b , 1 ⟩∷ ⟨ a , 1 ⟩∷ xs
agg : ∀ a m n xs → ⟨ a , m ⟩∷ ⟨ a , n ⟩∷ xs
≡ ⟨ a , m + n ⟩∷ xs
del : ∀ a xs → ⟨ a , 0 ⟩∷ xs ≡ xs
trunc : isSet (AssocList A)
pattern ⟨_⟩ a = ⟨ a , 1 ⟩∷ ⟨⟩
-- Elimination and recursion principle for association lists
module Elim {ℓ'} {B : AssocList A → Type ℓ'}
(⟨⟩* : B ⟨⟩) (⟨_,_⟩∷*_ : (x : A) (n : ℕ) {xs : AssocList A} → B xs → B (⟨ x , n ⟩∷ xs))
(per* : (x y : A) {xs : AssocList A} (b : B xs)
→ PathP (λ i → B (per x y xs i)) (⟨ x , 1 ⟩∷* ⟨ y , 1 ⟩∷* b) (⟨ y , 1 ⟩∷* ⟨ x , 1 ⟩∷* b))
(agg* : (x : A) (m n : ℕ) {xs : AssocList A} (b : B xs)
→ PathP (λ i → B (agg x m n xs i)) (⟨ x , m ⟩∷* ⟨ x , n ⟩∷* b) (⟨ x , m + n ⟩∷* b))
(del* : (x : A) {xs : AssocList A} (b : B xs)
→ PathP (λ i → B (del x xs i)) (⟨ x , 0 ⟩∷* b) b)
(trunc* : (xs : AssocList A) → isSet (B xs)) where
f : (xs : AssocList A) → B xs
f ⟨⟩ = ⟨⟩*
f (⟨ a , n ⟩∷ xs) = ⟨ a , n ⟩∷* f xs
f (per a b xs i) = per* a b (f xs) i
f (agg a m n xs i) = agg* a m n (f xs) i
f (del a xs i) = del* a (f xs) i
f (trunc xs ys p q i j) = isOfHLevel→isOfHLevelDep 2 trunc* (f xs) (f ys) (cong f p) (cong f q) (trunc xs ys p q) i j
module ElimProp {ℓ'} {B : AssocList A → Type ℓ'} (BProp : {xs : AssocList A} → isProp (B xs))
(⟨⟩* : B ⟨⟩) (⟨_,_⟩∷*_ : (x : A) (n : ℕ) {xs : AssocList A} → B xs → B (⟨ x , n ⟩∷ xs)) where
f : (xs : AssocList A) → B xs
f = Elim.f ⟨⟩* ⟨_,_⟩∷*_
(λ x y {xs} b → toPathP (BProp (transp (λ i → B (per x y xs i)) i0 (⟨ x , 1 ⟩∷* ⟨ y , 1 ⟩∷* b)) (⟨ y , 1 ⟩∷* ⟨ x , 1 ⟩∷* b)))
(λ x m n {xs} b → toPathP (BProp (transp (λ i → B (agg x m n xs i)) i0 (⟨ x , m ⟩∷* ⟨ x , n ⟩∷* b)) (⟨ x , m + n ⟩∷* b)))
(λ x {xs} b → toPathP (BProp (transp (λ i → B (del x xs i)) i0 (⟨ x , 0 ⟩∷* b)) b))
(λ xs → isProp→isSet BProp)
module Rec {ℓ'} {B : Type ℓ'} (BType : isSet B)
(⟨⟩* : B) (⟨_,_⟩∷*_ : (x : A) (n : ℕ) → B → B)
(per* : (x y : A) (b : B) → (⟨ x , 1 ⟩∷* ⟨ y , 1 ⟩∷* b) ≡ (⟨ y , 1 ⟩∷* ⟨ x , 1 ⟩∷* b))
(agg* : (x : A) (m n : ℕ) (b : B) → (⟨ x , m ⟩∷* ⟨ x , n ⟩∷* b) ≡ (⟨ x , m + n ⟩∷* b))
(del* : (x : A) (b : B) → (⟨ x , 0 ⟩∷* b) ≡ b) where
f : AssocList A → B
f = Elim.f ⟨⟩* (λ x n b → ⟨ x , n ⟩∷* b) (λ x y b → per* x y b) (λ x m n b → agg* x m n b) (λ x b → del* x b) (λ _ → BType)
|
oeis/036/A036221.asm | neoneye/loda-programs | 11 | 94152 | <reponame>neoneye/loda-programs
; A036221: Expansion of 1/(1-3*x)^8; 8-fold convolution of A000244 (powers of 3).
; 1,24,324,3240,26730,192456,1250964,7505784,42220035,225173520,1148384952,5637526128,26778249108,123591918960,556163635320,2447119995408,10553204980197,44695926974952,186233029062300,764535592992600,3096369151620030,12385476606480120,48978930216535020,191656683456006600,742669648392025575,2851851449825378208,10858972828181247792,41022786239795824992,153835448399234343720,572904428521286521440,2119746385528760129328,7795196385492859830432,28501186784458268755017,103640679216211886381880
mov $1,3
pow $1,$0
mov $2,$0
add $2,7
bin $2,$0
mul $1,$2
mov $0,$1
|
libsrc/target/cpm/time/time.asm | dikdom/z88dk | 1 | 103695 | ;
; time_t time(time_t *)
;
; Return number of seconds since epoch
;
; Our epoch is the UNIX epoch of 00:00:00 1/1/1970
; CP/M epoch is 1/1/1978
;
; CPM+ and MPM have BDOS function #105 to get time/date, it looks this function
; sometimes shortcuts to the hardware directly, no BIOS implementation
;
; this module should work with the following operating systems:
;
; CPM 3.x (aka "CPM+")
; MP/M 2.x and higher
; TurboDOS 1.2x, 1.3x, and, presumably, higher
; Epson PX4/PX8 (direct BIOS access) and all the CP/M 3 - like BIOSes
; Not (of course) CPM 1.x and 2.x, which have no real-time functions
; ,nor QX/M, its clock is not BCD based. A specific library could be necessary.
;
; --------
; $Id: time.asm,v 1.4 2016-03-30 09:19:59 dom Exp $
;
SECTION smc_clib
PUBLIC time
PUBLIC _time
EXTERN l_mult, l_long_mult, l_long_add, __bdos
time:
_time:
IF __CPU_INTEL__ || __CPU_GBZ80__
ld hl,0 ; set zero for early return
ld de,hl
ret
ELSE
ld c,12
call __bdos ; check version
cp 02Fh ; MP/M II or later (cpm3..) ?
ld hl,0 ; set zero for early return
ld de,hl
ret C ; return if earlier than MP/M II (i.e. CP/M 2.2)
pop de
pop hl
push hl
push de
push ix ; save callers ix
ld a,h
or l
jr nz,haveparm
ld hl,jdate ; use jdate as a foo parameter location
haveparm:
push hl
ld hl,(1)
push hl
ld de,057h ; CPM Plus "userf" custom Amstrad BIOS calls
add hl,de
ld a,(hl)
pop hl
cp 0xc3 ; jp instruction (existing BIOS entry)?
jr z,nodtbios ; if so, skip not-working direct DT BIOS entry
ld de,04bh ; TIME BIOS entry (CP/M 3 but present also elsewhere)
add hl,de
ld a,(hl)
cp 0xc3 ; jp instruction (existing BIOS entry)?
jr nz,nodtbios
ld de,timegot
push de
ld de,px_year
xor a
ld (de),a
ld c,a
jp (hl)
timegot:
ld a,(px_year)
and a
jr z,cpm3_bios
; We found a value in px_year, so it is not a CP/M 3 BIOS entry, but an Epson laptop variant.
; We need to mix Year, Month and Day to make jdate
call unbcd ; decode year and put in HL
;ld a,l
; TODO: Leap year every 4 years only, needs refinement ..
and 3 ; leap year ?
jr nz,noleapsmc
ld (february),a ; SMC patch for leap year: replace DEC HL w/NOP
noleapsmc:
ld b,l ; 1 byte is enough (max year count is 99)
ld de,365
ld hl,8035+1 ; Days between [01/01/2000] and [01/01/1978] +1 day to compensate the leap year in 2000
yrloop:
ld a,b
and 3 ; leap year ?
jr nz,noleap
inc hl
noleap:
add hl,de
djnz yrloop
push hl
; months
ld a,(jdate) ; Month
call unbcd
dec a
jr z,month_done
ld de,mdays
ld h,0
ld l,a
add hl,hl ; words
add hl,de
ld a,(hl)
inc hl
ld h,(hl)
ld l,a
february:
dec hl
month_done:
pop de
add hl,de
push hl
;
ld a,(jdate+1) ; Day in the month
call unbcd
pop de
add hl,de
ld (jdate),hl
jr nompmii
cpm3_bios:
; It is a true CP/M 3 BIOS, so pick the resulting clock data and copy to jdate
ld hl,(1)
ld de,(-0ch) ; System Control Block
add hl,de
ld de,jdate
ld bc,5
ldir
jr nompmii
nodtbios:
ld de,jdate ; pointer to date/time bufr
ld c,105 ; C=return date/time function
call __bdos ; get date/time
push af
ld c,12
call __bdos ; check version
pop af
ld c,a
ld a,l
cp 02Fh ; MP/M II or later (cpm3..) ?
jr c,nompmii
ld a,c ; if so we get the seconds from the L reg
ld (secs),a
; we jump here directly if we have dosplus or a CP/M version <=MPM II
nompmii:
ld a,(secs)
call unbcd ; decode seconds and put in HL
push hl
ld a,(mins)
call unbcd ; decode minutes and put in HL
ld de,60 ; seconds in minute
call l_mult ; hl now is number of seconds
pop bc
add hl,bc ; hl now is seconds + mins * 60
push hl ; save hl
ld a,(hours)
call unbcd ; decode minutes and put in HL
ld de,0
push de
push hl
ld hl,3600 ; seconds in hours (de=0)
call l_long_mult
pop bc ; get seconds + mins back
push de
push hl
ld l,c
ld h,b
call l_long_add
push de
push hl
ld hl,(jdate)
ld de,0
push de
push hl
ld hl,2921 ; shift epoch to 1970 (diff between 12/31/1977 and 01/01/1970)
; in CP/M day '1' is 1/1/1978
call l_long_add
push de
push hl
ld hl,20864
ld de,1 ; load 86400 to dehl, 3600 seconds x 24 hours
call l_long_mult
call l_long_add
pop ix
ld (ix+0),l
ld (ix+1),h
ld (ix+2),e
ld (ix+3),d
pop ix ;restore callers ix
ret
unbcd:
push bc
ld c,a
and 0f0h
srl a
ld b,a
srl a
srl a
add a,b
ld b,a
ld a,c
and 0fh
add a,b
pop bc
ld l,a
ld h,0
ret
SECTION bss_clib
px_year: defb 0 ; Epson PX BIOSes load it with the current year
jdate: defs 2 ; Day count, starting on 1st January 1978 (add 2922 days to move epoch to 1970)
hours: defs 1
mins: defs 1
secs: defs 1
jdatepx2: defs 6 ; safety margin
SECTION rodata_clib
mdays: defw 0, 31, 31+29, 31+29+31, 31+29+31+30, 31+29+31+30+31
defw 31+29+31+30+31+30, 31+29+31+30+31+30+31, 31+29+31+30+31+30+31+31
defw 31+29+31+30+31+30+31+31+30, 31+29+31+30+31+30+31+31+30+31
defw 31+29+31+30+31+30+31+31+30+31+30
ENDIF
|
1-base/lace/source/environ/lace-environ-users.adb | charlie5/lace | 20 | 11447 | <filename>1-base/lace/source/environ/lace-environ-users.adb<gh_stars>10-100
with
lace.Environ.OS_Commands,
posix.user_Database,
posix.process_Identification;
package body lace.Environ.Users
is
function "+" (Source : in unbounded_String) return String
renames to_String;
function to_User (Name : in String) return User
is
begin
return (Name => to_unbounded_String (Name));
end to_User;
function Name (Self : in User) return String
is
begin
return to_String (Self.Name);
end Name;
procedure add_User (Self : in User;
Super : in Boolean := False)
is
use lace.Environ.OS_Commands;
begin
if Super
then
declare
Output : constant String := run_OS ("useradd " & (+Self.Name) & " -m -G sudo -G root");
begin
if Output /= ""
then
raise Error with Output;
end if;
end;
else
declare
Output : constant String := run_OS ("useradd " & (+Self.Name) & " -m");
begin
if Output /= ""
then
raise Error with Output;
end if;
end;
end if;
end add_User;
procedure rid_User (Self : in User)
is
use lace.Environ.OS_Commands;
Output : constant String := run_OS ("userdel -r " & (+Self.Name));
begin
if Output /= ""
then
raise Error with Output;
end if;
end rid_User;
procedure switch_to (Self : in User)
is
use Posix,
posix.User_Database,
posix.Process_Identification;
User_in_DB : constant User_Database_Item := get_User_Database_Item (to_Posix_String (+Self.Name));
ID : constant User_ID := User_ID_of (User_in_DB);
begin
set_User_ID (ID);
end switch_to;
function current_User return User
is
use Posix,
posix.process_Identification;
begin
return to_User (to_String (get_Login_Name));
end current_User;
function home_Folder (Self : in User := current_User) return Paths.Folder
is
use Paths,
Posix,
posix.User_Database;
User_in_DB : constant User_Database_Item := get_User_Database_Item (to_Posix_String (+Self.Name));
begin
return to_Folder (to_String (initial_Directory_of (User_in_DB)));
end home_Folder;
end lace.Environ.Users;
|
Ada/problem_2/problem_2.ads | PyllrNL/Project_Euler_Solutions | 0 | 18456 | with Test_Solution; use Test_Solution;
package Problem_2 is
type Int64 is range -2**63 .. 2**63 - 1;
type Int128 is range -2**127 .. 2**127 - 1;
function Solution_1( Max : Int128 ) return Int128;
function Solution_2( Max : Int128 ) return Int128;
procedure Test_Solution_1;
procedure Test_Solution_2;
function Get_Solutions return Solution_Case;
end Problem_2;
|
utils/geometrical_methods.ads | Lucretia/old_nehe_ada95 | 0 | 12361 | <gh_stars>0
---------------------------------------------------------------------------------
-- Copyright 2004-2005 © <NAME>
--
-- This code is to be used for tutorial purposes only.
-- You may not redistribute this code in any form without my express permission.
---------------------------------------------------------------------------------
with Vector3;
with Plane;
with Line_Segment;
use type Vector3.Object;
package Geometrical_Methods is
function CollisionDetected(P : in Plane.Object; V : in Vector3.Object) return Boolean;
function CollisionDetected(P : in Plane.Object; L : in Line_Segment.Object) return Boolean;
function ClosestPoint(V : in Vector3.Object; P : in Plane.Object) return Vector3.Object;
end Geometrical_Methods;
|
src/util-dates-iso8601.ads | Letractively/ada-util | 0 | 16544 | <reponame>Letractively/ada-util
-----------------------------------------------------------------------
-- util-dates-iso8601 -- ISO8601 dates
-- Copyright (C) 2011, 2013 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- 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.
-----------------------------------------------------------------------
with Ada.Calendar;
package Util.Dates.ISO8601 is
-- Parses an ISO8601 date and return it as a calendar time.
-- Raises Constraint_Error if the date format is not recognized.
function Value (Date : in String) return Ada.Calendar.Time;
-- Return the ISO8601 date.
function Image (Date : in Ada.Calendar.Time) return String;
function Image (Date : in Date_Record) return String;
end Util.Dates.ISO8601;
|
libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_unlock.asm | jpoikela/z88dk | 640 | 240304 | <filename>libsrc/_DEVELOPMENT/threads/mutex/c/sdcc_iy/mtx_unlock.asm<gh_stars>100-1000
; int mtx_unlock(mtx_t *m)
SECTION code_clib
SECTION code_threads_mutex
PUBLIC _mtx_unlock
EXTERN asm_mtx_unlock
_mtx_unlock:
pop af
pop hl
push hl
push af
jp asm_mtx_unlock
|
TransactSQL.g4 | aouimar/GoMonoTranspiler | 0 | 1476 | <gh_stars>0
grammar TransactSQL;
//Entry Point
compilationUnit
: statementList? EOF;
//Statements
statementList: statementAux+;
statementAux : statement GoCommand? endSt?;
statement
: ( useDatabase
| createSchemaStatement
| createUserStatement
| setStatement
| createTableStatement
| alterTableStatement
) endSt?;
typeName
: '[char]'
| '[geography]'
| '[int]'
| '[money]'
| '[varchar]'
;
useDatabase : 'USE' dataBaseName;
createUserStatement : 'CREATE' 'USER' userName forLoginExpression? withlimitedOptionList?;
createSchemaStatement : 'CREATE' 'SCHEMA' schemaName;
setStatement : 'SET' setOptions;
createTableStatement : 'CREATE' 'TABLE' tableName'(' columnDefinitionList ')' createTableOptions*;
alterTableStatement : 'ALTER' 'TABLE' tableName alterTableOption;
alterTableOption
: checkConstraint
| withCheckOption addConstraint
;
withCheckOption : 'WITH' checkOption;
checkOption
: 'CHECK'
| 'NOCHECK' ;
checkConstraint: 'CHECK' tableConstraint;
addConstraint : 'ADD' tableConstraint;
createTableOptions
: onClause
| textImageOnClause
;
columnDefinitionList
: columnDefinitions
| columnDefinitionList ',' tableConstraint
;
columnDefinitions
: columnDefinition
| columnDefinitions ',' columnDefinition
;
onClause : 'ON' ( fileGroup | defaultOption );
textImageOnClause : 'TEXTIMAGE_ON' ( fileGroup | defaultOption );
fileGroup : '[PRIMARY]';
defaultOption : '"defaul"';
columnDefinition : columnName dataType columnOption?;
tableName
: Identifier '.' Identifier
| Identifier '.' Identifier '.' Identifier
| Identifier
;
dataType : typeName typeOption?;
//typeColumnClause
//: Identifier '.' typeName
// : typeName;
tableConstraint: 'CONSTRAINT' constraintName constraintClause?;
constraintClause
: typeKeyClause
| foreignKeyClause
;
typeKeyClause : keyOption clusterOption? '(' columnNameList ')' constraintKeyClause?;
foreignKeyClause : 'FOREIGN' 'KEY' '(' columnNameList ')' 'REFERENCES' tableName columnsTable?;
columnsTable : '(' columnNameList ')';
columnNameList
: columnName
| columnNameList ',' columnName
;
constraintKeyClause
: onClause
| withIndexOption
| withIndexOption onClause
;
withIndexOption : 'WITH' '(' indexOptionList ')';
indexOptionList
: indexOption
| indexOptionList ',' indexOption
;
indexOption
: padIndexOption
| ignoreDupKeyOption
| statisticsNoreComputeOption
| statisticsIncrementalOption
| allowPageLocksOption
| allowRowLocksOption
| optimizeForSequentialKeyOption
;
limitedOptionList
: limitedOption
| limitedOptionList ',' limitedOption
;
userOption
: limitedOption
| 'SID' '=' CharacterSequence
;
limitedOption
: defaultSchemaOption
| 'DEFAULT_LANGUAGE' '=' (Identifier | 'NONE')
;
defaultSchemaOption : 'DEFAULT_SCHEMA' '=' schemaName;
endSt : ';';
dataBaseName : Identifier;
//Language : ('NONE' | Identifier);
DigitSequence : DigitNoZero Digit*;
padIndexOption : 'PAD_INDEX' '=' onOffOption;
ignoreDupKeyOption : 'IGNORE_DUP_KEY' '=' onOffOption;
statisticsNoreComputeOption : 'STATISTICS_NORECOMPUTE' '=' onOffOption;
statisticsIncrementalOption: 'STATISTICS_INCREMENTAL' '=' onOffOption;
allowRowLocksOption : 'ALLOW_ROW_LOCKS' '=' onOffOption;
allowPageLocksOption : 'ALLOW_PAGE_LOCKS' '=' onOffOption;
optimizeForSequentialKeyOption : 'OPTIMIZE_FOR_SEQUENTIAL_KEY' '=' onOffOption;
//fillFactorOption : 'FILLFACTOR' '=' fillfactor;
setOptions
: 'ANSI_NULLS' onOffOption
| 'QUOTED_IDENTIFIER' onOffOption
;
onOffOption
: 'ON'
| 'OFF';
keyOption
: 'PRIMARY' 'KEY'
| 'UNIQUE'
;
clusterOption
: 'CLUSTERED'
| 'NONCLUSTERED'
;
orderOption
: 'ASC'
| 'DESC';
forLoginExpression : 'FOR' 'LOGIN' userName ;
withlimitedOptionList : 'WITH' limitedOptionList;
typeOption : '(' precision scale? ')';
columnOption
: 'NULL'
| 'NOT' 'NULL'
;
schemaName : Identifier;
//simpleTableName : Identifier;
columnName : Identifier orderOption?;
userName : Identifier;
constraintName: Identifier;
precision : DigitSequence;
scale : ',' DigitSequence;
Add : 'ADD';
AllowPageLocks : 'ALLOW_PAGE_LOCKS';
AllowRowLocks : 'ALLOW_ROW_LOCKS';
Alter : 'ALTER';
AnsiNulls : 'ANSI_NULLS';
Asc : 'ASC';
Check : 'CHECK';
CharType : '[char]';
Clustered : 'CLUSTERED';
Constraint : 'CONSTRAINT';
Create : 'CREATE';
Default : 'default';
DefaultLanguage : 'DEFAULT_LANGUAGE';
DefaultSchema : 'DEFAULT_SCHEMA';
Desc : 'DESC';
Equal : '=';
For : 'FOR';
Foreign : 'FOREIGN';
GeographyType : '[geography]';
IgnoreDupKey : 'IGNORE_DUP_KEY';
IntType : '[int]';
Key : 'KEY';
LeftParen : '(';
LeftBracket : '[';
Login : 'LOGIN';
MoneyType : '[money]';
NoCheck : 'NOCHECK';
Null : 'NULL';
Not : 'NOT';
NonClustered : 'NONCLUSTERED';
On: 'ON';
OptimizeForSequentialKey : 'OPTIMIZE_FOR_SEQUENTIAL_KEY';
PadIndex : 'PAD_INDEX';
Primary : 'PRIMARY';
References : 'REFERENCES';
RightBracket : ']';
RightParen : ')';
Schema : 'SHCEMA';
Set : 'SET';
Sid : 'SID';
StatisticsIncremental : 'STATISTICS_INCREMENTAL';
StatisticsNoreCompute : 'STATISTICS_NORECOMPUTE';
Table : 'TABLE';
TextImageOn : 'TEXTIMAGE_ON';
Unique : 'UNIQUE';
Use : 'USE';
User : 'USER';
VarcharType : '[varchar]';
With : 'WITH';
//Fragment
Identifier : '[' CharacterSequence SimpleSpace* CharacterSequence? ']';
fragment CharacterSequence: CharacterNoDigit CharacterPart*;
CharacterPart
: Character
| SpecialCharacter
;
fragment CharacterNoDigit : [a-zA-Z];
fragment Character: [a-zA-Z0-9];
fragment SpecialCharacter : [_];
fragment DigitNoZero : [1-9];
fragment Digit : [0-9];
fragment SimpleEscapeSequence : '\\' ['"?abfnrtv\\];
fragment SimpleSpace : [ ];
GoCommand : 'GO';
// Escaped lex
IgnoredQuery : GoCommand -> skip;
Whitespace
: [ \t]+
-> skip
;
Newline
: ( '\r' '\n'?
| '\n'
)
-> skip
;
BlockComment
: '/*' .*? '*/'
-> skip
; |
_incObj/sub SolidObject.asm | kodishmediacenter/msu-md-sonic | 9 | 87171 | ; ---------------------------------------------------------------------------
; Solid object subroutine (includes spikes, blocks, rocks etc)
;
; input:
; d1 = width
; d2 = height / 2 (when jumping)
; d3 = height / 2 (when walking)
; d4 = x-axis position
; ---------------------------------------------------------------------------
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
SolidObject:
tst.b obSolid(a0) ; is Sonic standing on the object?
beq.w Solid_ChkEnter ; if not, branch
move.w d1,d2
add.w d2,d2
lea (v_player).w,a1
btst #1,obStatus(a1) ; is Sonic in the air?
bne.s @leave ; if yes, branch
move.w obX(a1),d0
sub.w obX(a0),d0
add.w d1,d0
bmi.s @leave ; if Sonic moves off the left, branch
cmp.w d2,d0 ; has Sonic moved off the right?
bcs.s @stand ; if not, branch
@leave:
bclr #3,obStatus(a1) ; clear Sonic's standing flag
bclr #3,obStatus(a0) ; clear object's standing flag
clr.b obSolid(a0)
moveq #0,d4
rts
@stand:
move.w d4,d2
bsr.w MvSonicOnPtfm
moveq #0,d4
rts
; ===========================================================================
SolidObject71:
tst.b obSolid(a0)
beq.w loc_FAD0
move.w d1,d2
add.w d2,d2
lea (v_player).w,a1
btst #1,obStatus(a1)
bne.s @leave
move.w obX(a1),d0
sub.w obX(a0),d0
add.w d1,d0
bmi.s @leave
cmp.w d2,d0
bcs.s @stand
@leave:
bclr #3,obStatus(a1)
bclr #3,obStatus(a0)
clr.b obSolid(a0)
moveq #0,d4
rts
@stand:
move.w d4,d2
bsr.w MvSonicOnPtfm
moveq #0,d4
rts
; ===========================================================================
SolidObject2F:
lea (v_player).w,a1
tst.b obRender(a0)
bpl.w Solid_Ignore
move.w obX(a1),d0
sub.w obX(a0),d0
add.w d1,d0
bmi.w Solid_Ignore
move.w d1,d3
add.w d3,d3
cmp.w d3,d0
bhi.w Solid_Ignore
move.w d0,d5
btst #0,obRender(a0) ; is object horizontally flipped?
beq.s @notflipped ; if not, branch
not.w d5
add.w d3,d5
@notflipped:
lsr.w #1,d5
moveq #0,d3
move.b (a2,d5.w),d3
sub.b (a2),d3
move.w obY(a0),d5
sub.w d3,d5
move.b obHeight(a1),d3
ext.w d3
add.w d3,d2
move.w obY(a1),d3
sub.w d5,d3
addq.w #4,d3
add.w d2,d3
bmi.w Solid_Ignore
move.w d2,d4
add.w d4,d4
cmp.w d4,d3
bcc.w Solid_Ignore
bra.w loc_FB0E
; ===========================================================================
Solid_ChkEnter:
tst.b obRender(a0)
bpl.w Solid_Ignore
loc_FAD0:
lea (v_player).w,a1
move.w obX(a1),d0
sub.w obX(a0),d0
add.w d1,d0
bmi.w Solid_Ignore ; if Sonic moves off the left, branch
move.w d1,d3
add.w d3,d3
cmp.w d3,d0 ; has Sonic moved off the right?
bhi.w Solid_Ignore ; if yes, branch
move.b obHeight(a1),d3
ext.w d3
add.w d3,d2
move.w obY(a1),d3
sub.w obY(a0),d3
addq.w #4,d3
add.w d2,d3
bmi.w Solid_Ignore ; if Sonic moves above, branch
move.w d2,d4
add.w d4,d4
cmp.w d4,d3 ; has Sonic moved below?
bcc.w Solid_Ignore ; if yes, branch
loc_FB0E:
tst.b (f_lockmulti).w ; are controls locked?
bmi.w Solid_Ignore ; if yes, branch
cmpi.b #6,(v_player+obRoutine).w ; is Sonic dying?
if Revision=0
bcc.w Solid_Ignore ; if yes, branch
else
bcc.w Solid_Debug
endc
tst.w (v_debuguse).w ; is debug mode being used?
bne.w Solid_Debug ; if yes, branch
move.w d0,d5
cmp.w d0,d1 ; is Sonic right of centre of object?
bcc.s @isright ; if yes, branch
add.w d1,d1
sub.w d1,d0
move.w d0,d5
neg.w d5
@isright:
move.w d3,d1
cmp.w d3,d2 ; is Sonic below centre of object?
bcc.s @isbelow ; if yes, branch
subq.w #4,d3
sub.w d4,d3
move.w d3,d1
neg.w d1
@isbelow:
cmp.w d1,d5
bhi.w Solid_TopBottom ; if Sonic hits top or bottom, branch
cmpi.w #4,d1
bls.s Solid_SideAir
tst.w d0 ; where is Sonic?
beq.s Solid_Centre ; if inside the object, branch
bmi.s Solid_Right ; if right of the object, branch
tst.w obVelX(a1) ; is Sonic moving left?
bmi.s Solid_Centre ; if yes, branch
bra.s Solid_Left
; ===========================================================================
Solid_Right:
tst.w obVelX(a1) ; is Sonic moving right?
bpl.s Solid_Centre ; if yes, branch
Solid_Left:
move.w #0,obInertia(a1)
move.w #0,obVelX(a1) ; stop Sonic moving
Solid_Centre:
sub.w d0,obX(a1) ; correct Sonic's position
btst #1,obStatus(a1) ; is Sonic in the air?
bne.s Solid_SideAir ; if yes, branch
bset #5,obStatus(a1) ; make Sonic push object
bset #5,obStatus(a0) ; make object be pushed
moveq #1,d4 ; return side collision
rts
; ===========================================================================
Solid_SideAir:
bsr.s Solid_NotPushing
moveq #1,d4 ; return side collision
rts
; ===========================================================================
Solid_Ignore:
btst #5,obStatus(a0) ; is Sonic pushing?
beq.s Solid_Debug ; if not, branch
move.w #id_Run,obAnim(a1) ; use running animation
Solid_NotPushing:
bclr #5,obStatus(a0) ; clear pushing flag
bclr #5,obStatus(a1) ; clear Sonic's pushing flag
Solid_Debug:
moveq #0,d4 ; return no collision
rts
; ===========================================================================
Solid_TopBottom:
tst.w d3 ; is Sonic below the object?
bmi.s Solid_Below ; if yes, branch
cmpi.w #$10,d3 ; has Sonic landed on the object?
bcs.s Solid_Landed ; if yes, branch
bra.s Solid_Ignore
; ===========================================================================
Solid_Below:
tst.w obVelY(a1) ; is Sonic moving vertically?
beq.s Solid_Squash ; if not, branch
bpl.s Solid_TopBtmAir ; if moving downwards, branch
tst.w d3 ; is Sonic above the object?
bpl.s Solid_TopBtmAir ; if yes, branch
sub.w d3,obY(a1) ; correct Sonic's position
move.w #0,obVelY(a1) ; stop Sonic moving
Solid_TopBtmAir:
moveq #-1,d4
rts
; ===========================================================================
Solid_Squash:
btst #1,obStatus(a1) ; is Sonic in the air?
bne.s Solid_TopBtmAir ; if yes, branch
move.l a0,-(sp)
movea.l a1,a0
jsr (KillSonic).l ; kill Sonic
movea.l (sp)+,a0
moveq #-1,d4
rts
; ===========================================================================
Solid_Landed:
subq.w #4,d3
moveq #0,d1
move.b obActWid(a0),d1
move.w d1,d2
add.w d2,d2
add.w obX(a1),d1
sub.w obX(a0),d1
bmi.s Solid_Miss ; if Sonic is right of object, branch
cmp.w d2,d1 ; is Sonic left of object?
bcc.s Solid_Miss ; if yes, branch
tst.w obVelY(a1) ; is Sonic moving upwards?
bmi.s Solid_Miss ; if yes, branch
sub.w d3,obY(a1) ; correct Sonic's position
subq.w #1,obY(a1)
bsr.s Solid_ResetFloor
move.b #2,obSolid(a0) ; set standing flags
bset #3,obStatus(a0)
moveq #-1,d4 ; return top/bottom collision
rts
; ===========================================================================
Solid_Miss:
moveq #0,d4
rts
; End of function SolidObject
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||||||||||||||||
Solid_ResetFloor:
btst #3,obStatus(a1) ; is Sonic standing on something?
beq.s @notonobj ; if not, branch
moveq #0,d0
move.b $3D(a1),d0 ; get object being stood on
lsl.w #6,d0
addi.l #(v_objspace&$FFFFFF),d0
movea.l d0,a2
bclr #3,obStatus(a2) ; clear object's standing flags
clr.b obSolid(a2)
@notonobj:
move.w a0,d0
subi.w #$D000,d0
lsr.w #6,d0
andi.w #$7F,d0
move.b d0,$3D(a1) ; set object being stood on
move.b #0,obAngle(a1) ; clear Sonic's angle
move.w #0,obVelY(a1) ; stop Sonic
move.w obVelX(a1),obInertia(a1)
btst #1,obStatus(a1) ; is Sonic in the air?
beq.s @notinair ; if not, branch
move.l a0,-(sp)
movea.l a1,a0
jsr (Sonic_ResetOnFloor).l ; reset Sonic as if on floor
movea.l (sp)+,a0
@notinair:
bset #3,obStatus(a1) ; set object standing flag
bset #3,obStatus(a0) ; set Sonic standing on object flag
rts
; End of function Solid_ResetFloor
|
fracGC/PiFrac.agda | JacquesCarette/pi-dual | 14 | 14437 | {-# OPTIONS --without-K --safe #-}
-- Definition of Pi with fractionals
module PiFrac where
-- From the standard library:
open import Data.Empty using (⊥)
open import Data.Unit using (⊤; tt)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product using (_×_; _,_; proj₁; proj₂)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; cong; cong₂)
-- The basic types we add:
open import Singleton
infixr 70 _×ᵤ_
infixr 60 _+ᵤ_
infixr 50 _⊚_
------------------------------------------------------------------------------
-- Pi with fractionals
-- The following are all mutually dependent:
data 𝕌 : Set -- 𝕌niverse of types
⟦_⟧ : (A : 𝕌) → Set -- denotation of types
data _⟷_ : 𝕌 → 𝕌 → Set -- type equivalences
eval : {A B : 𝕌} → (A ⟷ B) → ⟦ A ⟧ → ⟦ B ⟧ -- evaluating an equivalence
data 𝕌 where
𝟘 : 𝕌
𝟙 : 𝕌
_+ᵤ_ : 𝕌 → 𝕌 → 𝕌
_×ᵤ_ : 𝕌 → 𝕌 → 𝕌
●_[_] : (A : 𝕌) → ⟦ A ⟧ → 𝕌
𝟙/●_[_] : (A : 𝕌) → ⟦ A ⟧ → 𝕌
⟦ 𝟘 ⟧ = ⊥
⟦ 𝟙 ⟧ = ⊤
⟦ t₁ +ᵤ t₂ ⟧ = ⟦ t₁ ⟧ ⊎ ⟦ t₂ ⟧
⟦ t₁ ×ᵤ t₂ ⟧ = ⟦ t₁ ⟧ × ⟦ t₂ ⟧
⟦ ● A [ v ] ⟧ = Singleton ⟦ A ⟧ v
⟦ 𝟙/● A [ v ] ⟧ = Recip ⟦ A ⟧ v
data _⟷_ where
unite₊l : {t : 𝕌} → 𝟘 +ᵤ t ⟷ t
uniti₊l : {t : 𝕌} → t ⟷ 𝟘 +ᵤ t
unite₊r : {t : 𝕌} → t +ᵤ 𝟘 ⟷ t
uniti₊r : {t : 𝕌} → t ⟷ t +ᵤ 𝟘
swap₊ : {t₁ t₂ : 𝕌} → t₁ +ᵤ t₂ ⟷ t₂ +ᵤ t₁
assocl₊ : {t₁ t₂ t₃ : 𝕌} → t₁ +ᵤ (t₂ +ᵤ t₃) ⟷ (t₁ +ᵤ t₂) +ᵤ t₃
assocr₊ : {t₁ t₂ t₃ : 𝕌} → (t₁ +ᵤ t₂) +ᵤ t₃ ⟷ t₁ +ᵤ (t₂ +ᵤ t₃)
unite⋆l : {t : 𝕌} → 𝟙 ×ᵤ t ⟷ t
uniti⋆l : {t : 𝕌} → t ⟷ 𝟙 ×ᵤ t
unite⋆r : {t : 𝕌} → t ×ᵤ 𝟙 ⟷ t
uniti⋆r : {t : 𝕌} → t ⟷ t ×ᵤ 𝟙
swap⋆ : {t₁ t₂ : 𝕌} → t₁ ×ᵤ t₂ ⟷ t₂ ×ᵤ t₁
assocl⋆ : {t₁ t₂ t₃ : 𝕌} → t₁ ×ᵤ (t₂ ×ᵤ t₃) ⟷ (t₁ ×ᵤ t₂) ×ᵤ t₃
assocr⋆ : {t₁ t₂ t₃ : 𝕌} → (t₁ ×ᵤ t₂) ×ᵤ t₃ ⟷ t₁ ×ᵤ (t₂ ×ᵤ t₃)
absorbr : {t : 𝕌} → 𝟘 ×ᵤ t ⟷ 𝟘
absorbl : {t : 𝕌} → t ×ᵤ 𝟘 ⟷ 𝟘
factorzr : {t : 𝕌} → 𝟘 ⟷ t ×ᵤ 𝟘
factorzl : {t : 𝕌} → 𝟘 ⟷ 𝟘 ×ᵤ t
dist : {t₁ t₂ t₃ : 𝕌} → (t₁ +ᵤ t₂) ×ᵤ t₃ ⟷ (t₁ ×ᵤ t₃) +ᵤ (t₂ ×ᵤ t₃)
factor : {t₁ t₂ t₃ : 𝕌} → (t₁ ×ᵤ t₃) +ᵤ (t₂ ×ᵤ t₃) ⟷ (t₁ +ᵤ t₂) ×ᵤ t₃
distl : {t₁ t₂ t₃ : 𝕌} → t₁ ×ᵤ (t₂ +ᵤ t₃) ⟷ (t₁ ×ᵤ t₂) +ᵤ (t₁ ×ᵤ t₃)
factorl : {t₁ t₂ t₃ : 𝕌 } → (t₁ ×ᵤ t₂) +ᵤ (t₁ ×ᵤ t₃) ⟷ t₁ ×ᵤ (t₂ +ᵤ t₃)
id⟷ : {t : 𝕌} → t ⟷ t
_⊚_ : {t₁ t₂ t₃ : 𝕌} → (t₁ ⟷ t₂) → (t₂ ⟷ t₃) → (t₁ ⟷ t₃)
_⊕_ : {t₁ t₂ t₃ t₄ : 𝕌} → (t₁ ⟷ t₃) → (t₂ ⟷ t₄) → (t₁ +ᵤ t₂ ⟷ t₃ +ᵤ t₄)
_⊗_ : {t₁ t₂ t₃ t₄ : 𝕌} → (t₁ ⟷ t₃) → (t₂ ⟷ t₄) → (t₁ ×ᵤ t₂ ⟷ t₃ ×ᵤ t₄)
-- new operations on Singleton
lift : {t₁ t₂ : 𝕌} → {v₁ : ⟦ t₁ ⟧} →
(c : t₁ ⟷ t₂) →
(● t₁ [ v₁ ] ⟷ ● t₂ [ eval c v₁ ])
tensorl : {t₁ t₂ : 𝕌} {v₁ : ⟦ t₁ ⟧} {v₂ : ⟦ t₂ ⟧} →
● t₁ ×ᵤ t₂ [ v₁ , v₂ ] ⟷ ● t₁ [ v₁ ] ×ᵤ ● t₂ [ v₂ ]
tensorr : {t₁ t₂ : 𝕌} {v₁ : ⟦ t₁ ⟧} {v₂ : ⟦ t₂ ⟧} →
● t₁ [ v₁ ] ×ᵤ ● t₂ [ v₂ ] ⟷ ● t₁ ×ᵤ t₂ [ v₁ , v₂ ]
plusll : {t₁ t₂ : 𝕌} {v : ⟦ t₁ ⟧} →
● (t₁ +ᵤ t₂) [ inj₁ v ] ⟷ ● t₁ [ v ]
pluslr : {t₁ t₂ : 𝕌} {v : ⟦ t₁ ⟧} →
● t₁ [ v ] ⟷ ● (t₁ +ᵤ t₂) [ inj₁ v ]
plusrl : {t₁ t₂ : 𝕌} {v : ⟦ t₂ ⟧} →
● (t₁ +ᵤ t₂) [ inj₂ v ] ⟷ ● t₂ [ v ]
plusrr : {t₁ t₂ : 𝕌} {v : ⟦ t₂ ⟧} →
● t₂ [ v ] ⟷ ● (t₁ +ᵤ t₂) [ inj₂ v ]
fracl : {t₁ t₂ : 𝕌} {v₁ : ⟦ t₁ ⟧} {v₂ : ⟦ t₂ ⟧} →
𝟙/● t₁ ×ᵤ t₂ [ v₁ , v₂ ] ⟷ 𝟙/● t₁ [ v₁ ] ×ᵤ 𝟙/● t₂ [ v₂ ]
fracr : {t₁ t₂ : 𝕌} {v₁ : ⟦ t₁ ⟧} {v₂ : ⟦ t₂ ⟧} →
𝟙/● t₁ [ v₁ ] ×ᵤ 𝟙/● t₂ [ v₂ ] ⟷ 𝟙/● t₁ ×ᵤ t₂ [ v₁ , v₂ ]
-- fractionals
η : {t : 𝕌} → (v : ⟦ t ⟧) → 𝟙 ⟷ ● t [ v ] ×ᵤ 𝟙/● t [ v ]
ε : {t : 𝕌} → (v : ⟦ t ⟧) → ● t [ v ] ×ᵤ 𝟙/● t [ v ] ⟷ 𝟙
-- double lift prop eq
ll : ∀ {t : 𝕌} {v : ⟦ t ⟧} {w : ⟦ ● t [ v ] ⟧} →
● (● t [ v ]) [ w ] ⟷ ● t [ v ]
== : ∀ {t₁ t₂ : 𝕌} {v : ⟦ t₁ ⟧} {w w' : ⟦ t₂ ⟧} →
(● t₁ [ v ] ⟷ ● t₂ [ w ]) → (w ≡ w') → (● t₁ [ v ] ⟷ ● t₂ [ w' ])
eval unite₊l (inj₂ v) = v
eval uniti₊l v = inj₂ v
eval unite₊r (inj₁ v) = v
eval uniti₊r v = inj₁ v
eval swap₊ (inj₁ v) = inj₂ v
eval swap₊ (inj₂ v) = inj₁ v
eval assocl₊ (inj₁ v) = inj₁ (inj₁ v)
eval assocl₊ (inj₂ (inj₁ v)) = inj₁ (inj₂ v)
eval assocl₊ (inj₂ (inj₂ v)) = inj₂ v
eval assocr₊ (inj₁ (inj₁ v)) = inj₁ v
eval assocr₊ (inj₁ (inj₂ v)) = inj₂ (inj₁ v)
eval assocr₊ (inj₂ v) = inj₂ (inj₂ v)
eval unite⋆l (tt , v) = v
eval uniti⋆l v = (tt , v)
eval unite⋆r (v , tt) = v
eval uniti⋆r v = (v , tt)
eval swap⋆ (v₁ , v₂) = (v₂ , v₁)
eval assocl⋆ (v₁ , (v₂ , v₃)) = ((v₁ , v₂) , v₃)
eval assocr⋆ ((v₁ , v₂) , v₃) = (v₁ , (v₂ , v₃))
eval absorbl ()
eval absorbr ()
eval factorzl ()
eval factorzr ()
eval dist (inj₁ v₁ , v₃) = inj₁ (v₁ , v₃)
eval dist (inj₂ v₂ , v₃) = inj₂ (v₂ , v₃)
eval factor (inj₁ (v₁ , v₃)) = (inj₁ v₁ , v₃)
eval factor (inj₂ (v₂ , v₃)) = (inj₂ v₂ , v₃)
eval distl (v , inj₁ v₁) = inj₁ (v , v₁)
eval distl (v , inj₂ v₂) = inj₂ (v , v₂)
eval factorl (inj₁ (v , v₁)) = (v , inj₁ v₁)
eval factorl (inj₂ (v , v₂)) = (v , inj₂ v₂)
eval id⟷ v = v
eval (c₁ ⊚ c₂) v = eval c₂ (eval c₁ v)
eval (c₁ ⊕ c₂) (inj₁ v) = inj₁ (eval c₁ v)
eval (c₁ ⊕ c₂) (inj₂ v) = inj₂ (eval c₂ v)
eval (c₁ ⊗ c₂) (v₁ , v₂) = (eval c₁ v₁ , eval c₂ v₂)
eval (lift c) (w , v≡w) = eval c w , cong (eval c) v≡w
eval tensorl ((w₁ , w₂) , vp≡wp) =
(w₁ , cong proj₁ vp≡wp) , (w₂ , cong proj₂ vp≡wp)
eval tensorr ((w₁ , p₁) , (w₂ , p₂)) =
(w₁ , w₂) , cong₂ _,_ p₁ p₂
eval (η v) tt = (v , refl) , λ _ → tt
eval (ε v) (p , f) = f p
eval (plusll {v = .w₁}) (inj₁ w₁ , refl) = w₁ , refl
eval pluslr (v₁ , refl) = inj₁ v₁ , refl
eval (plusrl {v = .w₂}) (inj₂ w₂ , refl) = w₂ , refl
eval plusrr (v₂ , refl) = inj₂ v₂ , refl
eval (fracl {v₁ = v₁} {v₂ = v₂}) f = (λ _ → f ((v₁ , v₂) , refl)) , (λ _ → f ((v₁ , v₂) , refl))
eval fracr (f₁ , f₂) ((w₁ , w₂) , refl) = let _ = f₁ (w₁ , refl) ; _ = f₂ (w₂ , refl) in tt
eval (ll {t} {v} {.w}) (w , refl) = v , refl
eval (== c eq) s₁ = let (w₂ , p) = eval c s₁ in w₂ , trans (sym eq) p
focus : {t : 𝕌} → (v : ⟦ t ⟧) → Singleton ⟦ t ⟧ v
focus v = (v , refl)
unfocus : {t : 𝕌} {v : ⟦ t ⟧} → Singleton ⟦ t ⟧ v → ⟦ t ⟧
unfocus (v , refl) = v
------------------------------------------------------------------------------
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/modular1.adb | best08618/asylo | 7 | 10803 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/modular1.adb<gh_stars>1-10
-- { dg-do run }
with Ada.Text_IO;
procedure Modular1 is
type T1 is mod 9;
package T1_IO is new Ada.Text_IO.Modular_IO(T1);
X: T1 := 8;
J1: constant := 5;
begin for J2 in 5..5 loop
pragma Assert(X*(2**J1) = X*(2**J2));
if X*(2**J1) /= X*(2**J2) then
raise Program_Error;
end if;
end loop;
end Modular1;
|
lista1/q6.asm | vags-cin/awesome-bootloader | 8 | 1607 | <reponame>vags-cin/awesome-bootloader<filename>lista1/q6.asm
org 0x7c00
jmp 0x0000:start
; ♥ ♥ ♥ ♥ ♥
; Assembly is love
; @ovictoraurelio
; @jgfn1
; With contributions of <NAME>.
;int number_programs
;int i
;int maior = 0
;int menor = 100000
;
;scanf(number_programs)
;for(i = 0; i < number_programs;i++)
;{
; scanf(inteiro[i])
; if(inteiro[i] > maior)
; maior = inteiro[i]
; if(inteiro[i] < menor)
; menor = inteiro[i]
;}
;printf(maior)
;printf(menor)
;
;Funçao de converter string pra inteiro
;int i;
;int s = 0;
;for(i=0; string[i] != '\0'; ++i)
;{
; s *= 10;
; s += string[i] - 48;
;}
mult: dw 1
dez: db 10
;Declaracao de variaveis
nProgramas: db 0
tmp: db 0
counter: db 0
maior: db 0
menor: db 0
start: ;inicio da main
; ax is a reg to geral use
; ds
xor ax,ax ;; ax=0
mov ds,ax
mov es, ax
mov ss, ax ; setup stack
mov sp, 0x7C00 ; stack grows downwards from 0x7C00
mov bx, nProgramas
call get_num
mov ax, word[nProgramas] ;coloca num em ax
call new_line
call print_int
call new_line
mov cx, word[nProgramas]
loopReadNumbers:
push cx
mov bx, tmp
call get_num
mov ax, word[tmp] ;coloca num em ax
call new_line
call print_int
call new_line
pop cx
loop loopReadNumbers
jmp end ;fim da main
get_num:
xor ax, ax
push ax ;manda ax para a pilha (vai servir em .transform)
mov di,bx ;manda o endereço em BX para DI
stosw ;joga em AX o endereço apontado por BX
mov si,bx ; manda si
.loop:
mov ah, 0 ;instrução para ler do teclado
int 16h ;interrupt de teclado
cmp al, 0x1b ;comparar com ESC
je end ;acabar programa
cmp al, 0x0d ;comparar com \n
je .transform ;fim da string
cmp al, '0' ;comparar al com '0'
jl .loop ;se for menor que '0' não é um número, ignore
cmp al, '9' ;comparar al com '9'
jg .loop ;se for maior que '9' não é um numero, ignore
xor ah, ah ;zerar ah
push ax ;mandar ah e al para a pilha pois al não pode ir sozinho, ah será ignorado
call print_char ;imprime o caracter recebido
stosb ;manda char em al para string e di++
jmp .loop ;próximo caractere
.transform: ;transformar string em numero
mov si,bx
lodsw ;lê num e coloca em ax
mov cx, ax ;coloca num (ax) em cx
pop ax ;pop na pilha (só se usa al)
cmp ax, 0 ;se for o \0
je .done ;acabou get_num
sub ax, 48 ;transform from char to int
mul word [mult] ;multiplica ax por mult (mul) e salva em dx:ax
add ax, cx ;soma o que já estava em num (cx) com o resultado de mult*ax
mov di, bx ;coloca num em di
stosw ;salva ax em num
;call print_char ;debug
mov ax, [mult] ;salva muti em ax
mul byte [dez] ;multiplica ax por 10
mov di, mult ;di = mult
stosw ;manda ax para mult
jmp .transform ;recomeça
.done:
ret
;To use this function, put the value you wanna print in the
;reg ax and be sure that there's no important data in the regs
;dx and cl.
print_int: ;mostra inteiro em al como string na tela
xor dx, dx
xor cl, cl
.sts: ;começa conversão (sts = send to stack)
div byte[dez] ;divide ax por cl(10) salva quociente em al e resto em ah
mov dl, ah ;manda ah pra dl
mov ah, 0 ;zera ah
push dx ;manda dx pra pilha
inc cl ;incrementa cl
cmp al, 0 ;compara o quociente(al) com 0
jne .sts ;se não for 0 manda próximo caractere para pilha
.print: ;caso contrário
pop ax ;pop na pilha pra ax
add al, 48 ;transforma numero em char
call print_char ;imprime char em al
dec cl ;decrementa cl
cmp cl, 0 ;compara cl com 0
jne .print ;se o contador não for 0, imprima o próximo char
ret ;caso contrario, retorne
;***
; ** Get a string
; mov di, STRING
; get_string
;
get_string:
.loop:
mov ah, 0 ;instruction to read of keyboard
int 16h ;interruption to read of keyboard
cmp al, 0x1B
je end ;if equal ESC jump to end
cmp al, 0x0D
je .done ;if equal ENTER done of string
call print_char ;show char on screen
stosb ;saves char on memory
;;counters...
inc ch ;counter that contain length of stringH
inc cl ;counter that contain length of stringL
jmp .loop ;return to loop, read antoher char
.done:
mov al, 0 ;adding 0 to knows end of string
stosb
ret
;***
; ** Print a string
; mov si, STRING
; print_string
print_string:
lodsb ; load al, si index and si++
cmp al,0 ; compare al with 0 (0, was set as end of string)
je endprintstring
mov ah,0xe ; instruction to show on screen
mov bh,13h
int 10h ; call video interrupt
jmp print_string
endprintstring: ret
;***
; ** Print new line
;***
new_line:
push ax
mov al, 10
call print_char
mov al, 13
call print_char
pop ax
ret
;***
; ** Print a char
;***/
print_char: ;imprime o caracter em al
push ax
mov ah, 0x0e ;instrução para imprimir na tela
int 10h ;interrup de tela
pop ax
ret
end:
jmp $
times 510 - ($ - $$) db 0
dw 0xaa55 |
tst/scanner1.ads | eryjus/ada | 0 | 7893 | <gh_stars>0
--===================================================================================================================
-- scanner.ads
--
-- This file contains the a sample of the lexical components we need to be able to recognize and convert
-- into tokens.
--===================================================================================================================
--
-- -- These examples are from the Ada Specification
-- ---------------------------------------------
& ' ( ) * + , - . / : ; < = > |
=> .. ** := /= >= <= << >> <>
Count X Get_Symbol Ethelyn Marion
Snobol_4 X1 Page_Count Store_Next_Item
Πλάτων -- Plato
Чайковский -- Tchaikovsky
θ φ -- Angles
12 0 1E6 123_456 -- integer literals
12.0 0.0 0.456 3.14159_26 -- real literals
2#1111_1111# 16#FF# 016#0ff# -- integer literals of value 255
16#E#E1 2#1110_0000# -- integer literals of value 224
16#F.FF#E+2 2#1.1111_1111_1110#E11 -- real literals of value 4095.0
'A' '*' ''' ' ' 'L' 'Л' 'Λ' -- Various els.
'∞' 'א' -- Big numbers - infinity and aleph.
"Message of the day:"
"" -- a null string literal
" " "A" """" -- three string literals of length 1
"Characters such as $, %, and } are allowed in string literals"
"Archimedes said ""Εύρηκα"""
"Volume of cylinder (πr2h) = "
abort
else
new
return
abs
elsif
not
reverse
abstract
end
null
select
accept
entry
of
separate
access
exception
or
some
aliased
exit
others
subtype
all
for
out
synchronized
and
function
overriding
array
tagged
at
generic
package
task
goto
pragma
terminate
begin
private
then
body
if
procedure
type
in
case
protected
interface
until
constant
is
raise
use
declare
range
limited
when
delay
record
loop
while
delta
rem
with
digits
mod
renames
do
requeue
xor
|
examples/mapstreaming.adb | ytomino/drake | 33 | 11558 | <reponame>ytomino/drake
with Ada.Containers.Hashed_Maps;
with Ada.Containers.Ordered_Maps;
with Ada.Streams.Unbounded_Storage_IO;
with Ada.Strings.Maps.Constants;
procedure mapstreaming is
use type Ada.Containers.Count_Type;
use type Ada.Streams.Stream_Element_Offset;
use type Ada.Strings.Maps.Character_Mapping;
Source : constant Ada.Strings.Maps.Character_Mapping :=
Ada.Strings.Maps.Constants.Case_Folding_Map;
Source_Domain : constant Wide_Wide_String :=
Ada.Strings.Maps.Overloaded_To_Domain (Source);
Source_Length : constant Ada.Containers.Count_Type := Source_Domain'Length;
Buffer : Ada.Streams.Unbounded_Storage_IO.Buffer_Type;
begin
Ada.Strings.Maps.Character_Mapping'Write (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer),
Source);
-- Character_Mapping
Ada.Streams.Unbounded_Storage_IO.Reset (Buffer);
declare
X : Ada.Strings.Maps.Character_Mapping;
begin
Ada.Strings.Maps.Character_Mapping'Read (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer),
X);
pragma Assert (
Ada.Streams.Index (
Ada.Streams.Seekable_Stream_Type'Class (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) =
Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1);
pragma Assert (X = Source);
end;
-- Ordered_Maps
Ada.Streams.Unbounded_Storage_IO.Reset (Buffer);
declare
package Maps is
new Ada.Containers.Ordered_Maps (
Wide_Wide_Character,
Wide_Wide_Character);
X : Maps.Map;
begin
Maps.Map'Read (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer),
X);
pragma Assert (
Ada.Streams.Index (
Ada.Streams.Seekable_Stream_Type'Class (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) =
Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1);
pragma Assert (X.Length = Source_Length);
for I in X.Iterate loop
pragma Assert (
Ada.Strings.Maps.Overloaded_Value (Source, Maps.Key (I)) =
Maps.Element (I));
null;
end loop;
end;
-- Hashed_Maps
Ada.Streams.Unbounded_Storage_IO.Reset (Buffer);
declare
function Hash (Item : Wide_Wide_Character) return Ada.Containers.Hash_Type is
begin
return Wide_Wide_Character'Pos (Item);
end Hash;
package Maps is
new Ada.Containers.Hashed_Maps (
Wide_Wide_Character,
Wide_Wide_Character,
Hash => Hash,
Equivalent_Keys => "=");
X : Maps.Map;
begin
Maps.Map'Read (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer),
X);
pragma Assert (
Ada.Streams.Index (
Ada.Streams.Seekable_Stream_Type'Class (
Ada.Streams.Unbounded_Storage_IO.Stream (Buffer).all)) =
Ada.Streams.Unbounded_Storage_IO.Size (Buffer) + 1);
pragma Assert (X.Length = Source_Length);
for I in X.Iterate loop
pragma Assert (
Ada.Strings.Maps.Overloaded_Value (Source, Maps.Key (I)) =
Maps.Element (I));
null;
end loop;
end;
pragma Debug (Ada.Debug.Put ("OK"));
end mapstreaming;
|
oeis/322/A322496.asm | neoneye/loda-programs | 11 | 95531 | <filename>oeis/322/A322496.asm
; A322496: Number of tilings of a 3 X n rectangle using V (2m+1)-ominoes (m >= 0) in standard orientation.
; Submitted by <NAME>(s2)
; 1,1,3,8,18,44,107,257,621,1500,3620,8740,21101,50941,122983,296908,716798,1730504,4177807,10086117,24350041,58786200,141922440,342631080,827184601,1997000281,4821185163,11639370608,28099926378,67839223364,163778373107,395395969577,954570312261,2304536594100,5563643500460,13431823595020,32427290690501,78286404976021,189000100642543,456286606261108,1101573313164758,2659433232590624,6420439778346007,15500312789282637,37421065356911281,90342443503105200,218105952363121680,526554348229348560
add $0,1
seq $0,48654 ; a(n) = 2*a(n-1) + a(n-2); a(0)=1, a(1)=4.
mov $1,4
add $1,$0
div $1,7
mov $0,$1
|
libsrc/_DEVELOPMENT/stdlib/c/sdcc_iy/_lldivu_.asm | jpoikela/z88dk | 640 | 13603 |
; void _lldivu_(lldivu_t *ld, uint64_t numer, uint64_t denom)
SECTION code_clib
SECTION code_stdlib
PUBLIC __lldivu_
EXTERN asm__lldivu
__lldivu_:
ld ix,4
add ix,sp
jp asm__lldivu
|
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xca.log_21829_1754.asm | ljhsiun2/medusa | 9 | 90867 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x17b46, %rsi
lea addresses_WT_ht+0x13c16, %rdi
nop
nop
nop
nop
nop
dec %r13
mov $108, %rcx
rep movsb
nop
nop
nop
nop
xor $48738, %rdx
lea addresses_D_ht+0x1ae96, %r15
nop
nop
nop
nop
nop
xor $39770, %r11
mov $0x6162636465666768, %r13
movq %r13, %xmm7
and $0xffffffffffffffc0, %r15
movaps %xmm7, (%r15)
nop
nop
nop
add $64672, %rdx
lea addresses_A_ht+0x7196, %r11
nop
nop
nop
nop
nop
xor %r15, %r15
mov (%r11), %ecx
nop
nop
nop
xor %rdi, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r15
push %rbx
push %rdx
// Store
lea addresses_UC+0x11596, %rdx
cmp $17494, %r10
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
movups %xmm5, (%rdx)
nop
and %r10, %r10
// Store
lea addresses_D+0x5014, %r15
nop
nop
nop
dec %r13
movb $0x51, (%r15)
nop
nop
nop
nop
inc %rdx
// Load
lea addresses_D+0xba70, %rbx
nop
cmp $10516, %r13
movb (%rbx), %dl
nop
sub %r10, %r10
// Faulty Load
lea addresses_US+0x3196, %r13
nop
nop
nop
nop
and $63369, %r12
mov (%r13), %rbx
lea oracles, %r10
and $0xff, %rbx
shlq $12, %rbx
mov (%r10,%rbx,1), %rbx
pop %rdx
pop %rbx
pop %r15
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_US', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_US', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': True, 'AVXalign': True, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 10}}
{'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
*/
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/g-boubuf.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 27716 | <reponame>djamal2727/Main-Bearing-Analytical-Model
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . B O U N D E D _ B U F F E R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2003-2020, AdaCore --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception 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/>. --
-- --
-- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
package body GNAT.Bounded_Buffers is
--------------------
-- Bounded_Buffer --
--------------------
protected body Bounded_Buffer is
------------
-- Insert --
------------
entry Insert (Item : Element) when Count /= Capacity is
begin
Values (Next_In) := Item;
Next_In := (Next_In mod Capacity) + 1;
Count := Count + 1;
end Insert;
------------
-- Remove --
------------
entry Remove (Item : out Element) when Count > 0 is
begin
Item := Values (Next_Out);
Next_Out := (Next_Out mod Capacity) + 1;
Count := Count - 1;
end Remove;
-----------
-- Empty --
-----------
function Empty return Boolean is
begin
return Count = 0;
end Empty;
----------
-- Full --
----------
function Full return Boolean is
begin
return Count = Capacity;
end Full;
------------
-- Extent --
------------
function Extent return Natural is
begin
return Count;
end Extent;
end Bounded_Buffer;
end GNAT.Bounded_Buffers;
|
libsrc/sdcard/sd_initialize.asm | jpoikela/z88dk | 640 | 24292 | ;
; Old School Computer Architecture - SD Card driver
; Taken from the OSCA Bootcode by <NAME> 2011
; Port by <NAME>, 2012
;
; Init SD card communications
; Input: HL = card slot number
;
; $Id: sd_initialize.asm,v 1.8 2017-01-03 00:27:43 aralbrec Exp $
;
PUBLIC sd_initialize
PUBLIC _sd_initialize
EXTERN sd_init_main
EXTERN sd_power_off
EXTERN sd_spi_port_fast
EXTERN sd_read_cid
EXTERN sd_read_csd
EXTERN sd_deselect_card
sd_initialize:
_sd_initialize:
ld a,l
call sd_init_main
or a ; if non-zero returned in A, there was an error
jr z,sd_inok
call sd_power_off ; if init failed shut down the SPI port
ld hl,-1
ret
sd_inok:
call sd_spi_port_fast ; on initializtion success - switch to fast clock
; call sd_read_cid ; and read CID/CSD
; jr nz,sd_done
; push hl ; cache the location of the ID string
; call sd_read_csd
; pop hl
sd_done:
call sd_deselect_card ; Routines always deselect card on return
or a ; If A = 0 on SD routine exit, ZF set on return: No error
ret z
ld hl,-1
ret ; if A <> set carry flag
|
oeis/277/A277354.asm | neoneye/loda-programs | 11 | 104204 | <gh_stars>10-100
; A277354: a(n) = Product_{k=1..n} (4*k^2+1).
; Submitted by <NAME>
; 1,5,85,3145,204425,20646925,2993804125,589779412625,151573309044625,49261325439503125,19753791501240753125,9580588878101765265625,5527999782664718558265625,3742455852864014463945828125,2937827844498251354197475078125
mul $0,2
add $0,2
seq $0,6228 ; Expansion of exp(arcsin(x)).
|
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_21829_1402.asm | ljhsiun2/medusa | 9 | 91303 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r14
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x6e0d, %r11
nop
nop
nop
nop
xor %r12, %r12
mov $0x6162636465666768, %r13
movq %r13, %xmm2
and $0xffffffffffffffc0, %r11
movntdq %xmm2, (%r11)
nop
nop
nop
nop
inc %rcx
lea addresses_UC_ht+0x420d, %r14
nop
nop
nop
cmp %r9, %r9
movb (%r14), %r12b
nop
nop
cmp %rbp, %rbp
lea addresses_UC_ht+0x1a40d, %rsi
lea addresses_A_ht+0x86cd, %rdi
nop
nop
nop
nop
cmp %r9, %r9
mov $45, %rcx
rep movsb
nop
nop
sub $13225, %r14
lea addresses_WC_ht+0x3b0d, %rsi
nop
nop
nop
nop
xor %r9, %r9
mov $0x6162636465666768, %rbp
movq %rbp, (%rsi)
nop
nop
nop
sub %rbp, %rbp
lea addresses_WC_ht+0x13c0d, %r11
nop
nop
nop
inc %rbp
movw $0x6162, (%r11)
nop
nop
nop
inc %r9
lea addresses_WC_ht+0xaf11, %rsi
lea addresses_UC_ht+0xf51d, %rdi
xor %r14, %r14
mov $24, %rcx
rep movsb
cmp $44325, %rcx
lea addresses_WC_ht+0x5a0d, %r11
nop
nop
nop
nop
nop
cmp $21940, %r14
mov $0x6162636465666768, %rdi
movq %rdi, %xmm7
vmovups %ymm7, (%r11)
nop
nop
nop
nop
cmp %rcx, %rcx
lea addresses_WT_ht+0x18c0d, %rdi
nop
nop
nop
nop
nop
and %r9, %r9
and $0xffffffffffffffc0, %rdi
vmovaps (%rdi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $1, %xmm6, %r13
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_WT_ht+0xb0d, %rsi
lea addresses_A_ht+0xec1d, %rdi
nop
nop
nop
nop
cmp %r14, %r14
mov $4, %rcx
rep movsb
nop
nop
xor %rdi, %rdi
lea addresses_WC_ht+0x1de0d, %rcx
nop
sub %r11, %r11
mov $0x6162636465666768, %rbp
movq %rbp, %xmm4
vmovups %ymm4, (%rcx)
nop
nop
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0x20d, %rsi
nop
nop
nop
nop
nop
and %rbp, %rbp
movb (%rsi), %r9b
dec %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r14
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r15
push %r8
push %r9
push %rdx
push %rsi
// Store
lea addresses_PSE+0x4b0d, %r13
nop
nop
nop
sub %rsi, %rsi
movw $0x5152, (%r13)
nop
nop
nop
nop
nop
sub $65266, %rsi
// Store
lea addresses_PSE+0x8a0d, %r13
nop
inc %r11
movb $0x51, (%r13)
nop
nop
nop
nop
nop
add %r11, %r11
// Load
lea addresses_normal+0x5a0d, %rdx
nop
nop
nop
inc %r15
vmovups (%rdx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %r8
nop
nop
nop
xor $39649, %r11
// Faulty Load
lea addresses_PSE+0x8a0d, %r15
nop
cmp %r11, %r11
movb (%r15), %r9b
lea oracles, %r11
and $0xff, %r9
shlq $12, %r9
mov (%r11,%r9,1), %r9
pop %rsi
pop %rdx
pop %r9
pop %r8
pop %r15
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': True, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 7, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'51': 21829}
51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51
*/
|
Sources/Globe_3d/gl/gl-errors.adb | ForYouEyesOnly/Space-Convoy | 1 | 2917 | <filename>Sources/Globe_3d/gl/gl-errors.adb
-------------------------------------------------------------------------
-- GL.Errors - GL error support
--
-- Copyright (c) <NAME> 2007
-- AUSTRALIA
-- Permission granted to use this software, without any warranty,
-- for any purpose, provided this copyright note remains attached
-- and unmodified if sources are distributed further.
-------------------------------------------------------------------------
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Unchecked_Conversion;
with GLU;
with Interfaces.C.Strings; use Interfaces.C.Strings;
package body GL.Errors is
function Current return String is
function to_chars_ptr is new Ada.Unchecked_Conversion (GL.ubytePtr, chars_ptr);
begin
return Value (to_chars_ptr (GLU.Error_String (GL.Get_Error)));
end Current;
procedure log (Prefix : String := "") is
Current_GL_Error : constant String := Current;
begin
if Current_GL_Error /= "no error" then
case Prefix = "" is
when True => Put_Line ("openGL error : '" & Current_GL_Error & "'");
when False => Put_Line (Prefix & " : '" & Current_GL_Error & "'");
end case;
raise openGL_Error; -- tbd : use ada.exceptions to attach the openg error string to the exception.
end if;
end log;
procedure log (Prefix : String := ""; error_Occurred : out Boolean) is
Current_GL_Error : constant String := Current;
begin
error_Occurred := Current_GL_Error /= "no error";
if error_Occurred then
case Prefix = "" is
when True => Put_Line ("openGL error : '" & Current_GL_Error & "'");
when False => Put_Line (Prefix & " : '" & Current_GL_Error & "'");
end case;
end if;
end log;
end GL.Errors;
|
src/Categories/Category/Finite/Fin/Instance/Parallel.agda | MirceaS/agda-categories | 0 | 3001 | <filename>src/Categories/Category/Finite/Fin/Instance/Parallel.agda
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite.Fin.Instance.Parallel where
open import Data.Nat using (ℕ)
open import Data.Fin
open import Data.Fin.Patterns
open import Relation.Binary.PropositionalEquality using (_≡_ ; refl)
open import Categories.Category.Finite.Fin
open import Categories.Category
private
variable
a b c d : Fin 2
--
-- /---0---\
-- 0 1
-- \---1---/
--
ParallelShape : FinCatShape
ParallelShape = record
{ size = 2
; ∣_⇒_∣ = card
; hasShape = record
{ id = id
; _∘_ = _∘_
; assoc = assoc
; identityˡ = identityˡ
; identityʳ = identityʳ
}
}
where card : Fin 2 → Fin 2 → ℕ
card 0F 0F = 1
card 0F 1F = 2
card 1F 0F = 0
card 1F 1F = 1
id : Fin (card a a)
id {0F} = 0F
id {1F} = 0F
_∘_ : ∀ {a b c} → Fin (card b c) → Fin (card a b) → Fin (card a c)
_∘_ {0F} {0F} {0F} 0F 0F = 0F
_∘_ {0F} {0F} {1F} 0F 0F = 0F
_∘_ {0F} {0F} {1F} 1F 0F = 1F
_∘_ {0F} {1F} {1F} 0F 0F = 0F
_∘_ {0F} {1F} {1F} 0F 1F = 1F
_∘_ {1F} {1F} {1F} 0F 0F = 0F
assoc : ∀ {f : Fin (card a b)} {g : Fin (card b c)} {h : Fin (card c d)} →
((h ∘ g) ∘ f) ≡ (h ∘ (g ∘ f))
assoc {0F} {0F} {0F} {0F} {0F} {0F} {0F} = refl
assoc {0F} {0F} {0F} {1F} {0F} {0F} {0F} = refl
assoc {0F} {0F} {0F} {1F} {0F} {0F} {1F} = refl
assoc {0F} {0F} {1F} {1F} {0F} {0F} {0F} = refl
assoc {0F} {0F} {1F} {1F} {0F} {1F} {0F} = refl
assoc {0F} {1F} {1F} {1F} {0F} {0F} {0F} = refl
assoc {0F} {1F} {1F} {1F} {1F} {0F} {0F} = refl
assoc {1F} {1F} {1F} {1F} {0F} {0F} {0F} = refl
identityˡ : ∀ {a b} {f : Fin (card a b)} → (id ∘ f) ≡ f
identityˡ {0F} {0F} {0F} = refl
identityˡ {0F} {1F} {0F} = refl
identityˡ {0F} {1F} {1F} = refl
identityˡ {1F} {1F} {0F} = refl
identityʳ : ∀ {a b} {f : Fin (card a b)} → (f ∘ id) ≡ f
identityʳ {0F} {0F} {0F} = refl
identityʳ {0F} {1F} {0F} = refl
identityʳ {0F} {1F} {1F} = refl
identityʳ {1F} {1F} {0F} = refl
Parallel : Category _ _ _
Parallel = FinCategory ParallelShape
module Parallel = Category Parallel
|
sources/tri_par_tas.ads | theurt/PageRank | 0 | 28309 | <filename>sources/tri_par_tas.ads
--Ce module met en place les outils qui vont nous permettre de trier la matrice poids par valeur décroissante
with Google_Naive;
generic
nb_ligne : Integer;
nb_col : Integer; -- nombre de colonne dans le tas (qui sera représenté par un tableau et non un ABR)
type T_Element is digits <>; -- type associé au poids de chaque noeud
with package P_Google_Naive is new Google_Naive(nombre_max_ligne=>nb_ligne, nombre_max_colonne => nb_col, T_Element=> T_Element);
package Tri_par_tas is
--! ces types ne sont pas privés pour simplifier l'utilisation de ce module, nous avons confiance dans les appelants (qui sont nous-mêmes)
type T_couple is
record
indice : Integer; --{indice >=1 and indice <= matrice.nb_colonne}
weight : T_Element;
end record;
subtype List_Index is natural range 1 .. nb_col;
type T_vecteur is array (List_Index) of T_couple;
-- Le module renvoit un type "vecteur" ou chaque coefficient du vecteur vaut (indice_origine : poids)
type T_vecteur_couple is
record
vecteur : T_vecteur;
taille : Integer;
end record;
Empty_tas_error : exception;
Full_tas_error : exception;
-- Nom : Afficher
-- Semantique : Afficher un tas, procedure utile pour débuguer et les tests
-- Paramètre(s) :
-- tas : in T_vecteur_couple; -- tas que l'on cherche à trier
-- Pre : True
-- Post : True
-- Tests : Aucun
-- Exception : Aucune
procedure Afficher (tas : in T_vecteur_couple);
-- Nom : Initialiser
-- Semantique : Initialiseer un vecteur poids ou les coefficients valent (indice : poids)
-- Paramètre(s) :
-- vecteur_ligne : in vecteur_simple.T_Google_Naive; -- vecteur à trier
-- poids : out T_vecteur_couple; -- vecteur avec des couples (indice : poids)
-- Pre : True
-- Post : chaque coefficient.weight de poids correspond au coefficient de vecteur_ligne et chaque cofficient.indice de poids = indice
-- Tests : Aucun
-- Exception : Aucune
procedure Initialiser_poids(vecteur_ligne : in P_Google_Naive.T_Google_Naive; poids: out T_vecteur_couple);
-- Nom : Tri_tas
-- Semantique : Trier la matrice poids par ordre décroissant des poids
-- ATTENTION CE TRI EST INSTABLE MAIS CELA NOUS SUFFIT POUR LE PAGERANK
-- Paramètre(s) :
-- tas : in out T_vecteur_couple; -- tas que l'on cherche à trier
-- Pre : True
-- Post : Le tableau est trié (condition complexe)
-- Tests :
-- Entrée : tas vide [] ; Sortie : tas vide []
-- Entrée : [( 0 : 7.32113E+04, )( 1 : 2.24492E+04, )( 2 : 7.86805E+04, )]
-- Sortie : [( 2 : 7.86805E+04, )( 1 : 2.24492E+04, )( 0 : 7.32113E+04, )]
-- Exception : Aucune
procedure Tri_tas (poids : in out T_vecteur_couple);
end Tri_par_tas;
|
FormalAnalyzer/models/apps/Motionbasedthermostat.als | Mohannadcse/IoTCOM_BehavioralRuleExtractor | 0 | 988 | module app_Motionbasedthermostat
open IoTBottomUp as base
open cap_runIn
open cap_now
open cap_thermostat
open cap_motionSensor
open cap_temperatureMeasurement
open cap_userInput
one sig app_Motionbasedthermostat extends IoTApp {
thermostat : one cap_thermostat,
motionSensor : some cap_motionSensor,
temperatureSensor : one cap_temperatureMeasurement,
idHeatSet : one cap_userInput,
idCoolSet : one cap_userInput,
opHeatSet : one cap_userInput,
opCoolSet : one cap_userInput,
idleTimeout : one cap_userInput,
state : one cap_state,
} {
rules = r
//capabilities = thermostat + motionSensor + temperatureSensor + idleTimeout + state + idHeatSet + idCoolSet + opHeatSet + opCoolSet
}
one sig cap_state extends cap_runIn {} {
attributes = cap_runIn_attr //cap_state_attr +
}
//abstract sig cap_state_attr extends Attribute {}
one sig cap_userInput_attr_idHeatSet extends cap_userInput_attr {} {
values = cap_userInput_attr_idHeatSet_val
}
abstract sig cap_userInput_attr_idHeatSet_val extends cap_userInput_attr_value_val {}
one sig cap_userInput_attr_idCoolSet extends cap_userInput_attr {} {
values = cap_userInput_attr_idCoolSet_val
}
one sig cap_userInput_attr_opHeatSet extends cap_userInput_attr {} {
values = cap_userInput_attr_opHeatSet_val
}
one sig cap_userInput_attr_opCoolSet extends cap_userInput_attr {} {
values = cap_userInput_attr_opCoolSet_val
}
one sig cap_userInput_attr_opHeatSet_val extends cap_thermostat_attr_thermostat_val_setHeatingSetpoint{} //cap_userInput_attr_value_val,
one sig cap_userInput_attr_opCoolSet_val, cap_userInput_attr_idCoolSet_val extends cap_thermostat_attr_thermostat_val_setCoolingSetpoint{}
one sig cap_userInput_attr_idleTimeout extends cap_userInput_attr {}
{
values = cap_userInput_attr_idleTimeout_val
}
abstract sig cap_userInput_attr_idleTimeout_val extends cap_userInput_attr_value_val {}
one sig cap_userInput_attr_idleTimeout_val_0 extends cap_userInput_attr_idleTimeout_val {}
abstract sig r extends Rule {}
one sig r0 extends r {}{
triggers = r0_trig
conditions = r0_cond
commands = r0_comm
}
abstract sig r0_trig extends Trigger {}
one sig r0_trig0 extends r0_trig {} {
capabilities = app_Motionbasedthermostat.motionSensor
attribute = cap_motionSensor_attr_motion
value = cap_motionSensor_attr_motion_val_inactive
}
abstract sig r0_cond extends Condition {}
one sig r0_cond0 extends r0_cond {} {
capabilities = app_Motionbasedthermostat.idleTimeout
attribute = cap_userInput_attr_idleTimeout
value = cap_userInput_attr_idleTimeout_val_0
}
abstract sig r0_comm extends Command {}
one sig r0_comm0 extends r0_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setHeatingSetpoint
}
one sig r0_comm1 extends r0_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setCoolingSetpoint
}
one sig r1 extends r {}{
triggers = r1_trig
conditions = r1_cond
commands = r1_comm
}
abstract sig r1_trig extends Trigger {}
one sig r1_trig0 extends r1_trig {} {
capabilities = app_Motionbasedthermostat.motionSensor
attribute = cap_motionSensor_attr_motion
value = cap_motionSensor_attr_motion_val_active
}
abstract sig r1_cond extends Condition {}
abstract sig r1_comm extends Command {}
one sig r1_comm0 extends r1_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setHeatingSetpoint
}
one sig r1_comm1 extends r1_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setCoolingSetpoint
}
one sig r2 extends r {}{
triggers = r2_trig
conditions = r2_cond
commands = r2_comm
}
abstract sig r2_trig extends Trigger {}
one sig r2_trig0 extends r2_trig {} {
capabilities = app_Motionbasedthermostat.motionSensor
attribute = cap_motionSensor_attr_motion
value = cap_motionSensor_attr_motion_val_inactive
}
abstract sig r2_cond extends Condition {}
one sig r2_cond0 extends r2_cond {} {
capabilities = app_Motionbasedthermostat.idleTimeout
attribute = cap_userInput_attr_idleTimeout
value = cap_userInput_attr_idleTimeout_val - cap_userInput_attr_idleTimeout_val_0
}
abstract sig r2_comm extends Command {}
one sig r2_comm0 extends r2_comm {} {
capability = app_Motionbasedthermostat.state
attribute = cap_runIn_attr_runIn
value = cap_runIn_attr_runIn_val_on
}
/*
one sig r3 extends r {}{
triggers = r3_trig
conditions = r3_cond
commands = r3_comm
}
abstract sig r3_trig extends Trigger {}
one sig r3_trig0 extends r3_trig {} {
capabilities = app_Motionbasedthermostat.temperatureSensor
attribute = cap_temperatureMeasurement_attr_temperature
no value
}
abstract sig r3_cond extends Condition {}
one sig r3_cond0 extends r3_cond {} {
capabilities = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_currentThermostatFanMode
value = cap_thermostat_attr_currentThermostatFanMode_val - cap_thermostat_attr_currentThermostatFanMode_val_fanAuto
}
abstract sig r3_comm extends Command {}
one sig r3_comm0 extends r3_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setThermostatFanMode
}
one sig r4 extends r {}{
triggers = r4_trig
conditions = r4_cond
commands = r4_comm
}
abstract sig r4_trig extends Trigger {}
one sig r4_trig0 extends r4_trig {} {
capabilities = app_Motionbasedthermostat.temperatureSensor
attribute = cap_temperatureMeasurement_attr_temperature
no value
}
abstract sig r4_cond extends Condition {}
one sig r4_cond0 extends r4_cond {} {
capabilities = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_currentThermostatMode
value = cap_thermostat_attr_currentThermostatMode_val_cool
}
one sig r4_cond1 extends r4_cond {} {
capabilities = app_Motionbasedthermostat.temperatureSensor
attribute = cap_temperatureMeasurement_attr_temperature
value = cap_temperatureMeasurement_attr_temperature_val_
}
abstract sig r4_comm extends Command {}
one sig r4_comm0 extends r4_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setThermostatMode
}
one sig r5 extends r {}{
triggers = r5_trig
conditions = r5_cond
commands = r5_comm
}
abstract sig r5_trig extends Trigger {}
one sig r5_trig0 extends r5_trig {} {
capabilities = app_Motionbasedthermostat.temperatureSensor
attribute = cap_temperatureMeasurement_attr_temperature
no value
}
abstract sig r5_cond extends Condition {}
one sig r5_cond0 extends r5_cond {} {
capabilities = app_Motionbasedthermostat.temperatureSensor
attribute = cap_temperatureMeasurement_attr_temperature
value = cap_temperatureMeasurement_attr_temperature_val_
}
one sig r5_cond1 extends r5_cond {} {
capabilities = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_currentThermostatMode
value = cap_thermostat_attr_currentThermostatMode_val_heat
}
abstract sig r5_comm extends Command {}
one sig r5_comm0 extends r5_comm {} {
capability = app_Motionbasedthermostat.thermostat
attribute = cap_thermostat_attr_thermostat
value = cap_thermostat_attr_thermostat_val_setThermostatMode
}
*/
|
oeis/214/A214890.asm | neoneye/loda-programs | 11 | 94733 | ; A214890: Primes congruent to {2, 3} mod 17.
; Submitted by <NAME>(w1)
; 2,3,19,37,53,71,139,173,223,241,257,359,461,479,547,563,631,683,733,751,853,887,937,971,1039,1091,1193,1277,1447,1481,1499,1549,1567,1583,1601,1669,1753,1787,1873,1889,1907,2111,2161,2179,2213,2281,2297,2383,2399,2417,2467,2621,2671,2689,2791,2909,2927,3011,3079,3181,3301,3539,3607,3623,3691,3709,3793,3929,3947,4049,4099,4133,4201,4219,4253,4337,4423,4457,4507,4643,4729,4813,4831,4933,4967,5051,5119,5153,5171,5273,5323,5443,5477,5527,5647,5749,5783,5851,5867,5953
mov $1,1
mov $2,332202
mov $5,1
mov $6,2
lpb $2
pow $1,4
mov $3,$6
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,3
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,18
sub $5,3
add $5,$1
gcd $1,2
mov $6,$5
lpe
mov $0,$5
add $0,1
|
code/YeWenting/T23.asm | KongoHuster/assembly-exercise | 1 | 19180 | ;; Created by Ywt.
;; Date: 11/22/2016
TITLE T23_YWT
DATA SEGMENT
M DW 1, -1, 2, 3, 6 DUP (0), ?, ?
N EQU 10
ENDS
CODE SEGMENT
ASSUME CS:CODE, DS:DATA
START: MOV AX, DATA
MOV DS, AX
;; BX->INDEX CX->MAX_ABS
;; DI->MAX_INDEX
;; DX->MAX_NUM
XOR BX, BX
XOR CX, CX
LOOP1: MOV AX, M[BX]
TEST AX, 8000H
JZ ABS
XOR AX, 0FFFFH
INC AX
ABS: CMP AX, CX
JNA NEXT
MOV CX, AX
MOV DI, BX
MOV DX, M[BX]
NEXT: ADD BX, 2
CMP BX, 2*N
JNZ LOOP1
END: MOV M[2*N], DX
MOV M[2*N+2], DI
;; FINISH
MOV AH, 4CH
INT 21H
ENDS
END START |
src/main/antlr/ddbexpressions/KeyConditionExpression.g4 | aws-samples/crud4dynamo | 7 | 7387 | grammar KeyConditionExpression;
import Common;
start: keyConditionExpression EOF;
/*
* https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html#DDB-Query-request-KeyConditionExpression
*/
keyConditionExpression
: partitionKeyExpression
| partitionKeyExpression AND sortKeyExpression
;
partitionKeyExpression
: ATTRIBUTE_NAME '=' EXPRESSION_ATTRIBUTE_VALUE # PartitionKeyExpWithAttrName
| EXPRESSION_ATTRIBUTE_NAME '=' EXPRESSION_ATTRIBUTE_VALUE # PartitionKeyExpWithExpAttrName
;
sortKeyExpression
: compareExpression
| betweenExpression
| beginsWithExpression
;
compareExpression
: ATTRIBUTE_NAME comparator EXPRESSION_ATTRIBUTE_VALUE # CompareExpWithAttrName
| EXPRESSION_ATTRIBUTE_NAME comparator EXPRESSION_ATTRIBUTE_VALUE # CompareExpWithExpAttrName
;
comparator
: '='
| '<'
| '<='
| '>'
| '>='
;
betweenExpression
: ATTRIBUTE_NAME BETWEEN EXPRESSION_ATTRIBUTE_VALUE AND EXPRESSION_ATTRIBUTE_VALUE # BetweenExpWithAttrName
| EXPRESSION_ATTRIBUTE_NAME BETWEEN EXPRESSION_ATTRIBUTE_VALUE AND EXPRESSION_ATTRIBUTE_VALUE # BetweenExpWithExpAttrName
;
beginsWithExpression
: BEGINS_WITH '(' ATTRIBUTE_NAME ',' EXPRESSION_ATTRIBUTE_VALUE ')' # BeginsWithExpWithAttrName
| BEGINS_WITH '(' EXPRESSION_ATTRIBUTE_NAME ',' EXPRESSION_ATTRIBUTE_VALUE ')' # BeginsWithExpWithExpAttrName
;
BEGINS_WITH
: 'begins_with'
;
BETWEEN
: B E T W E E N
;
AND
: A N D
;
OR
: O R
;
NOT
: N O T
;
IN
: I N
;
|
src/annotation_processor/implementation/yaml-transformator-annotation-vars.adb | robdaemon/AdaYaml | 32 | 611 | -- part of AdaYaml, (c) 2017 <NAME>
-- released under the terms of the MIT license, see the file "copying.txt"
with Yaml.Events.Context;
package body Yaml.Transformator.Annotation.Vars is
procedure Put (Object : in out Instance; E : Event) is
begin
Object.State.all (Object, E);
end Put;
function Has_Next (Object : Instance) return Boolean is (False);
function Next (Object : in out Instance) return Event is
begin
raise Constraint_Error with "no event available";
return (others => <>);
end Next;
function New_Vars (Pool : Text.Pool.Reference;
Node_Context : Node_Context_Type;
Processor_Context : Events.Context.Reference;
Swallows_Previous : out Boolean)
return not null Pointer is
pragma Unreferenced (Pool);
begin
if Node_Context /= Document_Root then
raise Annotation_Error with
"@@vars may only be applied to a document's root node";
end if;
Swallows_Previous := True;
return new Instance'(Transformator.Instance with
Context => Processor_Context, others => <>);
end New_Vars;
procedure Initial (Object : in out Instance; E : Event) is
begin
if E.Kind /= Annotation_Start then
raise Stream_Error with
"unexpected token (expected annotation start): " & E.Kind'Img;
end if;
Object.State := After_Annotation_Start'Access;
end Initial;
procedure After_Annotation_Start (Object : in out Instance; E : Event) is
begin
if E.Kind /= Annotation_End then
raise Annotation_Error with
"@@vars does not take any parameters.";
end if;
Object.State := After_Annotation_End'Access;
end After_Annotation_Start;
procedure After_Annotation_End (Object : in out Instance; E : Event) is
begin
if E.Kind /= Mapping_Start then
raise Annotation_Error with
"@@vars must be applied on a mapping.";
end if;
Object.State := At_Mapping_Level'Access;
end After_Annotation_End;
procedure At_Mapping_Level (Object : in out Instance; E : Event) is
begin
case E.Kind is
when Scalar =>
Object.Cur_Name := E.Content;
Object.State := Inside_Value'Access;
when Mapping_End =>
Object.State := After_Mapping_End'Access;
when others =>
raise Annotation_Error with
"mapping annotated with @@vars must only have scalar keys";
end case;
end At_Mapping_Level;
procedure Inside_Value (Object : in out Instance; E : Event) is
use type Events.Context.Location_Type;
use type Text.Reference;
begin
if Object.Depth = 0 then
declare
Modified_Event : Event := E;
begin
case E.Kind is
when Scalar =>
Modified_Event.Scalar_Properties.Anchor := Object.Cur_Name;
when Mapping_Start | Sequence_Start =>
Modified_Event.Collection_Properties.Anchor :=
Object.Cur_Name;
when Alias =>
declare
Pos : constant Events.Context.Cursor
:= Events.Context.Position (Object.Context, E.Target);
begin
if Events.Context.Location (Pos) = Events.Context.None then
raise Annotation_Error with
"unresolvable alias: *" & E.Target;
end if;
declare
Referenced_Events :
constant Events.Store.Stream_Reference :=
Events.Context.Retrieve (Pos);
Depth : Natural := 0;
begin
Modified_Event := Referenced_Events.Value.Next;
case Modified_Event.Kind is
when Mapping_Start | Sequence_Start =>
Modified_Event.Collection_Properties.Anchor :=
Object.Cur_Name;
when Scalar =>
Modified_Event.Scalar_Properties.Anchor :=
Object.Cur_Name;
when others =>
raise Program_Error with
"alias referenced " & Modified_Event.Kind'Img;
end case;
loop
Object.Context.Stream_Store.Memorize
(Modified_Event);
case Modified_Event.Kind is
when Mapping_Start | Sequence_Start =>
Depth := Depth + 1;
when Mapping_End | Sequence_End =>
Depth := Depth - 1;
when others => null;
end case;
exit when Depth = 0;
Modified_Event := Referenced_Events.Value.Next;
end loop;
end;
end;
Object.State := At_Mapping_Level'Access;
return;
when others =>
raise Stream_Error with
"Unexpected event (expected node start): " & E.Kind'Img;
end case;
Object.Cur_Queue.Append (Modified_Event);
end;
elsif E.Kind = Alias then
declare
Pos : constant Events.Context.Cursor
:= Events.Context.Position (Object.Context, E.Target);
begin
if Events.Context.Location (Pos) = Events.Context.None then
raise Annotation_Error with
"unresolvable alias: *" & E.Target;
end if;
declare
Referenced_Events : constant Events.Store.Stream_Reference :=
Events.Context.Retrieve (Pos);
Depth : Natural := 0;
Cur_Event : Event := Referenced_Events.Value.Next;
begin
loop
Object.Cur_Queue.Append (Cur_Event);
case Cur_Event.Kind is
when Mapping_Start | Sequence_Start =>
Depth := Depth + 1;
when Mapping_End | Sequence_End =>
Depth := Depth - 1;
when others => null;
end case;
exit when Depth = 0;
Cur_Event := Referenced_Events.Value.Next;
end loop;
end;
end;
else
Object.Cur_Queue.Append (E);
end if;
case E.Kind is
when Mapping_Start | Sequence_Start =>
Object.Depth := Object.Depth + 1;
return;
when Mapping_End | Sequence_End =>
Object.Depth := Object.Depth - 1;
when others => null;
end case;
if Object.Depth = 0 then
loop
Object.Context.Stream_Store.Memorize
(Object.Cur_Queue.First);
Object.Cur_Queue.Dequeue;
exit when Object.Cur_Queue.Length = 0;
end loop;
Object.State := At_Mapping_Level'Access;
end if;
end Inside_Value;
procedure After_Mapping_End (Object : in out Instance; E : Event) is
begin
raise Constraint_Error with
"unexpected input to @@vars (already finished)";
end After_Mapping_End;
begin
Map.Include ("vars", New_Vars'Access);
end Yaml.Transformator.Annotation.Vars;
|
programs/oeis/049/A049658.asm | neoneye/loda | 22 | 88986 | ; A049658: a(n) = (F(8*n+5) - 2)/3, where F=A000045 (the Fibonacci sequence).
; 1,77,3648,171409,8052605,378301056,17772097057,834910260653,39223010153664,1842646566961585,86565165637040861,4066720138373958912,191049281337939028033,8975249502744760358669,421645677347665797829440,19808371585837547737625041,930571818857017077870547517,43717067114693965112178108288,2053771582571759343194500542049,96483547313757995165029347368045,4532672952164054013413184825756096,212939145204396780635254657463168497
mul $0,4
add $0,2
mov $1,1
mov $2,1
lpb $0
sub $0,1
add $1,$2
add $2,$1
lpe
div $1,3
mov $0,$1
|
Teme/Tema1/tema1.asm | DanBrezeanu/IOCLA | 2 | 242609 | <gh_stars>1-10
%include "io.inc"
%define MAX_INPUT_SIZE 4096
section .bss
expr: resb MAX_INPUT_SIZE
section .text
global CMAIN
make_number: ; se parseaza stringul citit cat timp contine cifre si se creeaza un nou numar
push ebp
lea ebp, [esp]
xor edx, edx ; dl va contine fiecare caracter
xor eax, eax ; eax contine numarul din string, care va fi "returnat"
parse_input:
mov dl, [ecx]
cmp dl, ' ' ; daca s-a gasit un spatiu sau un \0
jbe return
imul eax, 10
lea eax, [eax + edx - '0'] ; eax = eax * 10 + [ecx] - '0'
inc ecx
jmp parse_input
return:
leave
ret
CMAIN:
push ebp
lea ebp, [esp]
GET_STRING expr, MAX_INPUT_SIZE
lea ecx, [expr] ; se va lucra direct pe octetii stringului, pana la '\0'
evaluate_expr:
mov ebx, 1 ; ebx tine initial semnul unui numar gasit
cmp byte [ecx], 0 ; s-a ajuns la finalul stringului
je print
cmp byte [ecx], '*'
je multiplication
cmp byte [ecx], '/'
je division
cmp byte [ecx], '+'
je addition
cmp byte [ecx], '-' ; '-' poate simboliza o scadere sau un numar negativ
je minus
cmp byte [ecx], ' '
je next_char
jmp get_number ; daca nu s-au gasit alte semne, s-a gasit o cifra
minus:
cmp byte [ecx + 1], ' ' ; daca urmeaza un spatiu sau '\0'
jbe subtraction
mov ebx, -1 ; se schimba semnul numarului
inc ecx
get_number:
push eax ; se salveaza pe stiva fostul numar obtinut sau creat
call make_number ; se returneaza in eax noul numar gasit, fara semn
imul ebx ; se aplica semnul
jmp next_char
multiplication:
imul dword [esp] ; se retine in eax rezultatul inmultirii
add esp, 4 ; se scoate inmultitorul de pe stiva
jmp next_char
division: ; se impart primele 2 numere gasite in ordine inversa, respectand semnul
pop ebx ; deimpartitul este pe stiva si se preia de catre ebx
xchg eax, ebx ; se pun operanzii in ordinea corecta
cdq
idiv ebx
jmp next_char
addition:
add eax, dword [esp] ; se aduna primele 2 numere disponibile
add esp, 4 ; se scoate al doilea termen de pe stiva
jmp next_char
subtraction: ; se scad primele 2 numere disponibile, in ordine inversa
pop ebx ; descazutul se gaseste pe stiva si se extrage
sub ebx, eax
lea eax, [ebx]
jmp next_char
next_char:
inc ecx
jmp evaluate_expr
print:
PRINT_DEC 4, eax ; la final, rezultatul va fi in eax
NEWLINE
xor eax, eax
leave
ret |
ioq3/build/release-js-js/baseq3/ui/ui_loadconfig.asm | RawTechnique/quake-port | 1 | 20010 | code
proc LoadConfig_MenuEvent 12 8
ADDRFP4 4
INDIRI4
CNSTI4 3
EQI4 $70
ADDRGP4 $69
JUMPV
LABELV $70
ADDRLP4 0
ADDRFP4 0
INDIRP4
CNSTI4 8
ADDP4
INDIRI4
ASGNI4
ADDRLP4 0
INDIRI4
CNSTI4 10
LTI4 $72
ADDRLP4 0
INDIRI4
CNSTI4 14
GTI4 $72
ADDRLP4 0
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 $86-40
ADDP4
INDIRP4
JUMPV
lit
align 4
LABELV $86
address $81
address $75
address $72
address $82
address $84
code
LABELV $75
ADDRGP4 $76
ARGP4
ADDRGP4 s_configs+536+64
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 s_configs+536+76
INDIRP4
ADDP4
INDIRP4
ARGP4
ADDRLP4 8
ADDRGP4 va
CALLP4
ASGNP4
CNSTI4 2
ARGI4
ADDRLP4 8
INDIRP4
ARGP4
ADDRGP4 trap_Cmd_ExecuteText
CALLV
pop
ADDRGP4 UI_PopMenu
CALLV
pop
ADDRGP4 $73
JUMPV
LABELV $81
ADDRGP4 UI_PopMenu
CALLV
pop
ADDRGP4 $73
JUMPV
LABELV $82
ADDRGP4 s_configs+536
ARGP4
CNSTI4 134
ARGI4
ADDRGP4 ScrollList_Key
CALLI4
pop
ADDRGP4 $73
JUMPV
LABELV $84
ADDRGP4 s_configs+536
ARGP4
CNSTI4 135
ARGI4
ADDRGP4 ScrollList_Key
CALLI4
pop
LABELV $72
LABELV $73
LABELV $69
endproc LoadConfig_MenuEvent 12 8
proc LoadConfig_MenuInit 24 16
ADDRGP4 UI_LoadConfig_Cache
CALLV
pop
ADDRGP4 s_configs
ARGP4
CNSTI4 0
ARGI4
CNSTU4 3632
ARGU4
ADDRGP4 qk_memset
CALLP4
pop
ADDRGP4 s_configs+276
CNSTI4 1
ASGNI4
ADDRGP4 s_configs+280
CNSTI4 1
ASGNI4
ADDRGP4 s_configs+288
CNSTI4 10
ASGNI4
ADDRGP4 s_configs+288+12
CNSTI4 320
ASGNI4
ADDRGP4 s_configs+288+16
CNSTI4 16
ASGNI4
ADDRGP4 s_configs+288+60
ADDRGP4 $98
ASGNP4
ADDRGP4 s_configs+288+68
ADDRGP4 color_white
ASGNP4
ADDRGP4 s_configs+288+64
CNSTI4 1
ASGNI4
ADDRGP4 s_configs+360
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+360+4
ADDRGP4 $106
ASGNP4
ADDRGP4 s_configs+360+44
CNSTU4 16384
ASGNU4
ADDRGP4 s_configs+360+12
CNSTI4 0
ASGNI4
ADDRGP4 s_configs+360+16
CNSTI4 78
ASGNI4
ADDRGP4 s_configs+360+76
CNSTI4 256
ASGNI4
ADDRGP4 s_configs+360+80
CNSTI4 329
ASGNI4
ADDRGP4 s_configs+448
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+448+4
ADDRGP4 $120
ASGNP4
ADDRGP4 s_configs+448+44
CNSTU4 16384
ASGNU4
ADDRGP4 s_configs+448+12
CNSTI4 376
ASGNI4
ADDRGP4 s_configs+448+16
CNSTI4 76
ASGNI4
ADDRGP4 s_configs+448+76
CNSTI4 256
ASGNI4
ADDRGP4 s_configs+448+80
CNSTI4 334
ASGNI4
ADDRGP4 s_configs+632
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+632+4
ADDRGP4 $134
ASGNP4
ADDRGP4 s_configs+632+44
CNSTU4 16384
ASGNU4
ADDRGP4 s_configs+632+12
CNSTI4 256
ASGNI4
ADDRGP4 s_configs+632+16
CNSTI4 400
ASGNI4
ADDRGP4 s_configs+632+76
CNSTI4 128
ASGNI4
ADDRGP4 s_configs+632+80
CNSTI4 48
ASGNI4
ADDRGP4 s_configs+720
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+720+44
CNSTU4 2308
ASGNU4
ADDRGP4 s_configs+720+12
CNSTI4 256
ASGNI4
ADDRGP4 s_configs+720+16
CNSTI4 400
ASGNI4
ADDRGP4 s_configs+720+8
CNSTI4 13
ASGNI4
ADDRGP4 s_configs+720+48
ADDRGP4 LoadConfig_MenuEvent
ASGNP4
ADDRGP4 s_configs+720+76
CNSTI4 64
ASGNI4
ADDRGP4 s_configs+720+80
CNSTI4 48
ASGNI4
ADDRGP4 s_configs+720+60
ADDRGP4 $162
ASGNP4
ADDRGP4 s_configs+808
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+808+44
CNSTU4 2308
ASGNU4
ADDRGP4 s_configs+808+12
CNSTI4 320
ASGNI4
ADDRGP4 s_configs+808+16
CNSTI4 400
ASGNI4
ADDRGP4 s_configs+808+8
CNSTI4 14
ASGNI4
ADDRGP4 s_configs+808+48
ADDRGP4 LoadConfig_MenuEvent
ASGNP4
ADDRGP4 s_configs+808+76
CNSTI4 64
ASGNI4
ADDRGP4 s_configs+808+80
CNSTI4 48
ASGNI4
ADDRGP4 s_configs+808+60
ADDRGP4 $180
ASGNP4
ADDRGP4 s_configs+896
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+896+4
ADDRGP4 $184
ASGNP4
ADDRGP4 s_configs+896+44
CNSTU4 260
ASGNU4
ADDRGP4 s_configs+896+8
CNSTI4 10
ASGNI4
ADDRGP4 s_configs+896+48
ADDRGP4 LoadConfig_MenuEvent
ASGNP4
ADDRGP4 s_configs+896+12
CNSTI4 0
ASGNI4
ADDRGP4 s_configs+896+16
CNSTI4 416
ASGNI4
ADDRGP4 s_configs+896+76
CNSTI4 128
ASGNI4
ADDRGP4 s_configs+896+80
CNSTI4 64
ASGNI4
ADDRGP4 s_configs+896+60
ADDRGP4 $201
ASGNP4
ADDRGP4 s_configs+984
CNSTI4 6
ASGNI4
ADDRGP4 s_configs+984+4
ADDRGP4 $205
ASGNP4
ADDRGP4 s_configs+984+44
CNSTU4 272
ASGNU4
ADDRGP4 s_configs+984+8
CNSTI4 11
ASGNI4
ADDRGP4 s_configs+984+48
ADDRGP4 LoadConfig_MenuEvent
ASGNP4
ADDRGP4 s_configs+984+12
CNSTI4 640
ASGNI4
ADDRGP4 s_configs+984+16
CNSTI4 416
ASGNI4
ADDRGP4 s_configs+984+76
CNSTI4 128
ASGNI4
ADDRGP4 s_configs+984+80
CNSTI4 64
ASGNI4
ADDRGP4 s_configs+984+60
ADDRGP4 $222
ASGNP4
ADDRGP4 s_configs+536
CNSTI4 8
ASGNI4
ADDRGP4 s_configs+536+44
CNSTU4 256
ASGNU4
ADDRGP4 s_configs+536+48
ADDRGP4 LoadConfig_MenuEvent
ASGNP4
ADDRGP4 s_configs+536+8
CNSTI4 12
ASGNI4
ADDRGP4 s_configs+536+12
CNSTI4 118
ASGNI4
ADDRGP4 s_configs+536+16
CNSTI4 130
ASGNI4
ADDRGP4 s_configs+536+80
CNSTI4 16
ASGNI4
ADDRGP4 s_configs+536+84
CNSTI4 14
ASGNI4
ADDRGP4 $240
ARGP4
ADDRGP4 $241
ARGP4
ADDRGP4 s_configs+1072
ARGP4
CNSTI4 2048
ARGI4
ADDRLP4 12
ADDRGP4 trap_FS_GetFileList
CALLI4
ASGNI4
ADDRGP4 s_configs+536+68
ADDRLP4 12
INDIRI4
ASGNI4
ADDRGP4 s_configs+536+76
ADDRGP4 s_configs+3120
ASGNP4
ADDRGP4 s_configs+536+88
CNSTI4 3
ASGNI4
ADDRGP4 s_configs+536+68
INDIRI4
CNSTI4 0
NEI4 $248
ADDRGP4 s_configs+1072
ARGP4
ADDRGP4 $253
ARGP4
ADDRGP4 qk_strcpy
CALLP4
pop
ADDRGP4 s_configs+536+68
CNSTI4 1
ASGNI4
ADDRLP4 16
ADDRGP4 s_configs+984+44
ASGNP4
ADDRLP4 16
INDIRP4
ADDRLP4 16
INDIRP4
INDIRU4
CNSTU4 20480
BORU4
ASGNU4
ADDRGP4 $249
JUMPV
LABELV $248
ADDRGP4 s_configs+536+68
INDIRI4
CNSTI4 128
LEI4 $258
ADDRGP4 s_configs+536+68
CNSTI4 128
ASGNI4
LABELV $258
LABELV $249
ADDRLP4 0
ADDRGP4 s_configs+1072
ASGNP4
ADDRLP4 8
CNSTI4 0
ASGNI4
ADDRGP4 $268
JUMPV
LABELV $265
ADDRLP4 8
INDIRI4
CNSTI4 2
LSHI4
ADDRGP4 s_configs+536+76
INDIRP4
ADDP4
ADDRLP4 0
INDIRP4
ASGNP4
ADDRLP4 0
INDIRP4
ARGP4
ADDRLP4 16
ADDRGP4 qk_strlen
CALLU4
ASGNU4
ADDRLP4 4
ADDRLP4 16
INDIRU4
CVUI4 4
ASGNI4
ADDRLP4 4
INDIRI4
ADDRLP4 0
INDIRP4
ADDP4
CNSTI4 -4
ADDP4
ARGP4
ADDRGP4 $275
ARGP4
ADDRLP4 20
ADDRGP4 Q_stricmp
CALLI4
ASGNI4
ADDRLP4 20
INDIRI4
CNSTI4 0
NEI4 $273
ADDRLP4 4
INDIRI4
CNSTI4 4
SUBI4
ADDRLP4 0
INDIRP4
ADDP4
CNSTI1 0
ASGNI1
LABELV $273
ADDRLP4 0
INDIRP4
ARGP4
ADDRGP4 Q_strupr
CALLP4
pop
ADDRLP4 0
ADDRLP4 4
INDIRI4
CNSTI4 1
ADDI4
ADDRLP4 0
INDIRP4
ADDP4
ASGNP4
LABELV $266
ADDRLP4 8
ADDRLP4 8
INDIRI4
CNSTI4 1
ADDI4
ASGNI4
LABELV $268
ADDRLP4 8
INDIRI4
ADDRGP4 s_configs+536+68
INDIRI4
LTI4 $265
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+288
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+360
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+448
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+536
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+632
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+720
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+808
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+896
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 s_configs+984
ARGP4
ADDRGP4 Menu_AddItem
CALLV
pop
LABELV $88
endproc LoadConfig_MenuInit 24 16
export UI_LoadConfig_Cache
proc UI_LoadConfig_Cache 0 4
ADDRGP4 $184
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $201
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $205
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $222
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $106
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $120
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $134
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $162
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
ADDRGP4 $180
ARGP4
ADDRGP4 trap_R_RegisterShaderNoMip
CALLI4
pop
LABELV $285
endproc UI_LoadConfig_Cache 0 4
export UI_LoadConfigMenu
proc UI_LoadConfigMenu 0 4
ADDRGP4 LoadConfig_MenuInit
CALLV
pop
ADDRGP4 s_configs
ARGP4
ADDRGP4 UI_PushMenu
CALLV
pop
LABELV $286
endproc UI_LoadConfigMenu 0 4
bss
align 4
LABELV s_configs
skip 3632
import UI_RankStatusMenu
import RankStatus_Cache
import UI_SignupMenu
import Signup_Cache
import UI_LoginMenu
import Login_Cache
import UI_RankingsMenu
import Rankings_Cache
import Rankings_DrawPassword
import Rankings_DrawName
import Rankings_DrawText
import UI_InitGameinfo
import UI_SPUnlockMedals_f
import UI_SPUnlock_f
import UI_GetAwardLevel
import UI_LogAwardData
import UI_NewGame
import UI_GetCurrentGame
import UI_CanShowTierVideo
import UI_ShowTierVideo
import UI_TierCompleted
import UI_SetBestScore
import UI_GetBestScore
import UI_GetNumBots
import UI_GetBotInfoByName
import UI_GetBotInfoByNumber
import UI_GetNumSPTiers
import UI_GetNumSPArenas
import UI_GetNumArenas
import UI_GetSpecialArenaInfo
import UI_GetArenaInfoByMap
import UI_GetArenaInfoByNumber
import UI_NetworkOptionsMenu
import UI_NetworkOptionsMenu_Cache
import UI_SoundOptionsMenu
import UI_SoundOptionsMenu_Cache
import UI_DisplayOptionsMenu
import UI_DisplayOptionsMenu_Cache
import UI_SaveConfigMenu
import UI_SaveConfigMenu_Cache
import UI_TeamOrdersMenu_Cache
import UI_TeamOrdersMenu_f
import UI_TeamOrdersMenu
import UI_RemoveBotsMenu
import UI_RemoveBots_Cache
import UI_AddBotsMenu
import UI_AddBots_Cache
import trap_SetPbClStatus
import trap_VerifyCDKey
import trap_SetCDKey
import trap_GetCDKey
import trap_MemoryRemaining
import trap_LAN_GetPingInfo
import trap_LAN_GetPing
import trap_LAN_ClearPing
import trap_LAN_ServerStatus
import trap_LAN_GetPingQueueCount
import trap_LAN_GetServerInfo
import trap_LAN_GetServerAddressString
import trap_LAN_GetServerCount
import trap_GetConfigString
import trap_GetGlconfig
import trap_GetClientState
import trap_GetClipboardData
import trap_Key_SetCatcher
import trap_Key_GetCatcher
import trap_Key_ClearStates
import trap_Key_SetOverstrikeMode
import trap_Key_GetOverstrikeMode
import trap_Key_IsDown
import trap_Key_SetBinding
import trap_Key_GetBindingBuf
import trap_Key_KeynumToStringBuf
import trap_S_RegisterSound
import trap_S_StartLocalSound
import trap_CM_LerpTag
import trap_UpdateScreen
import trap_R_DrawStretchPic
import trap_R_SetColor
import trap_R_RenderScene
import trap_R_AddLightToScene
import trap_R_AddPolyToScene
import trap_R_AddRefEntityToScene
import trap_R_ClearScene
import trap_R_RegisterShaderNoMip
import trap_R_RegisterSkin
import trap_R_RegisterModel
import trap_FS_Seek
import trap_FS_GetFileList
import trap_FS_FCloseFile
import trap_FS_Write
import trap_FS_Read
import trap_FS_FOpenFile
import trap_Cmd_ExecuteText
import trap_Argv
import trap_Argc
import trap_Cvar_InfoStringBuffer
import trap_Cvar_Create
import trap_Cvar_Reset
import trap_Cvar_SetValue
import trap_Cvar_VariableStringBuffer
import trap_Cvar_VariableValue
import trap_Cvar_Set
import trap_Cvar_Update
import trap_Cvar_Register
import trap_Milliseconds
import trap_Error
import trap_Print
import UI_SPSkillMenu_Cache
import UI_SPSkillMenu
import UI_SPPostgameMenu_f
import UI_SPPostgameMenu_Cache
import UI_SPArena_Start
import UI_SPLevelMenu_ReInit
import UI_SPLevelMenu_f
import UI_SPLevelMenu
import UI_SPLevelMenu_Cache
import uis
import m_entersound
import UI_StartDemoLoop
import UI_Cvar_VariableString
import UI_Argv
import UI_ForceMenuOff
import UI_PopMenu
import UI_PushMenu
import UI_SetActiveMenu
import UI_IsFullscreen
import UI_DrawTextBox
import UI_AdjustFrom640
import UI_CursorInRect
import UI_DrawChar
import UI_DrawString
import UI_ProportionalStringWidth
import UI_DrawProportionalString_AutoWrapped
import UI_DrawProportionalString
import UI_ProportionalSizeScale
import UI_DrawBannerString
import UI_LerpColor
import UI_SetColor
import UI_UpdateScreen
import UI_DrawRect
import UI_FillRect
import UI_DrawHandlePic
import UI_DrawNamedPic
import UI_ClampCvar
import UI_ConsoleCommand
import UI_Refresh
import UI_MouseEvent
import UI_KeyEvent
import UI_Shutdown
import UI_Init
import UI_RegisterClientModelname
import UI_PlayerInfo_SetInfo
import UI_PlayerInfo_SetModel
import UI_DrawPlayer
import DriverInfo_Cache
import GraphicsOptions_Cache
import UI_GraphicsOptionsMenu
import ServerInfo_Cache
import UI_ServerInfoMenu
import UI_BotSelectMenu_Cache
import UI_BotSelectMenu
import ServerOptions_Cache
import StartServer_Cache
import UI_StartServerMenu
import ArenaServers_Cache
import UI_ArenaServersMenu
import SpecifyServer_Cache
import UI_SpecifyServerMenu
import SpecifyLeague_Cache
import UI_SpecifyLeagueMenu
import Preferences_Cache
import UI_PreferencesMenu
import PlayerSettings_Cache
import UI_PlayerSettingsMenu
import PlayerModel_Cache
import UI_PlayerModelMenu
import UI_CDKeyMenu_f
import UI_CDKeyMenu_Cache
import UI_CDKeyMenu
import UI_ModsMenu_Cache
import UI_ModsMenu
import UI_CinematicsMenu_Cache
import UI_CinematicsMenu_f
import UI_CinematicsMenu
import Demos_Cache
import UI_DemosMenu
import Controls_Cache
import UI_ControlsMenu
import UI_DrawConnectScreen
import TeamMain_Cache
import UI_TeamMainMenu
import UI_SetupMenu
import UI_SetupMenu_Cache
import UI_Message
import UI_ConfirmMenu_Style
import UI_ConfirmMenu
import ConfirmMenu_Cache
import UI_InGameMenu
import InGame_Cache
import UI_CreditMenu
import UI_UpdateCvars
import UI_RegisterCvars
import UI_MainMenu
import MainMenu_Cache
import MenuField_Key
import MenuField_Draw
import MenuField_Init
import MField_Draw
import MField_CharEvent
import MField_KeyDownEvent
import MField_Clear
import ui_medalSounds
import ui_medalPicNames
import ui_medalNames
import text_color_highlight
import text_color_normal
import text_color_disabled
import listbar_color
import list_color
import name_color
import color_dim
import color_red
import color_orange
import color_blue
import color_yellow
import color_white
import color_black
import menu_dim_color
import menu_black_color
import menu_red_color
import menu_highlight_color
import menu_dark_color
import menu_grayed_color
import menu_text_color
import weaponChangeSound
import menu_null_sound
import menu_buzz_sound
import menu_out_sound
import menu_move_sound
import menu_in_sound
import ScrollList_Key
import ScrollList_Draw
import Bitmap_Draw
import Bitmap_Init
import Menu_DefaultKey
import Menu_SetCursorToItem
import Menu_SetCursor
import Menu_ActivateItem
import Menu_ItemAtCursor
import Menu_Draw
import Menu_AdjustCursor
import Menu_AddItem
import Menu_Focus
import Menu_Cache
import ui_ioq3
import ui_cdkeychecked
import ui_cdkey
import ui_server16
import ui_server15
import ui_server14
import ui_server13
import ui_server12
import ui_server11
import ui_server10
import ui_server9
import ui_server8
import ui_server7
import ui_server6
import ui_server5
import ui_server4
import ui_server3
import ui_server2
import ui_server1
import ui_marks
import ui_drawCrosshairNames
import ui_drawCrosshair
import ui_brassTime
import ui_browserShowEmpty
import ui_browserShowFull
import ui_browserSortKey
import ui_browserGameType
import ui_browserMaster
import ui_spSelection
import ui_spSkill
import ui_spVideos
import ui_spAwards
import ui_spScores5
import ui_spScores4
import ui_spScores3
import ui_spScores2
import ui_spScores1
import ui_botsFile
import ui_arenasFile
import ui_ctf_friendly
import ui_ctf_timelimit
import ui_ctf_capturelimit
import ui_team_friendly
import ui_team_timelimit
import ui_team_fraglimit
import ui_tourney_timelimit
import ui_tourney_fraglimit
import ui_ffa_timelimit
import ui_ffa_fraglimit
import BG_PlayerTouchesItem
import BG_PlayerStateToEntityStateExtraPolate
import BG_PlayerStateToEntityState
import BG_TouchJumpPad
import BG_AddPredictableEventToPlayerstate
import BG_EvaluateTrajectoryDelta
import BG_EvaluateTrajectory
import BG_CanItemBeGrabbed
import BG_FindItemForHoldable
import BG_FindItemForPowerup
import BG_FindItemForWeapon
import BG_FindItem
import bg_numItems
import bg_itemlist
import Pmove
import PM_UpdateViewAngles
import Com_Printf
import Com_Error
import Info_NextPair
import Info_Validate
import Info_SetValueForKey_Big
import Info_SetValueForKey
import Info_RemoveKey_Big
import Info_RemoveKey
import Info_ValueForKey
import Com_TruncateLongString
import va
import Q_CountChar
import Q_CleanStr
import Q_PrintStrlen
import Q_strcat
import Q_strncpyz
import Q_stristr
import Q_strupr
import Q_strlwr
import Q_stricmpn
import Q_strncmp
import Q_stricmp
import Q_isintegral
import Q_isanumber
import Q_isalpha
import Q_isupper
import Q_islower
import Q_isprint
import Com_RandomBytes
import Com_SkipCharset
import Com_SkipTokens
import Com_sprintf
import Com_HexStrToInt
import Parse3DMatrix
import Parse2DMatrix
import Parse1DMatrix
import SkipRestOfLine
import SkipBracedSection
import COM_MatchToken
import COM_ParseWarning
import COM_ParseError
import COM_Compress
import COM_ParseExt
import COM_Parse
import COM_GetCurrentParseLine
import COM_BeginParseSession
import COM_DefaultExtension
import COM_CompareExtension
import COM_StripExtension
import COM_GetExtension
import COM_SkipPath
import Com_Clamp
import PerpendicularVector
import AngleVectors
import MatrixMultiply
import MakeNormalVectors
import RotateAroundDirection
import RotatePointAroundVector
import ProjectPointOnPlane
import PlaneFromPoints
import AngleDelta
import AngleNormalize180
import AngleNormalize360
import AnglesSubtract
import AngleSubtract
import LerpAngle
import AngleMod
import BoundsIntersectPoint
import BoundsIntersectSphere
import BoundsIntersect
import BoxOnPlaneSide
import SetPlaneSignbits
import AxisCopy
import AxisClear
import AnglesToAxis
import vectoangles
import Q_crandom
import Q_random
import Q_rand
import Q_acos
import Q_log2
import VectorRotate
import Vector4Scale
import VectorNormalize2
import VectorNormalize
import CrossProduct
import VectorInverse
import VectorNormalizeFast
import DistanceSquared
import Distance
import VectorLengthSquared
import VectorLength
import VectorCompare
import AddPointToBounds
import ClearBounds
import RadiusFromBounds
import NormalizeColor
import ColorBytes4
import ColorBytes3
import _VectorMA
import _VectorScale
import _VectorCopy
import _VectorAdd
import _VectorSubtract
import _DotProduct
import ByteToDir
import DirToByte
import ClampShort
import ClampChar
import Q_rsqrt
import Q_fabs
import Q_isnan
import axisDefault
import vec3_origin
import g_color_table
import colorDkGrey
import colorMdGrey
import colorLtGrey
import colorWhite
import colorCyan
import colorMagenta
import colorYellow
import colorBlue
import colorGreen
import colorRed
import colorBlack
import bytedirs
import Hunk_AllocDebug
import FloatSwap
import LongSwap
import ShortSwap
import CopyLongSwap
import CopyShortSwap
import qk_acos
import qk_fabs
import qk_abs
import qk_tan
import qk_atan2
import qk_cos
import qk_sin
import qk_sqrt
import qk_floor
import qk_ceil
import qk_memcpy
import qk_memset
import qk_memmove
import qk_sscanf
import qk_vsnprintf
import qk_strtol
import qk_atoi
import qk_strtod
import qk_atof
import qk_toupper
import qk_tolower
import qk_strncpy
import qk_strstr
import qk_strrchr
import qk_strchr
import qk_strcmp
import qk_strcpy
import qk_strcat
import qk_strlen
import qk_rand
import qk_srand
import qk_qsort
lit
align 1
LABELV $275
byte 1 46
byte 1 99
byte 1 102
byte 1 103
byte 1 0
align 1
LABELV $253
byte 1 78
byte 1 111
byte 1 32
byte 1 70
byte 1 105
byte 1 108
byte 1 101
byte 1 115
byte 1 32
byte 1 70
byte 1 111
byte 1 117
byte 1 110
byte 1 100
byte 1 46
byte 1 0
align 1
LABELV $241
byte 1 99
byte 1 102
byte 1 103
byte 1 0
align 1
LABELV $240
byte 1 0
align 1
LABELV $222
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 108
byte 1 111
byte 1 97
byte 1 100
byte 1 95
byte 1 49
byte 1 0
align 1
LABELV $205
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 108
byte 1 111
byte 1 97
byte 1 100
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $201
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 95
byte 1 49
byte 1 0
align 1
LABELV $184
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 98
byte 1 97
byte 1 99
byte 1 107
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $180
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 97
byte 1 114
byte 1 114
byte 1 111
byte 1 119
byte 1 115
byte 1 95
byte 1 104
byte 1 111
byte 1 114
byte 1 122
byte 1 95
byte 1 114
byte 1 105
byte 1 103
byte 1 104
byte 1 116
byte 1 0
align 1
LABELV $162
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 97
byte 1 114
byte 1 114
byte 1 111
byte 1 119
byte 1 115
byte 1 95
byte 1 104
byte 1 111
byte 1 114
byte 1 122
byte 1 95
byte 1 108
byte 1 101
byte 1 102
byte 1 116
byte 1 0
align 1
LABELV $134
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 97
byte 1 114
byte 1 114
byte 1 111
byte 1 119
byte 1 115
byte 1 95
byte 1 104
byte 1 111
byte 1 114
byte 1 122
byte 1 95
byte 1 48
byte 1 0
align 1
LABELV $120
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 102
byte 1 114
byte 1 97
byte 1 109
byte 1 101
byte 1 49
byte 1 95
byte 1 114
byte 1 0
align 1
LABELV $106
byte 1 109
byte 1 101
byte 1 110
byte 1 117
byte 1 47
byte 1 97
byte 1 114
byte 1 116
byte 1 47
byte 1 102
byte 1 114
byte 1 97
byte 1 109
byte 1 101
byte 1 50
byte 1 95
byte 1 108
byte 1 0
align 1
LABELV $98
byte 1 76
byte 1 79
byte 1 65
byte 1 68
byte 1 32
byte 1 67
byte 1 79
byte 1 78
byte 1 70
byte 1 73
byte 1 71
byte 1 0
align 1
LABELV $76
byte 1 101
byte 1 120
byte 1 101
byte 1 99
byte 1 32
byte 1 37
byte 1 115
byte 1 10
byte 1 0
|
programs/oeis/081/A081032.asm | neoneye/loda | 22 | 171203 | ; A081032: Positions of black keys on piano keyboard, start with A0 = the 1st key.
; 2,5,7,10,12,14,17,19,22,24,26,29,31,34,36,38,41,43,46,48,50,53,55,58,60,62,65,67,70,72,74,77,79,82,84,86
mul $0,12
add $0,14
div $0,5
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.