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 |
|---|---|---|---|---|
demo/adainclude/memory_move.adb | e3l6/SSMDev | 0 | 19964 | --
-- Copyright (C) 2006-2013, AdaCore
--
with Ada.Unchecked_Conversion;
package body Memory_Move is
subtype mem is char_array (size_t);
type memptr is access all mem;
function to_memptr is new Ada.Unchecked_Conversion (Address, memptr);
-------------
-- memmove --
-------------
procedure memmove (Dest : Address; Src : Address; N : size_t) is
dest_p : constant memptr := to_memptr (Dest);
src_p : constant memptr := to_memptr (Src);
begin
-- Return immediately if no bytes to copy.
if N = 0 then
return;
end if;
-- This function must handle overlapping memory regions
-- for the source and destination. If the Dest buffer is
-- located past the Src buffer then we use backward copying,
-- and forward copying otherwise.
if Dest > Src then
for J in reverse 0 .. N - 1 loop
dest_p (J) := src_p (J);
end loop;
else
for J in 0 .. N - 1 loop
dest_p (J) := src_p (J);
end loop;
end if;
end memmove;
end Memory_Move;
|
src/rng.asm | NobodyNada/sm_practice_hack | 0 | 244748 | <reponame>NobodyNada/sm_practice_hack<gh_stars>0
; ----------------
; Phantoon hijacks
; ----------------
{
; Intro
if !FEATURE_PAL
org $A7D4DD
else
org $A7D4A9
endif
JSL hook_phantoon_init
NOP
BNE $3D
; 1st pattern
if !FEATURE_PAL
org $A7D5DA
else
org $A7D5A6
endif
JSL hook_phantoon_1st_rng
BRA $10
; 2nd pattern
if !FEATURE_PAL
org $A7D0B0
else
org $A7D07C
endif
JSL hook_phantoon_2nd_rng
BRA $0F
; Phantoon eye close timer
if !FEATURE_PAL
org $A7D098
else
org $A7D064
endif
JSL hook_phantoon_eyeclose
; Phantoon flame pattern
if !FEATURE_PAL
org $A7D00A
else
org $A7CFD6
endif
JSL hook_phantoon_flame_pattern
}
; --------------
; Botwoon hijack
; --------------
{
if !FEATURE_PAL
org $B39953
else
org $B39943
endif
; $B3:9943 22 11 81 80 JSL $808111[$80:8111]
JSL hook_botwoon_rng
}
; ---------------
; Draygon hijacks
; ---------------
{
if !FEATURE_PAL
org $A58AEC
else
org $A58ADC
endif
JSR hook_draygon_rng_left
if !FEATURE_PAL
org $A589AD
else
org $A5899D
endif
JSR hook_draygon_rng_right
}
; ----------------
; Crocomire hijack
; ----------------
{
if !FEATURE_PAL
org $A48763
else
org $A48753
endif
JSR hook_crocomire_rng
}
; -------------
; Kraid hijacks
; -------------
{
if !FEATURE_PAL
org $A7BDF3
else
org $A7BDBF
endif
JSR hook_kraid_rng
if !FEATURE_PAL
org $A7AA7F
else
org $A7AA69
endif
JMP kraid_intro_skip
kraid_intro_skip_return:
}
; -----------------
; "Set rng" hijacks
; -----------------
{
; $A3:AB0C A9 25 00 LDA #$0025
; $A3:AB0F 8D E5 05 STA $05E5 [$7E:05E5]
; $A3:AB12 22 11 81 80 JSL $808111[$80:8111]
if !FEATURE_PAL
org $A3AB2E
else
org $A3AB12
endif
JSL hook_hopper_set_rng
; $A2:B588 A9 11 00 LDA #$0011
; $A2:B58B 8D E5 05 STA $05E5 [$7E:05E5]
if !FEATURE_PAL
org $A2B5A0
else
org $A2B588
endif
JSL hook_lavarocks_set_rng
NOP #2
; $A8:B798 A9 17 00 LDA #$0017
; $A8:B79B 8D E5 05 STA $05E5 [$7E:05E5]
if !FEATURE_PAL
org $A8B7A8
else
org $A8B798
endif
JSL hook_beetom_set_rng
NOP #2
}
; -----
; Hooks
; -----
org $83B000
print pc, " rng start"
hook_hopper_set_rng:
{
LDA #$0001 : STA !ram_room_has_set_rng
JML $808111
}
hook_lavarocks_set_rng:
{
LDA #$0001 : STA !ram_room_has_set_rng
LDA #$0011 : STA !CACHED_RANDOM_NUMBER
RTL
}
hook_beetom_set_rng:
{
LDA #$0001 : STA !ram_room_has_set_rng
LDA #$0017 : STA !CACHED_RANDOM_NUMBER
RTL
}
; Patch to the following code (which waits a few frames
; before spawning flames in a circle)
; $A7:D4A9 DE B0 0F DEC $0FB0,x[$7E:0FB0] ; decrement timer
; $A7:D4AC F0 02 BEQ $02 [$D4B0] ; if zero, proceed
; $A7:D4AE 10 3D BPL $3D [$D4ED] ; else, return
hook_phantoon_init:
{
LDA !sram_cutscenes
AND !CUTSCENE_FAST_PHANTOON
BNE .skip_cutscene
DEC $0FB0,X
RTL
.skip_cutscene:
; get rid of the return address
PLA ; pop 2 bytes
PHP ; push 1
PLA ; pop 2 (for a total of 3 bytes popped)
; start boss music & fade-in animation
if !FEATURE_PAL
JML $A7D543
else
JML $A7D50F
endif
}
; Table of Phantoon pattern durations & directions
; bit 0 is direction, remaining bits are duration
; Note that later entries in the table will tend to occur slightly more often.
phan_pattern_table:
dw $003C<<1|1 ; fast left
dw $003C<<1|0 ; fast right
dw $0168<<1|1 ; mid left
dw $0168<<1|0 ; mid right
dw $02D0<<1|1 ; slow left
dw $02D0<<1|0 ; slow right
; Patch to the following code, to determine Phantoon's first-round direction and pattern
; $A7:D5A6 AD B6 05 LDA $05B6 [$7E:05B6] ; Frame counter
; $A7:D5A9 4A LSR A
; $A7:D5AA 29 03 00 AND #$0003
; $A7:D5AD 0A ASL A
; $A7:D5AE A8 TAY
; $A7:D5AF B9 53 CD LDA $CD53,y[$A7:CD59] ; Number of frames to figure-8
; $A7:D5B2 8D E8 0F STA $0FE8 [$7E:0FE8]
; $A7:D5B5 22 11 81 80 JSL $808111[$80:8111] ; RNG
; $A7:D5B9 89 01 00 BIT #$0001 ; Sets Z for left pattern, !Z for right
hook_phantoon_1st_rng:
{
LDA !ram_phantoon_rng_round_1
; If set to all-on or all-off, don't mess with RNG.
BEQ .no_manip
CMP #$003F
BNE choose_phantoon_pattern
.no_manip:
LDA !FRAME_COUNTER
LSR A
AND #$0003
ASL A
TAY
if !FEATURE_PAL
LDA $CD87,Y
else
LDA $CD53,Y
endif
STA $0FE8
JSL $808111
BIT #$0001
RTL
}
; Patch to the following code, to determine Phantoon's second-round direction and pattern
; Also affects patterns during Phantoon's invisible phase
; $A7:D07C 22 11 81 80 JSL $808111[$80:8111]
; $A7:D080 29 07 00 AND #$0007
; $A7:D083 0A ASL A
; $A7:D084 A8 TAY
; $A7:D085 B9 53 CD LDA $CD53,y[$A7:CD5B]
; $A7:D088 8D E8 0F STA $0FE8 [$7E:0FE8]
; $A7:D08B AD B6 05 LDA $05B6 [$7E:05B6]
; $A7:D08E 89 01 00 BIT #$0001
hook_phantoon_2nd_rng:
{
LDA !ram_phantoon_rng_round_2
; If set to all-on or all-off, don't mess with RNG.
BEQ .no_manip
CMP #$003F
BNE choose_phantoon_pattern
.no_manip:
JSL $808111
AND #$0007
ASL A
TAY
if !FEATURE_PAL
LDA $CD87,Y
else
LDA $CD53,Y
endif
STA $0FE8
; Intentional fallthrough to invert logic
}
hook_phantoon_invert:
{
LDA !ram_phantoon_rng_inverted : BEQ .vanilla_inverted
CMP #$0001 : BEQ .inverted
CMP #$0002 : BEQ .not_inverted
; Random
LDA !CACHED_RANDOM_NUMBER : BIT #$0080
RTL
.inverted
LDA #$0000 : BIT #$0001
RTL
.not_inverted
LDA #$0001 : BIT #$0001
RTL
.vanilla_inverted
LDA !FRAME_COUNTER : BIT #$0001
RTL
}
; Selects a Phantoon pattern from a bitmask (passed in A).
choose_phantoon_pattern:
{
PHX ; push enemy index
PHA ; push pattern mask
; get random number in range 0-7
JSL $808111
AND #$0007
TAX
; play a game of eeny-meeny-miny-moe with the enabled patterns
; X = number of enabled patterns to find before stopping
; Y = index in phan_pattern_table of pattern currently being checked
; A = bitmask of enabled patterns
.reload:
LDA $01,S ; reload pattern mask
LDY #$0006 ; number of patterns (decremented immediately to index of last pattern)
.loop:
DEY
LSR
BCC .skip
; Pattern index Y is enabled
DEX ; is this the last one?
BMI .done
BRA .loop ; no, keep looping
.skip:
; Pattern Y is not enabled, try the next pattern
BEQ .reload ; if we've tried all the patterns, start over
BRA .loop
.done:
; We've found the pattern to use.
PLA ; we don't need the pattern mask anymore
TYA : ASL : TAX
LDA.l phan_pattern_table,X
PLX ; pop enemy index
; Check if Phantoon is in the round 2 AI state
LDY $0FB2
if !FEATURE_PAL
CPY #$D716
else
CPY #$D6E2
endif
BNE .round1
; Save the pattern timer, check the direction,
; and set Phantoon's starting point and pattern index.
LSR
STA $0FE8
BCS .round2left
; Right pattern
LDA #$0088
LDY #$00D0
BRA .round2done
.round2left
LDA #$018F
LDY #$0030
.round2done
STA $0FA8 ; Index into figure-8 movement table
STY $0F7A ; X position
LDA #$0060
STA $0F7E ; Y position
BRA hook_phantoon_invert
.round1
; Save the pattern timer and check the direction
LSR
STA $0FE8
BCS .round1left
; Round 1 right pattern
SEP #$02
RTL
.round1left:
REP #$02
RTL
}
hook_phantoon_eyeclose:
{
LDA !ram_phantoon_rng_eyeclose : BEQ .no_manip
DEC : ASL ; return with 0-slow, 2-mid, 4-fast
RTL
.no_manip
LDA !CACHED_RANDOM_NUMBER
AND #$0007 : ASL ; overwritten code
RTL
}
hook_phantoon_flame_pattern:
{
JSL $808111 ; Trying to preserve the number of RNG calls being done in the frame
LDA !ram_phantoon_rng_flames : TAY
LDA !ram_phantoon_rng_next_flames : STA !ram_phantoon_rng_flames
TYA : STA !ram_phantoon_rng_next_flames : BEQ .no_manip
DEC
RTL
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTL
}
hook_botwoon_rng:
{
JSL $808111 ; Trying to preserve the number of RNG calls being done in the frame
LDA !ram_botwoon_rng : BEQ .no_manip
RTL
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTL
}
print pc, " rng end"
warnpc $83B400 ; custompresets.asm
org $A4F700
print pc, " crocomire rng start"
hook_crocomire_rng:
{
LDA !ram_crocomire_rng : BEQ .no_manip
DEC : BEQ .step
LDA #$0000 ; return with <400 for swipe
RTS
.step
LDA #$0400 ; return with 400+ for step
RTS
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTS
}
print pc, " crocomire rng end"
org $A5FA00
print pc, " draygon rng start"
hook_draygon_rng_left:
{
LDA !ram_draygon_rng_left : BEQ .no_manip
DEC ; return with 1-swoop or 0-goop
RTS
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTS
}
hook_draygon_rng_right:
{
LDA !ram_draygon_rng_right : BEQ .no_manip
DEC ; return with 1-swoop or 0-goop
RTS
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTS
}
print pc, " draygon rng end"
; This is actually for preset support instead of RNG
; Keep Ceres Ridley enemy alive even if the main boss flag is set
if !FEATURE_PAL
org $A6A10C
else
org $A6A0FC
endif
LSR : BCC $0F
CPX #$0006 : BEQ $0A
LDA $0F86
if !FEATURE_PAL
org $A6A302
else
org $A6A2F2
endif
JMP ceres_ridley_draw_metroid
if !FEATURE_PAL
org $A6A371
else
org $A6A361
endif
dw ridley_init_hook
; Fix ceres ridley door instruction list to keep door visible when skipping ridley fight
if !FEATURE_PAL
org $A6F533
dw $F64F, ridley_ceres_door_original_instructions
else
org $A6F55C
dw $F678, ridley_ceres_door_original_instructions
endif
dw $80ED, ridley_ceres_door_escape_instructions
; Lock ceres ridley door if timer not started or if boss not dead
if !FEATURE_PAL
org $A6F641
else
org $A6F66A
endif
LDA $0943 : BEQ $F6
LDA $7ED82E
org $A6FEC0
print pc, " ridley rng start"
ridley_init_hook:
{
LDA $079B : CMP #$E0B5 : BNE .continue
LDA $7ED82E : BIT #$0001 : BEQ .continue
; Ceres Ridley is already dead, so skip to the escape
; We do need to mark Ceres Ridley alive
; to keep the door locked until the timer starts
AND #$FFFE : STA $7ED82E
; Clear out the room main asm so it doesn't also trigger the escape
STZ $07DF
; Set up the escape timer routine
LDA #$0001 : STA $093F
LDA #$E0E6 : STA $0A5A
; Jump to the escape
if !FEATURE_PAL
LDA #$AB47
else
LDA #$AB37
endif
STA $0FA8
JMP ($0FA8)
.continue
if !FEATURE_PAL
LDA #$A387
else
LDA #$A377
endif
STA $0FA8
JMP ($0FA8)
}
ceres_ridley_draw_metroid:
{
LDA $7ED82E : BIT #$0001 : BNE .end
LDA $093F : BNE .end
if !FEATURE_PAL
JSR $BF2A
else
JSR $BF1A
endif
.end
if !FEATURE_PAL
JMP $A30A
else
JMP $A2FA
endif
}
ridley_ceres_door_original_instructions:
if !FEATURE_PAL
dw $F67D
dw #$0002, $F9EA
dw $F641, $F533
dw $F687
dw $80ED, $F56F
else
dw $F6A6
dw #$0002, $FA13
dw $F66A, $F55C
dw $F6B0
dw $80ED, $F598
endif
ridley_ceres_door_escape_instructions:
if !FEATURE_PAL
dw $F687
dw #$0002, $F9EA
dw $F641, $F533
dw $80ED, $F56F
else
dw $F6B0
dw #$0002, $FA13
dw $F66A, $F55C
dw $80ED, $F598
endif
print pc, " ridley rng end"
org $A7FFB6
print pc, " kraid rng start"
hook_kraid_rng:
{
LDA !ram_kraid_rng : BEQ .no_manip
DEC : DEC ; return -1 (laggy) or 0 (laggier)
RTS
.no_manip
LDA !CACHED_RANDOM_NUMBER
RTS
}
kraid_intro_skip:
LDA !sram_cutscenes : AND !CUTSCENE_FAST_KRAID : BEQ .noSkip
LDA #$0001
JMP kraid_intro_skip_return
.noSkip
if !FEATURE_PAL
LDA #$00FA
else
LDA #$012C
endif
JMP kraid_intro_skip_return
print pc, " kraid rng end"
|
oeis/090/A090244.asm | neoneye/loda-programs | 11 | 20402 | <reponame>neoneye/loda-programs
; A090244: a(0) = 1; a(1) = 2; a(n) = { a(n-1) + a(n-2) for n even, a(n-1) - a(n-2) for n odd }.
; Submitted by <NAME>
; 1,2,3,1,4,3,7,4,11,7,18,11,29,18,47,29,76,47,123,76,199,123,322,199,521,322,843,521,1364,843,2207,1364,3571,2207,5778,3571,9349,5778,15127,9349,24476,15127,39603,24476,64079
mov $1,$0
add $1,1
mov $2,1
mov $3,1
lpb $1
mov $0,$4
sub $1,1
mov $4,$2
mul $2,2
sub $4,3
mul $4,$3
add $0,$4
gcd $2,2
gcd $4,$3
mov $3,$0
lpe
mov $0,$4
|
Transynther/x86/_processed/US/_zr_/i3-7100_9_0xca_notsx.log_136_800.asm | ljhsiun2/medusa | 9 | 179097 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %r15
push %rbx
push %rcx
push %rdi
lea addresses_WC_ht+0xe5c6, %r14
nop
nop
xor %rdi, %rdi
mov (%r14), %r15d
nop
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_normal_ht+0x173ce, %r12
nop
xor %r13, %r13
mov $0x6162636465666768, %rcx
movq %rcx, (%r12)
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_normal_ht+0x1a486, %r13
clflush (%r13)
nop
nop
nop
nop
nop
dec %r14
mov $0x6162636465666768, %r15
movq %r15, (%r13)
nop
nop
nop
nop
nop
inc %r12
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
// Store
lea addresses_A+0xbd, %r8
clflush (%r8)
nop
nop
nop
nop
add $46172, %rdi
movw $0x5152, (%r8)
nop
sub $20924, %rdx
// Store
lea addresses_US+0xf486, %rcx
cmp %rdx, %rdx
mov $0x5152535455565758, %r8
movq %r8, %xmm3
vmovaps %ymm3, (%rcx)
// Exception!!!
nop
mov (0), %r8
add $40473, %rdi
// Store
lea addresses_normal+0x13306, %rdi
xor $65291, %r8
movb $0x51, (%rdi)
nop
nop
nop
cmp %rbx, %rbx
// Faulty Load
lea addresses_US+0x1e086, %rcx
nop
nop
nop
nop
inc %r11
vmovups (%rcx), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r9
lea oracles, %rdi
and $0xff, %r9
shlq $12, %r9
mov (%rdi,%r9,1), %r9
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 2, 'AVXalign': True}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 2, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_US', 'size': 32, 'AVXalign': True}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_normal', 'size': 1, 'AVXalign': True}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_US', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}}
{'00': 136}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Cubical/Relation/Binary/Raw.agda | bijan2005/univalent-foundations | 0 | 896 | <reponame>bijan2005/univalent-foundations
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Binary.Raw where
open import Cubical.Relation.Binary.Base public
open import Cubical.Relation.Binary.Raw.Definitions public
open import Cubical.Relation.Binary.Raw.Structures public
open import Cubical.Relation.Binary.Raw.Bundles public
|
modules/module-paint/shaders/asm/UpdateVelocities.asm | pagienet/psykopaint2-application | 2 | 89083 | <reponame>pagienet/psykopaint2-application
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.16384
//
///
// Parameters:
//
// float drag;
// float dt;
// Texture2D linearSampler+field;
// float viscosity;
//
//
// Registers:
//
// Name Reg Size
// ------------------- ----- ----
// viscosity c0 1
// drag c1 1
// dt c2 1
// linearSampler+field s0 1
//
ps_3_0
def c3, -0.5, 2, 8, 0.5
dcl_texcoord v0.xy
dcl_texcoord1 v1.xy
dcl_texcoord2 v2.xy
dcl_texcoord3 v3.xy
dcl_texcoord4 v4.xy
dcl_texcoord5 v5.xy
dcl_texcoord6 v6.xy
dcl_2d s0
texld r0, v2, s0
add r0.zw, r0.xyxy, c3.x
add r0.zw, r0, r0
texld r1, v1, s0
add r2.xy, r1, c3.x
mad r0.zw, r2.xyxy, c3.y, r0
texld r2, v3, s0
add r2.zw, r2.xyxy, c3.x
mad r0.zw, r2, c3.y, r0
texld r3, v4, s0
add r2.zw, r3.xyxy, c3.x
mad r0.zw, r2, c3.y, r0
texld r4, v0, s0
add r2.zw, r4.xyxy, c3.x
mad r0.zw, r2, -c3.z, r0
texld r5, v5, s0
add r1.w, r5.y, c3.x
add r1.w, r1.w, r1.w
lrp r5.xy, c3.y, c3.x, -r4
add r2.zw, r2, r2
add r0.xy, r0, r5
add r1.xy, r1, r5
mov r4.x, r1.z
mul r1.x, r1.x, r1.x
mad r0.x, r0.x, r0.x, -r1.x
add r1.xz, r2.xyyw, r5.xyyw
add r2.xy, r3, r5
mov r4.y, r3.z
mad r0.x, r1.x, r1.w, r0.x
mad r3.x, r2.x, -r1.y, r0.x
mul r0.x, r2.y, r2.y
mad r0.x, r1.z, r1.z, -r0.x
texld r5, v6, s0
add r1.x, r5.x, c3.x
add r1.x, r1.x, r1.x
mad r0.x, r1.x, r0.y, r0.x
mad r3.y, r2.x, -r1.y, r0.x
mad r0.xy, c0.x, r0.zwzw, r3
mad r0.xy, c1.x, -r2.zwzw, r0
add r0.xy, r4.z, r0
mov oC0.zw, r4
add r0.xy, -r4, r0
mad r0.xy, c2.x, r0, r2.zwzw
mad oC0.xy, r0, c3.w, c3.w
// approximately 44 instruction slots used (7 texture, 37 arithmetic)
|
Assignment2/rev_shell.asm | sajithshetty/SLAE32 | 0 | 94657 | <gh_stars>0
global _start
section .text
_start:
;[1] create socket connection
;Man page: socket(int domain, int type, int protocol);
;sock_file_des = socket(2,1,0)
xor edx, edx
push 0x66 ; socket call(0x66)
pop eax
push edx ; protocol = 0
inc edx
push edx ; sock_stream = 1
mov ebx, edx ; EBX =1
inc edx
push edx ; AF_INET =2
mov ecx, esp ; save the pointer to args in ecx register
int 0x80 ; call socketcall()
; int dup2(int oldfd, int newfd);
mov ebx, eax ; store sock_file_des in ebx register
mov ecx, edx ; counter = 2
loop:
mov al, 0x3f
int 0x80
dec ecx
jns loop
; sock_ad.sin_family = AF_INET;
;sock_ad.sin_port = htons(4444);
;sock_ad.sin_addr.s_addr = inet_addr("192.168.227.129");
;connect(sock_file_des,(struct sockaddr *) &sock_ad,sizeof(sock_ad));
xchg ebx, edx ; before xchg edx=2 and ebx=sock_file_des and after xchg ebx=2, edx=sock_file_des
push 0x81e3a8c0 ; sock_ad.sin_addr.s_addr = inet_addr("192.168.227.129");
push word 0x5C11 ; sock_ad.sin_port = htons(4444);
push word bx ; sock_ad.sin_family = AF_INET =2;
mov ecx, esp ; pointer to struct
mov al, 0x66 ; socket call (0x66)
inc ebx ; connect (3)
push 0x10 ; sizeof(struct sockaddr_in)
push ecx ; &serv_addr
push edx ; sock_file_des
mov ecx, esp ; save the pointer to args in ecx register
int 0x80
mov al, 11 ; execve system call
cdq ; overwriting edx with either 0 (if eax is positive)
push edx ; push null
push 0x68732f6e ; hs/b
push 0x69622f2f ; ib//
mov ebx,esp ; save pointer
push edx ; push null
push ebx ; push pointer
mov ecx,esp ; save pointer
int 0x80
|
agda-stdlib/src/Data/List/Relation/Binary/Permutation/Propositional.agda | DreamLinuxer/popl21-artifact | 5 | 15573 | <reponame>DreamLinuxer/popl21-artifact<filename>agda-stdlib/src/Data/List/Relation/Binary/Permutation/Propositional.agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- An inductive definition for the permutation relation
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Binary.Permutation.Propositional
{a} {A : Set a} where
open import Data.List.Base using (List; []; _∷_)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
import Relation.Binary.Reasoning.Setoid as EqReasoning
------------------------------------------------------------------------
-- An inductive definition of permutation
-- Note that one would expect that this would be defined in terms of
-- `Permutation.Setoid`. This is not currently the case as it involves
-- adding in a bunch of trivial `_≡_` proofs to the constructors which
-- a) adds noise and b) prevents easy access to the variables `x`, `y`.
-- This may be changed in future when a better solution is found.
infix 3 _↭_
data _↭_ : Rel (List A) a where
refl : ∀ {xs} → xs ↭ xs
prep : ∀ {xs ys} x → xs ↭ ys → x ∷ xs ↭ x ∷ ys
swap : ∀ {xs ys} x y → xs ↭ ys → x ∷ y ∷ xs ↭ y ∷ x ∷ ys
trans : ∀ {xs ys zs} → xs ↭ ys → ys ↭ zs → xs ↭ zs
------------------------------------------------------------------------
-- _↭_ is an equivalence
↭-reflexive : _≡_ ⇒ _↭_
↭-reflexive refl = refl
↭-refl : Reflexive _↭_
↭-refl = refl
↭-sym : ∀ {xs ys} → xs ↭ ys → ys ↭ xs
↭-sym refl = refl
↭-sym (prep x xs↭ys) = prep x (↭-sym xs↭ys)
↭-sym (swap x y xs↭ys) = swap y x (↭-sym xs↭ys)
↭-sym (trans xs↭ys ys↭zs) = trans (↭-sym ys↭zs) (↭-sym xs↭ys)
-- A smart version of trans that avoids unnecessary `refl`s (see #1113).
↭-trans : Transitive _↭_
↭-trans refl ρ₂ = ρ₂
↭-trans ρ₁ refl = ρ₁
↭-trans ρ₁ ρ₂ = trans ρ₁ ρ₂
↭-isEquivalence : IsEquivalence _↭_
↭-isEquivalence = record
{ refl = refl
; sym = ↭-sym
; trans = ↭-trans
}
↭-setoid : Setoid _ _
↭-setoid = record
{ isEquivalence = ↭-isEquivalence
}
------------------------------------------------------------------------
-- A reasoning API to chain permutation proofs and allow "zooming in"
-- to localised reasoning.
module PermutationReasoning where
private
module Base = EqReasoning ↭-setoid
open EqReasoning ↭-setoid public
hiding (step-≈; step-≈˘)
infixr 2 step-↭ step-↭˘ step-swap step-prep
step-↭ = Base.step-≈
step-↭˘ = Base.step-≈˘
-- Skip reasoning on the first element
step-prep : ∀ x xs {ys zs : List A} → (x ∷ ys) IsRelatedTo zs →
xs ↭ ys → (x ∷ xs) IsRelatedTo zs
step-prep x xs rel xs↭ys = relTo (trans (prep x xs↭ys) (begin rel))
-- Skip reasoning about the first two elements
step-swap : ∀ x y xs {ys zs : List A} → (y ∷ x ∷ ys) IsRelatedTo zs →
xs ↭ ys → (x ∷ y ∷ xs) IsRelatedTo zs
step-swap x y xs rel xs↭ys = relTo (trans (swap x y xs↭ys) (begin rel))
syntax step-↭ x y↭z x↭y = x ↭⟨ x↭y ⟩ y↭z
syntax step-↭˘ x y↭z y↭x = x ↭˘⟨ y↭x ⟩ y↭z
syntax step-prep x xs y↭z x↭y = x ∷ xs <⟨ x↭y ⟩ y↭z
syntax step-swap x y xs y↭z x↭y = x ∷ y ∷ xs <<⟨ x↭y ⟩ y↭z
|
lab programs/Hardware/7b.asm | Amanskywalker/mp-lab | 0 | 92560 | .MODEL SMALL
INITDS MACRO
MOV AX,@DATA ;initialization of data segment
MOV DS,AX ;(to access data)
ENDM
INIT8255 MACRO
MOV AL,CW ;initialization of 8255 using control word
MOV DX,CR ; by passing 90h to control reg.
OUT DX,AL ; (to make port A as input & port C as output)
ENDM
OUTPC MACRO
MOV DX,PC
OUT DX,AL
ENDM
INPA MACRO
MOV DX,PA
IN AL,DX
ENDM
PRINTF MACRO MSG
MOV AH,9
LEA DX,MSG
INT 21H
ENDM
EXIT MACRO
MOV AH,4CH ;terminating the program
INT 21H
ENDM
.DATA
DISPLAYABLECHARACTER DB '0123456789.+-*/%CEK=MRSA'
KEYPRESSEDMSG DB 'KEY PRESSED IS : ' ; no $ here
KEY DB ? ,10,13,'$'
ROWMSG DB 'THE ROW NO IS : ' ; no $ here
ROW DB ? ,10,13,'$'
COLMSG DB 'THE COLUMN NO IS : ' ; no $ here
COL DB ? ,'$'
CR EQU 01193H
PC EQU 01192H
PA EQU 01190H
CW DB 90H
.CODE
INITDS
INIT8255
REPEAT: ; ACTIVATING/EXCITING 1
st COL
MOV AL,01H ; 01(0001) for first col
OUTPC ;checks if key is pressed in first col
INPA ;reads the pressed input key in port A & stores it in AL
CMP AL ,00 ;if key is not pressed, AL will be 00 in this 1 st column.
JNZ FIRSTCOL ;if key is pressed in this 1st col, then goto FIRSTCOL, else goto next line
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ACTIVATING/EXCITING 2nd COL
MOV AL,02H ; 02(0010) for second col
OUTPC ;checks if key is pressed in second col
INPA ;reads the pressed input key in port A & stores it in AL
CMP AL ,00 ;if key is not pressed, AL will be 00 in this 2nd column.
JNZ SECONDCOL ;if key is pressed in this 2nd col, then goto SECONDCOL, else goto next line
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ACTIVATING/EXCITING 3rd COL
MOV AL,04 ; 04(0100) for third col
OUTPC ;checks if key is pressed in third col
INPA ;reads the pressed input key in port A & stores it in AL
CMP AL ,00 ;if key is not pressed AL will be 00 in this 3rd column.
JNZ THIRDCOL ;if key is pressed in this 3rd col, then goto THIRDCOL, else goto next line
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
JMP REPEAT ; well, if you don’t press any key, then repeat the entire task
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
FIRSTCOL: LEA SI,DISPLAYABLECHARACTER ;SI points to displayablecharacter array
MOV COL,31H ;control has come here means, the key that we have pressed happens to be in first column
MOV CL,30H ;0th row in first col
NEXT1: ; to find the corresponding row in first col.
INC CL ; increment the value of CL to make first row in first col.
SHR AL,01 ; shift right AL by 1 bit
JC DISPLAY ;carry flag (CF) is set when 1 is moved to carry flag from AL
INC SI ;else inc SI and repeat till 1 (carry - CF) is found
JMP NEXT1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SECONDCOL: LEA SI,DISPLAYABLECHARACTER ;SI points to displayablecharacter array
ADD SI,08 ; adding 8 to SI to make SI point to second column
MOV COL,32H ; control has come here means, the key that we have pressed happens to be in second column
MOV CL,30H ;0th row in second col
NEXT2: ; to find the corresponding row in second col.
INC CL ; increment the value of CL to make first row in second col.
SHR AL,01 ; shift right AL by 1 bit
JC DISPLAY ; carry flag (CF) is set when 1 is moved to carry flag from AL
INC SI ; else inc SI and repeat till 1 (carry - CF) is found
JMP NEXT2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
THIRDCOL: LEA SI,DISPLAYABLECHARACTER ;SI points to displayablecharacter array
ADD SI,16 ;adding 16 to SI to make SI point to third column
MOV COL,33H ; control has come here means, the key that we have pressed happens to be in third column
MOV CL,30H ; 0th row in third col
NEXT3: ; to find the corresponding row in third col.
INC CL ; increment the value of CL to make first row in third col.
SHR AL,01 ; shift right AL by 1 bit
JC DISPLAY ; carry flag (CF) is set when 1 is moved to carry flag from AL
INC SI ; else inc SI and repeat till 1 (carry - CF) is found
JMP NEXT3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DISPLAY:
MOV DL,[SI] ;SI points to whatever key that we have pressed
MOV KEY,DL ; pressed key is moved to the variable called key
PRINTF KEYPRESSEDMSG ;keypressedmsg is displayed along with key pressed
MOV ROW,CL ;to display row msg with its number
PRINTF ROWMSG
PRINTF COLMSG ;to display col msg with its number
EXIT
END
|
src/drivers/sercom_u2201/sam-sercom-spi.ads | Fabien-Chouteau/samd51-hal | 1 | 2266 | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2019, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with HAL.SPI; use HAL.SPI;
with HAL; use HAL;
package SAM.SERCOM.SPI is
type SPI_Device
is new SERCOM_Device and HAL.SPI.SPI_Port
with private;
type Data_Bit_Order is (Most_Significant_First,
Least_Significant_First);
type Clock_Phase is (Sample_Leading_Edge, Sample_Trailing_Edge);
-- SPI Clock phase, also known as CPHA:
-- CPHA = 0 -> Sample_Leading_Edge
-- CPHA = 1 -> Sample_Trailing_Edge
type Clock_Polarity is (Active_High, Active_Low);
-- SPI Clock polarity, also known as CPOL:
-- CPOL = 0 -> Active_High
-- CPOL = 1 -> Active_Low
procedure Configure (This : in out SPI_Device;
Baud : UInt8;
Data_Order : Data_Bit_Order;
Phase : Clock_Phase;
Polarity : Clock_Polarity;
DIPO : Pad_Id;
DOPO : Pad_Id;
Slave_Select_Enable : Boolean)
with Pre => not This.Enabled and then not This.Configured,
Post => not This.Enabled and then This.Configured;
-- Configure SERCOM in SPI Master mode.
--
-- SPI Mode | Polarity | Phase
-- ----------------------------------------------
-- 0 | Active_High | Sample_Leading_Edge
-- 1 | Active_High | Sample_Trailing_Edge
-- 2 | Active_Low | Sample_Leading_Edge
-- 3 | Active_Low | Sample_Trailing_Edge
procedure Enable_Receiver (This : in out SPI_Device);
procedure Disable_Receiver (This : in out SPI_Device);
-- DMA --
function Data_Address (This : SPI_Device) return System.Address;
-- return the address of the data register for DMA transfer configuration
-------------
-- HAL.SPI --
-------------
overriding
function Data_Size (This : SPI_Device) return SPI_Data_Size
is (HAL.SPI.Data_Size_8b);
overriding
procedure Transmit
(This : in out SPI_Device;
Data : SPI_Data_8b;
Status : out SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Transmit
(This : in out SPI_Device;
Data : SPI_Data_16b;
Status : out SPI_Status;
Timeout : Natural := 1000)
with Pre => False;
-- 16bit transmit is not supported
overriding
procedure Receive
(This : in out SPI_Device;
Data : out SPI_Data_8b;
Status : out SPI_Status;
Timeout : Natural := 1000);
overriding
procedure Receive
(This : in out SPI_Device;
Data : out SPI_Data_16b;
Status : out SPI_Status;
Timeout : Natural := 1000)
with Pre => False;
-- 16bit receive is not supported
private
type SPI_Device
is new SERCOM_Device and HAL.SPI.SPI_Port
with null record;
end SAM.SERCOM.SPI;
|
agda/Data/Maybe.agda | oisdk/combinatorics-paper | 6 | 7774 | <reponame>oisdk/combinatorics-paper
{-# OPTIONS --cubical --safe #-}
module Data.Maybe where
open import Data.Maybe.Base public
|
2IMA/SystemesConcurrents/tp6/lr-affic.adb | LagOussama/enseeiht | 1 | 9187 | <filename>2IMA/SystemesConcurrents/tp6/lr-affic.adb
-- Time-stamp: <23 oct 2012 10:41 <EMAIL>>
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Tags;
with Ada.Numerics.Discrete_Random;
with Glib; use Glib;
with Gtkada.Builder; use Gtkada.Builder;
with Gtkada.Handlers;
with Gdk.Threads;
with Gdk.GC;
with Gdk.Color;
with Gdk.Drawable;
with Gdk.Window;
with Glib.Error;
with Gtk.Widget;
with Gtk.Main;
with Gtk.Label;
with Gtk.Adjustment;
with Gtk.GRange;
with Gtk.Handlers;
with LR.Tasks; use LR.Tasks; -- just for Proc_Id
with LR.Simu;
package body LR.Affic is
Nb_Lecteurs : Natural;
Nb_Redacteurs : Natural;
Dialog_Aide : Gtk.Widget.GTK_Widget;
type Point is record
X : Natural;
Y : Natural;
end record;
type Objet is record
Etat : Proc_Etat;
Pos_Rien : Point;
Pos_Demande : Point;
Pos_Utilise : Point;
end record;
Nb_Objets : Natural; -- = Nb_Lecteurs + Nb_Redacteurs
Les_Objets : array(Proc_Id) of Objet;
-- Event "clicked" on button "aide"
procedure Aide_Afficher(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) is
begin
Gtk.Widget.Show(Dialog_Aide);
end Aide_Afficher;
-- Event "clicked" on button "fermer"
procedure Aide_Fermer(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) is
begin
Gtk.Widget.Hide(Dialog_Aide);
end Aide_Fermer;
-- Event clicked on button "pause".
procedure Pause_Or_Run(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) is
begin
LR.Simu.Swap_Running;
end Pause_Or_Run;
-- Event "clicked" on button "paramètres"
-- procedure Show_Param(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) is
-- begin
-- -- Gtk.Widget.Show(Dialog_Parametres);
-- null;
-- end Show_Param;
-- Event "value_changed" de l'ajustement de l'échelle de vitesse du temps.
procedure Set_Timespeed(Adj : access Gtk.Widget.Gtk_Widget_Record'Class) is
Val : Natural;
begin
Val := Natural(Gtk.Adjustment.Get_Value(Gtk.GRange.Get_Adjustment(Gtk.GRange.Gtk_Range(Adj))));
LR.Simu.Set_Timespeed(Val);
end Set_Timespeed;
procedure Quitter(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) is
procedure Libc_Exit(Status: Natural);
pragma Import(C, Libc_Exit, "exit");
begin
-- Gtk.Main.Main_Quit;
Libc_Exit(0);
end Quitter;
----------------------------------------------------------------
package Random_Proc is
function Get(Min, Max: Proc_Id) return Proc_Id;
end Random_Proc;
package body Random_Proc is
package Rand_Proc is new Ada.Numerics.Discrete_Random(Proc_Id);
Generator : Rand_Proc.Generator;
function Get(Min, Max: Proc_Id) return Proc_Id Is
X : Proc_Id;
begin
loop
X := Rand_Proc.Random(Generator);
exit when (X >= Min and X <= Max);
end loop;
return X;
end Get;
begin
Rand_Proc.Reset(Generator);
end Random_Proc;
-- Cherche dans l'intervalle [debut..fin] un processus dans l'état
-- etat1 ou dans l'état etat2. S'il y en a au moins un,
-- un processus *au hasard* (dans cet état) est réveillé.
function Chercher_Dormeur (Debut: Proc_Id; Fin: Proc_Id; Etat1: Proc_Etat; Etat2: Proc_Etat) return Boolean is
Base : Proc_Id;
begin
-- Tirons au hasard le point de départ, puis on parcourt circulairement.
base := Random_Proc.Get(Debut, Fin+1);
for i in Base .. Fin loop
if ((Les_Objets(i).Etat = Etat1) or (Les_Objets(i).etat = Etat2)) then
LR.Simu.wakeup (i);
return True;
end if;
end loop;
for i in Debut..Base-1 loop
if ((Les_Objets(i).Etat = Etat1) or (Les_Objets(i).etat = Etat2)) then
LR.Simu.wakeup (i);
return True;
end if;
end loop;
return False;
end Chercher_Dormeur;
function Click_Event_Red(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) return Boolean is
begin
return Chercher_Dormeur(Nb_Lecteurs + 1, Nb_Objets, Redacteur_Rien, Redacteur_Rien);
end Click_Event_Red;
function Click_Event_Lect(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) return Boolean is
begin
return Chercher_Dormeur(Proc_Id'First, Nb_Lecteurs, Lecteur_Rien, Lecteur_Rien);
end Click_Event_Lect;
function Click_Event_Inside(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) return Boolean is
begin
return Chercher_Dormeur(Proc_Id'First, Nb_Objets, Lecteur_Lit, Redacteur_Ecrit);
end Click_Event_Inside;
----------------------------------------------------------------
-- Event configure (= realize or resize) on window redacteur.
-- XXXX Hypothèses:
-- - les trois fenêtres rédacteur, inside et lecteur ont la même hauteur;
-- - la fenêtre inside est deux fois moins large que la fenêtre rédacteur;
-- - la fenêtre rédacteur est en haut, la fenêtre lecteur en bas.
function Compute_Placement(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) return Boolean is
Taille_Fen_Dem_X, Taille_Fen_Inside_X : Float;
Taille_Fen_Dem_Y, Taille_Fen_Inside_Y : Float;
Interv_Rien, Interv_Demande, Interv_Utilise : Float;
Start_Rien, Start_Demande, Start_Utilise : Float;
begin
Taille_Fen_Dem_X := Float(Gtk.Widget.Get_Allocation_Width(Gtkada.Builder.Get_Widget(Builder, "drawingarea_redacteur")));
Taille_Fen_Dem_Y := Float(Gtk.Widget.Get_Allocation_Height(Gtkada.Builder.Get_Widget(Builder, "drawingarea_redacteur")));
Taille_Fen_Inside_X := Taille_Fen_Dem_X / 2.0;
Taille_Fen_Inside_Y := Taille_Fen_Dem_Y;
Interv_Rien := Taille_Fen_Dem_X / (Float(Nb_Lecteurs - 1) + 4.0);
Interv_Utilise := Taille_Fen_Inside_X / (Float(Nb_Lecteurs - 1) + 4.0);
Interv_Demande := Interv_Utilise;
Start_Rien := 2.0 * Interv_Rien;
Start_Utilise := 2.0 * Interv_Utilise;
Start_Demande := (taille_fen_dem_x - taille_fen_inside_x) / 2.0 + Start_Utilise;
for i in Proc_Id'First .. Proc_Id'First + Nb_Lecteurs - 1 loop
Les_Objets(i).Pos_Rien.x := Natural(Start_Rien);
Les_Objets(i).Pos_Rien.y := Natural(Taille_Fen_Dem_Y * 0.75);
Les_Objets(i).Pos_Demande.x := Natural(Start_Demande);
Les_Objets(i).Pos_Demande.y := Natural(Taille_Fen_Dem_Y * 0.10);
Les_Objets(i).Pos_Utilise.x := Natural(Start_Utilise);
Les_Objets(i).Pos_Utilise.y := Natural(Taille_Fen_Inside_Y * 0.75);
Start_Rien := Start_Rien + Interv_Rien;
Start_Demande := Start_Demande + Interv_Demande;
Start_Utilise := Start_Utilise + Interv_Utilise;
end loop;
-- Les rédacteurs
Interv_Rien := Taille_Fen_Dem_X / (Float(Nb_Redacteurs - 1) + 4.0);
Interv_Utilise := Taille_Fen_Inside_X / (Float(Nb_Redacteurs - 1) + 4.0);
Interv_Demande := Interv_Utilise;
Start_Rien := 2.0 * Interv_Rien;
Start_Utilise := 2.0 * Interv_Utilise;
Start_Demande := (taille_fen_dem_x - taille_fen_inside_x) / 2.0 + Start_Utilise;
for i in Proc_Id'First + Nb_Lecteurs .. Proc_Id'First + Nb_Objets - 1 loop
Les_Objets(i).Pos_Rien.x := Natural(Start_Rien);
Les_Objets(i).Pos_Rien.y := Natural(Taille_Fen_Dem_Y * 0.25);
Les_Objets(i).Pos_Demande.x := Natural(Start_Demande);
Les_Objets(i).Pos_Demande.y := Natural(Taille_Fen_Dem_Y * 0.90);
Les_Objets(i).Pos_Utilise.x := Natural(Start_Utilise);
Les_Objets(i).Pos_Utilise.y := Natural(Taille_Fen_Inside_Y * 0.25);
Start_Rien := Start_Rien + Interv_Rien;
Start_Demande := Start_Demande + Interv_Demande;
Start_Utilise := Start_Utilise + Interv_Utilise;
end loop;
return False;
end Compute_Placement;
----------------------------------------------------------------
-- rayon du cercle
Rayon : Natural := 7;
-- graphic context des cercles
GC_Epais : Gdk.GC.Gdk_GC;
Xfen_Redacteur : Gtk.Widget.Gtk_Widget;
Xfen_Lecteur : Gtk.Widget.Gtk_Widget;
Xfen_Inside : Gtk.Widget.Gtk_Widget;
-- Event expose on any drawingarea.
function Expose(Builder: access Gtkada.Builder.Gtkada_Builder_Record'class) return Boolean is
procedure Tracer_Cercle(Win : Gtk.Widget.Gtk_Widget; Fill : Boolean; Center: Point) is
begin
Gdk.Drawable.Draw_Arc(Gtk.Widget.Get_Window(Win), GC_Epais, Fill, Gint(Center.X - Rayon), Gint(Center.Y - Rayon), Gint(Rayon*2), Gint(Rayon*2), 0, 360*64);
end Tracer_Cercle;
begin
for I in Proc_Id'First .. Proc_Id'First + Nb_Objets - 1 loop
case Les_Objets(I).Etat is
when Redacteur_Demande =>
Tracer_Cercle(Xfen_Redacteur, True, Les_Objets(i).Pos_Demande);
when Redacteur_Ecrit =>
Tracer_Cercle(Xfen_Inside, True, Les_Objets(i).Pos_Utilise);
when Redacteur_Rien =>
Tracer_Cercle(Xfen_Redacteur, True, Les_Objets(i).Pos_Rien);
when Lecteur_Demande =>
Tracer_Cercle(Xfen_Lecteur, False, Les_Objets(i).Pos_Demande);
when Lecteur_Lit =>
Tracer_Cercle(Xfen_Inside, False, Les_Objets(i).Pos_Utilise);
when Lecteur_Rien =>
Tracer_Cercle(Xfen_Lecteur, False, Les_Objets(i).Pos_Rien);
end case;
end loop;
return True;
end Expose;
----------------------------------------------------------------
procedure Init (Nomstrategie: String; Nblect : Natural; Nbred: Natural) is
Builder : Gtkada.Builder.Gtkada_Builder;
Error : Glib.Error.GError;
begin
Nb_Lecteurs := NbLect;
Nb_Redacteurs := NbRed;
Nb_Objets := Nb_Lecteurs + Nb_Redacteurs;
for I in Proc_Id'First .. Proc_Id'First + Nb_Lecteurs - 1 loop
Les_Objets(I).Etat := Lecteur_Rien;
end loop;
for I in Proc_Id'First + Nb_Lecteurs .. Proc_Id'First + Nb_Objets - 1 loop
Les_Objets(I).Etat := Redacteur_Rien;
end loop;
Gtkada.Builder.Gtk_New (Builder);
Error := Gtkada.Builder.Add_From_File (Builder, "lectred.glade");
Dialog_Aide := Gtkada.Builder.Get_Widget(Builder, "dialog_aide");
declare
Nom_Strategie : Gtk.Label.Gtk_Label;
begin
Nom_Strategie := Gtk.Label.Gtk_Label(Gtkada.Builder.Get_Widget(Builder, "label_strategie"));
Gtk.Label.Set_Text(Nom_Strategie, Nomstrategie);
end;
declare
Timespeed_Scale : Gtk.GRange.Gtk_Range;
begin
Timespeed_Scale := Gtk.GRange.Gtk_Range(Gtkada.Builder.Get_Widget(Builder, "timespeed"));
Gtkada.Handlers.Widget_Callback.Connect(Timespeed_Scale, "value_changed", Set_Timespeed'Access);
Set_Timespeed(Timespeed_Scale);
end;
Xfen_Lecteur := Gtkada.Builder.Get_Widget(Builder, "drawingarea_lecteur");
Xfen_Redacteur := Gtkada.Builder.Get_Widget(Builder, "drawingarea_redacteur");
Xfen_Inside := Gtkada.Builder.Get_Widget(Builder, "drawingarea_inside");
Gdk.GC.Gdk_New(GC_Epais, Gtk.Widget.Get_Root_Window(Xfen_Inside));
Gdk.GC.Set_Line_Attributes(GC_Epais, 2, Gdk.GC.Line_Solid, Gdk.GC.Cap_Round, Gdk.GC.Join_Round);
Gdk.GC.Set_Foreground(GC_Epais, Gdk.Color.Black(Gtk.Widget.Get_Default_Colormap));
Gdk.GC.Set_Background(GC_Epais, Gdk.Color.White(Gtk.Widget.Get_Default_Colormap));
Gtkada.Builder.Register_Handler (Builder, "aff_aide_afficher", Aide_Afficher'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_aide_fermer", Aide_Fermer'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_click_event_red", Click_Event_Red'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_click_event_lect", Click_Event_Lect'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_click_event_inside", Click_Event_Inside'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_compute_placement", Compute_Placement'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_expose", Expose'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_pause_or_run", Pause_Or_Run'Access);
-- Gtkada.Builder.Register_Handler (Builder, "aff_show_param", Show_Param'Access);
Gtkada.Builder.Register_Handler (Builder, "aff_quitter", Quitter'Access);
Gtkada.Builder.Do_Connect(Builder);
Gtk.Widget.Show_All(Gtkada.Builder.Get_Widget(Builder, "LectRed"));
end Init;
procedure Changer_Etat(Id: Proc_Id; Etat: Proc_Etat) is
begin
Gdk.Threads.Enter;
-- Put_Line(Natural'Image(Id) & " -> " & Proc_Etat'Image(Etat));
Les_Objets(Id).Etat := Etat;
Gtk.Widget.Draw(Gtk.Widget.Get_Toplevel(Xfen_Inside)); -- this should refresh the three windows
Gdk.Threads.Leave;
end Changer_Etat;
end LR.Affic;
|
assembly/lab3/src/opt.asm | sabertazimi/hust-lab | 29 | 161273 | <reponame>sabertazimi/hust-lab<gh_stars>10-100
.386
STACK SEGMENT USE16 STACK
DB 200 DUP(0)
STACK ENDS
DATA SEGMENT USE16
COUNT EQU 100000
NUM EQU 1000
BUF DB NUM-1 DUP('lancer', 4 DUP(0), 80, 90, 70 , ?)
LAST DB 'saber'
DB 5 DUP(0)
DB 100
DB 80
DB 90
DB ?
TARGET DB 'saber$' ; 将最后一个学生设定为每次查找的目标,加大程序执行时间
DATA ENDS
CODE SEGMENT USE16
ASSUME CS:CODE, DS:DATA, SS:STACK
TIMER PROC
PUSH DX
PUSH CX
PUSH BX
MOV BX, AX
MOV AH, 2CH
INT 21H ;CH=hour(0-23),CL=minute(0-59),DH=second(0-59),DL=centisecond(0-100)
MOV AL, DH
MOV AH, 0
IMUL AX,AX,1000
MOV DH, 0
IMUL DX,DX,10
ADD AX, DX
CMP BX, 0
JNZ _T1
MOV CS:_TS, AX
_T0: POP BX
POP CX
POP DX
RET
_T1: SUB AX, CS:_TS
JNC _T2
ADD AX, 60000
_T2: MOV CX, 0
MOV BX, 10
_T3: MOV DX, 0
DIV BX
PUSH DX
INC CX
CMP AX, 0
JNZ _T3
MOV BX, 0
_T4: POP AX
ADD AL, '0'
MOV CS:_TMSG[BX], AL
INC BX
LOOP _T4
PUSH DS
MOV CS:_TMSG[BX+0], 0AH
MOV CS:_TMSG[BX+1], 0DH
MOV CS:_TMSG[BX+2], '$'
LEA DX, _TS+2
PUSH CS
POP DS
MOV AH, 9
INT 21H
POP DS
JMP _T0
_TS DW ?
DB 'Time elapsed in ms is '
_TMSG DB 12 DUP(0)
TIMER ENDP
START:
MOV AX, DATA
MOV DS, AX
MOV EDI, COUNT ; 程序执行次数
MOV AX, 0
CALL TIMER
L1:
MOV CX, NUM
CAL:
MOV BX, NUM ; 计算目标学生下标值, 存放至 BX
SUB BX, CX
IMUL BX, 14
ADD BX, 10 ; BX = 0 + Index * 14 + 10
XOR EAX, EAX ; 初始化寄存器,使得代码上下文无关,减少bug
XOR EDX, EDX ; 初始化寄存器,使得代码上下文无关,减少bug
MOV AL, [BX] ; 计算平均成绩
MOV DL, [BX + 1]
LEA EAX, [EDX + EAX*2]
XOR EDX, EDX
MOV DL, [BX+2]
LEA ESI, [EDX+EAX*2]
MOV EAX, 92492493h ;(1) (1)~(7)是计算 (ESI) / 7 并将商保存到EDX
IMUL ESI ;(2) IDIV指令的执行时间远比IMUL指令长
ADD EDX, ESI ;(3) (1)~(7)用乘法指令实现整数除法
SAR EDX, 2 ;(4)
MOV EAX, EDX;(5)
SHR EAX, 1Fh ;(6)
ADD EDX, EAX ;(7)
MOV [EBX + 3], DL; AVG = AL ( AL / 3.5)
DEC CX
JNE CAL ; 未计算完100个学生,继续计算
MOV CX, NUM ; 学生个数
LEA BP, TARGET ; 将 TARGET 基址存放至 BP
INC CX
COMPA:
DEC CX
JE NEXT ; 查找失败, 重新输入
MOV BX, NUM ; 计算目标学生下标值, 存放至 BX
SUB BX, CX
IMUL BX, 14 ; 根据目标学生下标值, 找到姓名缓冲区首地址
MOV AX, 10 ; 临时计数器
MOV SI, 0
COMPB:
MOV DL, [BX + SI]
MOV DH, BYTE PTR DS:[BP + SI]
CMP DL, 0 ; 如果缓冲区姓名已结束,说明可能查找成功
JE ZERO ; 验证用户键入字符串是否也结束
CMP DH, DL ; 比较 当前缓冲区姓名 与 输入姓名 字符
JNE COMPA ; 当前字符相同,继续循环以比较下一字符
INC SI
DEC AX
JNE COMPB
ZERO:
CMP DH, 24H ; 检查数据段姓名是否为用户输入字符串的子串
JE NEXT ; 不是子串,说明查找成功
JMP COMPA ; 是子串,说明查找失败,继续比较下一个学生姓名
NEXT:
DEC EDI
JNE L1
OVER:
MOV AX, 1
CALL TIMER
MOV AH, 4CH
INT 21H
CODE ENDS
END START
|
NativeLib/misc.asm | nifanfa/OS-Sharp64 | 8 | 16774 | <reponame>nifanfa/OS-Sharp64<gh_stars>1-10
_TEXT SEGMENT
enable_avx PROC
push rax
push rcx
push rdx
xor rcx, rcx
xgetbv ;Load XCR0 register
or eax, 7 ;Set AVX, SSE, X87 bits
xsetbv ;Save back to XCR0
pop rdx
pop rcx
pop rax
ret
enable_avx ENDP
enable_sse PROC
mov rcx,200h
mov rbx,cr4
or rbx,rcx
mov cr4,rbx
fninit
ret
enable_sse ENDP
_TEXT ENDS
END |
picoctf/EasyRsa/gmp-ecm/x86_64/mulredc1.asm | beninato8/ctfs | 0 | 16757 | #
# mp_limb_t mulredc1(mp_limb_t * z, const mp_limb_t x, const mp_limb_t y,
# const mp_limb_t m, mp_limb_t inv_m)
#
# Compute z := x*y mod m, in Montgomery representation, where x, y < m
# and m is n limb wide. inv_m is the less significant limb of the
# inverse of m modulo 2^(n*GMP_LIMB_BITS)
#
# The result might be unreduced (larger than m) but becomes reduced
# after subtracting m. The calling function should take care of that.
#
# We use a temporary space for unreduced product on the stack.
# Therefore, this can not be used for large integers (anyway, the
# algorithm is quadratic).
#
# WARNING: z is only n limbs but since it might be unreduced, there
# could be a carry that does not fit in z. This carry is returned.
include(`config.m4')
TEXT
GLOBL GSYM_PREFIX`'mulredc1
TYPE(GSYM_PREFIX`'mulredc1,`function')
ifdef(`WINDOWS64_ABI',
# stack: inv_m, %r9: m, %r8: y, %rdx: x, %rcx: *z
`define(`INV_M', `0x28(%rsp)')
define(`M', `%r9')
define(`Y', `%r8')
define(`X', `%rdx')
define(`Z', `%rcx')
define(`TMP2', `%r10')
define(`TMP1', `%r8')',
# %r8: inv_m, %rcx: m, %rdx: y, %rsi : x, %rdi : *z
`define(`INV_M', `%r8')
define(`M', `%rcx')
define(`Y', `%rdx')
define(`X', `%rsi')
define(`Z', `%rdi')
define(`TMP2', `%r10')
define(`TMP1', `%r9')')
GSYM_PREFIX`'mulredc1:
movq Y, %rax
mulq X
movq %rdx, TMP2
movq %rax, TMP1 # store xy in [r9:r10]
mulq INV_M # compute u
mulq M # compute u*m
addq TMP1, %rax # rax is 0, now (carry is important)
adcq TMP2, %rdx
movq %rdx, (Z)
adcq $0, %rax
ret
|
support/support.ads | leo-brewin/adm-bssn-numerical | 1 | 30714 | with GNAT.OS_Lib;
package Support is
type Real is digits 18;
procedure halt (return_code : Integer := 0) renames GNAT.OS_Lib.OS_Exit;
function max (a : in Real; b : in Real) return Real;
function min (a : in Real; b : in Real) return Real;
function max (a : in Integer; b : in Integer) return Integer;
function min (a : in Integer; b : in Integer) return Integer;
end Support;
|
Bloc2/Micro/Project 6/projet_10.asm | MrGunnery/Helha | 1 | 15152 | <filename>Bloc2/Micro/Project 6/projet_10.asm<gh_stars>1-10
DD equ 10
DV equ 11
RESTE equ 12
QUOTIENT equ 13
status equ 03
;*************Programation**************
Start movlw d'22'
movwf DD
movlw d'5'
movwf DV
movlw d'0'
movwf QUOTIENT
zero movf DV,f ;
btfsc status,2
goto Start
goto division
division movf DV,w
subwf DD,w
btfsc status,0
goto suivant
goto fin
suivant movfw DV
subwf DD,1
incf QUOTIENT
goto division
fin movfw DD
movwf RESTE
end
|
src/decls-d_taula_de_noms.adb | alvaromb/Compilemon | 1 | 25029 | -- DECLS-D_TAULA_DE_NOMS.adb
-- Procediments per a la taula de noms
package body Decls.D_Taula_De_Noms is
-- Donam els valors per defecte de cada camp.
procedure Tbuida
(Tn : out Taula_De_Noms) is
begin
for I in Tn.Td'Range loop
Tn.Td(I) := Id_Nul;
end loop;
Tn.Nid := 1;
Tn.Ncar := 1;
Tn.Tid(1).Seguent := Id_Nul;
end Tbuida;
procedure Posa_Id
(Tn : in out Taula_De_Noms;
idn : out Id_Nom;
nom : in String) is
-- Variable per el valor de la funcio de dispersio.
P_Tid : Rang_Dispersio;
-- Index per recorrer la taula d'identificadors.
Idx : Id_Nom;
Trobat : Boolean;
P : Taula_Identificadors renames Tn.Tid;
D : Taula_Dispersio renames Tn.Td;
begin
P_Tid := Fdisp_Tn(Nom);
Idx := D(P_Tid);
Trobat := False;
while not Trobat and Idx/=Id_Nul loop
if (Nom = Cons_Nom(Tn, Idx)) then
Idn := idx;
Trobat := True;
else
Idx := p(Idx).Seguent;
end if;
end loop;
if not Trobat then
Idn := Tn.Nid;
P(Idn).Pos_Tcar := Tn.Ncar;
P(Idn).Seguent := D(P_Tid);
P(Idn).Long_Paraula := Nom'Length;
D(P_Tid) := Tn.Nid;
Posa_Tc(Tn, Nom);
end if;
end Posa_Id;
procedure Posa_Tc
(Tn : in out Taula_De_Noms;
Nom : in String) is
begin
Tn.Nid := Tn.Nid + 1;
for I in 1 .. Nom'Length loop
Tn.Tc(Tn.Ncar) := Nom(I);
Tn.Ncar := Tn.Ncar + 1;
end loop;
end Posa_Tc;
procedure Posa_Str
(Tn : in out Taula_De_Noms;
Ids : out Rang_Tcar;
S : in String) is
-- Index per recorrer la taula de caracters.
Jdx : Rang_Tcar;
Long : Rang_Tcar renames Tn.Ncar;
begin
-- Excepcio per a controlar tc plena
if (Long + S'Length) > Rang_Tcar'Last then
raise E_Tcar_Plena;
end if;
-- Omplim la taula de caracters, desde la primera
-- posicio lliure 'tn.ncar' renombrat a 'long'.
Jdx := Long;
Ids := Long;
for I in 1..S'Length loop
Tn.Tc(Jdx) := S(I);
Jdx := Jdx + 1;
end loop;
Long := Jdx + 1;
Tn.Tc(Jdx) := Ascii.Nul;
end Posa_Str;
function Cons_Nom
(Tn : in Taula_De_Noms;
Idn : in Id_Nom)
Return String Is
It1, It2 : Rang_Tcar;
Begin
If Idn /= Id_Nul Then
It1 := Tn.Tid(Idn).Pos_Tcar;
It2 := Rang_Tcar(Tn.Tid(Idn).Long_Paraula);
It2 := It2 + It1 - 1;
Return String(Tn.Tc(It1 .. It2));
Else Return "Id_Nul";
end If;
end Cons_Nom;
function Cons_Str
(Tn : in Taula_De_Noms;
Ids : in Rang_Tcar)
return String is
Idx : Rang_Tcar;
begin
Idx := Ids;
while (Tn.Tc(Idx) /= Ascii.Nul) loop
Idx := Idx+1;
end loop;
return String(Tn.Tc(Ids..Idx-1));
end Cons_Str;
function Fdisp_Tn
(Nom : in String)
return Rang_Dispersio is
A : array (Nom'Range) of Integer;
R : array (1..2*Nom'Last) of Integer;
K, C, M, N : Integer;
Base : constant Integer :=
Character'Pos(Character'Last)+1;
begin
N := Nom'Last;
M := Nom'Length;
for I in 1..N loop
A(I) := Character'Pos(Nom(I));
end Loop;
for I in 1..2*N loop
R(I) := 0;
end loop;
for I in 1..N loop
C := 0; K := I - 1;
for J in 1..N loop
C := C + R(K+J) + A(I) + A(J);
R(K+J) := C mod Base;
C := C/Base;
end loop;
R(K+N+1) := R(K+N+1) + C;
end loop;
C := (R(N+1) * Base + R(N)) mod (Max_Id);
return Rang_Dispersio(C);
end Fdisp_Tn;
end Decls.D_Taula_De_Noms;
|
programs/oeis/073/A073663.asm | neoneye/loda | 22 | 175081 | ; A073663: Total number of branches of length k (k>=1) in all ordered trees with n+k edges (it is independent of k).
; 1,2,8,30,113,428,1629,6226,23881,91884,354484,1370812,5312058,20622904,80196055,312319530,1217938665,4755296460,18586968840,72723903780,284804791230,1116315593640,4378929921210,17189573707956,67523632078698,265411559339128,1043852175016504,4107682079421816,16172544859601620,63704489145999856,251049551373385611,989772236696243098,3903795868688972137,15403002901948343052,60796889759177874848,240052854680556083348,948144268550807360214,3746080007775222043976,14804995685667551376278,58527789482027826575580,231437088372503511004430,915409813476738683651240,3621638155475850652328760,14331672106754500899341640,56726592515111124426079980,224579719125665503845169680,889292428560403415074341990,3522129503178697111561369860,13952414149140959882450783658,55280701975829682694780693944,219065963434415310049069998384,868261625675524310795051185512,3441897893992346052111314034348,13646287080376725977019611556240,54112521553622532003523919992308,214607804905852327511779001153448,851246940831025764721002237197364,3376959659056073432721728181058416,13398447631825021448764135768480176,53166679147482211878933342916115184,210998444434668831715407161354188584,837475186997243676395892933250886112
mov $3,2
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
add $0,$3
sub $0,1
mov $6,$0
mov $7,0
mov $8,2
lpb $8
sub $8,1
add $0,$8
mov $4,$0
sub $0,1
mul $4,2
bin $4,$0
mov $9,$8
mul $9,$4
add $7,$9
lpe
mov $2,$3
min $6,1
mul $6,$4
mov $4,$7
sub $4,$6
mul $2,$4
add $1,$2
lpe
min $5,1
mul $5,$4
sub $1,$5
mov $0,$1
|
oeis/051/A051399.asm | neoneye/loda-programs | 11 | 1377 | ; A051399: a(n) = (n-1)!*a(n-1)+1.
; Submitted by <NAME>(s2.)
; 0,1,2,5,31,745,89401,64368721,324418353841,13080548026869121,4746669267990266628481,17224713439683079541431852801,687555441429141549439426981886956801,329340156533265088807964627407023326809881601,2050808005007897599921042940527784322130330374964300801,178785937455869555265697778477035463325472545780843004833971251201,233793787769891748572512414548961352017724489605314942853484300844436915968001,4891618298629109147887601181879472656899254347884044597390179195274734566469197054373888001
mov $2,1
lpb $0
sub $0,1
mul $1,$2
add $1,1
add $3,1
mul $2,$3
lpe
mov $0,$1
|
test/Fail/Issue5048.agda | cagix/agda | 1,989 | 4713 |
module _ where
open import Agda.Builtin.Reflection
open import Agda.Builtin.Equality
module M where
open import Agda.Builtin.Nat renaming (Nat to Nombre)
a = quote Nombre
fail : M.a ≡ quote Name
fail = refl
|
tests/syntax_test_6309_mnemonics.asm | dougmasten/dougmasten-sublime-assembly-6809 | 5 | 88411 | # SYNTAX TEST "Packages/Assembly-6809/Assembly-6809.sublime-syntax"
# <- source.mc6809
; Additional mnemonics available on Hitachi 6309 CPU
*pragmapush 6309
opt 6309
IMM8 equ $12
IMM16 equ $3456
EXT equ $abcd
start equ *+100
;--------------------------------------------------------------------
adcd #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
adcd [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
adcd ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
adcd ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
adcd [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
adcd $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
adcr x,y
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
adde #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
adde [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
adde ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
adde ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
adde [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
adde $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
addf #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
addf [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
addf ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
addf ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
addf [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
addf $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
addw #IMM16
# ^^^^ keyword.operator
addw [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
addw ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
addw ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
addw [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
addw $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
addr x,y
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
aim #$3f;4,u
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
andd #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
andd [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
andd ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
andd ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
andd [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
andd $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
andr x,y
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
asld
# ^^^^ keyword.operator
;--------------------------------------------------------------------
asrd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
band a,5,1,$40
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
beor a,6,1,$40
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
biand a,1,3,$40
# ^^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
bieor a,0,3,$40
# ^^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
bior a,0,4,$40
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
bitd #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
;--------------------------------------------------------------------
bitmd #IMM8
# ^^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
;--------------------------------------------------------------------
bor a,6,1,$40
# ^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
clrd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
clre
# ^^^^ keyword.operator
;--------------------------------------------------------------------
clrf
# ^^^^ keyword.operator
;--------------------------------------------------------------------
clrw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
cmpe #$ff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
cmpe #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
cmpe [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
cmpe ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
cmpe ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
cmpe [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
cmpe $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
cmpf #$ff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
cmpf #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
cmpf [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
cmpf ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
cmpf ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
cmpf [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
cmpf $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
cmpw #$ffff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
cmpw #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
cmpw [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
cmpw ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
cmpw ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
cmpw [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
cmpw $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
cmpr x,y
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
comd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
come
# ^^^^ keyword.operator
;--------------------------------------------------------------------
comf
# ^^^^ keyword.operator
;--------------------------------------------------------------------
comw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
decd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
dece
# ^^^^ keyword.operator
;--------------------------------------------------------------------
decf
# ^^^^ keyword.operator
;--------------------------------------------------------------------
decw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
divd #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
;--------------------------------------------------------------------
divq #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
;--------------------------------------------------------------------
eim #$3f;4,u
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
eord #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
eord #$ffff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
eord start
# ^^^^ keyword.operator
; ^^^^^ constant.other
eord [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
eord ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
eord ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
eord [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
eord $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
eorr s,w
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
incd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
ince
# ^^^^ keyword.operator
;--------------------------------------------------------------------
incf
# ^^^^ keyword.operator
;--------------------------------------------------------------------
incw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
lde #$ff
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
lde start
# ^^^ keyword.operator
# ^^^^^ constant.other
lde [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
lde ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
lde ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
lde [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
lde $ffff
# ^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
ldf #$ff
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
ldf start
# ^^^ keyword.operator
# ^^^^^ constant.other
ldf [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
ldf ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
ldf ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
ldf [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
ldf $ffff
# ^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
ldw #$ffff
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
ldw start
# ^^^ keyword.operator
# ^^^^^ constant.other
ldw [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
ldw ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
ldw ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
ldw [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
ldw $ffff
# ^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
ldbt a,5,1,$40
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
ldmd #1
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^ constant.numeric.decimal
;--------------------------------------------------------------------
ldq #$11223344
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^^^^^ constant.numeric.hexadecimal
ldq start
# ^^^ keyword.operator
# ^^^^^ constant.other
ldq [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
ldq ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
ldq ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
ldq [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
ldq $ffff
# ^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
lsld
# ^^^^ keyword.operator
;--------------------------------------------------------------------
lsrd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
lsrw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
muld #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
muld #$ffff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
muld [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
muld ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
muld ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
muld [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
muld $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
negd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
oim #$c0;4,u
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
ord #IMM16
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
ord #$ffff
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
ord start
# ^^^ keyword.operator
# ^^^^^ constant.other
ord [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
ord ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
ord ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
ord [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
ord $ffff
# ^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
orr y,s
# ^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
pshsw
# ^^^^^ keyword.operator
;--------------------------------------------------------------------
pshuw
# ^^^^^ keyword.operator
;--------------------------------------------------------------------
pulsw
# ^^^^^ keyword.operator
;--------------------------------------------------------------------
puluw
# ^^^^^ keyword.operator
;--------------------------------------------------------------------
rold
# ^^^^ keyword.operator
;--------------------------------------------------------------------
rolw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
rord
# ^^^^ keyword.operator
;--------------------------------------------------------------------
rorw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
sbcd #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
sbcd #$ffff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
sbcd [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
sbcd ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
sbcd ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
sbcd [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
sbcd $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
sbcr x,u
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
sexw
# ^^^^ keyword.operator
;--------------------------------------------------------------------
ste $ffff
# ^^^ keyword.operator
ste [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
ste ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
ste ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
ste [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
;--------------------------------------------------------------------
stf $ffff
# ^^^ keyword.operator
stf [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
stf ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
stf ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
stf [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
;--------------------------------------------------------------------
stw $ffff
# ^^^ keyword.operator
stw [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
stw ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
stw ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
stw [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
;--------------------------------------------------------------------
stbt a,5,1,$40
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^ constant.numeric.decimal
# ^ operator.separator
# ^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
stq $ffff
# ^^^ keyword.operator
stq [EXT]
# ^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
stq ,x
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
stq ,y++
# ^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
stq [,--u]
# ^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
;--------------------------------------------------------------------
sube #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
sube #$ff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
sube [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
sube [$ffff]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^^^ constant.numeric.hexadecimal
# ^ punctuation.section.brackets.end
sube ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
sube ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
sube [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
sube $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
subf #IMM8
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^ constant.other
subf #$ff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
subf [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
sube [$ffff]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^^^ constant.numeric.hexadecimal
# ^ punctuation.section.brackets.end
subf ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
subf ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
subf [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
subf $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
subw #IMM16
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.other
subw #$ffff
# ^^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^^^ constant.numeric.hexadecimal
subw [EXT]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^ constant.other
# ^ punctuation.section.brackets.end
subw [$ffff]
# ^^^^ keyword.operator
# ^ punctuation.section.brackets.begin
# ^^^^^ constant.numeric.hexadecimal
# ^ punctuation.section.brackets.end
subw ,x
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
subw ,y++
# ^^^^ keyword.operator
# ^ operator.separator
# ^ variable.language.register
# ^^ keyword.operator.arithmetic
subw [,--u]
# ^^^^ keyword.operator
# ^^^^^^ meta.brackets
# ^ punctuation.section.brackets.begin
# ^ operator.separator
# ^^ keyword.operator.arithmetic
# ^ variable.language.register
# ^ punctuation.section.brackets.end
subw $ffff
# ^^^^ keyword.operator
# ^^^^^ constant.numeric.hexadecimal
;--------------------------------------------------------------------
subr s,x
# ^^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
tfm x+,d+
# ^^^ keyword.operator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
# ^ operator.separator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
tfm s+,x
# ^^^ keyword.operator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
# ^ operator.separator
# ^ variable.language.register
tfm u-,y-
# ^^^ keyword.operator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
# ^ operator.separator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
tfm d,u+
# ^^^ keyword.operator
# ^ variable.language.register
# ^ operator.separator
# ^ variable.language.register
# ^ keyword.operator.arithmetic
;--------------------------------------------------------------------
tim #$3f;4,u
# ^^^ keyword.operator
# ^ keyword.operator.immediate
# ^^^ constant.numeric.hexadecimal
# ^ operator.separator
# ^ operator.separator
# ^ variable.language.register
;--------------------------------------------------------------------
tstd
# ^^^^ keyword.operator
;--------------------------------------------------------------------
tste
# ^^^^ keyword.operator
;--------------------------------------------------------------------
tstf
# ^^^^ keyword.operator
;--------------------------------------------------------------------
tstw
# ^^^^ keyword.operator
*pragmapop 6309
|
programs/oeis/047/A047182.asm | neoneye/loda | 22 | 26683 | ; A047182: Number of nonempty subsets of {1,2,...,n} in which exactly 1/2 of the elements are <= (n-2)/2.
; 0,0,0,3,4,14,20,55,83,209,329,791,1286,3002,5004,11439,19447,43757,75581,167959,293929,646645,1144065,2496143,4457399,9657699,17383859,37442159,67863914,145422674,265182524,565722719,1037158319
sub $0,1
mov $1,2
add $1,$0
mov $2,$0
div $2,2
bin $1,$2
sub $1,1
mov $0,$1
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_16955_493.asm | ljhsiun2/medusa | 9 | 100010 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x14df3, %rsi
lea addresses_A_ht+0x35f3, %rdi
lfence
mov $91, %rcx
rep movsl
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_WC_ht+0xcdf3, %r15
clflush (%r15)
nop
nop
and %r12, %r12
movb (%r15), %cl
nop
nop
nop
dec %rsi
lea addresses_A_ht+0x1cff3, %rcx
nop
nop
nop
sub $2999, %r15
movups (%rcx), %xmm2
vpextrq $1, %xmm2, %rax
nop
add %rsi, %rsi
lea addresses_D_ht+0x39d6, %r15
and $43634, %rbp
movups (%r15), %xmm3
vpextrq $1, %xmm3, %rsi
nop
nop
add $46952, %rbp
lea addresses_UC_ht+0xa268, %r15
add $22950, %r12
mov $0x6162636465666768, %rax
movq %rax, (%r15)
nop
nop
nop
nop
dec %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %rcx
push %rdi
// Faulty Load
lea addresses_A+0xfdf3, %rcx
nop
nop
nop
sub %r10, %r10
movb (%rcx), %r8b
lea oracles, %rdi
and $0xff, %r8
shlq $12, %r8
mov (%rdi,%r8,1), %r8
pop %rdi
pop %rcx
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'35': 16955}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
|
ada/004/euler.adb | seaneshbaugh/rosetta-euler | 36 | 11058 | with Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Containers.Vectors;
use Ada.Text_IO;
use Ada.Integer_Text_IO;
use Ada.Containers;
procedure Euler is
package Long_Integer_Vectors is new Vectors(Natural, Long_Integer);
package Long_IO is new Ada.Text_IO.Integer_IO(Long_Integer);
use Long_IO;
function Reverse_Number(X : in Long_Integer) return Long_Integer is
N : Long_Integer := X;
R : Long_Integer := 0;
begin
while N /= 0 loop
R := R * 10 + (N mod 10);
N := N / 10;
end loop;
return R;
end Reverse_Number;
begin
declare
X : Long_Integer;
Y : Long_Integer;
Product : Long_Integer;
Palindromes : Long_Integer_Vectors.Vector;
Cursor : Long_Integer_Vectors.Cursor;
Max : Long_Integer;
begin
X := 100;
while X <= 999 loop
Y := 100;
while Y <= 999 loop
Product := X * Y;
if Product = Reverse_Number(Product) then
Long_Integer_Vectors.Append(Palindromes, Product);
end if;
Y := Y + 1;
end loop;
X := X + 1;
end loop;
Cursor := Long_Integer_Vectors.First(Palindromes);
Max := Long_Integer_Vectors.Element(Cursor);
Cursor := Long_Integer_Vectors.Next(Cursor);
while Long_Integer_Vectors.Has_Element(Cursor) loop
if Long_Integer_Vectors.Element(Cursor) > Max then
Max := Long_Integer_Vectors.Element(Cursor);
end if;
Cursor := Long_Integer_Vectors.Next(Cursor);
end loop;
Put(Item => (Max), Width => 1);
New_Line;
end;
end Euler;
|
src/sets/nat/ordering/leq/level.agda | pcapriotti/agda-base | 20 | 13947 | {-# OPTIONS --without-K #-}
module sets.nat.ordering.leq.level where
open import sum
open import equality
open import function.isomorphism
open import function.extensionality
open import hott.level
open import sets.nat.core
open import sets.nat.ordering.leq.core
open import container.core
open import container.w
open import sets.empty
open import sets.unit
open import hott.level.sets public
using (nat-set)
module ≤-container where
I : Set
I = ℕ × ℕ
A A₁ A₂ : I → Set
A₁ (m , n) = m ≡ 0
A₂ (m , n) = ( Σ I λ { (m' , n')
→ m ≡ suc m'
× n ≡ suc n' } )
A i = A₁ i ⊎ A₂ i
A₂-struct-iso : ∀ m n
→ A₂ (m , n)
≅ (¬ (m ≡ 0) × ¬ (n ≡ 0))
A₂-struct-iso m n = iso f g α β
where
f : ∀ {m n} → A₂ (m , n) → ¬ (m ≡ 0) × ¬ (n ≡ 0)
f .{suc m}.{suc n}((m , n) , refl , refl) = (λ ()) , (λ ())
g : ∀ {m n} → ¬ (m ≡ 0) × ¬ (n ≡ 0) → A₂ (m , n)
g {m = zero} (u , v) = ⊥-elim (u refl)
g {n = zero} (u , v) = ⊥-elim (v refl)
g {suc m} {suc n} _ = ((m , n) , refl , refl)
α : ∀ {m n}(a : A₂ (m , n)) → g (f a) ≡ a
α .{suc m}.{suc n}((m , n) , refl , refl) = refl
β : ∀ {m n}(u : ¬ (m ≡ 0) × ¬ (n ≡ 0)) → f (g u) ≡ u
β {m = zero} (u , v) = ⊥-elim (u refl)
β {n = zero} (u , v) = ⊥-elim (v refl)
β {suc m} {suc n} _ = pair≡ (funext λ ()) (funext λ ())
A₂-h1 : ∀ i → h 1 (A₂ i)
A₂-h1 (m , n) = iso-level (sym≅ (A₂-struct-iso m n))
(×-level (Π-level λ _ → ⊥-prop) (Π-level λ _ → ⊥-prop))
A-disj : ∀ i → ¬ (A₁ i × A₂ i)
A-disj (.zero , n) (refl , (m' , n') , () , pn)
A-h1 : ∀ i → h 1 (A i)
A-h1 i = ⊎-h1 (nat-set _ zero) (A₂-h1 i) (A-disj i)
B : ∀ {i} → A i → Set
B (inj₁ _) = ⊥
B (inj₂ _) = ⊤
r : ∀ {i}{a : A i} → B a → I
r {a = inj₁ _} ()
r {a = inj₂ (mn' , _)} _ = mn'
c : Container _ _ _
c = container I A B r
open ≤-container using (c; A-h1)
≤-struct-iso : ∀ {n m}
→ n ≤ m
≅ W c (n , m)
≤-struct-iso = iso f g α β
where
f : ∀ {n m} → n ≤ m → W c (n , m)
f z≤n = sup (inj₁ refl) (λ ())
f (s≤s p) = sup (inj₂ (_ , (refl , refl))) (λ _ → f p)
g : ∀ {m n} → W c (m , n) → m ≤ n
g (sup (inj₁ refl) _) = z≤n
g (sup (inj₂ ((m' , n') , (refl , refl))) u)
= s≤s (g (u tt))
α : ∀ {n m}(p : n ≤ m) → g (f p) ≡ p
α z≤n = refl
α (s≤s p) = ap s≤s (α p)
β : ∀ {n m}(p : W c (m , n)) → f (g p) ≡ p
β (sup (inj₁ refl) u) = ap (sup (inj₁ refl)) (funext λ ())
β (sup (inj₂ ((m' , n') , (refl , refl))) u)
= ap (sup _) (funext λ { tt → β (u tt) })
≤-level : ∀ {m n} → h 1 (m ≤ n)
≤-level {m}{n} = iso-level (sym≅ ≤-struct-iso) (w-level A-h1 (m , n))
|
bool-relations.agda | heades/AUGL | 0 | 8557 | {- This file describes properties of computable relations. -}
open import bool
open import level
open import eq
open import product
open import product-thms
module bool-relations {ℓ : level}{A : Set ℓ} (_≤A_ : A → A → 𝔹) where
reflexive : Set (ℓ)
reflexive = ∀ {a : A} → a ≤A a ≡ tt
transitive : Set (ℓ)
transitive = ∀ {a b c : A} → a ≤A b ≡ tt → b ≤A c ≡ tt → a ≤A c ≡ tt
total : Set ℓ
total = ∀ {a b : A} → a ≤A b ≡ ff → b ≤A a ≡ tt
total-reflexive : total → reflexive
total-reflexive tot {a} with keep (a ≤A a)
total-reflexive tot {a} | tt , p = p
total-reflexive tot {a} | ff , p = tot p
_iso𝔹_ : A → A → 𝔹
d iso𝔹 d' = d ≤A d' && d' ≤A d
iso𝔹-intro : ∀{x y : A} → x ≤A y ≡ tt → y ≤A x ≡ tt → x iso𝔹 y ≡ tt
iso𝔹-intro p1 p2 rewrite p1 | p2 = refl
|
oeis/162/A162641.asm | neoneye/loda-programs | 11 | 246937 | ; A162641: Number of even exponents in canonical prime factorization of n.
; Submitted by <NAME>(w2)
; 0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,2
seq $0,336643 ; Squarefree kernel of n divided by the squarefree part of n: a(n) = rad(n) / core(n).
sub $0,1
seq $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
mul $0,3
bin $0,2
div $0,3
mov $1,1
mov $2,1
lpb $0
div $0,4
add $2,$1
lpe
mov $0,$2
sub $0,2
|
source/string/functions/compare.asm | paulscottrobson/6502-basic | 3 | 93785 | <reponame>paulscottrobson/6502-basic
; ************************************************************************************************
; ************************************************************************************************
;
; Name: compare.asm
; Purpose: Comparison for strings
; Created: 28th February 2021
; Reviewed: 8th March 2021
; Author: <NAME> (<EMAIL>)
;
; ************************************************************************************************
; ************************************************************************************************
.section code
; ************************************************************************************************
;
; Compare two strings TOS, return $FF,$00,$01 in X, SP = A
;
; ************************************************************************************************
STRCompare: ;; <sCompare>
pha ; save A
tax ; put stack pos in X
.pshy ; save Y
jsr CopyStringPair ; copy strings to temp0,temp1
ldy #0 ; get the smaller of the two string sizes.
lda (temp0),y
cmp (temp1),y
bcc _SCNotSmaller
lda (temp1),y
_SCNotSmaller:
tax ; put that in X. We compare this many chars first.
_SCCompareLoop:
cpx #0 ; if compared all the smaller, then it is the shorter
beq _SCSameToEndShortest ; one that is the smallest if they are different lengths.
dex ; decrement chars to compare.
;
iny ; move to next character
sec ; calculate s1[y]-s2[y]
lda (temp0),y
sbc (temp1),y
bne _SCReturnResult ; if different return sign of A
jmp _SCCompareLoop
;
; As far as the common length, they are the same, so the lesser depends on the length.
;
_SCSameToEndShortest
ldy #0 ; compare len(s1) - len(s2)
sec
lda (temp0),y
sbc (temp1),y
;
; If Z return 0. If CC return -1. If CS & NZ return 1.
;
_SCReturnResult:
php ; set return to zero preserving PSW.
ldx #0
plp
beq _SCExit ; two values equal, then exit
dex ; X = $FF
bcc _SCExit ; if 1st < 2nd then -1
ldx #1 ; X = $01 if greater
_SCExit:
.puly ; restore YA and exit with result in X
pla
rts
; ************************************************************************************************
;
; Copy string addresses to temp0,temp1
;
; ************************************************************************************************
CopyStringPair:
lda esInt0+1,x
sta temp1
lda esInt1+1,x
sta temp1+1
CopyStringTop:
lda esInt0,x
sta temp0
lda esInt1,x
sta temp0+1
rts
.send code
; ************************************************************************************************
;
; Changes and Updates
;
; ************************************************************************************************
;
; Date Notes
; ==== =====
; 07-Mar-21 Pre code read v0.01
;
; ************************************************************************************************
|
src/Dodo/Binary/Union.agda | sourcedennis/agda-dodo | 0 | 9879 | <reponame>sourcedennis/agda-dodo<filename>src/Dodo/Binary/Union.agda
{-# OPTIONS --without-K --safe #-}
module Dodo.Binary.Union where
-- Stdlib imports
open import Level using (Level; _⊔_)
open import Data.Sum using (_⊎_; inj₁; inj₂; swap)
open import Relation.Binary using (REL)
-- Local imports
open import Dodo.Binary.Equality
-- # Definitions
infixl 19 _∪₂_
_∪₂_ : {a b ℓ₁ ℓ₂ : Level} {A : Set a} {B : Set b}
→ REL A B ℓ₁
→ REL A B ℓ₂
→ REL A B (ℓ₁ ⊔ ℓ₂)
_∪₂_ p q x y = p x y ⊎ q x y
-- # Properties
module _ {a b ℓ : Level} {A : Set a} {B : Set b}
{R : REL A B ℓ} where
∪₂-idem : (R ∪₂ R) ⇔₂ R
∪₂-idem = ⇔: ⊆-proof ⊇-proof
where
⊆-proof : (R ∪₂ R) ⊆₂' R
⊆-proof _ _ (inj₁ Rxy) = Rxy
⊆-proof _ _ (inj₂ Rxy) = Rxy
⊇-proof : R ⊆₂' (R ∪₂ R)
⊇-proof _ _ = inj₁
module _ {a b ℓ₁ ℓ₂ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} where
∪₂-comm : (P ∪₂ Q) ⇔₂ (Q ∪₂ P)
∪₂-comm = ⇔: (λ _ _ → swap) (λ _ _ → swap)
module _ {a b ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {B : Set b} {P : REL A B ℓ₁}
{Q : REL A B ℓ₂} {R : REL A B ℓ₃} where
∪₂-assoc : (P ∪₂ Q) ∪₂ R ⇔₂ P ∪₂ (Q ∪₂ R)
∪₂-assoc = ⇔: ⊆-proof ⊇-proof
where
⊆-proof : ((P ∪₂ Q) ∪₂ R) ⊆₂' (P ∪₂ (Q ∪₂ R))
⊆-proof _ _ (inj₁ (inj₁ Pxy)) = inj₁ Pxy
⊆-proof _ _ (inj₁ (inj₂ Qxy)) = inj₂ (inj₁ Qxy)
⊆-proof _ _ (inj₂ Rxy) = inj₂ (inj₂ Rxy)
⊇-proof : (P ∪₂ (Q ∪₂ R)) ⊆₂' ((P ∪₂ Q) ∪₂ R)
⊇-proof _ _ (inj₁ Pxy) = inj₁ (inj₁ Pxy)
⊇-proof _ _ (inj₂ (inj₁ Qxy)) = inj₁ (inj₂ Qxy)
⊇-proof _ _ (inj₂ (inj₂ Rxy)) = inj₂ Rxy
-- # Operations
-- ## Operations: ⊆₂
module _ {a b ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} {R : REL A B ℓ₃} where
∪₂-combine-⊆₂ : P ⊆₂ Q → R ⊆₂ Q → (P ∪₂ R) ⊆₂ Q
∪₂-combine-⊆₂ (⊆: P⊆Q) (⊆: R⊆Q) = ⊆: (λ{x y → λ{(inj₁ Px) → P⊆Q x y Px; (inj₂ Rx) → R⊆Q x y Rx}})
module _ {a b ℓ₁ ℓ₂ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} where
∪₂-introˡ : P ⊆₂ (Q ∪₂ P)
∪₂-introˡ = ⊆: λ{_ _ → inj₂}
∪₂-introʳ : P ⊆₂ (P ∪₂ Q)
∪₂-introʳ = ⊆: λ{_ _ → inj₁}
module _ {a b ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} {R : REL A B ℓ₃} where
∪₂-introˡ-⊆₂ : P ⊆₂ R → P ⊆₂ (Q ∪₂ R)
∪₂-introˡ-⊆₂ (⊆: P⊆R) = ⊆: (λ x y Pxy → inj₂ (P⊆R x y Pxy))
∪₂-introʳ-⊆₂ : P ⊆₂ Q → P ⊆₂ (Q ∪₂ R)
∪₂-introʳ-⊆₂ (⊆: P⊆Q) = ⊆: (λ x y Pxy → inj₁ (P⊆Q x y Pxy))
∪₂-elimˡ-⊆₂ : (P ∪₂ Q) ⊆₂ R → Q ⊆₂ R
∪₂-elimˡ-⊆₂ (⊆: [P∪Q]⊆R) = ⊆: (λ x y Qxy → [P∪Q]⊆R x y (inj₂ Qxy))
∪₂-elimʳ-⊆₂ : (P ∪₂ Q) ⊆₂ R → P ⊆₂ R
∪₂-elimʳ-⊆₂ (⊆: [P∪Q]⊆R) = ⊆: (λ x y Pxy → [P∪Q]⊆R x y (inj₁ Pxy))
module _ {a b ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} {R : REL A B ℓ₃} where
∪₂-substˡ-⊆₂ : P ⊆₂ Q → (P ∪₂ R) ⊆₂ (Q ∪₂ R)
∪₂-substˡ-⊆₂ (⊆: P⊆Q) = ⊆: (λ{x y → λ{(inj₁ Pxy) → inj₁ (P⊆Q x y Pxy); (inj₂ Rxy) → inj₂ Rxy}})
∪₂-substʳ-⊆₂ : P ⊆₂ Q → (R ∪₂ P) ⊆₂ (R ∪₂ Q)
∪₂-substʳ-⊆₂ (⊆: P⊆Q) = ⊆: (λ{x y → λ{(inj₁ Rxy) → inj₁ Rxy; (inj₂ Pxy) → inj₂ (P⊆Q x y Pxy)}})
-- ## Operations: ⇔₂
module _ {a b ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {B : Set b}
{P : REL A B ℓ₁} {Q : REL A B ℓ₂} {R : REL A B ℓ₃} where
∪₂-substˡ : P ⇔₂ Q → (P ∪₂ R) ⇔₂ (Q ∪₂ R)
∪₂-substˡ = ⇔₂-compose ∪₂-substˡ-⊆₂ ∪₂-substˡ-⊆₂
∪₂-substʳ : P ⇔₂ Q → (R ∪₂ P) ⇔₂ (R ∪₂ Q)
∪₂-substʳ = ⇔₂-compose ∪₂-substʳ-⊆₂ ∪₂-substʳ-⊆₂
|
samples/03_8051/original/asm/timer2_test.asm | kubasz/verinject | 0 | 6545 | ; b: error code
; r3: timer high expected value
; r4: timer low expected value
t2con EQU 0c8h;
rcap2l EQU 0cah;
rcap2h EQU 0cbh;
tl2 EQU 0cch;
th2 EQU 0cdh;
tr2 EQU 0cah;
exen2 EQU 0cbh;
exf2 EQU 0ceh;
tf2 EQU 0cfh;
ajmp start;
org 03h ; external interrupt 0
reti;
org 0bh ; t/c 0 interrupt
reti;
org 13h ; external interrupt 1
reti;
org 1bh ; t/c 1 interrupt
reti;
org 23h ; serial interface interrupt
reti;
org 2bh; t/c 2 interrupt
reti;
test2:
mov a, th2 ;
subb a, r3 ;
jnz error ;
mov a,tl2 ;
subb a, r4 ;
jnz error ;
ret;
error:
mov p1, b;
nop;
ajmp error;
wait:
dec a ; 1
nop ; 1
nop ; 1
nop ; 1
nop ; 1
nop ; 1
nop ; 1
nop ; 1
jnz wait ; 4
nop;
; nop;
nop;
ret ; 4
start:
clr a;
mov r0, a;
mov r1, a;
mov ie, #00h ;disable interrupts
clr c;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; timer 2 test
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; capture mode
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov tcon, #000h ; disable t/c 0,1
mov t2con, #01h; timer 2 capture mode,
mov th2, #000h ;load timer 2
mov tl2, #000h ;
setb tr2 ;start timer 2;
mov a, #03h ; 1
acall wait ; 2
clr tr2 ;stop timer 2
mov b, #00h ; error 0
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2;
mov a, #04h ;
acall wait ;
clr tr2 ; stop timer 2
mov b, #01h ; error 1
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
mov a, #05h ;
acall wait ;
clr tr2 ;stop timer 0
mov b, #02h ; error 2
mov r3, #000h ;
mov r4, #002h ;
acall test2 ;
mov b, #03h ; error 3
jnb tf2, error ;
clr tf2 ;
mov p0, #01h;
;
; test exen2
;
mov rcap2l, #43h
mov rcap2h, #21h
mov th2, #23h ;
mov tl2, #45h ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop1: nop ;
dec a ;
jnz loop1 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #04h ;error 4
subb a, #43h ;
jnz error0 ;
mov a, rcap2h ;
subb a, #21h ;
jnz error0 ;
mov b, #05h ;error 5
jb exf2, error0 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop2: nop ;
dec a ;
jnz loop2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #06h ;error 6
subb a, #45h ;
jnz error0 ;
mov a, rcap2h ;
subb a, #23h ;
jnz error0 ;
mov b, #07h ;error 7
jnb exf2, error0;
clr exf2 ;
mov p0, #02h;
ajmp arm;
error0:
ljmp error;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; auto reload mode
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
arm:
mov t2con, #00h ; t/c 2 in auto reload mode
mov th2, #000h ;load timer 2
mov tl2, #000h ;
mov rcap2l, #11h;
mov rcap2h, #22h;
setb tr2 ;start timer 2;
mov a, #03h ;
acall wait ;
clr tr2 ;stop timer 2
mov b, #08h ; error 8
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2
mov a, #04h ;
acall wait ;
clr tr2 ; stop timer 2
mov b, #09h ; error 9
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov b, #0ah ; error a
jb tf2, error0 ;
clr tf2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
mov a, #05h ;
acall wait ;
clr tr2 ;stop timer 0
mov b, #0bh ; error b
mov r3, #022h ;
mov r4, #013h ;
acall test2 ;
mov b, #0ch ; error c
jnb tf2, error0 ;
clr tf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f0h ;error f0
subb a, #11h ;
jnz error1 ;
mov a, rcap2h ;
subb a, #22h ;
jnz error0 ;
mov p0, #03h;
;
; test exen2
;
mov rcap2l, #12h
mov rcap2h, #34h
mov tl2, #56h ;
mov th2, #78h ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop3: nop ;
dec a ;
jnz loop3 ;
mov b, #0dh ; error d
mov r3, #078h ;
mov r4, #056h ;
acall test2 ;
mov b, #0eh ; error e
jb exf2, error1 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop4: nop ;
dec a ;
jnz loop4 ;
mov b, #0fh ; error f
mov r3, #034h ;
mov r4, #012h ;
acall test2 ;
mov b, #10h ;error 10
jnb exf2, error1;
clr exf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f1h ;error f1
subb a, #12h ;
jnz error1 ;
mov a, rcap2h ;
subb a, #34h ;
jnz error1 ;
mov p0, #04h ;
ajmp brate;
error1:
ljmp error;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; baud rate generator
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
brate:
mov t2con, #10h ; t/c 2 in baud rate generator mode
mov th2, #000h ;load timer 2
mov tl2, #000h ;
mov rcap2l, #11h;
mov rcap2h, #22h;
setb tr2 ;start timer 2;
mov a, #03h ;
acall wait ;
clr tr2 ;stop timer 2
mov b, #20h ; error 20
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov t2con, #20h ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2
mov a, #04h ;
acall wait ;
clr tr2 ; stop timer 2
mov b, #021h ; error 21
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov b, #22h ; error 22
jb tf2, error1 ;
clr tf2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
mov a, #05h ;
acall wait ;
clr tr2 ;stop timer 0
mov b, #23h ; error 23
mov r3, #022h ;
mov r4, #013h ;
acall test2 ;
mov b, #24h ; error 24
jb tf2, error1 ;
clr tf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f4h ;error f4
subb a, #11h ;
jnz error1 ;
mov a, rcap2h ;
subb a, #22h ;
jnz error1 ;
mov p0, #07h;
;
; test exen2
;
mov tl2, #56h ;
mov th2, #78h ;
setb p3.2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop5: nop ;
dec a ;
jnz loop5 ;
mov b, #25h ; error 25
mov r3, #078h ;
mov r4, #056h ;
acall test2 ;
mov b, #0eh ; error e
jb exf2, error3 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop6: nop ;
dec a ;
jnz loop6 ;
mov b, #26h ; error 26
mov r3, #078h ;
mov r4, #056h ;
acall test2 ;
mov b, #27h ;error 27
jnb exf2, error3;
clr exf2 ;
mov p0, #08h ;
ajmp counter;
error3:
ljmp error;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; counter 2 test
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; capture mode
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
counter:
mov tcon, #000h ; disable t/c 0,1
mov t2con, #03h; timer 2 capture mode,
mov th2, #000h ;load timer 2
mov tl2, #000h ;
setb tr2 ;start timer 2;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 2
mov b, #00h ; error 0
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ; stop timer 2
mov b, #01h ; error 1
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 0
mov b, #02h ; error 2
mov r3, #000h ;
mov r4, #002h ;
acall test2 ;
mov b, #03h ; error 3
jnb tf2, error4 ;
clr tf2 ;
mov p0, #09h;
;
; test exen2
;
mov rcap2l, #43h
mov rcap2h, #21h
mov th2, #23h ;
mov tl2, #45h ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop7: nop ;
dec a ;
jnz loop7 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #04h ;error 4
subb a, #43h ;
jnz error4 ;
mov a, rcap2h ;
subb a, #21h ;
jnz error4 ;
mov b, #05h ;error 5
jb exf2, error4 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop8: nop ;
dec a ;
jnz loop8 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #06h ;error 6
subb a, #45h ;
jnz error4 ;
mov a, rcap2h ;
subb a, #23h ;
jnz error4 ;
mov b, #07h ;error 7
jnb exf2, error4;
clr exf2 ;
mov p0, #0ah;
ajmp armc;
error4:
ljmp error;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; auto reload mode
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
armc:
mov t2con, #02h ; t/c 2 in auto reload mode
mov th2, #000h ;load timer 2
mov tl2, #000h ;
mov rcap2l, #11h;
mov rcap2h, #22h;
setb tr2 ;start timer 2;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 2
mov b, #08h ; error 8
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ; stop timer 2
mov b, #09h ; error 9
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov b, #0ah ; error a
jb tf2, error4 ;
clr tf2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 0
mov b, #0bh ; error b
mov r3, #022h ;
mov r4, #013h ;
acall test2 ;
mov b, #0ch ; error c
jnb tf2, error5 ;
clr tf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f0h ;error f0
subb a, #11h ;
jnz error5 ;
mov a, rcap2h ;
subb a, #22h ;
jnz error5 ;
mov p0, #0bh;
;
; test exen2
;
mov rcap2l, #12h
mov rcap2h, #34h
mov tl2, #56h ;
mov th2, #78h ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop9: nop ;
dec a ;
jnz loop9 ;
mov b, #0dh ; error d
mov r3, #078h ;
mov r4, #056h ;
acall test2 ;
mov b, #0eh ; error e
jb exf2, error5 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop10: nop ;
dec a ;
jnz loop10 ;
mov b, #0fh ; error f
mov r3, #034h ;
mov r4, #012h ;
acall test2 ;
mov b, #10h ;error 10
jnb exf2, error5;
clr exf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f1h ;error f1
subb a, #12h ;
jnz error5 ;
mov a, rcap2h ;
subb a, #34h ;
jnz error5 ;
mov p0, #0ch ;
ajmp bratec;
error5:
ljmp error;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; baud rate generator
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
bratec:
mov t2con, #12h ; t/c 2 in baud rate generator mode
mov th2, #000h ;load timer 2
mov tl2, #000h ;
mov rcap2l, #11h;
mov rcap2h, #22h;
setb tr2 ;start timer 2;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 2
mov b, #20h ; error 20
mov r3, #000h ;
mov r4, #004h ;
acall test2 ;
mov tl2, #0fch ; load timer 2
setb tr2 ; start timer 2
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ; stop timer 2
mov b, #021h ; error 21
mov r3, #001h ;
mov r4, #001h ;
acall test2 ;
mov b, #22h ; error 22
jb tf2, error5 ;
clr tf2 ;
mov tl2, #0fch ;
mov th2, #0ffh ;
setb tr2 ;start timer 2
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
cpl p3.5;
clr tr2 ;stop timer 0
mov b, #23h ; error 23
mov r3, #022h ;
mov r4, #012h ;
lcall test2 ;
mov b, #24h ; error 24
jb tf2, error8 ;
clr tf2 ;
mov a, rcap2l ;
mov psw, #00h ;
mov b, #0f4h ;error f4
subb a, #11h ;
jnz error8 ;
mov a, rcap2h ;
subb a, #22h ;
jnz error8 ;
mov p0, #0fh;
;
; test exen2
;
mov tl2, #56h ;
mov th2, #78h ;
setb p3.2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop11: nop ;
dec a ;
jnz loop11 ;
mov b, #25h ; error 25
mov r3, #078h ;
mov r4, #056h ;
lcall test2 ;
mov b, #0eh ; error e
jb exf2, error8 ;
clr exf2 ;
setb exen2 ;
clr p3.2 ;
setb p3.2 ;
mov a, #10h ;
loop12: nop ;
dec a ;
jnz loop12 ;
mov b, #26h ; error 26
mov r3, #078h ;
mov r4, #056h ;
lcall test2 ;
mov b, #27h ;error 27
jnb exf2, error8;
clr exf2 ;
mov p0, #10h ;
ajmp finish ;
error8:
ljmp error;
finish:
nop;
nop;
ajmp finish;
end
|
samples/volume_servlet.adb | My-Colaborations/ada-servlet | 6 | 18969 | -----------------------------------------------------------------------
-- volume_servlet -- Servlet example to compute some volumes
-- Copyright (C) 2010, 2015, 2018 <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.Numerics;
with Servlet.Streams;
package body Volume_Servlet is
procedure Write (Response : in out Responses.Response'Class;
Message : in String;
Height : in String;
Radius : in String);
-- ------------------------------
-- Write the volume form page with an optional response message.
-- ------------------------------
procedure Write (Response : in out Responses.Response'Class;
Message : in String;
Height : in String;
Radius : in String) is
Output : Streams.Print_Stream := Response.Get_Output_Stream;
begin
Output.Write ("<html><head><title>Volume servlet example</title></head>"
& "<style></style>"
& "<body>"
& "<h1>Compute the volume of a cylinder</h1>");
-- Display the response or some error.
if Message /= "" then
Output.Write ("<h2>" & Message & "</h2>");
end if;
-- Render the form. If we have some existing Radius or Height
-- use them to set the initial values.
Output.Write ("<p>Enter the height and radius of the cylinder</p>"
& "<form method='post'>"
& "<table>"
& "<tr><td>Height</td>"
& "<td><input type='text' size='10' name='height'");
if Height /= "" then
Output.Write (" value='" & Height & "'");
end if;
Output.Write ("></input></td></tr>"
& "<tr><td>Radius</td>"
& "<td><input type='text' size='10' name='radius'");
if Radius /= "" then
Output.Write (" value='" & Radius & "'");
end if;
Output.Write ("></input></td></tr>"
& "<tr><td></td><td><input type='submit' value='Compute'></input></td></tr>"
& "</table></form>"
& "</body></html>");
Response.Set_Status (Responses.SC_OK);
end Write;
-- ------------------------------
-- Called by the servlet container when a GET request is received.
-- Display the volume form page.
-- ------------------------------
procedure Do_Get (Server : in Servlet;
Request : in out Requests.Request'Class;
Response : in out Responses.Response'Class) is
pragma Unreferenced (Server, Request);
begin
Write (Response, "", "", "");
end Do_Get;
-- ------------------------------
-- Called by the servlet container when a POST request is received.
-- Computes the cylinder volume and display the result page.
-- ------------------------------
procedure Do_Post (Server : in Servlet;
Request : in out Requests.Request'Class;
Response : in out Responses.Response'Class) is
pragma Unreferenced (Server);
Height : constant String := Request.Get_Parameter ("height");
Radius : constant String := Request.Get_Parameter ("radius");
begin
declare
H : constant Float := Float'Value (Height);
R : constant Float := Float'Value (Radius);
V : constant Float := Ada.Numerics.Pi * R * R * H;
begin
Write (Response, "The cylinder volume is: " & Float'Image (V), Height, Radius);
end;
exception
when others =>
Write (Response, "Invalid height or radius. Please, enter a number",
Height, Radius);
end Do_Post;
end Volume_Servlet;
|
VC2010Samples/Compiler/MASM/EuclidStep2/euclid.asm | alonmm/VCSamples | 300 | 7540 | <reponame>alonmm/VCSamples
; Copyright (c) Microsoft Corporation. All rights reserved.
.386
.model flat, c
; Custom Build Step, including a listing file placed in intermediate directory
; but without Source Browser information
; debug:
; ml -c -Zi "-Fl$(IntDir)\$(InputName).lst" "-Fo$(IntDir)\$(InputName).obj" "$(InputPath)"
; release:
; ml -c "-Fl$(IntDir)\$(InputName).lst" "-Fo$(IntDir)\$(InputName).obj" "$(InputPath)"
; outputs:
; $(IntDir)\$(InputName).obj
; Custom Build Step, including a listing file placed in intermediate directory
; and Source Browser information also placed in intermediate directory
; debug:
; ml -c -Zi "-Fl$(IntDir)\$(InputName).lst" "-FR$(IntDir)\$(InputName).sbr" "-Fo$(IntDir)\$(InputName).obj" "$(InputPath)"
; release:
; ml -c "-Fl$(IntDir)\$(InputName).lst" "-FR$(IntDir)\$(InputName).sbr" "-Fo$(IntDir)\$(InputName).obj" "$(InputPath)"
; outputs:
; $(IntDir)\$(InputName).obj
; $(IntDir)\$(InputName).sbr
.code
; Euclid's algorithm finds the greatest common divisor by repeatedly
; subtracting the smaller number from the larger number until zero
; is reached. The number remaining is the greatest common divisor.
euclid PROC x:SDWORD, y:SDWORD
mov ecx, x
mov eax, y
@@:
cmp ecx, eax
jge noswap
xchg eax, ecx
noswap:
sub ecx, eax
jnz @B
; return value already in eax
RET
euclid ENDP
end
|
Code/Hello Expaner PCF8574/HelloExpanerPCF8574.asm | Pawel82S/AVR-ATtiny85 | 0 | 27758 | ;
; ***********************************
; * (Driver for PCF8574 expander) *
; * (ATtiny85) *
; * (C)2021 by <NAME> *
; ***********************************
;
.nolist
.include "tn85def.inc" ; Define device ATtiny85
.list
;
; **********************************
; H A R D W A R E
; **********************************
;
; (F2 adds ASCII pin-out for device here);
; Device: ATtiny85, Package: 8-pin-PDIP_SOIC
;
; _________
; 1 / |8
; o--|RESET VCC|--o
; o--|PB3 PB2|--o
; o--|PB4 PB1|--o
; o--|GND PB0|--o
; 4 |__________|5
;
;
; **********************************
; P O R T S A N D P I N S
; **********************************
;
; (Add symbols for all ports and port pins with ".equ" here)
; (e.g. .equ pDirD = DDRB ; Define a direction port
; or
; .equ bMyPinO = PORTB0 ; Define an output pin)
.equ SDA = PORTB0
.equ SCL = PORTB2
.equ EXPANDER_INT = PORTB1
.equ ERROR_LED = PORTB4
.equ FREE_LEGS = (1 << PORTB3) | (1 << PORTB5)
;
; **********************************
; A D J U S T A B L E C O N S T
; **********************************
;
; (Add all user adjustable constants here, e.g.)
; .equ clock=1000000 ; Define the clock frequency
;
; **********************************
; F I X & D E R I V. C O N S T
; **********************************
;
; (Add symbols for fixed and derived constants here)
;
; **********************************
; R E G I S T E R S
; **********************************
;
; free: R0 to R14
.def rSreg = R15 ; Save/Restore status port
.def rmp = R16 ; Define multipurpose register
; free: R17 to R29
; used: R31:R30 = Z for ...
;
; **********************************
; S R A M
; **********************************
;
.dseg
.org SRAM_START
; (Add labels for SRAM locations here, e.g.
; sLabel1:
; .byte 16 ; Reserve 16 bytes)
;
; **********************************
; C O D E
; **********************************
;
.cseg
.org 0
;
; **********************************
; R E S E T & I N T - V E C T O R S
; **********************************
rjmp Main ; Reset vector
reti ; INT0 - External Interrupt Request 0
rjmp PinChangeInt ; PCI0 - Pin Change Interrupt Request 0
reti ; OC1A - Timer/Counter 1 Compare Match A
reti ; OVF1 - Timer/Counter 1 Overflow
reti ; OVF0 - Timer/Counter 0 Overflow
reti ; ERDY - EEPROM Ready
reti ; ACI - Analog Comparator
reti ; ADCC - ADC Conversion Complete
reti ; OC1B - Timer/Counter 1 Compare Match B
reti ; OC0A - Timer/Counter 0 Compare Match A
reti ; OC0B - Timer/Counter 0 Compare Match B
reti ; WDT - Watchdog Time-out
reti ; USI_START - USI Start
reti ; USI_OVF - USI Overflow
;
; **********************************
; I N T - S E R V I C E R O U T .
; **********************************
;
; (Add all interrupt service routines here)
PinChangeInt:
reti
;
; **********************************
; M A I N P R O G R A M I N I T
; **********************************
;
Main:
.ifdef SPH ; if SPH is defined
ldi rmp,High(RAMEND)
out SPH,rmp ; Init MSB stack pointer
.endif
ldi rmp,Low(RAMEND)
out SPL,rmp ; Init LSB stack pointer
ldi rmp, (1 << SE) ; Set Sleep Enable bit
out MCUCR, rmp ; Enable MCU sleep mode (Idle by default)
ldi rmp, FREE_LEGS
out PORTB, rmp ; Enable pull-up resistors on unsued chip legs as recommended in documentation
sbi PCMSK, EXPANDER_INT ; Enable PCINT only on expander pin
ldi rmp, (1 << PCIE)
out GIMSK, rmp ; Enable Pin Change Interrupts PCINT
sbi DDRB, ERROR_LED ; Set LED pin as output
sei ; Enable interrupts
;
; **********************************
; P R O G R A M L O O P
; **********************************
;
Main_Loop:
sleep
rjmp Main_Loop
;
; End of source code
;
; (Add Copyright information here, e.g.
; .db "(C)2020 by <NAME> " ; Source code readable
; .db "C(2)20 0ybG reahdrS hcimtd " ; Machine code format
;
|
programs/oeis/268/A268524.asm | karttu/loda | 0 | 241227 | ; A268524: a(n) = r*a(ceiling(n/2))+s*a(floor(n/2)) with a(1)=1 and (r,s)=(3,1).
; 1,4,13,16,43,52,61,64,145,172,199,208,235,244,253,256,499,580,661,688,769,796,823,832,913,940,967,976,1003,1012,1021,1024,1753,1996,2239,2320,2563,2644,2725,2752,2995,3076,3157,3184,3265,3292,3319,3328,3571,3652,3733,3760,3841,3868,3895
mov $2,$0
add $2,1
lpb $2,1
mov $0,$4
sub $2,1
sub $0,$2
cal $0,267584 ; a(0)=1; thereafter a(n) = 2^(1 + number of zeros in binary expansion of n).
cal $0,83094 ; Numbers k such that Sum_{j=0..k} (binomial(k,j) mod 3) is odd.
mov $3,$0
div $3,12
mul $3,2
add $3,1
add $1,$3
lpe
|
Code/hardware.asm | LeifBloomquist/VICMIDI | 7 | 16119 | ;***************************************************************************
;******************* Hardware Functions *******************************
;***************************************************************************
; ----------------------------------------------------------------------------
; Confirm the presence of the ST16C450 UART
checkuart:
lda #$55
sta UART_SCRATCHPAD
lda UART_SCRATCHPAD
cmp #$55
beq checkuart_ok
; Not found!
PLOT 0,20
PRINTSTRING nouart
uloop:
lda #24
sta screen_colors
lda #26
sta screen_colors
jmp uloop
checkuart_ok:
rts
; ----------------------------------------------------------------------------
; Set up the UART
resetuart:
; Expose the divisor latch.
lda #%10000000
sta UART_LCR
; Set the MIDI baud rate.
; The ST16C450 datasheet says that it divides the input clock rate by
; 16, so with a 2MHz crystal on board, that gives
; 2000000 * (1/16) * (1/x) = 31250. Solving gives x=4 for the low
; byte of the divisor, and 0 for the high byte.
ldx #$00
;ldy #$04 ; For 2MHz crystal (Original protype from Francois)
;ldy #$08 ; For 4MHz crystal (Prototype from Brain)
ldy #$25 ; For 18MHz crystal (Pre-production cartridge from Brain)
stx UART_DIVISOR_MSB
sty UART_DIVISOR_LSB
; Set to MIDI: Word length 8, Stop bits 1, no parity (also hides divisor latch)
lda #%00000011
sta UART_LCR
; New for VICMIDI Pre-production cart - select MIDI
lda #$04
sta UART_MCR
; Enable the interrupt when data is received
lda #%00000001
sta UART_IER
rts
; ----------------------------------------------------------------------------
; Set up the IRQ for reading bytes from the UART
setupirq:
sei
; Point to my interrupt vector
lda #<theirq
sta $0314
lda #>theirq
sta $0315
; Disable timer interrupts
lda #%01100000
sta $912e ; disable and acknowledge interrupts
sta $912d
;sta $911e ; disable NMIs (Restore key)
cli
rts
; ----------------------------------------------------------------------------
; The IRQ.
theirq:
; Fetch the received byte
lda UART_RXTX ;get data
ldy write_pointer
sta buffer,y
inc write_pointer
; Clear the interrupt from the UART by reading the status register
lda UART_ISR
jmp $ff56 ; Use this in place of rti because it restores the A,X,Y registers from the stack
;jmp $eabf ; return to normal IRQ (scans keyboard and stuff)
; ----------------------------------------------------------------------------
; Handle the RESTORE key
RESTORE:
jmp $fec7 ; Continue as if no cartridge installed
; ----------------------------------------------------------------------------
; Strings
nouart:
byte 127,127, " uart NOT FOUND! ", 127,127
byte 0
; EOF! |
alloy4fun_models/trashltl/models/10/oPKmwp52rJxKK4nQ6.als | Kaixi26/org.alloytools.alloy | 0 | 3974 | <filename>alloy4fun_models/trashltl/models/10/oPKmwp52rJxKK4nQ6.als
open main
pred idoPKmwp52rJxKK4nQ6_prop11 {
always ((File - Protected) = Protected')
}
pred __repair { idoPKmwp52rJxKK4nQ6_prop11 }
check __repair { idoPKmwp52rJxKK4nQ6_prop11 <=> prop11o } |
_build/dispatcher/jmp_ippsECCPNegativePoint_7c0d7feb.asm | zyktrcn/ippcp | 1 | 244538 | <reponame>zyktrcn/ippcp
extern m7_ippsECCPNegativePoint:function
extern n8_ippsECCPNegativePoint:function
extern y8_ippsECCPNegativePoint:function
extern e9_ippsECCPNegativePoint:function
extern l9_ippsECCPNegativePoint:function
extern n0_ippsECCPNegativePoint:function
extern k0_ippsECCPNegativePoint:function
extern ippcpJumpIndexForMergedLibs
extern ippcpSafeInit:function
segment .data
align 8
dq .Lin_ippsECCPNegativePoint
.Larraddr_ippsECCPNegativePoint:
dq m7_ippsECCPNegativePoint
dq n8_ippsECCPNegativePoint
dq y8_ippsECCPNegativePoint
dq e9_ippsECCPNegativePoint
dq l9_ippsECCPNegativePoint
dq n0_ippsECCPNegativePoint
dq k0_ippsECCPNegativePoint
segment .text
global ippsECCPNegativePoint:function (ippsECCPNegativePoint.LEndippsECCPNegativePoint - ippsECCPNegativePoint)
.Lin_ippsECCPNegativePoint:
db 0xf3, 0x0f, 0x1e, 0xfa
call ippcpSafeInit wrt ..plt
align 16
ippsECCPNegativePoint:
db 0xf3, 0x0f, 0x1e, 0xfa
mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc]
movsxd rax, dword [rax]
lea r11, [rel .Larraddr_ippsECCPNegativePoint]
mov r11, qword [r11+rax*8]
jmp r11
.LEndippsECCPNegativePoint:
|
data/pokemon/evos_attacks_johto.asm | AtmaBuster/pokeplat-gen2 | 6 | 102451 | <filename>data/pokemon/evos_attacks_johto.asm
SECTION "Evolutions and Attacks 2", ROMX
EvosAttacksPointers2::
dw ChikoritaEvosAttacks
dw BayleefEvosAttacks
dw MeganiumEvosAttacks
dw CyndaquilEvosAttacks
dw QuilavaEvosAttacks
dw TyphlosionEvosAttacks
dw TotodileEvosAttacks
dw CroconawEvosAttacks
dw FeraligatrEvosAttacks
dw SentretEvosAttacks
dw FurretEvosAttacks
dw HoothootEvosAttacks
dw NoctowlEvosAttacks
dw LedybaEvosAttacks
dw LedianEvosAttacks
dw SpinarakEvosAttacks
dw AriadosEvosAttacks
dw CrobatEvosAttacks
dw ChinchouEvosAttacks
dw LanturnEvosAttacks
dw PichuEvosAttacks
dw CleffaEvosAttacks
dw IgglybuffEvosAttacks
dw TogepiEvosAttacks
dw TogeticEvosAttacks
dw NatuEvosAttacks
dw XatuEvosAttacks
dw MareepEvosAttacks
dw FlaaffyEvosAttacks
dw AmpharosEvosAttacks
dw BellossomEvosAttacks
dw MarillEvosAttacks
dw AzumarillEvosAttacks
dw SudowoodoEvosAttacks
dw PolitoedEvosAttacks
dw HoppipEvosAttacks
dw SkiploomEvosAttacks
dw JumpluffEvosAttacks
dw AipomEvosAttacks
dw SunkernEvosAttacks
dw SunfloraEvosAttacks
dw YanmaEvosAttacks
dw WooperEvosAttacks
dw QuagsireEvosAttacks
dw EspeonEvosAttacks
dw UmbreonEvosAttacks
dw MurkrowEvosAttacks
dw SlowkingEvosAttacks
dw MisdreavusEvosAttacks
dw UnownEvosAttacks
dw WobbuffetEvosAttacks
dw GirafarigEvosAttacks
dw PinecoEvosAttacks
dw ForretressEvosAttacks
dw DunsparceEvosAttacks
dw GligarEvosAttacks
dw SteelixEvosAttacks
dw SnubbullEvosAttacks
dw GranbullEvosAttacks
dw QwilfishEvosAttacks
dw ScizorEvosAttacks
dw ShuckleEvosAttacks
dw HeracrossEvosAttacks
dw SneaselEvosAttacks
dw TeddiursaEvosAttacks
dw UrsaringEvosAttacks
dw SlugmaEvosAttacks
dw MagcargoEvosAttacks
dw SwinubEvosAttacks
dw PiloswineEvosAttacks
dw CorsolaEvosAttacks
dw RemoraidEvosAttacks
dw OctilleryEvosAttacks
dw DelibirdEvosAttacks
dw MantineEvosAttacks
dw SkarmoryEvosAttacks
dw HoundourEvosAttacks
dw HoundoomEvosAttacks
dw KingdraEvosAttacks
dw PhanpyEvosAttacks
dw DonphanEvosAttacks
dw Porygon2EvosAttacks
dw StantlerEvosAttacks
dw SmeargleEvosAttacks
dw TyrogueEvosAttacks
dw HitmontopEvosAttacks
dw SmoochumEvosAttacks
dw ElekidEvosAttacks
dw MagbyEvosAttacks
dw MiltankEvosAttacks
dw BlisseyEvosAttacks
dw RaikouEvosAttacks
dw EnteiEvosAttacks
dw SuicuneEvosAttacks
dw LarvitarEvosAttacks
dw PupitarEvosAttacks
dw TyranitarEvosAttacks
dw LugiaEvosAttacks
dw HoOhEvosAttacks
dw CelebiEvosAttacks
ChikoritaEvosAttacks:
dbbw EVOLVE_LEVEL, 16, BAYLEEF
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 6, RAZOR_LEAF
dbw 9, POISONPOWDER
dbw 12, SYNTHESIS
dbw 17, REFLECT
dbw 20, MAGICAL_LEAF
dbw 23, NATURAL_GIFT
dbw 28, SWEET_SCENT
dbw 31, LIGHT_SCREEN
dbw 34, BODY_SLAM
dbw 39, SAFEGUARD
dbw 42, AROMATHERAPY
dbw 45, SOLARBEAM
db 0 ; no more level-up moves
BayleefEvosAttacks:
dbbw EVOLVE_LEVEL, 32, MEGANIUM
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, RAZOR_LEAF
dbw 1, POISONPOWDER
dbw 6, RAZOR_LEAF
dbw 9, POISONPOWDER
dbw 12, SYNTHESIS
dbw 18, REFLECT
dbw 22, MAGICAL_LEAF
dbw 26, NATURAL_GIFT
dbw 32, SWEET_SCENT
dbw 36, LIGHT_SCREEN
dbw 40, BODY_SLAM
dbw 46, SAFEGUARD
dbw 50, AROMATHERAPY
dbw 54, SOLARBEAM
db 0 ; no more level-up moves
MeganiumEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, RAZOR_LEAF
dbw 1, POISONPOWDER
dbw 6, RAZOR_LEAF
dbw 9, POISONPOWDER
dbw 12, SYNTHESIS
dbw 18, REFLECT
dbw 22, MAGICAL_LEAF
dbw 26, NATURAL_GIFT
dbw 32, PETAL_DANCE
dbw 34, SWEET_SCENT
dbw 40, LIGHT_SCREEN
dbw 46, BODY_SLAM
dbw 54, SAFEGUARD
dbw 60, AROMATHERAPY
dbw 66, SOLARBEAM
db 0 ; no more level-up moves
CyndaquilEvosAttacks:
dbbw EVOLVE_LEVEL, 14, QUILAVA
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 4, SMOKESCREEN
dbw 10, EMBER
dbw 13, QUICK_ATTACK
dbw 19, FLAME_WHEEL
dbw 22, DEFENSE_CURL
dbw 28, SWIFT
dbw 31, LAVA_PLUME
dbw 37, FLAMETHROWER
dbw 40, ROLLOUT
dbw 46, DOUBLE_EDGE
dbw 49, ERUPTION
db 0 ; no more level-up moves
QuilavaEvosAttacks:
dbbw EVOLVE_LEVEL, 36, TYPHLOSION
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 1, SMOKESCREEN
dbw 4, SMOKESCREEN
dbw 10, EMBER
dbw 13, QUICK_ATTACK
dbw 20, FLAME_WHEEL
dbw 24, DEFENSE_CURL
dbw 31, SWIFT
dbw 35, LAVA_PLUME
dbw 42, FLAMETHROWER
dbw 46, ROLLOUT
dbw 53, DOUBLE_EDGE
dbw 57, ERUPTION
db 0 ; no more level-up moves
TyphlosionEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, LEER
dbw 1, EMBER
dbw 1, SMOKESCREEN
dbw 1, GYRO_BALL
dbw 4, SMOKESCREEN
dbw 10, EMBER
dbw 13, QUICK_ATTACK
dbw 20, FLAME_WHEEL
dbw 24, DEFENSE_CURL
dbw 31, SWIFT
dbw 35, LAVA_PLUME
dbw 42, FLAMETHROWER
dbw 46, ROLLOUT
dbw 53, DOUBLE_EDGE
dbw 57, ERUPTION
db 0 ; no more level-up moves
TotodileEvosAttacks:
dbbw EVOLVE_LEVEL, 18, CROCONAW
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 6, WATER_GUN
dbw 8, RAGE
dbw 13, BITE
dbw 15, SCARY_FACE
dbw 20, ICE_FANG
dbw 22, FLAIL
dbw 27, CRUNCH
dbw 29, SLASH
dbw 34, SCREECH
dbw 36, THRASH
dbw 41, AQUA_TAIL
dbw 43, SUPERPOWER
dbw 48, HYDRO_PUMP
db 0 ; no more level-up moves
CroconawEvosAttacks:
dbbw EVOLVE_LEVEL, 30, FERALIGATR
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, WATER_GUN
dbw 6, WATER_GUN
dbw 8, RAGE
dbw 13, BITE
dbw 15, SCARY_FACE
dbw 21, ICE_FANG
dbw 24, FLAIL
dbw 30, CRUNCH
dbw 33, SLASH
dbw 39, SCREECH
dbw 42, THRASH
dbw 48, AQUA_TAIL
dbw 51, SUPERPOWER
dbw 57, HYDRO_PUMP
db 0 ; no more level-up moves
FeraligatrEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, WATER_GUN
dbw 1, RAGE
dbw 6, WATER_GUN
dbw 8, RAGE
dbw 13, BITE
dbw 15, SCARY_FACE
dbw 21, ICE_FANG
dbw 24, FLAIL
dbw 30, AGILITY
dbw 32, CRUNCH
dbw 37, SLASH
dbw 45, SCREECH
dbw 50, THRASH
dbw 58, AQUA_TAIL
dbw 63, SUPERPOWER
dbw 71, HYDRO_PUMP
db 0 ; no more level-up moves
SentretEvosAttacks:
dbbw EVOLVE_LEVEL, 15, FURRET
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, FORESIGHT
dbw 4, DEFENSE_CURL
dbw 7, QUICK_ATTACK
dbw 13, FURY_SWIPES
dbw 16, HELPING_HAND
dbw 19, FOLLOW_ME
dbw 25, SLAM
dbw 28, REST
dbw 31, SUCKER_PUNCH
dbw 36, AMNESIA
dbw 39, BATON_PASS
dbw 42, ME_FIRST
dbw 47, HYPER_VOICE
db 0 ; no more level-up moves
FurretEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, QUICK_ATTACK
dbw 1, DEFENSE_CURL
dbw 1, FORESIGHT
dbw 4, DEFENSE_CURL
dbw 7, QUICK_ATTACK
dbw 13, FURY_SWIPES
dbw 17, HELPING_HAND
dbw 21, FOLLOW_ME
dbw 28, SLAM
dbw 32, REST
dbw 36, SUCKER_PUNCH
dbw 42, AMNESIA
dbw 46, BATON_PASS
dbw 50, ME_FIRST
dbw 56, HYPER_VOICE
db 0 ; no more level-up moves
HoothootEvosAttacks:
dbbw EVOLVE_LEVEL, 20, NOCTOWL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, FORESIGHT
dbw 5, HYPNOSIS
dbw 9, PECK
dbw 13, UPROAR
dbw 17, REFLECT
dbw 21, CONFUSION
dbw 25, TAKE_DOWN
dbw 29, AIR_SLASH
dbw 33, ZEN_HEADBUTT
dbw 37, EXTRASENSORY
dbw 41, PSYCHO_SHIFT
dbw 45, ROOST
dbw 49, DREAM_EATER
db 0 ; no more level-up moves
NoctowlEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, HYPNOSIS
dbw 1, SKY_ATTACK
dbw 1, FORESIGHT
dbw 5, HYPNOSIS
dbw 9, PECK
dbw 13, UPROAR
dbw 17, REFLECT
dbw 22, CONFUSION
dbw 27, TAKE_DOWN
dbw 32, AIR_SLASH
dbw 37, ZEN_HEADBUTT
dbw 42, EXTRASENSORY
dbw 47, PSYCHO_SHIFT
dbw 52, ROOST
dbw 57, DREAM_EATER
db 0 ; no more level-up moves
LedybaEvosAttacks:
dbbw EVOLVE_LEVEL, 18, LEDIAN
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 6, SUPERSONIC
dbw 9, COMET_PUNCH
dbw 14, LIGHT_SCREEN
dbw 14, REFLECT
dbw 14, SAFEGUARD
dbw 17, MACH_PUNCH
dbw 22, BATON_PASS
dbw 25, SILVER_WIND
dbw 30, AGILITY
dbw 33, SWIFT
dbw 38, DOUBLE_EDGE
dbw 41, BUG_BUZZ
db 0 ; no more level-up moves
LedianEvosAttacks:
db 0 ; no more evolutions
dbw 1, COMET_PUNCH
dbw 1, TACKLE
dbw 1, SUPERSONIC
dbw 6, SUPERSONIC
dbw 9, COMET_PUNCH
dbw 14, LIGHT_SCREEN
dbw 14, REFLECT
dbw 14, SAFEGUARD
dbw 17, MACH_PUNCH
dbw 24, BATON_PASS
dbw 29, SILVER_WIND
dbw 36, AGILITY
dbw 41, SWIFT
dbw 48, DOUBLE_EDGE
dbw 53, BUG_BUZZ
db 0 ; no more level-up moves
SpinarakEvosAttacks:
dbbw EVOLVE_LEVEL, 22, ARIADOS
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 1, STRING_SHOT
dbw 5, SCARY_FACE
dbw 8, CONSTRICT
dbw 12, LEECH_LIFE
dbw 15, NIGHT_SHADE
dbw 19, SHADOW_SNEAK
dbw 22, FURY_SWIPES
dbw 26, SUCKER_PUNCH
dbw 29, SPIDER_WEB
dbw 33, AGILITY
dbw 36, PIN_MISSILE
dbw 40, PSYCHIC_M
dbw 43, POISON_JAB
db 0 ; no more level-up moves
AriadosEvosAttacks:
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 1, STRING_SHOT
dbw 1, CONSTRICT
dbw 1, SCARY_FACE
dbw 1, BUG_BITE
dbw 5, SCARY_FACE
dbw 8, CONSTRICT
dbw 12, LEECH_LIFE
dbw 15, NIGHT_SHADE
dbw 19, SHADOW_SNEAK
dbw 23, FURY_SWIPES
dbw 28, SUCKER_PUNCH
dbw 32, SPIDER_WEB
dbw 37, AGILITY
dbw 41, PIN_MISSILE
dbw 46, PSYCHIC_M
dbw 50, POISON_JAB
db 0 ; no more level-up moves
CrobatEvosAttacks:
db 0 ; no more evolutions
dbw 1, SUPERSONIC
dbw 1, SCREECH
dbw 1, LEECH_LIFE
dbw 1, ASTONISH
dbw 1, CROSS_POISON
dbw 5, SUPERSONIC
dbw 9, ASTONISH
dbw 13, BITE
dbw 17, WING_ATTACK
dbw 21, CONFUSE_RAY
dbw 27, AIR_CUTTER
dbw 33, MEAN_LOOK
dbw 39, POISON_FANG
dbw 45, HAZE
dbw 51, AIR_SLASH
db 0 ; no more level-up moves
ChinchouEvosAttacks:
dbbw EVOLVE_LEVEL, 27, LANTURN
db 0 ; no more evolutions
dbw 1, SUPERSONIC
dbw 1, BUBBLE
dbw 6, THUNDER_WAVE
dbw 9, FLAIL
dbw 12, WATER_GUN
dbw 17, CONFUSE_RAY
dbw 20, SPARK
dbw 23, TAKE_DOWN
dbw 28, BUBBLEBEAM
dbw 31, SIGNAL_BEAM
dbw 34, DISCHARGE
dbw 39, AQUA_RING
dbw 42, HYDRO_PUMP
dbw 45, CHARGE
db 0 ; no more level-up moves
LanturnEvosAttacks:
db 0 ; no more evolutions
dbw 1, SUPERSONIC
dbw 1, THUNDER_WAVE
dbw 1, BUBBLE
dbw 6, THUNDER_WAVE
dbw 9, FLAIL
dbw 12, WATER_GUN
dbw 17, CONFUSE_RAY
dbw 20, SPARK
dbw 23, TAKE_DOWN
dbw 27, STOCKPILE
dbw 27, SPIT_UP
dbw 27, SWALLOW
dbw 30, BUBBLEBEAM
dbw 35, SIGNAL_BEAM
dbw 40, DISCHARGE
dbw 47, AQUA_RING
dbw 52, HYDRO_PUMP
dbw 57, CHARGE
db 0 ; no more level-up moves
PichuEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, PIKACHU
db 0 ; no more evolutions
dbw 1, THUNDERSHOCK
dbw 1, CHARM
dbw 5, TAIL_WHIP
dbw 10, THUNDER_WAVE
dbw 13, SWEET_KISS
dbw 18, NASTY_PLOT
db 0 ; no more level-up moves
CleffaEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, CLEFAIRY
db 0 ; no more evolutions
dbw 1, POUND
dbw 1, CHARM
dbw 4, ENCORE
dbw 7, SING
dbw 10, SWEET_KISS
dbw 13, COPYCAT
dbw 16, MAGICAL_LEAF
db 0 ; no more level-up moves
IgglybuffEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, JIGGLYPUFF
db 0 ; no more evolutions
dbw 1, SING
dbw 1, CHARM
dbw 5, DEFENSE_CURL
dbw 9, POUND
dbw 13, SWEET_KISS
dbw 17, COPYCAT
db 0 ; no more level-up moves
TogepiEvosAttacks:
dbbw EVOLVE_HAPPINESS, TR_ANYTIME, TOGETIC
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, CHARM
dbw 6, METRONOME
dbw 10, SWEET_KISS
dbw 15, YAWN
dbw 19, ENCORE
dbw 24, FOLLOW_ME
dbw 28, WISH
dbw 33, ANCIENTPOWER
dbw 37, SAFEGUARD
dbw 42, BATON_PASS
dbw 46, DOUBLE_EDGE
dbw 51, LAST_RESORT
db 0 ; no more level-up moves
TogeticEvosAttacks:
dbbw EVOLVE_ITEM, SHINY_STONE, TOGEKISS
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, METRONOME
dbw 1, SWEET_KISS
dbw 1, CHARM
dbw 1, MAGICAL_LEAF
dbw 6, METRONOME
dbw 10, SWEET_KISS
dbw 15, YAWN
dbw 19, ENCORE
dbw 24, FOLLOW_ME
dbw 28, WISH
dbw 33, ANCIENTPOWER
dbw 37, SAFEGUARD
dbw 42, BATON_PASS
dbw 46, DOUBLE_EDGE
dbw 51, LAST_RESORT
db 0 ; no more level-up moves
NatuEvosAttacks:
dbbw EVOLVE_LEVEL, 15, KATU
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, PECK
dbw 6, NIGHT_SHADE
dbw 9, TELEPORT
dbw 12, LUCKY_CHANT
dbw 17, MIRACLE_EYE
dbw 20, ME_FIRST
dbw 23, CONFUSE_RAY
dbw 28, WISH
dbw 33, PSYCHO_SHIFT
dbw 36, FUTURE_SIGHT
dbw 39, OMINOUS_WIND
dbw 44, POWER_SWAP
dbw 44, GUARD_SWAP
dbw 47, PSYCHIC_M
db 0 ; no more level-up moves
XatuEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, PECK
dbw 6, NIGHT_SHADE
dbw 9, TELEPORT
dbw 12, LUCKY_CHANT
dbw 17, MIRACLE_EYE
dbw 20, ME_FIRST
dbw 23, CONFUSE_RAY
dbw 27, TAILWIND
dbw 30, WISH
dbw 37, PSYCHO_SHIFT
dbw 42, FUTURE_SIGHT
dbw 47, OMINOUS_WIND
dbw 54, POWER_SWAP
dbw 54, GUARD_SWAP
dbw 59, PSYCHIC_M
db 0 ; no more level-up moves
MareepEvosAttacks:
dbbw EVOLVE_LEVEL, 15, FLAAFFY
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 5, GROWL
dbw 10, THUNDERSHOCK
dbw 14, THUNDER_WAVE
dbw 19, COTTON_SPORE
dbw 23, CHARGE
dbw 28, DISCHARGE
dbw 32, SIGNAL_BEAM
dbw 37, LIGHT_SCREEN
dbw 41, POWER_GEM
dbw 46, THUNDER
db 0 ; no more level-up moves
FlaaffyEvosAttacks:
dbbw EVOLVE_LEVEL, 30, AMPHAROS
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, THUNDERSHOCK
dbw 5, GROWL
dbw 10, THUNDERSHOCK
dbw 14, THUNDER_WAVE
dbw 20, COTTON_SPORE
dbw 25, CHARGE
dbw 31, DISCHARGE
dbw 36, SIGNAL_BEAM
dbw 42, LIGHT_SCREEN
dbw 47, POWER_GEM
dbw 53, THUNDER
db 0 ; no more level-up moves
AmpharosEvosAttacks:
db 0 ; no more evolutions
dbw 1, FIRE_PUNCH
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, THUNDERSHOCK
dbw 1, THUNDER_WAVE
dbw 5, GROWL
dbw 10, THUNDERSHOCK
dbw 14, THUNDER_WAVE
dbw 20, COTTON_SPORE
dbw 25, CHARGE
dbw 30, THUNDERPUNCH
dbw 34, DISCHARGE
dbw 42, SIGNAL_BEAM
dbw 51, LIGHT_SCREEN
dbw 59, POWER_GEM
dbw 68, THUNDER
db 0 ; no more level-up moves
BellossomEvosAttacks:
db 0 ; no more evolutions
dbw 1, MEGA_DRAIN
dbw 1, STUN_SPORE
dbw 1, SWEET_SCENT
dbw 1, SUNNY_DAY
dbw 1, LEAF_BLADE
dbw 23, MAGICAL_LEAF
dbw 53, LEAF_STORM
db 0 ; no more level-up moves
MarillEvosAttacks:
dbbw EVOLVE_LEVEL, 18, AZUMARILL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 2, DEFENSE_CURL
dbw 7, TAIL_WHIP
dbw 10, WATER_GUN
dbw 15, ROLLOUT
dbw 18, BUBBLEBEAM
dbw 23, AQUA_RING
dbw 27, DOUBLE_EDGE
dbw 32, RAIN_DANCE
dbw 37, AQUA_TAIL
dbw 42, HYDRO_PUMP
db 0 ; no more level-up moves
AzumarillEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, WATER_GUN
dbw 1, DEFENSE_CURL
dbw 2, DEFENSE_CURL
dbw 7, TAIL_WHIP
dbw 10, WATER_GUN
dbw 15, ROLLOUT
dbw 20, BUBBLEBEAM
dbw 27, AQUA_RING
dbw 33, DOUBLE_EDGE
dbw 40, RAIN_DANCE
dbw 47, AQUA_TAIL
dbw 54, HYDRO_PUMP
db 0 ; no more level-up moves
SudowoodoEvosAttacks:
db 0 ; no more evolutions
dbw 1, LOW_KICK
dbw 1, ROCK_THROW
dbw 1, FLAIL
dbw 1, COPYCAT
dbw 1, WOOD_HAMMER
dbw 6, FLAIL
dbw 9, LOW_KICK
dbw 14, ROCK_THROW
dbw 17, MIMIC
dbw 22, BLOCK
dbw 25, FAINT_ATTACK
dbw 30, ROCK_TOMB
dbw 33, ROCK_SLIDE
dbw 38, SLAM
dbw 41, SUCKER_PUNCH
dbw 46, DOUBLE_EDGE
dbw 49, HAMMER_ARM
db 0 ; no more level-up moves
PolitoedEvosAttacks:
db 0 ; no more evolutions
dbw 1, DOUBLESLAP
dbw 1, BUBBLEBEAM
dbw 1, HYPNOSIS
dbw 1, PERISH_SONG
dbw 27, SWAGGER
dbw 37, BOUNCE
dbw 48, HYPER_VOICE
db 0 ; no more level-up moves
HoppipEvosAttacks:
dbbw EVOLVE_LEVEL, 18, SKIPLOOM
db 0 ; no more evolutions
dbw 1, SPLASH
dbw 4, SYNTHESIS
dbw 7, TAIL_WHIP
dbw 10, TACKLE
dbw 12, POISONPOWDER
dbw 14, STUN_SPORE
dbw 16, SLEEP_POWDER
dbw 19, BULLET_SEED
dbw 22, LEECH_SEED
dbw 25, MEGA_DRAIN
dbw 28, COTTON_SPORE
dbw 31, U_TURN
dbw 34, WORRY_SEED
dbw 37, GIGA_DRAIN
dbw 40, BOUNCE
dbw 43, MEMENTO
db 0 ; no more level-up moves
SkiploomEvosAttacks:
dbbw EVOLVE_LEVEL, 27, JUMPLUFF
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, SPLASH
dbw 1, SYNTHESIS
dbw 4, SYNTHESIS
dbw 7, TAIL_WHIP
dbw 10, TACKLE
dbw 12, POISONPOWDER
dbw 14, STUN_SPORE
dbw 16, SLEEP_POWDER
dbw 20, BULLET_SEED
dbw 24, LEECH_SEED
dbw 28, MEGA_DRAIN
dbw 32, COTTON_SPORE
dbw 36, U_TURN
dbw 40, WORRY_SEED
dbw 44, GIGA_DRAIN
dbw 48, BOUNCE
dbw 52, MEMENTO
db 0 ; no more level-up moves
JumpluffEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, SPLASH
dbw 1, SYNTHESIS
dbw 4, SYNTHESIS
dbw 7, TAIL_WHIP
dbw 10, TACKLE
dbw 12, POISONPOWDER
dbw 14, STUN_SPORE
dbw 16, SLEEP_POWDER
dbw 20, BULLET_SEED
dbw 24, LEECH_SEED
dbw 28, MEGA_DRAIN
dbw 32, COTTON_SPORE
dbw 36, U_TURN
dbw 40, WORRY_SEED
dbw 44, GIGA_DRAIN
dbw 48, BOUNCE
dbw 52, MEMENTO
db 0 ; no more level-up moves
AipomEvosAttacks:
dbbww EVOLVE_LEVEL_WITH_MOVE, 1, DOUBLE_HIT, AMBIPOM
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, TAIL_WHIP
dbw 4, SAND_ATTACK
dbw 8, ASTONISH
dbw 11, BATON_PASS
dbw 15, TICKLE
dbw 18, FURY_SWIPES
dbw 22, SWIFT
dbw 25, SCREECH
dbw 29, AGILITY
dbw 32, DOUBLE_HIT
dbw 36, FLING
dbw 39, NASTY_PLOT
dbw 43, LAST_RESORT
db 0 ; no more level-up moves
SunkernEvosAttacks:
dbbw EVOLVE_ITEM, SUN_STONE, SUNFLORA
db 0 ; no more evolutions
dbw 1, ABSORB
dbw 1, GROWTH
dbw 5, MEGA_DRAIN
dbw 9, INGRAIN
dbw 13, GRASSWHISTLE
dbw 17, LEECH_SEED
dbw 21, ENDEAVOR
dbw 25, WORRY_SEED
dbw 29, RAZOR_LEAF
dbw 33, SYNTHESIS
dbw 37, SUNNY_DAY
dbw 41, GIGA_DRAIN
dbw 45, SEED_BOMB
db 0 ; no more level-up moves
SunfloraEvosAttacks:
db 0 ; no more evolutions
dbw 1, POUND
dbw 1, ABSORB
dbw 1, GROWTH
dbw 5, MEGA_DRAIN
dbw 9, INGRAIN
dbw 13, GRASSWHISTLE
dbw 17, LEECH_SEED
dbw 21, BULLET_SEED
dbw 25, WORRY_SEED
dbw 29, RAZOR_LEAF
dbw 33, PETAL_DANCE
dbw 37, SUNNY_DAY
dbw 41, SOLARBEAM
dbw 43, LEAF_STORM
db 0 ; no more level-up moves
YanmaEvosAttacks:
dbbww EVOLVE_LEVEL_WITH_MOVE, 1, ANCIENTPOWER, YANMEGA
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, FORESIGHT
dbw 6, QUICK_ATTACK
dbw 11, DOUBLE_TEAM
dbw 14, SONICBOOM
dbw 17, DETECT
dbw 22, SUPERSONIC
dbw 27, UPROAR
dbw 30, PURSUIT
dbw 33, ANCIENTPOWER
dbw 38, HYPNOSIS
dbw 43, WING_ATTACK
dbw 46, SCREECH
dbw 49, U_TURN
dbw 54, AIR_SLASH
dbw 57, BUG_BUZZ
db 0 ; no more level-up moves
WooperEvosAttacks:
dbbw EVOLVE_LEVEL, 20, QUAGSIRE
db 0 ; no more evolutions
dbw 1, TAIL_WHIP
dbw 1, WATER_GUN
dbw 5, MUD_SPORT
dbw 9, MUD_SHOT
dbw 15, SLAM
dbw 19, MUD_BOMB
dbw 23, AMNESIA
dbw 29, YAWN
dbw 33, EARTHQUAKE
dbw 37, RAIN_DANCE
dbw 43, MIST
dbw 43, HAZE
dbw 47, MUDDY_WATER
db 0 ; no more level-up moves
QuagsireEvosAttacks:
db 0 ; no more evolutions
dbw 1, TAIL_WHIP
dbw 1, WATER_GUN
dbw 1, MUD_SPORT
dbw 5, MUD_SPORT
dbw 9, MUD_SHOT
dbw 15, SLAM
dbw 19, MUD_BOMB
dbw 24, AMNESIA
dbw 31, YAWN
dbw 36, EARTHQUAKE
dbw 41, RAIN_DANCE
dbw 48, MIST
dbw 48, HAZE
dbw 53, MUDDY_WATER
db 0 ; no more level-up moves
EspeonEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, HELPING_HAND
dbw 8, SAND_ATTACK
dbw 15, CONFUSION
dbw 22, QUICK_ATTACK
dbw 29, SWIFT
dbw 36, PSYBEAM
dbw 43, FUTURE_SIGHT
dbw 50, LAST_RESORT
dbw 57, PSYCH_UP
dbw 64, PSYCHIC_M
dbw 71, MORNING_SUN
dbw 78, POWER_SWAP
db 0 ; no more level-up moves
UmbreonEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, HELPING_HAND
dbw 8, SAND_ATTACK
dbw 15, PURSUIT
dbw 22, QUICK_ATTACK
dbw 29, CONFUSE_RAY
dbw 36, FAINT_ATTACK
dbw 43, ASSURANCE
dbw 50, LAST_RESORT
dbw 57, MEAN_LOOK
dbw 64, SCREECH
dbw 71, MOONLIGHT
dbw 78, GUARD_SWAP
db 0 ; no more level-up moves
MurkrowEvosAttacks:
dbbw EVOLVE_ITEM, DUSK_STONE, HONCHKROW
db 0 ; no more evolutions
dbw 1, PECK
dbw 1, ASTONISH
dbw 5, PURSUIT
dbw 11, HAZE
dbw 15, WING_ATTACK
dbw 21, NIGHT_SHADE
dbw 25, ASSURANCE
dbw 31, TAUNT
dbw 35, FAINT_ATTACK
dbw 41, MEAN_LOOK
dbw 45, SUCKER_PUNCH
db 0 ; no more level-up moves
SlowkingEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, CURSE
dbw 1, HIDDEN_POWER
dbw 1, YAWN
dbw 1, POWER_GEM
dbw 6, GROWL
dbw 11, WATER_GUN
dbw 15, CONFUSION
dbw 20, DISABLE
dbw 25, HEADBUTT
dbw 29, WATER_PULSE
dbw 34, ZEN_HEADBUTT
dbw 39, NASTY_PLOT
dbw 43, SWAGGER
dbw 48, PSYCHIC_M
dbw 53, TRUMP_CARD
dbw 57, PSYCH_UP
db 0 ; no more level-up moves
MisdreavusEvosAttacks:
dbbw EVOLVE_ITEM, DUSK_STONE, MISMAGIUS
db 0 ; no more evolutions
dbw 1, GROWL
dbw 1, PSYWAVE
dbw 5, SPITE
dbw 10, ASTONISH
dbw 14, CONFUSE_RAY
dbw 19, MEAN_LOOK
dbw 23, PSYBEAM
dbw 28, PAIN_SPLIT
dbw 32, PAYBACK
dbw 37, SHADOW_BALL
dbw 41, PERISH_SONG
dbw 46, GRUDGE
dbw 50, POWER_GEM
db 0 ; no more level-up moves
UnownEvosAttacks:
db 0 ; no more evolutions
dbw 1, HIDDEN_POWER
db 0 ; no more level-up moves
WobbuffetEvosAttacks:
db 0 ; no more evolutions
dbw 1, COUNTER
dbw 1, DESTINY_BOND
dbw 1, SAFEGUARD
dbw 1, MIRROR_COAT
db 0 ; no more level-up moves
GirafarigEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, CONFUSION
dbw 1, ASTONISH
dbw 1, POWER_SWAP
dbw 1, GUARD_SWAP
dbw 5, ODOR_SLEUTH
dbw 10, STOMP
dbw 14, AGILITY
dbw 19, PSYBEAM
dbw 23, BATON_PASS
dbw 28, ASSURANCE
dbw 32, DOUBLE_HIT
dbw 37, PSYCHIC_M
dbw 41, ZEN_HEADBUTT
dbw 46, CRUNCH
db 0 ; no more level-up moves
PinecoEvosAttacks:
dbbw EVOLVE_LEVEL, 31, FORRETRESS
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, PROTECT
dbw 6, SELFDESTRUCT
dbw 9, BUG_BITE
dbw 12, TAKE_DOWN
dbw 17, RAPID_SPIN
dbw 20, BIDE
dbw 23, NATURAL_GIFT
dbw 28, SPIKES
dbw 31, PAYBACK
dbw 34, EXPLOSION
dbw 39, IRON_DEFENSE
dbw 42, GYRO_BALL
dbw 45, DOUBLE_EDGE
db 0 ; no more level-up moves
ForretressEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SELFDESTRUCT
dbw 1, PROTECT
dbw 1, TOXIC_SPIKES
dbw 1, BUG_BITE
dbw 6, SELFDESTRUCT
dbw 9, BUG_BITE
dbw 12, TAKE_DOWN
dbw 17, RAPID_SPIN
dbw 20, BIDE
dbw 23, NATURAL_GIFT
dbw 28, SPIKES
dbw 31, MIRROR_SHOT
dbw 33, PAYBACK
dbw 38, EXPLOSION
dbw 45, IRON_DEFENSE
dbw 50, GYRO_BALL
dbw 55, DOUBLE_EDGE
dbw 62, MAGNET_RISE
dbw 67, ZAP_CANNON
db 0 ; no more level-up moves
DunsparceEvosAttacks:
db 0 ; no more evolutions
dbw 1, RAGE
dbw 5, DEFENSE_CURL
dbw 9, YAWN
dbw 13, GLARE
dbw 17, ROLLOUT
dbw 21, SPITE
dbw 25, PURSUIT
dbw 29, SCREECH
dbw 33, ROOST
dbw 37, TAKE_DOWN
dbw 41, ANCIENTPOWER
dbw 45, DIG
dbw 49, ENDEAVOR
dbw 53, FLAIL
db 0 ; no more level-up moves
GligarEvosAttacks:
dbbbw EVOLVE_LEVEL_WITH_ITEM_NIGHT, 1, RAZOR_FANG, GLISCOR
db 0 ; no more evolutions
dbw 1, POISON_STING
dbw 5, SAND_ATTACK
dbw 9, HARDEN
dbw 12, KNOCK_OFF
dbw 16, QUICK_ATTACK
dbw 20, FURY_CUTTER
dbw 23, FAINT_ATTACK
dbw 27, SCREECH
dbw 31, SLASH
dbw 34, SWORDS_DANCE
dbw 38, U_TURN
dbw 42, X_SCISSOR
dbw 45, GUILLOTINE
db 0 ; no more level-up moves
SteelixEvosAttacks:
db 0 ; no more evolutions
dbw 1, BIND
dbw 1, TACKLE
dbw 1, HARDEN
dbw 1, MUD_SPORT
dbw 1, THUNDER_FANG
dbw 1, ICE_FANG
dbw 1, FIRE_FANG
dbw 6, SCREECH
dbw 9, ROCK_THROW
dbw 14, RAGE
dbw 17, ROCK_TOMB
dbw 22, SANDSTORM
dbw 25, SLAM
dbw 30, ROCK_POLISH
dbw 33, DRAGONBREATH
dbw 38, CURSE
dbw 41, IRON_TAIL
dbw 46, CRUNCH
dbw 49, DOUBLE_EDGE
dbw 54, STONE_EDGE
db 0 ; no more level-up moves
SnubbullEvosAttacks:
dbbw EVOLVE_LEVEL, 23, GRANBULL
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, SCARY_FACE
dbw 1, CHARM
dbw 1, THUNDER_FANG
dbw 1, ICE_FANG
dbw 1, FIRE_FANG
dbw 7, BITE
dbw 13, LICK
dbw 19, HEADBUTT
dbw 25, ROAR
dbw 31, RAGE
dbw 37, TAKE_DOWN
dbw 43, PAYBACK
dbw 49, CRUNCH
db 0 ; no more level-up moves
GranbullEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, TAIL_WHIP
dbw 1, SCARY_FACE
dbw 1, CHARM
dbw 1, THUNDER_FANG
dbw 1, ICE_FANG
dbw 1, FIRE_FANG
dbw 7, BITE
dbw 13, LICK
dbw 19, HEADBUTT
dbw 27, ROAR
dbw 35, RAGE
dbw 43, TAKE_DOWN
dbw 51, PAYBACK
dbw 59, CRUNCH
db 0 ; no more level-up moves
QwilfishEvosAttacks:
dbbw EVOLVE_LEVEL, 30, NUMBPUFF
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, POISON_STING
dbw 1, SPIKES
dbw 9, HARDEN
dbw 9, MINIMIZE
dbw 13, WATER_GUN
dbw 17, ROLLOUT
dbw 21, TOXIC_SPIKES
dbw 25, STOCKPILE
dbw 25, SPIT_UP
dbw 29, REVENGE
dbw 33, BRINE
dbw 37, PIN_MISSILE
dbw 41, TAKE_DOWN
dbw 45, AQUA_TAIL
dbw 49, POISON_JAB
dbw 53, DESTINY_BOND
dbw 57, HYDRO_PUMP
db 0 ; no more level-up moves
ScizorEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, QUICK_ATTACK
dbw 1, BULLET_PUNCH
dbw 5, FOCUS_ENERGY
dbw 9, PURSUIT
dbw 13, FALSE_SWIPE
dbw 17, AGILITY
dbw 21, METAL_CLAW
dbw 25, FURY_CUTTER
dbw 29, SLASH
dbw 33, RAZOR_WIND
dbw 37, IRON_DEFENSE
dbw 41, X_SCISSOR
dbw 45, NIGHT_SLASH
dbw 49, DOUBLE_HIT
dbw 53, IRON_HEAD
dbw 57, SWORDS_DANCE
dbw 61, FEINT
db 0 ; no more level-up moves
ShuckleEvosAttacks:
db 0 ; no more evolutions
dbw 1, WITHDRAW
dbw 1, BIDE
dbw 1, CONSTRICT
dbw 9, ENCORE
dbw 14, SAFEGUARD
dbw 22, WRAP
dbw 27, REST
dbw 35, GASTRO_ACID
dbw 40, BUG_BITE
dbw 48, POWER_TRICK
db 0 ; no more level-up moves
HeracrossEvosAttacks:
db 0 ; no more evolutions
dbw 1, HORN_ATTACK
dbw 1, TACKLE
dbw 1, LEER
dbw 1, ENDURE
dbw 1, NIGHT_SLASH
dbw 7, FURY_ATTACK
dbw 13, AERIAL_ACE
dbw 19, BRICK_BREAK
dbw 25, COUNTER
dbw 31, TAKE_DOWN
dbw 37, CLOSE_COMBAT
dbw 43, REVERSAL
dbw 49, FEINT
dbw 55, MEGAHORN
db 0 ; no more level-up moves
SneaselEvosAttacks:
dbbbw EVOLVE_LEVEL_WITH_ITEM_NIGHT, 1, RAZOR_CLAW, WEAVILE
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, TAUNT
dbw 8, QUICK_ATTACK
dbw 10, SCREECH
dbw 14, FAINT_ATTACK
dbw 21, FURY_SWIPES
dbw 24, AGILITY
dbw 28, ICY_WIND
dbw 35, SLASH
dbw 38, BEAT_UP
dbw 42, METAL_CLAW
dbw 49, ICE_SHARD
db 0 ; no more level-up moves
TeddiursaEvosAttacks:
dbbw EVOLVE_LEVEL, 30, URSARING
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, LICK
dbw 1, FAKE_TEARS
dbw 1, COVET
dbw 8, FURY_SWIPES
dbw 15, FAINT_ATTACK
dbw 22, SWEET_SCENT
dbw 29, SLASH
dbw 36, CHARM
dbw 43, REST
dbw 43, SNORE
dbw 50, THRASH
dbw 57, FLING
db 0 ; no more level-up moves
UrsaringEvosAttacks:
db 0 ; no more evolutions
dbw 1, SCRATCH
dbw 1, LEER
dbw 1, LICK
dbw 1, FAKE_TEARS
dbw 1, COVET
dbw 8, FURY_SWIPES
dbw 15, FAINT_ATTACK
dbw 22, SWEET_SCENT
dbw 29, SLASH
dbw 38, SCARY_FACE
dbw 47, REST
dbw 49, SNORE
dbw 58, THRASH
dbw 67, HAMMER_ARM
db 0 ; no more level-up moves
SlugmaEvosAttacks:
dbbw EVOLVE_LEVEL, 38, MAGCARGO
db 0 ; no more evolutions
dbw 1, SMOG
dbw 1, YAWN
dbw 8, EMBER
dbw 11, ROCK_THROW
dbw 16, HARDEN
dbw 23, RECOVER
dbw 26, ANCIENTPOWER
dbw 31, AMNESIA
dbw 38, LAVA_PLUME
dbw 41, ROCK_SLIDE
dbw 46, BODY_SLAM
dbw 53, FLAMETHROWER
dbw 56, EARTH_POWER
db 0 ; no more level-up moves
MagcargoEvosAttacks:
db 0 ; no more evolutions
dbw 1, EMBER
dbw 1, ROCK_THROW
dbw 1, SMOG
dbw 1, YAWN
dbw 8, EMBER
dbw 11, ROCK_THROW
dbw 16, HARDEN
dbw 23, RECOVER
dbw 26, ANCIENTPOWER
dbw 31, AMNESIA
dbw 40, LAVA_PLUME
dbw 45, ROCK_SLIDE
dbw 52, BODY_SLAM
dbw 61, FLAMETHROWER
dbw 66, EARTH_POWER
db 0 ; no more level-up moves
SwinubEvosAttacks:
dbbw EVOLVE_LEVEL, 33, PILOSWINE
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, ODOR_SLEUTH
dbw 4, MUD_SPORT
dbw 8, POWDER_SNOW
dbw 13, MUD_SLAP
dbw 16, ENDURE
dbw 20, MUD_BOMB
dbw 25, ICY_WIND
dbw 28, ICE_SHARD
dbw 32, TAKE_DOWN
dbw 37, EARTHQUAKE
dbw 40, MIST
dbw 44, BLIZZARD
dbw 49, AMNESIA
db 0 ; no more level-up moves
PiloswineEvosAttacks:
dbbww EVOLVE_LEVEL_WITH_MOVE, 1, ANCIENTPOWER, MAMOSWINE
db 0 ; no more evolutions
dbw 1, PECK
dbw 1, POWDER_SNOW
dbw 1, ANCIENTPOWER
dbw 1, MUD_SPORT
dbw 1, ODOR_SLEUTH
dbw 4, MUD_SPORT
dbw 8, POWDER_SNOW
dbw 13, MUD_SLAP
dbw 16, ENDURE
dbw 20, MUD_BOMB
dbw 25, ICY_WIND
dbw 28, ICE_FANG
dbw 32, TAKE_DOWN
dbw 33, FURY_ATTACK
dbw 40, EARTHQUAKE
dbw 48, MIST
dbw 56, BLIZZARD
dbw 65, AMNESIA
db 0 ; no more level-up moves
CorsolaEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 4, HARDEN
dbw 8, BUBBLE
dbw 13, RECOVER
dbw 16, REFRESH
dbw 20, ROCK_BLAST
dbw 25, BUBBLEBEAM
dbw 28, LUCKY_CHANT
dbw 32, ANCIENTPOWER
dbw 37, AQUA_RING
dbw 40, SPIKE_CANNON
dbw 44, POWER_GEM
dbw 48, MIRROR_COAT
dbw 53, EARTH_POWER
db 0 ; no more level-up moves
RemoraidEvosAttacks:
dbbw EVOLVE_LEVEL, 25, OCTILLERY
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 6, LOCK_ON
dbw 10, PSYBEAM
dbw 14, AURORA_BEAM
dbw 19, BUBBLEBEAM
dbw 23, FOCUS_ENERGY
dbw 27, BULLET_SEED
dbw 32, WATER_PULSE
dbw 36, SIGNAL_BEAM
dbw 40, ICE_BEAM
dbw 45, HYPER_BEAM
db 0 ; no more level-up moves
OctilleryEvosAttacks:
db 0 ; no more evolutions
dbw 1, WATER_GUN
dbw 1, PSYBEAM
dbw 1, AURORA_BEAM
dbw 1, CONSTRICT
dbw 1, ROCK_BLAST
dbw 1, GUNK_SHOT
dbw 6, CONSTRICT
dbw 10, PSYBEAM
dbw 14, AURORA_BEAM
dbw 19, BUBBLEBEAM
dbw 23, FOCUS_ENERGY
dbw 25, OCTAZOOKA
dbw 29, BULLET_SEED
dbw 36, WRING_OUT
dbw 42, SIGNAL_BEAM
dbw 48, ICE_BEAM
dbw 55, HYPER_BEAM
db 0 ; no more level-up moves
DelibirdEvosAttacks:
db 0 ; no more evolutions
dbw 1, PRESENT
db 0 ; no more level-up moves
MantineEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, SUPERSONIC
dbw 1, PSYBEAM
dbw 1, BUBBLEBEAM
dbw 1, BUBBLE
dbw 1, SIGNAL_BEAM
dbw 1, BULLET_SEED
dbw 4, SUPERSONIC
dbw 10, BUBBLEBEAM
dbw 13, HEADBUTT
dbw 19, AGILITY
dbw 22, WING_ATTACK
dbw 28, WATER_PULSE
dbw 31, TAKE_DOWN
dbw 37, CONFUSE_RAY
dbw 40, BOUNCE
dbw 46, AQUA_RING
dbw 49, HYDRO_PUMP
db 0 ; no more level-up moves
SkarmoryEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, PECK
dbw 6, SAND_ATTACK
dbw 9, SWIFT
dbw 12, AGILITY
dbw 17, FURY_ATTACK
dbw 20, FEINT
dbw 23, AIR_CUTTER
dbw 28, SPIKES
dbw 31, METAL_SOUND
dbw 34, STEEL_WING
dbw 39, AIR_SLASH
dbw 42, SLASH
dbw 45, NIGHT_SLASH
db 0 ; no more level-up moves
HoundourEvosAttacks:
dbbw EVOLVE_LEVEL, 24, HOUNDOOM
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, EMBER
dbw 4, HOWL
dbw 9, SMOG
dbw 14, ROAR
dbw 17, BITE
dbw 22, ODOR_SLEUTH
dbw 27, BEAT_UP
dbw 30, FIRE_FANG
dbw 35, FAINT_ATTACK
dbw 40, EMBARGO
dbw 43, FLAMETHROWER
dbw 48, CRUNCH
dbw 53, NASTY_PLOT
db 0 ; no more level-up moves
HoundoomEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, EMBER
dbw 1, SMOG
dbw 1, HOWL
dbw 1, THUNDER_FANG
dbw 4, HOWL
dbw 9, SMOG
dbw 14, ROAR
dbw 17, BITE
dbw 22, ODOR_SLEUTH
dbw 28, BEAT_UP
dbw 32, FIRE_FANG
dbw 38, FAINT_ATTACK
dbw 44, EMBARGO
dbw 48, FLAMETHROWER
dbw 54, CRUNCH
dbw 60, NASTY_PLOT
db 0 ; no more level-up moves
KingdraEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, WATER_GUN
dbw 1, SMOKESCREEN
dbw 1, BUBBLE
dbw 1, YAWN
dbw 4, SMOKESCREEN
dbw 8, LEER
dbw 11, WATER_GUN
dbw 14, FOCUS_ENERGY
dbw 18, BUBBLEBEAM
dbw 23, AGILITY
dbw 26, TWISTER
dbw 30, BRINE
dbw 40, HYDRO_PUMP
dbw 48, DRAGON_DANCE
dbw 57, DRAGON_PULSE
db 0 ; no more level-up moves
PhanpyEvosAttacks:
dbbw EVOLVE_LEVEL, 25, DONPHAN
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, GROWL
dbw 1, DEFENSE_CURL
dbw 1, ODOR_SLEUTH
dbw 6, FLAIL
dbw 10, TAKE_DOWN
dbw 15, ROLLOUT
dbw 19, NATURAL_GIFT
dbw 24, SLAM
dbw 28, ENDURE
dbw 33, CHARM
dbw 37, LAST_RESORT
dbw 42, DOUBLE_EDGE
db 0 ; no more level-up moves
DonphanEvosAttacks:
db 0 ; no more evolutions
dbw 1, HORN_ATTACK
dbw 1, GROWL
dbw 1, DEFENSE_CURL
dbw 1, FLAIL
dbw 1, THUNDER_FANG
dbw 1, FIRE_FANG
dbw 6, RAPID_SPIN
dbw 10, KNOCK_OFF
dbw 15, ROLLOUT
dbw 19, MAGNITUDE
dbw 24, SLAM
dbw 25, FURY_ATTACK
dbw 31, ASSURANCE
dbw 39, SCARY_FACE
dbw 46, EARTHQUAKE
dbw 54, GIGA_IMPACT
db 0 ; no more level-up moves
Porygon2EvosAttacks:
dbbw EVOLVE_TRADE, DUBIOUS_DISC, PORYGON_Z
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, DEFENSE_CURL
dbw 1, CONVERSION
dbw 1, CONVERSION2
dbw 7, PSYBEAM
dbw 12, AGILITY
dbw 18, RECOVER
dbw 23, MAGNET_RISE
dbw 29, SIGNAL_BEAM
dbw 34, RECYCLE
dbw 40, DISCHARGE
dbw 45, LOCK_ON
dbw 51, TRI_ATTACK
dbw 56, MAGIC_COAT
dbw 62, ZAP_CANNON
dbw 67, HYPER_BEAM
db 0 ; no more level-up moves
StantlerEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 3, LEER
dbw 7, ASTONISH
dbw 10, HYPNOSIS
dbw 13, STOMP
dbw 16, SAND_ATTACK
dbw 21, TAKE_DOWN
dbw 23, CONFUSE_RAY
dbw 27, CALM_MIND
dbw 33, ROLE_PLAY
dbw 38, ZEN_HEADBUTT
dbw 43, IMPRISON
dbw 49, CAPTIVATE
dbw 53, ME_FIRST
db 0 ; no more level-up moves
SmeargleEvosAttacks:
db 0 ; no more evolutions
dbw 1, SKETCH
dbw 11, SKETCH
dbw 21, SKETCH
dbw 31, SKETCH
dbw 41, SKETCH
dbw 51, SKETCH
dbw 61, SKETCH
dbw 71, SKETCH
dbw 81, SKETCH
dbw 91, SKETCH
db 0 ; no more level-up moves
TyrogueEvosAttacks:
dbbbw EVOLVE_STAT, 20, ATK_LT_DEF, HITMONCHAN
dbbbw EVOLVE_STAT, 20, ATK_GT_DEF, HITMONLEE
dbbbw EVOLVE_STAT, 20, ATK_EQ_DEF, HITMONTOP
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 1, FORESIGHT
dbw 1, FAKE_OUT
dbw 1, HELPING_HAND
db 0 ; no more level-up moves
HitmontopEvosAttacks:
db 0 ; no more evolutions
dbw 1, ROLLING_KICK
dbw 1, REVENGE
dbw 6, FOCUS_ENERGY
dbw 10, PURSUIT
dbw 15, QUICK_ATTACK
dbw 19, TRIPLE_KICK
dbw 24, RAPID_SPIN
dbw 28, COUNTER
dbw 33, FEINT
dbw 37, AGILITY
dbw 42, GYRO_BALL
dbw 46, DETECT
dbw 51, CLOSE_COMBAT
dbw 55, ENDEAVOR
db 0 ; no more level-up moves
SmoochumEvosAttacks:
dbbw EVOLVE_LEVEL, 30, JYNX
db 0 ; no more evolutions
dbw 1, POUND
dbw 5, LICK
dbw 8, SWEET_KISS
dbw 11, POWDER_SNOW
dbw 15, CONFUSION
dbw 18, SING
dbw 21, MEAN_LOOK
dbw 25, FAKE_TEARS
dbw 28, LUCKY_CHANT
dbw 31, AVALANCHE
dbw 35, PSYCHIC_M
dbw 38, COPYCAT
dbw 41, PERISH_SONG
dbw 45, BLIZZARD
db 0 ; no more level-up moves
ElekidEvosAttacks:
dbbw EVOLVE_LEVEL, 30, ELECTABUZZ
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, QUICK_ATTACK
dbw 7, THUNDERSHOCK
dbw 10, LOW_KICK
dbw 16, SWIFT
dbw 19, SHOCK_WAVE
dbw 25, LIGHT_SCREEN
dbw 28, THUNDERPUNCH
dbw 34, DISCHARGE
dbw 37, THUNDERBOLT
dbw 43, SCREECH
dbw 46, THUNDER
db 0 ; no more level-up moves
MagbyEvosAttacks:
dbbw EVOLVE_LEVEL, 30, MAGMAR
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, SMOG
dbw 7, EMBER
dbw 10, SMOKESCREEN
dbw 16, FAINT_ATTACK
dbw 19, FIRE_SPIN
dbw 25, CONFUSE_RAY
dbw 28, FIRE_PUNCH
dbw 34, LAVA_PLUME
dbw 37, FLAMETHROWER
dbw 43, SUNNY_DAY
dbw 46, FIRE_BLAST
db 0 ; no more level-up moves
MiltankEvosAttacks:
db 0 ; no more evolutions
dbw 1, TACKLE
dbw 3, GROWL
dbw 5, DEFENSE_CURL
dbw 8, STOMP
dbw 11, MILK_DRINK
dbw 15, BIDE
dbw 19, ROLLOUT
dbw 24, BODY_SLAM
dbw 29, ZEN_HEADBUTT
dbw 35, CAPTIVATE
dbw 41, GYRO_BALL
dbw 48, HEAL_BELL
dbw 55, WAKE_UP_SLAP
db 0 ; no more level-up moves
BlisseyEvosAttacks:
db 0 ; no more evolutions
dbw 1, POUND
dbw 1, GROWL
dbw 5, TAIL_WHIP
dbw 9, REFRESH
dbw 12, SOFTBOILED
dbw 16, DOUBLESLAP
dbw 20, MINIMIZE
dbw 23, SING
dbw 27, FLING
dbw 31, DEFENSE_CURL
dbw 34, LIGHT_SCREEN
dbw 38, EGG_BOMB
dbw 42, HEALING_WISH
dbw 46, DOUBLE_EDGE
db 0 ; no more level-up moves
RaikouEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 8, THUNDERSHOCK
dbw 15, ROAR
dbw 22, QUICK_ATTACK
dbw 29, SPARK
dbw 36, REFLECT
dbw 43, CRUNCH
dbw 50, THUNDER_FANG
dbw 57, DISCHARGE
dbw 64, EXTRASENSORY
dbw 71, RAIN_DANCE
dbw 78, CALM_MIND
dbw 85, THUNDER
db 0 ; no more level-up moves
EnteiEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 8, EMBER
dbw 15, ROAR
dbw 22, FIRE_SPIN
dbw 29, STOMP
dbw 36, FLAMETHROWER
dbw 43, SWAGGER
dbw 50, FIRE_FANG
dbw 57, LAVA_PLUME
dbw 64, EXTRASENSORY
dbw 71, FIRE_BLAST
dbw 78, CALM_MIND
dbw 85, ERUPTION
db 0 ; no more level-up moves
SuicuneEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 8, BUBBLEBEAM
dbw 15, RAIN_DANCE
dbw 22, GUST
dbw 29, AURORA_BEAM
dbw 36, MIST
dbw 43, MIRROR_COAT
dbw 50, ICE_FANG
dbw 57, TAILWIND
dbw 64, EXTRASENSORY
dbw 71, HYDRO_PUMP
dbw 78, CALM_MIND
dbw 85, BLIZZARD
db 0 ; no more level-up moves
LarvitarEvosAttacks:
dbbw EVOLVE_LEVEL, 30, PUPITAR
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 5, SANDSTORM
dbw 10, SCREECH
dbw 14, ROCK_SLIDE
dbw 19, SCARY_FACE
dbw 23, THRASH
dbw 28, DARK_PULSE
dbw 32, PAYBACK
dbw 37, CRUNCH
dbw 41, EARTHQUAKE
dbw 46, STONE_EDGE
dbw 50, HYPER_BEAM
db 0 ; no more level-up moves
PupitarEvosAttacks:
dbbw EVOLVE_LEVEL, 55, TYRANITAR
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 1, SCREECH
dbw 1, SANDSTORM
dbw 5, SANDSTORM
dbw 10, SCREECH
dbw 14, ROCK_SLIDE
dbw 19, SCARY_FACE
dbw 23, THRASH
dbw 28, DARK_PULSE
dbw 34, PAYBACK
dbw 41, CRUNCH
dbw 47, EARTHQUAKE
dbw 54, STONE_EDGE
dbw 60, HYPER_BEAM
db 0 ; no more level-up moves
TyranitarEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEER
dbw 1, BITE
dbw 1, SCREECH
dbw 1, SANDSTORM
dbw 1, THUNDER_FANG
dbw 1, ICE_FANG
dbw 1, FIRE_FANG
dbw 5, SANDSTORM
dbw 10, SCREECH
dbw 14, ROCK_SLIDE
dbw 19, SCARY_FACE
dbw 23, THRASH
dbw 28, DARK_PULSE
dbw 34, PAYBACK
dbw 41, CRUNCH
dbw 47, EARTHQUAKE
dbw 54, STONE_EDGE
dbw 70, HYPER_BEAM
db 0 ; no more level-up moves
LugiaEvosAttacks:
db 0 ; no more evolutions
dbw 1, WHIRLWIND
dbw 9, SAFEGUARD
dbw 15, GUST
dbw 23, RECOVER
dbw 29, HYDRO_PUMP
dbw 37, RAIN_DANCE
dbw 43, SWIFT
dbw 51, NATURAL_GIFT
dbw 57, ANCIENTPOWER
dbw 65, EXTRASENSORY
dbw 71, PUNISHMENT
dbw 79, FUTURE_SIGHT
dbw 85, AEROBLAST
dbw 93, CALM_MIND
dbw 99, SKY_ATTACK
db 0 ; no more level-up moves
HoOhEvosAttacks:
db 0 ; no more evolutions
dbw 1, WHIRLWIND
dbw 9, SAFEGUARD
dbw 15, GUST
dbw 23, RECOVER
dbw 29, FIRE_BLAST
dbw 37, SUNNY_DAY
dbw 43, SWIFT
dbw 51, NATURAL_GIFT
dbw 57, ANCIENTPOWER
dbw 65, EXTRASENSORY
dbw 71, PUNISHMENT
dbw 79, FUTURE_SIGHT
dbw 85, SACRED_FIRE
dbw 93, CALM_MIND
dbw 99, SKY_ATTACK
db 0 ; no more level-up moves
CelebiEvosAttacks:
db 0 ; no more evolutions
dbw 1, LEECH_SEED
dbw 1, CONFUSION
dbw 1, RECOVER
dbw 1, HEAL_BELL
dbw 10, SAFEGUARD
dbw 19, MAGICAL_LEAF
dbw 28, ANCIENTPOWER
dbw 37, BATON_PASS
dbw 46, NATURAL_GIFT
dbw 55, HEAL_BLOCK
dbw 64, FUTURE_SIGHT
dbw 73, HEALING_WISH
dbw 82, LEAF_STORM
dbw 91, PERISH_SONG
db 0 ; no more level-up moves
|
data/github.com/janverschelde/PHCpack/2666077c7461478d61ddaf87cb713fe5d569e7ff/src/Ada/Math_Lib/Matrices/varbprec_matrix_conversions.ads | ajnavarro/language-dataset | 9 | 30909 | <reponame>ajnavarro/language-dataset<gh_stars>1-10
with Standard_Natural_Numbers; use Standard_Natural_Numbers;
with Standard_Floating_Matrices;
with Standard_Complex_Matrices;
with Double_Double_Matrices;
with Quad_Double_Matrices;
with Multprec_Floating_Matrices;
with DoblDobl_Complex_Matrices;
with QuadDobl_Complex_Matrices;
with Multprec_Complex_Matrices;
package VarbPrec_Matrix_Conversions is
-- DESCRIPTION :
-- Often we want to convert matrices of various precisions.
-- This package collects routines to convert between matrices of
-- different types of precision for use in variable precision solvers,
-- for real and complex numbers.
function d2dd ( mtx : Standard_Floating_Matrices.Matrix )
return Double_Double_Matrices.Matrix;
function d2dd ( mtx : Standard_Complex_Matrices.Matrix )
return DoblDobl_Complex_Matrices.Matrix;
function d2qd ( mtx : Standard_Floating_Matrices.Matrix )
return Quad_Double_Matrices.Matrix;
function d2qd ( mtx : Standard_Complex_Matrices.Matrix )
return QuadDobl_Complex_Matrices.Matrix;
function d2mp ( mtx : Standard_Floating_Matrices.Matrix )
return Multprec_Floating_Matrices.Matrix;
function d2mp ( mtx : Standard_Complex_Matrices.Matrix )
return Multprec_Complex_Matrices.Matrix;
-- DESCRIPTION :
-- Converts a floating-point matrix in standard double precision
-- to a matrix in double double (dd), quad double (qd) precision,
-- or arbitrary multiprecision (mp).
function dd2d ( mtx : Double_Double_Matrices.Matrix )
return Standard_Floating_Matrices.Matrix;
function dd2d ( mtx : DoblDobl_Complex_Matrices.Matrix )
return Standard_Complex_Matrices.Matrix;
function dd2qd ( mtx : Double_Double_Matrices.Matrix )
return Quad_Double_Matrices.Matrix;
function dd2qd ( mtx : DoblDobl_Complex_Matrices.Matrix )
return QuadDobl_Complex_Matrices.Matrix;
function dd2mp ( mtx : Double_Double_Matrices.Matrix )
return Multprec_Floating_Matrices.Matrix;
function dd2mp ( mtx : DoblDobl_Complex_Matrices.Matrix )
return Multprec_Complex_Matrices.Matrix;
-- DESCRIPTION :
-- Converts a matrix in double double precision to a matrix
-- in standard double (d), quad double (qd) precision,
-- or arbitrary multiprecision (mp).
function qd2d ( mtx : Quad_Double_Matrices.Matrix )
return Standard_Floating_Matrices.Matrix;
function qd2d ( mtx : QuadDobl_Complex_Matrices.Matrix )
return Standard_Complex_Matrices.Matrix;
function qd2dd ( mtx : Quad_Double_Matrices.Matrix )
return Double_Double_Matrices.Matrix;
function qd2dd ( mtx : QuadDobl_Complex_Matrices.Matrix )
return DoblDobl_Complex_Matrices.Matrix;
function qd2mp ( mtx : Quad_Double_Matrices.Matrix )
return Multprec_Floating_Matrices.Matrix;
function qd2mp ( mtx : QuadDobl_Complex_Matrices.Matrix )
return Multprec_Complex_Matrices.Matrix;
-- DESCRIPTION :
-- Converts a matrix in quad double precision to a matrix
-- in standard double (d) or double double (dd) precision,
-- or arbitrary multiprecision (mp).
procedure Set_Size ( mtx : in out Multprec_Floating_Matrices.Matrix;
size : in natural32 );
procedure Set_Size ( mtx : in out Multprec_Complex_Matrices.Matrix;
size : in natural32 );
-- DESCRIPTION :
-- Sets the size of the matrix mtx to the given value of size.
end VarbPrec_Matrix_Conversions;
|
HookFunctions.asm | obaniu2006/Win32-Inline-API-hook | 3 | 11303 | <gh_stars>1-10
;Copyright (c) 2015 droidwolf(<EMAIL>)
;All rights reserved.
;
;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.
.data
szKernel32 db 'kernel32',0 ;Kernel32动态连接库
szNtdll db 'ntdll',0
HasCheckCurrentPID_IsProtect dd 0
;szQUAT db '"',0
;打开进程句柄API
szOpenProcess db 'OpenProcess',0
pOpenProcess dd 0
OpenProcess_Header db SizeFnHead dup(0)
szZwOpenFile db 'ZwOpenFile',0
pZwOpenFile dd 0
ZwOpenFile_Header db SizeFnHead dup(0)
include macro.inc
my_OpenProcess proc dwDesiredAccess,bInheritHandle,dwProcessId
local vpt:DWORD
.if !g_IsUnHook
mov eax,dwProcessId
WhileEAXIsProtectPID_ExitProc
.endif
EntryCritical
invoke ResumeFn,pOpenProcess,offset OpenProcess_Header
InvokePtr pOpenProcess, dwDesiredAccess,bInheritHandle,dwProcessId
push eax
invoke ReplaceFn,pOpenProcess,offset my_OpenProcess,0;offset OpenProcess_Header
LeaveCritical
pop eax
ret
my_OpenProcess endp
my_ZwOpenFile proc FileHandle,DesiredAccess, ObjectAttributes,IoStatusBlock,ShareAccess,OpenOptions
local vpt
.if !g_IsUnHook
push ebx
mov eax,ObjectAttributes ;OBJECT_ATTRIBUTES 结构
mov ebx,[eax+8] ;PUNICODE_STRING 结构
mov eax,[ebx] ;Length
.if eax >=g_LenDirectoryW
invoke StrStrIW,[ebx+4],offset g_strDirectoryW
.if eax
mov eax,3221225487 ;无文件
pop ebx
ret
.endif
.endif
pop ebx
.endif
EntryCritical
RemoveProtect pZwOpenFile,addr vpt
WriteFuncHeader pZwOpenFile,offset ZwOpenFile_Header
InvokePtr pZwOpenFile,FileHandle,DesiredAccess, ObjectAttributes,IoStatusBlock,ShareAccess,OpenOptions
push eax
WriteFuncHeaderJmp pZwOpenFile,offset my_ZwOpenFile
ReProtect pZwOpenFile,vpt
LeaveCritical
pop eax
ret
my_ZwOpenFile endp
;*****************************************************************************
; 功能:开始Api挂钩
; 参数:
; 返回:不为0为成功
;*****************************************************************************
StartApiHK proc
invoke GetCurrentProcessId
WhileEAXIsProtectPID_ExitProc
EntryCritical
.if !pZwOpenFile
invoke GetProcPtr,offset szNtdll,offset szZwOpenFile
mov pZwOpenFile,eax
.endif
.if pZwOpenFile
invoke ReplaceFn,pZwOpenFile,offset my_ZwOpenFile,offset ZwOpenFile_Header
.endif
.if !pOpenProcess
invoke GetProcPtr,offset szKernel32,offset szOpenProcess
mov pOpenProcess,eax
.endif
.if pOpenProcess
invoke ReplaceFn,pOpenProcess,offset my_OpenProcess,offset OpenProcess_Header
.endif
LeaveCritical
ret
StartApiHK endp
;*****************************************************************************
; 功能:停止Api挂钩
; 参数:
; 返回:不为0为成功
;*****************************************************************************
StopApiHK proc
EntryCritical
.if pOpenProcess
invoke ResumeFn,pOpenProcess,offset OpenProcess_Header
mov pOpenProcess,0
.endif
.if pZwOpenFile
invoke ResumeFn,pZwOpenFile,offset ZwOpenFile_Header
mov pZwOpenFile,0
.endif
LeaveCritical
ret
StopApiHK endp |
agda-stdlib/src/Universe.agda | DreamLinuxer/popl21-artifact | 5 | 13665 | <reponame>DreamLinuxer/popl21-artifact
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use `Data.Universe` instead.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Universe where
{-# WARNING_ON_IMPORT
"Universe was deprecated in v1.1.
Use Data.Universe instead."
#-}
open import Data.Universe public
open import Data.Universe.Indexed public
renaming (IndexedUniverse to Indexed-universe)
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/lto16_pkg.adb | best08618/asylo | 7 | 12060 | <gh_stars>1-10
with Ada.Calendar; use Ada.Calendar;
package body Lto16_Pkg is
function F return Float is
F1 : Float := Float (Seconds (Clock));
F2 : Float := Float (Seconds (Clock));
F : Float;
begin
if F1 > F2 then
F := (F2 - F1) / 2.0;
else
F := (F1 - F2) / 2.0;
end if;
return F;
end;
end Lto16_Pkg;
|
libsrc/stdio/ansi/ticalc/f_ansi_bel.asm | jpoikela/z88dk | 640 | 98927 | ;
; ANSI Video handling for the TI calculators
; By <NAME> - Dec. 2000
;
; BEL - chr(7) Beep it out
;
;
; $Id: f_ansi_bel.asm,v 1.5 2016-06-12 16:06:43 dom Exp $
;
SECTION code_clib
PUBLIC ansi_BEL
.ansi_BEL
ret
|
AirMessage/AppleScript/AppleScriptSource/FaceTime/getNewLink.applescript | airmessage/airmessage-server-next | 23 | 4711 | <reponame>airmessage/airmessage-server-next
--Creates a new FaceTime link and returns it
--Open FaceTime
tell application "FaceTime" to activate
--Wait for FaceTime to initialize
tell application "System Events"
tell process "FaceTime"
set windowReady to false
repeat while not windowReady
if exists window 1 then
repeat with buttonEl in buttons of window 1
if (exists attribute "AXIdentifier" of buttonEl) and (value of attribute "AXIdentifier" of buttonEl contains "NS") then
set windowReady to true
exit repeat
end if
end repeat
end if
delay 0.1
end repeat
delay 0.2
end tell
end tell
tell application "System Events"
tell process "FaceTime"
--Clear the clipboard
set the clipboard to ""
--Click "Create Link" button
set linkButton to button 1 of window 1
click linkButton
delay 0.1
click menu item 1 of menu of linkButton
set startTime to (current date)
repeat
if the clipboard is not "" then
return the clipboard as string
else if (current date) - startTime > 20 then
error "Clipboard timed out"
end if
delay 0.1
end repeat
end tell
end tell
|
src/skill-hashes.ads | skill-lang/adaCommon | 0 | 25903 | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ hashes used in skill --
-- |___/_|\_\_|_|____| by: <NAME> --
-- --
pragma Ada_2012;
with Ada.Containers;
with Ada.Strings.Hash;
with Skill.Types;
with Skill.Types.Pools;
with Ada.Unchecked_Conversion;
with Interfaces;
-- the trick of this package is to instantiate hash codes as Skill.hashes.hash
-- independent of the type! :)
package Skill.Hashes is
-- pragma Preelaborate;
pragma Warnings(Off);
function Hash
(Element : Skill.Types.String_Access) return Ada.Containers.Hash_Type is
(Ada.Strings.Hash (Element.all));
function Hash
(Element : Skill.Types.Pools.Pool) return Ada.Containers.Hash_Type is
(Ada.Containers.Hash_Type(Element.Id));
function Hash
(Element : Interfaces.Integer_8) return Ada.Containers.Hash_Type is
(Ada.Containers.Hash_Type(Element));
function Hash
(Element : Interfaces.Integer_16) return Ada.Containers.Hash_Type is
(Ada.Containers.Hash_Type(Element));
function Hash
(Element : Interfaces.Integer_32) return Ada.Containers.Hash_Type is
(Ada.Containers.Hash_Type(Element));
function Hash is new Ada.Unchecked_Conversion(Interfaces.Integer_64, Ada.Containers.Hash_Type);
end Skill.Hashes;
|
Micro/Tests/sub/sub.asm | JavierOramas/CP_AC | 0 | 178306 | <gh_stars>0
addi r3 r0 100
addi r1 r0 35
sub r4 r3 r1
tty r4
halt
#prints A |
oeis/139/A139716.asm | neoneye/loda-programs | 11 | 91180 | ; A139716: If k is the largest divisor of n that is <= sqrt(n) then a(n) = n - k^2.
; 0,1,2,0,4,2,6,4,0,6,10,3,12,10,6,0,16,9,18,4,12,18,22,8,0,22,18,12,28,5,30,16,24,30,10,0,36,34,30,15,40,6,42,28,20,42,46,12,0,25,42,36,52,18,30,7,48,54,58,24,60,58,14,0,40,30,66,52,60,21,70,8,72,70,50,60,28,42
mov $1,$0
add $1,1
mov $2,$1
lpb $1
lpb $0
mov $0,$2
dif $0,$1
sub $0,$1
mul $0,$1
lpe
sub $1,1
lpe
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c34004c.ada | best08618/asylo | 7 | 8035 | <reponame>best08618/asylo
-- C34004C.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- FOR DERIVED FIXED POINT TYPES:
-- CHECK THAT ALL VALUES OF THE PARENT (BASE) TYPE ARE PRESENT FOR
-- THE DERIVED (BASE) TYPE WHEN THE DERIVED TYPE DEFINITION IS
-- CONSTRAINED.
-- CHECK THAT ANY CONSTRAINT IMPOSED ON THE PARENT SUBTYPE IS ALSO
-- IMPOSED ON THE DERIVED SUBTYPE.
-- HISTORY:
-- JRK 09/08/86
-- JLH 09/25/87 REFORMATTED HEADER.
-- JRL 03/13/92 MODIFIED TO DEFEAT OPTIMIZATION WHEN ATTEMPTING TO
-- RAISE CONSTRAINT_ERROR.
-- JRL 03/30/93 REMOVED NUMERIC_ERROR FROM TEST.
-- DTN 11/30/95 REMOVED NON ADA95 ATTRIBUTES.
WITH SYSTEM; USE SYSTEM;
WITH REPORT; USE REPORT;
PROCEDURE C34004C IS
TYPE PARENT IS DELTA 0.01 RANGE -100.0 .. 100.0;
TYPE T IS NEW PARENT DELTA 0.1 RANGE
IDENT_INT (1) * (-30.0) ..
IDENT_INT (1) * ( 30.0);
SUBTYPE SUBPARENT IS PARENT DELTA 0.1 RANGE -30.0 .. 30.0;
TYPE S IS NEW SUBPARENT;
X,XA : T;
Y,YA : S;
FUNCTION OUT_OF_BOUNDS ( VAR1 , VAR2 : T ) RETURN BOOLEAN IS
BEGIN
IF ( VAR1 + VAR2 ) IN T THEN
RETURN FALSE ;
ELSE
RETURN TRUE ;
END IF ;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
RETURN TRUE ;
END OUT_OF_BOUNDS ;
FUNCTION OUT_OF_BOUNDS ( VAR1 , VAR2 : S ) RETURN BOOLEAN IS
BEGIN
IF ( VAR1 + VAR2 ) IN S THEN
RETURN FALSE ;
ELSE
RETURN TRUE ;
END IF ;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
RETURN TRUE ;
END OUT_OF_BOUNDS ;
BEGIN
TEST ("C34004C", "CHECK THAT ALL VALUES OF THE PARENT (BASE) " &
"TYPE ARE PRESENT FOR THE DERIVED (BASE) TYPE " &
"WHEN THE DERIVED TYPE DEFINITION IS " &
"CONSTRAINED. ALSO CHECK THAT ANY CONSTRAINT " &
"IMPOSED ON THE PARENT SUBTYPE IS ALSO IMPOSED " &
"ON THE DERIVED SUBTYPE. CHECK FOR DERIVED " &
"FIXED POINT TYPES");
-- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT.
DECLARE
TBD : CONSTANT := BOOLEAN'POS (T'BASE'DELTA <= 0.01);
SBD : CONSTANT := BOOLEAN'POS (S'BASE'DELTA <= 0.01);
BEGIN
IF TBD = 0 OR SBD = 0 THEN
FAILED ("INCORRECT 'BASE'DELTA");
END IF;
END;
DECLARE
N : INTEGER := IDENT_INT (8);
BEGIN
IF 98.0 + T'(1.0) + N * 0.0078125 /= 99.0625 OR
98.0 + S'(1.0) + 8 * 0.0078125 /= 99.0625 OR
-98.0 - T'(1.0) - N * 0.0078125 /= -99.0625 OR
-98.0 - S'(1.0) - 8 * 0.0078125 /= -99.0625 THEN
FAILED ("INCORRECT + OR -");
END IF;
END;
IF T'FIRST /= -30.0 OR T'LAST /= 30.0 OR
S'FIRST /= -30.0 OR S'LAST /= 30.0 THEN
FAILED ("INCORRECT 'FIRST OR 'LAST");
END IF;
BEGIN
X := -30.0;
Y := -30.0;
IF PARENT (X) /= PARENT (Y) THEN -- USE X AND Y.
FAILED ("INCORRECT CONVERSION TO PARENT - 1");
END IF;
X := 30.0;
Y := 30.0;
IF PARENT (X) /= PARENT (Y) THEN -- USE X AND Y.
FAILED ("INCORRECT CONVERSION TO PARENT - 2");
END IF;
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED BY OK ASSIGNMENT");
END;
BEGIN
X := -30.0 ;
XA := -0.0625 ;
IF NOT OUT_OF_BOUNDS ( X , XA ) THEN
FAILED ( "CONSTRAINT_ERROR NOT RAISED -- X := -30.0625" ) ;
END IF ;
EXCEPTION
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- X := -30.0625");
END;
BEGIN
X := 30.0 ;
XA := 0.0625 ;
IF NOT OUT_OF_BOUNDS ( X , XA ) THEN
FAILED ( "CONSTRAINT_ERROR NOT RAISED -- X := 30.0625" ) ;
END IF ;
EXCEPTION
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- X := 30.0625");
END;
BEGIN
Y := -30.0 ;
YA := -0.0625 ;
IF NOT OUT_OF_BOUNDS ( Y , YA ) THEN
FAILED ( "CONSTRAINT_ERROR NOT RAISED -- Y := -30.0625" ) ;
END IF ;
EXCEPTION
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- Y := -30.0625");
END;
BEGIN
Y := 30.0 ;
YA := 0.0625 ;
IF NOT OUT_OF_BOUNDS ( Y , YA ) THEN
FAILED ( "CONSTRAINT_ERROR NOT RAISED -- Y := 30.0625" ) ;
END IF ;
EXCEPTION
WHEN OTHERS =>
FAILED ("WRONG EXCEPTION RAISED -- Y := 30.0625");
END;
RESULT;
END C34004C;
|
src/gpr_tools-gprslaves-launcher.adb | persan/gprTools | 2 | 20720 | with GNAT.Command_Line;
with Gprslaves.DB;
with GNAT.String_Split;
with GNAT.Spitbol; use GNAT.Spitbol;
with GNAT.Sockets;
with Gprslaves.Configuration;
use Gprslaves.Configuration;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded;
with GNAT.OS_Lib;
with Ada.Command_Line;
procedure GPR_Tools.Gprslaves.Launcher is
use Ada.Strings.Unbounded;
use GNAT.String_Split;
use GNAT.Command_Line;
Self : DB.Info_Struct;
Args : Unbounded_String;
Cmd : Unbounded_String := V ("gprslave");
Print_Version : Boolean := False;
Print_Help : Boolean := False;
begin
Self.Initialize;
loop
case Getopt ("? h -help " &
"v V -version " &
"j: -jobs= " &
"h: -hostname= " &
"r: -response-handler= " &
"d: -direcory= " &
"p: -port= " &
"v -verbose " &
"vv -debug " &
"-cmd= " &
"n: -nameserver= " &
"D!") is
when ASCII.NUL => exit;
when '-' =>
if Full_Switch = "-version" then
Append (Args, " --version");
elsif Full_Switch = "-response-handler" then
Append (Args, "--response-handler=" & Parameter);
elsif Full_Switch = "-hostname" then
Self.Host.Name := V (Parameter);
elsif Full_Switch = "-direcory" then
Append (Args, "--direcory=" & Parameter);
elsif Full_Switch = "-port" then
Self.Host.Port := DB.Get_Free_Port (GNAT.Sockets.Port_Type'Value (Parameter));
elsif Full_Switch = "-verbose" then
Append (Args, "--verbose");
Configuration.Verbosity := 1;
elsif Full_Switch = "-debug" then
Append (Args, "--debug");
Configuration.Verbosity := 2;
elsif Full_Switch = "-nameserver" then
Configuration.Nameserver := V (Parameter);
elsif Full_Switch = "-cmd" then
Cmd := V (Parameter);
elsif Full_Switch = "-help" then
Append (Args, "--help");
Print_Help := True;
end if;
when 'v' | 'V' =>
if Full_Switch = "-version" then
Append (Args, "-v");
Print_Version := True;
elsif Full_Switch = "vv" then
Append (Args, "-vv");
Configuration.Verbosity := 2;
end if;
when 'j' =>
Append (Args, "-j" & Parameter);
when 'r' =>
Append (Args, "-r" & Parameter);
when 'd' =>
Append (Args, "-d" & Parameter);
when 'n' =>
Configuration.Nameserver := V (Parameter);
when 'p' =>
Self.Host.Port := DB.Get_Free_Port (GNAT.Sockets.Port_Type'Value (Parameter));
when 'D' =>
declare
S : GNAT.String_Split.Slice_Set;
begin
Create (S, Parameter, "=");
if Slice_Count (S) = 2 then
Self.Append (Slice (S, 1), Slice (S, 2));
end if;
end;
when '?' | 'h' =>
Append (Args, "-h");
Print_Help := True;
when others =>
raise Program_Error; -- cannot occur
end case;
end loop;
Append (Args, "-p" & Self.Host.Port'Img);
if Print_Help then
Put_Line (Configuration.Command & " " & VERSION);
Put_Line ("-DKey=Value Defines a key/Value pair for matching");
Put_Line ("-n --nameserver=URL Defines a nameserver (default is read from files ${PWD}/.gprslave '~/.gprslave').");
Put_Line ("-h -hostname=name Defines to hostname to register.");
elsif Print_Version then
Put_Line (Configuration.Command & " " & VERSION);
end if;
declare
S_Args : GNAT.OS_Lib.Argument_List_Access := GNAT.OS_Lib.Argument_String_To_List (To_String (Args));
Ret : Integer;
begin
Ret := GNAT.OS_Lib.Spawn (S (Cmd), S_Args.all);
Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Exit_Status (Ret));
GNAT.OS_Lib.Free (S_Args);
end;
end GPR_Tools.Gprslaves.Launcher;
|
Tests/sublime-syntax tests/syntax_test_preprocessor_multiline.nasm | 13xforever/x86-assembly-textmate-bundle | 69 | 164958 | ; SYNTAX TEST "Packages/User/x86_64 Assembly.tmbundle/Syntaxes/Nasm Assembly.sublime-syntax"
%1
;^ invalid.illegal
%macro silly 2
;<- punctuation.definition.keyword.preprocessor
;^^^^^ keyword.control.import
; ^^^^^ entity.name.function
; ^ variable.parameter
%2: db %1
; ^ punctuation.definition.variable
; ^ variable.other.preprocessor - invalid.illegal
;^^^^^^^^^^^^^^^^^ meta.preprocessor.macro
%endmacro
;<- punctuation.definition.keyword.preprocessor
;^^^^^^^^ keyword.control.import
silly 'a', letter_a ; letter_a: db 'a'
silly 'ab', string_ab ; string_ab: db 'ab'
silly {13,10}, crlf ; crlf: db 13,10
%1 ; should be invalid outside of multi-line macro
; ^ invalid.illegal
%macro retz 0
jnz %%skip
; ^^ punctuation.definition.keyword.preprocessor
; ^^^^ entity.name.constant - invalid.illegal
ret
%%skip:
; ^^ punctuation.definition.keyword.preprocessor
; ^^^^ entity.name.constant - invalid.illegal
; ^ punctuation.separator
%endmacro
%%macro_label: ; invalid outside of macro
; ^^^^^^^^^^^ invalid.illegal
%macro level1 0
%%level1_label:
; ^^^^^^^^^^^^ - invalid.illegal
%macro level2 0
%%level2_label:
; ^^^^^^^^^^^^ - invalid.illegal
%endmacro
%%still_level1_label:
; ^^^^^^^^^^^^^^^^^^ - invalid.illegal
%endmacro
%%and_now_its_invalid:
; ^^^^^^^^^^^^^^^^^^^ invalid.illegal
%macro writefile 2+
; ^ storage.modifier
jmp %%endstr
%%str: db %2
%%endstr:
mov dx,%%str
mov cx,%%endstr-%%str
mov bx,%1
mov ah,0x40
int 0x21
%endmacro
writefile [filehandle],"hello, world",13,10
writefile [filehandle], {"hello, world",13,10}
%macro mpar 1-*
; ^^^ variable.parameter
; ^ keyword.operator
db %{3:%[__BITS__]}
; ^^ meta.preprocessor
; ^ punctuation.definition
; ^ punctuation.section.braces.begin
; ^ punctuation.separator
; ^^^^^^^^^^^^^^^ meta.braces
; ^^^^^^^^^^ meta.brackets
; ^ punctuation.section.braces.end
%endmacro
mpar 1,2,3,4,5,6
%macro die 0-1 "Painful program death has occurred."
writefile 2,%1
mov ax,0x4c01
int 0x21
%endmacro
%macro foobar 1-3 mov,eax,[ebx+2]
%endmacro
%macro die 0-1+ "Painful program death has occurred.",13,10
%endmacro
%macro multipush 1-*
%rep %0
; ^ punctuation.definition.keyword.preprocessor
; ^^^ keyword.control.preprocessor - keyword.operator.word.mnemonics
push %1
;^^^^^^^^^^^^^^^^^ meta.block.preprocessor
%rotate 1
%endrep
; ^ punctuation.definition.keyword.preprocessor
; ^^^^^^ keyword.control.preprocessor
%endrep
; ^^^^^^ invalid.illegal
%endmacro
%endmacro
;^^^^^^^^ invalid.illegal
%macro multipop 1-*
%rep %0
; ^ variable.other.preprocessor - invalid.illegal
%rotate -1
pop %1
%endrep
%endmacro
%rep 10
push %1
; ^ invalid.illegal
%endrep
%macro keytab_entry 2
keypos%{1}8 equ $-keytab
db %2
%endmacro
keytab:
keytab_entry F1,128+1
keytab_entry F2,128+2
keytab_entry Return,13
;which would expand to
keytab:
keyposF18 equ $-keytab
db 128+1
keyposF28 equ $-keytab
db 128+2
keyposReturn equ $-keytab
db 13
%macro expansion 0
%{%foo}bar
%%foobar ; same thing
%endmacro
%macro retc 1
j%-1 %%skip
ret
%%skip:
%endmacro
%macro foo 1.nolist
; ^^^^^^^ storage.modifier
%endmacro
%macro bar 1-5+.nolist a,b,c,d,e,f,g,h
; ^^^^^^^ storage.modifier
%endmacro
%macro foo 1-3
; Do something
%endmacro
%unmacro foo 1-3+.nolist
;<- punctuation.definition.keyword.preprocessor
;^^^^^^^ keyword.control.import
; ^^^ entity.name.function.preprocessor
; ^^^ variable.parameter.preprocessor
; ^^^^^^^ storage.modifier
not_a_macro
;<- - meta.preprocessor
%imacro align 1-2+.nolist nop ;comment
sectalign %1
times (((%1) - (($-$$) % (%1))) % (%1)) %2
; ^^^^ - invalid.illegal
; ^ variable.language
; ^^ variable.language
%endmacro
{}
;<- - meta
%imacro istruc 1.nolist
%push
%define %$strucname %1
; ^^^^^^^^^^^^^^ - invalid.illegal
%$strucstart:
%endmacro
{}
;<- - meta
%imacro absolute 1+.nolist
%define __SECT__ [absolute %1]
; ^^^^^^^^^^^^^^^^^^^^^^ - invalid.illegal
__SECT__
%endmacro
{}
;<- - meta
%imacro section 1+.nolist
%define __SECT__ [section %1] ; broken :(
; ^^^^^^^^^^^^^^^^^^^^^ - invalid.illegal
__SECT__
%endmacro
{}
;<- - meta
%imacro cpu 1+.nolist
[cpu %1]
; ^^^^^^^^ - invalid.illegal
%endmacro
{}
;<- - meta
%imacro arg 0-1 1
%assign %$arg %1+%$arg
; ^^^^^^^^^^^^^^^^^^^^^^ - invalid.illegal
%endmacro
{}
;<- - meta
%imacro float 1-*.nolist
%rep %0
[float %1]
%ifidni %1,daz
%define __FLOAT_DAZ__ daz
%elifidni %1,nodaz
; ^^^^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_DAZ__ nodaz
%elifidni %1,near
; ^^^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_ROUND__ near
%elifidni %1,up
; ^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_ROUND__ up
%elifidni %1,down
; ^^^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_ROUND__ down
%elifidni %1,zero
; ^^^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_ROUND__ zero
%elifidni %1,default
; ^^^^^^^^^^^^^^^^^^^^ - invalid.illegal
%define __FLOAT_DAZ__ nodaz
%define __FLOAT_ROUND__ near
%endif
; ^^^^^^ - invalid.illegal
%rotate 1
%endrep
; ^^^^^^^ - invalid.illegal
%endmacro
{}
;<- - meta
|
libsrc/target/dai/stdio/fgetc_cons.asm | ahjelm/z88dk | 640 | 167760 |
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
INCLUDE "target/dai/def/dai.def"
.fgetc_cons
._fgetc_cons
call dai_GETK
and a
jp z,fgetc_cons
cp 13
jp nz,not_lf
ld a,10
not_lf:
ld l,a
ld h,0
ret
|
pcjrloader.asm | raphnet/booterify | 11 | 5415 | <reponame>raphnet/booterify<gh_stars>10-100
org 0x0000
bits 16
cpu 8086
[map symbols pcjrloader.map]
%define INT21H_HELPERS
; If enabled, the cartridge code only runs if no bootable
; disk is found. (Like the BASIC cartridge)
;%define INT18_MODE
; Start after the BIOS Data Area
; use one paragraph for the stack (SS=0050)
%define DESTINATION_SEGMENT 0052H
; Payload start must be at the first
; sector of track 1
%define FIRST_SECTOR 1
%define FIRST_TRACK 1
section .text
db 0x55, 0xAA ; Marker
db 0 ; Size / 512. Will be patched by jrromchk
jmp init ; Code follows
times 58 db 0 ; Todo : Align to match bootsector.asm (40h)
sectors_to_copy: dw 128
destination_segment: dw DESTINATION_SEGMENT
initial_ip: dw 0100h
initial_sp: dw 0FFFEh
initial_cs: dw DESTINATION_SEGMENT
initial_ds: dw DESTINATION_SEGMENT
initial_ss: dw DESTINATION_SEGMENT
init:
push ax
push ds
%ifdef INT18_MODE
; Install the start routine at INT 18h. The cartridge code
; will run if there is no bootable diskette. (Like the BASIC cartridge does)
xor ax, ax
mov ds, ax
mov ax, start
mov word [18h * 4], ax
mov ax, cs
mov word [18h * 4 + 2], ax
%else
; First enable the interrupt timer. Games that use the timer
; may need it! Normally it's done at F000:08B7 after the floppy test.
in al, 21h
and al, 0xFE
out 21h, al
pop ds
pop ax
jmp start
%endif
pop ds
pop ax
retf
start:
; Setup data segment to 0000
mov ax, cs
mov ds, ax
%ifdef TRACE
; Setup stack
mov ax, [destination_segment]
dec ax
mov ss, ax
mov sp, 15
%endif
%ifdef INT21H_HELPERS
; Install our handler at 0000:0084
push ds
xor ax, ax
mov ds, ax
mov ax, int21
mov word [21h * 4], ax
mov ax, cs
mov word [21h * 4 + 2], ax
pop ds
%endif
%ifdef TRACE
; Trace
mov ah, 00Eh
mov al, '1'
mov bh, 0
mov bl, 1
mov cx, 1
int 10h
%endif
; ES:DI is the destination
mov ax, [destination_segment]
mov es, ax
xor di, di
mov cx, [sectors_to_copy]
; DS:SI is the source (CS + 512 to skip this loader)
mov ax, cs
add ax, 0x20
mov ds, ax
xor si, si
; multiply by 512 (sector size)
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
shl cx, 1
rep movsb
; Restore data segment
mov ax, cs
mov ds, ax
loading_done:
%ifdef TRACE
mov ah, 00Eh
mov al, '2'
mov bh, 0
mov bl, 1
mov cx, 1
int 10h
%endif
start_payload:
; Setup stack
mov ax, [initial_ss]
mov ss, ax
mov sp, [initial_sp]
; Put far return address on stack
mov dx, [initial_cs]
push dx
mov dx, [initial_ip]
push dx
mov ax, [initial_cs]
sub ax, 0x10
mov es, ax
xor ax,ax
; Data segment
mov dx, [initial_ds]
mov ds, dx
sti
final_jump:
retf
progress:
push ax
push bx
mov ah, 0Eh
mov al, '.'
mov bh, 0
mov bl, 1
int 10h
pop bx
pop ax
ret
error:
mov al, ah ; Return code from int13h
add al, 'A'
mov ah, 00Eh
mov bh, 0
mov bl, 1
mov cx, 1
int 10h
hang:
jmp hang
%ifdef INT21H_HELPERS
int21:
cmp ah, 02h
je int21_02
cmp ah, 25h
je int21_25
cmp ah, 35h
je int21_35
cmp ah, 09h
je int21_09
iret
; AH : 02
; DL : Character
int21_02:
push ax
push bx
; Int 10,E : write text in tty mode
; AL : Ascii character
; BH : Page no
; BL : Forground color
xor bx,bx
mov al, dl
mov ah, 0x0e
int 10h
pop bx
pop ax
iret
; AH : 09
; DX : $tring
int21_09:
push ax
push bx
mov bx, dx
mov ah, 0Eh
_int21_09_lp:
mov al, [bx]
push bx
mov bx, 0x0001
int 10h
pop bx
inc bx
cmp byte [bx], '$'
jne _int21_09_lp
pop bx
pop ax
iret
; AH: 25h
; AL: interrupt number
; DS:DX -> new interrupt handler
int21_25:
push ax
push es
push di
xor ah,ah
shl ax, 1
shl ax, 1
mov di, ax
mov ax, 0
mov es, ax
cld
mov ax, dx
stosw ; offset
mov ax, ds
stosw ; segment
pop di
pop es
pop ax
iret
; AH : 35h
; AL : Interrupt number
;
; Return
; ES:BX -> current interrupt handler
int21_35:
push ax
push ds
push si
xor ah,ah
shl ax, 1
shl ax, 1
mov si, ax
mov ax, 0
mov ds, ax
cld
lodsw ; offset
mov bx, ax
lodsw ; segment
mov es, ax
pop si
pop ds
pop ax
iret
%endif
db "Booterify version ",VERSION,0
; Make sure exactly 512 bytes are occupied
section .marker start=511
db 0xff
section .data
|
msp430-gcc-tics/msp430-gcc-7.3.1.24-source-full/gcc/gcc/testsuite/gnat.dg/array29.ads | TUDSSL/TICS | 7 | 7305 | package Array29 is
type Matrix is array (Integer range <>, Integer range <>) of Long_Float;
procedure Proc;
end Array29;
|
src/Prelude.agda | metaborg/ts.agda | 4 | 11165 | module Prelude where
open import Data.Nat public
open import Data.Nat.Properties.Simple public
open import Data.Fin using (Fin; #_; suc; zero) public
open import Data.Unit using (tt; ⊤) public
open import Data.Empty public
open import Data.Bool using (true; false; Bool) public
open import Data.Product public using (∃; ∃₂; _×_; _,_; proj₁; proj₂; ,_) public
open import Relation.Binary.PropositionalEquality hiding ([_]) public
open ≡-Reasoning public
open import Relation.Nullary public
open import Relation.Nullary.Decidable using (True) public
open import Function using (_∘_; _$_; id; const; flip) public
|
get_confirmation.scpt | jason0x43/jcalfred | 6 | 351 | on run argv
tell application "Alfred 2"
activate
set alfredPath to (path to application "Alfred 2")
set alfredIcon to path to resource "appicon.icns" in bundle (alfredPath as alias)
try
display dialog "{p}" with title "{t}" buttons {{"Yes", "No"}} default button "{d}" with icon alfredIcon
set answer to (button returned of result)
on error number -128
set answer to "No"
end try
end tell
end run
|
Task/Guess-the-number/Ada/guess-the-number.ada | LaudateCorpus1/RosettaCodeData | 1 | 19825 | with Ada.Numerics.Discrete_Random;
with Ada.Text_IO;
procedure Guess_Number is
subtype Number is Integer range 1 .. 10;
package Number_IO is new Ada.Text_IO.Integer_IO (Number);
package Number_RNG is new Ada.Numerics.Discrete_Random (Number);
Generator : Number_RNG.Generator;
My_Number : Number;
Your_Guess : Number;
begin
Number_RNG.Reset (Generator);
My_Number := Number_RNG.Random (Generator);
Ada.Text_IO.Put_Line ("Guess my number!");
loop
Ada.Text_IO.Put ("Your guess: ");
Number_IO.Get (Your_Guess);
exit when Your_Guess = My_Number;
Ada.Text_IO.Put_Line ("Wrong, try again!");
end loop;
Ada.Text_IO.Put_Line ("Well guessed!");
end Guess_Number;
|
Transynther/x86/_processed/US/_ht_st_zr_un_/i7-7700_9_0xca.log_21829_1006.asm | ljhsiun2/medusa | 9 | 19498 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x189fd, %rsi
lea addresses_WC_ht+0xbd8d, %rdi
nop
nop
nop
nop
cmp %r13, %r13
mov $62, %rcx
rep movsl
add %rcx, %rcx
lea addresses_WC_ht+0xb085, %r9
nop
nop
and $50190, %rax
mov (%r9), %r11
nop
nop
nop
xor %r11, %r11
lea addresses_WC_ht+0x1c0fd, %r13
clflush (%r13)
sub %rsi, %rsi
movw $0x6162, (%r13)
nop
and %rcx, %rcx
lea addresses_WC_ht+0x37d, %rcx
nop
nop
nop
nop
nop
inc %r11
movb $0x61, (%rcx)
nop
nop
nop
and %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %r8
push %rbx
// Faulty Load
lea addresses_US+0x179fd, %r15
nop
xor $54247, %r13
vmovups (%r15), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r12
lea oracles, %rbx
and $0xff, %r12
shlq $12, %r12
mov (%rbx,%r12,1), %r12
pop %rbx
pop %r8
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 8, 'AVXalign': True, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}}
{'79': 14, 'f0': 136, '47': 2136, '00': 5834, 'ff': 11897, '53': 1772, '10': 40}
ff ff ff ff 00 ff ff 00 ff ff ff 47 00 53 ff ff 00 ff ff ff ff ff ff 00 ff 00 ff ff 00 00 00 ff ff ff 47 00 53 ff ff ff ff ff ff ff 00 ff 00 ff ff 47 00 47 ff 47 47 ff ff ff 53 ff 00 ff ff 00 ff 53 ff 00 ff ff ff ff 00 ff ff ff 00 53 00 ff ff ff ff 00 ff 47 00 ff 53 ff ff ff ff 47 00 ff 00 47 00 00 ff ff 53 ff ff ff ff 00 ff 00 ff ff 00 47 00 ff ff 00 53 ff 00 ff ff ff 00 00 ff 00 00 ff ff ff 00 00 00 ff ff 53 ff ff 00 00 47 47 ff ff 00 00 00 00 ff ff ff ff ff ff 53 47 ff 00 47 00 ff 47 ff ff ff 00 ff 53 ff ff 00 ff ff ff 00 ff 53 ff 47 00 ff 47 00 53 ff 00 ff ff ff ff 47 ff ff 00 ff 00 00 ff 00 47 ff 00 ff 00 ff 00 ff ff 00 00 ff 00 ff 47 ff 47 47 ff 53 47 ff 00 ff ff ff 00 ff 00 00 47 ff ff 00 ff ff ff 00 ff ff 00 53 00 ff 00 00 47 ff 00 ff ff ff ff 00 00 ff ff 47 47 ff 47 00 ff 53 00 ff 47 ff 47 ff ff 00 ff ff ff 53 ff 47 00 53 ff ff 47 00 ff ff ff ff ff ff ff 00 ff 53 ff ff 00 ff ff ff 00 ff 53 47 ff 53 ff 53 ff ff 53 ff 47 00 47 ff 00 00 47 ff 00 ff 00 ff ff 00 ff ff 00 00 ff 53 47 ff 53 ff 47 00 00 ff 53 00 ff ff ff ff ff ff ff ff ff 47 00 ff 00 ff 47 ff ff 00 00 00 ff ff ff 47 47 ff ff 00 00 ff 00 ff ff ff 00 00 00 00 ff 47 53 ff ff ff ff ff 00 00 00 ff ff ff 00 00 53 ff 00 00 ff 47 00 ff ff ff ff ff 53 ff ff 00 ff 00 00 ff ff ff ff ff 00 ff ff ff 00 00 53 ff ff ff ff 00 ff ff ff 00 ff ff 00 47 ff ff ff 53 ff ff ff 00 ff ff ff ff 47 ff ff ff ff ff ff 00 ff ff 00 ff ff ff ff ff 47 00 ff 53 ff ff 00 ff ff 47 53 53 00 ff ff 00 ff ff ff ff 53 ff 00 53 ff ff 00 ff ff 53 ff ff ff ff ff ff ff ff ff 00 00 00 00 ff 00 47 ff 47 ff ff 00 00 47 00 ff ff 00 ff 53 00 ff 53 ff 53 00 ff ff ff 00 00 ff 53 ff 47 00 00 00 00 ff 00 ff ff 00 47 ff ff ff 00 00 00 ff ff 00 ff ff ff 47 47 ff ff 00 ff ff 53 ff 00 ff ff 00 53 ff ff ff ff ff ff ff 00 00 53 00 ff ff 47 00 00 ff ff ff ff ff ff ff ff ff 00 47 47 53 53 00 ff ff ff ff 47 ff ff ff 00 ff 00 00 ff ff 00 00 00 00 ff ff 00 ff ff 00 00 00 ff 00 00 ff 47 ff 00 47 00 ff ff 53 ff ff 00 ff ff ff 00 47 ff 53 47 53 00 ff ff ff 00 ff ff 00 ff 00 47 00 53 ff 00 47 00 00 00 00 ff 47 ff 53 47 ff ff 00 ff ff ff 00 47 53 ff ff ff 00 ff 47 00 47 00 ff 00 ff ff ff ff 00 53 47 ff 00 ff ff 00 ff 00 ff 00 ff ff 00 ff 00 ff ff ff ff ff ff 00 ff ff 00 00 00 00 53 47 00 ff 00 ff 00 00 ff 47 00 ff ff 00 ff ff 47 00 ff 00 ff ff ff 00 ff ff 00 ff ff ff 00 47 00 ff ff ff 00 00 53 ff 53 ff ff ff 00 ff ff ff ff 47 ff 53 ff 00 ff 00 ff 53 00 ff ff ff ff 00 00 ff ff ff ff 00 ff ff 00 ff 47 ff 00 53 ff 00 ff ff ff ff 00 47 ff ff 53 00 00 00 47 ff ff ff 00 ff ff 00 ff 00 00 ff ff 00 00 47 00 00 00 ff 53 ff ff ff 47 47 ff 00 ff 00 00 ff 47 ff ff ff 00 00 00 ff 00 ff 47 ff ff ff ff 53 00 53 47 00 ff 53 ff ff ff 00 ff ff 47 00 00 00 ff 53 ff 00 00 ff ff ff 00 ff 00 ff ff 00 ff 00 00 ff ff ff ff 00 00 47 ff ff ff 00 ff ff 53 ff ff 00 ff ff 53 47 00 ff 47 47 ff ff 47 47 ff 00 ff 00 ff ff 00 ff ff ff 47 00 47 ff ff 47 ff ff ff 53 47 00 00 ff ff ff ff 00 00 ff ff ff ff 00 00 00 00 00 53 ff ff ff ff ff ff ff 47 53 ff ff ff 47 00 ff ff 00 ff 00 00
*/
|
programs/oeis/258/A258121.asm | karttu/loda | 0 | 12682 | ; A258121: Number of vertices of degree n in all Lucas cubes.
; 2,5,15,39,102,267,699,1830,4791,12543,32838,85971,225075,589254,1542687,4038807,10573734,27682395,72473451,189737958,496740423,1300483311,3404709510,8913645219,23336226147,61095033222,159948873519,418751587335,1096305888486,2870166078123,7514192345883,19672410959526,51503040532695,134836710638559,353007091382982,924184563510387,2419546599148179,6334455233934150
mov $3,5
lpb $0,1
sub $0,1
add $2,$3
sub $2,2
add $3,3
mov $4,2
trn $4,$0
add $3,$4
add $3,$2
lpe
mov $0,$2
add $0,2
mov $1,$0
|
src/ada/src/uxas-comms-lmcp_net_client-service-automation_request_validation.adb | pat-rogers/OpenUxAS | 0 | 3990 | <filename>src/ada/src/uxas-comms-lmcp_net_client-service-automation_request_validation.adb<gh_stars>0
with AVTAS.Lmcp.Object.SPARK_Boundary; use AVTAS.Lmcp.Object.SPARK_Boundary;
with AFRL.CMASI.Enumerations;
with AFRl.CMASI.AutomationResponse; use AFRl.CMASI.AutomationResponse;
with AFRL.CMASI.AutomationRequest; use AFRL.CMASI.AutomationRequest;
with AFRL.CMASI.EntityConfiguration; use AFRL.CMASI.EntityConfiguration;
with AFRL.CMASI.EntityState; use AFRL.CMASI.EntityState;
with AFRL.CMASI.LmcpTask; use AFRL.CMASI.LmcpTask;
with AFRL.CMASI.KeepInZone; use AFRL.CMASI.KeepInZone;
with AFRL.CMASI.KeepOutZone; use AFRL.CMASI.KeepOutZone;
with AFRL.CMASI.RemoveTasks; use AFRL.CMASI.RemoveTasks;
with AFRL.CMASI.ServiceStatus; use AFRL.CMASI.ServiceStatus;
with AFRL.CMASI.KeyValuePair; use AFRL.CMASI.KeyValuePair;
with AFRL.CMASI.OperatingRegion; use AFRL.CMASI.OperatingRegion;
with AFRL.Impact.ImpactAutomationRequest; use AFRL.Impact.ImpactAutomationRequest;
with AFRL.Impact.PointOfInterest; use AFRL.Impact.PointOfInterest;
with AFRL.Impact.LineOfInterest; use AFRL.Impact.LineOfInterest;
with AFRL.Impact.AreaOfInterest; use AFRL.Impact.AreaOfInterest;
with AFRL.Impact.ImpactAutomationResponse; use AFRL.Impact.ImpactAutomationResponse;
with UxAS.Messages.Lmcptask.TaskAutomationRequest; use UxAS.Messages.Lmcptask.TaskAutomationRequest;
with UxAS.Messages.Lmcptask.TaskAutomationResponse; use UxAS.Messages.Lmcptask.TaskAutomationResponse;
with UxAS.Messages.Lmcptask.TaskInitialized; use UxAS.Messages.Lmcptask.TaskInitialized;
with UxAS.Messages.Lmcptask.PlanningState; use UxAS.Messages.Lmcptask.PlanningState;
with UxAS.Comms.LMCP_Net_Client.Service.Automation_Request_Validation.SPARK;
with String_Utils;
with Ada.Strings.Unbounded;
with DOM.Core.Elements;
package body UxAS.Comms.LMCP_Net_Client.Service.Automation_Request_Validation is
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
function Is_Any_Automation_Request (Msg : Object_Any) return Boolean;
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_EntityConfig_Msg
(This : in out Automation_Request_Validator_Service;
EntityConfig : EntityConfiguration_Any);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_StateEntity_Msg
(This : in out Automation_Request_Validator_Service;
State : EntityState_Any);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_InitializedTasks_Msg
(This : in out Automation_Request_Validator_Service;
Job : LmcpTask_Any);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_ServiceStatus_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_RemoveTasks_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_TaskInitialized_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_AreaOfInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_LineOfInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_PointofInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_KeepInZone_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_KeepOutZone_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
-- Refactored out of Process_Received_LMCP_Message for readability, comprehension, etc.
procedure Handle_OperatingRegion_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message);
---------------
-- Construct --
---------------
procedure Construct
(This : in out Automation_Request_Validator_Service)
is
begin
This.Construct_Service
(Service_Type => Type_Name,
Work_Directory_Name => Directory_Name);
-- from the request validator ctor:
--
-- make sure error collection is non-null
-- m_errorResponse.reset(new uxas::messages::task::UniqueAutomationResponse);
-- This.Error_Response := new UniqueAutomationResponse;
--
-- Ada: the component is declared, rather than allocated
--
-- if(!m_errorResponse->getOriginalResponse())
if This.Error_Response.getOriginalResponse = null then
-- m_errorResponse->setOriginalResponse(new afrl::cmasi::AutomationResponse);
This.Error_Response.setOriginalResponse (new AutomationResponse);
end if;
end Construct;
---------------------------------
-- Registry_Service_Type_Names --
---------------------------------
function Registry_Service_Type_Names return Service_Type_Names_List is
(Service_Type_Names_List'(1 => Instance (Service_Type_Name_Max_Length, Content => Type_Name)));
------------
-- Create --
------------
function Create return Any_Service is
Result : Automation_Request_Validator_Service_Ref;
begin
Result := new Automation_Request_Validator_Service;
Result.Construct; -- specific to Ada version
return Any_Service (Result);
end Create;
---------------
-- Configure --
---------------
overriding
procedure Configure
(This : in out Automation_Request_Validator_Service;
XML_Node : DOM.Core.Element;
Result : out Boolean)
is
Unused : Boolean;
begin
-- // configure response time parameter, ensure response time is reasonable
-- m_maxResponseTime_ms = ndComponent.attribute("MaxResponseTime_ms").as_uint(m_maxResponseTime_ms);
-- if(m_maxResponseTime_ms < 10) m_maxResponseTime_ms = 10;
This.Max_Response_Time := UInt32_Attribute (XML_Node, "MaxResponseTime_ms", Default => This.Max_Response_Time);
This.Max_Response_Time := UInt32'Max (This.Max_Response_Time, 10);
-- // translate regular, impact, and task automation requests to unique automation requests
-- addSubscriptionAddress(afrl::cmasi::AutomationRequest::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.AutomationRequest.Subscription, Unused);
-- addSubscriptionAddress(afrl::impact::ImpactAutomationRequest::Subscription);
This.Add_Subscription_Address (AFRL.Impact.ImpactAutomationRequest.Subscription, Unused);
-- addSubscriptionAddress(uxas::messages::task::TaskAutomationRequest::Subscription);
This.Add_Subscription_Address (UxAS.Messages.Lmcptask.TaskAutomationRequest.Subscription, Unused);
-- // respond with appropriate automation response based on unique response
-- addSubscriptionAddress(uxas::messages::task::UniqueAutomationResponse::Subscription);
This.Add_Subscription_Address (UxAS.Messages.Lmcptask.UniqueAutomationResponse.Subscription, Unused);
-- // track all entity configurations
-- addSubscriptionAddress(afrl::cmasi::EntityConfiguration::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.EntityConfiguration.Subscription, Unused);
-- std::vector< std::string > childconfigs = afrl::cmasi::EntityConfigurationDescendants();
-- for(auto child : childconfigs)
-- addSubscriptionAddress(child);
for Descendant of EntityConfiguration_Descendants loop
This.Add_Subscription_Address (Descendant, Unused);
end loop;
-- // track all entity states
-- addSubscriptionAddress(afrl::cmasi::EntityState::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.EntityState.Subscription, Unused);
-- std::vector< std::string > childstates = afrl::cmasi::EntityStateDescendants();
-- for(auto child : childstates)
-- addSubscriptionAddress(child);
for Descendant of EntityState_Descendants loop
This.Add_Subscription_Address (Descendant, Unused);
end loop;
-- // track airspace constraints
-- addSubscriptionAddress(afrl::cmasi::OperatingRegion::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.OperatingRegion.Subscription, Unused);
-- addSubscriptionAddress(afrl::cmasi::KeepInZone::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.KeepInZone.Subscription, Unused);
-- addSubscriptionAddress(afrl::cmasi::KeepOutZone::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.KeepOutZone.Subscription, Unused);
-- // track indicated locations of interest
-- addSubscriptionAddress(afrl::impact::AreaOfInterest::Subscription);
This.Add_Subscription_Address (AFRL.Impact.AreaOfInterest.Subscription, Unused);
-- addSubscriptionAddress(afrl::impact::LineOfInterest::Subscription);
This.Add_Subscription_Address (AFRL.Impact.LineOfInterest.Subscription, Unused);
-- addSubscriptionAddress(afrl::impact::PointOfInterest::Subscription);
This.Add_Subscription_Address (AFRL.Impact.PointOfInterest.Subscription, Unused);
-- // track all tasks
-- addSubscriptionAddress(afrl::cmasi::Task::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.LmcpTask.Subscription, Unused);
-- std::vector< std::string > childtasks = afrl::cmasi::TaskDescendants();
-- for(auto child : childtasks)
-- addSubscriptionAddress(child);
for Descendant of Lmcptask_Descendants loop
This.Add_Subscription_Address (Descendant, Unused);
end loop;
-- // task removal and initialization
-- addSubscriptionAddress(afrl::cmasi::RemoveTasks::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.RemoveTasks.Subscription, Unused);
-- addSubscriptionAddress(uxas::messages::task::TaskInitialized::Subscription);
This.Add_Subscription_Address (UxAS.Messages.Lmcptask.TaskInitialized.Subscription, Unused);
-- // track errors during automation request pipeline
-- addSubscriptionAddress(afrl::cmasi::ServiceStatus::Subscription);
This.Add_Subscription_Address (AFRL.CMASI.ServiceStatus.Subscription, Unused);
-- return true;
Result := True;
end Configure;
----------------
-- Initialize --
----------------
overriding
procedure Initialize
(This : in out Automation_Request_Validator_Service;
Result : out Boolean)
is
pragma Unreferenced (This); -- since not doing the Timers
begin
-- the C++ version creates the timers here (but we don't, unless we implement the timers).
Result := True;
end Initialize;
-------------------------------
-- Is_Any_Automation_Request --
-------------------------------
function Is_Any_Automation_Request (Msg : Object_Any) return Boolean is
-- else if (afrl::cmasi::isAutomationRequest(receivedLmcpMessage->m_object) ||
-- afrl::impact::isImpactAutomationRequest(receivedLmcpMessage->m_object) ||
-- uxas::messages::task::isTaskAutomationRequest(receivedLmcpMessage->m_object))
(Msg.all in AutomationRequest'Class or
Msg.all in ImpactAutomationRequest'Class or
Msg.all in TaskAutomationRequest'Class);
-----------------------------------
-- Process_Received_LMCP_Message --
-----------------------------------
overriding
procedure Process_Received_LMCP_Message
(This : in out Automation_Request_Validator_Service;
Received_Message : not null Any_LMCP_Message;
Should_Terminate : out Boolean)
is
begin
if Received_Message.Payload.all in EntityConfiguration'Class then
This.Handle_EntityConfig_Msg (EntityConfiguration_Any (Received_Message.Payload));
elsif Received_Message.Payload.all in EntityState'Class then
This.Handle_StateEntity_Msg (EntityState_Any (Received_Message.Payload));
elsif Received_Message.Payload.all in LmcpTask'Class then
This.Handle_InitializedTasks_Msg (LmcpTask_Any (Received_Message.Payload));
elsif Received_Message.Payload.all in ServiceStatus'Class then
This.Handle_ServiceStatus_Msg (Received_Message);
elsif Received_Message.Payload.all in RemoveTasks'Class then
This.Handle_RemoveTasks_Msg (Received_Message);
elsif Received_Message.Payload.all in TaskInitialized'Class then
This.Handle_TaskInitialized_Msg (Received_Message);
elsif Received_Message.Payload.all in AreaOfInterest'Class then
This.Handle_AreaOfInterest_Msg (Received_Message);
elsif Received_Message.Payload.all in LineOfInterest'Class then
This.Handle_LineOfInterest_Msg (Received_Message);
elsif Received_Message.Payload.all in PointofInterest'Class then
This.Handle_PointofInterest_Msg (Received_Message);
elsif Received_Message.Payload.all in KeepInZone'Class then
This.Handle_KeepInZone_Msg (Received_Message);
elsif Received_Message.Payload.all in KeepOutZone'Class then
This.Handle_KeepOutZone_Msg (Received_Message);
elsif Received_Message.Payload.all in OperatingRegion'Class then
This.Handle_OperatingRegion_Msg (Received_Message);
elsif Is_Any_Automation_Request (Received_Message.Payload) then
This.Handle_Automation_Request (Received_Message.Payload);
elsif Received_Message.Payload.all in UniqueAutomationResponse'Class then
This.Handle_Automation_Response (Received_Message.Payload);
end if;
-- Note the C++ code never returns anything other than False...
Should_Terminate := False;
end Process_Received_LMCP_Message;
-----------------------------
-- Handle_EntityConfig_Msg --
-----------------------------
procedure Handle_EntityConfig_Msg
(This : in out Automation_Request_Validator_Service;
EntityConfig : EntityConfiguration_Any)
is
use Int64_Sets;
begin
-- m_availableConfigurationEntityIds.insert(entityConfig->getID());
Include (This.Configs.Available_Configuration_Entity_Ids, EntityConfig.GetID);
end Handle_EntityConfig_Msg;
----------------------------
-- Handle_StateEntity_Msg --
----------------------------
procedure Handle_StateEntity_Msg
(This : in out Automation_Request_Validator_Service;
State : EntityState_Any)
is
use Int64_Sets;
begin
-- m_availableStateEntityIds.insert(entityState->getID());
Include (This.Configs.Available_State_Entity_Ids, State.GetID);
end Handle_StateEntity_Msg;
---------------------------------
-- Handle_InitializedTasks_Msg --
---------------------------------
procedure Handle_InitializedTasks_Msg
(This : in out Automation_Request_Validator_Service;
Job : LmcpTask_Any)
is
use Int64_Sets;
begin
-- m_availableInitializedTasks.erase(task->getTaskID());
Exclude (This.Configs.Available_Initialized_Tasks, Job.GetTaskID);
-- m_availableTasks[task->getTaskID()] = task;
declare
Inserted : Boolean;
C : Int64_CMASI_Task_Maps.Cursor;
use AFRL.Cmasi.LmcpTask.SPARK_Boundary;
Wrapped_Job : constant Task_Kind_And_Id := Get_Kind_And_Id (Job);
begin
Int64_CMASI_Task_Maps.Insert
(This.Configs.Available_Tasks,
Key => Job.GetTaskID,
New_Item => Wrapped_Job,
Position => C,
Inserted => Inserted);
if not Inserted then
Int64_CMASI_Task_Maps.Replace_Element (This.Configs.Available_Tasks, C, Wrapped_Job);
end if;
end;
end Handle_InitializedTasks_Msg;
------------------------------
-- Handle_ServiceStatus_Msg --
------------------------------
procedure Handle_ServiceStatus_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- log any error messages in the assignment pipeline
-- auto sstatus = std::static_pointer_cast<afrl::cmasi::ServiceStatus>(receivedLmcpMessage->m_object);
SStatus : constant ServiceStatus_Any := ServiceStatus_Any (Msg.Payload);
use AFRL.CMASI.Enumerations;
Clone : KeyValuePair_Acc;
begin
-- if(sstatus->getStatusType() == afrl::cmasi::ServiceStatusType::Error)
if SStatus.GetStatusType = Error then
-- for(auto kvp : sstatus->getInfo())
for KVP of SStatus.GetInfo.all loop
-- m_errorResponse->getOriginalResponse()->getInfo().push_back(kvp->clone());
Clone := new KeyValuePair'(KVP.all);
afrl.cmasi.AutomationResponse.Vect_KeyValuePair_Acc.Append (This.Error_Response.GetOriginalResponse.GetInfo.all, Clone);
end loop;
end if;
end Handle_ServiceStatus_Msg;
----------------------------
-- Handle_RemoveTasks_Msg --
----------------------------
procedure Handle_RemoveTasks_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto removeTasks = std::static_pointer_cast<afrl::cmasi::RemoveTasks>(receivedLmcpMessage->m_object);
Remove : constant RemoveTasks_Any := RemoveTasks_Any (Msg.Payload);
C : Int64_CMASI_Task_Maps.Cursor;
use Int64_Sets;
begin
-- for (auto& taskId : removeTasks->getTaskList())
for Id of Remove.GetTaskList.all loop
-- m_availableTasks.erase(taskId);
C := Int64_CMASI_Task_Maps.Find (This.Configs.Available_Tasks, Key => Id);
if Int64_CMASI_Task_Maps.Has_Element (This.Configs.Available_Tasks, C) then
Int64_CMASI_Task_Maps.Delete (This.Configs.Available_Tasks, C);
end if;
-- m_availableInitializedTasks.erase(taskId);
Exclude (This.Configs.Available_Initialized_Tasks, Id);
end loop;
end Handle_RemoveTasks_Msg;
--------------------------------
-- Handle_TaskInitialized_Msg --
--------------------------------
procedure Handle_TaskInitialized_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto taskInitialized = std::static_pointer_cast<uxas::messages::task::TaskInitialized>(receivedLmcpMessage->m_object);
TaskInit : constant TaskInitialized_Any := TaskInitialized_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availableInitializedTasks.insert(taskInitialized->getTaskID());
Include (This.Configs.Available_Initialized_Tasks, TaskInit.GetTaskID);
-- checkTasksInitialized();
SPARK.Check_Tasks_Initialized (This);
end Handle_TaskInitialized_Msg;
-------------------------------
-- Handle_AreaOfInterest_Msg --
-------------------------------
procedure Handle_AreaOfInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto areaOfInterest = std::static_pointer_cast<afrl::impact::AreaOfInterest>(receivedLmcpMessage->m_object);
Area : constant AreaOfInterest_Any := AreaOfInterest_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availableAreaOfInterestIds.insert(areaOfInterest->getAreaID());
Include (This.Configs.Available_Area_Of_Interest_Ids, Area.GetAreaID);
end Handle_AreaOfInterest_Msg;
-------------------------------
-- Handle_LineOfInterest_Msg --
-------------------------------
procedure Handle_LineOfInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto lineOfInterest = std::static_pointer_cast<afrl::impact::LineOfInterest>(receivedLmcpMessage->m_object);
Line : constant LineOfInterest_Any := LineOfInterest_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availableLineOfInterestIds.insert(lineOfInterest->getLineID());
Include (This.Configs.Available_Line_Of_Interest_Ids, Line.GetLineID);
end Handle_LineOfInterest_Msg;
--------------------------------
-- Handle_PointofInterest_Msg --
--------------------------------
procedure Handle_PointofInterest_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto pointOfInterest = std::static_pointer_cast<afrl::impact::PointOfInterest>(receivedLmcpMessage->m_object);
Point : constant PointofInterest_Any := PointofInterest_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availablePointOfInterestIds.insert(pointOfInterest->getPointID());
Include (This.Configs.Available_Point_Of_Interest_Ids, Point.GetPointID);
end Handle_PointofInterest_Msg;
---------------------------
-- Handle_KeepInZone_Msg --
---------------------------
procedure Handle_KeepInZone_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto keepInZone = std::static_pointer_cast<afrl::cmasi::KeepInZone>(receivedLmcpMessage->m_object);
Zone : constant KeepInZone_Any := KeepInZone_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availableKeepInZoneIds.insert(keepInZone->getZoneID());
Include (This.Configs.Available_KeepIn_Zones_Ids, Zone.GetZoneID);
end Handle_KeepInZone_Msg;
----------------------------
-- Handle_KeepOutZone_Msg --
----------------------------
procedure Handle_KeepOutZone_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto keepOutZone = std::static_pointer_cast<afrl::cmasi::KeepOutZone>(receivedLmcpMessage->m_object);
Zone : constant KeepOutZone_Any := KeepOutZone_Any (Msg.Payload);
use Int64_Sets;
begin
-- m_availableKeepOutZoneIds.insert(keepOutZone->getZoneID());
Include (This.Configs.Available_KeepOut_Zones_Ids, Zone.GetZoneID);
end Handle_KeepOutZone_Msg;
--------------------------------
-- Handle_OperatingRegion_Msg --
--------------------------------
procedure Handle_OperatingRegion_Msg
(This : in out Automation_Request_Validator_Service;
Msg : Any_LMCP_Message)
is
-- auto operatingRegion = std::static_pointer_cast<afrl::cmasi::OperatingRegion>(receivedLmcpMessage->m_object);
Region : constant OperatingRegion_Any := OperatingRegion_Any (Msg.Payload);
C : Int64_Operating_Region_Maps.Cursor;
Inserted : Boolean;
Wrapped_Region : constant OperatingRegionAreas := Get_Areas (OperatingRegion (Region.all));
begin
-- m_availableOperatingRegions[operatingRegion->getID()] = operatingRegion;
Int64_Operating_Region_Maps.Insert
(This.Configs.Available_Operating_Regions,
Key => Region.GetID,
New_Item => Wrapped_Region,
Position => C,
Inserted => Inserted);
if not Inserted then
Int64_Operating_Region_Maps.Replace_Element (This.Configs.Available_Operating_Regions, C, Wrapped_Region);
end if;
end Handle_OperatingRegion_Msg;
-------------------------------
-- Handle_Automation_Request --
-------------------------------
procedure Handle_Automation_Request
(This : in out Automation_Request_Validator_Service;
Request : Object_Any)
is
begin
SPARK.Handle_Automation_Request (This, Auto_Request => Wrap (Request));
end Handle_Automation_Request;
--------------------------------
-- Handle_Automation_Response --
--------------------------------
procedure Handle_Automation_Response
(This : in out Automation_Request_Validator_Service;
Response : Object_Any)
is
-- auto resp = std::static_pointer_cast<uxas::messages::task::UniqueAutomationResponse>(autoResponse);
Resp : constant UniqueAutomationResponse_Acc := UniqueAutomationResponse_Acc (Response);
Resp_Id : Int64;
use UniqueAutomationRequest_Lists;
begin
-- if(m_pendingRequests.empty()) return;
if Is_Empty (This.Pending_Requests) then
return;
end if;
Resp_Id := Resp.GetResponseID;
-- if (m_pendingRequests.front()->getRequestID() == resp->getResponseID() &&
-- m_sandboxMap.find(resp->getResponseID()) != m_sandboxMap.end())
if GetRequestId (First_Element (This.Pending_Requests).Content) = Resp_Id and
Int64_Request_Details_Maps.Contains (This.Sandbox, Resp_Id)
then
-- SendResponse(resp);
This.Send_Response (Resp);
-- m_sandboxMap.erase(resp->getResponseID());
Int64_Request_Details_Maps.Delete (This.Sandbox, Resp_Id);
-- m_pendingRequests.pop_front();
Delete_First (This.Pending_Requests);
-- sendNextRequest();
This.Send_Next_Request;
end if;
end Handle_Automation_Response;
-------------------
-- Send_Response --
-------------------
procedure Send_Response
(This : in out Automation_Request_Validator_Service;
Resp : UniqueAutomationResponse_Acc)
is
Request : Request_Details;
use Int64_Request_Details_Maps;
C : Cursor;
begin
C := Find (This.Sandbox, Key => Resp.getResponseID);
-- if(m_sandboxMap.find(resp->getResponseID()) == m_sandboxMap.end())
if C = No_Element then
-- can't find a corresponding type, so just send out a normal one
declare
-- auto cleanResponse = std::shared_ptr<afrl::cmasi::AutomationResponse>(resp->getOriginalResponse()->clone());
CleanResponse : constant Object_Any := new AutomationResponse'(Resp.GetOriginalResponse.all);
begin
-- sendSharedLmcpObjectBroadcastMessage(cleanResponse);
This.Send_Shared_LMCP_Object_Broadcast_Message (CleanResponse);
-- return;
return;
end;
end if;
-- Ada: we know C designates an element so get it once, here, instead of serveral times below
Request := Element (This.Sandbox, C);
-- if (m_sandboxMap[resp->getResponseID()].requestType == TASK_AUTOMATION_REQUEST)
if Request.RequestType = Task_Automation_Request then
declare
-- auto taskResponse = std::make_shared<uxas::messages::task::TaskAutomationResponse>();
TaskResponse : constant TaskAutomationResponse_Acc := new TaskAutomationResponse;
begin
-- taskResponse->setOriginalResponse(resp->getOriginalResponse()->clone());
TaskResponse.setOriginalResponse (new AutomationResponse'(Resp.getOriginalResponse.all));
-- taskResponse->setResponseID(m_sandboxMap[resp->getResponseID()].taskRequestId);
TaskResponse.setResponseId (Request.Task_Request_Id);
-- add FinalStates to task responses
-- for(auto st : resp->getFinalStates())
for St of Resp.getFinalStates.all loop
-- taskResponse->getFinalStates().push_back(st->clone());
uxas.messages.lmcptask.TaskAutomationResponse.Vect_PlanningState_Acc.Append (TaskResponse.getFinalStates.all, new PlanningState'(St.all));
end loop;
-- sendSharedLmcpObjectBroadcastMessage(taskResponse);
This.Send_Shared_LMCP_Object_Broadcast_Message (Object_Any (TaskResponse));
end;
-- else if (m_sandboxMap[resp->getResponseID()].requestType == AUTOMATION_REQUEST)
elsif Request.RequestType = Automation_Request then
declare
-- auto cleanResponse = std::shared_ptr<afrl::cmasi::AutomationResponse>(resp->getOriginalResponse()->clone());
CleanResponse : constant Object_Any := new AutomationResponse'(Resp.GetOriginalResponse.all);
begin
-- sendSharedLmcpObjectBroadcastMessage(cleanResponse);
This.Send_Shared_LMCP_Object_Broadcast_Message (CleanResponse);
end;
else
-- look up play and solution IDs
declare
-- auto sandResponse = std::shared_ptr<afrl::impact::ImpactAutomationResponse> (new afrl::impact::ImpactAutomationResponse);
SandResponse : constant ImpactAutomationResponse_Acc := new ImpactAutomationResponse;
begin
-- sandResponse->setPlayID(m_sandboxMap[resp->getResponseID()].playId);
SandResponse.setPlayID (Request.Play_Id);
-- sandResponse->setSolutionID(m_sandboxMap[resp->getResponseID()].solnId);
SandResponse.setSolutionID (Request.Soln_Id);
-- sandResponse->setTrialResponse(resp->getOriginalResponse()->clone());
SandResponse.setTrialResponse (new AutomationResponse'(Resp.GetOriginalResponse.all));
-- sandResponse->setSandbox(true);
SandResponse.setSandbox (True);
-- sendSharedLmcpObjectBroadcastMessage(sandResponse);
This.Send_Shared_LMCP_Object_Broadcast_Message (Object_Any (SandResponse));
end;
end if;
end Send_Response;
-----------------------
-- Send_Next_Request --
-----------------------
procedure Send_Next_Request
(This : in out Automation_Request_Validator_Service)
is
Request : UniqueAutomationRequest_Acc;
use UniqueAutomationRequest_Lists;
begin
if Is_Empty (This.Pending_Requests) then
-- // no other requests in queue, disable timer
-- uxas::common::TimerManager::getInstance().disableTimer(m_responseTimerId,0);
-- return;
return;
end if;
-- // retrieve next request to send out
-- auto uniqueAutomationRequest = m_pendingRequests.front();
Request := new UniqueAutomationRequest'(Unwrap (First_Element (This.Pending_Requests).Content));
-- // sending a new request, so clear out the old errors
-- m_errorResponse->setOriginalResponse(new afrl::cmasi::AutomationResponse);
This.Error_Response.setOriginalResponse (new AutomationResponse);
-- m_errorResponse->setResponseID(uniqueAutomationRequest->getRequestID());
This.Error_Response.setResponseID (Request.getRequestID);
-- // send next request
-- sendSharedLmcpObjectBroadcastMessage(uniqueAutomationRequest);
This.Send_Shared_LMCP_Object_Broadcast_Message (Object_Any (Request));
-- // report start of assignment pipeline
declare
Service : ServiceStatus_Acc;
KVP : KeyValuePair_Acc;
use Ada.Strings.Unbounded;
Message : Unbounded_String;
begin
-- auto serviceStatus = std::make_shared<afrl::cmasi::ServiceStatus>();
Service := new ServiceStatus;
-- serviceStatus->setStatusType(afrl::cmasi::ServiceStatusType::Information);
Service.SetStatusType (AFRL.CMASI.Enumerations.Information);
-- auto keyValuePair = new afrl::cmasi::KeyValuePair;
KVP := new KeyValuePair;
-- std::string message = "UniqueAutomationRequest[" + std::to_string(uniqueAutomationRequest->getRequestID()) + "] - sent";
Message := To_Unbounded_String ("UniqueAutomationRequest[" & String_Utils.To_String (Request.getRequestID) & "] - sent");
-- keyValuePair->setKey(message);
KVP.setKey (Message);
-- serviceStatus->getInfo().push_back(keyValuePair);
AFRL.CMASI.ServiceStatus.Vect_KeyValuePair_Acc.Append (Service.getInfo.all, KVP);
-- keyValuePair = nullptr;
-- sendSharedLmcpObjectBroadcastMessage(serviceStatus);
This.Send_Shared_LMCP_Object_Broadcast_Message (Object_Any (Service));
end;
-- // reset the timer
-- uxas::common::TimerManager::getInstance().startSingleShotTimer(m_responseTimerId, m_maxResponseTime_ms);
end Send_Next_Request;
----------------------
-- UInt32_Attribute --
----------------------
function UInt32_Attribute
(XML_Node : DOM.Core.Element;
Name : String;
Default : UInt32)
return UInt32
is
use DOM.Core;
Attr_Value : constant DOM_String := Elements.Get_Attribute (XML_Node, Name);
begin
if Attr_Value /= "" and then (for all C of Attr_Value => C in '0' .. '9')
then
return UInt32'Value (Attr_Value);
else
return Default;
end if;
end UInt32_Attribute;
-----------------------------
-- Package Executable Part --
-----------------------------
-- This is the executable part for the package, invoked automatically and only once.
begin
-- All concrete service subclasses must call this procedure in their
-- own package like this, with their own params. The effect is the same as the
-- following:
--
-- AutomationRequestValidatorService::ServiceBase::CreationRegistrar<AutomationRequestValidatorService>
-- AutomationRequestValidatorService::s_registrar(AutomationRequestValidatorService::s_registryServiceTypeNames());
--
-- located at the top of the cpp file
Register_Service_Creation_Function_Pointers (Registry_Service_Type_Names, Create'Access);
end UxAS.Comms.LMCP_Net_Client.Service.Automation_Request_Validation;
|
programs/oeis/088/A088218.asm | neoneye/loda | 22 | 85538 | <reponame>neoneye/loda
; A088218: Total number of leaves in all rooted ordered trees with n edges.
; 1,1,3,10,35,126,462,1716,6435,24310,92378,352716,1352078,5200300,20058300,77558760,300540195,1166803110,4537567650,17672631900,68923264410,269128937220,1052049481860,4116715363800,16123801841550,63205303218876,247959266474052,973469712824056,3824345300380220,15033633249770520,59132290782430712,232714176627630544,916312070471295267,3609714217008132870,14226520737620288370,56093138908331422716,221256270138418389602,873065282167813104916,3446310324346630677300,13608507434599516007800,53753604366668088230810,212392290424395860814420,839455243105945545123660,3318776542511877736535400,13124252690842425594480900,51913710643776705684835560,205397724721029574666088520,812850570172585125274307760,3217533506933149454210801550,12738806129490428451365214300,50445672272782096667406248628,199804427433372226016001220056,791532924062974587678774064068,3136262529306125724764953838760,12428892245768720464809261509160,49263609265046928387789436527216,195295022443578894680165266232892,774327632846470705223111406467256,3070609578529107968988200404956360,12178349853827309571919303301013360,48307454420181661301946569760686328,191645966716130525165099506263706416,760401738905937245009910944207609328
sub $2,$0
bin $2,$0
gcd $1,$2
mov $0,$1
|
LISTA3/main.adb | druzzt/NIEZAWODNE_SYSTEMY_INFORMATYCZNE | 0 | 20455 | with Ada.Text_IO; use Ada.Text_IO;
with Railway; use Railway;
procedure Main is
OK : Boolean;
-- change TRYB to check for different possibilities of crash situation:
-- TRYB = 0 => From Left to Right - no crash.
-- TRYB = 1 => From Right to Left - no crash.
-- TRYB = 2 => Simulated crash in the middle, RightTrain waits on middle for LeftTrain.
-- TRYB = 3 => Train starts from Left, moves to the Middle, then back to Left,
-- and then to the Middle, next to the Right, back to the Middle,
-- and then again to the Right and at last Leaves at the right side the segments.
TRYB : Integer := 3;
begin
if TRYB = 0 then
--Od lewej do prawej
Put_Line("Normal -> Left -> Middle -> Right:");
Open_Route ( Route_Enter_Left, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Enter_Left, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Middle_Right, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Middle_Right, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Leave_Right, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Leave_Right, OK ); Put_Line(Boolean'Image(OK));
elsif TRYB = 1 then
-- A teraz w druga strone
Put_Line("Normal -> Right -> Middle -> Left:");
Open_Route ( Route_Enter_Right, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Enter_Right, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Right_Middle, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Right_Middle, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Middle_Left, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Middle_Left, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Leave_Left, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Leave_Left, OK ); Put_Line(Boolean'Image(OK));
elsif TRYB = 2 then
-- A teraz wymuszone zderzenie
Put_Line("Simulated crash -> Right -> Middle");
Put_Line("----------with-- -> Left -> Middle:");
Open_Route ( Route_Enter_Right, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Enter_Right, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Enter_Left, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Enter_Left, OK ); Put_Line(Boolean'Image(OK));
Open_Route ( Route_Right_Middle, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Right_Middle, OK ); Put_Line(Boolean'Image(OK));
Put_Line("RightTrain is now on Middle. LeftTrain aproaching Middle. Has trains crashed?");
Open_Route ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
Move_Train ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
if OK=True then Put_Line("CRASH!");
else Put_Line("TRAFFIC STOPPED, possibility of crash");
end if;
elsif TRYB = 3 then
-- teraz kilka szybkich testow dwójkami
Put_Line("Back and forth:");
Put_Line("-> Left -> Middle");
Train ( Route_Enter_Left, OK ); Put_Line(Boolean'Image(OK));
Train ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
Put_Line(" Left <- Middle ");
Train ( Route_Middle_Left, OK ); Put_Line(Boolean'Image(OK));
Put_Line(" Left -> Middle -> Right");
Train ( Route_Left_Middle, OK ); Put_Line(Boolean'Image(OK));
Train ( Route_Middle_Right, OK ); Put_Line(Boolean'Image(OK));
Put_Line(" Middle <- Right");
Train ( Route_Right_Middle, OK ); Put_Line(Boolean'Image(OK));
Put_Line(" Middle -> Right -> ");
Train ( Route_Middle_Right, OK ); Put_Line(Boolean'Image(OK));
Train ( Route_Leave_Right, OK ); Put_Line(Boolean'Image(OK));
if OK = True then Put_Line("Train exited segments successfuly!");
else Put_Line("Train met some problems");
end if;
elsif TRYB = 4 then
null;
else
Put_Line("Podany tryb jest niepoprawny");
end if;
end Main;
|
Setoids/Equality.agda | Smaug123/agdaproofs | 4 | 4696 | <filename>Setoids/Equality.agda
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Sets.EquivalenceRelations
open import Setoids.Setoids
module Setoids.Equality {a b : _} {A : Set a} (S : Setoid {a} {b} A) where
open import Setoids.Subset S
_=S_ : {c d : _} {pred1 : A → Set c} {pred2 : A → Set d} (s1 : subset pred1) (s2 : subset pred2) → Set _
_=S_ {pred1 = pred1} {pred2} s1 s2 = (x : A) → (pred1 x → pred2 x) && (pred2 x → pred1 x)
setoidEqualitySymmetric : {c d : _} {pred1 : A → Set c} {pred2 : A → Set d} → (s1 : subset pred1) (s2 : subset pred2) → s1 =S s2 → s2 =S s1
setoidEqualitySymmetric s1 s2 s1=s2 x = _&&_.snd (s1=s2 x) ,, _&&_.fst (s1=s2 x)
setoidEqualityTransitive : {c d e : _} {pred1 : A → Set c} {pred2 : A → Set d} {pred3 : A → Set e} (s1 : subset pred1) (s2 : subset pred2) (s3 : subset pred3) → s1 =S s2 → s2 =S s3 → s1 =S s3
setoidEqualityTransitive s1 s2 s3 s1=s2 s2=s3 x with s1=s2 x
setoidEqualityTransitive s1 s2 s3 s1=s2 s2=s3 x | p1top2 ,, p1top2' with s2=s3 x
setoidEqualityTransitive s1 s2 s3 s1=s2 s2=s3 x | p1top2 ,, p1top2' | fst ,, snd = (λ i → fst (p1top2 i)) ,, λ i → p1top2' (snd i)
setoidEqualityReflexive : {c : _} {pred : A → Set c} (s : subset pred) → s =S s
setoidEqualityReflexive s x = (λ x → x) ,, λ x → x
|
target/cos_117/disasm/iop_overlay1/TJOB.asm | jrrk2/cray-sim | 49 | 18347 | <reponame>jrrk2/cray-sim<filename>target/cos_117/disasm/iop_overlay1/TJOB.asm
0x0000 (0x000000) 0x2104- f:00020 d: 260 | A = OR[260]
0x0001 (0x000002) 0x290D- f:00024 d: 269 | OR[269] = A
0x0002 (0x000004) 0x2104- f:00020 d: 260 | A = OR[260]
0x0003 (0x000006) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x0004 (0x000008) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC)
0x0006 (0x00000C) 0x2904- f:00024 d: 260 | OR[260] = A
0x0007 (0x00000E) 0x2104- f:00020 d: 260 | A = OR[260]
0x0008 (0x000010) 0x291F- f:00024 d: 287 | OR[287] = A
0x0009 (0x000012) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x000A (0x000014) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x000B (0x000016) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002)
0x000C (0x000018) 0x2504- f:00022 d: 260 | A = A + OR[260]
0x000D (0x00001A) 0x2904- f:00024 d: 260 | OR[260] = A
0x000E (0x00001C) 0x2104- f:00020 d: 260 | A = OR[260]
0x000F (0x00001E) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x0010 (0x000020) 0xB234- f:00131 d: 52 | R = OR[52], C = 1
0x0011 (0x000022) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x0012 (0x000024) 0x210D- f:00020 d: 269 | A = OR[269]
0x0013 (0x000026) 0x3904- f:00034 d: 260 | (OR[260]) = A
0x0014 (0x000028) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1
0x0015 (0x00002A) 0x211F- f:00020 d: 287 | A = OR[287]
0x0016 (0x00002C) 0x1410- f:00012 d: 16 | A = A + 16 (0x0010)
0x0017 (0x00002E) 0x2920- f:00024 d: 288 | OR[288] = A
0x0018 (0x000030) 0x2120- f:00020 d: 288 | A = OR[288]
0x0019 (0x000032) 0x1428- f:00012 d: 40 | A = A + 40 (0x0028)
0x001A (0x000034) 0x2921- f:00024 d: 289 | OR[289] = A
0x001B (0x000036) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x001C (0x000038) 0x2922- f:00024 d: 290 | OR[290] = A
0x001D (0x00003A) 0x211E- f:00020 d: 286 | A = OR[286]
0x001E (0x00003C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0020), A = 0
0x001F (0x00003E) 0x7013- f:00070 d: 19 | P = P + 19 (0x0032)
0x0020 (0x000040) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x0021 (0x000042) 0x2925- f:00024 d: 293 | OR[293] = A
0x0022 (0x000044) 0x2118- f:00020 d: 280 | A = OR[280]
0x0023 (0x000046) 0x2926- f:00024 d: 294 | OR[294] = A
0x0024 (0x000048) 0x2119- f:00020 d: 281 | A = OR[281]
0x0025 (0x00004A) 0x2927- f:00024 d: 295 | OR[295] = A
0x0026 (0x00004C) 0x211F- f:00020 d: 287 | A = OR[287]
0x0027 (0x00004E) 0x2928- f:00024 d: 296 | OR[296] = A
0x0028 (0x000050) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0029 (0x000052) 0x2929- f:00024 d: 297 | OR[297] = A
0x002A (0x000054) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x002B (0x000056) 0x292A- f:00024 d: 298 | OR[298] = A
0x002C (0x000058) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x002D (0x00005A) 0x5800- f:00054 d: 0 | B = A
0x002E (0x00005C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x002F (0x00005E) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0030 (0x000060) 0x2D19- f:00026 d: 281 | OR[281] = OR[281] + 1
0x0031 (0x000062) 0x2F1A- f:00027 d: 282 | OR[282] = OR[282] - 1
0x0032 (0x000064) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0034 (0x000068) 0x2003- f:00020 d: 3 | A = OR[3]
0x0035 (0x00006A) 0x1C00-0x02B3 f:00016 d: 0 | A = A + 691 (0x02B3)
0x0037 (0x00006E) 0x2913- f:00024 d: 275 | OR[275] = A
0x0038 (0x000070) 0x1014- f:00010 d: 20 | A = 20 (0x0014)
0x0039 (0x000072) 0x2914- f:00024 d: 276 | OR[276] = A
0x003A (0x000074) 0x101E- f:00010 d: 30 | A = 30 (0x001E)
0x003B (0x000076) 0x2915- f:00024 d: 277 | OR[277] = A
0x003C (0x000078) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x003E (0x00007C) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x0040 (0x000080) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0042 (0x000084) 0x2003- f:00020 d: 3 | A = OR[3]
0x0043 (0x000086) 0x1C00-0x02BE f:00016 d: 0 | A = A + 702 (0x02BE)
0x0045 (0x00008A) 0x2913- f:00024 d: 275 | OR[275] = A
0x0046 (0x00008C) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x0047 (0x00008E) 0x2914- f:00024 d: 276 | OR[276] = A
0x0048 (0x000090) 0x1044- f:00010 d: 68 | A = 68 (0x0044)
0x0049 (0x000092) 0x2915- f:00024 d: 277 | OR[277] = A
0x004A (0x000094) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x004C (0x000098) 0x211D- f:00020 d: 285 | A = OR[285]
0x004D (0x00009A) 0x2913- f:00024 d: 275 | OR[275] = A
0x004E (0x00009C) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x004F (0x00009E) 0x2914- f:00024 d: 276 | OR[276] = A
0x0050 (0x0000A0) 0x104A- f:00010 d: 74 | A = 74 (0x004A)
0x0051 (0x0000A2) 0x2915- f:00024 d: 277 | OR[277] = A
0x0052 (0x0000A4) 0x75AB- f:00072 d: 427 | R = P + 427 (0x01FD)
0x0053 (0x0000A6) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x0055 (0x0000AA) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0057 (0x0000AE) 0x2003- f:00020 d: 3 | A = OR[3]
0x0058 (0x0000B0) 0x1C00-0x02C1 f:00016 d: 0 | A = A + 705 (0x02C1)
0x005A (0x0000B4) 0x2913- f:00024 d: 275 | OR[275] = A
0x005B (0x0000B6) 0x1011- f:00010 d: 17 | A = 17 (0x0011)
0x005C (0x0000B8) 0x2914- f:00024 d: 276 | OR[276] = A
0x005D (0x0000BA) 0x1027- f:00010 d: 39 | A = 39 (0x0027)
0x005E (0x0000BC) 0x2915- f:00024 d: 277 | OR[277] = A
0x005F (0x0000BE) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0061 (0x0000C2) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x0063 (0x0000C6) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0065 (0x0000CA) 0x2003- f:00020 d: 3 | A = OR[3]
0x0066 (0x0000CC) 0x1C00-0x02CA f:00016 d: 0 | A = A + 714 (0x02CA)
0x0068 (0x0000D0) 0x2913- f:00024 d: 275 | OR[275] = A
0x0069 (0x0000D2) 0x1049- f:00010 d: 73 | A = 73 (0x0049)
0x006A (0x0000D4) 0x2914- f:00024 d: 276 | OR[276] = A
0x006B (0x0000D6) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x006C (0x0000D8) 0x2915- f:00024 d: 277 | OR[277] = A
0x006D (0x0000DA) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x006F (0x0000DE) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x0071 (0x0000E2) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0073 (0x0000E6) 0x2003- f:00020 d: 3 | A = OR[3]
0x0074 (0x0000E8) 0x1C00-0x02EF f:00016 d: 0 | A = A + 751 (0x02EF)
0x0076 (0x0000EC) 0x2913- f:00024 d: 275 | OR[275] = A
0x0077 (0x0000EE) 0x1049- f:00010 d: 73 | A = 73 (0x0049)
0x0078 (0x0000F0) 0x2914- f:00024 d: 276 | OR[276] = A
0x0079 (0x0000F2) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x007A (0x0000F4) 0x2915- f:00024 d: 277 | OR[277] = A
0x007B (0x0000F6) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x007D (0x0000FA) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x007F (0x0000FE) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0081 (0x000102) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0082 (0x000104) 0x2923- f:00024 d: 291 | OR[291] = A
0x0083 (0x000106) 0x211E- f:00020 d: 286 | A = OR[286]
0x0084 (0x000108) 0x8602- f:00103 d: 2 | P = P + 2 (0x0086), A # 0
0x0085 (0x00010A) 0x7013- f:00070 d: 19 | P = P + 19 (0x0098)
0x0086 (0x00010C) 0x2003- f:00020 d: 3 | A = OR[3]
0x0087 (0x00010E) 0x1C00-0x03A6 f:00016 d: 0 | A = A + 934 (0x03A6)
0x0089 (0x000112) 0x2913- f:00024 d: 275 | OR[275] = A
0x008A (0x000114) 0x100D- f:00010 d: 13 | A = 13 (0x000D)
0x008B (0x000116) 0x2914- f:00024 d: 276 | OR[276] = A
0x008C (0x000118) 0x1022- f:00010 d: 34 | A = 34 (0x0022)
0x008D (0x00011A) 0x2915- f:00024 d: 277 | OR[277] = A
0x008E (0x00011C) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0090 (0x000120) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x0092 (0x000124) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x0094 (0x000128) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0095 (0x00012A) 0x291A- f:00024 d: 282 | OR[282] = A
0x0096 (0x00012C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0097 (0x00012E) 0x2923- f:00024 d: 291 | OR[291] = A
0x0098 (0x000130) 0x2122- f:00020 d: 290 | A = OR[290]
0x0099 (0x000132) 0x271C- f:00023 d: 284 | A = A - OR[284]
0x009A (0x000134) 0x854F- f:00102 d: 335 | P = P + 335 (0x01E9), A = 0
0x009B (0x000136) 0x211A- f:00020 d: 282 | A = OR[282]
0x009C (0x000138) 0x8602- f:00103 d: 2 | P = P + 2 (0x009E), A # 0
0x009D (0x00013A) 0x7135- f:00070 d: 309 | P = P + 309 (0x01D2)
0x009E (0x00013C) 0x1026- f:00010 d: 38 | A = 38 (0x0026)
0x009F (0x00013E) 0x2925- f:00024 d: 293 | OR[293] = A
0x00A0 (0x000140) 0x2118- f:00020 d: 280 | A = OR[280]
0x00A1 (0x000142) 0x2926- f:00024 d: 294 | OR[294] = A
0x00A2 (0x000144) 0x2119- f:00020 d: 281 | A = OR[281]
0x00A3 (0x000146) 0x2927- f:00024 d: 295 | OR[295] = A
0x00A4 (0x000148) 0x211F- f:00020 d: 287 | A = OR[287]
0x00A5 (0x00014A) 0x2928- f:00024 d: 296 | OR[296] = A
0x00A6 (0x00014C) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x00A7 (0x00014E) 0x2929- f:00024 d: 297 | OR[297] = A
0x00A8 (0x000150) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00A9 (0x000152) 0x292A- f:00024 d: 298 | OR[298] = A
0x00AA (0x000154) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x00AB (0x000156) 0x5800- f:00054 d: 0 | B = A
0x00AC (0x000158) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00AD (0x00015A) 0x7C09- f:00076 d: 9 | R = OR[9]
0x00AE (0x00015C) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x00AF (0x00015E) 0x2B19- f:00025 d: 281 | OR[281] = A + OR[281]
0x00B0 (0x000160) 0x211A- f:00020 d: 282 | A = OR[282]
0x00B1 (0x000162) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004)
0x00B2 (0x000164) 0x291A- f:00024 d: 282 | OR[282] = A
0x00B3 (0x000166) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x00B4 (0x000168) 0x2924- f:00024 d: 292 | OR[292] = A
0x00B5 (0x00016A) 0x211F- f:00020 d: 287 | A = OR[287]
0x00B6 (0x00016C) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B)
0x00B7 (0x00016E) 0x2908- f:00024 d: 264 | OR[264] = A
0x00B8 (0x000170) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00B9 (0x000172) 0x2913- f:00024 d: 275 | OR[275] = A
0x00BA (0x000174) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x00BB (0x000176) 0x2914- f:00024 d: 276 | OR[276] = A
0x00BC (0x000178) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x00BD (0x00017A) 0x2915- f:00024 d: 277 | OR[277] = A
0x00BE (0x00017C) 0x753F- f:00072 d: 319 | R = P + 319 (0x01FD)
0x00BF (0x00017E) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x00C0 (0x000180) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x00C1 (0x000182) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x00C2 (0x000184) 0x2913- f:00024 d: 275 | OR[275] = A
0x00C3 (0x000186) 0x1007- f:00010 d: 7 | A = 7 (0x0007)
0x00C4 (0x000188) 0x2914- f:00024 d: 276 | OR[276] = A
0x00C5 (0x00018A) 0x100A- f:00010 d: 10 | A = 10 (0x000A)
0x00C6 (0x00018C) 0x2915- f:00024 d: 277 | OR[277] = A
0x00C7 (0x00018E) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x00C9 (0x000192) 0x211F- f:00020 d: 287 | A = OR[287]
0x00CA (0x000194) 0x140D- f:00012 d: 13 | A = A + 13 (0x000D)
0x00CB (0x000196) 0x2908- f:00024 d: 264 | OR[264] = A
0x00CC (0x000198) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00CD (0x00019A) 0x2913- f:00024 d: 275 | OR[275] = A
0x00CE (0x00019C) 0x2113- f:00020 d: 275 | A = OR[275]
0x00CF (0x00019E) 0x1E00-0x494E f:00017 d: 0 | A = A - 18766 (0x494E)
0x00D1 (0x0001A2) 0x8602- f:00103 d: 2 | P = P + 2 (0x00D3), A # 0
0x00D2 (0x0001A4) 0x7003- f:00070 d: 3 | P = P + 3 (0x00D5)
0x00D3 (0x0001A6) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x00D4 (0x0001A8) 0x2924- f:00024 d: 292 | OR[292] = A
0x00D5 (0x0001AA) 0x211F- f:00020 d: 287 | A = OR[287]
0x00D6 (0x0001AC) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004)
0x00D7 (0x0001AE) 0x2908- f:00024 d: 264 | OR[264] = A
0x00D8 (0x0001B0) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00D9 (0x0001B2) 0x080F- f:00004 d: 15 | A = A > 15 (0x000F)
0x00DA (0x0001B4) 0x2913- f:00024 d: 275 | OR[275] = A
0x00DB (0x0001B6) 0x2113- f:00020 d: 275 | A = OR[275]
0x00DC (0x0001B8) 0x8402- f:00102 d: 2 | P = P + 2 (0x00DE), A = 0
0x00DD (0x0001BA) 0x7011- f:00070 d: 17 | P = P + 17 (0x00EE)
0x00DE (0x0001BC) 0x211F- f:00020 d: 287 | A = OR[287]
0x00DF (0x0001BE) 0x1407- f:00012 d: 7 | A = A + 7 (0x0007)
0x00E0 (0x0001C0) 0x2908- f:00024 d: 264 | OR[264] = A
0x00E1 (0x0001C2) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00E2 (0x0001C4) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x00E3 (0x0001C6) 0x2913- f:00024 d: 275 | OR[275] = A
0x00E4 (0x0001C8) 0x2113- f:00020 d: 275 | A = OR[275]
0x00E5 (0x0001CA) 0x1641- f:00013 d: 65 | A = A - 65 (0x0041)
0x00E6 (0x0001CC) 0x0A02- f:00005 d: 2 | A = A < 2 (0x0002)
0x00E7 (0x0001CE) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x00E8 (0x0001D0) 0x1C00-0x0314 f:00016 d: 0 | A = A + 788 (0x0314)
0x00EA (0x0001D4) 0x2913- f:00024 d: 275 | OR[275] = A
0x00EB (0x0001D6) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x00EC (0x0001D8) 0x2914- f:00024 d: 276 | OR[276] = A
0x00ED (0x0001DA) 0x7007- f:00070 d: 7 | P = P + 7 (0x00F4)
0x00EE (0x0001DC) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x00EF (0x0001DE) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x00F0 (0x0001E0) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x00F1 (0x0001E2) 0x2913- f:00024 d: 275 | OR[275] = A
0x00F2 (0x0001E4) 0x1008- f:00010 d: 8 | A = 8 (0x0008)
0x00F3 (0x0001E6) 0x2914- f:00024 d: 276 | OR[276] = A
0x00F4 (0x0001E8) 0x1014- f:00010 d: 20 | A = 20 (0x0014)
0x00F5 (0x0001EA) 0x2915- f:00024 d: 277 | OR[277] = A
0x00F6 (0x0001EC) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x00F8 (0x0001F0) 0x211F- f:00020 d: 287 | A = OR[287]
0x00F9 (0x0001F2) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x00FA (0x0001F4) 0x2908- f:00024 d: 264 | OR[264] = A
0x00FB (0x0001F6) 0x3108- f:00030 d: 264 | A = (OR[264])
0x00FC (0x0001F8) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004)
0x00FD (0x0001FA) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x00FE (0x0001FC) 0x2913- f:00024 d: 275 | OR[275] = A
0x00FF (0x0001FE) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0100 (0x000200) 0x2914- f:00024 d: 276 | OR[276] = A
0x0101 (0x000202) 0x101C- f:00010 d: 28 | A = 28 (0x001C)
0x0102 (0x000204) 0x2915- f:00024 d: 277 | OR[277] = A
0x0103 (0x000206) 0x74FA- f:00072 d: 250 | R = P + 250 (0x01FD)
0x0104 (0x000208) 0x211F- f:00020 d: 287 | A = OR[287]
0x0105 (0x00020A) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009)
0x0106 (0x00020C) 0x2908- f:00024 d: 264 | OR[264] = A
0x0107 (0x00020E) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0108 (0x000210) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F)
0x0109 (0x000212) 0x2913- f:00024 d: 275 | OR[275] = A
0x010A (0x000214) 0x2113- f:00020 d: 275 | A = OR[275]
0x010B (0x000216) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x010C (0x000218) 0x1C00-0x037C f:00016 d: 0 | A = A + 892 (0x037C)
0x010E (0x00021C) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x010F (0x00021E) 0x2913- f:00024 d: 275 | OR[275] = A
0x0110 (0x000220) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x0111 (0x000222) 0x2914- f:00024 d: 276 | OR[276] = A
0x0112 (0x000224) 0x101E- f:00010 d: 30 | A = 30 (0x001E)
0x0113 (0x000226) 0x2915- f:00024 d: 277 | OR[277] = A
0x0114 (0x000228) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0116 (0x00022C) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x0117 (0x00022E) 0x2914- f:00024 d: 276 | OR[276] = A
0x0118 (0x000230) 0x1022- f:00010 d: 34 | A = 34 (0x0022)
0x0119 (0x000232) 0x2915- f:00024 d: 277 | OR[277] = A
0x011A (0x000234) 0x2124- f:00020 d: 292 | A = OR[292]
0x011B (0x000236) 0x8402- f:00102 d: 2 | P = P + 2 (0x011D), A = 0
0x011C (0x000238) 0x702B- f:00070 d: 43 | P = P + 43 (0x0147)
0x011D (0x00023A) 0x311F- f:00030 d: 287 | A = (OR[287])
0x011E (0x00023C) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x011F (0x00023E) 0x2913- f:00024 d: 275 | OR[275] = A
0x0120 (0x000240) 0x2113- f:00020 d: 275 | A = OR[275]
0x0121 (0x000242) 0x8402- f:00102 d: 2 | P = P + 2 (0x0123), A = 0
0x0122 (0x000244) 0x701E- f:00070 d: 30 | P = P + 30 (0x0140)
0x0123 (0x000246) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0124 (0x000248) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0125 (0x00024A) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0126 (0x00024C) 0x2913- f:00024 d: 275 | OR[275] = A
0x0127 (0x00024E) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0128 (0x000250) 0x2925- f:00024 d: 293 | OR[293] = A
0x0129 (0x000252) 0x1800-0x000F f:00014 d: 0 | A = 15 (0x000F)
0x012B (0x000256) 0x2926- f:00024 d: 294 | OR[294] = A
0x012C (0x000258) 0x2113- f:00020 d: 275 | A = OR[275]
0x012D (0x00025A) 0x2927- f:00024 d: 295 | OR[295] = A
0x012E (0x00025C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x012F (0x00025E) 0x2928- f:00024 d: 296 | OR[296] = A
0x0130 (0x000260) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x0131 (0x000262) 0x2929- f:00024 d: 297 | OR[297] = A
0x0132 (0x000264) 0x2120- f:00020 d: 288 | A = OR[288]
0x0133 (0x000266) 0x292A- f:00024 d: 298 | OR[298] = A
0x0134 (0x000268) 0x2115- f:00020 d: 277 | A = OR[277]
0x0135 (0x00026A) 0x292B- f:00024 d: 299 | OR[299] = A
0x0136 (0x00026C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0137 (0x00026E) 0x292C- f:00024 d: 300 | OR[300] = A
0x0138 (0x000270) 0x2114- f:00020 d: 276 | A = OR[276]
0x0139 (0x000272) 0x292D- f:00024 d: 301 | OR[301] = A
0x013A (0x000274) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x013B (0x000276) 0x5800- f:00054 d: 0 | B = A
0x013C (0x000278) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18)
0x013E (0x00027C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x013F (0x00027E) 0x7007- f:00070 d: 7 | P = P + 7 (0x0146)
0x0140 (0x000280) 0x2003- f:00020 d: 3 | A = OR[3]
0x0141 (0x000282) 0x1C00-0x03B4 f:00016 d: 0 | A = A + 948 (0x03B4)
0x0143 (0x000286) 0x2913- f:00024 d: 275 | OR[275] = A
0x0144 (0x000288) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0146 (0x00028C) 0x7007- f:00070 d: 7 | P = P + 7 (0x014D)
0x0147 (0x00028E) 0x2003- f:00020 d: 3 | A = OR[3]
0x0148 (0x000290) 0x1C00-0x03AD f:00016 d: 0 | A = A + 941 (0x03AD)
0x014A (0x000294) 0x2913- f:00024 d: 275 | OR[275] = A
0x014B (0x000296) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x014D (0x00029A) 0x1005- f:00010 d: 5 | A = 5 (0x0005)
0x014E (0x00029C) 0x2914- f:00024 d: 276 | OR[276] = A
0x014F (0x00029E) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x0150 (0x0002A0) 0x2915- f:00024 d: 277 | OR[277] = A
0x0151 (0x0002A2) 0x2124- f:00020 d: 292 | A = OR[292]
0x0152 (0x0002A4) 0x8402- f:00102 d: 2 | P = P + 2 (0x0154), A = 0
0x0153 (0x0002A6) 0x702E- f:00070 d: 46 | P = P + 46 (0x0181)
0x0154 (0x0002A8) 0x211F- f:00020 d: 287 | A = OR[287]
0x0155 (0x0002AA) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008)
0x0156 (0x0002AC) 0x2908- f:00024 d: 264 | OR[264] = A
0x0157 (0x0002AE) 0x3108- f:00030 d: 264 | A = (OR[264])
0x0158 (0x0002B0) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0159 (0x0002B2) 0x2913- f:00024 d: 275 | OR[275] = A
0x015A (0x0002B4) 0x2113- f:00020 d: 275 | A = OR[275]
0x015B (0x0002B6) 0x8402- f:00102 d: 2 | P = P + 2 (0x015D), A = 0
0x015C (0x0002B8) 0x701E- f:00070 d: 30 | P = P + 30 (0x017A)
0x015D (0x0002BA) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x015E (0x0002BC) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x015F (0x0002BE) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x0160 (0x0002C0) 0x2913- f:00024 d: 275 | OR[275] = A
0x0161 (0x0002C2) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0162 (0x0002C4) 0x2925- f:00024 d: 293 | OR[293] = A
0x0163 (0x0002C6) 0x1800-0x000F f:00014 d: 0 | A = 15 (0x000F)
0x0165 (0x0002CA) 0x2926- f:00024 d: 294 | OR[294] = A
0x0166 (0x0002CC) 0x2113- f:00020 d: 275 | A = OR[275]
0x0167 (0x0002CE) 0x2927- f:00024 d: 295 | OR[295] = A
0x0168 (0x0002D0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0169 (0x0002D2) 0x2928- f:00024 d: 296 | OR[296] = A
0x016A (0x0002D4) 0x1018- f:00010 d: 24 | A = 24 (0x0018)
0x016B (0x0002D6) 0x2929- f:00024 d: 297 | OR[297] = A
0x016C (0x0002D8) 0x2120- f:00020 d: 288 | A = OR[288]
0x016D (0x0002DA) 0x292A- f:00024 d: 298 | OR[298] = A
0x016E (0x0002DC) 0x2115- f:00020 d: 277 | A = OR[277]
0x016F (0x0002DE) 0x292B- f:00024 d: 299 | OR[299] = A
0x0170 (0x0002E0) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x0171 (0x0002E2) 0x292C- f:00024 d: 300 | OR[300] = A
0x0172 (0x0002E4) 0x2114- f:00020 d: 276 | A = OR[276]
0x0173 (0x0002E6) 0x292D- f:00024 d: 301 | OR[301] = A
0x0174 (0x0002E8) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x0175 (0x0002EA) 0x5800- f:00054 d: 0 | B = A
0x0176 (0x0002EC) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18)
0x0178 (0x0002F0) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0179 (0x0002F2) 0x7007- f:00070 d: 7 | P = P + 7 (0x0180)
0x017A (0x0002F4) 0x2003- f:00020 d: 3 | A = OR[3]
0x017B (0x0002F6) 0x1C00-0x03B4 f:00016 d: 0 | A = A + 948 (0x03B4)
0x017D (0x0002FA) 0x2913- f:00024 d: 275 | OR[275] = A
0x017E (0x0002FC) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0180 (0x000300) 0x7007- f:00070 d: 7 | P = P + 7 (0x0187)
0x0181 (0x000302) 0x2003- f:00020 d: 3 | A = OR[3]
0x0182 (0x000304) 0x1C00-0x03AD f:00016 d: 0 | A = A + 941 (0x03AD)
0x0184 (0x000308) 0x2913- f:00024 d: 275 | OR[275] = A
0x0185 (0x00030A) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x0187 (0x00030E) 0x211F- f:00020 d: 287 | A = OR[287]
0x0188 (0x000310) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A)
0x0189 (0x000312) 0x2908- f:00024 d: 264 | OR[264] = A
0x018A (0x000314) 0x3108- f:00030 d: 264 | A = (OR[264])
0x018B (0x000316) 0x2913- f:00024 d: 275 | OR[275] = A
0x018C (0x000318) 0x1006- f:00010 d: 6 | A = 6 (0x0006)
0x018D (0x00031A) 0x2914- f:00024 d: 276 | OR[276] = A
0x018E (0x00031C) 0x1032- f:00010 d: 50 | A = 50 (0x0032)
0x018F (0x00031E) 0x2915- f:00024 d: 277 | OR[277] = A
0x0190 (0x000320) 0x2124- f:00020 d: 292 | A = OR[292]
0x0191 (0x000322) 0x8402- f:00102 d: 2 | P = P + 2 (0x0193), A = 0
0x0192 (0x000324) 0x7003- f:00070 d: 3 | P = P + 3 (0x0195)
0x0193 (0x000326) 0x746A- f:00072 d: 106 | R = P + 106 (0x01FD)
0x0194 (0x000328) 0x7007- f:00070 d: 7 | P = P + 7 (0x019B)
0x0195 (0x00032A) 0x2003- f:00020 d: 3 | A = OR[3]
0x0196 (0x00032C) 0x1C00-0x03B0 f:00016 d: 0 | A = A + 944 (0x03B0)
0x0198 (0x000330) 0x2913- f:00024 d: 275 | OR[275] = A
0x0199 (0x000332) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x019B (0x000336) 0x1004- f:00010 d: 4 | A = 4 (0x0004)
0x019C (0x000338) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x019D (0x00033A) 0x251F- f:00022 d: 287 | A = A + OR[287]
0x019E (0x00033C) 0x2913- f:00024 d: 275 | OR[275] = A
0x019F (0x00033E) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x01A0 (0x000340) 0x2914- f:00024 d: 276 | OR[276] = A
0x01A1 (0x000342) 0x103B- f:00010 d: 59 | A = 59 (0x003B)
0x01A2 (0x000344) 0x2915- f:00024 d: 277 | OR[277] = A
0x01A3 (0x000346) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x01A5 (0x00034A) 0x211F- f:00020 d: 287 | A = OR[287]
0x01A6 (0x00034C) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x01A7 (0x00034E) 0x2908- f:00024 d: 264 | OR[264] = A
0x01A8 (0x000350) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01A9 (0x000352) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x01AA (0x000354) 0x2913- f:00024 d: 275 | OR[275] = A
0x01AB (0x000356) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x01AC (0x000358) 0x2914- f:00024 d: 276 | OR[276] = A
0x01AD (0x00035A) 0x1040- f:00010 d: 64 | A = 64 (0x0040)
0x01AE (0x00035C) 0x2915- f:00024 d: 277 | OR[277] = A
0x01AF (0x00035E) 0x744E- f:00072 d: 78 | R = P + 78 (0x01FD)
0x01B0 (0x000360) 0x211F- f:00020 d: 287 | A = OR[287]
0x01B1 (0x000362) 0x140C- f:00012 d: 12 | A = A + 12 (0x000C)
0x01B2 (0x000364) 0x2908- f:00024 d: 264 | OR[264] = A
0x01B3 (0x000366) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01B4 (0x000368) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x01B5 (0x00036A) 0x2913- f:00024 d: 275 | OR[275] = A
0x01B6 (0x00036C) 0x1002- f:00010 d: 2 | A = 2 (0x0002)
0x01B7 (0x00036E) 0x2914- f:00024 d: 276 | OR[276] = A
0x01B8 (0x000370) 0x1045- f:00010 d: 69 | A = 69 (0x0045)
0x01B9 (0x000372) 0x2915- f:00024 d: 277 | OR[277] = A
0x01BA (0x000374) 0x7443- f:00072 d: 67 | R = P + 67 (0x01FD)
0x01BB (0x000376) 0x211F- f:00020 d: 287 | A = OR[287]
0x01BC (0x000378) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003)
0x01BD (0x00037A) 0x2908- f:00024 d: 264 | OR[264] = A
0x01BE (0x00037C) 0x3108- f:00030 d: 264 | A = (OR[264])
0x01BF (0x00037E) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x01C0 (0x000380) 0x2913- f:00024 d: 275 | OR[275] = A
0x01C1 (0x000382) 0x2113- f:00020 d: 275 | A = OR[275]
0x01C2 (0x000384) 0x0A01- f:00005 d: 1 | A = A < 1 (0x0001)
0x01C3 (0x000386) 0x2403- f:00022 d: 3 | A = A + OR[3]
0x01C4 (0x000388) 0x1C00-0x039C f:00016 d: 0 | A = A + 924 (0x039C)
0x01C6 (0x00038C) 0x2913- f:00024 d: 275 | OR[275] = A
0x01C7 (0x00038E) 0x1003- f:00010 d: 3 | A = 3 (0x0003)
0x01C8 (0x000390) 0x2914- f:00024 d: 276 | OR[276] = A
0x01C9 (0x000392) 0x104A- f:00010 d: 74 | A = 74 (0x004A)
0x01CA (0x000394) 0x2915- f:00024 d: 277 | OR[277] = A
0x01CB (0x000396) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x01CD (0x00039A) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x01CF (0x00039E) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x01D1 (0x0003A2) 0x7017- f:00070 d: 23 | P = P + 23 (0x01E8)
0x01D2 (0x0003A4) 0x2123- f:00020 d: 291 | A = OR[291]
0x01D3 (0x0003A6) 0x8602- f:00103 d: 2 | P = P + 2 (0x01D5), A # 0
0x01D4 (0x0003A8) 0x7012- f:00070 d: 18 | P = P + 18 (0x01E6)
0x01D5 (0x0003AA) 0x2003- f:00020 d: 3 | A = OR[3]
0x01D6 (0x0003AC) 0x1C00-0x03A0 f:00016 d: 0 | A = A + 928 (0x03A0)
0x01D8 (0x0003B0) 0x2913- f:00024 d: 275 | OR[275] = A
0x01D9 (0x0003B2) 0x100B- f:00010 d: 11 | A = 11 (0x000B)
0x01DA (0x0003B4) 0x2914- f:00024 d: 276 | OR[276] = A
0x01DB (0x0003B6) 0x1023- f:00010 d: 35 | A = 35 (0x0023)
0x01DC (0x0003B8) 0x2915- f:00024 d: 277 | OR[277] = A
0x01DD (0x0003BA) 0x7E03-0x0239 f:00077 d: 3 | R = OR[3]+569 (0x0239)
0x01DF (0x0003BE) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x01E1 (0x0003C2) 0x7E03-0x0291 f:00077 d: 3 | R = OR[3]+657 (0x0291)
0x01E3 (0x0003C6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01E4 (0x0003C8) 0x2923- f:00024 d: 291 | OR[291] = A
0x01E5 (0x0003CA) 0x7003- f:00070 d: 3 | P = P + 3 (0x01E8)
0x01E6 (0x0003CC) 0x7E03-0x0277 f:00077 d: 3 | R = OR[3]+631 (0x0277)
0x01E8 (0x0003D0) 0x7350- f:00071 d: 336 | P = P - 336 (0x0098)
0x01E9 (0x0003D2) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1
0x01EA (0x0003D4) 0x3104- f:00030 d: 260 | A = (OR[260])
0x01EB (0x0003D6) 0x2904- f:00024 d: 260 | OR[260] = A
0x01EC (0x0003D8) 0x2104- f:00020 d: 260 | A = OR[260]
0x01ED (0x0003DA) 0x2706- f:00023 d: 262 | A = A - OR[262]
0x01EE (0x0003DC) 0x8007- f:00100 d: 7 | P = P + 7 (0x01F5), C = 0
0x01EF (0x0003DE) 0x2104- f:00020 d: 260 | A = OR[260]
0x01F0 (0x0003E0) 0x2705- f:00023 d: 261 | A = A - OR[261]
0x01F1 (0x0003E2) 0x8003- f:00100 d: 3 | P = P + 3 (0x01F4), C = 0
0x01F2 (0x0003E4) 0x8402- f:00102 d: 2 | P = P + 2 (0x01F4), A = 0
0x01F3 (0x0003E6) 0x7002- f:00070 d: 2 | P = P + 2 (0x01F5)
0x01F4 (0x0003E8) 0x7003- f:00070 d: 3 | P = P + 3 (0x01F7)
0x01F5 (0x0003EA) 0x7C34- f:00076 d: 52 | R = OR[52]
0x01F6 (0x0003EC) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B ****
0x01F7 (0x0003EE) 0x102A- f:00010 d: 42 | A = 42 (0x002A)
0x01F8 (0x0003F0) 0x2925- f:00024 d: 293 | OR[293] = A
0x01F9 (0x0003F2) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x01FA (0x0003F4) 0x5800- f:00054 d: 0 | B = A
0x01FB (0x0003F6) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x01FC (0x0003F8) 0x7C09- f:00076 d: 9 | R = OR[9]
0x01FD (0x0003FA) 0x2113- f:00020 d: 275 | A = OR[275]
0x01FE (0x0003FC) 0x3921- f:00034 d: 289 | (OR[289]) = A
0x01FF (0x0003FE) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0200 (0x000400) 0x2925- f:00024 d: 293 | OR[293] = A
0x0201 (0x000402) 0x1800-0x000F f:00014 d: 0 | A = 15 (0x000F)
0x0203 (0x000406) 0x2926- f:00024 d: 294 | OR[294] = A
0x0204 (0x000408) 0x2121- f:00020 d: 289 | A = OR[289]
0x0205 (0x00040A) 0x2927- f:00024 d: 295 | OR[295] = A
0x0206 (0x00040C) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0207 (0x00040E) 0x2928- f:00024 d: 296 | OR[296] = A
0x0208 (0x000410) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0209 (0x000412) 0x2929- f:00024 d: 297 | OR[297] = A
0x020A (0x000414) 0x2120- f:00020 d: 288 | A = OR[288]
0x020B (0x000416) 0x292A- f:00024 d: 298 | OR[298] = A
0x020C (0x000418) 0x2115- f:00020 d: 277 | A = OR[277]
0x020D (0x00041A) 0x292B- f:00024 d: 299 | OR[299] = A
0x020E (0x00041C) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x020F (0x00041E) 0x292C- f:00024 d: 300 | OR[300] = A
0x0210 (0x000420) 0x2114- f:00020 d: 276 | A = OR[276]
0x0211 (0x000422) 0x292D- f:00024 d: 301 | OR[301] = A
0x0212 (0x000424) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x0213 (0x000426) 0x5800- f:00054 d: 0 | B = A
0x0214 (0x000428) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18)
0x0216 (0x00042C) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0217 (0x00042E) 0x0200- f:00001 d: 0 | EXIT
0x0218 (0x000430) 0x2113- f:00020 d: 275 | A = OR[275]
0x0219 (0x000432) 0x3921- f:00034 d: 289 | (OR[289]) = A
0x021A (0x000434) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x021B (0x000436) 0x2925- f:00024 d: 293 | OR[293] = A
0x021C (0x000438) 0x1800-0x0011 f:00014 d: 0 | A = 17 (0x0011)
0x021E (0x00043C) 0x2926- f:00024 d: 294 | OR[294] = A
0x021F (0x00043E) 0x2121- f:00020 d: 289 | A = OR[289]
0x0220 (0x000440) 0x2927- f:00024 d: 295 | OR[295] = A
0x0221 (0x000442) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0222 (0x000444) 0x2928- f:00024 d: 296 | OR[296] = A
0x0223 (0x000446) 0x1010- f:00010 d: 16 | A = 16 (0x0010)
0x0224 (0x000448) 0x2929- f:00024 d: 297 | OR[297] = A
0x0225 (0x00044A) 0x2120- f:00020 d: 288 | A = OR[288]
0x0226 (0x00044C) 0x292A- f:00024 d: 298 | OR[298] = A
0x0227 (0x00044E) 0x2115- f:00020 d: 277 | A = OR[277]
0x0228 (0x000450) 0x292B- f:00024 d: 299 | OR[299] = A
0x0229 (0x000452) 0x1001- f:00010 d: 1 | A = 1 (0x0001)
0x022A (0x000454) 0x292C- f:00024 d: 300 | OR[300] = A
0x022B (0x000456) 0x2114- f:00020 d: 276 | A = OR[276]
0x022C (0x000458) 0x292D- f:00024 d: 301 | OR[301] = A
0x022D (0x00045A) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x022E (0x00045C) 0x5800- f:00054 d: 0 | B = A
0x022F (0x00045E) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18)
0x0231 (0x000462) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0232 (0x000464) 0x0200- f:00001 d: 0 | EXIT
0x0233 (0x000466) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0234 (0x000468) 0x2916- f:00024 d: 278 | OR[278] = A
0x0235 (0x00046A) 0x2116- f:00020 d: 278 | A = OR[278]
0x0236 (0x00046C) 0x2714- f:00023 d: 276 | A = A - OR[276]
0x0237 (0x00046E) 0x8439- f:00102 d: 57 | P = P + 57 (0x0270), A = 0
0x0238 (0x000470) 0x2116- f:00020 d: 278 | A = OR[278]
0x0239 (0x000472) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x023A (0x000474) 0x2513- f:00022 d: 275 | A = A + OR[275]
0x023B (0x000476) 0x290D- f:00024 d: 269 | OR[269] = A
0x023C (0x000478) 0x310D- f:00030 d: 269 | A = (OR[269])
0x023D (0x00047A) 0x290D- f:00024 d: 269 | OR[269] = A
0x023E (0x00047C) 0x2116- f:00020 d: 278 | A = OR[278]
0x023F (0x00047E) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x0240 (0x000480) 0x2908- f:00024 d: 264 | OR[264] = A
0x0241 (0x000482) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0242 (0x000484) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0243 (0x000486) 0x8604- f:00103 d: 4 | P = P + 4 (0x0247), A # 0
0x0244 (0x000488) 0x210D- f:00020 d: 269 | A = OR[269]
0x0245 (0x00048A) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008)
0x0246 (0x00048C) 0x290D- f:00024 d: 269 | OR[269] = A
0x0247 (0x00048E) 0x210D- f:00020 d: 269 | A = OR[269]
0x0248 (0x000490) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0249 (0x000492) 0x2917- f:00024 d: 279 | OR[279] = A
0x024A (0x000494) 0x2D16- f:00026 d: 278 | OR[278] = OR[278] + 1
0x024B (0x000496) 0x8602- f:00103 d: 2 | P = P + 2 (0x024D), A # 0
0x024C (0x000498) 0x0200- f:00001 d: 0 | EXIT
0x024D (0x00049A) 0x2117- f:00020 d: 279 | A = OR[279]
0x024E (0x00049C) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020)
0x024F (0x00049E) 0x8005- f:00100 d: 5 | P = P + 5 (0x0254), C = 0
0x0250 (0x0004A0) 0x107F- f:00010 d: 127 | A = 127 (0x007F)
0x0251 (0x0004A2) 0x2717- f:00023 d: 279 | A = A - OR[279]
0x0252 (0x0004A4) 0x8002- f:00100 d: 2 | P = P + 2 (0x0254), C = 0
0x0253 (0x0004A6) 0x7003- f:00070 d: 3 | P = P + 3 (0x0256)
0x0254 (0x0004A8) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x0255 (0x0004AA) 0x2917- f:00024 d: 279 | OR[279] = A
0x0256 (0x0004AC) 0x2117- f:00020 d: 279 | A = OR[279]
0x0257 (0x0004AE) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0258 (0x0004B0) 0x290D- f:00024 d: 269 | OR[269] = A
0x0259 (0x0004B2) 0x2115- f:00020 d: 277 | A = OR[277]
0x025A (0x0004B4) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x025B (0x0004B6) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x025C (0x0004B8) 0x290E- f:00024 d: 270 | OR[270] = A
0x025D (0x0004BA) 0x2115- f:00020 d: 277 | A = OR[277]
0x025E (0x0004BC) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x025F (0x0004BE) 0x2908- f:00024 d: 264 | OR[264] = A
0x0260 (0x0004C0) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0261 (0x0004C2) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x0262 (0x0004C4) 0x8607- f:00103 d: 7 | P = P + 7 (0x0269), A # 0
0x0263 (0x0004C6) 0x310E- f:00030 d: 270 | A = (OR[270])
0x0264 (0x0004C8) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x0265 (0x0004CA) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x0266 (0x0004CC) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x0267 (0x0004CE) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x0268 (0x0004D0) 0x7006- f:00070 d: 6 | P = P + 6 (0x026E)
0x0269 (0x0004D2) 0x310E- f:00030 d: 270 | A = (OR[270])
0x026A (0x0004D4) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x026C (0x0004D8) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x026D (0x0004DA) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x026E (0x0004DC) 0x2D15- f:00026 d: 277 | OR[277] = OR[277] + 1
0x026F (0x0004DE) 0x723A- f:00071 d: 58 | P = P - 58 (0x0235)
0x0270 (0x0004E0) 0x0200- f:00001 d: 0 | EXIT
0x0271 (0x0004E2) 0x1028- f:00010 d: 40 | A = 40 (0x0028)
0x0272 (0x0004E4) 0x2925- f:00024 d: 293 | OR[293] = A
0x0273 (0x0004E6) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123)
0x0275 (0x0004EA) 0x2926- f:00024 d: 294 | OR[294] = A
0x0276 (0x0004EC) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005)
0x0278 (0x0004F0) 0x2927- f:00024 d: 295 | OR[295] = A
0x0279 (0x0004F2) 0x211B- f:00020 d: 283 | A = OR[283]
0x027A (0x0004F4) 0x2522- f:00022 d: 290 | A = A + OR[290]
0x027B (0x0004F6) 0x2928- f:00024 d: 296 | OR[296] = A
0x027C (0x0004F8) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x027D (0x0004FA) 0x2929- f:00024 d: 297 | OR[297] = A
0x027E (0x0004FC) 0x2120- f:00020 d: 288 | A = OR[288]
0x027F (0x0004FE) 0x292A- f:00024 d: 298 | OR[298] = A
0x0280 (0x000500) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x0281 (0x000502) 0x292B- f:00024 d: 299 | OR[299] = A
0x0282 (0x000504) 0x1050- f:00010 d: 80 | A = 80 (0x0050)
0x0283 (0x000506) 0x292C- f:00024 d: 300 | OR[300] = A
0x0284 (0x000508) 0x1125- f:00010 d: 293 | A = 293 (0x0125)
0x0285 (0x00050A) 0x5800- f:00054 d: 0 | B = A
0x0286 (0x00050C) 0x1800-0x1B18 f:00014 d: 0 | A = 6936 (0x1B18)
0x0288 (0x000510) 0x7C09- f:00076 d: 9 | R = OR[9]
0x0289 (0x000512) 0x2D22- f:00026 d: 290 | OR[290] = OR[290] + 1
0x028A (0x000514) 0x0200- f:00001 d: 0 | EXIT
0x028B (0x000516) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x028C (0x000518) 0x2913- f:00024 d: 275 | OR[275] = A
0x028D (0x00051A) 0x1020- f:00010 d: 32 | A = 32 (0x0020)
0x028E (0x00051C) 0x2914- f:00024 d: 276 | OR[276] = A
0x028F (0x00051E) 0x2113- f:00020 d: 275 | A = OR[275]
0x0290 (0x000520) 0x1650- f:00013 d: 80 | A = A - 80 (0x0050)
0x0291 (0x000522) 0x841B- f:00102 d: 27 | P = P + 27 (0x02AC), A = 0
0x0292 (0x000524) 0x2114- f:00020 d: 276 | A = OR[276]
0x0293 (0x000526) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF)
0x0294 (0x000528) 0x290D- f:00024 d: 269 | OR[269] = A
0x0295 (0x00052A) 0x2113- f:00020 d: 275 | A = OR[275]
0x0296 (0x00052C) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001)
0x0297 (0x00052E) 0x2520- f:00022 d: 288 | A = A + OR[288]
0x0298 (0x000530) 0x290E- f:00024 d: 270 | OR[270] = A
0x0299 (0x000532) 0x2113- f:00020 d: 275 | A = OR[275]
0x029A (0x000534) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001)
0x029B (0x000536) 0x2908- f:00024 d: 264 | OR[264] = A
0x029C (0x000538) 0x1000- f:00010 d: 0 | A = 0 (0x0000)
0x029D (0x00053A) 0x2708- f:00023 d: 264 | A = A - OR[264]
0x029E (0x00053C) 0x8607- f:00103 d: 7 | P = P + 7 (0x02A5), A # 0
0x029F (0x00053E) 0x310E- f:00030 d: 270 | A = (OR[270])
0x02A0 (0x000540) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009)
0x02A1 (0x000542) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02A2 (0x000544) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009)
0x02A3 (0x000546) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02A4 (0x000548) 0x7006- f:00070 d: 6 | P = P + 6 (0x02AA)
0x02A5 (0x00054A) 0x310E- f:00030 d: 270 | A = (OR[270])
0x02A6 (0x00054C) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00)
0x02A8 (0x000550) 0x250D- f:00022 d: 269 | A = A + OR[269]
0x02A9 (0x000552) 0x390E- f:00034 d: 270 | (OR[270]) = A
0x02AA (0x000554) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1
0x02AB (0x000556) 0x721C- f:00071 d: 28 | P = P - 28 (0x028F)
0x02AC (0x000558) 0x0200- f:00001 d: 0 | EXIT
0x02AD (0x00055A) 0x4352- f:00041 d: 338 | C = 1, io 0522 = BZ
0x02AE (0x00055C) 0x4159- f:00040 d: 345 | C = 1, io 0531 = DN
0x02AF (0x00055E) 0x2054- f:00020 d: 84 | A = OR[84]
0x02B0 (0x000560) 0x4150- f:00040 d: 336 | C = 1, io 0520 = DN
0x02B1 (0x000562) 0x4520- f:00042 d: 288 | C = 1, IOB = DN | **** non-standard encoding with D:0x0120 ****
0x02B2 (0x000564) 0x4A4F- f:00045 d: 79 | A = A < B | **** non-standard encoding with D:0x004F ****
0x02B3 (0x000566) 0x4220- f:00041 d: 32 | C = 1, io 0040 (TI) = BZ
0x02B4 (0x000568) 0x5354- f:00051 d: 340 | A = A & B | **** non-standard encoding with D:0x0154 ****
0x02B5 (0x00056A) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x02B6 (0x00056C) 0x5553- f:00052 d: 339 | A = A + B | **** non-standard encoding with D:0x0153 ****
0x02B7 (0x00056E) 0x0000- f:00000 d: 0 | PASS
0x02B8 (0x000570) 0x4652- f:00043 d: 82 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0052 ****
0x02B9 (0x000572) 0x414D- f:00040 d: 333 | C = 1, io 0515 = DN
0x02BA (0x000574) 0x4500- f:00042 d: 256 | C = 1, IOB = DN | **** non-standard encoding with D:0x0100 ****
0x02BB (0x000576) 0x5449- f:00052 d: 73 | A = A + B | **** non-standard encoding with D:0x0049 ****
0x02BC (0x000578) 0x4D45- f:00046 d: 325 | A = A >> B | **** non-standard encoding with D:0x0145 ****
0x02BD (0x00057A) 0x2020- f:00020 d: 32 | A = OR[32]
0x02BE (0x00057C) 0x2020- f:00020 d: 32 | A = OR[32]
0x02BF (0x00057E) 0x2020- f:00020 d: 32 | A = OR[32]
0x02C0 (0x000580) 0x2020- f:00020 d: 32 | A = OR[32]
0x02C1 (0x000582) 0x4649- f:00043 d: 73 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0049 ****
0x02C2 (0x000584) 0x454C- f:00042 d: 332 | C = 1, IOB = DN | **** non-standard encoding with D:0x014C ****
0x02C3 (0x000586) 0x4400- f:00042 d: 0 | C = 1, IOB = DN
0x02C4 (0x000588) 0x4A53- f:00045 d: 83 | A = A < B | **** non-standard encoding with D:0x0053 ****
0x02C5 (0x00058A) 0x5120- f:00050 d: 288 | A = B | **** non-standard encoding with D:0x0120 ****
0x02C6 (0x00058C) 0x2020- f:00020 d: 32 | A = OR[32]
0x02C7 (0x00058E) 0x4441- f:00042 d: 65 | C = 1, IOB = DN | **** non-standard encoding with D:0x0041 ****
0x02C8 (0x000590) 0x5441- f:00052 d: 65 | A = A + B | **** non-standard encoding with D:0x0041 ****
0x02C9 (0x000592) 0x5345- f:00051 d: 325 | A = A & B | **** non-standard encoding with D:0x0145 ****
0x02CA (0x000594) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x02CB (0x000596) 0x2020- f:00020 d: 32 | A = OR[32]
0x02CC (0x000598) 0x5354- f:00051 d: 340 | A = A & B | **** non-standard encoding with D:0x0154 ****
0x02CD (0x00059A) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x02CE (0x00059C) 0x5553- f:00052 d: 339 | A = A + B | **** non-standard encoding with D:0x0153 ****
0x02CF (0x00059E) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D0 (0x0005A0) 0x2050- f:00020 d: 80 | A = OR[80]
0x02D1 (0x0005A2) 0x5249- f:00051 d: 73 | A = A & B | **** non-standard encoding with D:0x0049 ****
0x02D2 (0x0005A4) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D3 (0x0005A6) 0x2055- f:00020 d: 85 | A = OR[85]
0x02D4 (0x0005A8) 0x5345- f:00051 d: 325 | A = A & B | **** non-standard encoding with D:0x0145 ****
0x02D5 (0x0005AA) 0x4420- f:00042 d: 32 | C = 1, IOB = DN | **** non-standard encoding with D:0x0020 ****
0x02D6 (0x0005AC) 0x2020- f:00020 d: 32 | A = OR[32]
0x02D7 (0x0005AE) 0x4C49- f:00046 d: 73 | A = A >> B | **** non-standard encoding with D:0x0049 ****
0x02D8 (0x0005B0) 0x4D49- f:00046 d: 329 | A = A >> B | **** non-standard encoding with D:0x0149 ****
0x02D9 (0x0005B2) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x02DA (0x0005B4) 0x2020- f:00020 d: 32 | A = OR[32]
0x02DB (0x0005B6) 0x4C45- f:00046 d: 69 | A = A >> B | **** non-standard encoding with D:0x0045 ****
0x02DC (0x0005B8) 0x4E47- f:00047 d: 71 | A = A << B | **** non-standard encoding with D:0x0047 ****
0x02DD (0x0005BA) 0x5448- f:00052 d: 72 | A = A + B | **** non-standard encoding with D:0x0048 ****
0x02DE (0x0005BC) 0x2020- f:00020 d: 32 | A = OR[32]
0x02DF (0x0005BE) 0x2049- f:00020 d: 73 | A = OR[73]
0x02E0 (0x0005C0) 0x4420- f:00042 d: 32 | C = 1, IOB = DN | **** non-standard encoding with D:0x0020 ****
0x02E1 (0x0005C2) 0x2020- f:00020 d: 32 | A = OR[32]
0x02E2 (0x0005C4) 0x4452- f:00042 d: 82 | C = 1, IOB = DN | **** non-standard encoding with D:0x0052 ****
0x02E3 (0x0005C6) 0x2020- f:00020 d: 32 | A = OR[32]
0x02E4 (0x0005C8) 0x2044- f:00020 d: 68 | A = OR[68]
0x02E5 (0x0005CA) 0x5520- f:00052 d: 288 | A = A + B | **** non-standard encoding with D:0x0120 ****
0x02E6 (0x0005CC) 0x2020- f:00020 d: 32 | A = OR[32]
0x02E7 (0x0005CE) 0x5252- f:00051 d: 82 | A = A & B | **** non-standard encoding with D:0x0052 ****
0x02E8 (0x0005D0) 0x0000- f:00000 d: 0 | PASS
0x02E9 (0x0005D2) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02EA (0x0005D4) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x02EB (0x0005D6) 0x2020- f:00020 d: 32 | A = OR[32]
0x02EC (0x0005D8) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02ED (0x0005DA) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02EE (0x0005DC) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02EF (0x0005DE) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x02F0 (0x0005E0) 0x2020- f:00020 d: 32 | A = OR[32]
0x02F1 (0x0005E2) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F2 (0x0005E4) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F3 (0x0005E6) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F4 (0x0005E8) 0x2020- f:00020 d: 32 | A = OR[32]
0x02F5 (0x0005EA) 0x202D- f:00020 d: 45 | A = OR[45]
0x02F6 (0x0005EC) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02F7 (0x0005EE) 0x2020- f:00020 d: 32 | A = OR[32]
0x02F8 (0x0005F0) 0x202D- f:00020 d: 45 | A = OR[45]
0x02F9 (0x0005F2) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FA (0x0005F4) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x02FB (0x0005F6) 0x2020- f:00020 d: 32 | A = OR[32]
0x02FC (0x0005F8) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FD (0x0005FA) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x02FE (0x0005FC) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x02FF (0x0005FE) 0x2020- f:00020 d: 32 | A = OR[32]
0x0300 (0x000600) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0301 (0x000602) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0302 (0x000604) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0303 (0x000606) 0x2020- f:00020 d: 32 | A = OR[32]
0x0304 (0x000608) 0x202D- f:00020 d: 45 | A = OR[45]
0x0305 (0x00060A) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x0306 (0x00060C) 0x2020- f:00020 d: 32 | A = OR[32]
0x0307 (0x00060E) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x0308 (0x000610) 0x2020- f:00020 d: 32 | A = OR[32]
0x0309 (0x000612) 0x202D- f:00020 d: 45 | A = OR[45]
0x030A (0x000614) 0x2D20- f:00026 d: 288 | OR[288] = OR[288] + 1
0x030B (0x000616) 0x2020- f:00020 d: 32 | A = OR[32]
0x030C (0x000618) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x030D (0x00061A) 0x0000- f:00000 d: 0 | PASS
0x030E (0x00061C) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x030F (0x00061E) 0x4350- f:00041 d: 336 | C = 1, io 0520 = BZ
0x0310 (0x000620) 0x5520- f:00052 d: 288 | A = A + B | **** non-standard encoding with D:0x0120 ****
0x0311 (0x000622) 0x0000- f:00000 d: 0 | PASS
0x0312 (0x000624) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x0313 (0x000626) 0x5245- f:00051 d: 69 | A = A & B | **** non-standard encoding with D:0x0045 ****
0x0314 (0x000628) 0x4356- f:00041 d: 342 | C = 1, io 0526 = BZ
0x0315 (0x00062A) 0x0000- f:00000 d: 0 | PASS
0x0316 (0x00062C) 0x4C4F- f:00046 d: 79 | A = A >> B | **** non-standard encoding with D:0x004F ****
0x0317 (0x00062E) 0x434B- f:00041 d: 331 | C = 1, io 0513 = BZ
0x0318 (0x000630) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x0319 (0x000632) 0x0000- f:00000 d: 0 | PASS
0x031A (0x000634) 0x4445- f:00042 d: 69 | C = 1, IOB = DN | **** non-standard encoding with D:0x0045 ****
0x031B (0x000636) 0x4C41- f:00046 d: 65 | A = A >> B | **** non-standard encoding with D:0x0041 ****
0x031C (0x000638) 0x5920- f:00054 d: 288 | B = A | **** non-standard encoding with D:0x0120 ****
0x031D (0x00063A) 0x0000- f:00000 d: 0 | PASS
0x031E (0x00063C) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x031F (0x00063E) 0x4556- f:00042 d: 342 | C = 1, IOB = DN | **** non-standard encoding with D:0x0156 ****
0x0320 (0x000640) 0x4E54- f:00047 d: 84 | A = A << B | **** non-standard encoding with D:0x0054 ****
0x0321 (0x000642) 0x0000- f:00000 d: 0 | PASS
0x0322 (0x000644) 0x5045- f:00050 d: 69 | A = B | **** non-standard encoding with D:0x0045 ****
0x0323 (0x000646) 0x524D- f:00051 d: 77 | A = A & B | **** non-standard encoding with D:0x004D ****
0x0324 (0x000648) 0x2020- f:00020 d: 32 | A = OR[32]
0x0325 (0x00064A) 0x0000- f:00000 d: 0 | PASS
0x0326 (0x00064C) 0x2020- f:00020 d: 32 | A = OR[32]
0x0327 (0x00064E) 0x2020- f:00020 d: 32 | A = OR[32]
0x0328 (0x000650) 0x2020- f:00020 d: 32 | A = OR[32]
0x0329 (0x000652) 0x0000- f:00000 d: 0 | PASS
0x032A (0x000654) 0x2020- f:00020 d: 32 | A = OR[32]
0x032B (0x000656) 0x2020- f:00020 d: 32 | A = OR[32]
0x032C (0x000658) 0x2020- f:00020 d: 32 | A = OR[32]
0x032D (0x00065A) 0x0000- f:00000 d: 0 | PASS
0x032E (0x00065C) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x032F (0x00065E) 0x492F- f:00044 d: 303 | A = A > B | **** non-standard encoding with D:0x012F ****
0x0330 (0x000660) 0x4F20- f:00047 d: 288 | A = A << B | **** non-standard encoding with D:0x0120 ****
0x0331 (0x000662) 0x0000- f:00000 d: 0 | PASS
0x0332 (0x000664) 0x2020- f:00020 d: 32 | A = OR[32]
0x0333 (0x000666) 0x2020- f:00020 d: 32 | A = OR[32]
0x0334 (0x000668) 0x2020- f:00020 d: 32 | A = OR[32]
0x0335 (0x00066A) 0x0000- f:00000 d: 0 | PASS
0x0336 (0x00066C) 0x2020- f:00020 d: 32 | A = OR[32]
0x0337 (0x00066E) 0x2020- f:00020 d: 32 | A = OR[32]
0x0338 (0x000670) 0x2020- f:00020 d: 32 | A = OR[32]
0x0339 (0x000672) 0x0000- f:00000 d: 0 | PASS
0x033A (0x000674) 0x522D- f:00051 d: 45 | A = A & B | **** non-standard encoding with D:0x002D ****
0x033B (0x000676) 0x494E- f:00044 d: 334 | A = A > B | **** non-standard encoding with D:0x014E ****
0x033C (0x000678) 0x2020- f:00020 d: 32 | A = OR[32]
0x033D (0x00067A) 0x0000- f:00000 d: 0 | PASS
0x033E (0x00067C) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x033F (0x00067E) 0x4D45- f:00046 d: 325 | A = A >> B | **** non-standard encoding with D:0x0145 ****
0x0340 (0x000680) 0x4D20- f:00046 d: 288 | A = A >> B | **** non-standard encoding with D:0x0120 ****
0x0341 (0x000682) 0x0000- f:00000 d: 0 | PASS
0x0342 (0x000684) 0x2020- f:00020 d: 32 | A = OR[32]
0x0343 (0x000686) 0x2020- f:00020 d: 32 | A = OR[32]
0x0344 (0x000688) 0x2020- f:00020 d: 32 | A = OR[32]
0x0345 (0x00068A) 0x0000- f:00000 d: 0 | PASS
0x0346 (0x00068C) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x0347 (0x00068E) 0x4F50- f:00047 d: 336 | A = A << B | **** non-standard encoding with D:0x0150 ****
0x0348 (0x000690) 0x2020- f:00020 d: 32 | A = OR[32]
0x0349 (0x000692) 0x0000- f:00000 d: 0 | PASS
0x034A (0x000694) 0x512D- f:00050 d: 301 | A = B | **** non-standard encoding with D:0x012D ****
0x034B (0x000696) 0x5441- f:00052 d: 65 | A = A + B | **** non-standard encoding with D:0x0041 ****
0x034C (0x000698) 0x5045- f:00050 d: 69 | A = B | **** non-standard encoding with D:0x0045 ****
0x034D (0x00069A) 0x0000- f:00000 d: 0 | PASS
0x034E (0x00069C) 0x512D- f:00050 d: 301 | A = B | **** non-standard encoding with D:0x012D ****
0x034F (0x00069E) 0x4558- f:00042 d: 344 | C = 1, IOB = DN | **** non-standard encoding with D:0x0158 ****
0x0350 (0x0006A0) 0x4543- f:00042 d: 323 | C = 1, IOB = DN | **** non-standard encoding with D:0x0143 ****
0x0351 (0x0006A2) 0x0000- f:00000 d: 0 | PASS
0x0352 (0x0006A4) 0x522D- f:00051 d: 45 | A = A & B | **** non-standard encoding with D:0x002D ****
0x0353 (0x0006A6) 0x4F55- f:00047 d: 341 | A = A << B | **** non-standard encoding with D:0x0155 ****
0x0354 (0x0006A8) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x0355 (0x0006AA) 0x0000- f:00000 d: 0 | PASS
0x0356 (0x0006AC) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x0357 (0x0006AE) 0x5359- f:00051 d: 345 | A = A & B | **** non-standard encoding with D:0x0159 ****
0x0358 (0x0006B0) 0x5320- f:00051 d: 288 | A = A & B | **** non-standard encoding with D:0x0120 ****
0x0359 (0x0006B2) 0x0000- f:00000 d: 0 | PASS
0x035A (0x0006B4) 0x5846- f:00054 d: 70 | B = A | **** non-standard encoding with D:0x0046 ****
0x035B (0x0006B6) 0x4552- f:00042 d: 338 | C = 1, IOB = DN | **** non-standard encoding with D:0x0152 ****
0x035C (0x0006B8) 0x4E47- f:00047 d: 71 | A = A << B | **** non-standard encoding with D:0x0047 ****
0x035D (0x0006BA) 0x0000- f:00000 d: 0 | PASS
0x035E (0x0006BC) 0x524F- f:00051 d: 79 | A = A & B | **** non-standard encoding with D:0x004F ****
0x035F (0x0006BE) 0x4C4C- f:00046 d: 76 | A = A >> B | **** non-standard encoding with D:0x004C ****
0x0360 (0x0006C0) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x0361 (0x0006C2) 0x0000- f:00000 d: 0 | PASS
0x0362 (0x0006C4) 0x2020- f:00020 d: 32 | A = OR[32]
0x0363 (0x0006C6) 0x2020- f:00020 d: 32 | A = OR[32]
0x0364 (0x0006C8) 0x2020- f:00020 d: 32 | A = OR[32]
0x0365 (0x0006CA) 0x0000- f:00000 d: 0 | PASS
0x0366 (0x0006CC) 0x532D- f:00051 d: 301 | A = A & B | **** non-standard encoding with D:0x012D ****
0x0367 (0x0006CE) 0x5846- f:00054 d: 70 | B = A | **** non-standard encoding with D:0x0046 ****
0x0368 (0x0006D0) 0x4552- f:00042 d: 338 | C = 1, IOB = DN | **** non-standard encoding with D:0x0152 ****
0x0369 (0x0006D2) 0x0000- f:00000 d: 0 | PASS
0x036A (0x0006D4) 0x4558- f:00042 d: 344 | C = 1, IOB = DN | **** non-standard encoding with D:0x0158 ****
0x036B (0x0006D6) 0x4354- f:00041 d: 340 | C = 1, io 0524 = BZ
0x036C (0x0006D8) 0x4E47- f:00047 d: 71 | A = A << B | **** non-standard encoding with D:0x0047 ****
0x036D (0x0006DA) 0x0000- f:00000 d: 0 | PASS
0x036E (0x0006DC) 0x2020- f:00020 d: 32 | A = OR[32]
0x036F (0x0006DE) 0x2020- f:00020 d: 32 | A = OR[32]
0x0370 (0x0006E0) 0x2020- f:00020 d: 32 | A = OR[32]
0x0371 (0x0006E2) 0x0000- f:00000 d: 0 | PASS
0x0372 (0x0006E4) 0x494E- f:00044 d: 334 | A = A > B | **** non-standard encoding with D:0x014E ****
0x0373 (0x0006E6) 0x204D- f:00020 d: 77 | A = OR[77]
0x0374 (0x0006E8) 0x454D- f:00042 d: 333 | C = 1, IOB = DN | **** non-standard encoding with D:0x014D ****
0x0375 (0x0006EA) 0x0000- f:00000 d: 0 | PASS
0x0376 (0x0006EC) 0x2E30- f:00027 d: 48 | OR[48] = OR[48] - 1
0x0377 (0x0006EE) 0x0000- f:00000 d: 0 | PASS
0x0378 (0x0006F0) 0x2E30- f:00027 d: 48 | OR[48] = OR[48] - 1
0x0379 (0x0006F2) 0x0000- f:00000 d: 0 | PASS
0x037A (0x0006F4) 0x2E31- f:00027 d: 49 | OR[49] = OR[49] - 1
0x037B (0x0006F6) 0x0000- f:00000 d: 0 | PASS
0x037C (0x0006F8) 0x2E31- f:00027 d: 49 | OR[49] = OR[49] - 1
0x037D (0x0006FA) 0x0000- f:00000 d: 0 | PASS
0x037E (0x0006FC) 0x2E32- f:00027 d: 50 | OR[50] = OR[50] - 1
0x037F (0x0006FE) 0x0000- f:00000 d: 0 | PASS
0x0380 (0x000700) 0x2E33- f:00027 d: 51 | OR[51] = OR[51] - 1
0x0381 (0x000702) 0x0000- f:00000 d: 0 | PASS
0x0382 (0x000704) 0x2E33- f:00027 d: 51 | OR[51] = OR[51] - 1
0x0383 (0x000706) 0x0000- f:00000 d: 0 | PASS
0x0384 (0x000708) 0x2E34- f:00027 d: 52 | OR[52] = OR[52] - 1
0x0385 (0x00070A) 0x0000- f:00000 d: 0 | PASS
0x0386 (0x00070C) 0x2E34- f:00027 d: 52 | OR[52] = OR[52] - 1
0x0387 (0x00070E) 0x0000- f:00000 d: 0 | PASS
0x0388 (0x000710) 0x2E35- f:00027 d: 53 | OR[53] = OR[53] - 1
0x0389 (0x000712) 0x0000- f:00000 d: 0 | PASS
0x038A (0x000714) 0x2E36- f:00027 d: 54 | OR[54] = OR[54] - 1
0x038B (0x000716) 0x0000- f:00000 d: 0 | PASS
0x038C (0x000718) 0x2E36- f:00027 d: 54 | OR[54] = OR[54] - 1
0x038D (0x00071A) 0x0000- f:00000 d: 0 | PASS
0x038E (0x00071C) 0x2E37- f:00027 d: 55 | OR[55] = OR[55] - 1
0x038F (0x00071E) 0x0000- f:00000 d: 0 | PASS
0x0390 (0x000720) 0x2E37- f:00027 d: 55 | OR[55] = OR[55] - 1
0x0391 (0x000722) 0x0000- f:00000 d: 0 | PASS
0x0392 (0x000724) 0x2E38- f:00027 d: 56 | OR[56] = OR[56] - 1
0x0393 (0x000726) 0x0000- f:00000 d: 0 | PASS
0x0394 (0x000728) 0x2E39- f:00027 d: 57 | OR[57] = OR[57] - 1
0x0395 (0x00072A) 0x0000- f:00000 d: 0 | PASS
0x0396 (0x00072C) 0x5945- f:00054 d: 325 | B = A | **** non-standard encoding with D:0x0145 ****
0x0397 (0x00072E) 0x5320- f:00051 d: 288 | A = A & B | **** non-standard encoding with D:0x0120 ****
0x0398 (0x000730) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x0399 (0x000732) 0x2020- f:00020 d: 32 | A = OR[32]
0x039A (0x000734) 0x454E- f:00042 d: 334 | C = 1, IOB = DN | **** non-standard encoding with D:0x014E ****
0x039B (0x000736) 0x4420- f:00042 d: 32 | C = 1, IOB = DN | **** non-standard encoding with D:0x0020 ****
0x039C (0x000738) 0x4F46- f:00047 d: 326 | A = A << B | **** non-standard encoding with D:0x0146 ****
0x039D (0x00073A) 0x2044- f:00020 d: 68 | A = OR[68]
0x039E (0x00073C) 0x4154- f:00040 d: 340 | C = 1, io 0524 = DN
0x039F (0x00073E) 0x4100- f:00040 d: 256 | C = 1, io 0400 = DN
0x03A0 (0x000740) 0x4E4F- f:00047 d: 79 | A = A << B | **** non-standard encoding with D:0x004F ****
0x03A1 (0x000742) 0x5420- f:00052 d: 32 | A = A + B | **** non-standard encoding with D:0x0020 ****
0x03A2 (0x000744) 0x4C4F- f:00046 d: 79 | A = A >> B | **** non-standard encoding with D:0x004F ****
0x03A3 (0x000746) 0x4747- f:00043 d: 327 | C = 1, IOB = BZ | **** non-standard encoding with D:0x0147 ****
0x03A4 (0x000748) 0x4544- f:00042 d: 324 | C = 1, IOB = DN | **** non-standard encoding with D:0x0144 ****
0x03A5 (0x00074A) 0x204F- f:00020 d: 79 | A = OR[79]
0x03A6 (0x00074C) 0x4E00- f:00047 d: 0 | A = A << B
0x03A7 (0x00074E) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x03A8 (0x000750) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x03A9 (0x000752) 0x2D00- f:00026 d: 256 | OR[256] = OR[256] + 1
0x03AA (0x000754) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x03AB (0x000756) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x03AC (0x000758) 0x2D2D- f:00026 d: 301 | OR[301] = OR[301] + 1
0x03AD (0x00075A) 0x0000- f:00000 d: 0 | PASS
0x03AE (0x00075C) 0x2A2A- f:00025 d: 42 | OR[42] = A + OR[42]
0x03AF (0x00075E) 0x2A2A- f:00025 d: 42 | OR[42] = A + OR[42]
0x03B0 (0x000760) 0x2A00- f:00025 d: 0 | OR[0] = A + OR[0]
0x03B1 (0x000762) 0x0000- f:00000 d: 0 | PASS
0x03B2 (0x000764) 0x0000- f:00000 d: 0 | PASS
0x03B3 (0x000766) 0x0000- f:00000 d: 0 | PASS
|
Ada/src/fakelib/utilities-option_lists.ads | fintatarta/fakedsp | 0 | 1252 | <gh_stars>0
with Ada.Containers.Indefinite_Ordered_Maps;
use Ada;
package Utilities.Option_Lists is
package Option_Maps is
new Ada.Containers.Indefinite_Ordered_Maps (Key_Type => String,
Element_Type => String);
subtype Option_List is Option_Maps.Map;
Empty_List : constant Option_List := Option_Maps.Empty_Map;
type Case_Action is (Force_Lower, Force_Upper, Keep);
function Parse (Input : String;
Entry_Separator : Character := ',';
Key_Separator : Character := '=';
Trim_Key : Boolean := True;
Trim_Value : Boolean := True;
Key_Case : Case_Action := Force_Lower;
Default_Value : String := "")
return Option_List;
end Utilities.Option_Lists;
|
courses/fundamentals_of_ada/labs/prompts/060_record_types/main.adb | AdaCore/training_material | 15 | 24143 | with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
type Name_T is array (1 .. 6) of Character;
type Index_T is range 0 .. 1_000;
type Queue_T is array (Index_T range 1 .. 1_000) of Name_T;
-- type Fifo_Queue_T is ?
-- Queue : Fifo_Queue_T;
Choice : Integer;
begin
loop
Put ("1 = add to queue | 2 = remove from queue | others => done: ");
Choice := Integer'value (Get_Line);
if Choice = 1 then
Put ("Enter name: ");
-- Use Ada.Text_IO.Get_Line to help put a name on the queue
elsif Choice = 2 then
-- Remove the appropriate item from the queue and print it
Put_Line ("TBD");
else
exit;
end if;
New_Line;
end loop;
Put_Line ("Remaining in line: ");
-- Print the remaining items in the queue
end Main;
|
programs/oeis/008/A008624.asm | karttu/loda | 1 | 16414 | <filename>programs/oeis/008/A008624.asm
; A008624: Expansion of (1+x^3)/((1-x^2)*(1-x^4)) = (1-x+x^2)/((1+x)*(1-x)^2*(1+x^2)).
; 1,0,1,1,2,1,2,2,3,2,3,3,4,3,4,4,5,4,5,5,6,5,6,6,7,6,7,7,8,7,8,8,9,8,9,9,10,9,10,10,11,10,11,11,12,11,12,12,13,12,13,13,14,13,14,14,15,14,15,15,16,15,16,16,17,16,17,17,18,17,18,18,19,18,19,19,20,19,20,20,21,20,21,21,22,21,22,22,23,22,23,23,24,23,24,24,25,24,25,25,26,25,26,26,27,26,27,27,28,27,28,28,29,28,29,29,30,29,30,30,31,30,31,31,32,31,32,32,33,32,33,33,34,33,34,34,35,34,35,35,36,35,36,36,37,36,37,37,38,37,38,38,39,38,39,39,40,39,40,40,41,40,41,41,42,41,42,42,43,42,43,43,44,43,44,44,45,44,45,45,46,45,46,46,47,46,47,47,48,47,48,48,49,48,49,49,50,49,50,50,51,50,51,51,52,51,52,52,53,52,53,53,54,53,54,54,55,54,55,55,56,55,56,56,57,56,57,57,58,57,58,58,59,58,59,59,60,59,60,60,61,60,61,61,62,61,62,62,63,62
mov $1,$0
gcd $1,4
add $1,$0
div $1,4
|
org.conqat.engine.sourcecode/test-data/org.conqat.engine.sourcecode.coverage.volume/loops2.adb | assessorgeneral/ConQAT | 1 | 294 | with Ada.Text_IO;
procedure Hello is
package IO renames Ada.Text_IO;
begin
for I in Integer range 1 .. 10 loop
bar();
end loop;
end Hello;
|
libsrc/stdio/spc1000/vpeek_MODE1.asm | Toysoft/z88dk | 0 | 175314 |
; code_driver to ensure we don't page ourselves out
SECTION code_clib
PUBLIC vpeek_MODE1
PUBLIC vpeek_screendollar
EXTERN generic_console_font32
EXTERN generic_console_udg32
EXTERN screendollar
EXTERN screendollar_with_count
;Entry: c = x,
; b = y
; e = rawmode
;Exit: nc = success
; a = character,
; c = failure
vpeek_MODE1:
ld hl,-8
add hl,sp ;de = screen, hl = buffer, bc = coords
ld sp,hl
push hl ;Save buffer
ld a,8
vpeek_1:
ex af,af
in a,(c)
ld (hl),a
ld a,c
add 32
ld c,a
jr nc,no_overflow
inc b
no_overflow:
inc hl
ex af,af
dec a
jr nz,vpeek_1
vpeek_screendollar:
pop de ;the buffer on the stack
ld hl,(generic_console_font32)
call screendollar
jr nc,gotit
ld hl,(generic_console_udg32)
ld b,128
call screendollar_with_count
jr c,gotit
add 128
gotit:
ex af,af ; Save those flags
ld hl,8 ; Dump our temporary buffer
add hl,sp
ld sp,hl
ex af,af ; Flags and parameter back
ret
|
RTLib/Flow/Language/FlowLang.g4 | redxdev/RayTracer | 0 | 3434 | <gh_stars>0
grammar FlowLang;
@parser::header
{
#pragma warning disable 3021
using RTLib.Flow;
using RTLib.Flow.Modules;
using MathNet.Numerics.LinearAlgebra;
}
@parser::members
{
protected const int EOF = Eof;
public FlowScene Scene { get; set; }
}
@lexer::header
{
#pragma warning disable 3021
}
@lexer::members
{
protected const int EOF = Eof;
protected const int HIDDEN = Hidden;
}
/*
* Parser Rules
*/
compileUnit
: commands? EOF
;
commands
: command+
;
command
: IDENT value
{
Scene.AddVariable($IDENT.text, $value.Value);
}
;
module returns [IFlowValue Value]
:
IDENT BLOCK_BEGIN
{ Dictionary<string, IFlowValue> parameters = new Dictionary<string, IFlowValue>(); }
( first=module_parameter { parameters.Add($first.Key, $first.Value); }
(
ARG_SEPARATOR
n=module_parameter
{ parameters.Add($n.Key, $n.Value); }
)*
)?
BLOCK_END
{
$Value = Scene.CreateModule($IDENT.text, parameters);
}
;
module_parameter returns [string Key, IFlowValue Value]
: IDENT EQUAL value { $Key = $IDENT.text; $Value = $value.Value; }
;
tuple returns [IFlowValue Value]
: { List<double> values = new List<double>(); }
GROUP_BEGIN
( first=NUMBER { values.Add(double.Parse($first.text)); }
(
ARG_SEPARATOR
n=NUMBER
{ values.Add(double.Parse($n.text)); }
)*
)?
GROUP_END
{
Vector<double> vector = Vector<double>.Build.Dense(values.Count);
for(int i = 0; i < values.Count; ++i)
{
vector[i] = values[i];
}
$Value = new GenericValue<Vector<double>>() {Value = vector};
}
;
value returns [IFlowValue Value]
:
(
STRING { $Value = new GenericValue<string>() {Value = $STRING.text}; }
| NUMBER { $Value = new GenericValue<double>() {Value = double.Parse($NUMBER.text)}; }
| B_TRUE { $Value = new GenericValue<bool>() {Value = true}; }
| B_FALSE { $Value = new GenericValue<bool>() {Value = false}; }
| VAR_SPECIFIER IDENT { $Value = new VariableValue() {Variable = $IDENT.text}; }
| tuple { $Value = $tuple.Value; }
| module { $Value = $module.Value; }
)
;
/*
* Lexer Rules
*/
fragment ESCAPE_SEQUENCE
: '\\'
(
'\\'
| '"'
| '\''
)
;
STRING
:
(
'"' ( ESCAPE_SEQUENCE | . )*? '"'
| '\'' ( ESCAPE_SEQUENCE | . )*? '\''
)
{
Text = Text.Substring(1, Text.Length - 2)
.Replace("\\\\", "\\")
.Replace("\\\"", "\"")
.Replace("\\\'", "\'");
}
;
NUMBER
: '-'?
(
[0-9]* '.' [0-9]+
| [0-9]+
)
;
B_TRUE
: 'true'
;
B_FALSE
: 'false'
;
IDENT
: [a-zA-Z_] [a-zA-Z0-9_.]*
;
GROUP_BEGIN
: '('
;
GROUP_END
: ')'
;
BLOCK_BEGIN
: '{'
;
BLOCK_END
: '}'
;
ARG_SEPARATOR
: ','
;
VAR_SPECIFIER
: '$'
;
EQUAL
: '='
;
WS
: [ \t\r\n] -> channel(HIDDEN)
;
COMMENT
:
( '//' ~[\r\n]*
| '/*' .*? '*/'
) -> channel(HIDDEN)
; |
test/table-test/user_records.ads | fintatarta/protypo | 0 | 3057 | <filename>test/table-test/user_records.ads
with Protypo.Api.Engine_Values.Enumerated_Records;
with Protypo.Api.Engine_Values.Engine_Value_Vectors;
package User_Records is
type User_Field is (First_Name, Last_Name, Telephone);
package User_Record_Package is
new Protypo.Api.Engine_Values.Enumerated_Records (User_Field);
function Split_Bit (Params : Protypo.Api.Engine_Values.Engine_Value_Vectors.Vector)
return Protypo.Api.Engine_Values.Engine_Value_Vectors.Vector;
end User_Records;
|
alloy4fun_models/trainstlt/models/2/6Gp4JDyXSFJgqNJTk.als | Kaixi26/org.alloytools.alloy | 0 | 1185 | <gh_stars>0
open main
pred id6Gp4JDyXSFJgqNJTk_prop3 {
always all t: Train, tk: Track | t->tk in pos or t->tk not in pos implies always t->tk in pos
}
pred __repair { id6Gp4JDyXSFJgqNJTk_prop3 }
check __repair { id6Gp4JDyXSFJgqNJTk_prop3 <=> prop3o } |
test/asm/empty-data-directive.asm | orbea/rgbds | 522 | 90018 | <reponame>orbea/rgbds
SECTION "Empty Data Directive in ROM", ROM0
ds 1
ds 2
ds 3
ds 4
db
dw
dl
SECTION "Empty Data Directive in HRAM", HRAM
ds 1
ds 2
ds 3
ds 4
db
dw
dl
|
libsrc/fcntl/nc100/fabandon.asm | meesokim/z88dk | 0 | 178728 | PUBLIC fabandon
.fabandon
ret
|
oeis/037/A037697.asm | neoneye/loda-programs | 11 | 171163 | ; A037697: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,3,0.
; Submitted by <NAME>
; 1,8,51,306,1837,11024,66147,396882,2381293,14287760,85726563,514359378,3086156269,18516937616,111101625699,666609754194,3999658525165,23997951150992,143987706905955,863926241435730,5183557448614381
mov $2,1
lpb $0
sub $0,1
add $1,$2
mul $1,6
add $2,17
mod $2,4
lpe
add $1,$2
mov $0,$1
|
FlaxVM/bin/Debug/SqrNums.asm | DreamVB/FlaxVM | 0 | 168746 | # Square numbers 1 to 20
PUSH 1
STA A
#Get the user to enter a number of numbers to square
SYS 2
STA B
loop:
# Print A value to the console
LDA A
DUP
MUL
SYS 3
# Print break line
CALL FuncCr
LDA B
LDA A
INC
STA A
LDA A
LEQ
JT Loop
HLT
FuncCr:
PUSH 10
SYS 4
POP
RET |
alloy4fun_models/trashltl/models/10/RdAr8ExsBedC92TcB.als | Kaixi26/org.alloytools.alloy | 0 | 1215 | open main
pred idRdAr8ExsBedC92TcB_prop11 {
after File in Protected
}
pred __repair { idRdAr8ExsBedC92TcB_prop11 }
check __repair { idRdAr8ExsBedC92TcB_prop11 <=> prop11o } |
Appl/FileMgrs/CommonDesktop/CUtil/cutilFileOpHigh.asm | steakknife/pcgeos | 504 | 11385 | <reponame>steakknife/pcgeos
COMMENT @----------------------------------------------------------------------
Copyright (c) GeoWorks 1994 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Desktop/Util
FILE: cutilFileOpHigh.asm
ROUTINES:
INT CopyMoveFileToDir - common routine to do high-level move/copy
INT DeskFileCopy - copy file or directory!!
INT FileCopyFile - copy single file
INT DeskFileMove - move file or directory!!
INT FileMoveFile - move single file
INT FileCopyMoveDir - recursively move/copy directory
INT GetNextFilename - parse filename list
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 10/10/94 Broken out of cutilFileOp.asm
DESCRIPTION:
This file contains desktop utility routines.
$Id: cutilFileOpHigh.asm,v 1.2 98/06/03 13:51:03 joon Exp $
------------------------------------------------------------------------------@
FileOpLow segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VerifyMenuDeleteThrowAway
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: use high-level verification of delete if "confirm delete
single" option is set
CALLED BY: ProcessDragFilesCommon
PASS: ax - MSG_FM_START_DELETE or MSG_FM_START_THROW_AWAY
RETURN: carry clear if okay to continue delete
carry set to cancel delete
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 06/07/90 broken out of FolderStartDelete for use in
TreeStartDelete
dlitwin 06/01/92 made it general for throw away and delete
dlitwin 07/01/92 new three stage delete warnings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VerifyMenuDeleteThrowAway proc far
if (not _FCAB and not _ZMGR)
uses ax, bx, cx, dx, di, si, bp
.enter
push ax ; save incoming message
GM< mov bx, handle OptionsDeleteWarnings >
GM< mov si, offset OptionsDeleteWarnings >
GM< mov cx, mask OMI_SINGLE_WARNING >
GM< mov ax, MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED >
GM< call ObjMessageCall >
GM< pop ax ; restore incoming mesage >
GM< jnc done ; no high-level confirm >
GM< ; (continue delete) >
ND< mov bx, handle FileDeleteOptionsGroup >
ND< mov si, offset FileDeleteOptionsGroup >
ND< mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION >
ND< call ObjMessageCall >
ND< cmp ax, OCDL_SINGLE >
ND< pop ax >
ND< jne continueDelete ; no high-level confirm >
ND< ; (continue delete) >
cmp ax, MSG_FM_START_DELETE
mov ax, WARNING_DELETE_ITEMS ; else, give high-level confirm
je gotWarningMsg
mov ax, WARNING_THROW_AWAY_ITEMS ; else, give high-level confirm
gotWarningMsg:
call DesktopYesNoWarning
cmp ax, YESNO_YES ; delete?
stc ; assume cancel
jne done ; nope, cancel
ND<continueDelete:>
clc ; else, return carry clear
done:
.leave
else
clc ; File Cabinet and Zoomer are always in "full" mode
endif ; ((not _FCAB) and (not _ZMGR) and (not _NIKE))
ret
VerifyMenuDeleteThrowAway endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MenuMoveCommon, MenuCopyCommon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: handle file move/copy from menu
CALLED BY: INTERNAL
FolderStartMove
FolderStartCopy
TreeStartMove
TreeStartCopy
PASS: bx = file list buffer
RETURN: errors handled
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 05/08/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MenuMoveCommon proc far
mov ax, handle MoveToEntry
mov si, offset MoveToEntry
mov bp, mask CQNF_MOVE
call MenuMoveCopyCommon
ret
MenuMoveCommon endp
if not _FCAB
MenuRecoverCommon proc far
push ds
mov cx, PATH_BUFFER_SIZE
sub sp, cx
mov dx, ss
mov bp, sp
push bx ; save file list block
mov ax, MSG_GEN_FILE_SELECTOR_GET_DESTINATION_PATH
mov bx, handle RecoverToEntry
mov si, offset RecoverToEntry
call ObjMessageCall ; dx:bp = path, cx = disk handle
pop bx ; restore file list block
mov ds, dx
mov si, bp
mov dx, cx ; put disk handle in dx
call IsThisInTheWastebasket
pop ds
jc inWastebasket
add sp, PATH_BUFFER_SIZE
mov ax, handle RecoverToEntry
mov si, offset RecoverToEntry
mov bp, mask CQNF_MOVE
call MenuMoveCopyCommon
jmp exit
inWastebasket:
add sp, PATH_BUFFER_SIZE
mov ax, ERROR_RECOVER_TO_WASTEBASKET
call DesktopOKError
exit:
ret
MenuRecoverCommon endp
endif ; if (not _FCAB)
MenuCopyCommon proc far
mov ax, handle CopyToEntry
mov si, offset CopyToEntry
mov bp, mask CQNF_COPY
call MenuMoveCopyCommon
ret
MenuCopyCommon endp
;
; pass:
; ax:si = file selector for destination
; bp = mask CQNF_MOVE for move
; or
; mask CQNF_COPY for copy
; bx = file list transfer buffer
;
MenuMoveCopyCommon proc near
;
; set up parameters for move
;
mov cx, PATH_BUFFER_SIZE
sub sp, cx
mov dx, sp
push bp ; save move/copy flag
push bx ; save file list buffer
mov bp, dx
mov dx, ss
mov bx, ax ; bx:si = file selector
mov ax, MSG_GEN_FILE_SELECTOR_GET_DESTINATION_PATH
call ObjMessageCall ; dx:bp = path, cx = disk handle
;
; move files
;
pop bx ; bx = file list buffer
mov ds, dx ; ds:si = dest. path
mov si, bp
pop ax ; ax = move/copy flag
jcxz done ; => no path, so do nothing
mov dx, cx ; dx = dest. disk handle
mov cx, 1 ; bx is heap block
mov bp, ax ; pass file move/copy flag
push bx
if not _FCAB
call IsThisInTheWastebasket
jnc notTheWastebasket
mov {byte} ss:[usingWastebasket], WASTEBASKET_WINDOW
notTheWastebasket:
endif ; if (not _FCAB)
call ProcessDragFilesCommon ; (handles/reports errors)
mov {byte} ss:[usingWastebasket], NOT_THE_WASTEBASKET
pop bx
done:
call MemFree ; free file list buffer
add sp, PATH_BUFFER_SIZE
ret
MenuMoveCopyCommon endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetQuickTransferMethod
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: determine whether quick transfer move or copy should be done
CALLED BY: INTERNAL
DriveToolCopyMoveFiles (FileOperation)
DesktopDirToolQTInternal (FileOperation)
FolderUpDirQT (FileOperation)
PASS: dx = destination disk handle
bx = file list block
RETURN: carry - set on error
- clear otherwise
bp = mask CQNF_MOVE or mask CQNF_COPY
depending on (src = dest)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 05/31/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetQuickTransferMethod proc far
uses ax, cx, dx, es
.enter
call MemLock
mov es, ax
call ShellGetRemoteFlagFromFQT
tst ax
jz fileIsLocal
call MemUnlock
jmp setToCopy
fileIsLocal:
call ShellGetTrueDiskHandleFromFQT
call MemUnlock
jnc noError
call DesktopOKError
stc ; carry - set
jmp done
noError:
test dx, DISK_IS_STD_PATH_MASK
jz compareThem
NOFXIP< segmov es, <segment idata>, dx >
FXIP< mov dx, bx >
FXIP< GetResourceSegmentNS dgroup, es, TRASH_BX >
FXIP< mov bx, dx >
mov dx, es:[geosDiskHandle] ; SP's are on the system disk
compareThem:
cmp cx, dx
mov bp, mask CQNF_MOVE
clc ; clear out error flag
je done
setToCopy:
mov bp, mask CQNF_COPY
done:
.leave
ret
GetQuickTransferMethod endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StuffUIFAIntoFileList
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: store UIFA flags into file list header
CALLED BY: INTERNAL
ProcessDragFilesListItem
ProcessTreeDragItem
PASS: bx:ax = VM block containing file list
dh = UIFA flags
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 06/26/90 Initial version
dloft 10/7/92 Changed dx to dh so as not to dork the
BATransferType record.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
StuffUIFAIntoFileList proc far
uses ax, es, bp
.enter
call VMLock
mov es, ax
mov es:[FQTH_UIFA].high, dh
call VMUnlock
.leave
ret
StuffUIFAIntoFileList endp
if not _FCAB
FileOpLow ends
PseudoResident segment resource
; Moved this here so that FileOpLow isn't loaded on startup -chrisb
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IsThisInTheWastebasket
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks if the destination path (dx,ds:si) is the Wastebasket
or if it is in the Wastebasket
CALLED BY: FolderUpDirQT (FolderClass)
ProcessDragFileListItem (FolderClass)
ProcessTreeDragItem (TreeClass)
DesktopDirToolQTInternal
DriveToolCopyMoveFiles
MenuMoveCopyCommon ({Folder,Tree}Start{Move,Copy})
PASS: ds:si = pathname
dx = disk handle
RETURN: carry set if path is the Wastebasket or in the Wastebasket
zero flag set if it is the Wastebasket itself and not a subdir
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 5/27/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
IsThisInTheWastebasket proc far
uses ax, bx, cx, dx, bp, di, si, es, ds
.enter
mov cx, size PathName
mov bp, sp ; save pre-stack-buf. position
sub sp, cx ; allocate stack buffer
segmov es, ss, di
mov di, sp ; es:di is destination buffer
mov bx, dx ; bx, ds:si is source path
clr dx ; no drive name requested
call FileConstructActualPath
mov di, sp ; reset es:di to buffer start
call FileParseStandardPath ; bx, es:di is path to parse
cmp ax, SP_WASTE_BASKET
clc ; assume not equal
jne exit
SBCS < cmp {byte} es:[di], 0 >
DBCS < cmp {wchar}es:[di], 0 >
je setZeroFlag ; if no tail path
SBCS < cmp {word} es:[di], C_BACKSLASH or (0 shl 8) >
DBCS < cmp {wchar}es:[di], C_BACKSLASH >
DBCS < jne haveTail >
DBCS < cmp {wchar}es:[di][2], 0 >
je setZeroFlag ; if no tail path
DBCS <haveTail: >
cmp ax, SP_TOP ; we know its SP_WASTE_BASKET
jmp doneZeroFlag ; so this will clear z flag
setZeroFlag:
sub ax, ax ; sets zero flag
doneZeroFlag:
stc
exit:
mov sp, bp ; pop path buffer off stack
.leave
ret
IsThisInTheWastebasket endp
PseudoResident ends
FileOpLow segment resource
endif ;if (not _FCAB)
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ProcessDragFilesCommon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: common handler for move/copy of files being quick transfer'ed
CALLED BY: INTERNAL
FolderUpDirQT (FolderClass)
ProcessDragFileListItem (FolderClass)
ProcessTreeDragItem (TreeClass)
DesktopDirToolQTInternal
DriveToolCopyMoveFiles
MenuMoveCopyCommon ({Folder,Tree}Start{Move,Copy})
PASS: ds:si = destination pathname for move/copy
dx = disk handle of destination disk
bp = mask CQNF_MOVE for move
or
mask CQNF_COPY for copy
bx:ax = (VM file):(VM block) of quick transfer file list block
OR
bx = memory block handle of quick transfer file list block
cx = 0 if bx:ax = VM block
<> 0 if bx = memory block
RETURN: nothing
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 01/19/90 broken out for common use
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
messageTable word \
0, ; FOPT_NONE
MSG_SHELL_OBJECT_DELETE, ; FOPT_DELETE
MSG_SHELL_OBJECT_THROW_AWAY, ; FOPT_THROW_AWAY
MSG_SHELL_OBJECT_COPY, ; FOPT_COPY
MSG_SHELL_OBJECT_MOVE ; FOPT_MOVE
.assert (size messageTable eq FileOperationProgressTypes)
ProcessDragFilesCommon proc far
quickNotifyFlags local ClipboardQuickNotifyFlags \
push bp
if GPC_FOLDER_WINDOW_MENUS
destIsDesktop local word
endif
.enter
pusha ; save VM block handle, block type
mov cx, ds
call MemSegmentToHandle ; cx = handle
EC < ERROR_NC -1 >
push cx ; save block handle
mov ax, ACTIVE_TYPE_FILE_OPERATION
call DesktopMarkActive ; application will be active
call MemDerefStackDS ; flags preserved
popa ; retrieve VM block handle, block type
LONG jnz realExit ; detaching already, do nothing
call FileBatchChangeNotifications ; batch them all up, please
; as we don't want to consume
; billions of handles
call IndicateBusy
call InitForWindowUpdate
;
; whatever the operation, clear recursive error flag - brianc 5/24/93
;
mov ss:[recurErrorFlag], 0
if GPC_FOLDER_WINDOW_MENUS
mov ss:[destIsDesktop], 0
;
; enforce no dragging to non-document/non-floppy folders
; ds:si = dest path, dx = dest disk handle
;
if GPC_DEBUG_MODE
cmp ss:[debugMode], TRUE
je allowDragTo
endif
push ax ; (+1)
; allow if on floppy or add-on drive (i.e. have Desktop drive icon)
push bx
mov bx, dx
call checkFloppy
pop bx
jnc allowDragToPop
; don't allow if not under document directory
push cx
mov cx, SP_DOCUMENT
call checkUnderSP
pop cx
jc dontAllowDragTo ; error, don't allow drag
.assert (PCT_EQUAL lt PCT_SUBDIR)
cmp al, PCT_SUBDIR
jbe allowDragToPop ; is doc/under doc, allow drag
; allow if top-level wastebasket
push cx
mov cx, dx ; pass cx, ds:si
call UtilCheckIfWasteDir ; carry set if so
pop cx
jc allowDragToPop
; allow if Desktop
push cx
mov cx, dx ; pass cx, ds:si
call UtilCheckIfDesktopDir ; carry set if so
lahf
mov ss:[destIsDesktop], ax ; store for later
pop cx
jc allowDragToPop
dontAllowDragTo:
pop ax ; (-1)
mov ax, ERROR_DRAG_NOT_ALLOWED ; generic drag error
jmp preError
allowDragToPop:
pop ax ; (-1)
allowDragTo:
endif
;
; set destination directory as current directory
;
push bx, ax ; save file list block handle
mov bx, dx
mov dx, si ; ds:dx = destination dir
mov di, bx ; save diskhandle in di
call FileSetCurrentPath
pop bx, dx ; retrieve file list block
jnc noError ; if no error, continue
ND< call NDCheckIfDriveLink >
preError::
call DesktopOKError ; else, report error
jmp exit ; then quit
noError:
mov ax, dx ; bx:ax = VM transfer item
;
; go through filenames
;
jcxz lockVMBlock
push bx ; save mem handle for unlocking
call MemLock ; ax = segment
jmp short lockCommon
lockVMBlock:
mov di, bp ; save frame pointer
call VMLock ; ax = segment, bp = mem handle
push bp ; save mem handle for unlocking
mov bp, di ; retrieve frame pointer
lockCommon:
push cx ; save block flag
mov ds, ax ; ds = file list block
if GPC_FOLDER_WINDOW_MENUS
;
; enforce no dragging from non-document/non-floppy folders
; ds:FQTH_diskHandle, ds:FQTH_pathname = source folder
;
if GPC_DEBUG_MODE
cmp ss:[debugMode], TRUE
je allowDragFrom
endif
; disallow if dragging directory _to_ desktop
call checkFolderDragged
jnc notDirToDesktop
test ss:[destIsDesktop], mask CPU_CARRY shl 8 ; C if desktop dest
jnz dontAllowDragFrom
notDirToDesktop:
; allow if on floppy or add-on drive (i.e. have Desktop drive icon)
push bx, si
lea si, ds:[FQTH_pathname]
mov bx, ds:[FQTH_diskHandle]
call checkFloppy
pop bx, si
jnc allowDragFrom
; allow if from Desktop
push cx, si
lea si, ds:[FQTH_pathname]
mov cx, ds:[FQTH_diskHandle] ; pass cx, ds:si
call UtilCheckIfDesktopDir ; carry set if so
pop cx, si
jc allowDragFrom
; allow if from top-level wastebasket
push cx, si
lea si, ds:[FQTH_pathname]
mov cx, ds:[FQTH_diskHandle] ; pass cx, ds:si
call UtilCheckIfWasteDir ; carry set if so
pop cx, si
jc allowDragFrom
; don't allow if not under document directory
push cx, dx, si
lea si, ds:[FQTH_pathname]
mov dx, ds:[FQTH_diskHandle]
mov cx, SP_DOCUMENT
call checkUnderSP
pop cx, dx, si
jc dontAllowDragFrom ; error, don't allow drag
if GPC_PRESERVE_ARCHIVE
cmp al, PCT_EQUAL
jne notArchive
call checkArchiveDragged
jc dontAllowDragFrom ; contains Archive, no drag
notArchive:
endif
.assert (PCT_EQUAL lt PCT_SUBDIR)
cmp al, PCT_SUBDIR
jbe allowDragFrom ; is doc/under doc, allow drag
dontAllowDragFrom:
mov ax, ERROR_DRAG_NOT_ALLOWED ; generic drag error
call DesktopOKError
jmp outtaHere
allowDragFrom:
endif
; **NewDesk Only**
; If there are items in the incoming list of files that need
; to be handled specially by a NewDesk system object (printer or
; wastebasket etc.) or a BA subclass, this routine breaks each file
; out and calls a subclassable message on it that allows a BA subclass
; to do anything it wants with the special object.
;
ND< call NewDeskHandleSpecialObjects >
;
; set up file-operation progress box
; bp = quick method
; (give precendence to force-COPY if both set)
;
mov ax, FOPT_COPY ; assume copy
test ds:[FQTH_UIFA], (mask UIFA_COPY shl 8) ; explicit copy?
jnz 2$ ; yes, use copy
test ds:[FQTH_UIFA], (mask UIFA_MOVE shl 8) ; explicit move?
jnz 1$ ; yes, use move
test quickNotifyFlags, mask CQNF_COPY ; else, implicit copy?
jnz 2$ ; yes
1$:
mov ax, FOPT_MOVE ; else, move
2$:
cmp {byte} ss:[usingWastebasket], NOT_THE_WASTEBASKET
je gotType
if not _FORCE_DELETE
mov ax, FOPT_THROW_AWAY ; Wastebasket is always a move
;
; This code disables Delete override of the Alt key because someone
; might be forcing a move (Alt key as well) and accidentally drop
; a file on the open Wastebasket folder, causing a delete. This
; is the way things were originally spec'ed, but it was decided that
; it is too inconsistent to have Delete Override and the Wastebasket
; Never Saves work only some of the time (only with the Wastebasket
; dir button, which doesn't even exist in NewDesk).
; Comment it back in if it is decided that this is desired.
;
; cmp {byte} ss:[usingWastebasket], WASTEBASKET_WINDOW
; je gotType
;
test ds:[FQTH_UIFA], (mask UIFA_MOVE shl 8)
jnz deleteOverride
; allow overridding
; OMI_WB_NEVER_SAVES
test ds:[FQTH_UIFA], (mask UIFA_COPY shl 8)
jnz gotType
push ax, bx, cx, dx, bp, si
if GPC_FOLDER_WINDOW_MENUS
mov bx, handle OptionsList2
mov si, offset OptionsList2
else
mov bx, handle OptionsList
mov si, offset OptionsList
endif
mov cx, mask OMI_WB_NEVER_SAVES
mov ax, MSG_GEN_BOOLEAN_GROUP_IS_BOOLEAN_SELECTED
call ObjMessageCall ; carry set if item set
pop ax, bx, cx, dx, bp, si
;
; Blech. GeoManager Menu reviews decided that "Hold Items in WB"
; sounded better than "WB Never Saves", and so this flag means the
; exact opposite of what it says in GMGR. Wizard can't change to
; agree with GMGR, so GMGR will just use this flag but always do
; the opposite.
;
if GPC_FOLDER_WINDOW_MENUS
jc gotType ; opposite like GM
else
GM< jc gotType >
ND< jnc gotType >
endif
deleteOverride:
endif ; if (not _FORCE_DELETE)
mov ax, FOPT_DELETE
gotType:
;
; Figure out which message to send, based on the
; FileOperationProgressTypes
;
mov dx, ax ; FileOperationProgressTypes
mov_tr bx, ax
mov ax, cs:[messageTable][bx]
;
; Get the type of the first object in the block, and send the
; message to process similar files
;
tst ds:[FQTH_numFiles]
jz outtaHere
mov si, offset FQTH_files
mov si, ds:[si].FOIE_info
call UtilGetDummyFromTable ; ^lbx:si - dummy
push ax, dx, bp
mov cx, ds
mov di, mask MF_CALL
call ObjMessage
pop ax, dx, bp
outtaHere:
pop cx ; retrieve block flag
jcxz vmBlockUnlock
pop bx ; bx = mem handle
call MemUnlock ; unlock file list mem block
jmp exit
vmBlockUnlock:
mov di, bp ; save frame pointer
pop bp ; bp = VM mem handle
call VMUnlock ; unlock file list VM block
mov bp, di ; restore frame pointer
exit:
call FinishUpCommon
realExit:
.leave
ret
if GPC_FOLDER_WINDOW_MENUS
; pass: bx = disk handle
; ds:si = pathname
; return: carry clear if floppy
; destroys: nothing
checkFloppy label near
push ax, bx, cx, dx, es, di
mov cx, PATH_BUFFER_SIZE
sub sp, cx
segmov es, ss, di
mov di, sp ; es:di = buffer
clr dx ; no drive name
call FileConstructActualPath ; bx = real disk handle
lea sp, es:[di][PATH_BUFFER_SIZE] ; preserves carry
jc doneCheckFloppy ; error, not floppy
call DiskGetDrive ; al = drive
call NDGetDriveLinkIndexBlock ; es = seg, bx = handle
jc doneCheckFloppy ; mem error, not floppy
call NDDoWeNeedADriveLink ; carry clear if floppy
call MemUnlock ; preserves flags
doneCheckFloppy:
pop ax, bx, cx, dx, es, di
retn
; pass: ds:si = pathname
; dx = disk handle
; cx = StandardPath to compare against
; return: carry set if error
; al = PathCompareType for passed path relative to SP_DOCUMENT
; destroys: nothing
checkUnderSP label near
push bx, cx, dx, es, ds, si, di
clr ax
push ax ; es:di = null path on stack
segmov es, ss, di
mov di, sp
xchg si, di
segxchg ds, es ; path2 = src path
call FileComparePathsEvalLinks ; al = result
pop di ; clean up stack
pop bx, cx, dx, es, ds, si, di
retn
checkFolderDragged label near
push cx
mov cx, ds:[FQTH_numFiles]
clc ; no folder
jcxz doneFolderCheck
push si
mov si, offset FQTH_files
checkFolderDraggedLoop:
call UtilCheckInfoEntrySubdir ; C set if so, (handles links)
jc doneFolderCheckPop
add si, size FileOperationInfoEntry
loop checkFolderDraggedLoop
clc ; no folder
doneFolderCheckPop:
pop si
doneFolderCheck:
pop cx
retn
if GPC_PRESERVE_ARCHIVE
checkArchiveDragged label near
push cx
mov cx, ds:[FQTH_numFiles]
clc ; no Archive
jcxz doneArchiveCheck
push si, es, di
mov si, offset FQTH_files
.assert (offset FOIE_name eq 0)
segmov es, cs, di
mov di, offset dragArchiveFolderName
checkArchiveDraggedLoop:
push cx
clr cx
call LocalCmpStrings
pop cx
stc ; may be Archive
je doneArchiveCheckPop
add si, size FileOperationInfoEntry
loop checkArchiveDraggedLoop
clc ; no Archive
doneArchiveCheckPop:
pop si, es, di
doneArchiveCheck:
pop cx
retn
endif ; GPC_PRESERVE_ARCHIVE
endif ; GPC_FOLDER_WINDOW_MENUS
ProcessDragFilesCommon endp
if GPC_FOLDER_WINDOW_MENUS and GPC_PRESERVE_ARCHIVE
dragArchiveFolderName TCHAR "Archive",0
endif
if _NEWDESK
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NDCheckIfDriveLink
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks to see if a file is a drive link. If so it changes
the error message accordingly.
CALLED BY: ProcessDragFilesCommon
PASS: ds:si - path of file
di - diskhandle of file
ax - error message from FileSetCurrentPath
RETURN: ax - new error message if it is a drive link
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 6/ 9/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NDCheckIfDriveLink proc near
uses bx, cx, dx, di, es
cmp ax, ERROR_PATH_NOT_FOUND
jne dontCheck
.enter
call FilePushDir
push ax, ds ; save error and path
mov bx, di
segmov ds, cs, dx
mov dx, offset rootPath
call FileSetCurrentPath ; change dir to root of drive
pop ax, ds ; restore error and path
jc exit
push ax ; save error message
mov dx, si ; ds:dx is filename
segmov es, ss, di
mov cx, size NewDeskObjectType
sub sp, cx
mov di, sp ; es:di is stack buffer buffer
mov ax, FEA_DESKTOP_INFO
call FileGetPathExtAttributes
mov cx, ds:[di] ; get the file's WOT into cx
add sp, size NewDeskObjectType
pop ax ; restore error message
jc exit
cmp cx, WOT_DRIVE
jne exit
mov ax, ERROR_DRIVE_LINK_TARGET_GONE
exit:
call FilePopDir
.leave
dontCheck:
ret
NDCheckIfDriveLink endp
LocalDefNLString rootPath <C_BACKSLASH, 0>
endif ; if _NEWDESK
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
WastebasketDeleteFiles
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: delete files
CALLED BY: INTERNAL
FolderStartDelete (same module)
TreeStartDelete (diff. module)
PASS: bx = mem handle of file list block
RETURN: nothing
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 12/18/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
WastebasketDeleteFiles proc far
uses ax, bx, cx, dx, bp, di, si, ds, es
.enter
mov ax, ACTIVE_TYPE_FILE_OPERATION
call DesktopMarkActive ; application will be active
jnz done
call FileBatchChangeNotifications ; batch them all up, please
; as we don't want to consume
; billions of handles
call IndicateBusy
call InitForWindowUpdate
call MemLock
push bx
mov ds, ax
mov_tr cx, ax
mov ax, MSG_SHELL_OBJECT_DELETE
LoadBXSI DefaultDummy
clr di
call ObjMessage
call FileFlushChangeNotifications
pop bx
call MemUnlock
call FinishUpCommon
mov ss:[showDeleteProgress], TRUE ; be sure delete progress is
; enabled when we leave
done:
.leave
ret
WastebasketDeleteFiles endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FinishUpCommon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Common code to finish up a multi-file operation
CALLED BY: ProcessDragFilesCommon, WastebasketDeleteFiles
PASS: nothing
RETURN: nothing
DESTROYED: ax,bx,cx,dx,si,di,bp,ds,es
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 2/10/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FinishUpCommon proc near
.enter
mov ax, SP_TOP ; just go to top-level
call FileSetStandardPath
call ClearFileOpProgressBox
call IndicateNotBusy
call MarkNotActive
call FileFlushChangeNotifications
.leave
ret
FinishUpCommon endp
if _NEWDESK
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CompressFileQuickTransfer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Given a FileQuickTransfer block remove all entries with no
name (null in the name field).
*** This routine does not attempt to resize (shrink)
the block, just compact the data within the block and update
the count of files ***.
CALLED BY: NewDeskHandleSpecialObjects
PASS: ds - segment of locked down FileQuickTransfer block
RETURN: ds - segment of locked down compressed FQT block
DESTROYED: bx,cx,dx,si,di,bp,es
PSEUDO CODE/STRATEGY:
X is end of compressed section
Y is begining of chunk to move up to X
Z is ending of chunk to move up to X
X = find first marked entry
no files marked? exit!
Y = X
loopTop:
Y = next unmarked entry or end of list
end of list? exit!
Z = next marked entry after Y or end of list
move entries between Y and Z to X
X = X + (|Z - Y|) (increment X to end of compressed)
Y = Z
jmp loopTop
exit!
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 08/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CompressFileQuickTransfer proc near
uses ax
.enter
segmov es, ds, ax
mov di, offset FQTH_files
mov cx, ds:[FQTH_numFiles]
mov bp, cx ; keep number of entries in bp
jcxz done
mov dx, size FileOperationInfoEntry
; di = X, si = Y
;
; X = find first marked entry
;
xLoop:
cmp {byte} ds:[di].FOIE_name, 0
je xSet
add di, dx ; dx is entry size
loop xLoop
;
; no files marked?
;
jmp done ; exit!
xSet: ;
; Y = X
;
mov si, di
loopTop: ; **** loopTop ****
; Y = next unmarked entry or end of list
yLoop:
EC < call ECCheckBounds >
cmp {byte} ds:[si].FOIE_name, 0 ; is entry marked?
jne ySet
add si, dx ; go to next entry
dec bp ; update file count because
loop yLoop ; we just skiped an entry
; end of list? exit!
jmp done
ySet:
mov bx, si ; bx - si is length to copy
zLoop:
cmp {byte} ds:[bx].FOIE_name, 0
je zSet
add bx, dx ; next entry
loop zLoop
; reached end of FileQuickTransfer
zSet:
push cx ; save file entry counter
mov cx, bx
sub cx, si ; get length to copy into cx
;
; move entries between Y and Z to X
;
rep movsb
;
; X (di) is updated properly to be X + |Y - Z|
; Y (si) is updated properly to be Z
; so just loop unless we are done
;
pop cx ; restore Y entry position
jcxz done ; done,if we moved the last file
jmp loopTop
done:
mov ds:[FQTH_numFiles], bp ; reset to new number of files
.leave
ret
CompressFileQuickTransfer endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
UtilGetNextInfoEntryOfSameType
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Search forward in the FileQuickTransfer block until we
find a FileOperationInfoEntry of the same type as the
current one. Place a NULL in the filename of the
current entry, to signify that we're finished with it.
CALLED BY: EXTERNAL
PASS: ds:si - FileOperationInfoEntry
RETURN: if found:
carry clear
ds:si - next FileOperationInfoEntry
else:
carry set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/11/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
UtilGetNextInfoEntryOfSameType proc far
uses ax,bx,cx,dx
.enter
mov {byte} ds:[si].FOIE_name, 0
;
; Figure out where the block ends
;
mov ax, ds:[FQTH_numFiles]
mov cx, size FileOperationInfoEntry
mul cx
add ax, offset FQTH_files
;
; Get the type of the current element
;
mov bx, ds:[si].FOIE_info
;
; Scan forward for the next element of this type
;
searchLoop:
add si, size FileOperationInfoEntry
cmp si, ax
ja notFound
cmp ds:[si].FOIE_info, bx
jne searchLoop
done:
.leave
ret
notFound:
stc
jmp done
UtilGetNextInfoEntryOfSameType endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrepFilenameForError
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Stuff current filename into global area for error reporting
(if needed)
CALLED BY: ProcessDragFilesCommon
PASS: ds:si - filename
RETURN: nothingy
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 5/27/92 added this header
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrepFilenameForError proc far
uses si, es, di, cx
.enter
NOFXIP< segmov es, <segment dgroup>, di >
FXIP< mov di, bx >
FXIP< GetResourceSegmentNS dgroup, es, TRASH_BX >
FXIP< mov bx, di >
mov di, offset dgroup:fileOperationInfoEntryBuffer
mov cx, size fileOperationInfoEntryBuffer
rep movsb
.leave
ret
PrepFilenameForError endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyMoveFileToDir
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: copies/moves the specified source file/directory into the
specified destination directory
CALLED BY: ShellObjectMoveCopyEntryCommon
PASS: ds:si - FileOperationInfoEntry of source file
ds: - FileQuickTransferHeader from which to get src dir
current directory is destination directory
ax - update strategy (passed on to MarkWindowForUpdate)
fileOperationInfoEntryBuffer - 32 and 8.3 source name info
RETURN: carry set if error
AX - error
updates folder window table, if no error
ss:[recurErrorFlag] set if recursive operation error
preserves ds, dx, es, di, cx, si, bp
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 8/28/89 Initial version
brianc 9/8/89 Combined TextCopyFile, TextMoveFile
brianc 2/90 rewritten
dlitwin 5/22/92 added support for new Wastebasket
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyMoveFileToDir proc far
updateStrategy local word push ax
uses bx, ds, dx, es, di, cx, si
.enter
mov ss:[enteredFileOpRecursion], 0 ; in case of early error
lea dx, ds:[si].FOIE_name
call CheckRootSrcOperation ; can't copy/move root
LONG jc exit ; if error, handle it
if GPC_PRESERVE_DIRECTORIES
;
; don't allow moving system folder
;
cmp ss:[fileOpProgressType], FOPT_COPY
jne checkOp
cmp ss:[debugMode], TRUE ; if debug mode, allow copy
je opOkay
checkOp:
call FilePushDir
push dx
mov bx, ds:[FQTH_diskHandle]
lea dx, ds:[FQTH_pathname]
call FileSetCurrentPath
pop dx
call CheckSystemFolderDestruction
call FilePopDir ; (preserves flags)
LONG jc exit
opOkay:
endif
if not _FCAB
cmp {byte} ss:[usingWastebasket], NOT_THE_WASTEBASKET
je doneThrowAwayCheck
;
; If it's a file or link, put up the "throw away file"
; warning, else put up the "throw away directory" warning
;
mov ax, WARNING_THROW_AWAY_FILE ; assume file
call UtilCheckInfoEntrySubdir
jnc gotWastebasketWarning
mov ax, WARNING_THROW_AWAY_DIR
gotWastebasketWarning:
test ds:[si].FOIE_attrs, mask FA_LINK
jz haveWarning
mov ax, WARNING_THROW_AWAY_LINK
haveWarning:
call DeleteWarningCommon
cmp ax, YESNO_YES
je doneThrowAwayCheck
stc
jc exit
doneThrowAwayCheck:
endif ; if (not _FCAB)
;
; check if complete destination file spec. specifies an existing
; file, if so, give replace warning if needed
;
call CopyMoveExistenceCheck ; do battery of checks
jc exit ; if error, exit with err code
;NOTE: we lose update needed for errors deleting existing directory with
;file-busy or access-denied files that are not deleted
;FAIL-CASE: attempt to overwrite directory contain file-in-use. A Folder
;Window on that directory will not get updated to reflect the successfully
;deleted files
segmov es, ds
lea di, ds:[si].FOIE_name ; copy/move to same name in
; destination
ND < cmp {byte} ss:[usingWastebasket], NOT_THE_WASTEBASKET >
ND < jne wastebasketThrowsAwayTemplatesTooYouKnow >
ND < test ds:[si].FOIE_flags, mask GFHF_TEMPLATE ; force copy if >
ND < jnz copyFile ; file is a template >
ND <wastebasketThrowsAwayTemplatesTooYouKnow: ; and NOT throwingaway>
cmp ss:[fileOpProgressType], FOPT_COPY
je copyFile ; if so, do it
call DeskFileMove ; move file to dest path
jmp afterOp ; handle results
copyFile:
call DeskFileCopy ; copy file to dest path
afterOp:
jc exit
mov ax, updateStrategy ; retrieve update strategy
call MarkWindowForUpdate ; pass ds:dx = source
clc
exit:
.leave ; preserves flags
ret
CopyMoveFileToDir endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyMoveExistenceCheck
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: checks if file exists
CALLED BY: CopyMoveFileToDir
PASS: ds = FileQuickTransferHeader
ds:si = FileOperationInfoEntry of file being moved/copied
current directory is destination directory
RETURN: carry set if error
ax - error code
carry clear if source file can be copied to destination
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 02/12/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyMoveExistenceCheck proc near
uses bx, cx, dx, ds, si, es, di, bp
.enter
clr ss:[useLocalMoveCopy] ; default to regular copy
;
; check if destination exists
;
lea dx, ds:[si].FOIE_name
call FileRootGetAttributes ; does file exist in dest.?
jnc destExists ; yes
cmp ax, ERROR_FILE_NOT_FOUND ; file doesn't exist in dest.?
je exitJMP ; correct -- exit with carry
; clear
errorExit:
stc
exitJMP:
jmp exit
destExists:
ND< call NDCheckIfNotReplaceable >
ND<LONG jc exit >
;
; Used to check for replacing a parent of the src, but that's handled
; in SetUpCopyMoveParams by the comparison against evilName, which
; was so gracefully set up by CheckSrcDestConflict
;
; We need to check to see if the file we are conflicting with has
; been merged into our directory by the magic or StandardPaths, or
; if it is actually a local file.
;
call IsConflictingFileRemote
LONG jc exit
mov ss:[useLocalMoveCopy], -1
;
; If the file we are copying is a remote file, then it may conflict
; with itself, as it may be mapped into our destination. In this case
; we want to ignore any warnings (as we are just making a local copy
; of what was already mapped in anyway) and just create a local copy,
; so skip to the end of the routine, and later routines will know what
; to do because we pass them the CLT_REMOTE_SELF value.
;
cmp ax, CLT_REMOTE_SELF
clc ; no error...
LONG je exit
;
; If the file isn't conflicting with itself, it is either local or
; is mapped in from another StandardPath tree, so we want to warn
; the user of an overwrite situation. If it is local, we will delete
; the local file, but still want to force a local copy, as the regular
; copy might wind up conflicting with a mapped in remote file that has
; been exposed by the deletion of the local file that was obscuring it.
; If it is mapped in, we don't actually delete anything, and copy
; locally. Because the mapped in copy will be obscured by the new
; local version (which is a different copy), in the eyes of the user
; it is has been overwriten, and therefore we still want the warning.
; Check the CLT_REMOTE_OTHER or CLT_LOCAL later in the routine when
; we decide whether or not to delete the destination.
;
mov bx, ax ; save ConflictLocationType
; across warning
;
; dest exists, ask user if s/he wishes to replace name file
;
if (not _FCAB and not _ZMGR)
call ReplaceWarning
else
mov ax, WARNING_REPLACE_32_FILE ; use 32 name
call DesktopYesNoWarning
endif ; if ((not _FCAB) and (not _ZMGR))
cmp ax, YESNO_YES ; user want to replace?
; (might be DESK_DB_DETACH
; or YESNO_CANCEL)
jne errorExit ; they don't, return cancel
;
; user wishes to replace existing file
;
cmp bx, CLT_REMOTE_OTHER ; no need to delete dest if it
LONG je exit ; is remote...
;
; if not CLT_REMOTE_OTHER, it must be CLT_LOCAL.
;
call CheckThatSourceStillExists ; if the source has been
LONG jc exit ; deleted, cancel operation
;
; Create a fake FileQuickTransfer block
; ds = FileQuickTransferHeader (move/copy source path)
; ds:si = FileOperationInfoEntry (move/copy source filename)
; destination for move/copy = current dir
;
push bx, cx, ds, si
mov ax, size FileQuickTransferHeader + size FileOperationInfoEntry
mov cx, ALLOC_DYNAMIC_LOCK
call MemAlloc ; bx = handle, ax = segment
jnc noMemErr
mov ax, ERROR_INSUFFICIENT_MEMORY
jmp removeExit
noMemErr:
push ds, si ; save incoming FOIE
push bx ; save buffer handle
mov ds, ax
mov ds:[FQTH_nextBlock], 0
mov ds:[FQTH_UIFA], 0
; feedback data and remote flag don't matter because this
; won't be used with a QuickTransfer, just internally.
mov ds:[FQTH_numFiles], 1
mov si, offset FQTH_pathname
mov cx, size FQTH_pathname
call FileGetCurrentPath ; bx = disk handle
mov ds:[FQTH_diskHandle], bx
pop bx ; retreive buffer handle
segmov es, ds ; es:di = FOIE_name
mov di, offset FQTH_files
pop ds, si ; ds:si = incoming FOIE
.assert (offset FOIE_name eq 0)
mov cx, size FOIE_name/2
rep movsw ; copy source name over
segmov ds, es ; ds = new FQTH
mov ds:[FQTH_files].FOIE_flags, 0
mov ds:[FQTH_files].FOIE_info, 0
sub sp, 3 * size FileExtAttrDesc
mov di, sp
segmov es, ss
mov es:[di].FEAD_attr, FEA_FILE_TYPE
mov es:[di].FEAD_value.segment, ds
mov es:[di].FEAD_value.offset, offset FQTH_files.FOIE_type
mov es:[di].FEAD_size, size GeosFileType
add di, size FileExtAttrDesc
mov es:[di].FEAD_attr, FEA_FILE_ATTR
mov es:[di].FEAD_value.segment, ds
mov es:[di].FEAD_value.offset, offset FQTH_files.FOIE_attrs
mov es:[di].FEAD_size, size FileAttrs
add di, size FileExtAttrDesc
mov es:[di].FEAD_attr, FEA_PATH_INFO
mov es:[di].FEAD_value.segment, ds
mov es:[di].FEAD_value.offset, offset FQTH_files.FOIE_pathInfo
mov es:[di].FEAD_size, size DirPathInfo
mov di, sp
mov cx, 3
mov ax, FEA_MULTIPLE
mov dx, offset FQTH_files.FOIE_name
call FileGetPathExtAttributes
EC < WARNING_C WARNING_FILE_ERROR_IGNORED >
add sp, 3 * size FileExtAttrDesc
;
; Turn off delete progress if thing being deleted is a file.
; If it's a directory, it will get turned on again by
; FileDeleteFileDirCommon, which is OK, I suppose...
;
mov ss:[showDeleteProgress], FALSE
mov cx, ss:[fileOpProgressType]
mov ax, FOPT_DELETE
call SetFileOpProgressBox
mov si, offset FQTH_files ; ds:si = new FOIE
call ForceFileDeleteFileDir ; else, del dest
; return with error status
; (might be "cancel")
pushf
call MemFree ; free created FQTH
call RemoveFileOpProgressBox
push ax
mov_tr ax, cx
call SetFileOpProgressBox
pop ax
popf
removeExit:
pop bx, cx, ds, si
exit:
.leave
ret
CopyMoveExistenceCheck endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckThatSourceStillExists
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: If the source file has been deleted for some reason, we
don't want to delete the destination and then fail on
the copy or move. Better to just bail out entirely.
CALLED BY: CopyMoveExistenceCheck
PASS: ds = segment of FileQuickTransferBlock of source
ds:dx = filename of source
RETURN: carry = set if source has been deleted
= clear if source is still there
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 8/ 6/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckThatSourceStillExists proc near
uses bx
.enter
call FilePushDir
push dx ; save filename offset
mov bx, ds:[FQTH_diskHandle]
lea dx, ds:[FQTH_pathname]
call FileSetCurrentPath
pop dx ; restore filename offset
jc exit ; bail if there were any
; problems setting the path
call FileRootGetAttributes ; does source exist?
; carry will be set if there
exit: ; is any problem finding the
call FilePopDir ; file
.leave
ret
CheckThatSourceStillExists endp
if _NEWDESK
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NDCheckIfNotReplaceable
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks a file's WOT to see if this is a candidate for being
replaced by another file. Only WOT_FOLDER, WOT_DOCUMENT
and WOT_EXECUTABLE may be replaced.
CALLED BY: CopyMoveExistenceCheck
PASS: ds:dx = filename of item to check
RETURN: carry = set if this item may not be replaced
ax = ERROR_CANNOT_OVERWRITE_THIS_WOT
= clear if it may be replaced
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 8/ 5/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NDCheckIfNotReplaceable proc near
uses bx,cx,dx,si,di,bp
.enter
segmov es, ss
mov bp, sp ; preserve old stack
mov cx, size NewDeskObjectType
sub sp, cx
mov di, sp
mov ax, FEA_DESKTOP_INFO
call FileGetPathExtAttributes
mov bx, es:[di] ; put WOT in bx
mov sp, bp ; reset stack
jnc checkWOT
;
; if we can't fetch a WOT, this file doesn't have extended
; attributes and therefore is not something we have to worry
; about overwriting. If it failed for other reasons, go ahead
; and error for that reason.
;
cmp ax, ERROR_ATTR_NOT_FOUND
je okToOverwrite
jmp doNotOverwrite
checkWOT:
cmp bx, WOT_FOLDER
je okToOverwrite
cmp bx, WOT_DOCUMENT
je okToOverwrite
cmp bx, WOT_EXECUTABLE
je okToOverwrite
mov ax, ERROR_CANNOT_OVERWRITE_THIS_WOT
doNotOverwrite:
stc ; any other WOT's are sacred
jmp exit
okToOverwrite:
clc
exit:
.leave
ret
NDCheckIfNotReplaceable endp
endif ; if _NEWDESK
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
IsConflictingFileRemote
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Checks to see if the file that we have a conflict with is
a local file, or if it is remote (mapped in because of the StandardPath
merging of trees).
If it is remote, there is the posiblity that it is our source
file, should our source be in a tree that is being mapped to our
destination. In this case we don't want to warn the user of an
overwrite, as we are just copying the same verion that they see in the
destination to actually *be* in the destination instead of being mapped
there, and want to copy/move the file to the local destination.
If it is not our source file, then we want to warn the user
of an overwrite because the file being moved/copied in will obscure the
copy that was being mapped in, effectively 'overwriting' it. We then
want to copy/move it to the local destination.
Should the conflicting file be local, we want to delete it,
but still want to use the FileCopyLocal routine, as the deletion of
the local file might reveal a mapped in remote file that would cause
a regular move/copy to complain.
CALLED BY: CopyMoveExistenceCheck
PASS: ds = FileQuickTransferHeader
ds:si = FileOperationInfoEntry of file being moved/copied
current directory is destination directory
RETURN: carry = clear if no error
ax = ConflictLocationType
ss:[useLocalMoveCopy] updated correctly
= set on error
ax = FileError
DESTROYED: nothing
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 10/14/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
IsConflictingFileRemote proc near
uses bx,cx,dx,si,di
attrArray local 3 dup (FileExtAttrDesc)
srcDisk local word
srcID local dword
destDisk local word
destID local dword
destPathInfo local DirPathInfo
.enter
mov ax, ss
lea bx, ss:[destDisk]
lea cx, ss:[destID]
lea dx, ss:[destPathInfo]
;
; Diskhandle FEAD
;
mov ss:[attrArray].FEAD_attr, FEA_DISK
mov ss:[attrArray].FEAD_value.segment, ax
mov ss:[attrArray].FEAD_value.offset, bx ; destDisk is buffer
mov ss:[attrArray].FEAD_size, word
;
; FileID FEAD
;
add bp, size FileExtAttrDesc ; next FEAD
mov ss:[attrArray].FEAD_attr, FEA_FILE_ID
mov ss:[attrArray].FEAD_value.segment, ax
mov ss:[attrArray].FEAD_value.offset, cx ; destID is buffer
mov ss:[attrArray].FEAD_size, dword
;
; PathInfo FEAD
;
add bp, size FileExtAttrDesc ; next FEAD
mov ss:[attrArray].FEAD_attr, FEA_PATH_INFO
mov ss:[attrArray].FEAD_value.segment, ax
mov ss:[attrArray].FEAD_value.offset, dx ; destPathInfo is buffer
mov ss:[attrArray].FEAD_size, size DirPathInfo
sub bp, 2 * (size FileExtAttrDesc) ; restore bp
segmov es, ss, di
lea di, ss:[attrArray] ; es:di is FEAD array
mov dx, si ; ds:dx is filename
;
; grab the attributes of the destination
;
mov ax, FEA_MULTIPLE
mov cx, 3 ; get all three attributes
call FileGetPathExtAttributes
jc exit
test ss:[destPathInfo], mask DPI_EXISTS_LOCALLY
mov ax, CLT_LOCAL
clc ; no error
jnz exit
;
; grab the attributes of the source
;
call FilePushDir ; save dest directory
mov bx, ds:[FQTH_diskHandle]
mov dx, offset FQTH_pathname
call FileSetCurrentPath ; set source as currentpath
jc popDirAndExit
lea ax, ss:[srcDisk]
lea bx, ss:[srcID]
mov ss:[attrArray].FEAD_value.offset, ax ; buffer is srcDisk
add bp, size FileExtAttrDesc ; next FEAD
mov ss:[attrArray].FEAD_value.offset, bx ; buffer is srcID
sub bp, size FileExtAttrDesc ; restore bp
mov dx, si ; ds:dx is filename
mov ax, FEA_MULTIPLE
mov cx, 2 ; we only want disk and fileID
call FileGetPathExtAttributes
popDirAndExit:
call FilePopDir ; restore dest directory
jc exit
;
; OK, so now we have the attributes we want...
;
mov ax, CLT_REMOTE_OTHER ; assume different files...
mov bx, ss:[srcDisk]
cmp bx, ss:[destDisk]
clc ; no error
jne exit
movdw bxcx, ss:[srcID]
cmpdw bxcx, ss:[destID]
clc ; no error
jne exit
mov ax, CLT_REMOTE_SELF
exit:
.leave
ret
IsConflictingFileRemote endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeskFileCopy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: copy file/directory
CALLED BY: CopyMoveFileToDir
PASS: ds:si = FileOperationInfoEntry for source
(file or directory)
ds:0 = FileQuickTransferHeader containing source dir
es:di = name for destination
current directory is destination directory
RETURN: carry set if error
carry clear otherwise
ax - error code
ss:[recurErrorFlag] set if recursive operation error
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
if (file to copy is not a directory) {
FileCopyFile(source pathname,
complete destination pathname);
} else {
FileCreateDir(complete destination pathname);
for each file X in directory {
DeskFileCopy("source pathname/X",
"complete destination pathname/X");
}
}
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 9/1/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DeskFileCopy proc far
.enter
mov ss:[dirCopyMoveRoutine], offset FileCopyFile
call CopyMoveFileOrDir
.leave
ret
DeskFileCopy endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DeskFileMove
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: move file to new directory
CALLED BY: CopyMoveFileToDir
PASS: ds:si = FileOperationInfoEntry for source
(file or directory)
ds:0 = FileQuickTransferHeader containing source dir
es:di = name for destination
current directory is destination directory
RETURN: carry set if error
carry clear otherwise
ax - error code
ss:[recurErrorFlag] set if recursive operation error
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
if (file to move is not a directory) {
FileMoveFile(source pathname,
complete destination pathname);
} else {
FileCreateDir(complete destination pathname);
for each file X in directory {
FileMove("source pathname/X",
"complete destination pathname/X");
}
}
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 8/31/89 Initial version
brianc 10/30/89 use FileMoveFile instead of FileRename
so different drives are supported
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DeskFileMove proc far
.enter
mov ss:[dirCopyMoveRoutine], offset FileMoveFile
call CopyMoveFileOrDir
.leave
ret
DeskFileMove endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyMoveFileOrDir
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy or move the current file or directory using a function
that depends on whether it is a file or a directory
CALLED BY: DeskFileCopy, DeskFileMove
PASS: ds:si = FileOperationInfoEntry for source
ds:0 = FileQuickTransferHeader containing source dir
es:di = name for destination
current dir is destination directory
ax = ConflictLocationType
ss:[dirCopyMoveRoutine] = routine to call if source is a file
RETURN: carry set on error:
ax = error code
carry clear if success:
ax = destroyed
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 2/26/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyMoveFileOrDir proc near
uses bx, cx, dx, ds, es, si, di, bp
.enter
if ENSURE_LOCAL_SP_SUBDIRS
;
; Ensure that subdirs of Standard Paths exists locally
;
call EnsureLocalStandardPathSubdirs
endif
;
; See if the source is a directory or file and react accordingly
;
call UtilCheckInfoEntrySubdir
jc doDirectory
clr ax ; no enum info yet
call ss:[dirCopyMoveRoutine] ; else, use regular file routine
jmp done
;
; do directory
; ds:si - source FOIE
; es:di - destination filespec
;
doDirectory:
mov ss:[recurErrorFlag], 1
mov ss:[enteredFileOpRecursion], 0 ; no recursion yet
push ds:[FQTH_nextBlock]
clr ds:[FQTH_nextBlock]
call FileCopyMoveDir ; do directory
pop ds:[FQTH_nextBlock]
done:
.leave
ret
CopyMoveFileOrDir endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FileCopyFile
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: copy a single file
CALLED BY: INTERNAL
DeskFileCopy, FileCopyMoveDir
PASS: ds:0 = FileQuickTransferHeader
ds:si = FileOperationInfoEntry
es:di - destination file in current directory
destination file doesn't already exist
RETURN: carry set if error
ax - error code
carry clear if success
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 8/28/89 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FileCopyFile proc near
mov ax, offset doAction
push ax
call FileCopyOrMoveFile
ret
doAction:
if TRY_CLOSE_ON_IN_USE_ERROR
push bp
mov bp, 1 ; do copy
call TryCloseFileForMoveCopy
pop bp
endif
tst ss:[useLocalMoveCopy]
jz regularCopy
call FileCopyLocal
jmp afterCopy
regularCopy:
call FileCopy
afterCopy:
retn
FileCopyFile endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FileMoveFile
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: move file
CALLED BY: INTERNAL
CopyMoveFileOrDir,
FileCopyMoveDir
PASS: ds:si - source FOIE
ds:0 = FileQuickTransferHeader
es:di - destination file
current dir is destination dir
RETURN: carry set if error
ax - error code
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
brianc 10/30/89 Initial version
dlitwin 11/04/93 added some readonly checks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FileMoveFile proc near
call DoRemoteFileCheck
jnc localFile
call FileCopyFile
jmp exit
localFile:
clr ss:[fileMoveSetReadOnly] ; assume not readonly
test ds:[si].FOIE_attrs, mask FA_RDONLY
jz startMove ; if not readonly, don't worry
call FileMoveReadOnlyCheck
jc exit ; readonly, user canceled
cmp ax, YESNO_YES ; if ax = YESNO_YES, user chose
clc ; to move the read only file
jne exit
;
; move the file and reset the readonly bit afterward
;
mov ss:[fileMoveSetReadOnly], -1 ; set reset bit after move
startMove:
mov ax, offset doAction
push ax
call FileCopyOrMoveFile
jc exit
tst ss:[fileMoveSetReadOnly]
jz exit
push ds, dx, cx
segmov ds, es, dx
mov dx, si ; ds:dx is filename
clr ch
mov cl, ds:[si].FOIE_attrs
call FileSetAttributes ; set the readonly bit
pop ds, dx, cx
exit:
ret ; EXIT HERE <------
doAction:
tst ss:[useLocalMoveCopy]
jz regularMove
call DesktopFileMoveLocal ; no FileMoveLocal is currently
jmp afterMove ; supported...
regularMove:
call FileMove
afterMove:
if TRY_CLOSE_ON_IN_USE_ERROR
jnc afterTryClose
push bp
mov bp, 0 ; do move
call TryCloseFileForMoveCopy
pop bp
afterTryClose:
endif
retn
FileMoveFile endp
FileOpLow ends
|
src/x11/x11.ads | darkestkhan/lumen2 | 8 | 2343 |
-- <NAME>, NiEstu, Phoenix AZ, Spring 2010
-- Lumen would not be possible without the support and contributions of a cast
-- of thousands, including and primarily Rod Kay.
-- This code is covered by the ISC License:
--
-- Copyright © 2010, NiEstu
--
-- 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.
with System;
package X11 is
-- Xlib stuff needed by more than one of the routines below
type Data_Format_Type is (Invalid, Bits_8, Bits_16, Bits_32);
for Data_Format_Type use
(Invalid => 0,
Bits_8 => 8,
Bits_16 => 16,
Bits_32 => 32);
type Atom is new Long_Integer;
-- Values used to compute record rep clause values that are portable
-- between 32- and 64-bit systems
Is_32 : constant := Boolean'Pos (System.Word_Size = 32);
Is_64 : constant := 1 - Is_32;
Word_Bytes : constant := Integer'Size / System.Storage_Unit;
Word_Bits : constant := Integer'Size - 1;
Long_Bytes : constant := Long_Integer'Size / System.Storage_Unit;
Long_Bits : constant := Long_Integer'Size - 1;
-- Xlib types needed only by Create
subtype Dimension is Short_Integer;
subtype Pixel is Long_Integer;
subtype Position is Short_Integer;
-- Used to simulate "out" param for C function
type Int_Ptr is access all Integer;
-- Actually an array, but only ever one element
type FB_Config_Ptr is access all System.Address;
-- OpenGL context ("visual") attribute specifiers
type X11Context_Attribute_Name is
(
Attr_None,
Attr_Use_GL, -- unused
Attr_Buffer_Size, -- color index buffer size, ignored if TrueColor
Attr_Level, -- buffer level for over/underlays
Attr_RGBA, -- set by Depth => TrueColor
Attr_Doublebuffer, -- set by Animate => True
Attr_Stereo, -- wow, you have stereo visuals?
Attr_Aux_Buffers, -- number of auxiliary buffers
Attr_Red_Size, -- bit depth, red
Attr_Green_Size, -- bit depth, green
Attr_Blue_Size, -- bit depth, blue
Attr_Alpha_Size, -- bit depth, alpha
Attr_Depth_Size, -- depth buffer size
Attr_Stencil_Size, -- stencil buffer size
Attr_Accum_Red_Size, -- accumulation buffer bit depth, red
Attr_Accum_Green_Size, -- accumulation buffer bit depth, green
Attr_Accum_Blue_Size, -- accumulation buffer bit depth, blue
Attr_Accum_Alpha_Size -- accumulation buffer bit depth, alpha
);
type X11Context_Attribute (Name : X11Context_Attribute_Name := Attr_None) is
record
case Name is
when Attr_None | Attr_Use_GL | Attr_RGBA |
Attr_Doublebuffer | Attr_Stereo =>
null; -- present or not, no value
when Attr_Level =>
Level : Integer := 0;
when Attr_Buffer_Size | Attr_Aux_Buffers | Attr_Depth_Size |
Attr_Stencil_Size | Attr_Red_Size | Attr_Green_Size |
Attr_Blue_Size | Attr_Alpha_Size | Attr_Accum_Red_Size |
Attr_Accum_Green_Size | Attr_Accum_Blue_Size |
Attr_Accum_Alpha_Size =>
Size : Natural := 0;
end case;
end record;
type X11Context_Attributes is array (Positive range <>) of
X11Context_Attribute;
Max_GLX_Attributes : constant := 2 +
(X11Context_Attribute_Name'Pos (X11Context_Attribute_Name'Last) + 1) * 2;
type GLX_Attribute_List is array (1 .. Max_GLX_Attributes) of Integer;
type GLX_Attribute_List_Ptr is new System.Address;
------------------------------------------------------------------------
type Display_Pointer is new System.Address;
-- The maximum length of an event data record
type Padding is array (1 .. 23) of Long_Integer;
type Screen_Depth is new Natural;
type Screen_Number is new Natural;
type Visual_ID is new Long_Integer;
type Window_ID is new Long_Integer;
type Alloc_Mode is (Alloc_None, Alloc_All);
type Atom_Array is array (Positive range <>) of Atom;
type Colormap_ID is new Long_Integer;
type X_Window_Attributes_Mask is mod 2 ** Integer'Size;
type Window_Class is (Copy_From_Parent, Input_Output, Input_Only);
type X_Event_Mask is mod 2 ** Long_Integer'Size;
-- An extremely abbreviated version of the XSetWindowAttributes
-- structure, containing only the fields we care about.
--
-- NOTE: offset multiplier values differ between 32-bit and 64-bit
-- systems since on 32-bit systems long size equals int size and the
-- record has no padding. The byte and bit widths come from Internal.
Start_32 : constant := 10;
Start_64 : constant := 9;
Start : constant := (Is_32 * Start_32) + (Is_64 * Start_64);
------------------------------------------------------------------------
Null_Display_Pointer : constant Display_Pointer :=
Display_Pointer (System.Null_Address);
type X_Set_Window_Attributes is record
Event_Mask : X_Event_Mask := 0;
Colormap : Colormap_ID := 0;
end record;
for X_Set_Window_Attributes use record
Event_Mask at (Start + 0) * Long_Bytes range 0 .. Long_Bits;
Colormap at (Start + 3) * Long_Bytes range 0 .. Long_Bits;
end record;
-- The GL rendering context type
type GLX_Context is new System.Address;
type X_Visual_Info is record
Visual : System.Address;
Visual_Ident : Visual_ID;
Screen : Screen_Number;
Depth : Screen_Depth;
Class : Integer;
Red_Mask : Long_Integer;
Green_Mask : Long_Integer;
Blue_Mask : Long_Integer;
Colormap_Size : Natural;
Bits_Per_RGB : Natural;
end record;
type X_Visual_Info_Pointer is access all X_Visual_Info;
type X_Class_Hint is record
Instance_Name : System.Address;
Class_Name : System.Address;
end record;
type X_Text_Property is record
Value : System.Address;
Encoding : Atom;
Format : Data_Format_Type;
NItems : Long_Integer;
end record;
---------------------------------------------------------------------------
-- X modifier mask and its values
type Modifier_Mask is mod 2 ** Integer'Size;
-- Xlib constants needed only by Create
Configure_Event_Mask : constant X_Window_Attributes_Mask :=
2#00_1000_0000_0000#; -- 11th bit
Configure_Colormap : constant X_Window_Attributes_Mask :=
2#10_0000_0000_0000#; -- 13th bit
-- Atom names
WM_Del : String := "WM_DELETE_WINDOW" & ASCII.NUL;
Null_Context : constant GLX_Context := GLX_Context (System.Null_Address);
-- X event type codes
-- we don't actually use this, just there to define bounds
X_Error : constant := 0;
X_Key_Press : constant := 2;
X_Key_Release : constant := 3;
X_Button_Press : constant := 4;
X_Button_Release : constant := 5;
X_Motion_Notify : constant := 6;
X_Enter_Notify : constant := 7;
X_Leave_Notify : constant := 8;
X_Focus_In : constant := 9;
X_Focus_Out : constant := 10;
X_Expose : constant := 12;
X_Unmap_Notify : constant := 18;
X_Map_Notify : constant := 19;
X_Configure_Notify : constant := 22;
X_Client_Message : constant := 33;
-- we don't actually use this, just there to define bounds
X_Generic_Event : constant := 35;
X_First_Event : constant := X_Error;
X_Last_Event : constant := X_Generic_Event + 1;
-- Our "delete window" atom value
Delete_Window_Atom : Atom;
------------------------------------------------------------------------
Shift_Mask : constant Modifier_Mask := 2#0000_0000_0000_0001#;
Lock_Mask : constant Modifier_Mask := 2#0000_0000_0000_0010#;
Control_Mask : constant Modifier_Mask := 2#0000_0000_0000_0100#;
Mod_1_Mask : constant Modifier_Mask := 2#0000_0000_0000_1000#;
Mod_2_Mask : constant Modifier_Mask := 2#0000_0000_0001_0000#;
Mod_3_Mask : constant Modifier_Mask := 2#0000_0000_0010_0000#;
Mod_4_Mask : constant Modifier_Mask := 2#0000_0000_0100_0000#;
Mod_5_Mask : constant Modifier_Mask := 2#0000_0000_1000_0000#;
Button_1_Mask : constant Modifier_Mask := 2#0000_0001_0000_0000#;
Button_2_Mask : constant Modifier_Mask := 2#0000_0010_0000_0000#;
Button_3_Mask : constant Modifier_Mask := 2#0000_0100_0000_0000#;
Button_4_Mask : constant Modifier_Mask := 2#0000_1000_0000_0000#;
Button_5_Mask : constant Modifier_Mask := 2#0001_0000_0000_0000#;
type X_Event_Code is new Integer range X_First_Event .. X_Last_Event;
Bytes : constant := Word_Bytes;
Bits : constant := Word_Bits;
Atom_Bits : constant := Atom'Size - 1;
Base_1_32 : constant := 8;
Base_2_32 : constant := 5;
Base_3_32 : constant := 6;
Base_4_32 : constant := 7;
Base_1_64 : constant := 16;
Base_2_64 : constant := 10;
Base_3_64 : constant := 12;
Base_4_64 : constant := 14;
Base_1 : constant := (Base_1_32 * Is_32) + (Base_1_64 * Is_64);
Base_2 : constant := (Base_2_32 * Is_32) + (Base_2_64 * Is_64);
Base_3 : constant := (Base_3_32 * Is_32) + (Base_3_64 * Is_64);
Base_4 : constant := (Base_4_32 * Is_32) + (Base_4_64 * Is_64);
type X_Event_Data (X_Event_Type : X_Event_Code := X_Error) is record
case X_Event_Type is
when X_Key_Press | X_Key_Release =>
Key_X : Natural;
Key_Y : Natural;
Key_Root_X : Natural;
Key_Root_Y : Natural;
Key_State : Modifier_Mask;
Key_Code : Natural;
when X_Button_Press | X_Button_Release =>
Btn_X : Natural;
Btn_Y : Natural;
Btn_Root_X : Natural;
Btn_Root_Y : Natural;
Btn_State : Modifier_Mask;
Btn_Code : Natural;
when X_Motion_Notify =>
Mov_X : Natural;
Mov_Y : Natural;
Mov_Root_X : Natural;
Mov_Root_Y : Natural;
Mov_State : Modifier_Mask;
when X_Enter_Notify | X_Leave_Notify =>
Xng_X : Natural;
Xng_Y : Natural;
Xng_Root_X : Natural;
Xng_Root_Y : Natural;
when X_Expose =>
Xps_X : Natural;
Xps_Y : Natural;
Xps_Width : Natural;
Xps_Height : Natural;
Xps_Count : Natural;
when X_Configure_Notify =>
Cfg_X : Natural;
Cfg_Y : Natural;
Cfg_Width : Natural;
Cfg_Height : Natural;
when X_Client_Message =>
Msg_Value : Atom;
when others =>
Pad : Padding;
end case;
end record;
for X_Event_Data use record
X_Event_Type at 0 * Bytes range 0 .. Bits;
Key_X at (Base_1 + 0) * Bytes range 0 .. Bits;
Key_Y at (Base_1 + 1) * Bytes range 0 .. Bits;
Key_Root_X at (Base_1 + 2) * Bytes range 0 .. Bits;
Key_Root_Y at (Base_1 + 3) * Bytes range 0 .. Bits;
Key_State at (Base_1 + 4) * Bytes range 0 .. Bits;
Key_Code at (Base_1 + 5) * Bytes range 0 .. Bits;
Btn_X at (Base_1 + 0) * Bytes range 0 .. Bits;
Btn_Y at (Base_1 + 1) * Bytes range 0 .. Bits;
Btn_Root_X at (Base_1 + 2) * Bytes range 0 .. Bits;
Btn_Root_Y at (Base_1 + 3) * Bytes range 0 .. Bits;
Btn_State at (Base_1 + 4) * Bytes range 0 .. Bits;
Btn_Code at (Base_1 + 5) * Bytes range 0 .. Bits;
Mov_X at (Base_1 + 0) * Bytes range 0 .. Bits;
Mov_Y at (Base_1 + 1) * Bytes range 0 .. Bits;
Mov_Root_X at (Base_1 + 2) * Bytes range 0 .. Bits;
Mov_Root_Y at (Base_1 + 3) * Bytes range 0 .. Bits;
Mov_State at (Base_1 + 4) * Bytes range 0 .. Bits;
Xng_X at (Base_1 + 0) * Bytes range 0 .. Bits;
Xng_Y at (Base_1 + 1) * Bytes range 0 .. Bits;
Xng_Root_X at (Base_1 + 2) * Bytes range 0 .. Bits;
Xng_Root_Y at (Base_1 + 3) * Bytes range 0 .. Bits;
Xps_X at (Base_2 + 0) * Bytes range 0 .. Bits;
Xps_Y at (Base_2 + 1) * Bytes range 0 .. Bits;
Xps_Width at (Base_2 + 2) * Bytes range 0 .. Bits;
Xps_Height at (Base_2 + 3) * Bytes range 0 .. Bits;
Xps_Count at (Base_2 + 4) * Bytes range 0 .. Bits;
Cfg_X at (Base_3 + 0) * Bytes range 0 .. Bits;
Cfg_Y at (Base_3 + 1) * Bytes range 0 .. Bits;
Cfg_Width at (Base_3 + 2) * Bytes range 0 .. Bits;
Cfg_Height at (Base_3 + 3) * Bytes range 0 .. Bits;
Msg_Value at (Base_4 + 0) * Bytes range 0 .. Atom_Bits;
end record;
------------------------------------------------------------------------
GL_TRUE : constant Character := Character'Val (1);
-----------------------------
-- Imported Xlib functions --
-----------------------------
function GLX_Create_Context (Display : in Display_Pointer;
Visual : in X_Visual_Info_Pointer;
Share_List : in GLX_Context;
Direct : in Character)
return GLX_Context
with Import => True, Convention => StdCall,
External_Name => "glXCreateContext";
function GLX_Make_Current (Display : in Display_Pointer;
Drawable : in Window_ID;
Context : in GLX_Context)
return Character
with Import => True, Convention => StdCall,
External_Name => "glXMakeCurrent";
function GLX_Make_Context_Current (Display : in Display_Pointer;
Draw : in Window_ID;
Read : in Window_ID;
Context : in GLX_Context)
return Character
with Import => True, Convention => StdCall,
External_Name => "glXMakeContextCurrent";
function X_Intern_Atom (Display : in Display_Pointer;
Name : in System.Address;
Only_If_Exists : in Natural)
return Atom
with Import => True, Convention => StdCall, External_Name => "XInternAtom";
procedure X_Set_Class_Hint (Display : in Display_Pointer;
Window : in Window_ID;
Hint : in X_Class_Hint)
with Import => True, Convention => StdCall,
External_Name => "XSetClassHint";
procedure X_Set_Icon_Name (Display : in Display_Pointer;
Window : in Window_ID;
Name : in System.Address)
with Import => True, Convention => StdCall,
External_Name => "XSetIconName";
procedure X_Set_WM_Icon_Name (Display : in Display_Pointer;
Window : in Window_ID;
Text_Prop : in System.Address)
with Import => True, Convention => StdCall,
External_Name => "XSetWMIconName";
procedure X_Set_WM_Name (Display : in Display_Pointer;
Window : in Window_ID;
Text_Prop : in System.Address)
with Import => True, Convention => StdCall,
External_Name => "XSetWMName";
function GLX_Choose_Visual (Display : in Display_Pointer;
Screen : in Screen_Number;
Attribute_List : in GLX_Attribute_List_Ptr)
return X_Visual_Info_Pointer
with Import => True, Convention => StdCall,
External_Name => "glXChooseVisual";
function GLX_Choose_FB_Config (Display : in Display_Pointer;
Screen : in Screen_Number;
Attribute_List : in GLX_Attribute_List_Ptr;
Num_Found : in Int_Ptr)
return FB_Config_Ptr
with Import => True, Convention => StdCall,
External_Name => "glXChooseFBConfig";
function GLX_Get_Visual_From_FB_Config (Display : in Display_Pointer;
Config : in System.Address)
return X_Visual_Info_Pointer
with Import => True, Convention => StdCall,
External_Name => "glXGetVisualFromFBConfig";
procedure X_Next_Event (Display : in Display_Pointer;
Event : in System.Address)
with Import => True, Convention => StdCall, External_Name => "XNextEvent";
procedure GLX_Destroy_Context (Display : in Display_Pointer;
Context : in GLX_Context)
with Import => True, Convention => StdCall,
External_Name => "glXDestroyContext";
function X_Create_Colormap (Display : in Display_Pointer;
Window : in Window_ID;
Visual : in System.Address;
Alloc : in Alloc_Mode)
return Colormap_ID
with Import => True, Convention => StdCall,
External_Name => "XCreateColormap";
function X_Create_Window (Display : in Display_Pointer;
Parent : in Window_ID;
X : in Position;
Y : in Position;
Width : in Dimension;
Height : in Dimension;
Border_Width : in Natural;
Depth : in Screen_Depth;
Class : in Window_Class;
Visual : in System.Address;
Valuemask : in X_Window_Attributes_Mask;
Attributes : in System.Address)
return Window_ID
with Import => True, Convention => StdCall,
External_Name => "XCreateWindow";
function X_Default_Screen (Display : in Display_Pointer)
return Screen_Number
with Import => True, Convention => StdCall,
External_Name => "XDefaultScreen";
procedure X_Map_Window (Display : in Display_Pointer;
Window : in Window_ID)
with Import => True, Convention => StdCall,
External_Name => "XMapWindow";
function X_Open_Display
(Display_Name : in System.Address := System.Null_Address)
return Display_Pointer
with Import => True, Convention => StdCall,
External_Name => "XOpenDisplay";
function X_Root_Window (Display : in Display_Pointer;
Screen_Num : in Screen_Number)
return Window_ID
with Import => True, Convention => StdCall, External_Name => "XRootWindow";
procedure X_Set_WM_Protocols (Display : in Display_Pointer;
Window : in Window_ID;
Protocols : in System.Address;
Count : in Integer)
with Import => True, Convention => StdCall,
External_Name => "XSetWMProtocols";
function X_Lookup_String (Event : in System.Address;
Buffer : in System.Address;
Limit : in Natural;
Keysym : in System.Address;
Compose : in System.Address)
return Natural
with Import => True, Convention => StdCall,
External_Name => "XLookupString";
function X_Pending (Display : in Display_Pointer)
return Natural
with Import => True, Convention => StdCall, External_Name => "XPending";
procedure X_Resize_Window (Display : in Display_Pointer;
Window : in Window_ID;
Width : in Positive;
Height : in Positive)
with Import => True, Convention => StdCall,
External_Name => "XResizeWindow";
procedure X_Warp_Pointer (Display : in Display_Pointer;
Source_W : in Window_ID;
Dest_W : in Window_ID;
Source_X : in Integer;
Source_Y : in Integer;
Source_Width : in Natural;
Source_Height : in Natural;
Dest_X : in Integer;
Dest_Y : in Integer)
with Import => True, Convention => StdCall,
External_Name => "XWarpPointer";
procedure X_Move_Window (Display : in Display_Pointer;
Window : in Window_ID;
X : in Natural;
Y : in Natural)
with Import => True, Convention => StdCall,
External_Name => "XMoveWindow";
procedure X_Query_Pointer (Display : in Display_Pointer;
Window : in Window_ID;
Root : in System.Address;
Child : in System.Address;
Root_X : in System.Address;
Root_Y : in System.Address;
Win_X : in System.Address;
Win_Y : in System.Address;
Mask : in System.Address)
with Import => True, Convention => StdCall,
External_Name => "XQueryPointer";
procedure X_Raise_Window (Display : in Display_Pointer;
Window : in Window_ID)
with Import => True, Convention => StdCall,
External_Name => "XRaiseWindow";
procedure X_Lower_Window (Display : in Display_Pointer;
Window : in Window_ID)
with Import => True, Convention => StdCall,
External_Name => "XLowerWindow";
---------------------------------------------------------------------------
end X11;
|
3-mid/opengl/source/lean/opengl-frustum.ads | charlie5/lace | 20 | 140 | package openGL.Frustum
--
-- Provide frustum operations.
--
is
type Plane_Id is (Left, Right, High, Low, Near, Far);
type Plane_array is array (Plane_Id) of openGL.Geometry_3d.Plane;
procedure normalise (Planes : in out Plane_array);
end openGL.Frustum;
|
x86/Search_Clear.asm | lucabrivio/asmFish-fasmg | 1 | 105438 | ; Search::clear() resets search state to zero, to obtain reproducible results
Search_Clear:
push rbx rsi rdi
call MainHash_Clear
mov byte[mainHash.date], 0
mov esi, dword[threadPool.threadCnt]
.NextThread:
sub esi, 1
js .ThreadsDone
mov rbx, qword[threadPool.threadTable+8*rsi]
; mainThread.previousScore is used in the time management part of idloop
; +VALUE_INFINITE causes us to think alot on the first move
mov dword[rbx+Thread.previousScore], VALUE_INFINITE
; clear thread stats
mov rdi, qword[rbx+Thread.rootPos.history]
mov ecx, (sizeof.HistoryStats + sizeof.MoveStats)/4
xor eax, eax
rep stosd
; clear cmh table - some overlap possible here
mov rdi, qword[rbx+Thread.rootPos.counterMoveHistory]
mov ecx, (sizeof.CounterMoveHistoryStats)/4
xor eax, eax
rep stosd
mov rdi, qword[rbx+Thread.rootPos.counterMoveHistory]
add rdi, CmhDeadOffset
mov ecx, 16*64
mov eax, CounterMovePruneThreshold - 1
rep stosd
jmp .NextThread
.ThreadsDone:
pop rdi rsi rbx
ret
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_261.asm | ljhsiun2/medusa | 9 | 90463 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x1afe7, %rdx
clflush (%rdx)
inc %rbp
mov (%rdx), %rdi
nop
and %rdi, %rdi
lea addresses_WC_ht+0x4b4f, %rax
clflush (%rax)
nop
nop
dec %r12
mov (%rax), %bx
nop
nop
sub %rbp, %rbp
lea addresses_UC_ht+0x122e7, %rsi
lea addresses_WT_ht+0x65e7, %rdi
nop
nop
nop
sub $4339, %r12
mov $29, %rcx
rep movsb
nop
nop
nop
nop
and %rbx, %rbx
lea addresses_A_ht+0xd6fb, %rsi
lea addresses_A_ht+0x8559, %rdi
nop
nop
nop
nop
sub %rbx, %rbx
mov $79, %rcx
rep movsw
nop
nop
nop
nop
and $21184, %rsi
lea addresses_WC_ht+0x1ba27, %rsi
lea addresses_normal_ht+0x169e7, %rdi
clflush (%rsi)
nop
nop
xor $61020, %rax
mov $73, %rcx
rep movsl
nop
dec %rdx
lea addresses_D_ht+0x1bba7, %r12
nop
nop
and %rax, %rax
movl $0x61626364, (%r12)
nop
cmp %rdi, %rdi
lea addresses_A_ht+0x135e7, %rsi
nop
nop
nop
nop
and %rcx, %rcx
mov (%rsi), %rdx
nop
nop
nop
nop
nop
and $36782, %rsi
lea addresses_UC_ht+0x12317, %r12
nop
nop
nop
inc %rbp
movb (%r12), %cl
nop
nop
nop
nop
nop
sub %rsi, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %rax
push %rbp
push %rdi
push %rdx
// Faulty Load
lea addresses_PSE+0x1d5e7, %r14
nop
nop
nop
add $18888, %rbp
vmovups (%r14), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %rdi
lea oracles, %rbp
and $0xff, %rdi
shlq $12, %rdi
mov (%rbp,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rbp
pop %rax
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_PSE', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_PSE', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 8}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 3}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D_ht', 'congruent': 5}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 10}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 3}}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
orka/src/orka/interface/orka-cameras.ads | onox/orka | 52 | 1506 | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 onox <<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.Numerics;
with GL.Types;
with Orka.Behaviors;
with Orka.Contexts;
with Orka.Transforms.Singles.Matrices;
with Orka.Transforms.Doubles.Vectors;
private with Orka.Transforms.Doubles.Matrices;
private with Orka.Types;
package Orka.Cameras is
pragma Preelaborate;
package Transforms renames Orka.Transforms.Singles.Matrices;
subtype Vector4 is Orka.Transforms.Doubles.Vectors.Vector4;
use type GL.Types.Double;
subtype Angle is GL.Types.Double range -Ada.Numerics.Pi .. Ada.Numerics.Pi;
subtype Distance is GL.Types.Double range 0.0 .. GL.Types.Double'Last;
Default_Scale : Vector4 := (0.002, 0.002, 1.0, 0.0);
-----------------------------------------------------------------------------
type Camera_Lens is record
Width, Height : Positive;
FOV : GL.Types.Single;
Reversed_Z : Boolean;
end record;
function Projection_Matrix (Object : Camera_Lens) return Transforms.Matrix4;
function Create_Lens
(Width, Height : Positive;
FOV : GL.Types.Single;
Context : Contexts.Context'Class) return Camera_Lens;
-----------------------------------------------------------------------------
type Camera is abstract tagged private;
type Camera_Ptr is not null access all Camera'Class;
procedure Update (Object : in out Camera; Delta_Time : Duration) is abstract;
procedure Set_Input_Scale
(Object : in out Camera;
X, Y, Z : GL.Types.Double);
procedure Set_Up_Direction
(Object : in out Camera;
Direction : Vector4);
function Lens (Object : Camera) return Camera_Lens;
procedure Set_Lens (Object : in out Camera; Lens : Camera_Lens);
function View_Matrix (Object : Camera) return Transforms.Matrix4 is abstract;
function View_Matrix_Inverse (Object : Camera) return Transforms.Matrix4 is abstract;
-- Return the inverse of the view matrix
function View_Position (Object : Camera) return Vector4 is abstract;
-- Return the position of the camera in world space
function Projection_Matrix (Object : Camera) return Transforms.Matrix4;
function Create_Camera (Lens : Camera_Lens) return Camera is abstract;
type Observing_Camera is interface;
procedure Look_At
(Object : in out Observing_Camera;
Target : Behaviors.Behavior_Ptr) is abstract;
-- Orient the camera such that it looks at the given target
function Target_Position
(Object : Observing_Camera) return Vector4 is abstract;
-- Return the position of the target the camera looks at
-----------------------------------------------------------------------------
-- First person camera's --
-----------------------------------------------------------------------------
type First_Person_Camera is abstract new Camera with private;
procedure Set_Position
(Object : in out First_Person_Camera;
Position : Vector4);
overriding
function View_Position (Object : First_Person_Camera) return Vector4;
-----------------------------------------------------------------------------
-- Third person camera's --
-----------------------------------------------------------------------------
type Third_Person_Camera is abstract new Camera and Observing_Camera with private;
overriding
procedure Look_At
(Object : in out Third_Person_Camera;
Target : Behaviors.Behavior_Ptr);
overriding
function Target_Position
(Object : Third_Person_Camera) return Vector4;
private
type Camera is abstract tagged record
Lens : Camera_Lens;
Scale : Vector4 := Default_Scale;
Up : Vector4 := (0.0, 1.0, 0.0, 0.0);
end record;
type First_Person_Camera is abstract new Camera with record
Position : Vector4 := (0.0, 0.0, 0.0, 1.0);
end record;
type Third_Person_Camera is abstract new Camera and Observing_Camera with record
Target : Behaviors.Behavior_Ptr := Behaviors.Null_Behavior;
end record;
function Clamp_Distance is new Orka.Types.Clamp (GL.Types.Double, Distance);
function Normalize_Angle is new Orka.Types.Normalize_Periodic (GL.Types.Double, Angle);
subtype Matrix4 is Orka.Transforms.Doubles.Matrices.Matrix4;
Y_Axis : constant Vector4 := (0.0, 1.0, 0.0, 0.0);
function Look_At (Target, Camera, Up_World : Vector4) return Matrix4;
function Rotate_To_Up (Object : Camera'Class) return Matrix4;
protected type Change_Updater is
procedure Set (Value : Vector4);
procedure Get (Value : in out Vector4);
private
Change : Vector4 := (0.0, 0.0, 0.0, 0.0);
Is_Set : Boolean := False;
end Change_Updater;
type Change_Updater_Ptr is not null access Change_Updater;
end Orka.Cameras;
|
arch/ARM/STM32/svd/stm32l4x3/stm32_svd-crc.ads | morbos/Ada_Drivers_Library | 2 | 5012 | -- This spec has been automatically generated from STM32L4x3.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.CRC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype IDR_IDR_Field is HAL.UInt8;
-- Independent data register
type IDR_Register is record
-- General-purpose 8-bit data register bits
IDR : IDR_IDR_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for IDR_Register use record
IDR at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype CR_POLYSIZE_Field is HAL.UInt2;
subtype CR_REV_IN_Field is HAL.UInt2;
-- Control register
type CR_Register is record
-- Write-only. RESET bit
RESET : Boolean := False;
-- unspecified
Reserved_1_2 : HAL.UInt2 := 16#0#;
-- Polynomial size
POLYSIZE : CR_POLYSIZE_Field := 16#0#;
-- Reverse input data
REV_IN : CR_REV_IN_Field := 16#0#;
-- Reverse output data
REV_OUT : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
RESET at 0 range 0 .. 0;
Reserved_1_2 at 0 range 1 .. 2;
POLYSIZE at 0 range 3 .. 4;
REV_IN at 0 range 5 .. 6;
REV_OUT at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Cyclic redundancy check calculation unit
type CRC_Peripheral is record
-- Data register
DR : aliased HAL.UInt32;
-- Independent data register
IDR : aliased IDR_Register;
-- Control register
CR : aliased CR_Register;
-- Initial CRC value
INIT : aliased HAL.UInt32;
-- polynomial
POL : aliased HAL.UInt32;
end record
with Volatile;
for CRC_Peripheral use record
DR at 16#0# range 0 .. 31;
IDR at 16#4# range 0 .. 31;
CR at 16#8# range 0 .. 31;
INIT at 16#10# range 0 .. 31;
POL at 16#14# range 0 .. 31;
end record;
-- Cyclic redundancy check calculation unit
CRC_Periph : aliased CRC_Peripheral
with Import, Address => CRC_Base;
end STM32_SVD.CRC;
|
Sources/Swarm/swarm_structures.ads | ForYouEyesOnly/Space-Convoy | 1 | 8307 | <reponame>ForYouEyesOnly/Space-Convoy
--
-- Jan & <NAME>, Australia, 2013
--
with Ada.Containers.Vectors; use Ada.Containers;
with Ada.Real_Time; use Ada.Real_Time;
with Ada.Task_Identification; use Ada.Task_Identification;
with Ada.Unchecked_Deallocation; use Ada;
with Barrier_Type; use Barrier_Type;
with Generic_Protected; pragma Elaborate_All (Generic_Protected);
with Generic_Realtime_Buffer; pragma Elaborate_All (Generic_Realtime_Buffer);
with Vectors_3D; use Vectors_3D;
with Rotations; use Rotations; pragma Elaborate_All (Rotations);
with Swarm_Configuration; use Swarm_Configuration;
with Swarm_Structures_Base; use Swarm_Structures_Base;
with Vehicle_Message_Type; use Vehicle_Message_Type;
with Vehicle_Task_Type; use Vehicle_Task_Type;
package Swarm_Structures is
pragma Elaborate_Body;
No_Of_Buffered_Incoming_Messages : constant Positive := 10;
No_Of_Buffered_Outgoing_Messages : constant Positive := 2;
type Distance_Entries is
record
Index : Swarm_Element_Index;
Distance : Distances;
Position_Diff : Positions;
Velocity_Diff : Velocities;
end record;
pragma Warnings ("H"); -- "<" hides a default operator in package Standard
function "<" (L, R : Distance_Entries) return Boolean;
pragma Warnings ("h");
package Distance_Vectors is new Vectors (Swarm_Element_Index, Distance_Entries);
package Sort_Distances is new Distance_Vectors.Generic_Sorting;
type Buffer_Size_Outgoing is mod No_Of_Buffered_Outgoing_Messages;
type Buffer_Size_Incoming is mod No_Of_Buffered_Incoming_Messages;
package Buffers_Outgoing is new Generic_Realtime_Buffer (Inter_Vehicle_Messages, Buffer_Size_Outgoing);
package Buffers_Incoming is new Generic_Realtime_Buffer (Inter_Vehicle_Messages, Buffer_Size_Incoming);
use Buffers_Outgoing;
use Buffers_Incoming;
protected type Vehicle_Comms is
procedure Send (Message : Inter_Vehicle_Messages);
entry Receive (Message : out Inter_Vehicle_Messages);
procedure Push_Message (Message : Inter_Vehicle_Messages);
procedure Fetch_Message (Message : out Inter_Vehicle_Messages);
function Has_Incoming_Messages return Boolean;
function Has_Outgoing_Messages return Boolean;
private
Sent_Messages : Buffers_Outgoing.Realtime_Buffer;
Received_Messages : Buffers_Incoming.Realtime_Buffer;
end Vehicle_Comms;
protected type Vehicle_Controls is
procedure Set_Steering (V : Vector_3D);
procedure Set_Throttle (T : Throttle_T);
function Read_Steering return Vector_3D;
function Read_Throttle return Throttle_T;
private
Steering_Direction : Vector_3D := Zero_Vector_3D;
Throttle : Throttle_T := Idle_Throttle;
end Vehicle_Controls;
type Globes_Touched_A is array (Energy_Globes_Defaults'Range) of Boolean;
No_Globes_Touched : constant Globes_Touched_A := (others => False);
package Protected_Time is new Generic_Protected (Time, Time_First);
type Charge_Info is record
Level : Vehicle_Charges; pragma Atomic (Level);
Charge_Time : Protected_Time.Monitor_Ptr;
Charge_No : Natural; pragma Atomic (Charge_No);
Globes_Touched : Globes_Touched_A := No_Globes_Touched;
end record;
type Neighbours_P is access all Distance_Vectors.Vector;
type Vehicle_Comms_P is access all Vehicle_Comms;
type Vehicle_Controls_P is access all Vehicle_Controls;
type Vehicle_Task_P is access all Vehicle_Task;
package Protected_Rotation is new Generic_Protected (Quaternion_Rotation, Zero_Rotation);
type Swarm_Element_State is
record
Position : Protected_Point_3D.Monitor_Ptr;
Rotation : Protected_Rotation.Monitor_Ptr;
Velocity : Protected_Vector_3D.Monitor_Ptr;
Acceleration : Protected_Vector_3D.Monitor_Ptr;
Charge : Charge_Info;
Neighbours : Neighbours_P;
Controls : Vehicle_Controls_P;
Comms : Vehicle_Comms_P;
Process : Vehicle_Task_P;
Process_abort : Barrier_Ptr;
Process_Id : Task_Id;
Vehicle_Id : Positive;
Last_Update : Time;
end record;
package Swarm_Vectors is new Vectors (Swarm_Element_Index, Swarm_Element_State);
procedure Free_Neighbours is new Unchecked_Deallocation (Object => Distance_Vectors.Vector, Name => Neighbours_P);
procedure Free_Controls is new Unchecked_Deallocation (Object => Vehicle_Controls, Name => Vehicle_Controls_P);
procedure Free_Comms is new Unchecked_Deallocation (Object => Vehicle_Comms, Name => Vehicle_Comms_P);
procedure Free_Process is new Unchecked_Deallocation (Object => Vehicle_Task, Name => Vehicle_Task_P);
protected Simulator_Tick is
entry Wait_For_Next_Tick;
procedure Tick;
private
Trigger : Boolean := False;
end Simulator_Tick;
end Swarm_Structures;
|
programs/oeis/034/A034262.asm | karttu/loda | 1 | 2536 | <reponame>karttu/loda
; A034262: a(n) = n^3 + n.
; 0,2,10,30,68,130,222,350,520,738,1010,1342,1740,2210,2758,3390,4112,4930,5850,6878,8020,9282,10670,12190,13848,15650,17602,19710,21980,24418,27030,29822,32800,35970,39338,42910,46692,50690,54910,59358,64040,68962,74130,79550,85228,91170,97382,103870,110640,117698,125050,132702,140660,148930,157518,166430,175672,185250,195170,205438,216060,227042,238390,250110,262208,274690,287562,300830,314500,328578,343070,357982,373320,389090,405298,421950,439052,456610,474630,493118,512080,531522,551450,571870,592788,614210,636142,658590,681560,705058,729090,753662,778780,804450,830678,857470,884832,912770,941290,970398,1000100,1030402,1061310,1092830,1124968,1157730,1191122,1225150,1259820,1295138,1331110,1367742,1405040,1443010,1481658,1520990,1561012,1601730,1643150,1685278,1728120,1771682,1815970,1860990,1906748,1953250,2000502,2048510,2097280,2146818,2197130,2248222,2300100,2352770,2406238,2460510,2515592,2571490,2628210,2685758,2744140,2803362,2863430,2924350,2986128,3048770,3112282,3176670,3241940,3308098,3375150,3443102,3511960,3581730,3652418,3724030,3796572,3870050,3944470,4019838,4096160,4173442,4251690,4330910,4411108,4492290,4574462,4657630,4741800,4826978,4913170,5000382,5088620,5177890,5268198,5359550,5451952,5545410,5639930,5735518,5832180,5929922,6028750,6128670,6229688,6331810,6435042,6539390,6644860,6751458,6859190,6968062,7078080,7189250,7301578,7415070,7529732,7645570,7762590,7880798,8000200,8120802,8242610,8365630,8489868,8615330,8742022,8869950,8999120,9129538,9261210,9394142,9528340,9663810,9800558,9938590,10077912,10218530,10360450,10503678,10648220,10794082,10941270,11089790,11239648,11390850,11543402,11697310,11852580,12009218,12167230,12326622,12487400,12649570,12813138,12978110,13144492,13312290,13481510,13652158,13824240,13997762,14172730,14349150,14527028,14706370,14887182,15069470,15253240,15438498
mov $1,$0
pow $0,3
add $1,$0
|
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_iy/cm48_sdcciy_lgamma_fastcall.asm | meesokim/z88dk | 0 | 20489 |
; float lgamma(float x) __z88dk_fastcall
SECTION code_fp_math48
PUBLIC cm48_sdcciy_lgamma_fastcall
EXTERN cm48_sdcciyp_dx2m48, am48_lgamma, cm48_sdcciyp_m482d
cm48_sdcciy_lgamma_fastcall:
call cm48_sdcciyp_dx2m48
call am48_lgamma
jp cm48_sdcciyp_m482d
|
asm/clearscreen.asm | ZoltanTheHun/AppleII | 0 | 160676 | <reponame>ZoltanTheHun/AppleII
; WUDSN IDE example MADS source file for Apple II binary file format (".b")
;
; Find more information on Apple II coding and APIs in the
; Apple Assembly Line at http://www.txbobsc.com/aal
; Apple II References at https://ia700602.us.archive.org/19/items/applerefjan78/appleIIrefjan78_text.pdf
;
; @com.wudsn.ide.asm.hardware=APPLE2
crout = $fd8e ; Line break out
cout = $fded ; Character out
cin = $fd0c ; Character in
hgr = $f3de
hgr2 = $f3d4 ; Switch to HGR2
txtm = $fb39 ; Switch to text mode
dispAT = $f836 ; Display @ signs
opt h-f+
org $c00-4 ;After the screen memory
.word main
.word .len main
.proc main
jmp start
cls
lda #$00 ;initialize $2000 as the screenbase
sta $00fa
lda #$20
sta $00fb
newln
ldy #$00 ;start clearing a block (block = 8 lines)
lda #$00
clear
sta ($fa),y ;clear line in a block
iny
cpy #$0 ;going through 256 bytes
bne clear
clc ;goto next block
lda $fb
adc #$1
sta $fb
cmp #$40 ;repeat until end of page1
bne newln
rts
start
jsr cls
jsr hgr
jsr cin
jsr txtm
jmp $03d0 ;Return to DOS
.endp |
source/base/incr-lexers.ads | reznikmm/increment | 5 | 9266 | <reponame>reznikmm/increment<filename>source/base/incr-lexers.ads
-- Copyright (c) 2015-2017 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
-- @summary
-- Lexical Analysis Stuff
--
-- @description
-- This package provides namespace for lexical analysis algorithms
-- and related data types.
package Incr.Lexers is
pragma Pure;
end Incr.Lexers;
|
src/json-streams.adb | Statkus/json-ada | 0 | 11110 | -- Copyright (c) 2016 onox <<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.Characters.Latin_1;
with Ada.IO_Exceptions;
with Ada.Unchecked_Conversion;
package body JSON.Streams is
use type AS.Stream_Element_Offset;
overriding
procedure Read_Character (Object : in out Stream_String; Item : out Character) is
begin
if Integer (Object.Index) not in Object.Text'Range then
raise Ada.IO_Exceptions.End_Error;
end if;
Item := Object.Text (Integer (Object.Index));
Object.Index := Object.Index + 1;
end Read_Character;
overriding
procedure Read_Character (Object : in out Stream_Bytes; Item : out Character) is
function Convert is new Ada.Unchecked_Conversion
(Source => AS.Stream_Element, Target => Character);
begin
if Object.Index not in Object.Bytes'Range then
raise Ada.IO_Exceptions.End_Error;
end if;
Item := Convert (Object.Bytes (Object.Index));
Object.Index := Object.Index + 1;
end Read_Character;
function Has_Buffered_Character (Object : Stream) return Boolean
is (Object.Next_Character /= Ada.Characters.Latin_1.NUL);
function Read_Character (Object : in out Stream) return Character is
Index : AS.Stream_Element_Offset;
begin
return Object.Read_Character (Index);
end Read_Character;
function Read_Character
(Object : in out Stream;
Index : out AS.Stream_Element_Offset) return Character
is
C : Character;
begin
Index := Object.Index;
if Object.Next_Character = Ada.Characters.Latin_1.NUL then
Stream'Class (Object).Read_Character (C);
else
C := Object.Next_Character;
Object.Next_Character := Ada.Characters.Latin_1.NUL;
end if;
return C;
end Read_Character;
procedure Write_Character (Object : in out Stream; Next : Character) is
begin
Object.Next_Character := Next;
end Write_Character;
overriding
function Get_String
(Object : Stream_String;
Offset, Length : AS.Stream_Element_Offset) return String is
begin
return Object.Text (Integer (Offset) .. Integer (Offset + Length - 1));
end Get_String;
overriding
function Get_String
(Object : Stream_Bytes;
Offset, Length : AS.Stream_Element_Offset) return String
is
subtype Constrained_String is String (1 .. Integer (Length));
function Convert is new Ada.Unchecked_Conversion
(Source => AS.Stream_Element_Array, Target => Constrained_String);
begin
return Convert (Object.Bytes (Offset .. Offset + Length - 1));
end Get_String;
function Create_Stream (Text : not null access String) return Stream'Class is
begin
return Stream_String'(Text => Text,
Next_Character => Ada.Characters.Latin_1.NUL,
Index => AS.Stream_Element_Offset (Text'First));
end Create_Stream;
function Create_Stream
(Bytes : not null access AS.Stream_Element_Array) return Stream'Class is
begin
return Stream_Bytes'(Bytes => Bytes,
Next_Character => Ada.Characters.Latin_1.NUL,
Index => Bytes'First);
end Create_Stream;
end JSON.Streams;
|
include/sf-network-sockettcp.ads | danva994/ASFML-1.6 | 1 | 22789 | -- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 <NAME> (<EMAIL>)
-- //
-- // This software is provided 'as-is', without any express or implied warranty.
-- // In no event will the authors be held liable for any damages arising from the use of this software.
-- //
-- // Permission is granted to anyone to use this software for any purpose,
-- // including commercial applications, and to alter it and redistribute it freely,
-- // subject to the following restrictions:
-- //
-- // 1. The origin of this software must not be misrepresented;
-- // you must not claim that you wrote the original software.
-- // If you use this software in a product, an acknowledgment
-- // in the product documentation would be appreciated but is not required.
-- //
-- // 2. Altered source versions must be plainly marked as such,
-- // and must not be misrepresented as being the original software.
-- //
-- // 3. This notice may not be removed or altered from any source distribution.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Sf.Config;
with Sf.Network.IPAddress;
with Sf.Network.SocketStatus;
with Sf.Network.Types;
package Sf.Network.SocketTCP is
use Sf.Config;
use Sf.Network.IPAddress;
use Sf.Network.SocketStatus;
use Sf.Network.Types;
-- ////////////////////////////////////////////////////////////
-- /// Construct a new TCP socket
-- ///
-- /// \return Pointer to the new socket
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Create return sfSocketTCP_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Destroy an existing TCP socket
-- ///
-- /// \param Socket : Socket to destroy
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSocketTCP_Destroy (Socket : sfSocketTCP_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Change the blocking state of a TCP socket.
-- /// The default behaviour of a socket is blocking
-- ///
-- /// \param Socket : Socket to modify
-- /// \param Blocking : Pass sfTrue to set the socket as blocking, or false for non-blocking
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSocketTCP_SetBlocking (Socket : sfSocketTCP_Ptr; Blocking : sfBool);
-- ////////////////////////////////////////////////////////////
-- /// Connect a TCP socket to another computer on a specified port
-- ///
-- /// \param Socket : Socket to use for connecting
-- /// \param Port : Port to use for transfers (warning : ports < 1024 are reserved)
-- /// \param HostAddress : IP Address of the host to connect to
-- /// \param Timeout : Maximum time to wait (0 to use no timeout)
-- ///
-- /// \return sfTrue if operation has been successful
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Connect
(Socket : sfSocketTCP_Ptr;
Port : sfUint16;
HostAddress : sfIPAddress;
Timeout : Float)
return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Listen to a specified port for incoming data or connections
-- ///
-- /// \param Socket : Socket to use for listening
-- /// \param Port : Port to listen to
-- ///
-- /// \return sfTrue if operation has been successful
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Listen (Socket : sfSocketTCP_Ptr; Port : sfUint16) return sfBool;
-- ////////////////////////////////////////////////////////////
-- /// Wait for a connection (must be listening to a port).
-- /// This function is blocking, ie. it won't return before
-- /// a connection has been accepted
-- ///
-- /// \param Socket : Socket to use for accepting
-- /// \param Connected : Pointer to a socket pointer that will be filled with the connected client
-- /// \param Address : Pointer to an address to fill with client infos
-- ///
-- /// \return Socket status
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Accept
(Socket : sfSocketTCP_Ptr;
Connected : access sfSocketTCP_Ptr;
Address : access sfIPAddress)
return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Send an array of bytes to the host (must be connected first)
-- ///
-- /// \param Socket : Socket to use for sending
-- /// \param Data : Pointer to the bytes to send
-- /// \param Size : Number of bytes to send
-- ///
-- /// \return Socket status
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Send
(Socket : sfSocketTCP_Ptr;
Data : sfInt8_Ptr;
Size : sfSize_t)
return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Receive an array of bytes from the host (must be connected first)
-- ///
-- /// \param Socket : Socket to use for receiving
-- /// \param Data : Pointer to a byte array to fill (make sure it is big enough)
-- /// \param MaxSize : Maximum number of bytes to read
-- /// \param SizeReceived : Number of bytes received
-- ///
-- /// \return Socket status
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_Receive
(Socket : sfSocketTCP_Ptr;
Data : sfInt8_Ptr;
MaxSize : sfSize_t;
SizeReceived : access sfSize_t)
return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Send a packet of data to the host (must be connected first)
-- ///
-- /// \param Socket : Socket to use for sending
-- /// \param Packet : Packet to send
-- ///
-- /// \return Socket status
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_SendPacket (Socket : sfSocketTCP_Ptr; Packet : sfPacket_Ptr) return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Receive a packet from the host (must be connected first)
-- ///
-- /// \param Socket : Socket to use for receiving
-- /// \param Packet : Packet to fill with received data
-- ///
-- /// \return Socket status
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_ReceivePacket (Socket : sfSocketTCP_Ptr; Packet : sfPacket_Ptr) return sfSocketStatus;
-- ////////////////////////////////////////////////////////////
-- /// Check if a socket is in a valid state ; this function
-- /// can be called any time to check if the socket is OK
-- ///
-- /// \param Socket : Socket to check
-- ///
-- /// \return True if the socket is valid
-- ///
-- ////////////////////////////////////////////////////////////
function sfSocketTCP_IsValid (Socket : sfSocketTCP_Ptr) return sfBool;
private
pragma Import (C, sfSocketTCP_Create, "sfSocketTCP_Create");
pragma Import (C, sfSocketTCP_Destroy, "sfSocketTCP_Destroy");
pragma Import (C, sfSocketTCP_SetBlocking, "sfSocketTCP_SetBlocking");
pragma Import (C, sfSocketTCP_Connect, "sfSocketTCP_Connect");
pragma Import (C, sfSocketTCP_Listen, "sfSocketTCP_Listen");
pragma Import (C, sfSocketTCP_Accept, "sfSocketTCP_Accept");
pragma Import (C, sfSocketTCP_Send, "sfSocketTCP_Send");
pragma Import (C, sfSocketTCP_Receive, "sfSocketTCP_Receive");
pragma Import (C, sfSocketTCP_SendPacket, "sfSocketTCP_SendPacket");
pragma Import (C, sfSocketTCP_ReceivePacket, "sfSocketTCP_ReceivePacket");
pragma Import (C, sfSocketTCP_IsValid, "sfSocketTCP_IsValid");
end Sf.Network.SocketTCP;
|
test/golang/bug-901.output.asm | OfekShilon/compiler-explorer | 4,668 | 24136 | .file 1 "test.go"
.loc 1 3 0
TEXT "".Fun(SB), NOSPLIT, $0-0
FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
XORL AX, AX
.loc 1 4 0
JMP Fun_pc7
Fun_pc4:
INCQ AX
Fun_pc7:
CMPQ AX, $10
JLT Fun_pc4
RET |
libtool/src/gmp-6.1.2/mpn/x86/mod_34lsub1.asm | kroggen/aergo | 1,602 | 247174 | dnl Generic x86 mpn_mod_34lsub1 -- mpn remainder modulo 2^24-1.
dnl Copyright 2000-2002, 2004 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C P5 3.0
C P6 3.66
C K6 3.0
C K7 1.3
C P4 9
C mp_limb_t mpn_mod_34lsub1 (mp_srcptr src, mp_size_t size)
C
defframe(PARAM_SIZE, 8)
defframe(PARAM_SRC, 4)
dnl re-use parameter space
define(SAVE_EBX, `PARAM_SRC')
TEXT
ALIGN(16)
PROLOGUE(mpn_mod_34lsub1)
deflit(`FRAME',0)
movl PARAM_SIZE, %ecx
movl PARAM_SRC, %edx
subl $2, %ecx
ja L(three_or_more)
movl (%edx), %eax
jb L(one)
movl 4(%edx), %ecx
movl %eax, %edx
shrl $24, %eax C src[0] low
andl $0xFFFFFF, %edx C src[0] high
addl %edx, %eax
movl %ecx, %edx
andl $0xFFFF, %ecx
shrl $16, %edx C src[1] high
addl %edx, %eax
shll $8, %ecx C src[1] low
addl %ecx, %eax
L(one):
ret
L(three_or_more):
C eax
C ebx
C ecx size-2
C edx src
C esi
C edi
C ebp
movl %ebx, SAVE_EBX C and arrange 16-byte loop alignment
xorl %ebx, %ebx
pushl %esi FRAME_pushl()
xorl %esi, %esi
pushl %edi FRAME_pushl()
xorl %eax, %eax C and clear carry flag
C offset 0x40 here
L(top):
C eax acc 0mod3
C ebx acc 1mod3
C ecx counter, limbs
C edx src
C esi acc 2mod3
C edi
C ebp
leal 12(%edx), %edx
leal -2(%ecx), %ecx
adcl -12(%edx), %eax
adcl -8(%edx), %ebx
adcl -4(%edx), %esi
decl %ecx
jg L(top)
C ecx is -2, -1 or 0 representing 0, 1 or 2 more limbs, respectively
movl $0xFFFFFFFF, %edi
incl %ecx
js L(combine)
adcl (%edx), %eax
movl $0xFFFFFF00, %edi
decl %ecx
js L(combine)
adcl 4(%edx), %ebx
movl $0xFFFF0000, %edi
L(combine):
C eax acc 0mod3
C ebx acc 1mod3
C ecx
C edx
C esi acc 2mod3
C edi mask
C ebp
sbbl %ecx, %ecx C carry
movl %eax, %edx C 0mod3
shrl $24, %eax C 0mod3 high
andl %edi, %ecx C carry masked
subl %ecx, %eax C apply carry
movl %ebx, %edi C 1mod3
shrl $16, %ebx C 1mod3 high
andl $0x00FFFFFF, %edx C 0mod3 low
addl %edx, %eax C apply 0mod3 low
andl $0xFFFF, %edi
shll $8, %edi C 1mod3 low
addl %ebx, %eax C apply 1mod3 high
addl %edi, %eax C apply 1mod3 low
movl %esi, %edx C 2mod3
shrl $8, %esi C 2mod3 high
andl $0xFF, %edx C 2mod3 low
shll $16, %edx C 2mod3 low
addl %esi, %eax C apply 2mod3 high
addl %edx, %eax C apply 2mod3 low
popl %edi FRAME_popl()
movl SAVE_EBX, %ebx
popl %esi FRAME_popl()
ret
EPILOGUE()
|
oeis/253/A253437.asm | neoneye/loda-programs | 11 | 170168 | <filename>oeis/253/A253437.asm
; A253437: Number of (3+1) X (n+1) 0..1 arrays with every 2 X 2 subblock diagonal minus antidiagonal sum nondecreasing horizontally, vertically and ne-to-sw antidiagonally.
; 69,73,85,120,192,336,624,1200,2352,4656,9264,18480,36912,73776,147504,294960,589872,1179696,2359344,4718640,9437232,18874416,37748784,75497520,150994992,301989936,603979824,1207959600,2415919152,4831838256,9663676464,19327352880,38654705712,77309411376,154618822704,309237645360,618475290672,1236950581296,2473901162544,4947802325040,9895604650032,19791209300016,39582418599984,79164837199920,158329674399792,316659348799536,633318697599024,1266637395198000,2533274790395952,5066549580791856
mov $2,3
lpb $0
sub $0,1
mul $2,2
mov $1,$2
sub $1,3
lpe
add $0,1
trn $2,4
add $4,2
add $0,$4
mul $0,2
add $3,$0
sub $1,$3
trn $1,4
add $2,1
add $1,$2
add $1,$2
add $1,67
mov $0,$1
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1562.asm | ljhsiun2/medusa | 9 | 80527 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x1c833, %rsi
lea addresses_A_ht+0x6b97, %rdi
nop
nop
nop
nop
nop
xor $11210, %r12
mov $23, %rcx
rep movsl
nop
nop
and $30497, %rax
lea addresses_D_ht+0x1d0d3, %rbp
nop
inc %r15
movups (%rbp), %xmm1
vpextrq $1, %xmm1, %rdi
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_UC_ht+0x122b3, %rcx
clflush (%rcx)
nop
nop
nop
nop
xor %rax, %rax
movups (%rcx), %xmm0
vpextrq $0, %xmm0, %r12
nop
and %rcx, %rcx
lea addresses_WT_ht+0x1bff3, %rax
clflush (%rax)
nop
nop
nop
nop
nop
cmp $64286, %rbp
mov (%rax), %edi
nop
nop
sub $5377, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r15
push %r9
push %rax
push %rdx
// Faulty Load
lea addresses_PSE+0x16ab3, %r9
nop
nop
nop
add %rax, %rax
mov (%r9), %r15d
lea oracles, %rax
and $0xff, %r15
shlq $12, %r15
mov (%rax,%r15,1), %r15
pop %rdx
pop %rax
pop %r9
pop %r15
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
|
agda-stdlib/src/Relation/Binary.agda | DreamLinuxer/popl21-artifact | 5 | 6791 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of homogeneous binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary where
------------------------------------------------------------------------
-- Re-export various components of the binary relation hierarchy
open import Relation.Binary.Core public
open import Relation.Binary.Definitions public
open import Relation.Binary.Structures public
open import Relation.Binary.Bundles public
|
programs/oeis/286/A286808.asm | karttu/loda | 0 | 174209 | <gh_stars>0
; A286808: Positions of 0 in A286807; complement of A286809.
; 1,2,5,8,10,12,15,17,19,21,23,25,27,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,251,253,255,257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399,401,403,405,407,409,411,413,415,417,419,421,423,425,427,429,431,433,435,437,439,441,443,445,447,449,451,453,455,457,459,461,463,465,467,469,471,473,475,477,479,481,483,485,487,489,491,493,495,497,499,501,503,506
mul $0,2
trn $0,1
add $0,1
mov $1,$0
mov $2,4
lpb $0,1
trn $0,$2
add $0,2
add $1,1
mul $2,2
lpe
|
libsrc/target/x1/x1_set_text_80.asm | jpoikela/z88dk | 640 | 97943 | <filename>libsrc/target/x1/x1_set_text_80.asm
;
; Sharp X1 specific routines
; switch to 80 columns text mode
; Uses high resolution text if available
;
; $Id: x1_set_text_80.asm,v 1.5 2016-07-14 17:44:18 pauloscustodio Exp $
;
SECTION code_clib
PUBLIC x1_set_text_80
PUBLIC _x1_set_text_80
; EXTERN x1_get_pcg_version
EXTERN set_crtc_10
EXTERN __console_w
x1_set_text_80:
_x1_set_text_80:
; call x1_get_pcg_version
; ld a,l
; dec a
; push af
; jr nz,pcgv2
ld hl,t80v1
; jr set_vmode
;pcgv2:
; ld hl,t80v2
set_vmode:
call set_crtc_10
; pop af
; jr z,x1mode ; low resolution text (16khz, ...)
; ld a,3 ; high resolution text (16khz, ...)
;x1mode:
;xor a
ld a,7
ld bc,1FD0h
out (c),a
ld a,80
ld (__console_w),a
ret
SECTION rodata_clib
t80v1:
defb 6Fh, 50h, 59h, 38h, 1Fh, 02h, 19h, 1Ch, 00h, 07h
;t80v2:
; defb 6Bh, 50h, 59h, 88h, 1Bh, 02h, 19h, 1Ah, 00h, 0Fh
|
Library/Text/UI/uiNoGraphicsText.asm | steakknife/pcgeos | 504 | 97519 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: Config
MODULE:
FILE: uiNoGraphicsText.asm
AUTHOR: <NAME>, Dec 14, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 12/14/92 Initial revision
DESCRIPTION:
Text object that allows no graphics to be inserted.
$Id: uiNoGraphicsText.asm,v 1.1 97/04/07 11:16:51 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextClassStructures segment resource
NoGraphicsTextClass
TextClassStructures ends
if not NO_CONTROLLERS
TextSRControlCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
NoGraphicsTextFilterViaCharacter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Filters out graphics.
CALLED BY: GLOBAL
PASS: nada
RETURN: nada
DESTROYED: nada
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
atw 12/14/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
NoGraphicsTextFilterViaCharacter method NoGraphicsTextClass,
MSG_VIS_TEXT_FILTER_VIA_CHARACTER
.enter
cmp cx, C_GRAPHIC
jnz exit
clr cx
exit:
.leave
ret
NoGraphicsTextFilterViaCharacter endp
TextSRControlCode ends
endif ; not NO_CONTROLLERS
|
tests/az3_suite.adb | Componolit/AZ3 | 5 | 2568 | <filename>tests/az3_suite.adb
with Z3.Tests;
package body AZ3_Suite is
use AUnit.Test_Suites;
-- Statically allocate test suite:
Result : aliased Test_Suite;
-- Statically allocate test cases:
Z3_Tests : aliased Z3.Tests.Test_Case;
function Suite return Access_Test_Suite is
begin
Add_Test (Result'Access, Z3_Tests'Access);
return Result'Access;
end Suite;
end AZ3_Suite;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.