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
|
---|---|---|---|---|
library/misc/clipboardClear.applescript
|
NYHTC/applescript-fm-helper
| 1 |
2520
|
-- removeExtraAppsFromDock{listOfAllowedAppNames:null}
-- <NAME>, NYHTC
-- clear the clipboard
(*
HISTORY:
1.0 - 2016-xx-xx ( eshagdar ): created
*)
on run
removeExtraAppsFromDock(prefs)
end run
--------------------
-- START OF CODE
--------------------
on clipboardClear()
-- version 1.0
tell application "System Events" to set the clipboard to null
end clipboardClear
--------------------
-- END OF CODE
--------------------
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pointer_variable_bounds_q.ads
|
best08618/asylo
| 7 |
27343
|
<filename>gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/pointer_variable_bounds_q.ads
package pointer_variable_bounds_q is
type A_SIZE_TYPE is new INTEGER range 0 .. 65536;
function A_MAX_COMPS return A_SIZE_TYPE;
end pointer_variable_bounds_q;
|
oeis/094/A094430.asm
|
neoneye/loda-programs
| 11 |
96387
|
<reponame>neoneye/loda-programs
; A094430: a(n) is the rightmost term of M^n * [1 0 0], where M is the 3 X 3 matrix [0 1 0 / 0 0 1 / 7 -14 7].
; Submitted by <NAME>
; 7,49,245,1078,4459,17836,69972,271313,1044435,4002467,15294370,58337097,222255768,846131608,3219700183,12247849145,46582062709,177142452214,673583231587,2561162729076,9737971026812,37024601601729,140768755940267,535202666345347,2034828292465794,7736342010007569,29413216639949296,111827526386799664,425162045818360487,1616441467792973185,6145614317801363125,23365253996236440694,88833267798986813403,337738618870207065980,1284061360879289159076,4881921736565032883633,18560763435736631420227
add $0,1
seq $0,217274 ; a(n) = 7*a(n-1) - 14*a(n-2) + 7*a(n-3) with a(0)=0, a(1)=1, a(2)=7.
mul $0,7
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-mastop.ads
|
djamal2727/Main-Bearing-Analytical-Model
| 0 |
1993
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- SYSTEM.MACHINE_STATE_OPERATIONS --
-- --
-- S p e c --
-- --
-- Copyright (C) 1999-2020, 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 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
with System.Storage_Elements;
package System.Machine_State_Operations is
subtype Code_Loc is System.Address;
-- Code location used in building exception tables and for call addresses
-- when propagating an exception (also traceback table) Values of this
-- type are created by using Label'Address or extracted from machine
-- states using Get_Code_Loc.
type Machine_State is new System.Address;
-- The table based exception handling approach (see a-except.adb) isolates
-- the target dependent aspects using an abstract data type interface
-- to the type Machine_State, which is represented as a System.Address
-- value (presumably implemented as a pointer to an appropriate record
-- structure).
function Machine_State_Length return System.Storage_Elements.Storage_Offset;
-- Function to determine the length of the Storage_Array needed to hold
-- a machine state. The machine state will always be maximally aligned.
-- The value returned is a constant that will be used to allocate space
-- for a machine state value.
function Allocate_Machine_State return Machine_State;
-- Allocate the required space for a Machine_State
procedure Free_Machine_State (M : in out Machine_State);
-- Free the dynamic memory taken by Machine_State
-- The initial value of type Machine_State is created by the low level
-- routine that actually raises an exception using the special builtin
-- _builtin_machine_state. This value will typically encode the value of
-- the program counter, and relevant registers. The following operations
-- are defined on Machine_State values:
function Get_Code_Loc (M : Machine_State) return Code_Loc;
-- This function extracts the program counter value from a machine state,
-- which the caller uses for searching the exception tables, and also for
-- recording entries in the traceback table. The call returns a value of
-- Null_Loc if the machine state represents the outer level, or some other
-- frame for which no information can be provided.
procedure Pop_Frame (M : Machine_State);
-- This procedure pops the machine state M so that it represents the
-- call point, as though the current subprogram had returned. It changes
-- only the value referenced by M, and does not affect the current stack
-- environment.
function Fetch_Code (Loc : Code_Loc) return Code_Loc;
-- Some architectures (notably HPUX) use a descriptor to describe a
-- subprogram address. This function computes the actual starting
-- address of the code from Loc.
--
-- Do not add pragma Inline to this function: there is a curious
-- interaction between rtsfind and front-end inlining. The exception
-- declaration in s-auxdec calls rtsfind, which forces several other system
-- packages to be compiled. Some of those have a pragma Inline, and we
-- compile the corresponding bodies so that inlining can take place. One
-- of these packages is s-mastop, which depends on s-auxdec, which is still
-- being compiled: we have not seen all the declarations in it yet, so we
-- get confused semantic errors ???
procedure Set_Machine_State (M : Machine_State);
-- This routine sets M from the current machine state. It is called when an
-- exception is initially signalled to initialize the state.
end System.Machine_State_Operations;
|
programs/oeis/313/A313799.asm
|
neoneye/loda
| 22 |
4058
|
<reponame>neoneye/loda<filename>programs/oeis/313/A313799.asm
; A313799: Coordination sequence Gal.3.53.3 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; 1,5,10,15,21,27,33,38,43,48,53,58,63,69,75,81,86,91,96,101,106,111,117,123,129,134,139,144,149,154,159,165,171,177,182,187,192,197,202,207,213,219,225,230,235,240,245,250,255,261
add $0,1
mov $2,2
add $2,$0
lpb $0
sub $0,1
add $1,6
trn $1,$2
trn $2,9
lpe
trn $1,4
add $1,1
mov $0,$1
|
Cubical/Algebra/CommAlgebra/FGIdeal.agda
|
thomas-lamiaux/cubical
| 1 |
5722
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommAlgebra.FGIdeal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Powerset
open import Cubical.Data.FinData
open import Cubical.Data.Nat
open import Cubical.Data.Vec
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.CommRing.FGIdeal using ()
renaming (generatedIdeal to generatedIdealCommRing;
indInIdeal to ringIncInIdeal;
0FGIdeal to 0FGIdealCommRing)
open import Cubical.Algebra.CommAlgebra
open import Cubical.Algebra.CommAlgebra.Ideal
private
variable
ℓ : Level
R : CommRing ℓ
generatedIdeal : {n : ℕ} (A : CommAlgebra R ℓ) → FinVec (fst A) n → IdealsIn A
generatedIdeal A = generatedIdealCommRing (CommAlgebra→CommRing A)
incInIdeal : {n : ℕ} (A : CommAlgebra R ℓ)
(U : FinVec ⟨ A ⟩ n) (i : Fin n) → U i ∈ fst (generatedIdeal A U)
incInIdeal A = ringIncInIdeal (CommAlgebra→CommRing A)
syntax generatedIdeal A V = ⟨ V ⟩[ A ]
module _ {R : CommRing ℓ} (A : CommAlgebra R ℓ) where
open CommAlgebraStr (snd A)
0FGIdeal : {n : ℕ} → ⟨ replicateFinVec n 0a ⟩[ A ] ≡ (0Ideal A)
0FGIdeal = 0FGIdealCommRing (CommAlgebra→CommRing A)
|
expansion/empty.asm
|
Lrs121/dwrandomizer
| 0 |
20670
|
<reponame>Lrs121/dwrandomizer
.base $8000
.org $c000
|
oeis/217/A217615.asm
|
neoneye/loda-programs
| 11 |
170116
|
<gh_stars>10-100
; A217615: G.f.: Sum_{n>=0} x^n * Sum_{k=0..n} binomial(n,k)^2 * x^k*(1-x)^(n-k).
; Submitted by <NAME>
; 1,1,1,3,5,7,15,29,49,95,187,345,659,1289,2465,4739,9237,17911,34715,67705,132063,257477,503309,984983,1927895,3778017,7411237,14544967,28565661,56144615,110406527,217225533,427636561,842256047,1659600955,3271579689,6451913519,12728656949,25120962317,49595342775,97945921603,193493841485,382364228961,755804764891,1494372520985,2955426218139,5846394918691,11568001330697,22894256207299,45319871301545,89730662769237,177696820447927,351966758968417,697274298364891,1381601224773715,2738016034052937
mov $3,$0
mov $5,$0
lpb $5
mov $0,$3
sub $5,1
sub $0,$5
mov $1,$0
add $1,$0
bin $1,$0
sub $5,1
mov $2,$5
bin $2,$0
mul $1,$2
sub $3,1
add $4,$1
lpe
mov $0,$4
add $0,1
|
alloy4fun_models/trainstlt/models/8/hF5vpem84dxwo2y2o.als
|
Kaixi26/org.alloytools.alloy
| 0 |
1768
|
<reponame>Kaixi26/org.alloytools.alloy
open main
pred idhF5vpem84dxwo2y2o_prop9 {
always ( all t:Train | eventually (no t.pos until t.pos in Entry))
}
pred __repair { idhF5vpem84dxwo2y2o_prop9 }
check __repair { idhF5vpem84dxwo2y2o_prop9 <=> prop9o }
|
programs/oeis/344/A344543.asm
|
neoneye/loda
| 22 |
169739
|
<filename>programs/oeis/344/A344543.asm
; A344543: Lexicographically earliest sequence S of distinct positive terms such that the product of the last k digits of S is even, k being the rightmost digit of a(n).
; 1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,22,23,24,25,26,27,28,29,32,33,34,35,36,37,38,39,42,43,44,45,46,47,48,49,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,72,73,74,75,76,77,78,79,82,83,84,85,86,87,88,89,92,93,94,95,96,97,98
mov $1,$0
add $0,1
sub $1,1
lpb $1
add $0,2
sub $1,8
lpe
|
win32/VC10/Win32/libxml2_Debug/hash.asm
|
txwizard/libxml2_x64_and_ARM
| 0 |
177938
|
<reponame>txwizard/libxml2_x64_and_ARM
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1
TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\hash.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _xmlMalloc:DWORD
COMM _xmlMallocAtomic:DWORD
COMM _xmlRealloc:DWORD
COMM _xmlFree:DWORD
COMM _xmlMemStrdup:DWORD
COMM _forbiddenExp:DWORD
COMM _emptyExp:DWORD
_DATA ENDS
msvcjmc SEGMENT
__188180DA_corecrt_math@h DB 01H
__2CC6E67D_corecrt_stdio_config@h DB 01H
__05476D76_corecrt_wstdio@h DB 01H
__A452D4A0_stdio@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__C0802A2B_corecrt_wtime@h DB 01H
__04AA828A_time@h DB 01H
__776982E1_hash@c DB 01H
msvcjmc ENDS
PUBLIC _xmlHashCreate
PUBLIC _xmlHashCreateDict
PUBLIC _xmlHashFree
PUBLIC _xmlHashDefaultDeallocator
PUBLIC _xmlHashAddEntry
PUBLIC _xmlHashUpdateEntry
PUBLIC _xmlHashAddEntry2
PUBLIC _xmlHashUpdateEntry2
PUBLIC _xmlHashAddEntry3
PUBLIC _xmlHashUpdateEntry3
PUBLIC _xmlHashRemoveEntry
PUBLIC _xmlHashRemoveEntry2
PUBLIC _xmlHashRemoveEntry3
PUBLIC _xmlHashLookup
PUBLIC _xmlHashLookup2
PUBLIC _xmlHashLookup3
PUBLIC _xmlHashQLookup
PUBLIC _xmlHashQLookup2
PUBLIC _xmlHashQLookup3
PUBLIC _xmlHashCopy
PUBLIC _xmlHashSize
PUBLIC _xmlHashScan
PUBLIC _xmlHashScan3
PUBLIC _xmlHashScanFull
PUBLIC _xmlHashScanFull3
PUBLIC __JustMyCode_Default
EXTRN _xmlStrdup:PROC
EXTRN _xmlStrEqual:PROC
EXTRN _xmlStrQEqual:PROC
EXTRN _xmlDictReference:PROC
EXTRN _xmlDictFree:PROC
EXTRN _xmlDictLookup:PROC
EXTRN _xmlDictOwns:PROC
EXTRN @_RTC_CheckStackVars@8:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN __RTC_CheckEsp:PROC
EXTRN __RTC_InitBase:PROC
EXTRN __RTC_Shutdown:PROC
EXTRN _memset:PROC
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
__RTC_Shutdown.rtc$TMZ DD FLAT:__RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
__RTC_InitBase.rtc$IMZ DD FLAT:__RTC_InitBase
rtc$IMZ ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
push ebp
mov ebp, esp
pop ebp
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _stubHashScannerFull
_TEXT SEGMENT
_stubdata$ = -4 ; size = 4
_payload$ = 8 ; size = 4
_data$ = 12 ; size = 4
_name$ = 16 ; size = 4
_name2$ = 20 ; size = 4
_name3$ = 24 ; size = 4
_stubHashScannerFull PROC ; COMDAT
; 843 : const xmlChar *name3 ATTRIBUTE_UNUSED) {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 844 : stubData *stubdata = (stubData *) data;
mov eax, DWORD PTR _data$[ebp]
mov DWORD PTR _stubdata$[ebp], eax
; 845 : stubdata->hashscanner (payload, stubdata->data, (xmlChar *) name);
mov esi, esp
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _stubdata$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
mov ecx, DWORD PTR _payload$[ebp]
push ecx
mov edx, DWORD PTR _stubdata$[ebp]
mov eax, DWORD PTR [edx]
call eax
add esp, 12 ; 0000000cH
cmp esi, esp
call __RTC_CheckEsp
; 846 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_stubHashScannerFull ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashGrow
_TEXT SEGMENT
_oldtable$ = -24 ; size = 4
_next$ = -20 ; size = 4
_iter$ = -16 ; size = 4
_i$ = -12 ; size = 4
_oldsize$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_size$ = 12 ; size = 4
_xmlHashGrow PROC ; COMDAT
; 229 : xmlHashGrow(xmlHashTablePtr table, int size) {
push ebp
mov ebp, esp
sub esp, 24 ; 00000018H
push esi
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-24], eax
mov DWORD PTR [ebp-20], eax
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 230 : unsigned long key;
; 231 : int oldsize, i;
; 232 : xmlHashEntryPtr iter, next;
; 233 : struct _xmlHashEntry *oldtable;
; 234 : #ifdef DEBUG_GROW
; 235 : unsigned long nbElem = 0;
; 236 : #endif
; 237 :
; 238 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN10@xmlHashGro
; 239 : return(-1);
or eax, -1
jmp $LN1@xmlHashGro
$LN10@xmlHashGro:
; 240 : if (size < 8)
cmp DWORD PTR _size$[ebp], 8
jge SHORT $LN11@xmlHashGro
; 241 : return(-1);
or eax, -1
jmp $LN1@xmlHashGro
$LN11@xmlHashGro:
; 242 : if (size > 8 * 2048)
cmp DWORD PTR _size$[ebp], 16384 ; 00004000H
jle SHORT $LN12@xmlHashGro
; 243 : return(-1);
or eax, -1
jmp $LN1@xmlHashGro
$LN12@xmlHashGro:
; 244 :
; 245 : oldsize = table->size;
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax+4]
mov DWORD PTR _oldsize$[ebp], ecx
; 246 : oldtable = table->table;
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _oldtable$[ebp], eax
; 247 : if (oldtable == NULL)
cmp DWORD PTR _oldtable$[ebp], 0
jne SHORT $LN13@xmlHashGro
; 248 : return(-1);
or eax, -1
jmp $LN1@xmlHashGro
$LN13@xmlHashGro:
; 249 :
; 250 : table->table = xmlMalloc(size * sizeof(xmlHashEntry));
imul ecx, DWORD PTR _size$[ebp], 24
mov esi, esp
push ecx
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov edx, DWORD PTR _table$[ebp]
mov DWORD PTR [edx], eax
; 251 : if (table->table == NULL) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax], 0
jne SHORT $LN14@xmlHashGro
; 252 : table->table = oldtable;
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR _oldtable$[ebp]
mov DWORD PTR [ecx], edx
; 253 : return(-1);
or eax, -1
jmp $LN1@xmlHashGro
$LN14@xmlHashGro:
; 254 : }
; 255 : memset(table->table, 0, size * sizeof(xmlHashEntry));
imul eax, DWORD PTR _size$[ebp], 24
push eax
push 0
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
push edx
call _memset
add esp, 12 ; 0000000cH
; 256 : table->size = size;
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR _size$[ebp]
mov DWORD PTR [eax+4], ecx
; 257 :
; 258 : /* If the two loops are merged, there would be situations where
; 259 : a new entry needs to allocated and data copied into it from
; 260 : the main table. So instead, we run through the array twice, first
; 261 : copying all the elements in the main array (where we can't get
; 262 : conflicts) and then the rest, so we only free (and don't allocate)
; 263 : */
; 264 : for (i = 0; i < oldsize; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlHashGro
$LN2@xmlHashGro:
mov edx, DWORD PTR _i$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
$LN4@xmlHashGro:
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR _oldsize$[ebp]
jge $LN3@xmlHashGro
; 265 : if (oldtable[i].valid == 0)
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _oldtable$[ebp]
cmp DWORD PTR [edx+ecx+20], 0
jne SHORT $LN15@xmlHashGro
; 266 : continue;
jmp SHORT $LN2@xmlHashGro
$LN15@xmlHashGro:
; 267 : key = xmlHashComputeKey(table, oldtable[i].name, oldtable[i].name2,
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _oldtable$[ebp]
mov edx, DWORD PTR [ecx+eax+12]
push edx
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _oldtable$[ebp]
mov edx, DWORD PTR [ecx+eax+8]
push edx
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _oldtable$[ebp]
mov edx, DWORD PTR [ecx+eax+4]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 268 : oldtable[i].name3);
; 269 : memcpy(&(table->table[key]), &(oldtable[i]), sizeof(xmlHashEntry));
imul ecx, DWORD PTR _i$[ebp], 24
add ecx, DWORD PTR _oldtable$[ebp]
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [eax]
add eax, edx
mov edx, DWORD PTR [ecx]
mov DWORD PTR [eax], edx
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR [eax+4], edx
mov edx, DWORD PTR [ecx+8]
mov DWORD PTR [eax+8], edx
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR [eax+12], edx
mov edx, DWORD PTR [ecx+16]
mov DWORD PTR [eax+16], edx
mov ecx, DWORD PTR [ecx+20]
mov DWORD PTR [eax+20], ecx
; 270 : table->table[key].next = NULL;
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR [ecx+edx], 0
; 271 : }
jmp $LN2@xmlHashGro
$LN3@xmlHashGro:
; 272 :
; 273 : for (i = 0; i < oldsize; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN7@xmlHashGro
$LN5@xmlHashGro:
mov edx, DWORD PTR _i$[ebp]
add edx, 1
mov DWORD PTR _i$[ebp], edx
$LN7@xmlHashGro:
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR _oldsize$[ebp]
jge $LN6@xmlHashGro
; 274 : iter = oldtable[i].next;
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _oldtable$[ebp]
mov eax, DWORD PTR [edx+ecx]
mov DWORD PTR _iter$[ebp], eax
$LN8@xmlHashGro:
; 275 : while (iter) {
cmp DWORD PTR _iter$[ebp], 0
je $LN9@xmlHashGro
; 276 : next = iter->next;
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR _next$[ebp], edx
; 277 :
; 278 : /*
; 279 : * put back the entry in the new table
; 280 : */
; 281 :
; 282 : key = xmlHashComputeKey(table, iter->name, iter->name2,
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 283 : iter->name3);
; 284 : if (table->table[key].valid == 0) {
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN16@xmlHashGro
; 285 : memcpy(&(table->table[key]), iter, sizeof(xmlHashEntry));
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
add eax, ecx
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR [eax], edx
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR [eax+4], edx
mov edx, DWORD PTR [ecx+8]
mov DWORD PTR [eax+8], edx
mov edx, DWORD PTR [ecx+12]
mov DWORD PTR [eax+12], edx
mov edx, DWORD PTR [ecx+16]
mov DWORD PTR [eax+16], edx
mov ecx, DWORD PTR [ecx+20]
mov DWORD PTR [eax+20], ecx
; 286 : table->table[key].next = NULL;
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR [ecx+edx], 0
; 287 : xmlFree(iter);
mov esi, esp
mov edx, DWORD PTR _iter$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 288 : } else {
jmp SHORT $LN17@xmlHashGro
$LN16@xmlHashGro:
; 289 : iter->next = table->table[key].next;
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [edx+eax]
mov DWORD PTR [ecx], edx
; 290 : table->table[key].next = iter;
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
mov ecx, DWORD PTR _iter$[ebp]
mov DWORD PTR [edx+eax], ecx
$LN17@xmlHashGro:
; 291 : }
; 292 :
; 293 : #ifdef DEBUG_GROW
; 294 : nbElem++;
; 295 : #endif
; 296 :
; 297 : iter = next;
mov edx, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], edx
; 298 : }
jmp $LN8@xmlHashGro
$LN9@xmlHashGro:
; 299 : }
jmp $LN5@xmlHashGro
$LN6@xmlHashGro:
; 300 :
; 301 : xmlFree(oldtable);
mov esi, esp
mov eax, DWORD PTR _oldtable$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 302 :
; 303 : #ifdef DEBUG_GROW
; 304 : xmlGenericError(xmlGenericErrorContext,
; 305 : "xmlHashGrow : from %d to %d, %d elems\n", oldsize, size, nbElem);
; 306 : #endif
; 307 :
; 308 : return(0);
xor eax, eax
$LN1@xmlHashGro:
; 309 : }
pop esi
add esp, 24 ; 00000018H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashGrow ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashComputeQKey
_TEXT SEGMENT
tv196 = -56 ; size = 4
tv195 = -52 ; size = 4
tv178 = -48 ; size = 4
tv177 = -44 ; size = 4
tv161 = -40 ; size = 4
tv160 = -36 ; size = 4
tv143 = -32 ; size = 4
tv142 = -28 ; size = 4
tv94 = -24 ; size = 4
tv93 = -20 ; size = 4
tv76 = -16 ; size = 4
tv75 = -12 ; size = 4
_ch$ = -5 ; size = 1
_value$ = -4 ; size = 4
_table$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_prefix2$ = 20 ; size = 4
_name2$ = 24 ; size = 4
_prefix3$ = 28 ; size = 4
_name3$ = 32 ; size = 4
_xmlHashComputeQKey PROC ; COMDAT
; 115 : const xmlChar *prefix3, const xmlChar *name3) {
push ebp
mov ebp, esp
sub esp, 56 ; 00000038H
push edi
lea edi, DWORD PTR [ebp-56]
mov ecx, 14 ; 0000000eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 116 : unsigned long value = 0L;
mov DWORD PTR _value$[ebp], 0
; 117 : char ch;
; 118 :
; 119 : #ifdef HASH_RANDOMIZATION
; 120 : value = table->random_seed;
; 121 : #endif
; 122 : if (prefix != NULL)
cmp DWORD PTR _prefix$[ebp], 0
je SHORT $LN14@xmlHashCom
; 123 : value += 30 * (*prefix);
mov eax, DWORD PTR _prefix$[ebp]
movzx ecx, BYTE PTR [eax]
imul edx, ecx, 30
add edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
jmp SHORT $LN15@xmlHashCom
$LN14@xmlHashCom:
; 124 : else
; 125 : value += 30 * (*name);
mov eax, DWORD PTR _name$[ebp]
movzx ecx, BYTE PTR [eax]
imul edx, ecx, 30
add edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
$LN15@xmlHashCom:
; 126 :
; 127 : if (prefix != NULL) {
cmp DWORD PTR _prefix$[ebp], 0
je SHORT $LN16@xmlHashCom
$LN2@xmlHashCom:
; 128 : while ((ch = *prefix++) != 0) {
mov eax, DWORD PTR _prefix$[ebp]
mov cl, BYTE PTR [eax]
mov BYTE PTR _ch$[ebp], cl
movsx edx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv75[ebp], edx
mov eax, DWORD PTR _prefix$[ebp]
add eax, 1
mov DWORD PTR _prefix$[ebp], eax
cmp DWORD PTR tv75[ebp], 0
je SHORT $LN23@xmlHashCom
mov DWORD PTR tv76[ebp], 1
jmp SHORT $LN24@xmlHashCom
$LN23@xmlHashCom:
mov DWORD PTR tv76[ebp], 0
$LN24@xmlHashCom:
cmp DWORD PTR tv76[ebp], 0
je SHORT $LN3@xmlHashCom
; 129 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
movsx eax, BYTE PTR _ch$[ebp]
add ecx, eax
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 130 : }
jmp SHORT $LN2@xmlHashCom
$LN3@xmlHashCom:
; 131 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
lea eax, DWORD PTR [ecx+edx+58]
xor eax, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], eax
$LN16@xmlHashCom:
; 132 : }
; 133 : if (name != NULL) {
cmp DWORD PTR _name$[ebp], 0
je SHORT $LN17@xmlHashCom
$LN4@xmlHashCom:
; 134 : while ((ch = *name++) != 0) {
mov ecx, DWORD PTR _name$[ebp]
mov dl, BYTE PTR [ecx]
mov BYTE PTR _ch$[ebp], dl
movsx eax, BYTE PTR _ch$[ebp]
mov DWORD PTR tv93[ebp], eax
mov ecx, DWORD PTR _name$[ebp]
add ecx, 1
mov DWORD PTR _name$[ebp], ecx
cmp DWORD PTR tv93[ebp], 0
je SHORT $LN25@xmlHashCom
mov DWORD PTR tv94[ebp], 1
jmp SHORT $LN26@xmlHashCom
$LN25@xmlHashCom:
mov DWORD PTR tv94[ebp], 0
$LN26@xmlHashCom:
cmp DWORD PTR tv94[ebp], 0
je SHORT $LN17@xmlHashCom
; 135 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov edx, DWORD PTR _value$[ebp]
shl edx, 5
mov eax, DWORD PTR _value$[ebp]
shr eax, 3
add edx, eax
movsx ecx, BYTE PTR _ch$[ebp]
add edx, ecx
xor edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
; 136 : }
jmp SHORT $LN4@xmlHashCom
$LN17@xmlHashCom:
; 137 : }
; 138 : value = value ^ ((value << 5) + (value >> 3));
mov edx, DWORD PTR _value$[ebp]
shl edx, 5
mov eax, DWORD PTR _value$[ebp]
shr eax, 3
add edx, eax
xor edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
; 139 : if (prefix2 != NULL) {
cmp DWORD PTR _prefix2$[ebp], 0
je SHORT $LN18@xmlHashCom
$LN6@xmlHashCom:
; 140 : while ((ch = *prefix2++) != 0) {
mov ecx, DWORD PTR _prefix2$[ebp]
mov dl, BYTE PTR [ecx]
mov BYTE PTR _ch$[ebp], dl
movsx eax, BYTE PTR _ch$[ebp]
mov DWORD PTR tv142[ebp], eax
mov ecx, DWORD PTR _prefix2$[ebp]
add ecx, 1
mov DWORD PTR _prefix2$[ebp], ecx
cmp DWORD PTR tv142[ebp], 0
je SHORT $LN27@xmlHashCom
mov DWORD PTR tv143[ebp], 1
jmp SHORT $LN28@xmlHashCom
$LN27@xmlHashCom:
mov DWORD PTR tv143[ebp], 0
$LN28@xmlHashCom:
cmp DWORD PTR tv143[ebp], 0
je SHORT $LN7@xmlHashCom
; 141 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov edx, DWORD PTR _value$[ebp]
shl edx, 5
mov eax, DWORD PTR _value$[ebp]
shr eax, 3
add edx, eax
movsx ecx, BYTE PTR _ch$[ebp]
add edx, ecx
xor edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
; 142 : }
jmp SHORT $LN6@xmlHashCom
$LN7@xmlHashCom:
; 143 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
mov edx, DWORD PTR _value$[ebp]
shl edx, 5
mov eax, DWORD PTR _value$[ebp]
shr eax, 3
lea ecx, DWORD PTR [edx+eax+58]
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
$LN18@xmlHashCom:
; 144 : }
; 145 : if (name2 != NULL) {
cmp DWORD PTR _name2$[ebp], 0
je SHORT $LN19@xmlHashCom
$LN8@xmlHashCom:
; 146 : while ((ch = *name2++) != 0) {
mov edx, DWORD PTR _name2$[ebp]
mov al, BYTE PTR [edx]
mov BYTE PTR _ch$[ebp], al
movsx ecx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv160[ebp], ecx
mov edx, DWORD PTR _name2$[ebp]
add edx, 1
mov DWORD PTR _name2$[ebp], edx
cmp DWORD PTR tv160[ebp], 0
je SHORT $LN29@xmlHashCom
mov DWORD PTR tv161[ebp], 1
jmp SHORT $LN30@xmlHashCom
$LN29@xmlHashCom:
mov DWORD PTR tv161[ebp], 0
$LN30@xmlHashCom:
cmp DWORD PTR tv161[ebp], 0
je SHORT $LN19@xmlHashCom
; 147 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov eax, DWORD PTR _value$[ebp]
shl eax, 5
mov ecx, DWORD PTR _value$[ebp]
shr ecx, 3
add eax, ecx
movsx edx, BYTE PTR _ch$[ebp]
add eax, edx
xor eax, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], eax
; 148 : }
jmp SHORT $LN8@xmlHashCom
$LN19@xmlHashCom:
; 149 : }
; 150 : value = value ^ ((value << 5) + (value >> 3));
mov eax, DWORD PTR _value$[ebp]
shl eax, 5
mov ecx, DWORD PTR _value$[ebp]
shr ecx, 3
add eax, ecx
xor eax, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], eax
; 151 : if (prefix3 != NULL) {
cmp DWORD PTR _prefix3$[ebp], 0
je SHORT $LN20@xmlHashCom
$LN10@xmlHashCom:
; 152 : while ((ch = *prefix3++) != 0) {
mov edx, DWORD PTR _prefix3$[ebp]
mov al, BYTE PTR [edx]
mov BYTE PTR _ch$[ebp], al
movsx ecx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv177[ebp], ecx
mov edx, DWORD PTR _prefix3$[ebp]
add edx, 1
mov DWORD PTR _prefix3$[ebp], edx
cmp DWORD PTR tv177[ebp], 0
je SHORT $LN31@xmlHashCom
mov DWORD PTR tv178[ebp], 1
jmp SHORT $LN32@xmlHashCom
$LN31@xmlHashCom:
mov DWORD PTR tv178[ebp], 0
$LN32@xmlHashCom:
cmp DWORD PTR tv178[ebp], 0
je SHORT $LN11@xmlHashCom
; 153 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov eax, DWORD PTR _value$[ebp]
shl eax, 5
mov ecx, DWORD PTR _value$[ebp]
shr ecx, 3
add eax, ecx
movsx edx, BYTE PTR _ch$[ebp]
add eax, edx
xor eax, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], eax
; 154 : }
jmp SHORT $LN10@xmlHashCom
$LN11@xmlHashCom:
; 155 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)':');
mov eax, DWORD PTR _value$[ebp]
shl eax, 5
mov ecx, DWORD PTR _value$[ebp]
shr ecx, 3
lea edx, DWORD PTR [eax+ecx+58]
xor edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
$LN20@xmlHashCom:
; 156 : }
; 157 : if (name3 != NULL) {
cmp DWORD PTR _name3$[ebp], 0
je SHORT $LN21@xmlHashCom
$LN12@xmlHashCom:
; 158 : while ((ch = *name3++) != 0) {
mov eax, DWORD PTR _name3$[ebp]
mov cl, BYTE PTR [eax]
mov BYTE PTR _ch$[ebp], cl
movsx edx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv195[ebp], edx
mov eax, DWORD PTR _name3$[ebp]
add eax, 1
mov DWORD PTR _name3$[ebp], eax
cmp DWORD PTR tv195[ebp], 0
je SHORT $LN33@xmlHashCom
mov DWORD PTR tv196[ebp], 1
jmp SHORT $LN34@xmlHashCom
$LN33@xmlHashCom:
mov DWORD PTR tv196[ebp], 0
$LN34@xmlHashCom:
cmp DWORD PTR tv196[ebp], 0
je SHORT $LN21@xmlHashCom
; 159 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
movsx eax, BYTE PTR _ch$[ebp]
add ecx, eax
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 160 : }
jmp SHORT $LN12@xmlHashCom
$LN21@xmlHashCom:
; 161 : }
; 162 : return (value % table->size);
mov ecx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR _value$[ebp]
xor edx, edx
div DWORD PTR [ecx+4]
mov eax, edx
; 163 : }
pop edi
add esp, 56 ; 00000038H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashComputeQKey ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashComputeKey
_TEXT SEGMENT
tv138 = -32 ; size = 4
tv137 = -28 ; size = 4
tv89 = -24 ; size = 4
tv88 = -20 ; size = 4
tv72 = -16 ; size = 4
tv71 = -12 ; size = 4
_ch$ = -5 ; size = 1
_value$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_xmlHashComputeKey PROC ; COMDAT
; 83 : const xmlChar *name2, const xmlChar *name3) {
push ebp
mov ebp, esp
sub esp, 32 ; 00000020H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-32], eax
mov DWORD PTR [ebp-28], eax
mov DWORD PTR [ebp-24], eax
mov DWORD PTR [ebp-20], eax
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 84 : unsigned long value = 0L;
mov DWORD PTR _value$[ebp], 0
; 85 : char ch;
; 86 :
; 87 : #ifdef HASH_RANDOMIZATION
; 88 : value = table->random_seed;
; 89 : #endif
; 90 : if (name != NULL) {
cmp DWORD PTR _name$[ebp], 0
je SHORT $LN8@xmlHashCom
; 91 : value += 30 * (*name);
mov eax, DWORD PTR _name$[ebp]
movzx ecx, BYTE PTR [eax]
imul edx, ecx, 30
add edx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], edx
$LN2@xmlHashCom:
; 92 : while ((ch = *name++) != 0) {
mov eax, DWORD PTR _name$[ebp]
mov cl, BYTE PTR [eax]
mov BYTE PTR _ch$[ebp], cl
movsx edx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv71[ebp], edx
mov eax, DWORD PTR _name$[ebp]
add eax, 1
mov DWORD PTR _name$[ebp], eax
cmp DWORD PTR tv71[ebp], 0
je SHORT $LN12@xmlHashCom
mov DWORD PTR tv72[ebp], 1
jmp SHORT $LN13@xmlHashCom
$LN12@xmlHashCom:
mov DWORD PTR tv72[ebp], 0
$LN13@xmlHashCom:
cmp DWORD PTR tv72[ebp], 0
je SHORT $LN8@xmlHashCom
; 93 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
movsx eax, BYTE PTR _ch$[ebp]
add ecx, eax
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 94 : }
jmp SHORT $LN2@xmlHashCom
$LN8@xmlHashCom:
; 95 : }
; 96 : value = value ^ ((value << 5) + (value >> 3));
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 97 : if (name2 != NULL) {
cmp DWORD PTR _name2$[ebp], 0
je SHORT $LN9@xmlHashCom
$LN4@xmlHashCom:
; 98 : while ((ch = *name2++) != 0) {
mov eax, DWORD PTR _name2$[ebp]
mov cl, BYTE PTR [eax]
mov BYTE PTR _ch$[ebp], cl
movsx edx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv88[ebp], edx
mov eax, DWORD PTR _name2$[ebp]
add eax, 1
mov DWORD PTR _name2$[ebp], eax
cmp DWORD PTR tv88[ebp], 0
je SHORT $LN14@xmlHashCom
mov DWORD PTR tv89[ebp], 1
jmp SHORT $LN15@xmlHashCom
$LN14@xmlHashCom:
mov DWORD PTR tv89[ebp], 0
$LN15@xmlHashCom:
cmp DWORD PTR tv89[ebp], 0
je SHORT $LN9@xmlHashCom
; 99 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
movsx eax, BYTE PTR _ch$[ebp]
add ecx, eax
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 100 : }
jmp SHORT $LN4@xmlHashCom
$LN9@xmlHashCom:
; 101 : }
; 102 : value = value ^ ((value << 5) + (value >> 3));
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 103 : if (name3 != NULL) {
cmp DWORD PTR _name3$[ebp], 0
je SHORT $LN10@xmlHashCom
$LN6@xmlHashCom:
; 104 : while ((ch = *name3++) != 0) {
mov eax, DWORD PTR _name3$[ebp]
mov cl, BYTE PTR [eax]
mov BYTE PTR _ch$[ebp], cl
movsx edx, BYTE PTR _ch$[ebp]
mov DWORD PTR tv137[ebp], edx
mov eax, DWORD PTR _name3$[ebp]
add eax, 1
mov DWORD PTR _name3$[ebp], eax
cmp DWORD PTR tv137[ebp], 0
je SHORT $LN16@xmlHashCom
mov DWORD PTR tv138[ebp], 1
jmp SHORT $LN17@xmlHashCom
$LN16@xmlHashCom:
mov DWORD PTR tv138[ebp], 0
$LN17@xmlHashCom:
cmp DWORD PTR tv138[ebp], 0
je SHORT $LN10@<EMAIL>
; 105 : value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
mov ecx, DWORD PTR _value$[ebp]
shl ecx, 5
mov edx, DWORD PTR _value$[ebp]
shr edx, 3
add ecx, edx
movsx eax, BYTE PTR _ch$[ebp]
add ecx, eax
xor ecx, DWORD PTR _value$[ebp]
mov DWORD PTR _value$[ebp], ecx
; 106 : }
jmp SHORT $LN6@xmlHashCom
$LN10@xmlHashCom:
; 107 : }
; 108 : return (value % table->size);
mov ecx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR _value$[ebp]
xor edx, edx
div DWORD PTR [ecx+4]
mov eax, edx
; 109 : }
add esp, 32 ; 00000020H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashComputeKey ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashScanFull3
_TEXT SEGMENT
_next$ = -12 ; size = 4
_iter$ = -8 ; size = 4
_i$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_f$ = 24 ; size = 4
_data$ = 28 ; size = 4
_xmlHashScanFull3 PROC ; COMDAT
; 950 : xmlHashScannerFull f, void *data) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push esi
mov DWORD PTR [ebp-12], -858993460 ; ccccccccH
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 951 : int i;
; 952 : xmlHashEntryPtr iter;
; 953 : xmlHashEntryPtr next;
; 954 :
; 955 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN7@xmlHashSca
; 956 : return;
jmp $LN1@xmlHashSca
$LN7@xmlHashSca:
; 957 : if (f == NULL)
cmp DWORD PTR _f$[ebp], 0
jne SHORT $LN8@xmlHashSca
; 958 : return;
jmp $LN1@xmlHashSca
$LN8@xmlHashSca:
; 959 :
; 960 : if (table->table) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax], 0
je $LN1@xmlHashSca
; 961 : for(i = 0; i < table->size; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlHashSca
$LN2@xmlHashSca:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN4@xmlHashSca:
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx+4]
jge $LN1@xmlHashSca
; 962 : if (table->table[i].valid == 0)
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN10@xmlHashSca
; 963 : continue;
jmp SHORT $LN2@xmlHashSca
$LN10@xmlHashSca:
; 964 : iter = &(table->table[i]);
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _iter$[ebp], ecx
$LN5@xmlHashSca:
; 965 : while (iter) {
cmp DWORD PTR _iter$[ebp], 0
je $LN6@xmlHashSca
; 966 : next = iter->next;
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _next$[ebp], ecx
; 967 : if (((name == NULL) || (xmlStrEqual(name, iter->name))) &&
; 968 : ((name2 == NULL) || (xmlStrEqual(name2, iter->name2))) &&
; 969 : ((name3 == NULL) || (xmlStrEqual(name3, iter->name3))) &&
cmp DWORD PTR _name$[ebp], 0
je SHORT $LN12@xmlHashSca
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
mov ecx, DWORD PTR _name$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xmlHashSca
$LN12@xmlHashSca:
cmp DWORD PTR _name2$[ebp], 0
je SHORT $LN13@xmlHashSca
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
mov ecx, DWORD PTR _name2$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xmlHashSca
$LN13@xmlHashSca:
cmp DWORD PTR _name3$[ebp], 0
je SHORT $LN14@xmlHashSca
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _name3$[ebp]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xmlHashSca
$LN14@xmlHashSca:
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+16], 0
je SHORT $LN11@xmlHashSca
; 970 : (iter->payload != NULL)) {
; 971 : f(iter->payload, data, iter->name,
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
mov eax, DWORD PTR _data$[ebp]
push eax
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
call DWORD PTR _f$[ebp]
add esp, 20 ; 00000014H
cmp esi, esp
call __RTC_CheckEsp
$LN11@xmlHashSca:
; 972 : iter->name2, iter->name3);
; 973 : }
; 974 : iter = next;
mov eax, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], eax
; 975 : }
jmp $LN5@xmlHashSca
$LN6@xmlHashSca:
; 976 : }
jmp $LN2@xmlHashSca
$LN1@xmlHashSca:
; 977 : }
; 978 : }
pop esi
add esp, 12 ; 0000000cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashScanFull3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashScanFull
_TEXT SEGMENT
_next$ = -16 ; size = 4
_iter$ = -12 ; size = 4
_nb$ = -8 ; size = 4
_i$ = -4 ; size = 4
_table$ = 8 ; size = 4
_f$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlHashScanFull PROC ; COMDAT
; 873 : xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
push esi
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 874 : int i, nb;
; 875 : xmlHashEntryPtr iter;
; 876 : xmlHashEntryPtr next;
; 877 :
; 878 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN7@xmlHashSca
; 879 : return;
jmp $LN1@xmlHashSca
$LN7@xmlHashSca:
; 880 : if (f == NULL)
cmp DWORD PTR _f$[ebp], 0
jne SHORT $LN8@xmlHashSca
; 881 : return;
jmp $LN1@xmlHashSca
$LN8@xmlHashSca:
; 882 :
; 883 : if (table->table) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax], 0
je $LN1@xmlHashSca
; 884 : for(i = 0; i < table->size; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlHashSca
$LN2@xmlHashSca:
mov ecx, DWORD PTR _i$[ebp]
add ecx, 1
mov DWORD PTR _i$[ebp], ecx
$LN4@xmlHashSca:
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR _i$[ebp]
cmp eax, DWORD PTR [edx+4]
jge $LN1@xmlHashSca
; 885 : if (table->table[i].valid == 0)
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN10@xmlHashSca
; 886 : continue;
jmp SHORT $LN2@xmlHashSca
$LN10@xmlHashSca:
; 887 : iter = &(table->table[i]);
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _iter$[ebp], ecx
$LN5@xmlHashSca:
; 888 : while (iter) {
cmp DWORD PTR _iter$[ebp], 0
je $LN6@xmlHashSca
; 889 : next = iter->next;
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _next$[ebp], ecx
; 890 : nb = table->nbElems;
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR _nb$[ebp], eax
; 891 : if ((f != NULL) && (iter->payload != NULL))
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN11@xmlHashSca
mov ecx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [ecx+16], 0
je SHORT $LN11@xmlHashSca
; 892 : f(iter->payload, data, iter->name,
mov esi, esp
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
mov edx, DWORD PTR _data$[ebp]
push edx
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call DWORD PTR _f$[ebp]
add esp, 20 ; 00000014H
cmp esi, esp
call __RTC_CheckEsp
$LN11@xmlHashSca:
; 893 : iter->name2, iter->name3);
; 894 : if (nb != table->nbElems) {
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR _nb$[ebp]
cmp eax, DWORD PTR [edx+8]
je SHORT $LN12@xmlHashSca
; 895 : /* table was modified by the callback, be careful */
; 896 : if (iter == &(table->table[i])) {
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
cmp DWORD PTR _iter$[ebp], ecx
jne SHORT $LN14@xmlHashSca
; 897 : if (table->table[i].valid == 0)
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
cmp DWORD PTR [edx+eax+20], 0
jne SHORT $LN16@xmlHashSca
; 898 : iter = NULL;
mov DWORD PTR _iter$[ebp], 0
$LN16@xmlHashSca:
; 899 : if (table->table[i].next != next)
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
mov eax, DWORD PTR [edx+eax]
cmp eax, DWORD PTR _next$[ebp]
je SHORT $LN17@xmlHashSca
; 900 : iter = &(table->table[i]);
imul ecx, DWORD PTR _i$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _iter$[ebp], ecx
$LN17@xmlHashSca:
; 901 : } else
jmp SHORT $LN15@xmlHashSca
$LN14@xmlHashSca:
; 902 : iter = next;
mov eax, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], eax
$LN15@xmlHashSca:
; 903 : } else
jmp SHORT $LN13@xmlHashSca
$LN12@xmlHashSca:
; 904 : iter = next;
mov ecx, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], ecx
$LN13@xmlHashSca:
; 905 : }
jmp $LN5@xmlHashSca
$LN6@xmlHashSca:
; 906 : }
jmp $LN2@xmlHashSca
$LN1@xmlHashSca:
; 907 : }
; 908 : }
pop esi
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashScanFull ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashScan3
_TEXT SEGMENT
_stubdata$ = -12 ; size = 8
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_f$ = 24 ; size = 4
_data$ = 28 ; size = 4
_xmlHashScan3 PROC ; COMDAT
; 926 : xmlHashScanner f, void *data) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 927 : stubData stubdata;
; 928 : stubdata.data = data;
mov eax, DWORD PTR _data$[ebp]
mov DWORD PTR _stubdata$[ebp+4], eax
; 929 : stubdata.hashscanner = f;
mov ecx, DWORD PTR _f$[ebp]
mov DWORD PTR _stubdata$[ebp], ecx
; 930 : xmlHashScanFull3(table, name, name2, name3, stubHashScannerFull,
lea edx, DWORD PTR _stubdata$[ebp]
push edx
push OFFSET _stubHashScannerFull
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashScanFull3
add esp, 24 ; 00000018H
; 931 : &stubdata);
; 932 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN5@xmlHashSca
call @_RTC_CheckStackVars@8
pop eax
pop edx
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 3
$LN5@xmlHashSca:
DD 1
DD $LN4@xmlHashSca
$LN4@xmlHashSca:
DD -12 ; fffffff4H
DD 8
DD $LN3@xmlHashSca
$LN3@xmlHashSca:
DB 115 ; 00000073H
DB 116 ; 00000074H
DB 117 ; 00000075H
DB 98 ; 00000062H
DB 100 ; 00000064H
DB 97 ; 00000061H
DB 116 ; 00000074H
DB 97 ; 00000061H
DB 0
_xmlHashScan3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashScan
_TEXT SEGMENT
_stubdata$ = -12 ; size = 8
_table$ = 8 ; size = 4
_f$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlHashScan PROC ; COMDAT
; 857 : xmlHashScan(xmlHashTablePtr table, xmlHashScanner f, void *data) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 858 : stubData stubdata;
; 859 : stubdata.data = data;
mov eax, DWORD PTR _data$[ebp]
mov DWORD PTR _stubdata$[ebp+4], eax
; 860 : stubdata.hashscanner = f;
mov ecx, DWORD PTR _f$[ebp]
mov DWORD PTR _stubdata$[ebp], ecx
; 861 : xmlHashScanFull (table, stubHashScannerFull, &stubdata);
lea edx, DWORD PTR _stubdata$[ebp]
push edx
push OFFSET _stubHashScannerFull
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashScanFull
add esp, 12 ; 0000000cH
; 862 : }
push edx
mov ecx, ebp
push eax
lea edx, DWORD PTR $LN5@xmlHashSca
call @_RTC_CheckStackVars@8
pop eax
pop edx
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
npad 3
$LN5@xmlHashSca:
DD 1
DD $LN4@xmlHashSca
$LN4@xmlHashSca:
DD -12 ; fffffff4H
DD 8
DD $LN3@xmlHashSca
$LN3@xmlHashSca:
DB 115 ; 00000073H
DB 116 ; 00000074H
DB 117 ; 00000075H
DB 98 ; 00000062H
DB 100 ; 00000064H
DB 97 ; 00000061H
DB 116 ; 00000074H
DB 97 ; 00000061H
DB 0
_xmlHashScan ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashSize
_TEXT SEGMENT
_table$ = 8 ; size = 4
_xmlHashSize PROC ; COMDAT
; 1032 : xmlHashSize(xmlHashTablePtr table) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 1033 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN2@xmlHashSiz
; 1034 : return(-1);
or eax, -1
jmp SHORT $LN1@xmlHashSiz
$LN2@xmlHashSiz:
; 1035 : return(table->nbElems);
mov eax, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [eax+8]
$LN1@xmlHashSiz:
; 1036 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashSize ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashCopy
_TEXT SEGMENT
_ret$ = -16 ; size = 4
_next$ = -12 ; size = 4
_iter$ = -8 ; size = 4
_i$ = -4 ; size = 4
_table$ = 8 ; size = 4
_f$ = 12 ; size = 4
_xmlHashCopy PROC ; COMDAT
; 990 : xmlHashCopy(xmlHashTablePtr table, xmlHashCopier f) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
push esi
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 991 : int i;
; 992 : xmlHashEntryPtr iter;
; 993 : xmlHashEntryPtr next;
; 994 : xmlHashTablePtr ret;
; 995 :
; 996 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN7@xmlHashCop
; 997 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashCop
$LN7@xmlHashCop:
; 998 : if (f == NULL)
cmp DWORD PTR _f$[ebp], 0
jne SHORT $LN8@xmlHashCop
; 999 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashCop
$LN8@xmlHashCop:
; 1000 :
; 1001 : ret = xmlHashCreate(table->size);
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
call _xmlHashCreate
add esp, 4
mov DWORD PTR _ret$[ebp], eax
; 1002 : if (ret == NULL)
cmp DWORD PTR _ret$[ebp], 0
jne SHORT $LN9@xmlHashCop
; 1003 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashCop
$LN9@xmlHashCop:
; 1004 :
; 1005 : if (table->table) {
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx], 0
je $LN10@xmlHashCop
; 1006 : for(i = 0; i < table->size; i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlHashCop
$LN2@xmlHashCop:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN4@xmlHashCop:
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+4]
jge SHORT $LN10@xmlHashCop
; 1007 : if (table->table[i].valid == 0)
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx]
cmp DWORD PTR [edx+eax+20], 0
jne SHORT $LN11@xmlHashCop
; 1008 : continue;
jmp SHORT $LN2@xmlHashCop
$LN11@xmlHashCop:
; 1009 : iter = &(table->table[i]);
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _iter$[ebp], eax
$LN5@xmlHashCop:
; 1010 : while (iter) {
cmp DWORD PTR _iter$[ebp], 0
je SHORT $LN6@xmlHashCop
; 1011 : next = iter->next;
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _next$[ebp], eax
; 1012 : xmlHashAddEntry3(ret, iter->name, iter->name2,
mov esi, esp
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
push eax
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
mov ecx, DWORD PTR _iter$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
mov edx, DWORD PTR _ret$[ebp]
push edx
call _xmlHashAddEntry3
add esp, 20 ; 00000014H
; 1013 : iter->name3, f(iter->payload, iter->name));
; 1014 : iter = next;
mov eax, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], eax
; 1015 : }
jmp SHORT $LN5@xmlHashCop
$LN6@xmlHashCop:
; 1016 : }
jmp $LN2@xmlHashCop
$LN10@xmlHashCop:
; 1017 : }
; 1018 : ret->nbElems = table->nbElems;
mov ecx, DWORD PTR _ret$[ebp]
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+8]
mov DWORD PTR [ecx+8], eax
; 1019 : return(ret);
mov eax, DWORD PTR _ret$[ebp]
$LN1@xmlHashCop:
; 1020 : }
pop esi
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashCopy ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashQLookup3
_TEXT SEGMENT
_entry$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_prefix2$ = 20 ; size = 4
_name2$ = 24 ; size = 4
_prefix3$ = 28 ; size = 4
_name3$ = 32 ; size = 4
_xmlHashQLookup3 PROC ; COMDAT
; 814 : const xmlChar *prefix3, const xmlChar *name3) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 815 : unsigned long key;
; 816 : xmlHashEntryPtr entry;
; 817 :
; 818 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN5@xmlHashQLo
; 819 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashQLo
$LN5@xmlHashQLo:
; 820 : if (name == NULL)
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN6@xmlHashQLo
; 821 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashQLo
$LN6@xmlHashQLo:
; 822 : key = xmlHashComputeQKey(table, prefix, name, prefix2,
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _prefix3$[ebp]
push ecx
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _prefix2$[ebp]
push eax
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _prefix$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashComputeQKey
add esp, 28 ; 0000001cH
mov DWORD PTR _key$[ebp], eax
; 823 : name2, prefix3, name3);
; 824 : if (table->table[key].valid == 0)
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN7@xmlHashQLo
; 825 : return(NULL);
xor eax, eax
jmp SHORT $LN1@xmlHashQLo
$LN7@xmlHashQLo:
; 826 : for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _entry$[ebp], ecx
jmp SHORT $LN4@xmlHashQLo
$LN2@xmlHashQLo:
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _entry$[ebp], ecx
$LN4@xmlHashQLo:
cmp DWORD PTR _entry$[ebp], 0
je SHORT $LN3@xmlHashQLo
; 827 : if ((xmlStrQEqual(prefix, name, entry->name)) &&
; 828 : (xmlStrQEqual(prefix2, name2, entry->name2)) &&
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _prefix$[ebp]
push edx
call _xmlStrQEqual
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN8@xmlHashQLo
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _prefix2$[ebp]
push eax
call _xmlStrQEqual
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN8@xmlHashQLo
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _prefix3$[ebp]
push ecx
call _xmlStrQEqual
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN8@xmlHashQLo
; 829 : (xmlStrQEqual(prefix3, name3, entry->name3)))
; 830 : return(entry->payload);
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx+16]
jmp SHORT $LN1@xmlHashQLo
$LN8@xmlHashQLo:
; 831 : }
jmp SHORT $LN2@xmlHashQLo
$LN3@xmlHashQLo:
; 832 : return(NULL);
xor eax, eax
$LN1@xmlHashQLo:
; 833 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashQLookup3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashQLookup2
_TEXT SEGMENT
_table$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_prefix2$ = 20 ; size = 4
_name2$ = 24 ; size = 4
_xmlHashQLookup2 PROC ; COMDAT
; 510 : const xmlChar *name2) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 511 : return(xmlHashQLookup3(table, prefix, name, prefix2, name2, NULL, NULL));
push 0
push 0
mov eax, DWORD PTR _name2$[ebp]
push eax
mov ecx, DWORD PTR _prefix2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _prefix$[ebp]
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashQLookup3
add esp, 28 ; 0000001cH
; 512 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashQLookup2 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashQLookup
_TEXT SEGMENT
_table$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_xmlHashQLookup PROC ; COMDAT
; 491 : const xmlChar *name) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 492 : return(xmlHashQLookup3(table, prefix, name, NULL, NULL, NULL, NULL));
push 0
push 0
push 0
push 0
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _prefix$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
push edx
call _xmlHashQLookup3
add esp, 28 ; 0000001cH
; 493 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashQLookup ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashLookup3
_TEXT SEGMENT
_entry$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_xmlHashLookup3 PROC ; COMDAT
; 768 : const xmlChar *name2, const xmlChar *name3) {
push ebp
mov ebp, esp
sub esp, 8
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 769 : unsigned long key;
; 770 : xmlHashEntryPtr entry;
; 771 :
; 772 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN8@xmlHashLoo
; 773 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashLoo
$LN8@xmlHashLoo:
; 774 : if (name == NULL)
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN9@xmlHashLoo
; 775 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashLoo
$LN9@xmlHashLoo:
; 776 : key = xmlHashComputeKey(table, name, name2, name3);
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 777 : if (table->table[key].valid == 0)
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN10@xmlHashLoo
; 778 : return(NULL);
xor eax, eax
jmp $LN1@xmlHashLoo
$LN10@xmlHashLoo:
; 779 : if (table->dict) {
mov ecx, DWORD PTR _table$[ebp]
cmp DWORD PTR [ecx+12], 0
je SHORT $LN11@xmlHashLoo
; 780 : for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
add edx, DWORD PTR [eax]
mov DWORD PTR _entry$[ebp], edx
jmp SHORT $LN4@xmlHashLoo
$LN2@xmlHashLoo:
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR _entry$[ebp], edx
$LN4@xmlHashLoo:
cmp DWORD PTR _entry$[ebp], 0
je SHORT $LN11@xmlHashLoo
; 781 : if ((entry->name == name) &&
; 782 : (entry->name2 == name2) &&
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+4]
cmp ecx, DWORD PTR _name$[ebp]
jne SHORT $LN12@xmlHashLoo
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx+8]
cmp eax, DWORD PTR _name2$[ebp]
jne SHORT $LN12@xmlHashLoo
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx+12]
cmp edx, DWORD PTR _name3$[ebp]
jne SHORT $LN12@xmlHashLoo
; 783 : (entry->name3 == name3))
; 784 : return(entry->payload);
mov eax, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [eax+16]
jmp SHORT $LN1@xmlHashLoo
$LN12@xmlHashLoo:
; 785 : }
jmp SHORT $LN2@xmlHashLoo
$LN11@xmlHashLoo:
; 786 : }
; 787 : for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _entry$[ebp], ecx
jmp SHORT $LN7@xmlHashLoo
$LN5@xmlHashLoo:
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _entry$[ebp], ecx
$LN7@xmlHashLoo:
cmp DWORD PTR _entry$[ebp], 0
je SHORT $LN6@xmlHashLoo
; 788 : if ((xmlStrEqual(entry->name, name)) &&
; 789 : (xmlStrEqual(entry->name2, name2)) &&
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN13@xmlHashLoo
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN13@xmlHashLoo
mov edx, DWORD PTR _name3$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN13@xmlHashLoo
; 790 : (xmlStrEqual(entry->name3, name3)))
; 791 : return(entry->payload);
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx+16]
jmp SHORT $LN1@xmlHashLoo
$LN13@xmlHashLoo:
; 792 : }
jmp SHORT $LN5@xmlHashLoo
$LN6@xmlHashLoo:
; 793 : return(NULL);
xor eax, eax
$LN1@xmlHashLoo:
; 794 : }
add esp, 8
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashLookup3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashLookup2
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_xmlHashLookup2 PROC ; COMDAT
; 475 : const xmlChar *name2) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 476 : return(xmlHashLookup3(table, name, name2, NULL));
push 0
mov eax, DWORD PTR _name2$[ebp]
push eax
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
push edx
call _xmlHashLookup3
add esp, 16 ; 00000010H
; 477 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashLookup2 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashLookup
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlHashLookup PROC ; COMDAT
; 459 : xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 460 : return(xmlHashLookup3(table, name, NULL, NULL));
push 0
push 0
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashLookup3
add esp, 16 ; 00000010H
; 461 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashLookup ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashRemoveEntry3
_TEXT SEGMENT
_prev$ = -12 ; size = 4
_entry$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_f$ = 24 ; size = 4
_xmlHashRemoveEntry3 PROC ; COMDAT
; 1090 : const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push esi
mov DWORD PTR [ebp-12], -858993460 ; ccccccccH
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 1091 : unsigned long key;
; 1092 : xmlHashEntryPtr entry;
; 1093 : xmlHashEntryPtr prev = NULL;
mov DWORD PTR _prev$[ebp], 0
; 1094 :
; 1095 : if (table == NULL || name == NULL)
cmp DWORD PTR _table$[ebp], 0
je SHORT $LN6@xmlHashRem
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN5@xmlHashRem
$LN6@xmlHashRem:
; 1096 : return(-1);
or eax, -1
jmp $LN1@xmlHashRem
$LN5@xmlHashRem:
; 1097 :
; 1098 : key = xmlHashComputeKey(table, name, name2, name3);
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 1099 : if (table->table[key].valid == 0) {
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
cmp DWORD PTR [eax+ecx+20], 0
jne SHORT $LN7@xmlHashRem
; 1100 : return(-1);
or eax, -1
jmp $LN1@xmlHashRem
; 1101 : } else {
jmp $LN1@xmlHashRem
$LN7@xmlHashRem:
; 1102 : for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _entry$[ebp], ecx
jmp SHORT $LN4@xmlHashRem
$LN2@xmlHashRem:
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _entry$[ebp], ecx
$LN4@xmlHashRem:
cmp DWORD PTR _entry$[ebp], 0
je $LN3@xmlHashRem
; 1103 : if (xmlStrEqual(entry->name, name) &&
; 1104 : xmlStrEqual(entry->name2, name2) &&
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN9@xmlHashRem
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN9@xmlHashRem
mov edx, DWORD PTR _name3$[ebp]
push edx
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN9@xmlHashRem
; 1105 : xmlStrEqual(entry->name3, name3)) {
; 1106 : if ((f != NULL) && (entry->payload != NULL))
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN10@xmlHashRem
mov edx, DWORD PTR _entry$[ebp]
cmp DWORD PTR [edx+16], 0
je SHORT $LN10@xmlHashRem
; 1107 : f(entry->payload, entry->name);
mov esi, esp
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx+16]
push eax
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN10@xmlHashRem:
; 1108 : entry->payload = NULL;
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+16], 0
; 1109 : if (table->dict == NULL) {
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx+12], 0
jne SHORT $LN11@xmlHashRem
; 1110 : if(entry->name)
mov eax, DWORD PTR _entry$[ebp]
cmp DWORD PTR [eax+4], 0
je SHORT $LN12@xmlHashRem
; 1111 : xmlFree(entry->name);
mov esi, esp
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN12@xmlHashRem:
; 1112 : if(entry->name2)
mov eax, DWORD PTR _entry$[ebp]
cmp DWORD PTR [eax+8], 0
je SHORT $LN13@xmlHashRem
; 1113 : xmlFree(entry->name2);
mov esi, esp
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN13@xmlHashRem:
; 1114 : if(entry->name3)
mov eax, DWORD PTR _entry$[ebp]
cmp DWORD PTR [eax+12], 0
je SHORT $LN11@xmlHashRem
; 1115 : xmlFree(entry->name3);
mov esi, esp
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN11@xmlHashRem:
; 1116 : }
; 1117 : if(prev) {
cmp DWORD PTR _prev$[ebp], 0
je SHORT $LN15@xmlHashRem
; 1118 : prev->next = entry->next;
mov eax, DWORD PTR _prev$[ebp]
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR [eax], edx
; 1119 : xmlFree(entry);
mov esi, esp
mov eax, DWORD PTR _entry$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 1120 : } else {
jmp SHORT $LN16@xmlHashRem
$LN15@xmlHashRem:
; 1121 : if (entry->next == NULL) {
mov ecx, DWORD PTR _entry$[ebp]
cmp DWORD PTR [ecx], 0
jne SHORT $LN17@xmlHashRem
; 1122 : entry->valid = 0;
mov edx, DWORD PTR _entry$[ebp]
mov DWORD PTR [edx+20], 0
; 1123 : } else {
jmp SHORT $LN16@xmlHashRem
$LN17@xmlHashRem:
; 1124 : entry = entry->next;
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _entry$[ebp], ecx
; 1125 : memcpy(&(table->table[key]), entry, sizeof(xmlHashEntry));
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
add ecx, edx
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR [ecx], eax
mov eax, DWORD PTR [edx+4]
mov DWORD PTR [ecx+4], eax
mov eax, DWORD PTR [edx+8]
mov DWORD PTR [ecx+8], eax
mov eax, DWORD PTR [edx+12]
mov DWORD PTR [ecx+12], eax
mov eax, DWORD PTR [edx+16]
mov DWORD PTR [ecx+16], eax
mov edx, DWORD PTR [edx+20]
mov DWORD PTR [ecx+20], edx
; 1126 : xmlFree(entry);
mov esi, esp
mov eax, DWORD PTR _entry$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN16@xmlHashRem:
; 1127 : }
; 1128 : }
; 1129 : table->nbElems--;
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx+8]
sub edx, 1
mov eax, DWORD PTR _table$[ebp]
mov DWORD PTR [eax+8], edx
; 1130 : return(0);
xor eax, eax
jmp SHORT $LN1@xmlHashRem
$LN9@xmlHashRem:
; 1131 : }
; 1132 : prev = entry;
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR _prev$[ebp], ecx
; 1133 : }
jmp $LN2@xmlHashRem
$LN3@xmlHashRem:
; 1134 : return(-1);
or eax, -1
$LN1@xmlHashRem:
; 1135 : }
; 1136 : }
pop esi
add esp, 12 ; 0000000cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashRemoveEntry3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashRemoveEntry2
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_f$ = 20 ; size = 4
_xmlHashRemoveEntry2 PROC ; COMDAT
; 1070 : const xmlChar *name2, xmlHashDeallocator f) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 1071 : return(xmlHashRemoveEntry3(table, name, name2, NULL, f));
mov eax, DWORD PTR _f$[ebp]
push eax
push 0
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashRemoveEntry3
add esp, 20 ; 00000014H
; 1072 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashRemoveEntry2 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashRemoveEntry
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_f$ = 16 ; size = 4
_xmlHashRemoveEntry PROC ; COMDAT
; 1051 : xmlHashDeallocator f) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 1052 : return(xmlHashRemoveEntry3(table, name, NULL, NULL, f));
mov eax, DWORD PTR _f$[ebp]
push eax
push 0
push 0
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
push edx
call _xmlHashRemoveEntry3
add esp, 20 ; 00000014H
; 1053 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashRemoveEntry ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashUpdateEntry3
_TEXT SEGMENT
_insert$ = -12 ; size = 4
_entry$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_userdata$ = 24 ; size = 4
_f$ = 28 ; size = 4
_xmlHashUpdateEntry3 PROC ; COMDAT
; 647 : void *userdata, xmlHashDeallocator f) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push esi
mov DWORD PTR [ebp-12], -858993460 ; ccccccccH
mov DWORD PTR [ebp-8], -858993460 ; ccccccccH
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 648 : unsigned long key;
; 649 : xmlHashEntryPtr entry;
; 650 : xmlHashEntryPtr insert;
; 651 :
; 652 : if ((table == NULL) || name == NULL)
cmp DWORD PTR _table$[ebp], 0
je SHORT $LN9@xmlHashUpd
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN8@xmlHashUpd
$LN9@xmlHashUpd:
; 653 : return(-1);
or eax, -1
jmp $LN1@xmlHashUpd
$LN8@xmlHashUpd:
; 654 :
; 655 : /*
; 656 : * If using a dict internalize if needed
; 657 : */
; 658 : if (table->dict) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax+12], 0
je $LN10@xmlHashUpd
; 659 : if (!xmlDictOwns(table->dict, name)) {
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN11@xmlHashUpd
; 660 : name = xmlDictLookup(table->dict, name, -1);
push -1
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name$[ebp], eax
; 661 : if (name == NULL)
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN11@xmlHashUpd
; 662 : return(-1);
or eax, -1
jmp $LN1@xmlHashUpd
$LN11@xmlHashUpd:
; 663 : }
; 664 : if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) {
cmp DWORD PTR _name2$[ebp], 0
je SHORT $LN13@xmlHashUpd
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN13@xmlHashUpd
; 665 : name2 = xmlDictLookup(table->dict, name2, -1);
push -1
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name2$[ebp], eax
; 666 : if (name2 == NULL)
cmp DWORD PTR _name2$[ebp], 0
jne SHORT $LN13@xmlHashUpd
; 667 : return(-1);
or eax, -1
jmp $LN1@xmlHashUpd
$LN13@xmlHashUpd:
; 668 : }
; 669 : if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) {
cmp DWORD PTR _name3$[ebp], 0
je SHORT $LN10@xmlHashUpd
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN10@xmlHashUpd
; 670 : name3 = xmlDictLookup(table->dict, name3, -1);
push -1
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name3$[ebp], eax
; 671 : if (name3 == NULL)
cmp DWORD PTR _name3$[ebp], 0
jne SHORT $LN10@xmlHashUpd
; 672 : return(-1);
or eax, -1
jmp $LN1@xmlHashUpd
$LN10@xmlHashUpd:
; 673 : }
; 674 : }
; 675 :
; 676 : /*
; 677 : * Check for duplicate and insertion location.
; 678 : */
; 679 : key = xmlHashComputeKey(table, name, name2, name3);
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 680 : if (table->table[key].valid == 0) {
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
cmp DWORD PTR [ecx+edx+20], 0
jne SHORT $LN17@xmlHashUpd
; 681 : insert = NULL;
mov DWORD PTR _insert$[ebp], 0
; 682 : } else {
jmp $LN18@xmlHashUpd
$LN17@xmlHashUpd:
; 683 : if (table ->dict) {
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx+12], 0
je $LN19@xmlHashUpd
; 684 : for (insert = &(table->table[key]); insert->next != NULL;
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _insert$[ebp], eax
jmp SHORT $LN4@xmlHashUpd
$LN2@xmlHashUpd:
; 685 : insert = insert->next) {
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _insert$[ebp], eax
$LN4@xmlHashUpd:
; 684 : for (insert = &(table->table[key]); insert->next != NULL;
mov ecx, DWORD PTR _insert$[ebp]
cmp DWORD PTR [ecx], 0
je SHORT $LN3@xmlHashUpd
; 686 : if ((insert->name == name) &&
; 687 : (insert->name2 == name2) &&
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
cmp eax, DWORD PTR _name$[ebp]
jne SHORT $LN21@xmlHashUpd
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+8]
cmp edx, DWORD PTR _name2$[ebp]
jne SHORT $LN21@xmlHashUpd
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+12]
cmp ecx, DWORD PTR _name3$[ebp]
jne SHORT $LN21@xmlHashUpd
; 688 : (insert->name3 == name3)) {
; 689 : if (f)
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN22@xmlHashUpd
; 690 : f(insert->payload, insert->name);
mov esi, esp
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN22@xmlHashUpd:
; 691 : insert->payload = userdata;
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR _userdata$[ebp]
mov DWORD PTR [eax+16], ecx
; 692 : return(0);
xor eax, eax
jmp $LN1@xmlHashUpd
$LN21@xmlHashUpd:
; 693 : }
; 694 : }
jmp SHORT $LN2@xmlHashUpd
$LN3@xmlHashUpd:
; 695 : if ((insert->name == name) &&
; 696 : (insert->name2 == name2) &&
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
cmp eax, DWORD PTR _name$[ebp]
jne SHORT $LN23@xmlHashUpd
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+8]
cmp edx, DWORD PTR _name2$[ebp]
jne SHORT $LN23@xmlHashUpd
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+12]
cmp ecx, DWORD PTR _name3$[ebp]
jne SHORT $LN23@xmlHashUpd
; 697 : (insert->name3 == name3)) {
; 698 : if (f)
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN24@xmlHashUpd
; 699 : f(insert->payload, insert->name);
mov esi, esp
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN24@xmlHashUpd:
; 700 : insert->payload = userdata;
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR _userdata$[ebp]
mov DWORD PTR [eax+16], ecx
; 701 : return(0);
xor eax, eax
jmp $LN1@xmlHashUpd
$LN23@xmlHashUpd:
; 702 : }
; 703 : } else {
jmp $LN18@xmlHashUpd
$LN19@xmlHashUpd:
; 704 : for (insert = &(table->table[key]); insert->next != NULL;
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
add edx, DWORD PTR [eax]
mov DWORD PTR _insert$[ebp], edx
jmp SHORT $LN7@xmlHashUpd
$LN5@xmlHashUpd:
; 705 : insert = insert->next) {
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx]
mov DWORD PTR _insert$[ebp], edx
$LN7@xmlHashUpd:
; 704 : for (insert = &(table->table[key]); insert->next != NULL;
mov eax, DWORD PTR _insert$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN6@xmlHashUpd
; 706 : if ((xmlStrEqual(insert->name, name)) &&
; 707 : (xmlStrEqual(insert->name2, name2)) &&
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN25@xmlHashUpd
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN25@xmlHashUpd
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN25@xmlHashUpd
; 708 : (xmlStrEqual(insert->name3, name3))) {
; 709 : if (f)
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN26@xmlHashUpd
; 710 : f(insert->payload, insert->name);
mov esi, esp
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN26@xmlHashUpd:
; 711 : insert->payload = userdata;
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR _userdata$[ebp]
mov DWORD PTR [edx+16], eax
; 712 : return(0);
xor eax, eax
jmp $LN1@xmlHashUpd
$LN25@xmlHashUpd:
; 713 : }
; 714 : }
jmp $LN5@xmlHashUpd
$LN6@xmlHashUpd:
; 715 : if ((xmlStrEqual(insert->name, name)) &&
; 716 : (xmlStrEqual(insert->name2, name2)) &&
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashUpd
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+8]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashUpd
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashUpd
; 717 : (xmlStrEqual(insert->name3, name3))) {
; 718 : if (f)
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN28@xmlHashUpd
; 719 : f(insert->payload, insert->name);
mov esi, esp
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN28@xmlHashUpd:
; 720 : insert->payload = userdata;
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR _userdata$[ebp]
mov DWORD PTR [edx+16], eax
; 721 : return(0);
xor eax, eax
jmp $LN1@xmlHashUpd
$LN18@xmlHashUpd:
; 722 : }
; 723 : }
; 724 : }
; 725 :
; 726 : if (insert == NULL) {
cmp DWORD PTR _insert$[ebp], 0
jne SHORT $LN29@xmlHashUpd
; 727 : entry = &(table->table[key]);
imul ecx, DWORD PTR _key$[ebp], 24
mov edx, DWORD PTR _table$[ebp]
add ecx, DWORD PTR [edx]
mov DWORD PTR _entry$[ebp], ecx
; 728 : } else {
jmp SHORT $LN30@xmlHashUpd
$LN29@xmlHashUpd:
; 729 : entry = xmlMalloc(sizeof(xmlHashEntry));
mov esi, esp
push 24 ; 00000018H
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _entry$[ebp], eax
; 730 : if (entry == NULL)
cmp DWORD PTR _entry$[ebp], 0
jne SHORT $LN30@xmlHashUpd
; 731 : return(-1);
or eax, -1
jmp $LN1@xmlHashUpd
$LN30@xmlHashUpd:
; 732 : }
; 733 :
; 734 : if (table->dict != NULL) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax+12], 0
je SHORT $LN32@xmlHashUpd
; 735 : entry->name = (xmlChar *) name;
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR _name$[ebp]
mov DWORD PTR [ecx+4], edx
; 736 : entry->name2 = (xmlChar *) name2;
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR _name2$[ebp]
mov DWORD PTR [eax+8], ecx
; 737 : entry->name3 = (xmlChar *) name3;
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR _name3$[ebp]
mov DWORD PTR [edx+12], eax
; 738 : } else {
jmp SHORT $LN33@xmlHashUpd
$LN32@xmlHashUpd:
; 739 : entry->name = xmlStrdup(name);
mov ecx, DWORD PTR _name$[ebp]
push ecx
call _xmlStrdup
add esp, 4
mov edx, DWORD PTR _entry$[ebp]
mov DWORD PTR [edx+4], eax
; 740 : entry->name2 = xmlStrdup(name2);
mov eax, DWORD PTR _name2$[ebp]
push eax
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+8], eax
; 741 : entry->name3 = xmlStrdup(name3);
mov edx, DWORD PTR _name3$[ebp]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+12], eax
$LN33@xmlHashUpd:
; 742 : }
; 743 : entry->payload = userdata;
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR _userdata$[ebp]
mov DWORD PTR [edx+16], eax
; 744 : entry->next = NULL;
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx], 0
; 745 : entry->valid = 1;
mov edx, DWORD PTR _entry$[ebp]
mov DWORD PTR [edx+20], 1
; 746 : table->nbElems++;
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax+8]
add ecx, 1
mov edx, DWORD PTR _table$[ebp]
mov DWORD PTR [edx+8], ecx
; 747 :
; 748 :
; 749 : if (insert != NULL) {
cmp DWORD PTR _insert$[ebp], 0
je SHORT $LN34@xmlHashUpd
; 750 : insert->next = entry;
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [eax], ecx
$LN34@xmlHashUpd:
; 751 : }
; 752 : return(0);
xor eax, eax
$LN1@xmlHashUpd:
; 753 : }
pop esi
add esp, 12 ; 0000000cH
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashUpdateEntry3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashAddEntry3
_TEXT SEGMENT
_insert$ = -16 ; size = 4
_entry$ = -12 ; size = 4
_len$ = -8 ; size = 4
_key$ = -4 ; size = 4
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_name3$ = 20 ; size = 4
_userdata$ = 24 ; size = 4
_xmlHashAddEntry3 PROC ; COMDAT
; 531 : void *userdata) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
push esi
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 532 : unsigned long key, len = 0;
mov DWORD PTR _len$[ebp], 0
; 533 : xmlHashEntryPtr entry;
; 534 : xmlHashEntryPtr insert;
; 535 :
; 536 : if ((table == NULL) || (name == NULL))
cmp DWORD PTR _table$[ebp], 0
je SHORT $LN9@xmlHashAdd
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN8@xmlHashAdd
$LN9@xmlHashAdd:
; 537 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN8@xmlHashAdd:
; 538 :
; 539 : /*
; 540 : * If using a dict internalize if needed
; 541 : */
; 542 : if (table->dict) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax+12], 0
je $LN10@xmlHashAdd
; 543 : if (!xmlDictOwns(table->dict, name)) {
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN11@xmlHashAdd
; 544 : name = xmlDictLookup(table->dict, name, -1);
push -1
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name$[ebp], eax
; 545 : if (name == NULL)
cmp DWORD PTR _name$[ebp], 0
jne SHORT $LN11@xmlHashAdd
; 546 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN11@xmlHashAdd:
; 547 : }
; 548 : if ((name2 != NULL) && (!xmlDictOwns(table->dict, name2))) {
cmp DWORD PTR _name2$[ebp], 0
je SHORT $LN13@xmlHashAdd
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN13@xmlHashAdd
; 549 : name2 = xmlDictLookup(table->dict, name2, -1);
push -1
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name2$[ebp], eax
; 550 : if (name2 == NULL)
cmp DWORD PTR _name2$[ebp], 0
jne SHORT $LN13@xmlHashAdd
; 551 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN13@xmlHashAdd:
; 552 : }
; 553 : if ((name3 != NULL) && (!xmlDictOwns(table->dict, name3))) {
cmp DWORD PTR _name3$[ebp], 0
je SHORT $LN10@xmlHashAdd
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictOwns
add esp, 8
test eax, eax
jne SHORT $LN10@xmlHashAdd
; 554 : name3 = xmlDictLookup(table->dict, name3, -1);
push -1
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+12]
push eax
call _xmlDictLookup
add esp, 12 ; 0000000cH
mov DWORD PTR _name3$[ebp], eax
; 555 : if (name3 == NULL)
cmp DWORD PTR _name3$[ebp], 0
jne SHORT $LN10@xmlHashAdd
; 556 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN10@xmlHashAdd:
; 557 : }
; 558 : }
; 559 :
; 560 : /*
; 561 : * Check for duplicate and insertion location.
; 562 : */
; 563 : key = xmlHashComputeKey(table, name, name2, name3);
mov ecx, DWORD PTR _name3$[ebp]
push ecx
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashComputeKey
add esp, 16 ; 00000010H
mov DWORD PTR _key$[ebp], eax
; 564 : if (table->table[key].valid == 0) {
imul edx, DWORD PTR _key$[ebp], 24
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
cmp DWORD PTR [ecx+edx+20], 0
jne SHORT $LN17@xmlHashAdd
; 565 : insert = NULL;
mov DWORD PTR _insert$[ebp], 0
; 566 : } else {
jmp $LN18@xmlHashAdd
$LN17@xmlHashAdd:
; 567 : if (table->dict) {
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx+12], 0
je $LN19@xmlHashAdd
; 568 : for (insert = &(table->table[key]); insert->next != NULL;
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _insert$[ebp], eax
jmp SHORT $LN4@xmlHashAdd
$LN2@xmlHashAdd:
; 569 : insert = insert->next) {
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _insert$[ebp], eax
$LN4@xmlHashAdd:
; 568 : for (insert = &(table->table[key]); insert->next != NULL;
mov ecx, DWORD PTR _insert$[ebp]
cmp DWORD PTR [ecx], 0
je SHORT $LN3@xmlHashAdd
; 570 : if ((insert->name == name) &&
; 571 : (insert->name2 == name2) &&
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+4]
cmp eax, DWORD PTR _name$[ebp]
jne SHORT $LN21@xmlHashAdd
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+8]
cmp edx, DWORD PTR _name2$[ebp]
jne SHORT $LN21@xmlHashAdd
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+12]
cmp ecx, DWORD PTR _name3$[ebp]
jne SHORT $LN21@xmlHashAdd
; 572 : (insert->name3 == name3))
; 573 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN21@xmlHashAdd:
; 574 : len++;
mov edx, DWORD PTR _len$[ebp]
add edx, 1
mov DWORD PTR _len$[ebp], edx
; 575 : }
jmp SHORT $LN2@xmlHashAdd
$LN3@xmlHashAdd:
; 576 : if ((insert->name == name) &&
; 577 : (insert->name2 == name2) &&
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+4]
cmp ecx, DWORD PTR _name$[ebp]
jne SHORT $LN22@xmlHashAdd
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx+8]
cmp eax, DWORD PTR _name2$[ebp]
jne SHORT $LN22@xmlHashAdd
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+12]
cmp edx, DWORD PTR _name3$[ebp]
jne SHORT $LN22@xmlHashAdd
; 578 : (insert->name3 == name3))
; 579 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN22@xmlHashAdd:
; 580 : } else {
jmp $LN18@xmlHashAdd
$LN19@xmlHashAdd:
; 581 : for (insert = &(table->table[key]); insert->next != NULL;
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _insert$[ebp], eax
jmp SHORT $LN7@xmlHashAdd
$LN5@xmlHashAdd:
; 582 : insert = insert->next) {
mov edx, DWORD PTR _insert$[ebp]
mov eax, DWORD PTR [edx]
mov DWORD PTR _insert$[ebp], eax
$LN7@xmlHashAdd:
; 581 : for (insert = &(table->table[key]); insert->next != NULL;
mov ecx, DWORD PTR _insert$[ebp]
cmp DWORD PTR [ecx], 0
je SHORT $LN6@xmlHashAdd
; 583 : if ((xmlStrEqual(insert->name, name)) &&
; 584 : (xmlStrEqual(insert->name2, name2)) &&
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN23@xmlHashAdd
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN23@xmlHashAdd
mov edx, DWORD PTR _name3$[ebp]
push edx
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN23@xmlHashAdd
; 585 : (xmlStrEqual(insert->name3, name3)))
; 586 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN23@xmlHashAdd:
; 587 : len++;
mov edx, DWORD PTR _len$[ebp]
add edx, 1
mov DWORD PTR _len$[ebp], edx
; 588 : }
jmp SHORT $LN5@xmlHashAdd
$LN6@xmlHashAdd:
; 589 : if ((xmlStrEqual(insert->name, name)) &&
; 590 : (xmlStrEqual(insert->name2, name2)) &&
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+4]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashAdd
mov eax, DWORD PTR _name2$[ebp]
push eax
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+8]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashAdd
mov eax, DWORD PTR _name3$[ebp]
push eax
mov ecx, DWORD PTR _insert$[ebp]
mov edx, DWORD PTR [ecx+12]
push edx
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xmlHashAdd
; 591 : (xmlStrEqual(insert->name3, name3)))
; 592 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN18@xmlHashAdd:
; 593 : }
; 594 : }
; 595 :
; 596 : if (insert == NULL) {
cmp DWORD PTR _insert$[ebp], 0
jne SHORT $LN25@xmlHashAdd
; 597 : entry = &(table->table[key]);
imul eax, DWORD PTR _key$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _entry$[ebp], eax
; 598 : } else {
jmp SHORT $LN26@xmlHashAdd
$LN25@xmlHashAdd:
; 599 : entry = xmlMalloc(sizeof(xmlHashEntry));
mov esi, esp
push 24 ; 00000018H
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _entry$[ebp], eax
; 600 : if (entry == NULL)
cmp DWORD PTR _entry$[ebp], 0
jne SHORT $LN26@xmlHashAdd
; 601 : return(-1);
or eax, -1
jmp $LN1@xmlHashAdd
$LN26@xmlHashAdd:
; 602 : }
; 603 :
; 604 : if (table->dict != NULL) {
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx+12], 0
je SHORT $LN28@xmlHashAdd
; 605 : entry->name = (xmlChar *) name;
mov eax, DWORD PTR _entry$[ebp]
mov ecx, DWORD PTR _name$[ebp]
mov DWORD PTR [eax+4], ecx
; 606 : entry->name2 = (xmlChar *) name2;
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR _name2$[ebp]
mov DWORD PTR [edx+8], eax
; 607 : entry->name3 = (xmlChar *) name3;
mov ecx, DWORD PTR _entry$[ebp]
mov edx, DWORD PTR _name3$[ebp]
mov DWORD PTR [ecx+12], edx
; 608 : } else {
jmp SHORT $LN29@xmlHashAdd
$LN28@xmlHashAdd:
; 609 : entry->name = xmlStrdup(name);
mov eax, DWORD PTR _name$[ebp]
push eax
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+4], eax
; 610 : entry->name2 = xmlStrdup(name2);
mov edx, DWORD PTR _name2$[ebp]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+8], eax
; 611 : entry->name3 = xmlStrdup(name3);
mov edx, DWORD PTR _name3$[ebp]
push edx
call _xmlStrdup
add esp, 4
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx+12], eax
$LN29@xmlHashAdd:
; 612 : }
; 613 : entry->payload = userdata;
mov edx, DWORD PTR _entry$[ebp]
mov eax, DWORD PTR _userdata$[ebp]
mov DWORD PTR [edx+16], eax
; 614 : entry->next = NULL;
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [ecx], 0
; 615 : entry->valid = 1;
mov edx, DWORD PTR _entry$[ebp]
mov DWORD PTR [edx+20], 1
; 616 :
; 617 :
; 618 : if (insert != NULL)
cmp DWORD PTR _insert$[ebp], 0
je SHORT $LN30@xmlHashAdd
; 619 : insert->next = entry;
mov eax, DWORD PTR _insert$[ebp]
mov ecx, DWORD PTR _entry$[ebp]
mov DWORD PTR [eax], ecx
$LN30@xmlHashAdd:
; 620 :
; 621 : table->nbElems++;
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+8]
add eax, 1
mov ecx, DWORD PTR _table$[ebp]
mov DWORD PTR [ecx+8], eax
; 622 :
; 623 : if (len > MAX_HASH_LEN)
cmp DWORD PTR _len$[ebp], 8
jbe SHORT $LN31@xmlHashAdd
; 624 : xmlHashGrow(table, MAX_HASH_LEN * table->size);
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx+4]
shl eax, 3
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashGrow
add esp, 8
$LN31@xmlHashAdd:
; 625 :
; 626 : return(0);
xor eax, eax
$LN1@xmlHashAdd:
; 627 : }
pop esi
add esp, 16 ; 00000010H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashAddEntry3 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashUpdateEntry2
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_userdata$ = 20 ; size = 4
_f$ = 24 ; size = 4
_xmlHashUpdateEntry2 PROC ; COMDAT
; 445 : xmlHashDeallocator f) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 446 : return(xmlHashUpdateEntry3(table, name, name2, NULL, userdata, f));
mov eax, DWORD PTR _f$[ebp]
push eax
mov ecx, DWORD PTR _userdata$[ebp]
push ecx
push 0
mov edx, DWORD PTR _name2$[ebp]
push edx
mov eax, DWORD PTR _name$[ebp]
push eax
mov ecx, DWORD PTR _table$[ebp]
push ecx
call _xmlHashUpdateEntry3
add esp, 24 ; 00000018H
; 447 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashUpdateEntry2 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashAddEntry2
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_name2$ = 16 ; size = 4
_userdata$ = 20 ; size = 4
_xmlHashAddEntry2 PROC ; COMDAT
; 405 : const xmlChar *name2, void *userdata) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 406 : return(xmlHashAddEntry3(table, name, name2, NULL, userdata));
mov eax, DWORD PTR _userdata$[ebp]
push eax
push 0
mov ecx, DWORD PTR _name2$[ebp]
push ecx
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashAddEntry3
add esp, 20 ; 00000014H
; 407 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashAddEntry2 ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashUpdateEntry
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_userdata$ = 16 ; size = 4
_f$ = 20 ; size = 4
_xmlHashUpdateEntry PROC ; COMDAT
; 424 : void *userdata, xmlHashDeallocator f) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 425 : return(xmlHashUpdateEntry3(table, name, NULL, NULL, userdata, f));
mov eax, DWORD PTR _f$[ebp]
push eax
mov ecx, DWORD PTR _userdata$[ebp]
push ecx
push 0
push 0
mov edx, DWORD PTR _name$[ebp]
push edx
mov eax, DWORD PTR _table$[ebp]
push eax
call _xmlHashUpdateEntry3
add esp, 24 ; 00000018H
; 426 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashUpdateEntry ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashAddEntry
_TEXT SEGMENT
_table$ = 8 ; size = 4
_name$ = 12 ; size = 4
_userdata$ = 16 ; size = 4
_xmlHashAddEntry PROC ; COMDAT
; 387 : xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata) {
push ebp
mov ebp, esp
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 388 : return(xmlHashAddEntry3(table, name, NULL, NULL, userdata));
mov eax, DWORD PTR _userdata$[ebp]
push eax
push 0
push 0
mov ecx, DWORD PTR _name$[ebp]
push ecx
mov edx, DWORD PTR _table$[ebp]
push edx
call _xmlHashAddEntry3
add esp, 20 ; 00000014H
; 389 : }
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashAddEntry ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashDefaultDeallocator
_TEXT SEGMENT
_entry$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlHashDefaultDeallocator PROC ; COMDAT
; 371 : xmlHashDefaultDeallocator(void *entry, const xmlChar *name ATTRIBUTE_UNUSED) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 372 : xmlFree(entry);
mov esi, esp
mov eax, DWORD PTR _entry$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
; 373 : }
pop esi
cmp ebp, esp
call __RTC_CheckEsp
pop ebp
ret 0
_xmlHashDefaultDeallocator ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashFree
_TEXT SEGMENT
_nbElems$ = -20 ; size = 4
_inside_table$ = -16 ; size = 4
_next$ = -12 ; size = 4
_iter$ = -8 ; size = 4
_i$ = -4 ; size = 4
_table$ = 8 ; size = 4
_f$ = 12 ; size = 4
_xmlHashFree PROC ; COMDAT
; 320 : xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f) {
push ebp
mov ebp, esp
sub esp, 20 ; 00000014H
push esi
mov eax, -858993460 ; ccccccccH
mov DWORD PTR [ebp-20], eax
mov DWORD PTR [ebp-16], eax
mov DWORD PTR [ebp-12], eax
mov DWORD PTR [ebp-8], eax
mov DWORD PTR [ebp-4], eax
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 321 : int i;
; 322 : xmlHashEntryPtr iter;
; 323 : xmlHashEntryPtr next;
; 324 : int inside_table = 0;
mov DWORD PTR _inside_table$[ebp], 0
; 325 : int nbElems;
; 326 :
; 327 : if (table == NULL)
cmp DWORD PTR _table$[ebp], 0
jne SHORT $LN7@xmlHashFre
; 328 : return;
jmp $LN1@xmlHashFre
$LN7@xmlHashFre:
; 329 : if (table->table) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax], 0
je $LN8@xmlHashFre
; 330 : nbElems = table->nbElems;
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR [ecx+8]
mov DWORD PTR _nbElems$[ebp], edx
; 331 : for(i = 0; (i < table->size) && (nbElems > 0); i++) {
mov DWORD PTR _i$[ebp], 0
jmp SHORT $LN4@xmlHashFre
$LN2@xmlHashFre:
mov eax, DWORD PTR _i$[ebp]
add eax, 1
mov DWORD PTR _i$[ebp], eax
$LN4@xmlHashFre:
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR _i$[ebp]
cmp edx, DWORD PTR [ecx+4]
jge $LN3@xmlHashFre
cmp DWORD PTR _nbElems$[ebp], 0
jle $LN3@xmlHashFre
; 332 : iter = &(table->table[i]);
imul eax, DWORD PTR _i$[ebp], 24
mov ecx, DWORD PTR _table$[ebp]
add eax, DWORD PTR [ecx]
mov DWORD PTR _iter$[ebp], eax
; 333 : if (iter->valid == 0)
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+20], 0
jne SHORT $LN9@xmlHashFre
; 334 : continue;
jmp SHORT $LN2@xmlHashFre
$LN9@xmlHashFre:
; 335 : inside_table = 1;
mov DWORD PTR _inside_table$[ebp], 1
$LN5@xmlHashFre:
; 336 : while (iter) {
cmp DWORD PTR _iter$[ebp], 0
je $LN6@xmlHashFre
; 337 : next = iter->next;
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax]
mov DWORD PTR _next$[ebp], ecx
; 338 : if ((f != NULL) && (iter->payload != NULL))
cmp DWORD PTR _f$[ebp], 0
je SHORT $LN10@xmlHashFre
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+16], 0
je SHORT $LN10@xmlHashFre
; 339 : f(iter->payload, iter->name);
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
mov edx, DWORD PTR _iter$[ebp]
mov eax, DWORD PTR [edx+16]
push eax
call DWORD PTR _f$[ebp]
add esp, 8
cmp esi, esp
call __RTC_CheckEsp
$LN10@xmlHashFre:
; 340 : if (table->dict == NULL) {
mov ecx, DWORD PTR _table$[ebp]
cmp DWORD PTR [ecx+12], 0
jne SHORT $LN11@xmlHashFre
; 341 : if (iter->name)
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+4], 0
je SHORT $LN12@xmlHashFre
; 342 : xmlFree(iter->name);
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN12@xmlHashFre:
; 343 : if (iter->name2)
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+8], 0
je SHORT $LN13@xmlHashFre
; 344 : xmlFree(iter->name2);
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+8]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN13@xmlHashFre:
; 345 : if (iter->name3)
mov edx, DWORD PTR _iter$[ebp]
cmp DWORD PTR [edx+12], 0
je SHORT $LN11@xmlHashFre
; 346 : xmlFree(iter->name3);
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN11@xmlHashFre:
; 347 : }
; 348 : iter->payload = NULL;
mov edx, DWORD PTR _iter$[ebp]
mov DWORD PTR [edx+16], 0
; 349 : if (!inside_table)
cmp DWORD PTR _inside_table$[ebp], 0
jne SHORT $LN15@xmlHashFre
; 350 : xmlFree(iter);
mov esi, esp
mov eax, DWORD PTR _iter$[ebp]
push eax
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN15@xmlHashFre:
; 351 : nbElems--;
mov ecx, DWORD PTR _nbElems$[ebp]
sub ecx, 1
mov DWORD PTR _nbElems$[ebp], ecx
; 352 : inside_table = 0;
mov DWORD PTR _inside_table$[ebp], 0
; 353 : iter = next;
mov edx, DWORD PTR _next$[ebp]
mov DWORD PTR _iter$[ebp], edx
; 354 : }
jmp $LN5@xmlHashFre
$LN6@xmlHashFre:
; 355 : }
jmp $LN2@xmlHashFre
$LN3@xmlHashFre:
; 356 : xmlFree(table->table);
mov esi, esp
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN8@xmlHashFre:
; 357 : }
; 358 : if (table->dict)
mov edx, DWORD PTR _table$[ebp]
cmp DWORD PTR [edx+12], 0
je SHORT $LN16@xmlHashFre
; 359 : xmlDictFree(table->dict);
mov eax, DWORD PTR _table$[ebp]
mov ecx, DWORD PTR [eax+12]
push ecx
call _xmlDictFree
add esp, 4
$LN16@xmlHashFre:
; 360 : xmlFree(table);
mov esi, esp
mov edx, DWORD PTR _table$[ebp]
push edx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN1@xmlHashFre:
; 361 : }
pop esi
add esp, 20 ; 00000014H
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashFree ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashCreateDict
_TEXT SEGMENT
_table$ = -4 ; size = 4
_size$ = 8 ; size = 4
_dict$ = 12 ; size = 4
_xmlHashCreateDict PROC ; COMDAT
; 208 : xmlHashCreateDict(int size, xmlDictPtr dict) {
push ebp
mov ebp, esp
push ecx
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 209 : xmlHashTablePtr table;
; 210 :
; 211 : table = xmlHashCreate(size);
mov eax, DWORD PTR _size$[ebp]
push eax
call _xmlHashCreate
add esp, 4
mov DWORD PTR _table$[ebp], eax
; 212 : if (table != NULL) {
cmp DWORD PTR _table$[ebp], 0
je SHORT $LN2@xmlHashCre
; 213 : table->dict = dict;
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR _dict$[ebp]
mov DWORD PTR [ecx+12], edx
; 214 : xmlDictReference(dict);
mov eax, DWORD PTR _dict$[ebp]
push eax
call _xmlDictReference
add esp, 4
$LN2@xmlHashCre:
; 215 : }
; 216 : return(table);
mov eax, DWORD PTR _table$[ebp]
; 217 : }
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashCreateDict ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\hash.c
; COMDAT _xmlHashCreate
_TEXT SEGMENT
_table$ = -4 ; size = 4
_size$ = 8 ; size = 4
_xmlHashCreate PROC ; COMDAT
; 174 : xmlHashCreate(int size) {
push ebp
mov ebp, esp
push ecx
push esi
mov DWORD PTR [ebp-4], -858993460 ; ccccccccH
mov ecx, OFFSET __776982E1_hash@c
call @__CheckForDebuggerJustMyCode@4
; 175 : xmlHashTablePtr table;
; 176 :
; 177 : if (size <= 0)
cmp DWORD PTR _size$[ebp], 0
jg SHORT $LN2@xmlHashCre
; 178 : size = 256;
mov DWORD PTR _size$[ebp], 256 ; 00000100H
$LN2@xmlHashCre:
; 179 :
; 180 : table = xmlMalloc(sizeof(xmlHashTable));
mov esi, esp
push 16 ; 00000010H
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov DWORD PTR _table$[ebp], eax
; 181 : if (table) {
cmp DWORD PTR _table$[ebp], 0
je SHORT $LN3@xmlHashCre
; 182 : table->dict = NULL;
mov eax, DWORD PTR _table$[ebp]
mov DWORD PTR [eax+12], 0
; 183 : table->size = size;
mov ecx, DWORD PTR _table$[ebp]
mov edx, DWORD PTR _size$[ebp]
mov DWORD PTR [ecx+4], edx
; 184 : table->nbElems = 0;
mov eax, DWORD PTR _table$[ebp]
mov DWORD PTR [eax+8], 0
; 185 : table->table = xmlMalloc(size * sizeof(xmlHashEntry));
imul ecx, DWORD PTR _size$[ebp], 24
mov esi, esp
push ecx
call DWORD PTR _xmlMalloc
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
mov edx, DWORD PTR _table$[ebp]
mov DWORD PTR [edx], eax
; 186 : if (table->table) {
mov eax, DWORD PTR _table$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $LN4@xmlHashCre
; 187 : memset(table->table, 0, size * sizeof(xmlHashEntry));
imul ecx, DWORD PTR _size$[ebp], 24
push ecx
push 0
mov edx, DWORD PTR _table$[ebp]
mov eax, DWORD PTR [edx]
push eax
call _memset
add esp, 12 ; 0000000cH
; 188 : #ifdef HASH_RANDOMIZATION
; 189 : table->random_seed = __xmlRandom();
; 190 : #endif
; 191 : return(table);
mov eax, DWORD PTR _table$[ebp]
jmp SHORT $LN1@xmlHashCre
$LN4@xmlHashCre:
; 192 : }
; 193 : xmlFree(table);
mov esi, esp
mov ecx, DWORD PTR _table$[ebp]
push ecx
call DWORD PTR _xmlFree
add esp, 4
cmp esi, esp
call __RTC_CheckEsp
$LN3@xmlHashCre:
; 194 : }
; 195 : return(NULL);
xor eax, eax
$LN1@xmlHashCre:
; 196 : }
pop esi
add esp, 4
cmp ebp, esp
call __RTC_CheckEsp
mov esp, ebp
pop ebp
ret 0
_xmlHashCreate ENDP
_TEXT ENDS
END
|
PrintingCharacter.asm
|
WilsenHernandez/MIPS-Tutorial
| 0 |
21029
|
<filename>PrintingCharacter.asm
.data
myChar: .byte 'N'
.text
li $v0, 4
la $a0, myChar
syscall
|
boards/OpenMV2/src/openmv.ads
|
morbos/Ada_Drivers_Library
| 2 |
11276
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with STM32.Device; use STM32.Device;
with STM32.GPIO; use STM32.GPIO;
use STM32; -- for base addresses
with STM32.SPI;
with STM32.Timers; use STM32.Timers;
with STM32.DMA;
with STM32.I2C; use STM32.I2C;
with STM32.USARTs; use STM32.USARTs;
with HAL.UART;
package OpenMV is
pragma Elaborate_Body;
type LED_Color is (White, Red, Green, Blue, Magenta, Cyan, Yellow, Off);
Image_Width : constant := 128;
Image_Height : constant := 160;
subtype Width is Natural range 0 .. Image_Width - 1;
subtype Height is Natural range 0 .. Image_Height - 1;
procedure Initialize_LEDs;
-- MUST be called prior to any use of the LEDs
procedure Set_RGB_LED (C : LED_Color);
-- Set color of the RGB LED on the board
procedure Turn_On_IR;
-- Turn on infrared LEDs on the board
procedure Turn_Off_IR;
-- Turn off infrared LEDs on the board
procedure Initialize_Shield_SPI;
-- Initialize the SPI port available for shields (SPI2)
procedure Initialize_Shield_USART (Baud : STM32.USARTs.Baud_Rates);
-- Initialize the USART port available for shields (USART3)
function Get_Shield_USART return not null HAL.UART.Any_UART_Port;
-- Get the USART port available for shields (USART3)
Shield_MOSI : GPIO_Point renames PB15;
Shield_MISO : GPIO_Point renames PB14;
Shield_SCK : GPIO_Point renames PB13;
Shield_SEL : GPIO_Point renames PB12;
Shield_TXD : GPIO_Point renames PB10;
Shield_RXD : GPIO_Point renames PB11;
Shield_ADC : GPIO_Point renames PA5;
Shield_SWC : GPIO_Point renames PA14;
Shield_SWD : GPIO_Point renames PA13;
Shield_PWM1 : GPIO_Point renames PD12;
Shield_PWM2 : GPIO_Point renames PD13;
private
--------------
-- LED Pins --
--------------
Red_LED : GPIO_Point renames PC0;
Blue_LED : GPIO_Point renames PC1;
Green_LED : GPIO_Point renames PC2;
IR_LED : GPIO_Point renames PE2;
All_LEDs : constant GPIO_Points := (Red_LED, Blue_LED, Green_LED, IR_LED);
---------------
-- SPI2 Pins --
---------------
SPI2_SCK : GPIO_Point renames PB13;
SPI2_MISO : GPIO_Point renames PB14;
SPI2_MOSI : GPIO_Point renames PB15;
SPI2_NSS : GPIO_Point renames PB12;
Shield_SPI : STM32.SPI.SPI_Port renames STM32.Device.SPI_2;
Shield_SPI_Points : constant STM32.GPIO.GPIO_Points :=
(Shield_MISO,
Shield_MOSI,
Shield_SCK);
------------
-- USART3 --
------------
USART_3_TX : GPIO_Point renames PB10;
USART_3_RX : GPIO_Point renames PB11;
Shield_USART : USART renames USART_3;
Shield_USART_Points : constant STM32.GPIO.GPIO_Points :=
(USART_3_TX,
USART_3_RX);
Shield_USART_AF : constant GPIO_Alternate_Function := GPIO_AF_USART3_7;
---------------
-- I2C1 Pins --
---------------
Sensor_I2C : I2C_Port renames I2C_1;
Sensor_I2C_SCL : GPIO_Point renames PB8;
Sensor_I2C_SDA : GPIO_Point renames PB9;
Sensor_I2C_AF : GPIO_Alternate_Function renames GPIO_AF_I2C1_4;
-----------------
-- Sensor DMA --
-----------------
Sensor_DMA : STM32.DMA.DMA_Controller renames DMA_2;
Sensor_DMA_Chan : STM32.DMA.DMA_Channel_Selector renames
STM32.DMA.Channel_1;
Sensor_DMA_Stream : STM32.DMA.DMA_Stream_Selector renames
STM32.DMA.Stream_1;
---------------
-- I2C2 Pins --
---------------
I2C2_SCL : GPIO_Point renames PB10;
I2C2_SDA : GPIO_Point renames PB11;
---------------
-- DCMI Pins --
---------------
DCMI_HSYNC : GPIO_Point renames PA4;
DCMI_PCLK : GPIO_Point renames PA6;
DCMI_RST : GPIO_Point renames PA10;
DCMI_PWDN : GPIO_Point renames PB5;
DCMI_VSYNC : GPIO_Point renames PB7;
DCMI_D0 : GPIO_Point renames PC6;
DCMI_D1 : GPIO_Point renames PC7;
DCMI_D2 : GPIO_Point renames PE0;
DCMI_D3 : GPIO_Point renames PE1;
DCMI_D4 : GPIO_Point renames PE4;
DCMI_D5 : GPIO_Point renames PB6;
DCMI_D6 : GPIO_Point renames PE5;
DCMI_D7 : GPIO_Point renames PE6;
FS_IN : GPIO_Point renames PD3;
SENSOR_CLK_IO : GPIO_Point renames PA8;
SENSOR_CLK_AF : GPIO_Alternate_Function renames GPIO_AF_TIM1_1;
SENSOR_CLK_TIM : STM32.Timers.Timer renames Timer_1;
SENSOR_CLK_CHAN : constant Timer_Channel := Channel_1;
SENSOR_CLK_FREQ : constant := 12_000_000;
------------------
-- USB OTG Pins --
------------------
OTG_FS_DM : GPIO_Point renames PA11;
OTG_FS_DP : GPIO_Point renames PA12;
---------------
-- SDIO Pins --
---------------
SDIO_CMD : GPIO_Point renames PD2;
SDIO_CLK : GPIO_Point renames PC12;
SDIO_D0 : GPIO_Point renames PC8;
SDIO_D1 : GPIO_Point renames PC9;
SDIO_D2 : GPIO_Point renames PC10;
SDIO_D3 : GPIO_Point renames PC11;
SD_CD : GPIO_Point renames PA15;
---------------
-- TIM4 Pins --
---------------
TIM4_CH1 : GPIO_Point renames PD12;
TIM4_CH2 : GPIO_Point renames PD13;
end OpenMV;
|
tools/asmx2/test/6502u.asm
|
retro16/blastsdk
| 10 |
98606
|
<reponame>retro16/blastsdk
PROCESSOR 6502U
BRK
ORA ($FF,X)
DB $02
SLO ($FF,X)
NOP3
ORA $FF
ASL $FF
SLO $FF
PHP
ORA #$FF
ASL A
DB $0B
DB $0C
ORA $FFFF
ASL $FFFF
SLO $FFFF
BPL *
ORA ($FF),Y
DB $12
SLO ($FF),Y
DB $14
ORA $FF,X
ASL $FF,X
SLO $FF,X
CLC
ORA $FFFF,Y
DB $1A
SLO $FFFF,Y
DB $1C
ORA $FFFF,X
ASL $FFFF,X
SLO $FFFF,X
JSR $FFFF
AND ($FF,X)
DB $22
RLA ($FF,X)
BIT $FF
AND $FF
ROL $FF
RLA $FF
PLP
AND #$FF
ROL A
ANC #$FF
BIT $FFFF
AND $FFFF
ROL $FFFF
RLA $FFFF
BMI *
AND ($FF),Y
DB $32
RLA ($FF),Y
DB $34
AND $FF,X
ROL $FF,X
RLA $FF,X
SEC
AND $FFFF,Y
DB $3A
RLA $FFFF,Y
DB $3C
AND $FFFF,X
ROL $FFFF,X
RLA $FFFF,X
RTI
EOR ($FF,X)
DB $42
SRE ($FF,X)
DB $44
EOR $FF
LSR $FF
SRE $FF
PHA
EOR #$FF
LSR A
ASR #$FF
JMP $FFFF
EOR $FFFF
LSR $FFFF
SRE $FFFF
BVC *
EOR ($FF),Y
DB $52
SRE ($FF),Y
DB $54
EOR $FF,X
LSR $FF,X
SRE $FF,X
CLI
EOR $FFFF,Y
DB $5A
SRE $FFFF,Y
DB $5C
EOR $FFFF,X
LSR $FFFF,X
SRE $FFFF,X
RTS
ADC ($FF,X)
DB $62
RRA ($FF,X)
DB $64
ADC $FF
ROR $FF
RRA $FF
PLA
ADC #$FF
ROR A
ARR #$FF
JMP ($FFFF)
ADC $FFFF
ROR $FFFF
RRA $FFFF
BVS *
ADC ($FF),Y
DB $72
RRA ($FF),Y
DB $74
ADC $FF,X
ROR $FF,X
RRA $FF,X
SEI
ADC $FFFF,Y
DB $7A
RRA $FFFF,Y
DB $7C
ADC $FFFF,X
ROR $FFFF,X
RRA $FFFF,X
DB $80
STA ($FF,X)
DB $82
SAX ($FF,X)
STY $FF
STA $FF
STX $FF
SAX $FF
DEY
DB $89
TXA
DB $8B
STY $FFFF
STA $FFFF
STX $FFFF
SAX $FFFF
BCC *
STA ($FF),Y
DB $92
DB $93
STY $FF,X
STA $FF,X
STX $FF,Y
SAX $FF,Y
TYA
STA $FFFF,Y
TXS
DB $9B
DB $9C
STA $FFFF,X
DB $9E
DB $9F
LDY #$FF
LDA ($FF,X)
LDX #$FF
LAX ($FF,X)
LDY $FF
LDA $FF
LDX $FF
LAX $FF
TAY
LDA #$FF
TAX
DB $AB
LDY $FFFF
LDA $FFFF
LDX $FFFF
LAX $FFFF
BCS *
LDA ($FF),Y
DB $B2
LAX ($FF),Y
LDY $FF,X
LDA $FF,X
LDX $FF,Y
LAX $FF,Y
CLV
LDA $FFFF,Y
TSX
DB $BB
LDY $FFFF,X
LDA $FFFF,X
LDX $FFFF,Y
LAX $FFFF,Y
CPY #$FF
CMP ($FF,X)
DB $C2
DCP ($FF,X)
CPY $FF
CMP $FF
DEC $FF
DCP $FF
INY
CMP #$FF
DEX
SBX #$FF
CPY $FFFF
CMP $FFFF
DEC $FFFF
DCP $FFFF
BNE *
CMP ($FF),Y
DB $D2
DCP ($FF),Y
DB $D4
CMP $FF,X
DEC $FF,X
DCP $FF,X
CLD
CMP $FFFF,Y
DB $DA
DCP $FFFF,Y
DB $DC
CMP $FFFF,X
DEC $FFFF,X
DCP $FFFF,X
CPX #$FF
SBC ($FF,X)
DB $E2
ISB ($FF,X)
CPX $FF
SBC $FF
INC $FF
ISB $FF
INX
SBC #$FF
NOP
DB $EB
CPX $FFFF
SBC $FFFF
INC $FFFF
ISB $FFFF
BEQ *
SBC ($FF),Y
DB $F2
ISB ($FF),Y
DB $F4
SBC $FF,X
INC $FF,X
ISB $FF,X
SED
SBC $FFFF,Y
DB $FA
ISB $FFFF,Y
DB $FC
SBC $FFFF,X
INC $FFFF,X
ISB $FFFF,X
END
|
projects/batfish/src/main/antlr4/org/batfish/grammar/f5_bigip_structured/F5BigipStructuredParser.g4
|
loftwah/batfish
| 1 |
6090
|
parser grammar F5BigipStructuredParser;
/* This is only needed if parser grammar is spread across files */
import
F5BigipStructured_common, F5BigipStructured_ltm, F5BigipStructured_net, F5BigipStructured_sys;
options {
superClass = 'org.batfish.grammar.BatfishParser';
tokenVocab = F5BigipStructuredLexer;
}
// goal rule
f5_bigip_structured_configuration
:
NEWLINE?
(
statement
)+ imish_chunk? EOF
;
// other rules
imish_chunk
:
IMISH_CHUNK
;
statement
:
s_ltm
| s_net
| s_sys
| unrecognized
;
|
src/ada/src/common/uxas-common-configuration_manager.ads
|
VVCAS-Sean/OpenUxAS
| 88 |
2892
|
-- see OpenUxAS\src\Utilities\UxAS_ConfigurationManager.h
with DOM.Core;
with AVTAS.LMCP.Types; use AVTAS.LMCP.Types;
with UxAS.Comms;
with Dynamic_Strings; use Dynamic_Strings;
package UxAS.Common.Configuration_Manager is
type Manager (<>) is tagged limited private;
type Any_Manager is access all Manager'Class;
type Manager_Reference is access all Manager;
function Instance return not null Manager_Reference;
-- loadBaseXmlFile(const std::string& xmlFilePath = "./cfg/cfgbase.xml");
procedure Load_Base_XML_File
(This : not null access Manager;
XML_File_Path : String;
Result : out Boolean);
-- loadBaseXmlString(const std::string& xmlString);
procedure Load_Base_XML_String
(This : not null access Manager;
XML_Content : String;
Result : out Boolean);
-- unloads base configuration
procedure Unload_XML (This : not null access Manager);
function Get_Entity_Id (This : not null access Manager) return UInt32;
function Get_Entity_Type (This : not null access Manager) return String;
-- UxAS component-specific data directory name as a sub-directory of
-- the application root data directory. TODO - assure uniqueness.
-- getComponentDataDirectory(const std::string& directoryName)
function Component_Data_Directory (Directory_Name : String) return String;
-- true if using Zero MQ multi-part messaging; false if using Zero MQ
-- single-part messaging
Is_ZeroMq_Multipart_Message : constant Boolean := False;
-- UxAS application root work directory that hosts
-- sub-directories containing in-work and/or output files created by
-- components (e.g., services). For the case of reading data, components
-- should read data from a <i>data</i> directory - see getRootDataInDirectory
-- method.
function Root_Data_Work_Directory return String; -- "./datawork/";
Root_Work_Dir_Capacity : constant := 255; -- arbitrary
-- the static variable is just public in the C++ code so we provide a getter/setter
procedure Set_Root_Data_Work_Directory (Value : String) with
Pre => Value'Length <= Root_Work_Dir_Capacity;
-- UxAS application root data directory that hosts sub-directories
-- containing input data for components (e.g., services). Components
-- should only read data from these sub-directories . In-work and
-- output data should be written to a <i>work</i> directory - see
-- getRootDataWorkDirectory method.
function Root_DataIn_Directory return String is
("./datain/");
-- UxAS application root work directory that hosts sub-directories
-- containing in-work and/or output files created by components (e.g.,
-- services). For the case of reading data, components should read data
-- from a <i>data</i> directory - see getRootDataInDirectory method.
function Root_DataRef_Directory return String is
("./dataref/");
-- Returns service configurations for services to be enabled at entity
-- startup. The configurations are resolved from base XML.
procedure Get_Enabled_Services
(This : not null access Manager;
Services : out DOM.Core.Element;
Result : out Boolean);
-- Returns bridge configurations for bridges to be enabled at entity
-- startup. The configurations are resolved from base XML.
procedure Get_Enabled_Bridges
(This : not null access Manager;
Bridges : out DOM.Core.Element;
Result : out Boolean);
private
Root_Data_Work_Dir : Dynamic_String := Instance (Root_Work_Dir_Capacity, Content => "./datawork/");
use UxAS.Comms;
type Manager is tagged limited
record
Entity_Id : UInt32 := 0; -- default is 0 but also set indirectly via Load_XML
Entity_Type : Dynamic_String (Capacity => Entity_Type_Max_Length); -- default is "" but also set indirectly via Load_XML
Enabled_Bridges_XML_Doc_Built : Boolean := False;
Enabled_Bridges_XML_Doc : DOM.Core.Document;
Enabled_Services_XML_Doc_Built : Boolean := False;
Enabled_Services_XML_Doc : DOM.Core.Document;
Base_XML_Doc_Loaded : Boolean := False;
Base_XML_Doc : DOM.Core.Document;
end record;
The_Instance : Manager_Reference;
-- we use lazy allocation...
procedure Load_XML
(This : not null access Manager;
XML_Input : String;
XML_Is_File : Boolean;
Is_Base_XML : Boolean;
Result : out Boolean);
procedure Set_Entity_Values_From_XML_Node
(This : not null access Manager;
Root : DOM.Core.Document;
Result : out Boolean);
-- Populate the specified XML document Doc Doc with all elements in the
-- base XML doc that have names matching Node_Name
--
-- populateEnabledComponentXmlNode(pugi::xml_node& uxasNode, const std::string& nodeName)
procedure Populate_Enabled_Components
(This : not null access Manager;
Doc : in out DOM.Core.Document;
Node_Name : String);
-- implement the routine from the PUGI XML library
procedure Reset (This : in out DOM.Core.Document);
end UxAS.Common.Configuration_Manager;
|
oeis/103/A103632.asm
|
neoneye/loda-programs
| 11 |
169208
|
; A103632: Expansion of (1 - x + x^2)/(1 - x - x^4).
; Submitted by <NAME>
; 1,0,1,1,2,2,3,4,6,8,11,15,21,29,40,55,76,105,145,200,276,381,526,726,1002,1383,1909,2635,3637,5020,6929,9564,13201,18221,25150,34714,47915,66136,91286,126000,173915,240051,331337,457337,631252,871303,1202640,1659977,2291229,3162532,4365172,6025149,8316378,11478910,15844082,21869231,30185609,41664519,57508601,79377832,109563441,151227960,208736561,288114393,397677834,548905794,757642355,1045756748,1443434582,1992340376,2749982731,3795739479,5239174061,7231514437,9981497168,13777236647
lpb $0
sub $0,1
add $4,$1
add $1,$3
mov $5,$3
add $5,$2
mov $2,$3
add $5,1
mov $3,$5
sub $3,$1
sub $4,$3
add $2,$4
lpe
mov $0,$2
add $0,1
|
programs/oeis/171/A171663.asm
|
jmorken/loda
| 1 |
94504
|
; A171663: Expansion of (1 + 4*x - 6*x^2 - 16*x^3 + 20*x^4)/((1-x)*(1-2*x)*(1+2*x)*(1-2*x^2)).
; 1,5,5,13,25,41,113,145,481,545,1985,2113,8065,8321,32513,33025,130561,131585,523265,525313,2095105,2099201,8384513,8392705,33546241,33562625,134201345,134234113,536838145,536903681,2147418113,2147549185,8589803521,8590065665,34359476225,34360000513,137438429185,137439477761,549754765313,549756862465,2199021158401,2199025352705,8796088827905,8796097216513,35184363700225,35184380477441,140737471578113,140737505132545,562949919866881,562949986975745,2251799746576385,2251799880794113,9007199120523265,9007199388958721
mov $1,1
lpb $0
sub $0,2
mul $1,2
lpe
add $1,$0
bin $1,2
mul $1,4
add $1,1
|
programs/oeis/119/A119522.asm
|
karttu/loda
| 0 |
2794
|
; A119522: Determinant of n X n matrix of first n^2 nonzero terms of triangular numbers.
; 1,-8,-27,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mov $1,1
mov $2,$0
add $2,1
mov $3,$0
mul $3,5
sub $1,$3
mul $1,2
lpb $0,1
mov $0,2
trn $1,$2
lpe
mul $1,$2
div $1,2
|
Applications/System-Events/frontmost.applescript
|
looking-for-a-job/applescript-examples
| 1 |
205
|
<filename>Applications/System-Events/frontmost.applescript
#!/usr/bin/osascript
delay 2
tell application "System Events"
properties of (first process whose frontmost is true)
end tell
|
oeis/346/A346558.asm
|
neoneye/loda-programs
| 11 |
3543
|
<reponame>neoneye/loda-programs<filename>oeis/346/A346558.asm
; A346558: a(n) = Sum_{d|n} phi(n/d) * (2^d - 1).
; Submitted by <NAME>
; 1,4,9,20,35,78,133,280,531,1070,2057,4212,8203,16534,32865,65840,131087,262818,524305,1049740,2097459,4196390,8388629,16782024,33554575,67117102,134218809,268452212,536870939,1073777010,2147483677,4295033440,8589938775,17180000318,34359739085
add $0,1
mov $2,$0
lpb $0
sub $0,1
mov $3,2
mov $4,$2
gcd $4,$0
pow $3,$4
add $1,$3
lpe
sub $1,$4
mov $0,$1
|
src/test/ref/cpu-65ce02.asm
|
jbrandwood/kickc
| 2 |
28847
|
// Test the 65CE02 CPU
// A program that uses 65CE02 instructions
.cpu _65ce02
// Commodore 64 PRG executable file
.file [name="cpu-65ce02.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.label SCREEN = $400
.segment Code
main: {
// signed char a = SCREEN[0]
lda SCREEN
// a = -a
neg
// SCREEN[1] = a
sta SCREEN+1
// a/4
asr
asr
// SCREEN[2] = a/4
// Becomes a NEG
sta SCREEN+2
// }
rts
}
|
libsrc/_DEVELOPMENT/adt/ba_stack/c/sdcc_iy/ba_stack_top_fastcall.asm
|
meesokim/z88dk
| 0 |
104316
|
<reponame>meesokim/z88dk
; int ba_stack_top_fastcall(ba_stack_t *s)
SECTION code_adt_ba_stack
PUBLIC _ba_stack_top_fastcall
defc _ba_stack_top_fastcall = asm_ba_stack_top
INCLUDE "adt/ba_stack/z80/asm_ba_stack_top.asm"
|
src/main/g8/src/main/antlr4/$grammar$Lexer.g4
|
navicore/antlr4.g8
| 0 |
3395
|
<reponame>navicore/antlr4.g8
lexer grammar $grammar$Lexer;
WS: [ \t\n]+ -> skip ;
NUMBER: ('0' .. '9') + ('.' ('0' .. '9') +)?;
ADD: '+';
SUB: '-';
MUL: '*';
DIV: '/';
|
targets/yul-ast-0.7.3/Yul.g4
|
chyanju/Ven
| 3 |
2861
|
// Define a grammar called Hello
grammar Yul;
start : yul_object ;
yul_object : KW_OBJECT yul_string_literal '{' ( yul_code | yul_code yul_object ) '}' ;
yul_code : KW_CODE yul_block ;
yul_if : KW_IF yul_expression yul_block ;
yul_switch : KW_SWITCH yul_expression ( yul_case+ yul_default? | yul_default ) ;
yul_case : KW_CASE yul_literal yul_block ; // note: case only accepts literals, not expressions
yul_default : KW_DEFAULT yul_block ;
yul_for_loop : KW_FOR yul_block yul_expression yul_block yul_block ;
yul_break : KW_BREAK ;
yul_continue : KW_CONTINUE ;
yul_leave : KW_LEAVE ;
yul_function_definition : KW_FUNCTION yul_identifier '(' yul_function_arg_list? ')' ( '->' yul_function_ret_list )? yul_block ;
yul_variable_declaration : KW_LET yul_typed_identifier_list ( ':=' yul_expression )? ;
// this two tell apart different matches in yul_function_definition
yul_function_arg_list : yul_typed_identifier_list ;
yul_function_ret_list : yul_typed_identifier_list ;
yul_typed_identifier_list : yul_identifier ( ':' yul_type_name )? ( ',' yul_identifier ( ':' yul_type_name )? )* ;
yul_identifier_list : yul_identifier ( ',' yul_identifier )* ;
yul_block : '{' yul_statement* '}' ;
yul_statement : yul_block
| yul_expression
| yul_function_definition
| yul_variable_declaration
| yul_assignment
| yul_if
| yul_expression
| yul_switch
| yul_for_loop
| yul_break
| yul_continue
| yul_leave ;
yul_assignment : yul_identifier_list ':=' yul_expression ;
yul_expression : yul_function_call
| yul_identifier
| yul_literal ;
yul_function_call : yul_identifier '(' ( yul_expression ( ',' yul_expression )* )? ')' ;
yul_literal : ( yul_number_literal | yul_string_literal | yul_true_literal | yul_false_literal ) ( ':' yul_type_name )? ;
yul_number_literal : yul_hex_number
| yul_dec_number ;
yul_true_literal : TRUE_LITERAL ;
yul_false_literal : FALSE_LITERAL ;
yul_hex_number : HEX_NUMBER ;
yul_dec_number : DEC_NUMBER ;
yul_type_name : ID_LITERAL ;
yul_identifier : ID_LITERAL ;
KW_OBJECT : 'object' ;
KW_CODE : 'code' ;
KW_IF : 'if' ;
KW_SWITCH : 'switch' ;
KW_CASE : 'case' ;
KW_DEFAULT : 'default' ;
KW_FOR : 'for' ;
KW_BREAK : 'break' ;
KW_CONTINUE : 'continue' ;
KW_LEAVE : 'leave' ;
KW_FUNCTION : 'function' ;
KW_LET : 'let' ;
yul_string_literal : STRING_LITERAL ;
STRING_LITERAL : StringLiteralFragment+;
StringLiteralFragment : '"' DoubleQuotedStringCharacter* '"'
| '\'' SingleQuotedStringCharacter* '\'' ;
fragment DoubleQuotedStringCharacter : ~["\r\n\\] | ('\\' .) ;
fragment SingleQuotedStringCharacter : ~['\r\n\\] | ('\\' .) ;
ID_LITERAL : IdentifierStart IdentifierPart* ;
fragment IdentifierStart : [a-zA-Z$_] ;
fragment IdentifierPart : [a-zA-Z0-9$_] ;
TRUE_LITERAL : 'true';
FALSE_LITERAL : 'false';
DEC_NUMBER : DecimalDigits DecimalDigits* ;
fragment DecimalDigits : [0-9] [0-9]* ;
HEX_NUMBER : '0x' HexDigits ;
fragment HexDigits : HexCharacter HexCharacter* ;
fragment HexCharacter : [0-9A-Fa-f] ;
COMMENT
: '/*' .*? '*/' -> channel(HIDDEN) ;
LINE_COMMENT
: '//' ~[\r\n]* -> channel(HIDDEN) ;
WS
: [ \t\r\n\u000C]+ -> skip ;
|
src/Categories/Object/Initial.agda
|
MirceaS/agda-categories
| 0 |
13835
|
<reponame>MirceaS/agda-categories<gh_stars>0
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Object.Initial {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Relation.Binary.PropositionalEquality as ≡ using (_≡_)
open Category C
open import Categories.Morphism C using (Epi; _≅_)
open import Categories.Morphism.IsoEquiv C using (_≃_; ⌞_⌟)
open import Categories.Morphism.Reasoning C
open HomReasoning
record Initial : Set (o ⊔ ℓ ⊔ e) where
field
⊥ : Obj
! : {A : Obj} → (⊥ ⇒ A)
!-unique : ∀ {A} → (f : ⊥ ⇒ A) → ! ≈ f
!-unique₂ : ∀ {A} → (f g : ⊥ ⇒ A) → f ≈ g
!-unique₂ f g = begin
f ≈˘⟨ !-unique f ⟩
! ≈⟨ !-unique g ⟩
g ∎
where open HomReasoning
⊥-id : (f : ⊥ ⇒ ⊥) → f ≈ id
⊥-id f = !-unique₂ f id
open Initial
to-⊥-is-Epi : ∀ {A : Obj} {i : Initial} → (f : A ⇒ ⊥ i) → Epi f
to-⊥-is-Epi {_} {i} _ = λ g h _ → !-unique₂ i g h
up-to-iso : (i₁ i₂ : Initial) → ⊥ i₁ ≅ ⊥ i₂
up-to-iso i₁ i₂ = record
{ from = ! i₁
; to = ! i₂
; iso = record { isoˡ = ⊥-id i₁ _; isoʳ = ⊥-id i₂ _ }
}
transport-by-iso : (i : Initial) → ∀ {X} → ⊥ i ≅ X → Initial
transport-by-iso i {X} i≅X = record
{ ⊥ = X
; ! = ! i ∘ to
; !-unique = λ h → begin
! i ∘ to ≈⟨ !-unique i (h ∘ from) ⟩∘⟨refl ⟩
(h ∘ from) ∘ to ≈⟨ cancelʳ isoʳ ⟩
h ∎
}
where open _≅_ i≅X
up-to-iso-unique : ∀ i i′ → (iso : ⊥ i ≅ ⊥ i′) → up-to-iso i i′ ≃ iso
up-to-iso-unique i i′ iso = ⌞ !-unique i _ ⌟
up-to-iso-invˡ : ∀ {t X} {i : ⊥ t ≅ X} → up-to-iso t (transport-by-iso t i) ≃ i
up-to-iso-invˡ {t} {i = i} = up-to-iso-unique t (transport-by-iso t i) i
up-to-iso-invʳ : ∀ {t t′} → ⊥ (transport-by-iso t (up-to-iso t t′)) ≡ ⊥ t′
up-to-iso-invʳ {t} {t′} = ≡.refl
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/controlled7.ads
|
best08618/asylo
| 7 |
6426
|
<reponame>best08618/asylo
with System.Storage_Elements; use System.Storage_Elements;
package Controlled7 is
procedure Proc (Offset : Storage_Offset);
end Controlled7;
|
gol.adb
|
tsoding/ada-gol
| 19 |
11046
|
with Ada.Text_IO;
with Ada.Characters.Latin_1; -- There's also 'with ASCII;', but that's obsolete
with Ada.Strings.Fixed;
procedure Gol is
use Ada.Text_IO;
Width : constant Positive := 5;
Height : constant Positive := 5;
type Cell is (Dead, Alive);
type Rows is mod Height;
type Cols is mod Width;
type Board is array (Rows, Cols) of Cell;
type Neighbors is range 0 .. 8;
procedure Render_Board(B: Board) is
begin
for Row in Rows loop
for Col in Cols loop
case B(Row, Col) is
when Alive => Put('#');
when Dead => Put('.');
end case;
end loop;
New_Line;
end loop;
end;
function Count_Neighbors(B: Board; Row0: Rows; Col0: Cols) return Neighbors is
begin
return Result : Neighbors := 0 do
for Delta_Row in Rows range 0 .. 2 loop
for Delta_Col in Cols range 0 .. 2 loop
if Delta_Row /= 1 or Delta_Col /= 1 then
declare
Row : constant Rows := Row0 + Delta_Row - 1;
Col : constant Cols := Col0 + Delta_Col - 1;
begin
if B(Row, Col) = Alive then
Result := Result + 1;
end if;
end;
end if;
end loop;
end loop;
end return;
end;
function Next(Current : Board) return Board is
begin
return Result : Board do
for Row in Rows loop
for Col in Cols loop
declare
N : constant Neighbors := Count_Neighbors(Current, Row, Col);
begin
case Current(Row, Col) is
when Dead =>
Result(Row, Col) := (if N = 3 then Alive else Dead);
when Alive =>
Result(Row, Col) := (if N in 2 .. 3 then Alive else Dead);
end case;
end;
end loop;
end loop;
end return;
end;
Current : Board := (
( Dead, Alive, Dead, others => Dead),
( Dead, Dead, Alive, others => Dead),
(Alive, Alive, Alive, others => Dead),
others => (others => Dead)
);
begin
--for I in 1 .. 2
loop
Render_Board(Current);
Current := Next(Current);
delay Duration(0.25);
Put(Ada.Characters.Latin_1.ESC & "[" & Ada.Strings.Fixed.Trim(Height'Image, Ada.Strings.Left) & "A");
Put(Ada.Characters.Latin_1.ESC & "[" & Ada.Strings.Fixed.Trim(Width'Image, Ada.Strings.Left) & "D");
end loop;
end;
|
src/main/antlr/org/embulk/filter/calc/Calculator.g4
|
hiroyuki-sato/embulk-filter-calc
| 0 |
5238
|
<reponame>hiroyuki-sato/embulk-filter-calc
grammar Calculator;
@header {
package org.embulk.filter.calc;
}
expr: <assoc=right> expr '^' expr # Power
| expr op=('*'|'/'|'%') expr # MulDivMod
| expr op=('+'|'-') expr # AddSub
| NUM # Number
| ID # Identifier
| func # MathFunc
| '(' expr ')' # Paren
;
func: COS '(' expr ')' # FuncCos
| TAN '(' expr ')' # FuncTan
| SIN '(' expr ')' # FuncSin
// | ACOS
// | ATAN
// | ASIN
// | LOG
// | LN
// | ROUDUP
// | ROUDDOWN
;
ADD: '+';
SUB: '-';
MUL: '*';
DIV: '/';
MOD: '%';
COS: 'cos';
SIN: 'sin';
TAN: 'tan';
// ACOS: 'acos';
// ASIN: 'asin';
// ATAN: 'atan';
// LN: 'ln';
// LOG: 'log';
COMMA: ',';
ROUNDUP: 'roundup';
ROUNDDOWN: 'roundown';
NUM: '-'?[0-9]+('.' [0-9]+)?;
ID: [a-zA-Z][0-9A-Za-z_-]*;
WS: [ \t\r\n]+ -> skip;
|
oeis/072/A072342.asm
|
neoneye/loda-programs
| 11 |
101150
|
; A072342: a(n) = the least natural number k such that k*reverse(n) + 1 is prime.
; 1,1,2,1,2,1,4,2,2,1,2,2,10,2,2,6,8,2,6,1,1,1,3,1,1,5,1,1,3,2,4,2,2,4,2,2,4,2,4,1,2,3,3,2,2,3,2,4,3,2,2,4,2,4,6,2,2,12,2,1,1,2,1,1,2,1,3,2,1,4,6,4,4,6,4,4,6,4,4,2,1,1,5,2,1,2,1,1,2,2,10,2,2,4,12,2,4,2,2,1
mov $1,2
add $1,$0
mov $0,$1
sub $0,1
seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences).
sub $0,1
seq $0,34693 ; Smallest k such that k*n+1 is prime.
|
oeis/021/A021877.asm
|
neoneye/loda-programs
| 11 |
17919
|
; A021877: Decimal expansion of 1/873.
; Submitted by <NAME>iga
; 0,0,1,1,4,5,4,7,5,3,7,2,2,7,9,4,9,5,9,9,0,8,3,6,1,9,7,0,2,1,7,6,4,0,3,2,0,7,3,3,1,0,4,2,3,8,2,5,8,8,7,7,4,3,4,1,3,5,1,6,6,0,9,3,9,2,8,9,8,0,5,2,6,9,1,8,6,7,1,2,4,8,5,6,8,1,5,5,7,8,4,6,5,0,6,3,0,0,1
seq $0,42 ; Unary representation of natural numbers.
div $0,97
mod $0,10
|
mc-sema/validator/x86/tests/CVTTSD2SIrr.asm
|
randolphwong/mcsema
| 2 |
103272
|
BITS 32
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; put 2 into ecx for future load into xmm0
mov ecx, 2
cvtsi2sd xmm0, ecx
;TEST_BEGIN_RECORDING
cvttsd2si ecx, xmm0
;TEST_END_RECORDING
xor ecx, ecx
cvtsi2sd xmm0, ecx
|
oeis/128/A128386.asm
|
neoneye/loda-programs
| 11 |
22549
|
; A128386: Expansion of c(3x^2)/(1-x*c(3x^2)), c(x) the g.f. of A000108.
; Submitted by <NAME>(s4)
; 1,1,4,7,28,58,232,523,2092,4966,19864,48838,195352,492724,1970896,5068915,20275660,52955950,211823800,560198962,2240795848,5987822380,23951289520,64563867454,258255469816,701383563388,2805534253552
mov $2,1
mov $3,$0
mov $4,1
mov $5,1
lpb $3
mul $2,$3
div $2,$4
sub $3,1
max $3,1
add $4,1
trn $5,$2
mul $5,3
add $5,$2
lpe
mov $0,$5
mul $0,3
sub $0,2
|
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/inline13_pkg.ads
|
best08618/asylo
| 7 |
18181
|
<reponame>best08618/asylo<gh_stars>1-10
package Inline13_Pkg is
subtype Padded_T is String (1..8);
type T is new Padded_T;
function Padded (Value : T) return Padded_T;
pragma Inline_Always (Padded);
end Inline13_Pkg;
|
programs/oeis/129/A129308.asm
|
neoneye/loda
| 22 |
246842
|
<reponame>neoneye/loda<gh_stars>10-100
; A129308: a(n) is the number of positive integers k such that k*(k+1) divides n.
; 0,1,0,1,0,2,0,1,0,1,0,3,0,1,0,1,0,2,0,2,0,1,0,3,0,1,0,1,0,3,0,1,0,1,0,3,0,1,0,2,0,3,0,1,0,1,0,3,0,1,0,1,0,2,0,2,0,1,0,5,0,1,0,1,0,2,0,1,0,1,0,4,0,1,0,1,0,2,0,2,0,1,0,4,0,1,0,1,0,4,0,1,0,1,0,3,0,1,0,2
mov $4,2
mov $6,$0
lpb $4
mov $0,$6
mov $3,0
sub $4,1
add $0,$4
sub $0,1
mov $5,0
lpb $0
mov $7,$0
sub $0,1
mov $8,$3
cmp $8,0
add $3,$8
div $7,$3
add $3,1
add $7,1
div $7,$3
add $5,$7
lpe
mov $2,$4
lpb $2
mov $1,$5
mov $2,0
lpe
lpe
sub $1,$5
mov $0,$1
|
src/ada/src/uxas-comms-data-lmcp_messages.ads
|
pat-rogers/OpenUxAS
| 0 |
24085
|
<reponame>pat-rogers/OpenUxAS
-- see OpenUxAS\src\Communications\LmcpMessage.h
with AVTAS.LMCP.Object;
package UxAS.Comms.Data.LMCP_Messages is
type LMCP_Message is tagged limited record
-- these are public member data in the C++ version so they are visible
-- in this base class (even if extensions are private, as they should be)
-- Message attributes associated with the payload
-- std::unique_ptr<MessageAttributes> m_attributes;
Attributes : Message_Attributes_Ref;
-- Data payload to be transported
-- std::shared_ptr<avtas::lmcp::Object> m_object;
Payload : AVTAS.LMCP.Object.Object_Any;
end record;
type LMCP_Message_Ref is access all LMCP_Message;
type Any_LMCP_Message is access all LMCP_Message'Class;
-- Ada: since the components are public we don't define a constructor function
end UxAS.Comms.Data.LMCP_Messages;
|
src/toml-generic_parse.ads
|
pmderodat/ada-toml
| 19 |
11640
|
<filename>src/toml-generic_parse.ads
generic
type Input_Stream (<>) is limited private;
-- Stream of bytes
with procedure Get (Stream : in out Input_Stream;
EOF : out Boolean;
Byte : out Character) is <>;
-- Try to read a byte from Stream. If the end of Stream was reached before
-- we could read such a byte, just set EOF to True. Otherwise, set it to
-- False and put the read character to Byte.
Tab_Stop : Positive := 8;
-- Maximal number of columns that tab characters (0x09) skip
function TOML.Generic_Parse
(Stream : in out Input_Stream) return TOML.Read_Result
with Preelaborate;
-- Read a TOML document from Stream and return the corresponding value
|
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48_notsx.log_21829_1928.asm
|
ljhsiun2/medusa
| 9 |
87655
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x5ec5, %r9
xor %r8, %r8
movups (%r9), %xmm6
vpextrq $0, %xmm6, %rcx
nop
cmp %r8, %r8
lea addresses_UC_ht+0x19201, %rsi
nop
nop
nop
and $26852, %rdi
mov (%rsi), %r9d
nop
nop
nop
nop
and $50597, %rcx
lea addresses_UC_ht+0x15a01, %r10
nop
xor %r11, %r11
movw $0x6162, (%r10)
nop
nop
nop
nop
nop
inc %r9
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WT+0x14201, %rcx
nop
nop
nop
lfence
mov $0x5152535455565758, %r14
movq %r14, %xmm7
movups %xmm7, (%rcx)
cmp %rbp, %rbp
// REPMOV
lea addresses_UC+0x1b152, %rsi
lea addresses_UC+0x14135, %rdi
nop
nop
nop
nop
add $30032, %r8
mov $26, %rcx
rep movsl
nop
nop
nop
nop
cmp %r8, %r8
// REPMOV
lea addresses_A+0x8a01, %rsi
lea addresses_WT+0x12521, %rdi
nop
nop
sub %r11, %r11
mov $54, %rcx
rep movsw
nop
add %rbp, %rbp
// Store
mov $0x985, %rsi
nop
xor %rcx, %rcx
mov $0x5152535455565758, %r8
movq %r8, (%rsi)
nop
nop
nop
nop
nop
add $13708, %rsi
// Faulty Load
mov $0x7017ba0000000201, %rbp
nop
nop
add %rdi, %rdi
mov (%rbp), %ecx
lea oracles, %r14
and $0xff, %rcx
shlq $12, %rcx
mov (%r14,%rcx,1), %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_NC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_UC'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_UC'}}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_P', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_NC', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 10}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 11}, '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
*/
|
oeis/280/A280166.asm
|
neoneye/loda-programs
| 11 |
12946
|
<gh_stars>10-100
; A280166: a(2*n) = 4*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1.
; Submitted by <NAME>
; 1,-1,4,-3,8,-5,12,-7,16,-9,20,-11,24,-13,28,-15,32,-17,36,-19,40,-21,44,-23,48,-25,52,-27,56,-29,60,-31,64,-33,68,-35,72,-37,76,-39,80,-41,84,-43,88,-45,92,-47,96,-49,100,-51,104,-53,108,-55,112,-57,116,-59,120,-61,124,-63,128,-65,132,-67,136,-69,140,-71,144,-73,148,-75,152,-77,156,-79,160,-81,164,-83,168,-85,172,-87,176,-89,180,-91,184,-93,188,-95,192,-97,196,-99
mov $1,$0
add $0,2
mul $1,$0
dif $0,2
mov $2,-2
bin $2,$1
div $2,$0
mov $0,$2
|
testsuite/ubivm/expected/element_7.asm
|
alexgarzao/UOP
| 0 |
80727
|
<filename>testsuite/ubivm/expected/element_7.asm
Entity start
No options
Constants
0 S start
1 S e
2 S elemento
3 I 1
4 S um
5 I 2
6 S dois
7 S x
End
Valid context (always)
No properties
Def start
No parameters
Local variables
0 element e
End
No results
newelem 2 --> [elemento]
stvar 0 --> [e]
ldconst 3 --> [1]
ldconst 4 --> [um]
ldconst 5 --> [2]
ldconst 6 --> [dois]
ldvar 0 --> [e]
mcall 7 --> [x]
stop
End
End
Entity elemento
No options
Constants
0 S elemento
1 S x
2 S number1
3 S msg1
4 S number2
5 S msg2
6 S number1=
7 S msg1=
8 I 4
9 S io.writeln
10 S number2=
11 S msg2=
End
Valid context (always)
No properties
Def x
Parameters
0 int number1
1 string msg1
2 int number2
3 string msg2
End
No local variables
No results
ldconst 6 --> [number1=]
ldpar 0 --> [number1]
ldconst 7 --> [ msg1=]
ldpar 1 --> [msg1]
ldconst 8 --> [4]
lcall 9 --> [io.writeln]
ldconst 10 --> [number2=]
ldpar 2 --> [number2]
ldconst 11 --> [ msg2=]
ldpar 3 --> [msg2]
ldconst 8 --> [4]
lcall 9 --> [io.writeln]
ret
End
End
|
programs/oeis/156/A156866.asm
|
karttu/loda
| 1 |
102728
|
<reponame>karttu/loda<filename>programs/oeis/156/A156866.asm
; A156866: 729000n - 116820.
; 612180,1341180,2070180,2799180,3528180,4257180,4986180,5715180,6444180,7173180,7902180,8631180,9360180,10089180,10818180,11547180,12276180,13005180,13734180,14463180,15192180,15921180,16650180,17379180,18108180,18837180,19566180,20295180,21024180,21753180,22482180,23211180,23940180,24669180,25398180,26127180,26856180,27585180,28314180,29043180,29772180,30501180,31230180,31959180,32688180,33417180,34146180,34875180,35604180,36333180,37062180,37791180,38520180,39249180,39978180,40707180,41436180,42165180,42894180,43623180,44352180,45081180,45810180,46539180,47268180,47997180,48726180,49455180,50184180,50913180,51642180,52371180,53100180,53829180,54558180,55287180,56016180,56745180,57474180,58203180,58932180,59661180,60390180,61119180,61848180,62577180,63306180,64035180,64764180,65493180,66222180,66951180,67680180,68409180,69138180,69867180,70596180,71325180,72054180,72783180,73512180,74241180,74970180,75699180,76428180,77157180,77886180,78615180,79344180,80073180,80802180,81531180,82260180,82989180,83718180,84447180,85176180,85905180,86634180,87363180,88092180,88821180,89550180,90279180,91008180,91737180,92466180,93195180,93924180,94653180,95382180,96111180,96840180,97569180,98298180,99027180,99756180,100485180,101214180,101943180,102672180,103401180,104130180,104859180,105588180,106317180,107046180,107775180,108504180,109233180,109962180,110691180,111420180,112149180,112878180,113607180,114336180,115065180,115794180,116523180,117252180,117981180,118710180,119439180,120168180,120897180,121626180,122355180,123084180,123813180,124542180,125271180,126000180,126729180,127458180,128187180,128916180,129645180,130374180,131103180,131832180,132561180,133290180,134019180,134748180,135477180,136206180,136935180,137664180,138393180,139122180,139851180,140580180,141309180,142038180,142767180,143496180,144225180,144954180,145683180,146412180,147141180,147870180,148599180,149328180,150057180,150786180,151515180,152244180,152973180,153702180,154431180,155160180,155889180,156618180,157347180,158076180,158805180,159534180,160263180,160992180,161721180,162450180,163179180,163908180,164637180,165366180,166095180,166824180,167553180,168282180,169011180,169740180,170469180,171198180,171927180,172656180,173385180,174114180,174843180,175572180,176301180,177030180,177759180,178488180,179217180,179946180,180675180,181404180,182133180
mov $1,$0
mul $1,729000
add $1,612180
|
oeis/087/A087603.asm
|
neoneye/loda-programs
| 11 |
14501
|
<reponame>neoneye/loda-programs<gh_stars>10-100
; A087603: a(n) = (1/8)*Sum_{k=0..n} binomial(n,k)*Fibonacci(k)*8^k.
; Submitted by <NAME>
; 1,10,155,2100,29525,410750,5731375,79905000,1114275625,15537531250,216660471875,3021168937500,42128015328125,587444444843750,8191485291484375,114224297381250000,1592774664844140625,22210083004410156250,309703436610529296875,4318588931347851562500,60219578327057626953125,839718174494708105468750,11709258552935250537109375,163277085126561451171875000,2276780071677053291259765625,31748040398731412727050781250,442703307929552058289794921875,6173175301225748282885742187500
add $0,1
mov $3,1
lpb $0
sub $0,1
add $2,$3
mov $3,$1
mov $1,$2
mul $1,55
mul $2,5
add $3,$2
lpe
mov $0,$1
div $0,55
|
oeis/088/A088991.asm
|
neoneye/loda-programs
| 11 |
6237
|
<reponame>neoneye/loda-programs<filename>oeis/088/A088991.asm
; A088991: Derangement numbers d(n,4) where d(n,k) = k(n-1)(d(n-1,k) + d(n-2,k)), with d(0,k) = 1 and d(1,k) = 0.
; Submitted by <NAME>(s1)
; 1,0,4,32,432,7424,157120,3949056,114972928,3805503488,141137150976,5797706178560,261309106499584,12821127008550912,680286677982625792,38814037079505895424,2369659425449311272960,154142301601844298776576,10642813349855965483368448,777380806904962304314441728,59889795139366188504633573376,4853374075701692064715841208320,412714165150648893270519881662464,36745943451918851509500743612628992,3418596500770394037054956241474813952,331712874645342037302187870568394522624
mov $3,1
lpb $0
sub $0,1
mul $3,$0
mov $2,$3
add $3,$1
mov $1,$2
mul $3,4
lpe
mov $0,$3
|
programs/oeis/049/A049071.asm
|
neoneye/loda
| 22 |
103140
|
; A049071: Expansion of x*(3-2*x)/(1-x^2).
; 0,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3,-2,3
sub $0,1
mod $0,2
mov $1,5
gcd $1,$0
sub $1,2
sub $1,$0
mov $0,$1
|
libsrc/z80_crt0s/gbz80/sdcc/__modsuchar.asm
|
Frodevan/z88dk
| 640 |
26886
|
<reponame>Frodevan/z88dk
SECTION code_l_sdcc
PUBLIC __modsuchar
GLOBAL l_div8_signexte
__modsuchar:
ld hl,sp+3
ld e,(hl)
dec hl
ld c,(hl)
ld b,0
jp l_div8_signexte
|
bddisasm_test/special/only_32.asm
|
andreaswimmer/bddisasm
| 675 |
12467
|
bits 32
db 0x63, 0xC1 ; ARPL cx, ax
db 0x66, 0x63, 0xC1 ; ARPL cx, ax
db 0x06 ; PUSH es
db 0x07 ; POP es
db 0x0E ; PUSH cs
db 0x16 ; PUSH ss
db 0x17 ; POP ss
db 0x1E ; PUSH ds
db 0x1F ; POP ds
db 0x27 ; DAA
db 0x2F ; DAS
db 0x37 ; AAA
db 0x3F ; AAS
db 0xD4, 0x90 ; AAM
db 0xD5, 0x90 ; AAD
db 0x60 ; PUSHA
db 0x61 ; POPA
db 0x9A, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 ; CALL far
db 0xEA, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 ; JMP far
|
libsrc/_DEVELOPMENT/target/zx/driver/terminal/zx_01_output_char_64/zx_01_output_char_64_oterm_msg_printc.asm
|
meesokim/z88dk
| 0 |
8969
|
SECTION code_fcntl
PUBLIC zx_01_output_char_64_oterm_msg_printc
EXTERN asm_zx_cyx2saddr, asm_zx_saddr2aaddr
zx_01_output_char_64_oterm_msg_printc:
; enter : c = ascii code >= 32
; b = parameter (currently unused)
; l = absolute x coordinate
; h = absolute y coordinate
; can use: af, bc, de, hl
; djm 3/3/2000
; adapted aralbrec 12/2014
srl l ; column /= 2
ld b,$0f
jr c, __screen_address
ld b,$f0
__screen_address:
call asm_zx_cyx2saddr
ex de,hl ; de = screen address
ld l,c
ld h,0
add hl,hl
add hl,hl
add hl,hl ; hl = 8 * ascii code
ld a,b ; a = character set mask
ld c,(ix+21)
ld b,(ix+22) ; bc = font address
add hl,bc ; hl = & character definition
; print character pixels
; a = character set mask
; de = screen address
; hl = & character definition
ld b,8
ld c,a
ex de,hl
__print_loop:
ld a,c
cpl ; screen mask
and (hl)
ld (hl),a
ld a,(de)
and c
or (hl)
ld (hl),a
inc de
inc h
djnz __print_loop
dec h
; put colour
call asm_zx_saddr2aaddr ; hl = attribute address
ld c,(ix+23) ; c = foreground colour
ld b,(ix+24) ; b = foreground mask
ld a,b
cpl
and c
ld c,a
ld a,b
and (hl)
or c
ld (hl),a
ret
|
programs/oeis/224/A224710.asm
|
neoneye/loda
| 22 |
95070
|
; A224710: The number of unordered partitions {a,b} of 2n-1 such that a and b are composite.
; 0,0,0,0,0,0,1,1,1,2,2,2,3,3,4,5,5,5,6,7,7,8,8,8,9,9,10,11,11,12,13,13,13,14,15,15,16,16,16,17,18,18,19,19,20,21,21,22,23,24,24,25,25,25,26,26,26,27,27,28,29,30,31,32,33,33,34,34,35,36,36,36,37,38,39,40,40,40,41,42,42,43,44,44,45,45,46,47,47,48,49,49,49,50,51,52,53,53,53,54
trn $0,2
seq $0,210469 ; a(n) = n - primepi(2n).
|
Appl/FileMgrs/CommonDesktop/CShObj/cshobjMoveCopy.asm
|
steakknife/pcgeos
| 504 |
93391
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: cshobjMove.asm
AUTHOR: <NAME>
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/11/92 Initial version.
DESCRIPTION:
$Id: cshobjMoveCopy.asm,v 1.2 98/06/03 13:46:28 joon Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectMove
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: begin a MOVE operation for a FileQuickTransfer block
PASS: current directory = destination directory
*ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
cx:0 - FileQuickTransferHeader for block
RETURN: nothing
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectMove method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_MOVE
mov ax, MSG_SHELL_OBJECT_MOVE_ENTRY
mov dx, FOPT_MOVE
GOTO ShellObjectMoveCopyThrowAway
ShellObjectMove endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectCopy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: begin a COPY operation for a FileQuickTransfer block
PASS: current directory = destination directory
*ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
RETURN: nothing
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectCopy method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_COPY
mov ax, MSG_SHELL_OBJECT_COPY_ENTRY
mov dx, FOPT_COPY
GOTO ShellObjectMoveCopyThrowAway
ShellObjectCopy endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectThrowAway
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: begin a THROW_AWAY operation for a FileQuickTransfer block
PASS: current directory = destination directory
*ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
cx:0 = FileQuickTransferHeader of block
RETURN: nothing
DESTROYED: ax
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectThrowAway method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_THROW_AWAY
if _NEWDESKBA
;
; If we are a student, see if these are coming from a class folder or
; below. If so, bail out.
;
call ShellObjectCheckStudentTransferFromClassFolder
jnc okay
mov ax, ERROR_DELETE_IN_THIS_FOLDER_NOT_ALLOWED
call DesktopOKError
jmp done
okay:
endif ; if _NEWDESKBA
;
; If OCDL_SINGLE, then put up a menu at the beginning to
; verify deletion.
;
mov ax, MSG_FM_START_THROW_AWAY
call VerifyMenuDeleteThrowAway
jnc continue
BA<done: >
ret
continue:
mov ax, MSG_SHELL_OBJECT_THROW_AWAY_ENTRY
mov dx, FOPT_THROW_AWAY
FALL_THRU ShellObjectMoveCopyThrowAway
ShellObjectThrowAway endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectMoveCopyThrowAway
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Move or copy all the files in the quick transfer block
PASS: current directory = destination directory
*ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
cx = segment of quick transfer block
dx = FileOperationProgressType
RETURN: nothing
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/11/92 Initial version.
dlitwin 11/28/92 completed header, handled error of
CheckSrcDestConflict to avoid infinte loop
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectMoveCopyThrowAway proc far
entryMessage local word push ax
currentFOPT local word push dx
evilName local FileLongName ; directory name in source
; directory that may not be
; moved or copied, as it's
; an ancestor of the dest. - or -
; it's the same name as the
; ancestor of the dest and replacing
; it would cause the source to be
; deleted.
evilError local FileError ; error to return if evilName
; spotted
ForceRef evilName
ForceRef evilError
ForceRef entryMessage
.enter
mov ss:[howToHandleRemoteFiles], RFBT_NOT_DETERMINED
mov_tr ax, dx ; FileOperationProgressType
mov ds, cx
call SuspendFolders
call SetFileOpProgressBox
;
; Make sure not copying/moving to self or to a descendent. Sets
; our evilName variable for us.
;
call CheckSrcDestConflict
jnc loopSetup
cmp ss:[currentFOPT], FOPT_THROW_AWAY
jne errAndExit
cmp ax, ERROR_SAME_FILE
jne errAndExit
mov ax, ERROR_THROW_AWAY_FILE_IN_WB
errAndExit:
mov ds:[FQTH_numFiles], 0 ; general error, kill operation
call DesktopOKError
jc unsuspend
loopSetup:
;
; loop to copy/move files
;
mov cx, ds:[FQTH_numFiles] ; cx = number of files
jcxz unsuspend ; no files, done
mov si, size FileQuickTransferHeader ; ds:si = first file
fileLoop:
call SetUpMoveCopyParams ; set-up buffers and regs.
jc error
call SendMoveCopyThrowAwayMessage
jnc continue ; if no error, continue
error:
cmp ax, YESNO_CANCEL
je update
cmp ax, ERROR_PATH_TOO_LONG
jne gotError
mov ax, ERROR_COPY_DEST_PATH_TOO_LONG
if (not _FCAB and not _ZMGR)
tst ss:[usingWastebasket]
jz gotError
mov ax, ERROR_THROW_AWAY_DEST_PATH_TOO_LONG
endif ; if ((not _FCAB) and (not _ZMGR))
gotError:
call DesktopOKError
jnc continue ; ignored error, continue
mov ss:[recurErrorFlag], 0 ; clear recursive error
cmp ax, DESK_DB_DETACH ; detaching?
je unsuspend ; if so, quit, don't update
cmp ax, YESNO_NO ; skip this file, continue
je continue
cmp ax, ERROR_DIRECTORY_NOT_EMPTY ; directory not moved, continue
je continue
cmp ax, ERROR_COPY_MOVE_TO_CHILD ; item not moved/copied, cont.
je continue
cmp ax, ERROR_REPLACE_PARENT ; item not moved/copied, cont.
je continue
;;same file error will be annoyingly generated for each file in the select
;;group, so once we see it, stop the entire operation - brianc 9/26/90
;; cmp ax, ERROR_SAME_FILE ; item not moved/copied, cont.
;; je continue
;( cmp ax, YESNO_CANCEL ; abort operation )
;( je update )
cmp ax, ERROR_FILE_IN_USE ; file-in-use, continue
je continue
cmp ax, ERROR_ACCESS_DENIED ; access denied error, continue
je continue
cmp ax, ERROR_SHARING_VIOLATION
jne update ; else, update
;
; continue after reporting error (or after YESNO_NO)
;
continue:
mov ss:[recurErrorFlag], 0 ; clear recursive error
add si, size FileOperationInfoEntry ; move to next file
loop fileLoop ; go back to do it, if any
update:
;
; finish up
;
call UpdateMarkedWindows ; update folder windows
if GPC_FULL_WASTEBASKET
call UpdateWastebasket
endif
clc ; get rid of any stray carries
unsuspend:
call UnsuspendFolders
.leave
ret
ShellObjectMoveCopyThrowAway endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendMoveCopyThrowAwayMessage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send a message to a dummy object of the correct type
for this FileOperationInfoEntry to perform the
requested operation
CALLED BY: ShellObjectMoveCopyThrowAway
PASS: ds:si - FileOperationInfoEntry
ss:bp - inherited local vars
RETURN: carry SET to abort all subsequent operations
DESTROYED: ax,bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendMoveCopyThrowAwayMessage proc near
uses cx, ds, si, bp
.enter inherit ShellObjectMoveCopyThrowAway
movdw cxdx, dssi
mov si, ds:[si].FOIE_info
call UtilGetDummyFromTable
mov ax, ss:[entryMessage]
mov di, mask MF_CALL
call ObjMessage
.leave
ret
SendMoveCopyThrowAwayMessage endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectMoveEntry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Move this file, unless we can't
PASS: *ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
RETURN:
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectMoveEntry method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_MOVE_ENTRY
mov ax, ERROR_CANNOT_MOVE
mov bl, mask SOA_MOVABLE
mov bp, MOVE_UPDATE_STRATEGY
GOTO ShellObjectMoveCopyEntryCommon
ShellObjectMoveEntry endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectThrowAwayEntry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Throw away this entry, unless it should be DELETEd instead
PASS: *ds:si - ShellObjectClass object
ds:di - ShellObjectClass instance data
es - segment of ShellObjectClass
cx:0 - FileQuickTransferHeader
cx:dx - FileOperationInfoEntry
RETURN:
DESTROYED: nothing
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 3/17/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectThrowAwayEntry method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_THROW_AWAY_ENTRY
;
; Some objects always get DELETED rather than THROWN AWAY
;
test ds:[di].SOI_attrs, mask SOA_FORCE_DELETE
jz notDelete
call FilePushDir
push ds, dx
call ShellObjectChangeToFileQuickTransferDir
pop ds, dx
mov ax, MSG_SHELL_OBJECT_DELETE_ENTRY
call ObjCallInstanceNoLock
call FilePopDir
ret
notDelete:
mov ax, ERROR_CANNOT_MOVE
mov bl, mask SOA_MOVABLE
mov bp, MOVE_UPDATE_STRATEGY
GOTO ShellObjectMoveCopyEntryCommon
ShellObjectThrowAwayEntry endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectCopyEntry
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: Copy this file, unless we can't
PASS: *ds:si = ShellObjectClass object
ds:di = ShellObjectClass instance data
es = segment of ShellObjectClass
RETURN:
DESTROYED: ax,cx,dx,bp
REGISTER/STACK USAGE:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectCopyEntry method dynamic ShellObjectClass,
MSG_SHELL_OBJECT_COPY_ENTRY
mov ax, ERROR_CANNOT_COPY
mov bl, mask SOA_COPYABLE
mov bp, COPY_UPDATE_STRATEGY
FALL_THRU ShellObjectMoveCopyEntryCommon
ShellObjectCopyEntry endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ShellObjectMoveCopyEntryCommon
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the passed attribute is set, and, if not, don't
allow the operation to continue
CALLED BY: ShellObjectMoveEntry, ShellObjectCopyEntry,
PASS: ds:di - instance data
ax - DesktopError to put up if op not allowed
bl - mask to check
cx:dx - FileOperationInfoEntry
bp - update strategy
RETURN: carry SET to abort operation
ax - DesktopErrors
DESTROYED: ax,bx,cx,dx,si,di,bp,es,ds
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 11/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ShellObjectMoveCopyEntryCommon proc far
class ShellObjectClass
test ds:[di].SOI_attrs, bl
jz cannotDo
if GPC_CREATE_DESKTOP_LINK
;
; disallow move and copy of links, except throw away or
; move between desktop and wastebasket
;
pushdw dssi
movdw dssi, cxdx
test ds:[si].FOIE_attrs, mask FA_LINK
popdw dssi
jz afterLink ; not link, allow
;
; link debug, allow anything
;
cmp ss:[debugLinks], TRUE
je allowOp
;
; is link, never allow copy
;
test bl, mask SOA_COPYABLE
jnz cannotDo ; don't allow link copy
;
; is link, allow move to waste or desktop only
;
call UtilCheckCurIfDesktopDir
jc allowOp ; is desktop
call UtilCheckCurIfWasteDir ; is waste
jc allowOp
jmp short cannotDo
afterLink:
endif
if GPC_FOLDER_WINDOW_MENUS
;
; disallow move, copy and throw away of executable if not debug
;
if GPC_DEBUG_MODE
cmp ss:[debugMode], TRUE
je allowExec
endif
pushdw dssi
movdw dssi, cxdx
cmp ds:[si].FOIE_type, GFT_EXECUTABLE
je popCannotDo
;use WOT_EXECUTABLE to handle fake executables
cmp ds:[si].FOIE_info, WOT_EXECUTABLE
popCannotDo:
popdw dssi
je cannotDo
allowExec:
endif
;
; We CAN do it, so go ahead -- pass FOIE and update strategy
; to common routine.
;
allowOp::
mov_tr ax, bp ; update strategy
movdw dssi, cxdx
call CopyMoveFileToDir
done:
.leave
ret
;
; We can't do this particular file, but be sure to clear the
; carry, as we still might have other files to worry about.
;
cannotDo:
call DesktopOKError
clc
jmp done
ShellObjectMoveCopyEntryCommon endp
if GPC_CREATE_DESKTOP_LINK
UtilCheckCurIfWasteDir proc near
uses ds, si, bx, cx
.enter
segmov ds, ss, si
mov cx, PATH_BUFFER_SIZE
sub sp, cx
mov si, sp
call FileGetCurrentPath ; bx = disk handle
mov cx, bx
call UtilCheckIfWasteDir
lea sp, ds:[si]+PATH_BUFFER_SIZE ; preserves flags
.leave
ret
UtilCheckCurIfWasteDir endp
UtilCheckIfWasteDir proc far
uses ax, bx, dx, es, di
.enter
clr ax
push ax
segmov es, ss, di
mov di, sp
mov dx, SP_WASTE_BASKET
call FileComparePathsEvalLinks
cmc ; if error, not dir
jnc done
cmp al, PCT_EQUAL
stc ; assume equal
je done
clc ; else, not dir
done:
pop ax
.leave
ret
UtilCheckIfWasteDir endp
UtilCheckCurIfDesktopDir proc near
uses ds, si, bx, cx
.enter
segmov ds, ss, si
mov cx, PATH_BUFFER_SIZE
sub sp, cx
mov si, sp
call FileGetCurrentPath ; bx = disk handle
mov cx, bx
call UtilCheckIfDesktopDir
lea sp, ds:[si]+PATH_BUFFER_SIZE ; preserves flags
.leave
ret
UtilCheckCurIfDesktopDir endp
UtilCheckIfDesktopDir proc far
uses ax, bx, dx, es, di
.enter
segmov es, cs, di
mov di, offset desktopCheckPath
mov dx, STANDARD_PATH_OF_DESKTOP_VOLUME
call FileComparePathsEvalLinks
cmc ; if error, not dir
jnc done
cmp al, PCT_EQUAL
stc ; assume equal
je done
clc ; else, not dir
done:
.leave
ret
UtilCheckIfDesktopDir endp
desktopCheckPath char ND_DESKTOP_RELATIVE_PATH,0
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetUpMoveCopyParams
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Utility routine to compare path string segments to check
for illegal moves.
CALLED BY: ShellObjectMoveEntry, ShellObjectCopyEntry,
ShellObjectThrowAwayEntry
PASS: inherits local variables evilName and evilError from above
ds:si - FileOperationInfoEntry to check
RETURN: ax - update strategy
DESTROYED: ax, bx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
dlitwin 5/27/92 added this header (incomplete)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetUpMoveCopyParams proc near
.enter inherit ShellObjectMoveCopyThrowAway
call PrepFilenameForError ; copy name into global area
;
; See if the entry is the Evil Name for which we've decided to look.
;
segmov es, ss
lea di, ss:[evilName]
SBCS < push si >
CheckHack <offset FOIE_name eq 0>
call CompareString
SBCS < pop si >
mov ax, ss:[evilError] ; assume yes
stc ; => error
je done ; yes! death! death! death!
clc
done:
.leave
ret
SetUpMoveCopyParams endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckSrcDestConflict
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make sure the source directory contained in the passed
quick-transfer block doesn't conflict in any way with
the directory that is our current working directory.
CALLED BY: ProcessDragFilesCommon
PASS: ds:0 = FileQuickTransferHeader
current dir is destination
ss:bp = inherited frame from ProcessDragFilesCommon
RETURN: if error
carry set
ax - FileError or DesktopErrors
else
carry clear
evilName filled in
evilError set
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 2/11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LocalDefNLString dotPath <".",0>
CheckSrcDestConflict proc near
uses bx, cx, dx, es, di, si, ds
.enter inherit ShellObjectMoveCopyThrowAway
;
; if we have FOPT_THROW_AWAY and our source is already in the
; Wastebasket, warn the user and bail out.
;
cmp ss:[currentFOPT], FOPT_THROW_AWAY
jne continueChecking
lea si, ds:[FQTH_pathname]
mov dx, ds:[FQTH_diskHandle]
call IsThisInTheWastebasket
jnc continueChecking
mov ax, ERROR_THROW_AWAY_FILE_IN_WB
jmp done
continueChecking:
if FLOPPY_BASED_DOCUMENTS
;
; If both the source and the destination are on different
; disks in the same removable-media drive, then let's avoid all this
; link-checking crap. No one uses links, and this forces two
; extra disk swaps.
;
; Make sure source and dest disks are different
clr cx
call FileGetCurrentPath
cmp bx, ds:[FQTH_diskHandle]
je notRemovable
call DiskGetDrive
mov cl, al ; destination drive
;
; Make sure source and dest drives are the same (if they
; are, then this proves that the drive is removable-media --
; we don't actually have to check this explicitly)
;
mov bx, ds:[FQTH_diskHandle]
call DiskGetDrive
cmp al, cl
je done
notRemovable:
endif
;
; Allocate a buffer to hold both the source and the dest complete
; pathnames.
;
call ShellAlloc2PathBuffers
;
; Build the complete source name.
;
mov bx, ds:[FQTH_diskHandle]
clr dx ; no drive name needed
mov si, offset FQTH_pathname
mov di, offset PB2_path1
mov cx, size PB2_path1
call FileConstructActualPath
LONG jc freePaths
;
; Build the complete destination name. Destination is the
; CWD, so just call ConstructActual on "."
;
push bp ; save frame pointer
mov bp, bx ; save source diskhandle in bp
segmov ds, cs
mov si, offset dotPath
mov di, offset PB2_path2
mov cx, size PB2_path2
clr bx ; use current path
call FileConstructActualPath
pushf
sub bx, bp
popf
pop bp ; restore frame pointer
jc freePaths
;
; if the diskhandles are different, there is no conflict
;
tst bx
clc ; assume different disks
jnz freePaths
mov ss:[evilError], ERROR_COPY_MOVE_TO_CHILD
;
; If the dest is shorter than the src, it can't be a move to a child
; directory, but there can be an attempt to replace the parent, so
; switch the error code if so.
;
segmov ds, es
mov di, offset PB2_path2
SBCS < call LocalStringSize >
DBCS < call LocalStringLength >
mov_tr ax, cx ; dest length
mov di, offset PB2_path1
SBCS < call LocalStringSize >
DBCS < call LocalStringLength >
cmp ax, cx ; cmp dest, source
jge compare
mov ss:[evilError], ERROR_REPLACE_PARENT
mov cx, ax ; cx <- shorter length
compare:
;
; Not shorter, so compare the two to find the first mismatch
;
mov si, offset PB2_path1
mov di, offset PB2_path2
SBCS < repe cmpsb >
DBCS < repe cmpsw >
clc
jne freePaths ; no match in prefix, so can't cause
; problems
SBCS < mov al, ds:[si] >
DBCS < mov ax, ds:[si] >
LocalIsNull ax ; run out of src first?
jnz checkSeparator
mov si, di ; ds:si <- component to copy to
; evilName if found separator at end
; of other path
SBCS < mov al, ds:[si] >
DBCS < mov ax, ds:[si] >
LocalIsNull ax
jnz checkSeparator
;
; Both paths are at their null-terminator, which means they're the
; same, which means all files in the transfer block would be copied
; over themselves...
;
mov ax, ERROR_SAME_FILE
stc
jmp freePaths
checkSeparator:
;
; See if mismatched on a backslash in the longer path, which means
; the error code we stored in evilError should be returned if a source
; file matches the next component. If comparing with the root, the
; mismatch will have occured right AFTER the backslash, so check back
; one character for this.
;
LocalNextChar dssi ; assume equal, advanced past backslash
LocalCmpChar ax, C_BACKSLASH
clc
je related
LocalPrevChar dssi ; past it, so couteract the previous inc
SBCS < cmp {char} ds:[si-1], C_BACKSLASH >
DBCS < cmp {wchar}ds:[si-2], C_BACKSLASH >
clc
jne freePaths
;
; Paths are indeed related, so copy the next component from the longer
; path into the evilName buffer.
;
related:
segmov es, ss
lea di, ss:[evilName]
SBCS < mov cx, size evilName >
DBCS < mov cx, length evilName >
copyEvilNameLoop:
LocalGetChar ax, dssi
LocalPutChar esdi, ax
LocalCmpChar ax, C_BACKSLASH
je evilNameCopied
LocalIsNull ax
loopne copyEvilNameLoop
EC < ERROR_NE EVIL_NAME_TOO_LONG??? >
evilNameCopied:
SBCS < mov {char}es:[di-1], 0 >
DBCS < mov {wchar}es:[di-2], 0 >
segmov es, ds
clc
freePaths:
call ShellFreePathBuffer
done:
.leave
ret
CheckSrcDestConflict endp
|
src/tools/Dependency_Graph_Extractor/src/command_line.ads
|
selroc/Renaissance-Ada
| 1 |
9550
|
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
package Command_Line is
package SU renames Ada.Strings.Unbounded;
package Input_File_Vectors is new Ada.Containers.Vectors
(Index_Type => Positive,
Element_Type => SU.Unbounded_String,
"=" => SU."=");
function Parse_Command_Line
(Input_Files : out Input_File_Vectors.Vector;
Recurse_Projects : out Boolean;
Directory_Prefix : out SU.Unbounded_String;
Output_File : out SU.Unbounded_String)
return Boolean;
end Command_Line;
|
programs/oeis/301/A301729.asm
|
karttu/loda
| 1 |
179689
|
; A301729: a(0)=1; thereafter positive numbers that are congruent to {0, 1, 3, 5} mod 6.
; 1,1,3,5,6,7,9,11,12,13,15,17,18,19,21,23,24,25,27,29,30,31,33,35,36,37,39,41,42,43,45,47,48,49,51,53,54,55,57,59,60,61,63,65,66,67,69,71,72,73,75,77,78,79,81,83,84,85,87,89,90,91,93,95,96,97
mov $1,$0
add $0,11
mod $0,4
mul $1,6
add $1,$0
sub $1,4
div $1,4
add $1,1
|
Cubical/Algebra/Group/Instances/DiffInt.agda
|
guilhermehas/cubical
| 1 |
6362
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Instances.DiffInt where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Int.MoreInts.DiffInt renaming ( _+_ to _+ℤ_ ; _-_ to _-ℤ_)
open import Cubical.Algebra.Group.Base
open import Cubical.Algebra.Semigroup.Base
open import Cubical.Algebra.Monoid.Base
open import Cubical.HITs.SetQuotients
open GroupStr
ℤ-isGroup : IsGroup {G = ℤ} ([ 0 , 0 ]) (_+ℤ_) (-ℤ_)
IsSemigroup.is-set (IsMonoid.isSemigroup (IsGroup.isMonoid ℤ-isGroup)) = ℤ-isSet
IsSemigroup.assoc (IsMonoid.isSemigroup (IsGroup.isMonoid ℤ-isGroup)) = +ℤ-assoc
IsMonoid.identity (IsGroup.isMonoid ℤ-isGroup) = λ x → (zero-identityʳ 0 x , zero-identityˡ 0 x)
IsGroup.inverse ℤ-isGroup = λ x → (-ℤ-invʳ x , -ℤ-invˡ x)
ℤGroup : Group₀
fst ℤGroup = ℤ
1g (snd ℤGroup) = [ 0 , 0 ]
_·_ (snd ℤGroup) = _+ℤ_
inv (snd ℤGroup) = -ℤ_
isGroup (snd ℤGroup) = ℤ-isGroup
|
test/Succeed/Issue826-2.agda
|
shlevy/agda
| 3 |
10961
|
<reponame>shlevy/agda
module Issue826-2 where
open import Common.Coinduction
data _≡_ {A : Set} (x y : A) : Set where
data D : Set where
c : ∞ D → D
delay : D → ∞ D
delay x = ♯ x
data P : D → Set where
o : (x : ∞ D) → P (♭ x) → P (c x)
postulate
h : (x : D) → P x → P x
f : (x : D) → P (c (delay x)) → P x
f x (o .(delay x) p) = h x p
g : (x : D) → P x → P (c (delay x))
g x p = h (c (delay x)) (o (delay x) p)
postulate
bar : (x : ∞ D) (p : P (♭ x)) →
h (c x) (o x (h (♭ x) p)) ≡ o x p
foo : (x : D) (p : P (c (delay x))) → g x (f x p) ≡ p
foo x (o .(delay x) p) = goal
where
x′ = _
goal : _ ≡ o x′ p
goal = bar x′ p
-- The following error message seems to indicate that an expression is
-- not forced properly:
--
-- Bug.agda:30,26-30
-- ♭ (.Bug.♯-0 x) != x of type D
-- when checking that the expression goal has type
-- g x (f x (o (.Bug.♯-0 x) p)) ≡ o (.Bug.♯-0 x) p
--
-- Thus it seems as if this problem affects plain type-checking as
-- well.
|
oeis/075/A075887.asm
|
neoneye/loda-programs
| 11 |
29773
|
; A075887: a(n) = 1 + n + n[n/2] + n[n/2][n/3] +... + n[n/2][n/3]...[n/n], where [x]=ceiling(x).
; Submitted by <NAME>(w2)
; 1,2,5,16,45,171,421,1968,4553,19225,57261,226854,496309,3136420,6764563,24850336,84877201,380461599,805949533,4411165990,9288196621,48275465722,154143694937,527401107276,1100708161081,8151403215501,20346318135365,68262503251726,209752483864421,997547372672415,2063901628336981,14013249955956064,28930654230698017,133731878860085056,400827738656251789,1310665098526492626,3697682825891411821,28167374378525020470,57857327935100012807,187515439586369344360,552313808581346684041,3310219457714825530203
mov $3,$0
lpb $3
add $2,$0
sub $2,1
add $4,1
mov $5,$3
cmp $5,0
add $3,$5
div $2,$3
mul $2,$4
add $4,$2
cmp $2,1
sub $3,1
lpe
mov $0,$4
add $0,1
|
src/wi2wic-server.adb
|
stcarrez/wi2wic
| 2 |
1009
|
-----------------------------------------------------------------------
-- wi2wic -- Wiki 2 Wiki Converter server startup
-- Copyright (C) 2020 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.IO_Exceptions;
with AWS.Config.Set;
with Servlet.Server.Web;
with Util.Strings;
with Util.Log.Loggers;
with Util.Properties;
with Util.Properties.Basic;
with Wi2wic.Rest;
with Wi2wic.Applications;
procedure Wi2wic.Server is
procedure Configure (Config : in out AWS.Config.Object);
use Util.Properties.Basic;
CONFIG_PATH : constant String := "wi2wic.properties";
Port : Natural := 8080;
procedure Configure (Config : in out AWS.Config.Object) is
begin
AWS.Config.Set.Server_Port (Config, Port);
AWS.Config.Set.Max_Connection (Config, 8);
AWS.Config.Set.Accept_Queue_Size (Config, 512);
end Configure;
App : aliased Wi2wic.Applications.Application_Type;
WS : Servlet.Server.Web.AWS_Container;
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Wi2wic.Server");
Props : Util.Properties.Manager;
begin
Props.Load_Properties (CONFIG_PATH);
Util.Log.Loggers.Initialize (Props);
Port := Integer_Property.Get (Props, "wi2wic.port", Port);
App.Configure (Props);
Wi2wic.Rest.Register (App);
WS.Configure (Configure'Access);
WS.Register_Application ("/wi2wic", App'Unchecked_Access);
App.Dump_Routes (Util.Log.INFO_LEVEL);
Log.Info ("Connect you browser to: http://localhost:{0}/wi2wic/index.html",
Util.Strings.Image (Port));
WS.Start;
loop
delay 6000.0;
end loop;
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Error ("Cannot read application configuration file {0}", CONFIG_PATH);
end Wi2wic.Server;
|
solutions/54 - Terrain Leveler/size-18_speed-114.asm
|
michaelgundlach/7billionhumans
| 45 |
93093
|
-- 7 Billion Humans (2056) --
-- 54: Terrain Leveler --
-- Author: tiansh
-- Size: 18
-- Speed: 114
a:
step n
mem1 = calc mem1 + c
if n != wall or
sw == datacube or
w == worker:
jump a
endif
pickup s
mem1 = calc mem1 + sw
write mem1
step s
b:
if e == worker or
ne == worker:
jump b
endif
mem1 = calc mem1 / 49
if e == datacube:
mem1 = set e
endif
c:
write mem1
drop
step s
pickup c
jump c
|
test/Succeed/Issue940.agda
|
shlevy/agda
| 1,989 |
13433
|
{-# OPTIONS --copatterns --show-implicit #-}
module Issue940 where
module _ (A : Set) where
record Box : Set where
constructor box
field
unbox : A
open Box
postulate x : A
ex : Box
ex = box x -- works
ex' : Box
unbox ex' = x
-- Error WAS:
-- An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/TypeChecking/Substitute.hs:326
postulate
A : Set
ok : Box A
Box.unbox ok = x A -- works
|
test/ir/maxXOR.asm
|
shivansh/gogo
| 24 |
93719
|
<reponame>shivansh/gogo<filename>test/ir/maxXOR.asm
# Return (2^x - 1)
# Test to find maximum XOR-value of at-most k-elements from 1 to n
.data
nStr: .asciiz "Enter n: "
n: .word 0
kStr: .asciiz "Enter k: "
k: .word 0
retVal: .word 0
str: .asciiz "Maximum XOR-value: "
x: .word 0
result: .word 0
.text
runtime:
addi $sp, $sp, -4
sw $ra, 0($sp)
lw $ra, 0($sp)
addi $sp, $sp, 4
jr $ra
.end runtime
.globl main
.ent main
main:
li $2, 4
la $4, nStr
syscall
li $2, 5
syscall
move $3, $2
li $2, 4
la $4, kStr
syscall
li $2, 5
syscall
sw $3, n # spilled n, freed $3
move $3, $2
sw $3, k
jal maxXOR
lw $3, k
move $3, $2
li $2, 4
la $4, str
syscall
li $2, 1
move $4, $3
syscall
# Store dirty variables back into memory
sw $3, retVal
li $2, 10
syscall
.end main
maxXOR:
addi $sp, $sp, -4
sw $ra, 0($sp)
# x = log2(n) + 1
li $3, 0 # x -> $3
# Store dirty variables back into memory
sw $3, x
while:
lw $3, n # n -> $3
srl $3, $3, 1
lw $5, x # x -> $5
addi $5, $5, 1
# Store dirty variables back into memory
sw $3, n
sw $5, x
bgt $3, 0, while
li $3, 1 # result -> $3
lw $5, x # x -> $5
sll $3, $3, $5
sub $3, $3, 1
move $2, $3
# Store dirty variables back into memory
sw $3, result
lw $ra, 0($sp)
addi $sp, $sp, 4
jr $ra
.end maxXOR
|
alloy4fun_models/trashltl/models/5/8NsAD3sdBGC5cNgjY.als
|
Kaixi26/org.alloytools.alloy
| 0 |
937
|
<filename>alloy4fun_models/trashltl/models/5/8NsAD3sdBGC5cNgjY.als
open main
pred id8NsAD3sdBGC5cNgjY_prop6 {
all f : File | always (f in Trash implies always f in Trash)
}
pred __repair { id8NsAD3sdBGC5cNgjY_prop6 }
check __repair { id8NsAD3sdBGC5cNgjY_prop6 <=> prop6o }
|
super_script.scpt
|
doekman/ascr-and-git
| 0 |
2197
|
#@osa-lang:AppleScript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
try
display dialog "Hello there from AppleScript. What shall I read to you out loud?" default answer "Bye bye" buttons {"Stop now", "Please read to me!"} default button 2 cancel button 1 with title "My super script" with icon note
say text returned of result
on error number -128 --user pressed cancel
display notification "Please come back soon!" with title "No worries"
end try
|
Lab Work/5th-semester/assembly-language/book/CH-07/7_9.asm
|
akazad13/bsc-academic-work
| 0 |
104001
|
.MODEL SMALL
.STACK 100H
.DATA
MSG1 DB 0AH,'TYPE A CHARACTER: $'
MSG2 DB 0AH,'THE ASCII CODE OF $';
MSG3 DB ' IN HEX IS $'
I DB 0
.CODE
MAIN PROC
; initializing data segment
MOV AX,@DATA
MOV DS,AX
_TOP:
LEA DX,MSG1 ; getting offset of 1st message
MOV AH,9 ; string print function
INT 21H ; printing 1st message
MOV AH,1 ; single character inpur function
INT 21H ; input a character
CMP AL,0DH ; checking for carriage return
JE _EXIT
MOV BL,AL ; mov character to BL register
LEA DX,MSG2 ; getting offset of 2nd message
MOV AH,9 ; string print function
INT 21H ; printing 2nd message
MOV AH,2
MOV DL,BL ; print the data
INT 21H
LEA DX,MSG3 ; getting offset of 3rd message
MOV AH,9 ; string print function
INT 21H ; printing 3rd message
MOV AH,2
MOV CL,4 ; CL=4
MOV I,0 ; I=0
_LOOP:
CMP I,4 ; compare if I=4
JE _TOP ; true than go to top for next input
MOV DL,BH ; DL=AH
ROL BX,CL ; Rotate BX to left 4 times
SHR DL,CL ; shift to right DL 4 times
CMP DL,9 ; compare if DL<=9
JLE _DIGIT ; if true than go to _DIGIT
ADD DL,55D ; else ADD 55D to get the char
JMP _OUTPUT ; Jump to display the character
_DIGIT:
ADD DL,30H ; conver number to ascii character
_OUTPUT:
INT 21H ; print the char
INC I ; I= I+1
JMP _LOOP ; jump to _LOOP
_EXIT:
MOV AH,4CH ; dos return function
INT 21H ; return from the dos
MAIN ENDP
END MAIN ; terminate programme
|
newitems/macros/multisizeops.asm
|
fcard/z3randomizer
| 0 |
243286
|
; Macros that allow a address to be changed easily between a long address
; and a word/zero page address. Instead of using
; STZ !MyAddress
; We can use
; %M_STZ(!MyAddress,1)
; And it will work regardless of the size of !MyAddress.
;
; Whenever the macro takes a second argument, it's "preserveA", or if the macro
; should preserve the value in the A register from before the operation.
macro M_STZ(address, preserveA)
if <address> > $FFFF
if preserveA != 0
PHA : LDA #$00 : STA <address> : PLA
else
LDA #$00 : STA <address>
endif
else
STZ <address>
endif
endmacro
macro M_INC(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA
LDA <address>
INC
STA <address>
PLA
else
LDA <address>
INC
STA <address>
endif
else
INC <address>
endif
endmacro
macro M_DEC(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA
LDA <address>
DEC
STA <address>
PLA
else
LDA <address>
DEC
STA <address>
endif
else
DEC <address>
endif
endmacro
macro M_LDX(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : LDA <address> : TAX : PLA
else
LDA <address> : TAX
endif
else
LDX <address>
endif
endmacro
macro M_LDY(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : LDA <address> : TAY : PLA
else
LDA <address> : TAY
endif
else
LDY <address>
endif
endmacro
macro M_STX(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : TXA : STA <address> : PLA
else
TXA : STA <address>
endif
else
STX <address>
endif
endmacro
macro M_STY(address, preserveA)
if <address> > $FFFF
if <preserveA> != 0
PHA : TYA : STA <address> : PLA
else
TYA : STA <address>
endif
else
STY <address>
endif
endmacro
|
agda-stdlib-0.9/src/Data/Fin/Subset.agda
|
qwe2/try-agda
| 1 |
17051
|
<reponame>qwe2/try-agda
------------------------------------------------------------------------
-- The Agda standard library
--
-- Subsets of finite sets
------------------------------------------------------------------------
module Data.Fin.Subset where
open import Algebra
import Algebra.Properties.BooleanAlgebra as BoolAlgProp
import Algebra.Properties.BooleanAlgebra.Expression as BAExpr
import Data.Bool.Properties as BoolProp
open import Data.Fin
open import Data.List as List using (List)
open import Data.Nat
open import Data.Product
open import Data.Vec using (Vec; _∷_; _[_]=_)
import Relation.Binary.Vec.Pointwise as Pointwise
open import Relation.Nullary
infix 4 _∈_ _∉_ _⊆_ _⊈_
------------------------------------------------------------------------
-- Definitions
-- Sides.
open import Data.Bool public
using () renaming (Bool to Side; true to inside; false to outside)
-- Partitions a finite set into two parts, the inside and the outside.
Subset : ℕ → Set
Subset = Vec Side
------------------------------------------------------------------------
-- Membership and subset predicates
_∈_ : ∀ {n} → Fin n → Subset n → Set
x ∈ p = p [ x ]= inside
_∉_ : ∀ {n} → Fin n → Subset n → Set
x ∉ p = ¬ (x ∈ p)
_⊆_ : ∀ {n} → Subset n → Subset n → Set
p₁ ⊆ p₂ = ∀ {x} → x ∈ p₁ → x ∈ p₂
_⊈_ : ∀ {n} → Subset n → Subset n → Set
p₁ ⊈ p₂ = ¬ (p₁ ⊆ p₂)
------------------------------------------------------------------------
-- Set operations
-- Pointwise lifting of the usual boolean algebra for booleans gives
-- us a boolean algebra for subsets.
--
-- The underlying equality of the returned boolean algebra is
-- propositional equality.
booleanAlgebra : ℕ → BooleanAlgebra _ _
booleanAlgebra n =
BoolAlgProp.replace-equality
(BAExpr.lift BoolProp.booleanAlgebra n)
Pointwise.Pointwise-≡
private
open module BA {n} = BooleanAlgebra (booleanAlgebra n) public
using
( ⊥ -- The empty subset.
; ⊤ -- The subset containing all elements.
)
renaming
( _∨_ to _∪_ -- Binary union.
; _∧_ to _∩_ -- Binary intersection.
; ¬_ to ∁ -- Complement.
)
-- A singleton subset, containing just the given element.
⁅_⁆ : ∀ {n} → Fin n → Subset n
⁅ zero ⁆ = inside ∷ ⊥
⁅ suc i ⁆ = outside ∷ ⁅ i ⁆
-- N-ary union.
⋃ : ∀ {n} → List (Subset n) → Subset n
⋃ = List.foldr _∪_ ⊥
-- N-ary intersection.
⋂ : ∀ {n} → List (Subset n) → Subset n
⋂ = List.foldr _∩_ ⊤
------------------------------------------------------------------------
-- Properties
Nonempty : ∀ {n} (p : Subset n) → Set
Nonempty p = ∃ λ f → f ∈ p
Empty : ∀ {n} (p : Subset n) → Set
Empty p = ¬ Nonempty p
-- Point-wise lifting of properties.
Lift : ∀ {n} → (Fin n → Set) → (Subset n → Set)
Lift P p = ∀ {x} → x ∈ p → P x
|
Working Disassembly/Levels/FBZ/Misc Object Data/Map - Floating Platform.asm
|
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
| 5 |
26092
|
<filename>Working Disassembly/Levels/FBZ/Misc Object Data/Map - Floating Platform.asm
dc.w word_3A748-Map_FBZFloatingPlatform
dc.w word_3A774-Map_FBZFloatingPlatform
dc.w word_3A7A0-Map_FBZFloatingPlatform
word_3A748: dc.w 7 ; DATA XREF: ROM:0003A742o
dc.b $E8, $D, 0, $28, $FF, $E0
dc.b $F8, 4, 0, $30, $FF, $F0
dc.b $E8, $D, 8, $28, 0, 0
dc.b $F8, 4, 8, $30, 0, 0
dc.b 0, 9, 0, 0, $FF, $E8
dc.b 0, 9, 0, 6, 0, 0
dc.b $10, 4, 0, $C, $FF, $F8
word_3A774: dc.w 7 ; DATA XREF: ROM:0003A742o
dc.b $E8, $D, 0, $28, $FF, $E0
dc.b $F8, 4, 0, $30, $FF, $F0
dc.b $E8, $D, 8, $28, 0, 0
dc.b $F8, 4, 8, $30, 0, 0
dc.b 0, 9, 0, $E, $FF, $E8
dc.b 0, 9, 0, $14, 0, 0
dc.b $10, 4, 0, $1A, $FF, $F8
word_3A7A0: dc.w 7 ; DATA XREF: ROM:0003A742o
dc.b $E8, $D, 0, $28, $FF, $E0
dc.b $F8, 4, 0, $30, $FF, $F0
dc.b $E8, $D, 8, $28, 0, 0
dc.b $F8, 4, 8, $30, 0, 0
dc.b 0, 9, 0, $1C, $FF, $E8
dc.b 0, 9, 0, $22, 0, 0
dc.b $10, 4, 0, $C, $FF, $F8
|
source/action_lists.ads
|
jquorning/CELLE
| 0 |
29352
|
with Ada.Containers.Doubly_Linked_Lists;
with Actions;
limited with Symbols;
limited with States;
-- limited with Rules;
with Rule_Lists;
package Action_Lists is
subtype Rule_Access is Rule_Lists.Rule_Access;
package Action_DLLs is
new Ada.Containers.Doubly_Linked_Lists ("=" => Actions."=",
Element_Type => Actions.Action_Record);
subtype List is Action_DLLs.List;
procedure Sort (Action_List : in out List);
-- Action_Sort
procedure Append (Action_List : in out List;
Kind : in Actions.Action_Kind;
Symbol : in Symbols.Symbol_Access;
State : in States.State_Access;
Rule : in Rule_Access);
-- Action_Add
-- Append symbol to Action_List
end Action_Lists;
|
main.asm
|
hongfz16/AssemblyPlayStation
| 2 |
25456
|
<gh_stars>1-10
[bits 32]
section .text
MENU_ENTRY equ 0x2000
call main
call MENU_ENTRY
jmp $
ret
extern init_seed
extern rand_num
extern clear_screen
extern kprint
extern kprint_at
extern print_char
extern int_to_ascii
global getchar
global register_kbd_callback
global register_tim_callback
global port_byte_out
global port_byte_in
; keyboard_handler:
; cli
; pushad
; mov ax, 0x20
; push ax
; mov ax, 0x20
; push ax
; call port_byte_out
; ; call clear_screen
; ; push 10
; ; push 10
; ; mov eax, KEYBOARD
; ; push eax
; ; call kprint_at
; mov ax, 0x60
; push ax
; mov eax, 0
; call port_byte_in
; mov esi, eax
; ; push eax ; to give arg. to kbd_callback
; mov ebx, 0
; mov bl, [kbd_tail]
; cmp bl, [kbd_head]
; je do_nothing
; add ebx, kbd_buf
; cmp al, 0x30
; ja do_nothing
; mov edx, scancode_trans
; add edx, eax
; mov al, [edx]
; mov [ebx], al
; mov bl, [kbd_tail]
; inc bl
; mov [kbd_tail], bl
; mov ebx, [kbd_callback]
; test ebx, 0xffffffff
; jz do_nothing
; pushad
; push esi
; mov eax, esi
; call [kbd_callback]
; popad
; do_nothing:
; popad
; sti
; iret
keyboard_handler:
cli
pushad
mov ax, 0x20
push ax
mov ax, 0x20
push ax
call port_byte_out
; call clear_screen
; push 10
; push 10
; mov eax, KEYBOARD
; push eax
; call kprint_at
mov ax, 0x60
push ax
mov eax, 0
call port_byte_in
mov esi, eax
; push eax ; to give arg. to kbd_callback
mov ebx, 0
mov bl, [kbd_tail]
cmp bl, [kbd_head]
je do_nothing
add ebx, kbd_buf
cmp al, 0x30
ja do_nothing
mov edx, scancode_trans
add edx, eax
mov al, [edx]
mov [ebx], al
mov bl, [kbd_tail]
inc bl
mov [kbd_tail], bl
do_nothing:
mov ebx, [kbd_callback]
test ebx, 0xffffffff
jz do_nothing
pushad
push esi
mov eax, esi
call [kbd_callback]
popad
popad
sti
iret
timer_handler:
cli
pushad
mov ax, 0x20
push ax
mov ax, 0x20
push ax
call port_byte_out
; mov eax, TIMER
; push eax
; call kprint
mov ebx, [tim_callback]
test ebx, 0xffffffff
jz timer_handler_finish
call [tim_callback]
timer_handler_finish:
popad
sti
iret
register_kbd_callback:
; dd: kbd_callback_address [ebp+8]
cli
push ebp
mov ebp, esp
push eax
mov eax, [ebp+8]
mov [kbd_callback], eax
pop eax
pop ebp
sti
ret 4
register_tim_callback:
; dd: timer_callback_address [ebp+8]
; cli
cli
push ebp
mov ebp, esp
push eax
mov eax, [ebp+8]
mov [tim_callback], eax
pop eax
pop ebp
sti
ret 4
; getchar:
; ; pushad
; ; cli
; push ebx
; mov ebx, 0
; mov bl, [kbd_head]
; inc bl,
; cmp bl, [kbd_tail]
; je empty_buffer
; mov [kbd_head], bl
; add ebx, kbd_buf
; mov al, [ebx]
; jmp getchar_finish
; empty_buffer:
; mov al, 0
; jmp getchar_finish
; getchar_finish:
; pop ebx
; ; sti
; ; popad
; ret
getchar:
; pushad
; cli
push ebx
mov ebx, 0
mov bl, [kbd_head]
inc bl,
cmp bl, [kbd_tail]
je empty_buffer
mov [kbd_head], bl
add ebx, kbd_buf
mov al, [ebx]
jmp getchar_finish
empty_buffer:
mov al, 0
jmp getchar_finish
getchar_finish:
pop ebx
; sti
; popad
ret
port_byte_in:
; dw: port [ebp+8]
; return: al
push ebp
mov ebp, esp
push edx
mov dx, [ebp+8]
in al, dx
pop edx
pop ebp
ret 2
port_byte_out:
;-------
; dw: port [ebp+8]
; dw: data [ebp+10]
;-------
push ebp
mov ebp, esp
push eax
push edx
mov dx, [ebp+8]
mov ax, [ebp+10]
out dx, al
pop edx
pop eax
pop ebp
ret 4
redirect:
push eax
mov ax, 0x11
push ax
mov ax, 0x20
push ax
call port_byte_out
mov ax, 0x11
push ax
mov ax, 0xa0
push ax
call port_byte_out
mov ax, 0x20
push ax
mov ax, 0x21
push ax
call port_byte_out
mov ax, 0x28
push ax
mov ax, 0xa1
push ax
call port_byte_out
mov ax, 0x04
push ax
mov ax, 0x21
push ax
call port_byte_out
mov ax, 0x02
push ax
mov ax, 0xa1
push ax
call port_byte_out
mov ax, 0x01
push ax
mov ax, 0x21
push ax
call port_byte_out
mov ax, 0x01
push ax
mov ax, 0xa1
push ax
call port_byte_out
mov ax, 0x00
push ax
mov ax, 0x21
push ax
call port_byte_out
mov ax, 0x00
push ax
mov ax, 0xa1
push ax
call port_byte_out
pop eax
ret
main:
cli
call redirect
;set timer ivt
mov eax, _IDT
add eax, 32 * 8
mov ebx, timer_handler
mov [eax], bx
add eax, 2
mov bx, 0x08
mov [eax], bx
add eax, 2
mov bl, 0
mov [eax], bl
add eax, 1
mov bl, 0x8E
mov [eax], bl
add eax, 1
mov ebx, timer_handler
shr ebx, 16
mov [eax], bx
; set keyboard ivt
mov eax, _IDT
add eax, 33 * 8
mov ebx, keyboard_handler
mov [eax], bx
add eax, 2
mov bx, 0x08
mov [eax], bx
add eax, 2
mov bl, 0
mov [eax], bl
add eax, 1
mov bl, 0x8E
mov [eax], bl
add eax, 1
mov ebx, keyboard_handler
shr ebx, 16
mov [eax], bx
mov eax, IDT_REG
mov bx, 2047
mov [eax], bx
add eax, 2
mov ebx, _IDT
mov [eax], ebx
lidt [IDT_REG]
sti
; something os tutorial has done to init
; timer but it seems useless
mov ax, 0x36
push ax
mov ax, 0x43
push ax
call port_byte_out
mov ax, 0x37
push ax
mov ax, 0x40
push ax
call port_byte_out
mov ax, 0x5d
push ax
mov ax, 0x40
push ax
call port_byte_out
ret
_IDT times 256 dq 0
IDT_REG times 6 db 0
KEYBOARD db "This is a message from keyboard interrupt!!", 0
TIMER db "Timer!", 0
MSG db "msg from kernel 111111", 0
kbd_buf times 256 db 0
kbd_head db 255
kbd_tail db 0
kbd_callback dd 0
tim_callback dd 0
scancode_trans db 0,0x1b,"1234567890-+",0x08,0x09,"QWERTYUIOP[]",0x0a,0x0d,"ASDFGHJKL",0x3b,0x27,0x60,".",0x5c,"ZXCVBNM",0x2c,"./.",0,0,0,0,0,0,0,0,0,0
times 4096 - ($-$$) db 0
|
include/glx.ads
|
docandrew/troodon
| 5 |
3620
|
<reponame>docandrew/troodon<filename>include/glx.ads
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with X11;
limited with Xlib;
limited with Xutil;
with Interfaces.C.Strings;
with System;
with GL;
with bits_stdint_intn_h;
package glx is
-- Troodon addition
type IntArray is array (Integer range <>) of Interfaces.C.int
with Convention => C, Component_Size => Interfaces.C.int'Size;
GLX_VERSION_1_1 : constant := 1; -- /usr/include/GL/glx.h:40
GLX_VERSION_1_2 : constant := 1; -- /usr/include/GL/glx.h:41
GLX_VERSION_1_3 : constant := 1; -- /usr/include/GL/glx.h:42
GLX_VERSION_1_4 : constant := 1; -- /usr/include/GL/glx.h:43
GLX_EXTENSION_NAME : aliased constant String := "GLX" & ASCII.NUL; -- /usr/include/GL/glx.h:45
GLX_USE_GL : constant := 1; -- /usr/include/GL/glx.h:52
GLX_BUFFER_SIZE : constant := 2; -- /usr/include/GL/glx.h:53
GLX_LEVEL : constant := 3; -- /usr/include/GL/glx.h:54
GLX_RGBA : constant := 4; -- /usr/include/GL/glx.h:55
GLX_DOUBLEBUFFER : constant := 5; -- /usr/include/GL/glx.h:56
GLX_STEREO : constant := 6; -- /usr/include/GL/glx.h:57
GLX_AUX_BUFFERS : constant := 7; -- /usr/include/GL/glx.h:58
GLX_RED_SIZE : constant := 8; -- /usr/include/GL/glx.h:59
GLX_GREEN_SIZE : constant := 9; -- /usr/include/GL/glx.h:60
GLX_BLUE_SIZE : constant := 10; -- /usr/include/GL/glx.h:61
GLX_ALPHA_SIZE : constant := 11; -- /usr/include/GL/glx.h:62
GLX_DEPTH_SIZE : constant := 12; -- /usr/include/GL/glx.h:63
GLX_STENCIL_SIZE : constant := 13; -- /usr/include/GL/glx.h:64
GLX_ACCUM_RED_SIZE : constant := 14; -- /usr/include/GL/glx.h:65
GLX_ACCUM_GREEN_SIZE : constant := 15; -- /usr/include/GL/glx.h:66
GLX_ACCUM_BLUE_SIZE : constant := 16; -- /usr/include/GL/glx.h:67
GLX_ACCUM_ALPHA_SIZE : constant := 17; -- /usr/include/GL/glx.h:68
GLX_BAD_SCREEN : constant := 1; -- /usr/include/GL/glx.h:74
GLX_BAD_ATTRIBUTE : constant := 2; -- /usr/include/GL/glx.h:75
GLX_NO_EXTENSION : constant := 3; -- /usr/include/GL/glx.h:76
GLX_BAD_VISUAL : constant := 4; -- /usr/include/GL/glx.h:77
GLX_BAD_CONTEXT : constant := 5; -- /usr/include/GL/glx.h:78
GLX_BAD_VALUE : constant := 6; -- /usr/include/GL/glx.h:79
GLX_BAD_ENUM : constant := 7; -- /usr/include/GL/glx.h:80
GLX_VENDOR : constant := 1; -- /usr/include/GL/glx.h:86
GLX_VERSION : constant := 2; -- /usr/include/GL/glx.h:87
GLX_EXTENSIONS : constant := 3; -- /usr/include/GL/glx.h:88
GLX_CONFIG_CAVEAT : constant := 16#20#; -- /usr/include/GL/glx.h:94
GLX_DONT_CARE : constant := 16#FFFFFFFF#; -- /usr/include/GL/glx.h:95
GLX_X_VISUAL_TYPE : constant := 16#22#; -- /usr/include/GL/glx.h:96
GLX_TRANSPARENT_TYPE : constant := 16#23#; -- /usr/include/GL/glx.h:97
GLX_TRANSPARENT_INDEX_VALUE : constant := 16#24#; -- /usr/include/GL/glx.h:98
GLX_TRANSPARENT_RED_VALUE : constant := 16#25#; -- /usr/include/GL/glx.h:99
GLX_TRANSPARENT_GREEN_VALUE : constant := 16#26#; -- /usr/include/GL/glx.h:100
GLX_TRANSPARENT_BLUE_VALUE : constant := 16#27#; -- /usr/include/GL/glx.h:101
GLX_TRANSPARENT_ALPHA_VALUE : constant := 16#28#; -- /usr/include/GL/glx.h:102
GLX_WINDOW_BIT : constant := 16#00000001#; -- /usr/include/GL/glx.h:103
GLX_PIXMAP_BIT : constant := 16#00000002#; -- /usr/include/GL/glx.h:104
GLX_PBUFFER_BIT : constant := 16#00000004#; -- /usr/include/GL/glx.h:105
GLX_AUX_BUFFERS_BIT : constant := 16#00000010#; -- /usr/include/GL/glx.h:106
GLX_FRONT_LEFT_BUFFER_BIT : constant := 16#00000001#; -- /usr/include/GL/glx.h:107
GLX_FRONT_RIGHT_BUFFER_BIT : constant := 16#00000002#; -- /usr/include/GL/glx.h:108
GLX_BACK_LEFT_BUFFER_BIT : constant := 16#00000004#; -- /usr/include/GL/glx.h:109
GLX_BACK_RIGHT_BUFFER_BIT : constant := 16#00000008#; -- /usr/include/GL/glx.h:110
GLX_DEPTH_BUFFER_BIT : constant := 16#00000020#; -- /usr/include/GL/glx.h:111
GLX_STENCIL_BUFFER_BIT : constant := 16#00000040#; -- /usr/include/GL/glx.h:112
GLX_ACCUM_BUFFER_BIT : constant := 16#00000080#; -- /usr/include/GL/glx.h:113
GLX_NONE : constant := 16#8000#; -- /usr/include/GL/glx.h:114
GLX_SLOW_CONFIG : constant := 16#8001#; -- /usr/include/GL/glx.h:115
GLX_TRUE_COLOR : constant := 16#8002#; -- /usr/include/GL/glx.h:116
GLX_DIRECT_COLOR : constant := 16#8003#; -- /usr/include/GL/glx.h:117
GLX_PSEUDO_COLOR : constant := 16#8004#; -- /usr/include/GL/glx.h:118
GLX_STATIC_COLOR : constant := 16#8005#; -- /usr/include/GL/glx.h:119
GLX_GRAY_SCALE : constant := 16#8006#; -- /usr/include/GL/glx.h:120
GLX_STATIC_GRAY : constant := 16#8007#; -- /usr/include/GL/glx.h:121
GLX_TRANSPARENT_RGB : constant := 16#8008#; -- /usr/include/GL/glx.h:122
GLX_TRANSPARENT_INDEX : constant := 16#8009#; -- /usr/include/GL/glx.h:123
GLX_VISUAL_ID : constant := 16#800B#; -- /usr/include/GL/glx.h:124
GLX_SCREEN : constant := 16#800C#; -- /usr/include/GL/glx.h:125
GLX_NON_CONFORMANT_CONFIG : constant := 16#800D#; -- /usr/include/GL/glx.h:126
GLX_DRAWABLE_TYPE : constant := 16#8010#; -- /usr/include/GL/glx.h:127
GLX_RENDER_TYPE : constant := 16#8011#; -- /usr/include/GL/glx.h:128
GLX_X_RENDERABLE : constant := 16#8012#; -- /usr/include/GL/glx.h:129
GLX_FBCONFIG_ID : constant := 16#8013#; -- /usr/include/GL/glx.h:130
GLX_RGBA_TYPE : constant := 16#8014#; -- /usr/include/GL/glx.h:131
GLX_COLOR_INDEX_TYPE : constant := 16#8015#; -- /usr/include/GL/glx.h:132
GLX_MAX_PBUFFER_WIDTH : constant := 16#8016#; -- /usr/include/GL/glx.h:133
GLX_MAX_PBUFFER_HEIGHT : constant := 16#8017#; -- /usr/include/GL/glx.h:134
GLX_MAX_PBUFFER_PIXELS : constant := 16#8018#; -- /usr/include/GL/glx.h:135
GLX_PRESERVED_CONTENTS : constant := 16#801B#; -- /usr/include/GL/glx.h:136
GLX_LARGEST_PBUFFER : constant := 16#801C#; -- /usr/include/GL/glx.h:137
GLX_WIDTH : constant := 16#801D#; -- /usr/include/GL/glx.h:138
GLX_HEIGHT : constant := 16#801E#; -- /usr/include/GL/glx.h:139
GLX_EVENT_MASK : constant := 16#801F#; -- /usr/include/GL/glx.h:140
GLX_DAMAGED : constant := 16#8020#; -- /usr/include/GL/glx.h:141
GLX_SAVED : constant := 16#8021#; -- /usr/include/GL/glx.h:142
GLX_WINDOW : constant := 16#8022#; -- /usr/include/GL/glx.h:143
GLX_PBUFFER : constant := 16#8023#; -- /usr/include/GL/glx.h:144
GLX_PBUFFER_HEIGHT : constant := 16#8040#; -- /usr/include/GL/glx.h:145
GLX_PBUFFER_WIDTH : constant := 16#8041#; -- /usr/include/GL/glx.h:146
GLX_RGBA_BIT : constant := 16#00000001#; -- /usr/include/GL/glx.h:147
GLX_COLOR_INDEX_BIT : constant := 16#00000002#; -- /usr/include/GL/glx.h:148
GLX_PBUFFER_CLOBBER_MASK : constant := 16#08000000#; -- /usr/include/GL/glx.h:149
GLX_SAMPLE_BUFFERS : constant := 16#186a0#; -- /usr/include/GL/glx.h:155
GLX_SAMPLES : constant := 16#186a1#; -- /usr/include/GL/glx.h:156
GLX_PbufferClobber : constant := 0; -- /usr/include/GL/glx.h:177
GLX_BufferSwapComplete : constant := 1; -- /usr/include/GL/glx.h:178
GLX_ARB_get_proc_address : constant := 1; -- /usr/include/GL/glx.h:310
GLX_ARB_render_texture : constant := 1; -- /usr/include/GL/glx.h:357
GLX_MESA_swap_frame_usage : constant := 1; -- /usr/include/GL/glx.h:370
-- * Mesa 3-D graphics library
-- *
-- * Copyright (C) 1999-2006 <NAME> All Rights Reserved.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a
-- * copy of this software and associated documentation files (the "Software"),
-- * to deal in the Software without restriction, including without limitation
-- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- * and/or sell copies of the Software, and to permit persons to whom the
-- * Software is furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included
-- * in all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-- * OTHER DEALINGS IN THE SOFTWARE.
--
-- * Tokens for glXChooseVisual and glXGetConfig:
--
-- * Error codes returned by glXGetConfig:
--
-- * GLX 1.1 and later:
--
-- * GLX 1.3 and later:
--
-- * GLX 1.4 and later:
--
type uu_GLXcontextRec is null record; -- incomplete struct
type GLXContext is access all uu_GLXcontextRec; -- /usr/include/GL/glx.h:160
subtype GLXPixmap is X11.XID; -- /usr/include/GL/glx.h:161
subtype GLXDrawable is X11.XID; -- /usr/include/GL/glx.h:162
-- GLX 1.3 and later
type uu_GLXFBConfigRec is null record; -- incomplete struct
-- Troodon edit
type GLXFBConfig is access all uu_GLXFBConfigRec; -- /usr/include/GL/glx.h:164
type GLXFBConfigArray is array (Integer range <>) of GLXFBConfig;
subtype GLXFBConfigID is X11.XID; -- /usr/include/GL/glx.h:165
subtype GLXContextID is X11.XID; -- /usr/include/GL/glx.h:166
subtype GLXWindow is X11.XID; -- /usr/include/GL/glx.h:167
subtype GLXPbuffer is X11.XID; -- /usr/include/GL/glx.h:168
--** Events.
--** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX
--** event - this helps initialization if the server supports the pbuffer
--** extension and the client doesn't.
--
function glXChooseVisual
(dpy : access Xlib.Display;
screen : int;
attribList : IntArray) return access Xutil.XVisualInfo -- /usr/include/GL/glx.h:182
with Import => True,
Convention => C,
External_Name => "glXChooseVisual";
function glXCreateContext
(dpy : access Xlib.Display;
vis : access Xutil.XVisualInfo;
shareList : GLXContext;
direct : int) return GLXContext -- /usr/include/GL/glx.h:185
with Import => True,
Convention => C,
External_Name => "glXCreateContext";
procedure glXDestroyContext (dpy : access Xlib.Display; ctx : GLXContext) -- /usr/include/GL/glx.h:188
with Import => True,
Convention => C,
External_Name => "glXDestroyContext";
function glXMakeCurrent
(dpy : access Xlib.Display;
drawable : GLXDrawable;
ctx : GLXContext) return int -- /usr/include/GL/glx.h:190
with Import => True,
Convention => C,
External_Name => "glXMakeCurrent";
procedure glXCopyContext
(dpy : access Xlib.Display;
src : GLXContext;
dst : GLXContext;
mask : unsigned_long) -- /usr/include/GL/glx.h:193
with Import => True,
Convention => C,
External_Name => "glXCopyContext";
procedure glXSwapBuffers (dpy : access Xlib.Display; drawable : GLXDrawable) -- /usr/include/GL/glx.h:196
with Import => True,
Convention => C,
External_Name => "glXSwapBuffers";
function glXCreateGLXPixmap
(dpy : access Xlib.Display;
visual : access Xutil.XVisualInfo;
the_pixmap : X11.Pixmap) return GLXPixmap -- /usr/include/GL/glx.h:198
with Import => True,
Convention => C,
External_Name => "glXCreateGLXPixmap";
procedure glXDestroyGLXPixmap (dpy : access Xlib.Display; pixmap : GLXPixmap) -- /usr/include/GL/glx.h:201
with Import => True,
Convention => C,
External_Name => "glXDestroyGLXPixmap";
function glXQueryExtension
(dpy : access Xlib.Display;
errorb : access int;
event : access int) return int -- /usr/include/GL/glx.h:203
with Import => True,
Convention => C,
External_Name => "glXQueryExtension";
function glXQueryVersion
(dpy : access Xlib.Display;
maj : access int;
min : access int) return int -- /usr/include/GL/glx.h:205
with Import => True,
Convention => C,
External_Name => "glXQueryVersion";
function glXIsDirect (dpy : access Xlib.Display; ctx : GLXContext) return int -- /usr/include/GL/glx.h:207
with Import => True,
Convention => C,
External_Name => "glXIsDirect";
function glXGetConfig
(dpy : access Xlib.Display;
visual : access Xutil.XVisualInfo;
attrib : int;
value : access int) return int -- /usr/include/GL/glx.h:209
with Import => True,
Convention => C,
External_Name => "glXGetConfig";
function glXGetCurrentContext return GLXContext -- /usr/include/GL/glx.h:212
with Import => True,
Convention => C,
External_Name => "glXGetCurrentContext";
function glXGetCurrentDrawable return GLXDrawable -- /usr/include/GL/glx.h:214
with Import => True,
Convention => C,
External_Name => "glXGetCurrentDrawable";
procedure glXWaitGL -- /usr/include/GL/glx.h:216
with Import => True,
Convention => C,
External_Name => "glXWaitGL";
procedure glXWaitX -- /usr/include/GL/glx.h:218
with Import => True,
Convention => C,
External_Name => "glXWaitX";
procedure glXUseXFont
(the_font : X11.Font;
first : int;
count : int;
list : int) -- /usr/include/GL/glx.h:220
with Import => True,
Convention => C,
External_Name => "glXUseXFont";
-- GLX 1.1 and later
function glXQueryExtensionsString (dpy : access Xlib.Display; screen : int) return Interfaces.C.Strings.chars_ptr -- /usr/include/GL/glx.h:225
with Import => True,
Convention => C,
External_Name => "glXQueryExtensionsString";
function glXQueryServerString
(dpy : access Xlib.Display;
screen : int;
name : int) return Interfaces.C.Strings.chars_ptr -- /usr/include/GL/glx.h:227
with Import => True,
Convention => C,
External_Name => "glXQueryServerString";
function glXGetClientString (dpy : access Xlib.Display; name : int) return Interfaces.C.Strings.chars_ptr -- /usr/include/GL/glx.h:229
with Import => True,
Convention => C,
External_Name => "glXGetClientString";
-- GLX 1.2 and later
function glXGetCurrentDisplay return access Xlib.Display -- /usr/include/GL/glx.h:233
with Import => True,
Convention => C,
External_Name => "glXGetCurrentDisplay";
-- GLX 1.3 and later
function glXChooseFBConfig
(dpy : access Xlib.Display;
screen : int;
attribList : IntArray;
nitems : access int) return System.Address -- /usr/include/GL/glx.h:237
with Import => True,
Convention => C,
External_Name => "glXChooseFBConfig";
function glXGetFBConfigAttrib
(dpy : access Xlib.Display;
config : GLXFBConfig;
attribute : int;
value : access int) return int -- /usr/include/GL/glx.h:240
with Import => True,
Convention => C,
External_Name => "glXGetFBConfigAttrib";
function glXGetFBConfigs
(dpy : access Xlib.Display;
screen : int;
nelements : access int) return System.Address -- /usr/include/GL/glx.h:243
with Import => True,
Convention => C,
External_Name => "glXGetFBConfigs";
function glXGetVisualFromFBConfig (dpy : access Xlib.Display; config : GLXFBConfig) return access Xutil.XVisualInfo -- /usr/include/GL/glx.h:246
with Import => True,
Convention => C,
External_Name => "glXGetVisualFromFBConfig";
function glXCreateWindow
(dpy : access Xlib.Display;
config : GLXFBConfig;
win : X11.Window;
attribList : access int) return GLXWindow -- /usr/include/GL/glx.h:249
with Import => True,
Convention => C,
External_Name => "glXCreateWindow";
procedure glXDestroyWindow (dpy : access Xlib.Display; window : GLXWindow) -- /usr/include/GL/glx.h:252
with Import => True,
Convention => C,
External_Name => "glXDestroyWindow";
function glXCreatePixmap
(dpy : access Xlib.Display;
config : GLXFBConfig;
the_pixmap : X11.Pixmap;
attribList : access int) return GLXPixmap -- /usr/include/GL/glx.h:254
with Import => True,
Convention => C,
External_Name => "glXCreatePixmap";
procedure glXDestroyPixmap (dpy : access Xlib.Display; pixmap : GLXPixmap) -- /usr/include/GL/glx.h:257
with Import => True,
Convention => C,
External_Name => "glXDestroyPixmap";
function glXCreatePbuffer
(dpy : access Xlib.Display;
config : GLXFBConfig;
attribList : access int) return GLXPbuffer -- /usr/include/GL/glx.h:259
with Import => True,
Convention => C,
External_Name => "glXCreatePbuffer";
procedure glXDestroyPbuffer (dpy : access Xlib.Display; pbuf : GLXPbuffer) -- /usr/include/GL/glx.h:262
with Import => True,
Convention => C,
External_Name => "glXDestroyPbuffer";
procedure glXQueryDrawable
(dpy : access Xlib.Display;
draw : GLXDrawable;
attribute : int;
value : access unsigned) -- /usr/include/GL/glx.h:264
with Import => True,
Convention => C,
External_Name => "glXQueryDrawable";
function glXCreateNewContext
(dpy : access Xlib.Display;
config : GLXFBConfig;
renderType : int;
shareList : GLXContext;
direct : int) return GLXContext -- /usr/include/GL/glx.h:267
with Import => True,
Convention => C,
External_Name => "glXCreateNewContext";
function glXMakeContextCurrent
(dpy : access Xlib.Display;
draw : GLXDrawable;
read : GLXDrawable;
ctx : GLXContext) return int -- /usr/include/GL/glx.h:271
with Import => True,
Convention => C,
External_Name => "glXMakeContextCurrent";
function glXGetCurrentReadDrawable return GLXDrawable -- /usr/include/GL/glx.h:274
with Import => True,
Convention => C,
External_Name => "glXGetCurrentReadDrawable";
function glXQueryContext
(dpy : access Xlib.Display;
ctx : GLXContext;
attribute : int;
value : access int) return int -- /usr/include/GL/glx.h:276
with Import => True,
Convention => C,
External_Name => "glXQueryContext";
procedure glXSelectEvent
(dpy : access Xlib.Display;
drawable : GLXDrawable;
mask : unsigned_long) -- /usr/include/GL/glx.h:279
with Import => True,
Convention => C,
External_Name => "glXSelectEvent";
procedure glXGetSelectedEvent
(dpy : access Xlib.Display;
drawable : GLXDrawable;
mask : access unsigned_long) -- /usr/include/GL/glx.h:282
with Import => True,
Convention => C,
External_Name => "glXGetSelectedEvent";
-- GLX 1.3 function pointer typedefs
type PFNGLXGETFBCONFIGSPROC is access function
(arg1 : access Xlib.Display;
arg2 : int;
arg3 : access int) return System.Address
with Convention => C; -- /usr/include/GL/glx.h:286
type PFNGLXCHOOSEFBCONFIGPROC is access function
(arg1 : access Xlib.Display;
arg2 : int;
arg3 : access int;
arg4 : access int) return System.Address
with Convention => C; -- /usr/include/GL/glx.h:287
type PFNGLXGETFBCONFIGATTRIBPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXFBConfig;
arg3 : int;
arg4 : access int) return int
with Convention => C; -- /usr/include/GL/glx.h:288
type PFNGLXGETVISUALFROMFBCONFIGPROC is access function (arg1 : access Xlib.Display; arg2 : GLXFBConfig) return access Xutil.XVisualInfo
with Convention => C; -- /usr/include/GL/glx.h:289
type PFNGLXCREATEWINDOWPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXFBConfig;
arg3 : X11.Window;
arg4 : access int) return GLXWindow
with Convention => C; -- /usr/include/GL/glx.h:290
type PFNGLXDESTROYWINDOWPROC is access procedure (arg1 : access Xlib.Display; arg2 : GLXWindow)
with Convention => C; -- /usr/include/GL/glx.h:291
type PFNGLXCREATEPIXMAPPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXFBConfig;
arg3 : X11.Pixmap;
arg4 : access int) return GLXPixmap
with Convention => C; -- /usr/include/GL/glx.h:292
type PFNGLXDESTROYPIXMAPPROC is access procedure (arg1 : access Xlib.Display; arg2 : GLXPixmap)
with Convention => C; -- /usr/include/GL/glx.h:293
type PFNGLXCREATEPBUFFERPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXFBConfig;
arg3 : access int) return GLXPbuffer
with Convention => C; -- /usr/include/GL/glx.h:294
type PFNGLXDESTROYPBUFFERPROC is access procedure (arg1 : access Xlib.Display; arg2 : GLXPbuffer)
with Convention => C; -- /usr/include/GL/glx.h:295
type PFNGLXQUERYDRAWABLEPROC is access procedure
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : int;
arg4 : access unsigned)
with Convention => C; -- /usr/include/GL/glx.h:296
type PFNGLXCREATENEWCONTEXTPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXFBConfig;
arg3 : int;
arg4 : GLXContext;
arg5 : int) return GLXContext
with Convention => C; -- /usr/include/GL/glx.h:297
type PFNGLXMAKECONTEXTCURRENTPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : GLXDrawable;
arg4 : GLXContext) return int
with Convention => C; -- /usr/include/GL/glx.h:298
type PFNGLXGETCURRENTREADDRAWABLEPROC is access function return GLXDrawable
with Convention => C; -- /usr/include/GL/glx.h:299
type PFNGLXGETCURRENTDISPLAYPROC is access function return access Xlib.Display
with Convention => C; -- /usr/include/GL/glx.h:300
type PFNGLXQUERYCONTEXTPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXContext;
arg3 : int;
arg4 : access int) return int
with Convention => C; -- /usr/include/GL/glx.h:301
type PFNGLXSELECTEVENTPROC is access procedure
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : unsigned_long)
with Convention => C; -- /usr/include/GL/glx.h:302
type PFNGLXGETSELECTEDEVENTPROC is access procedure
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : access unsigned_long)
with Convention => C; -- /usr/include/GL/glx.h:303
-- * ARB 2. GLX_ARB_get_proc_address
--
type uu_GLXextFuncPtr is access procedure
with Convention => C; -- /usr/include/GL/glx.h:312
function glXGetProcAddressARB (arg1 : access GL.GLubyte) return uu_GLXextFuncPtr -- /usr/include/GL/glx.h:313
with Import => True,
Convention => C,
External_Name => "glXGetProcAddressARB";
-- GLX 1.4 and later
--Troodon: change procname type and return type
function glXGetProcAddress (procname : access Interfaces.C.char) return uu_GLXextFuncPtr -- /usr/include/GL/glx.h:320
--function glXGetProcAddress (procname : access GL.GLubyte) return access procedure -- /usr/include/GL/glx.h:320
with Import => True,
Convention => C,
External_Name => "glXGetProcAddress";
-- GLX 1.4 function pointer typedefs
type PFNGLXGETPROCADDRESSPROC is access function (arg1 : access GL.GLubyte) return uu_GLXextFuncPtr
with Convention => C; -- /usr/include/GL/glx.h:323
--*
-- ** The following aren't in glxext.h yet.
-- *
-- * ???. GLX_NV_vertex_array_range
--
function glXAllocateMemoryNV
(size : GL.GLsizei;
readfreq : GL.GLfloat;
writefreq : GL.GLfloat;
priority : GL.GLfloat) return System.Address -- /usr/include/GL/glx.h:344
with Import => True,
Convention => C,
External_Name => "glXAllocateMemoryNV";
procedure glXFreeMemoryNV (pointer : System.Address) -- /usr/include/GL/glx.h:345
with Import => True,
Convention => C,
External_Name => "glXFreeMemoryNV";
type PFNGLXALLOCATEMEMORYNVPROC is access function
(arg1 : GL.GLsizei;
arg2 : GL.GLfloat;
arg3 : GL.GLfloat;
arg4 : GL.GLfloat) return System.Address
with Convention => C; -- /usr/include/GL/glx.h:346
type PFNGLXFREEMEMORYNVPROC is access procedure (arg1 : System.Address)
with Convention => C; -- /usr/include/GL/glx.h:347
-- * ARB ?. GLX_ARB_render_texture
-- * XXX This was never finalized!
--
function glXBindTexImageARB
(dpy : access Xlib.Display;
pbuffer : GLXPbuffer;
buffer : int) return int -- /usr/include/GL/glx.h:359
with Import => True,
Convention => C,
External_Name => "glXBindTexImageARB";
function glXReleaseTexImageARB
(dpy : access Xlib.Display;
pbuffer : GLXPbuffer;
buffer : int) return int -- /usr/include/GL/glx.h:360
with Import => True,
Convention => C,
External_Name => "glXReleaseTexImageARB";
function glXDrawableAttribARB
(dpy : access Xlib.Display;
draw : GLXDrawable;
attribList : access int) return int -- /usr/include/GL/glx.h:361
with Import => True,
Convention => C,
External_Name => "glXDrawableAttribARB";
-- * #?. GLX_MESA_swap_frame_usage
--
function glXGetFrameUsageMESA
(dpy : access Xlib.Display;
drawable : GLXDrawable;
usage : access float) return int -- /usr/include/GL/glx.h:372
with Import => True,
Convention => C,
External_Name => "glXGetFrameUsageMESA";
function glXBeginFrameTrackingMESA (dpy : access Xlib.Display; drawable : GLXDrawable) return int -- /usr/include/GL/glx.h:373
with Import => True,
Convention => C,
External_Name => "glXBeginFrameTrackingMESA";
function glXEndFrameTrackingMESA (dpy : access Xlib.Display; drawable : GLXDrawable) return int -- /usr/include/GL/glx.h:374
with Import => True,
Convention => C,
External_Name => "glXEndFrameTrackingMESA";
function glXQueryFrameTrackingMESA
(dpy : access Xlib.Display;
drawable : GLXDrawable;
swapCount : access bits_stdint_intn_h.int64_t;
missedFrames : access bits_stdint_intn_h.int64_t;
lastMissedUsage : access float) return int -- /usr/include/GL/glx.h:375
with Import => True,
Convention => C,
External_Name => "glXQueryFrameTrackingMESA";
type PFNGLXGETFRAMEUSAGEMESAPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : access float) return int
with Convention => C; -- /usr/include/GL/glx.h:377
type PFNGLXBEGINFRAMETRACKINGMESAPROC is access function (arg1 : access Xlib.Display; arg2 : GLXDrawable) return int
with Convention => C; -- /usr/include/GL/glx.h:378
type PFNGLXENDFRAMETRACKINGMESAPROC is access function (arg1 : access Xlib.Display; arg2 : GLXDrawable) return int
with Convention => C; -- /usr/include/GL/glx.h:379
type PFNGLXQUERYFRAMETRACKINGMESAPROC is access function
(arg1 : access Xlib.Display;
arg2 : GLXDrawable;
arg3 : access bits_stdint_intn_h.int64_t;
arg4 : access bits_stdint_intn_h.int64_t;
arg5 : access float) return int
with Convention => C; -- /usr/include/GL/glx.h:380
-- * #?. GLX_MESA_swap_control
--
--** Should these go here, or in another header?
--** GLX Events
--
-- GLX_DAMAGED or GLX_SAVED
-- skipped anonymous struct anon_113
type GLXPbufferClobberEvent is record
event_type : aliased int; -- /usr/include/GL/glx.h:406
draw_type : aliased int; -- /usr/include/GL/glx.h:407
serial : aliased unsigned_long; -- /usr/include/GL/glx.h:408
send_event : aliased int; -- /usr/include/GL/glx.h:409
the_display : access Xlib.Display; -- /usr/include/GL/glx.h:410
drawable : aliased GLXDrawable; -- /usr/include/GL/glx.h:411
buffer_mask : aliased unsigned; -- /usr/include/GL/glx.h:412
aux_buffer : aliased unsigned; -- /usr/include/GL/glx.h:413
x : aliased int; -- /usr/include/GL/glx.h:414
y : aliased int; -- /usr/include/GL/glx.h:414
width : aliased int; -- /usr/include/GL/glx.h:415
height : aliased int; -- /usr/include/GL/glx.h:415
count : aliased int; -- /usr/include/GL/glx.h:416
end record
with Convention => C_Pass_By_Copy; -- /usr/include/GL/glx.h:417
-- GLX_WINDOW or GLX_PBUFFER
-- # of last request processed by server
-- true if this came for SendEvent request
-- display the event was read from
-- XID of Drawable
-- mask indicating which buffers are affected
-- which aux buffer was affected
-- if nonzero, at least this many more
-- skipped anonymous struct anon_114
type GLXBufferSwapComplete is record
c_type : aliased int; -- /usr/include/GL/glx.h:420
serial : aliased unsigned_long; -- /usr/include/GL/glx.h:421
send_event : aliased int; -- /usr/include/GL/glx.h:422
the_display : access Xlib.Display; -- /usr/include/GL/glx.h:423
the_drawable : aliased X11.Drawable; -- /usr/include/GL/glx.h:424
event_type : aliased int; -- /usr/include/GL/glx.h:425
ust : aliased bits_stdint_intn_h.int64_t; -- /usr/include/GL/glx.h:426
msc : aliased bits_stdint_intn_h.int64_t; -- /usr/include/GL/glx.h:427
sbc : aliased bits_stdint_intn_h.int64_t; -- /usr/include/GL/glx.h:428
end record
with Convention => C_Pass_By_Copy; -- /usr/include/GL/glx.h:429
-- # of last request processed by server
-- true if this came from a SendEvent request
-- Display the event was read from
-- drawable on which event was requested in event mask
type uu_GLXEvent_array1233 is array (0 .. 23) of aliased long;
type uu_GLXEvent (discr : unsigned := 0) is record
case discr is
when 0 =>
glxpbufferclobber : aliased GLXPbufferClobberEvent; -- /usr/include/GL/glx.h:432
when 1 =>
the_glxbufferswapcomplete : aliased GLXBufferSwapComplete; -- /usr/include/GL/glx.h:433
when others =>
pad : aliased uu_GLXEvent_array1233; -- /usr/include/GL/glx.h:434
end case;
end record
with Convention => C_Pass_By_Copy,
Unchecked_Union => True; -- /usr/include/GL/glx.h:431
subtype GLXEvent is uu_GLXEvent; -- /usr/include/GL/glx.h:435
end glx;
|
programs/oeis/066/A066520.asm
|
neoneye/loda
| 22 |
9623
|
; A066520: Number of primes of the form 4m+3 <= n minus number of primes of the form 4m+1 <= n.
; 0,0,1,1,0,0,1,1,1,1,2,2,1,1,1,1,0,0,1,1,1,1,2,2,2,2,2,2,1,1,2,2,2,2,2,2,1,1,1,1,0,0,1,1,1,1,2,2,2,2,2,2,1,1,1,1,1,1,2,2,1,1,1,1,1,1,2,2,2,2,3,3,2,2,2,2,2,2,3,3,3,3,4,4,4,4,4,4,3,3,3,3,3,3,3,3,2,2,2,2
lpb $0
mov $2,$0
sub $0,1
div $0,2
mul $0,2
seq $2,151763 ; If n is a prime == 1 mod 4 then a(n) = 1, if n is a prime == 3 mod 4 then a(n) = -1, otherwise a(n) = 0.
add $3,$2
lpe
sub $1,$3
mov $0,$1
|
src/gnat/stand.adb
|
Letractively/ada-gen
| 0 |
26450
|
<filename>src/gnat/stand.adb
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S T A N D --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992,1993,1994,1995,2009 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 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System; use System;
with Tree_IO; use Tree_IO;
package body Stand is
---------------
-- Tree_Read --
---------------
procedure Tree_Read is
begin
Tree_Read_Data (Standard_Entity'Address,
Standard_Entity_Array_Type'Size / Storage_Unit);
Tree_Read_Int (Int (Standard_Package_Node));
Tree_Read_Int (Int (Last_Standard_Node_Id));
Tree_Read_Int (Int (Last_Standard_List_Id));
Tree_Read_Int (Int (Standard_Void_Type));
Tree_Read_Int (Int (Standard_Exception_Type));
Tree_Read_Int (Int (Standard_A_String));
Tree_Read_Int (Int (Any_Id));
Tree_Read_Int (Int (Any_Type));
Tree_Read_Int (Int (Any_Access));
Tree_Read_Int (Int (Any_Array));
Tree_Read_Int (Int (Any_Boolean));
Tree_Read_Int (Int (Any_Character));
Tree_Read_Int (Int (Any_Composite));
Tree_Read_Int (Int (Any_Discrete));
Tree_Read_Int (Int (Any_Fixed));
Tree_Read_Int (Int (Any_Integer));
Tree_Read_Int (Int (Any_Numeric));
Tree_Read_Int (Int (Any_Real));
Tree_Read_Int (Int (Any_Scalar));
Tree_Read_Int (Int (Any_String));
Tree_Read_Int (Int (Universal_Integer));
Tree_Read_Int (Int (Universal_Real));
Tree_Read_Int (Int (Universal_Fixed));
Tree_Read_Int (Int (Standard_Integer_8));
Tree_Read_Int (Int (Standard_Integer_16));
Tree_Read_Int (Int (Standard_Integer_32));
Tree_Read_Int (Int (Standard_Integer_64));
Tree_Read_Int (Int (Abort_Signal));
Tree_Read_Int (Int (Standard_Op_Rotate_Left));
Tree_Read_Int (Int (Standard_Op_Rotate_Right));
Tree_Read_Int (Int (Standard_Op_Shift_Left));
Tree_Read_Int (Int (Standard_Op_Shift_Right));
Tree_Read_Int (Int (Standard_Op_Shift_Right_Arithmetic));
end Tree_Read;
----------------
-- Tree_Write --
----------------
procedure Tree_Write is
begin
Tree_Write_Data (Standard_Entity'Address,
Standard_Entity_Array_Type'Size / Storage_Unit);
Tree_Write_Int (Int (Standard_Package_Node));
Tree_Write_Int (Int (Last_Standard_Node_Id));
Tree_Write_Int (Int (Last_Standard_List_Id));
Tree_Write_Int (Int (Standard_Void_Type));
Tree_Write_Int (Int (Standard_Exception_Type));
Tree_Write_Int (Int (Standard_A_String));
Tree_Write_Int (Int (Any_Id));
Tree_Write_Int (Int (Any_Type));
Tree_Write_Int (Int (Any_Access));
Tree_Write_Int (Int (Any_Array));
Tree_Write_Int (Int (Any_Boolean));
Tree_Write_Int (Int (Any_Character));
Tree_Write_Int (Int (Any_Composite));
Tree_Write_Int (Int (Any_Discrete));
Tree_Write_Int (Int (Any_Fixed));
Tree_Write_Int (Int (Any_Integer));
Tree_Write_Int (Int (Any_Numeric));
Tree_Write_Int (Int (Any_Real));
Tree_Write_Int (Int (Any_Scalar));
Tree_Write_Int (Int (Any_String));
Tree_Write_Int (Int (Universal_Integer));
Tree_Write_Int (Int (Universal_Real));
Tree_Write_Int (Int (Universal_Fixed));
Tree_Write_Int (Int (Standard_Integer_8));
Tree_Write_Int (Int (Standard_Integer_16));
Tree_Write_Int (Int (Standard_Integer_32));
Tree_Write_Int (Int (Standard_Integer_64));
Tree_Write_Int (Int (Abort_Signal));
Tree_Write_Int (Int (Standard_Op_Rotate_Left));
Tree_Write_Int (Int (Standard_Op_Rotate_Right));
Tree_Write_Int (Int (Standard_Op_Shift_Left));
Tree_Write_Int (Int (Standard_Op_Shift_Right));
Tree_Write_Int (Int (Standard_Op_Shift_Right_Arithmetic));
end Tree_Write;
end Stand;
|
src/main/antlr4/kdlLexerModified.g4
|
cliserkad/bitter
| 0 |
3392
|
lexer grammar kdlLexerModified;
@header {
package com.xarql.kdl.antlr;
}
// skip over whitespace
WS: [ \t\r\n];
// quotes
QUOTE: '"';
STRING_LIT: QUOTE (~["\\] | '\\' .)* QUOTE;
CHAR_LIT: '\'' . '\'';
// keywords
TYPE: 'type';
CONST: 'const';
MAIN: 'main';
RETURN: 'return';
USE: 'use';
PATH: 'path';
IF: 'if';
ELSE: 'else';
NULL: 'null';
ASSERT: 'assert';
WHILE: 'while';
FOR: 'for';
THIS: 'this';
// base types
BOOLEAN: 'boolean';
BYTE: 'byte';
SHORT: 'short';
CHAR: 'char';
INT: 'int';
FLOAT: 'float';
LONG: 'long';
DOUBLE: 'double';
STRING: 'string';
// boolean values
TRUE: 'true';
FALSE: 'false';
// syntax
CURL_L: '{';
CURL_R: '}';
PAREN_L: '(';
PAREN_R: ')';
BRACE_L: '[';
BRACE_R: ']';
DOT: '.';
SLASH: '/';
COMMA: ',';
SEMICOLON: ';';
COLON: ':';
TILDE: '~';
QUESTION_MARK: '?';
// comparators
NOT_EQUAL: '!=';
EQUAL: '=';
LESS_THAN: '<';
MORE_THAN: '>';
LESS_OR_EQUAL: '<=';
MORE_OR_EQUAL: '>=';
ADDRESS_EQUAL: '@';
ADDRESS_NOT_EQUAL: '!@';
IS_A: '#';
IS_NOT_A: '!#';
// operators
PLUS: '+';
MINUS: '-';
MULTIPLY: '*';
MODULUS: '%';
NOT: '!';
INCREMENT: '++';
DECREMENT: '--';
// bitwise
BIT_SHIFT_LEFT: '<<';
BIT_SHIFT_RIGHT: '>>';
BIT_SHIFT_RIGHT_UNSIGNED: '>>>';
BIT_AND: '&';
BIT_OR: '|';
BIT_XOR: '^';
// appenders
AND: '&&';
OR: '||';
XOR: '^^';
// misc
HEX_LIT: '0x' [0-9a-fA-F]*;
BIN_LIT: '0b' [01] [01,_]*;
NUMBER: [0-9] [0-9,_]*;
FRACTION: NUMBER DOT NUMBER;
// match anything that is unmatched and has no syntax characters
IDENTIFIER: ~([0123456789\r\t\n &|+<>=?!*.~:;,(){}'"/\\%$#]|'['|']') ~([\r\t\n &|+<>=?!*.~:;,(){}'"/\\%$#]|'['|']')*;
UNMATCHED: .+?;
// COMMENT: '//' .*? '\n';
COMMENT: '//' -> mode(COMMENT_MODE), more;
// BLOCK_COMMENT: '/*' .*? '*/';
mode COMMENT_MODE;
COMMENT_TEXT: ~'\n'* '\n'? -> mode(DEFAULT_MODE);
|
libsrc/_DEVELOPMENT/adt/ba_priority_queue/c/sdcc_iy/ba_priority_queue_push_callee.asm
|
jpoikela/z88dk
| 640 |
104140
|
<reponame>jpoikela/z88dk
; int ba_priority_queue_push_callee(ba_priority_queue_t *q, int c)
SECTION code_clib
SECTION code_adt_ba_priority_queue
PUBLIC _ba_priority_queue_push_callee
EXTERN asm_ba_priority_queue_push
_ba_priority_queue_push_callee:
pop af
pop hl
pop bc
push af
jp asm_ba_priority_queue_push
|
src/sound/song366restored.asm
|
MusicTheorist/Mother2GbaTranslation
| 1 |
176610
|
song366restored_pri equ 100
song366restored_rev equ 0
song366restored_mvl equ 127
song366restored_key equ 0
song366restored_tbs equ 1
song366restored_exg equ 0
song366restored_cmp equ 1
.align 4
;**************** Track 1 (Midi-Chn.7) ****************;
@song366restored_1:
.byte KEYSH , song366restored_key+0
; 000 ----------------------------------------
.byte VOICE , 7
.byte PAN , c_v+63
.byte VOL , 100*song366restored_mvl/mxv
.byte PAN , c_v+63
.byte VOL , 100*song366restored_mvl/mxv
.byte 100*song366restored_mvl/mxv
.byte PAN , c_v+63
.byte c_v+63
.byte VOL , 100*song366restored_mvl/mxv
.byte 100*song366restored_mvl/mxv
.byte PAN , c_v+63
.byte c_v+63
.byte VOL , 100*song366restored_mvl/mxv
.byte BEND , c_v+0
.byte N02 , An0 , v100
.byte W04
.byte BEND , c_v+0
.byte N02 , Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W03
.byte VOL , 47*song366restored_mvl/mxv
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W03
.byte VOL , 28*song366restored_mvl/mxv
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W03
.byte VOL , 0*song366restored_mvl/mxv
.byte PAN , c_v-64
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W04
.byte An3
.byte W04
.byte Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
; 001 ----------------------------------------
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W04
.byte An3
.byte W04
.byte Bn3
.byte W04
.byte An3
.byte W04
.byte BEND , c_v-1
.byte N02 , Fs3
.byte W04
.byte BEND , c_v+0
.byte N02 , Ds3
.byte W03
.byte VOL , 92*song366restored_mvl/mxv
.byte PAN , c_v+46
.byte W72
.byte VOL , 100*song366restored_mvl/mxv
.byte PAN , c_v+63
.byte BEND , c_v+0
.byte W01
; 002 ----------------------------------------
.byte VOICE , 7
.byte PAN , c_v+46
.byte VOL , 92*song366restored_mvl/mxv
.byte PAN , c_v+46
.byte VOL , 92*song366restored_mvl/mxv
.byte BEND , c_v+0
.byte FINE
;**************** Track 2 (Midi-Chn.8) ****************;
@song366restored_2:
.byte KEYSH , song366restored_key+0
; 000 ----------------------------------------
.byte VOICE , 7
.byte PAN , c_v-64
.byte VOL , 104*song366restored_mvl/mxv
.byte 104*song366restored_mvl/mxv
.byte 104*song366restored_mvl/mxv
.byte PAN , c_v-64
.byte VOL , 104*song366restored_mvl/mxv
.byte 104*song366restored_mvl/mxv
.byte PAN , c_v-64
.byte VOL , 104*song366restored_mvl/mxv
.byte BEND , c_v-1
.byte N02 , An0 , v100
.byte W04
.byte BEND , c_v-1
.byte N02 , Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W03
.byte VOL , 99*song366restored_mvl/mxv
.byte W01
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W03
.byte VOL , 80*song366restored_mvl/mxv
.byte PAN , c_v-48
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W04
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W03
.byte VOL , 67*song366restored_mvl/mxv
.byte PAN , c_v-64
.byte VOL , 73*song366restored_mvl/mxv
.byte PAN , c_v-21
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W04
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W03
.byte VOL , 47*song366restored_mvl/mxv
.byte PAN , c_v+0
.byte VOL , 63*song366restored_mvl/mxv
.byte PAN , c_v+32
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W04
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W03
.byte VOL , 47*song366restored_mvl/mxv
.byte PAN , c_v+63
.byte W01
.byte N02 , An3
.byte W04
.byte Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W04
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
; 001 ----------------------------------------
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W04
.byte An3
.byte W04
.byte Bn3
.byte W04
.byte BEND , c_v-1
.byte N02 , Gs3
.byte W04
.byte BEND , c_v-1
.byte N02 , En3
.byte W04
.byte BEND , c_v-1
.byte N02 , Ds3
.byte W03
.byte VOL , 92*song366restored_mvl/mxv
.byte PAN , c_v-44
.byte W72
.byte VOL , 104*song366restored_mvl/mxv
.byte PAN , c_v-64
.byte BEND , c_v-1
.byte W01
; 002 ----------------------------------------
.byte VOICE , 7
.byte PAN , c_v-44
.byte VOL , 92*song366restored_mvl/mxv
.byte PAN , c_v-44
.byte VOL , 92*song366restored_mvl/mxv
.byte BEND , c_v-1
.byte FINE
;******************************************************;
.align 4
song366restored:
.byte 2 ; NumTrks
.byte 0 ; NumBlks
.byte song366restored_pri ; Priority
.byte song366restored_rev ; Reverb.
//emit_clean_voicegroup_offset_for_song 366
.word 0x81071B4 //Voice Table
.word @song366restored_1
.word @song366restored_2
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_981.asm
|
ljhsiun2/medusa
| 9 |
92836
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0xf0b7, %rbx
nop
nop
nop
nop
xor $17143, %rbp
mov (%rbx), %r10w
nop
nop
nop
nop
and $6774, %r12
lea addresses_WC_ht+0x12dc7, %rdx
nop
nop
nop
nop
nop
add %rbx, %rbx
mov (%rdx), %r14
nop
nop
nop
nop
and $37777, %rbx
lea addresses_normal_ht+0x1d5b7, %rdx
clflush (%rdx)
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm6
and $0xffffffffffffffc0, %rdx
vmovntdq %ymm6, (%rdx)
nop
nop
nop
cmp $6560, %r10
lea addresses_UC_ht+0x1a6b7, %rbp
nop
nop
nop
add $51812, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
and $0xffffffffffffffc0, %rbp
movaps %xmm0, (%rbp)
nop
nop
sub $63427, %rbp
lea addresses_WT_ht+0x100f, %rsi
lea addresses_D_ht+0x1cfd7, %rdi
nop
nop
nop
nop
and $51110, %r14
mov $78, %rcx
rep movsw
nop
nop
nop
dec %r10
lea addresses_D_ht+0x16d67, %rsi
lea addresses_A_ht+0x59c1, %rdi
nop
nop
nop
xor $42921, %rdx
mov $7, %rcx
rep movsl
xor %rbx, %rbx
lea addresses_A_ht+0x1a937, %rdx
nop
add %rcx, %rcx
movw $0x6162, (%rdx)
nop
nop
nop
and %rbx, %rbx
lea addresses_WT_ht+0x2ab7, %r12
xor %rbp, %rbp
mov $0x6162636465666768, %rbx
movq %rbx, (%r12)
nop
cmp $22213, %r12
lea addresses_D_ht+0x1e98f, %rbp
nop
nop
xor $44557, %rsi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
movups %xmm6, (%rbp)
nop
cmp $53361, %rdx
lea addresses_WC_ht+0x2f37, %r12
inc %rdi
mov $0x6162636465666768, %rbp
movq %rbp, %xmm6
vmovups %ymm6, (%r12)
nop
nop
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0x17017, %r14
nop
nop
sub %rcx, %rcx
movw $0x6162, (%r14)
nop
nop
nop
inc %rbx
lea addresses_WC_ht+0x11337, %r12
nop
nop
nop
nop
dec %r10
movw $0x6162, (%r12)
nop
cmp $19790, %r12
lea addresses_A_ht+0xefa7, %rsi
xor $51065, %rdi
movups (%rsi), %xmm3
vpextrq $0, %xmm3, %rcx
nop
nop
nop
nop
nop
sub %r14, %r14
lea addresses_WC_ht+0x4eb7, %rbp
nop
nop
cmp %r12, %r12
movl $0x61626364, (%rbp)
nop
nop
add $48163, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %rcx
push %rdi
push %rsi
// Store
lea addresses_D+0x1db7, %r10
add $4680, %rdi
movb $0x51, (%r10)
nop
sub $28350, %rdi
// Faulty Load
lea addresses_WT+0x1c8b7, %rsi
clflush (%rsi)
nop
nop
xor $40222, %rcx
vmovups (%rsi), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %r13
lea oracles, %rsi
and $0xff, %r13
shlq $12, %r13
mov (%rsi,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}}
{'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}}
{'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
*/
|
programs/oeis/070/A070646.asm
|
karttu/loda
| 1 |
17860
|
<reponame>karttu/loda
; A070646: n^6 mod 23.
; 0,1,18,16,2,8,12,4,13,3,6,9,9,6,3,13,4,12,8,2,16,18,1,0,1,18,16,2,8,12,4,13,3,6,9,9,6,3,13,4,12,8,2,16,18,1,0,1,18,16,2,8,12,4,13,3,6,9,9,6,3,13,4,12,8,2,16,18,1,0,1,18,16,2,8,12,4,13,3,6,9,9,6,3,13,4,12,8,2
pow $0,6
mod $0,23
mov $1,$0
|
test/tests.asm
|
barrettotte/Subarashii-CPU
| 1 |
244573
|
<gh_stars>1-10
; Test cases - Machine code used in src/rom.v
;
;
; Test ALU
ADD R0,R0,R0 ; [000] = 0000000000000000
ADI R1,0x02 ; [002] = 1000000100000010
ADI R2,0x01 ; [004] = 1000001000000001
ADD R3,R2,R1 ; [006] = 0000001100100001
SUB R3,R3,R0 ; [008] = 0001001100110000
AND R2,R2,R3 ; [010] = 0010001000100011
ORR R2,R3,R2 ; [012] = 0011001000110010
NOT R4,R4,R0 ; [014] = 0100010001000000
XOR R4,R4,R4 ; [016] = 0101010001000100
LSR R2,R2,R0 ; [018] = 0110001000100000
LSL R2,R2,R0 ; [020] = 0111001000100000
XOR R1,R1,R1 ; [022] = 0101000100010001
XOR R2,R2,R2 ; [024] = 0101001000100010
XOR R3,R3,R3 ; [026] = 0101001100110011
XOR R4,R4,R4 ; [028] = 0101010001000100
;
; Test SWP
ADI R1,11001100 ; [030] = 1000000111001100
ADI R2,10101010 ; [032] = 1000001010101010
SWP R3,R1,R2 ; [034] = 1001001100010010
XOR R1,R1,R1 ; [036] = 0101000100010001
XOR R2,R2,R2 ; [038] = 0101001000100010
XOR R3,R3,R3 ; [040] = 0101001100110011
;
; Test Memory
ADI R1,0x02 ; [042] = 1000000100000010 (value)
ADI R2,0x08 ; [044] = 1000001000001000 (address)
STW R0,R2,R1 ; [046] = 1011000000100001 (store R1 at address R2)
XOR R1,R1,R1 ; [048] = 0101000100010001
LDW R1,R2,R0 ; [050] = 1010000100100000 (load R1 from address R2)
ADD R0,R1,R0 ; [052] = 0000000000010000
XOR R1,R1,R1 ; [054] = 0101000100010001
XOR R2,R2,R2 ; [056] = 0101001000100010
;
; Test Branch (relative addressing)
ADI R1,0x03 ; [058] = 1000000100000011 (skip next 3 instructions if Z)
BRZ R0,R0,R1 ; [060] = 1100000000000001 (0 - 0 == 0)
ADD R0,R0,R0 ; [062] = 0000000000000000 (will be skipped)
ADD R0,R0,R0 ; [064] = 0000000000000000 (will be skipped)
ADD R0,R0,R0 ; [066] = 0000000000000000 (will be skipped)
ADI R1,0x07 ; [068] = 1000000100000111 (branch lands here)
XOR R1,R1,R1 ; [070] = 0101000100010001
;
; Test Jump (absolute addressing)
ADI R1,0x52 ; [072] = 1000001001010010 (address 082)
JAL R1,R2,R0 ; [074] = 1101000100100000 (link to R1, jump to R2)
ADD R0,R0,R0 ; [076] = 0000000000000000 (will be skipped)
ADD R0,R0,R0 ; [078] = 0000000000000000 (will be skipped)
ADD R0,R0,R0 ; [080] = 0000000000000000 (will be skipped)
ADD R1,R1,R0 ; [082] = 0000000100010000 (jump lands here)
XOR R1,R1,R1 ; [084] = 0101000100010001
XOR R2,R2,R2 ; [086] = 0101001000100010
;
|
DE-LAB-2/main.asm
|
tustunkok/CMPE236-Labs
| 0 |
16763
|
; GLOBAL 7SEG CONSTANTS
N0 EQU 11000000B ; #DEFINE N0 11000000B
N1 EQU 11111001B
N2 EQU 10100100B
N3 EQU 10110000B
N4 EQU 10011001B
N5 EQU 10010010B
N6 EQU 10000010B
N7 EQU 11111000B
N8 EQU 10000000B
N9 EQU 10010000B
NA EQU 10001000B
NB EQU 10000011B
NC EQU 11000110B
ND EQU 10100001B
NE_ EQU 10000110B
NF EQU 10001110B
; CONTSTANTS
ATTEMPT_LOC EQU 20H
PASSWD_LOC EQU 21H ; PASSWD_LOC[4]
EN EQU P3.0
LENGTH EQU 04D
ORG 00H
SJMP MAIN
ORG 30H
MAIN: MOV ATTEMPT_LOC, #03D ; INT ATTEMPT = 3;
ACALL GET_PASSWD ; LET THE USER ENTER HıS/HER PASSWORD ı<PASSWORD>
ACALL CHCK_PASSWD ; CHECK IF THE PASSWORD ENTERED CORRECTLY
; COMPARE THE RETURNED VALUE WITH THE PASSWORD
; LENGTH TO SEE IF THEY ARE EQUAL OR NOT.
CJNE A, #LENGTH, ERROR
; PASSWORD IS CORRECT
MOV R2, #0CH
ACALL WRT2LED
SJMP HALT
; PASSWORD IS NOT CORRECT
ERROR: MOV R2, #0FH
ACALL WRT2LED
HALT: SJMP HALT
; ===================================================
; CHECK THE ENTERED DIGITS BY THE USER
; PARAMS: NONE
; RETURN: NUMBER OF CORRECTLY ENTERED DIGITS
CHCK_PASSWD: MOV R2, #LENGTH ;INT PWD_LENGTH=4;
MOV R0, #PASSWD_LOC ;LOAD THE R0 TO THE PLACE WHERE PASSWORD RESIDES
CLR A ;INT CORRECT_COUNT = 0
PUSH A
LP2: PUSH 02H ;SAVE THE PREVIOUS VALUE OF THE R2 REGISTER
MOV R2, ATTEMPT_LOC ;PARAMETER LOADING, WRT2LED(ATTEMPT_COUNT)
ACALL WRT2LED
POP 02H ;GET THE PREVIOUS R2 VALUE
LP3: JB EN, LP3 ;WAIT UNTILL THE USER OPENS ENABLE PIN
MOV A, P2 ;GET A DIGIT FROM THE USER
CLR C
SUBB A, @R0 ;CHECKT THE CORRESPONDING DIGIT IN THE PSWD
JZ CONT
DJNZ ATTEMPT_LOC, LP2 ;ATTEMPT_COUNT --;
MOV R2, ATTEMPT_LOC ;ATTEMPT COUNT IS FINISHED
ACALL WRT2LED ;WRITE 0 TO 7SEG DISPLAY
SJMP EXT ;GO TO THE EXIT
;IF(DIGIT=PASSWORD[I]){CORRECT_COUNT++;}
CONT: INC R0 ;MOVE THE POINTER TO THE NEXT VALUE
POP A ;GET THE CORRECT_COUNT VARIABLE
INC A ;CORRECT_COUNT++
PUSH A
DJNZ R2, LP2
EXT: POP A ;RETURN CORRECT_COUNT++
RET
; ===================================================
; GET 4 DIGIT PASSWORD FROM USER
; PARAMS: NONE
; RETURN: NONE
GET_PASSWD: MOV R2, #LENGTH ; INT PASSWORD_LENGTH=4;
MOV R0, #PASSWD_LOC ; LOAD R0 POINTER WITH THE VALUE OF 21H
LP1: JB EN, LP1 ; WAIT UNTILL THE USER OPENS ENABLE PIN
MOV @R0, P2
INC R0
DJNZ R2, LP1 ; PASSWORD_LENGTH --;
RET
; ===================================================
; WRITE THE GIVEN NUMBER TO THE 7SEG DISPLAY
; PARAMS: NUMBER
; RETURN: NONE
WRT2LED: MOV DPTR, #LED_DATA
MOV A, #0FH ; IF(PARAMETER>MAX_VALUE){RETURN;}
CLR C ; CLEAR THE CARRY BIT
SUBB A, R2
JC EXT1 ; IF CARRY OCCURS DO NOTHING
MOV A, R2 ; READ THE PARAMETER
MOVC A, @A+DPTR
MOV P1, A
EXT1: RET
ORG 0200H
LED_DATA: DB N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, NA, NB, NC, ND, NE_, NF
END
|
examples/scrload/loader.asm
|
mahlemiut/cpcbuilder
| 4 |
25918
|
; Screen loading test app.
include "firmware.inc"
org &8000
.start:
; enter mode 2 (640x200)
ld a,2
call scr_set_mode
; open file
ld b,10 ; filename length
ld hl,.filename ; filename
ld de,.buffer ; buffer
call cas_in_open
call z,.openfail ; display fail message if open fails
; load file contents into RAM
ld hl,&c000
call cas_in_direct
call z,.openfail
; close file
call &bc7a
; and exit
jr .exit
.openfail:
ld hl,.msg_openfail
.txtloop:
ld a,(hl)
cp 0
jr z,.txtdone
call txt_output
inc hl
jr .txtloop
.txtdone:
ret
.exit:
ret
.msg_openfail:
defb "Unable to open screen data."
defb 13,10,0
.filename:
defb "shock2.bin"
defb 0
.buffer:
defs 2048
; will be used for file buffer by the BIOS
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c87b06a.ada
|
best08618/asylo
| 7 |
20662
|
-- C87B06A.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:
-- CHECK THAT OVERLOADING RESOLUTION USES THE RULE THAT:
--
-- FOR EACH INTEGER TYPE, THERE EXISTS AN IMPLICIT CONVERSION THAT
-- CONVERTS A UNIVERSAL INTEGER VALUE INTO THE CORRESPONDING VALUE
-- OF THE INTEGER TYPE. THIS TEST USES LITERALS AS UNIVERSAL INTEGER
-- VALUES.
-- HISTORY:
-- TRH 08/11/82 CREATED ORIGINAL TEST.
-- DHH 10/20/87 SHORTENED LINES CONTAINING MORE THAN 72 CHARACTERS.
WITH REPORT; USE REPORT;
PROCEDURE C87B06A IS
TYPE MINOR IS NEW INTEGER RANGE 0 .. 17;
TYPE FIXED IS NEW DURATION;
TYPE REAL IS NEW FLOAT;
ERR : BOOLEAN := FALSE;
PROCEDURE P (X : BOOLEAN) IS
BEGIN
ERR := TRUE;
END P;
PROCEDURE P (X : FIXED) IS
BEGIN
ERR := TRUE;
END P;
PROCEDURE P (X : REAL) IS
BEGIN
ERR := TRUE;
END P;
PROCEDURE P (X : FLOAT) IS
BEGIN
ERR := TRUE;
END P;
PROCEDURE P (X : STRING) IS
BEGIN
ERR := TRUE;
END P;
PROCEDURE P (X : MINOR) IS
BEGIN
NULL;
END P;
BEGIN
TEST("C87B06A","OVERLOADING RESOLUTION WITH IMPLICIT CONVERSION " &
"OF UNIVERSAL INTEGER VALUES TO INTEGER VALUES. " &
"CONVERSIONS TO INTEGER VALUES EXISTS FOR ANY INTEGER TYPE");
P (2);
P (2 * 2 + 2);
IF ERR THEN
FAILED("INCORRECT IMPLICIT CONVERSION FROM UNIVERSAL " &
" INTEGER VALUES TO INTEGER TYPE VALUES");
END IF;
RESULT;
END C87B06A;
|
source/protocol/lsp-servers-handlers.ads
|
reznikmm/ada_lsp
| 11 |
23235
|
-- Copyright (c) 2017 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
private package LSP.Servers.Handlers is
pragma Preelaborate;
procedure DidChangeConfiguration
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
procedure DidOpenTextDocument
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
procedure DidCloseTextDocument
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
procedure DidChangeTextDocument
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
procedure DidSaveTextDocument
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
function Do_Code_Action
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Completion
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Definition
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Document_Symbol
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Execute_Command
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
procedure Do_Exit
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
function Do_Highlight
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Hover
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Not_Found
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Initialize
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_References
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Shutdown
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Signature_Help
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
function Do_Workspace_Symbol
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Request_Handler_Access)
return LSP.Messages.ResponseMessage'Class;
procedure Ignore_Notification
(Stream : access Ada.Streams.Root_Stream_Type'Class;
Handler : not null LSP.Message_Handlers.Notification_Handler_Access);
end LSP.Servers.Handlers;
|
Transynther/x86/_processed/NONE/_ht_zr_/i7-7700_9_0x48.log_21829_447.asm
|
ljhsiun2/medusa
| 9 |
3856
|
<filename>Transynther/x86/_processed/NONE/_ht_zr_/i7-7700_9_0x48.log_21829_447.asm
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x18c38, %rsi
lea addresses_D_ht+0x1e1f8, %rdi
nop
add $60780, %rdx
mov $80, %rcx
rep movsw
nop
nop
nop
nop
nop
and $15990, %rbx
lea addresses_WC_ht+0x13d9e, %rax
nop
sub $58439, %r11
mov $0x6162636465666768, %rcx
movq %rcx, (%rax)
nop
nop
nop
nop
nop
inc %rbx
lea addresses_A_ht+0xf2d8, %rsi
lea addresses_WC_ht+0x1f54, %rdi
nop
nop
nop
add %r10, %r10
mov $33, %rcx
rep movsw
nop
nop
nop
nop
and %r11, %r11
lea addresses_WC_ht+0x18038, %rsi
lea addresses_WC_ht+0x5278, %rdi
clflush (%rsi)
nop
nop
nop
nop
sub $15216, %r11
mov $110, %rcx
rep movsb
nop
nop
nop
nop
nop
and $15167, %rbx
lea addresses_UC_ht+0x1b838, %rsi
lea addresses_D_ht+0x1a038, %rdi
and %r10, %r10
mov $80, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rdi
lea addresses_WT_ht+0x1bc38, %rcx
nop
nop
nop
nop
nop
add %rdx, %rdx
mov (%rcx), %r11w
nop
sub $12909, %rax
lea addresses_UC_ht+0x150b8, %rcx
clflush (%rcx)
nop
nop
nop
nop
nop
sub $17824, %rdx
vmovups (%rcx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r10
nop
xor %rcx, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %rax
push %rbp
push %rbx
// Load
lea addresses_UC+0xe258, %r11
nop
nop
nop
inc %rbp
movb (%r11), %al
sub %rbp, %rbp
// Faulty Load
lea addresses_UC+0x1e838, %rax
nop
nop
nop
cmp %rbx, %rbx
movups (%rax), %xmm6
vpextrq $1, %xmm6, %r10
lea oracles, %rbx
and $0xff, %r10
shlq $12, %r10
mov (%rbx,%r10,1), %r10
pop %rbx
pop %rbp
pop %rax
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'67': 1, '47': 4, '48': 7742, '45': 1166, '00': 12916}
00 48 00 48 00 48 00 48 00 48 00 48 00 45 48 00 00 00 00 00 00 48 00 48 00 00 48 00 48 00 48 00 00 00 48 00 48 00 00 48 00 48 00 00 00 00 00 00 00 00 00 48 00 48 00 48 00 00 48 00 48 48 00 48 00 48 00 00 48 00 48 00 00 00 45 00 00 00 00 00 48 00 48 00 48 48 48 00 48 48 00 48 00 00 48 48 00 48 00 00 48 00 48 00 00 00 00 48 48 00 48 00 00 48 00 00 48 00 48 00 00 48 00 48 00 00 48 00 00 00 00 00 48 00 48 00 48 00 48 48 00 48 00 48 00 00 48 45 48 00 00 00 00 00 48 00 48 00 48 00 00 48 00 48 48 00 48 00 48 00 00 48 00 48 00 00 48 45 48 00 00 00 00 48 00 00 00 00 00 00 48 00 48 00 00 00 48 00 48 45 48 00 48 00 48 00 00 00 00 48 00 48 48 45 48 00 48 00 48 48 48 00 48 00 45 48 00 48 00 00 48 45 00 00 00 00 00 00 45 00 00 48 00 48 48 45 48 00 48 00 48 48 45 48 00 00 48 00 48 00 48 00 48 45 48 00 48 00 48 00 00 00 48 00 48 00 00 48 00 00 48 00 48 48 00 48 00 48 00 48 48 00 48 00 00 00 00 00 00 00 00 48 00 48 00 45 48 00 48 00 48 00 45 48 48 00 48 48 00 48 00 48 00 48 48 00 48 00 48 48 00 48 00 48 00 00 48 48 00 48 00 48 48 00 48 00 48 48 45 48 00 00 00 00 48 45 48 00 48 00 48 00 48 48 45 48 00 00 00 00 48 45 00 00 00 00 00 00 00 00 00 00 00 48 00 00 48 00 48 00 48 00 00 48 00 48 00 48 48 45 48 00 00 00 00 00 45 00 00 00 00 48 00 00 48 00 48 00 48 48 45 48 00 48 00 48 48 00 48 00 00 00 00 48 00 00 00 48 00 48 48 00 48 00 48 00 00 48 00 00 00 00 00 45 00 00 00 00 48 45 48 00 48 00 48 00 48 00 48 48 45 48 00 48 00 00 48 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 48 48 00 48 00 48 00 00 48 00 00 48 00 00 00 00 00 48 00 48 00 48 00 48 48 45 48 00 48 00 48 48 45 48 00 00 00 00 00 48 00 00 00 00 48 00 00 00 00 48 00 48 00 48 48 48 00 48 00 45 48 00 48 00 00 48 00 00 00 00 00 00 00 00 00 48 00 48 48 00 48 00 48 00 48 00 45 48 00 48 00 00 00 00 00 00 00 00 00 00 00 00 48 00 48 00 00 48 48 00 48 00 00 48 00 48 00 48 00 45 48 00 48 00 00 48 45 00 00 00 00 00 00 45 00 00 48 00 48 00 00 48 00 48 00 48 00 48 00 48 00 00 00 00 45 00 00 00 00 00 00 00 00 00 48 00 48 48 45 48 00 48 00 48 48 45 48 00 48 00 00 48 45 00 00 00 00 00 00 45 00 00 48 00 48 00 00 48 00 48 00 48 00 48 00 45 48 00 48 00 00 48 45 00 00 00 00 48 00 00 00 00 48 00 48 48 00 48 00 48 00 00 48 00 00 48 00 00 00 00 48 00 48 00 48 48 45 48 00 48 00 00 48 00 48 00 48 00 48 00 00 48 00 48 00 48 00 00 48 00 00 00 00 00 48 00 00 48 00 48 00 00 48 00 48 00 48 00 00 00 00 48 00 00 00 00 48 00 48 48 45 48 00 48 00 48 00 48 00 48 00 48 48 00 00 00 00 48 45 00 00 00 00 48 48 00 00 00 00 00 45 00 00 00 00 48 00 00 00 00 48 00 48 00 45 48 00 48 00 48 48 45 48 00 48 00 48 00 45 48 00 00 00 00 00 45 00 00 00 00 48 00 00 48 00 48 00 48 00 00 48 00 48 00 48 00 48 48 00 00 00 00 00 48 00 00 00 00 48 00 48 00 00 48 00 48 00 48 00 00 48 00 48 00 48 48 45 48 00 48 00 48 48 00 48 00 48 00 00 48 00 00 00 00 00 48 00 00 00 00 48 00 48 00 45 48 00 48 00 48 45 48 00 48 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 48 00 48 48 00 48 00 48 00 48 48 45 48 00 00 00 48 00 45 48 00 48 00 48 48 00 48 00 48 45 48 00 48 00 48 00 48
*/
|
src/instruction-test/xor.asm
|
brgmnn/uob-cpu-simulator
| 0 |
162619
|
<reponame>brgmnn/uob-cpu-simulator
# bitwise xor
# xor ra,rb,rc
# ra = rb ^ rc
mov r1,#7
mov r2,#28
xor r0,r1,r2
halt
|
Transynther/x86/_processed/NONE/_st_/i7-8650U_0xd2_notsx.log_1287_183.asm
|
ljhsiun2/medusa
| 9 |
15509
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x879c, %r10
clflush (%r10)
nop
xor $25705, %r9
movl $0x61626364, (%r10)
nop
nop
nop
inc %r11
lea addresses_WC_ht+0x219c, %r11
clflush (%r11)
and $63621, %rbp
mov $0x6162636465666768, %r15
movq %r15, %xmm2
movups %xmm2, (%r11)
nop
nop
nop
inc %rbx
lea addresses_WC_ht+0xe39c, %rsi
lea addresses_normal_ht+0xe75a, %rdi
nop
nop
nop
nop
add $32488, %r15
mov $92, %rcx
rep movsl
nop
nop
nop
nop
nop
add %rbp, %rbp
lea addresses_WC_ht+0x23cc, %r10
inc %r9
mov (%r10), %r11w
nop
nop
cmp $26155, %r15
lea addresses_D_ht+0x16d80, %rdi
and $796, %rsi
mov $0x6162636465666768, %rbp
movq %rbp, (%rdi)
nop
nop
nop
nop
dec %rdi
lea addresses_A_ht+0x6a54, %rsi
and $49423, %r15
mov $0x6162636465666768, %rbp
movq %rbp, %xmm7
movups %xmm7, (%rsi)
nop
nop
nop
nop
cmp $17953, %r9
lea addresses_WC_ht+0xc09c, %rsi
lea addresses_D_ht+0x7778, %rdi
nop
nop
and $59461, %r15
mov $75, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r10, %r10
lea addresses_WT_ht+0x53c, %rsi
lea addresses_WC_ht+0x17b0a, %rdi
nop
nop
nop
and %rbx, %rbx
mov $122, %rcx
rep movsw
nop
nop
nop
nop
sub $62599, %r10
lea addresses_WT_ht+0x1559c, %rdi
nop
nop
nop
dec %r11
movb (%rdi), %r10b
nop
inc %rcx
lea addresses_WC_ht+0x52d4, %r10
nop
nop
nop
nop
mfence
mov (%r10), %rcx
nop
nop
nop
nop
nop
sub %rbp, %rbp
lea addresses_UC_ht+0x10d43, %r11
nop
sub $1379, %r15
mov (%r11), %r10w
nop
cmp $56744, %rdi
lea addresses_normal_ht+0x1ba3c, %rbx
nop
nop
nop
cmp $24783, %rsi
movb $0x61, (%rbx)
nop
nop
nop
nop
and %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
// Load
lea addresses_PSE+0x18f1c, %rcx
clflush (%rcx)
nop
add $37910, %rax
vmovups (%rcx), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %r9
nop
nop
nop
cmp $49964, %rcx
// Store
lea addresses_D+0x31c, %r9
nop
nop
cmp %r14, %r14
movb $0x51, (%r9)
nop
nop
and $2528, %r9
// Store
lea addresses_WT+0x719c, %r8
add $41349, %rax
movl $0x51525354, (%r8)
cmp %rax, %rax
// REPMOV
lea addresses_WC+0x18b9c, %rsi
lea addresses_UC+0x17f9c, %rdi
nop
nop
nop
nop
nop
add %r15, %r15
mov $32, %rcx
rep movsb
nop
nop
nop
nop
and %r9, %r9
// Faulty Load
lea addresses_UC+0x17f9c, %r14
and $33247, %rax
mov (%r14), %di
lea oracles, %rax
and $0xff, %rdi
shlq $12, %rdi
mov (%rax,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 0, 'same': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'38': 1287}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
oeis/010/A010590.asm
|
neoneye/loda-programs
| 11 |
163893
|
; A010590: Decimal expansion of cube root of 18.
; Submitted by <NAME>
; 2,6,2,0,7,4,1,3,9,4,2,0,8,8,9,6,6,0,7,1,4,1,6,6,1,2,8,0,4,4,1,9,9,6,2,7,0,2,3,9,4,2,7,6,4,5,7,2,3,6,3,1,7,2,5,1,0,2,7,7,3,8,0,5,7,2,8,6,9,9,8,1,9,1,9,6,0,4,2,1,0,8,8,2,8,4,5,5,8,2,5,9,8,9,0,7,3,5,9,7
mov $3,$0
add $3,1
mul $3,3
lpb $3
add $6,$2
add $1,$6
add $1,$2
add $2,$1
mov $5,$1
mul $1,2
add $1,$5
sub $3,1
add $5,$2
add $2,1
add $6,$5
lpe
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
mov $0,$1
mod $0,10
|
programs/oeis/033/A033361.asm
|
neoneye/loda
| 22 |
82513
|
; A033361: a(n) = floor(41/n).
; 41,20,13,10,8,6,5,5,4,4,3,3,3,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
add $0,1
mov $1,41
div $1,$0
mov $0,$1
|
Univalence/FiniteFunctions.agda
|
JacquesCarette/pi-dual
| 14 |
1286
|
<gh_stars>10-100
{-# OPTIONS --without-K #-}
module FiniteFunctions where
open import Data.Vec using (tabulate; _∷_)
open import Data.Fin using (Fin; zero; suc)
open import Data.Nat using (ℕ; suc)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; cong; module ≡-Reasoning)
open import Function using (_∘_)
------------------------------------------------------------------------------
-- Important: Extensionality for finite functions
finext : {n : ℕ} {A : Set} → {f g : Fin n → A} → ((i : Fin n) → f i ≡ g i) →
(tabulate f ≡ tabulate g)
finext {0} _ = refl
finext {suc n} {_} {f} {g} fi≡gi =
begin (tabulate {suc n} f
≡⟨ refl ⟩
f zero ∷ tabulate {n} (f ∘ suc)
≡⟨ cong (λ x → x ∷ tabulate {n} (f ∘ suc)) (fi≡gi zero) ⟩
g zero ∷ tabulate {n} (f ∘ suc)
≡⟨ cong (_∷_ (g zero))
(finext {f = f ∘ suc} {g ∘ suc} (fi≡gi ∘ suc)) ⟩
g zero ∷ tabulate {n} (g ∘ suc)
≡⟨ refl ⟩
tabulate g ∎)
where open ≡-Reasoning
------------------------------------------------------------------------------
|
programs/oeis/176/A176636.asm
|
neoneye/loda
| 22 |
3056
|
<reponame>neoneye/loda
; A176636: Periodic sequence: Repeat 57, 71.
; 57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57,71,57
mod $0,2
mul $0,14
add $0,57
|
platinum-experiment-data/evolved/DeciderMutants_Evolve/11.als
|
jringert/alloy-diff
| 1 |
516
|
module decider
open Declaration
some sig NameSpace extends Class{}{
attrSet = namespaceID+namespaceName
id=namespaceID
isAbstract = No
no parent
}
some sig namespaceID extends Integer{}
some sig namespaceName extends string{}
one sig Variable extends Class{}{
//attrSet = variableID+variableName
id=variableID
isAbstract = No
no parent
}
one sig variableID extends Integer{}
one sig variableName extends string{}
some sig Relationship extends Class{}{
attrSet = relationshipID+relationshipName
id=relationshipID
isAbstract = No
}
some sig relationshipID extends Integer{}
one sig relationshipName extends string{}
one sig varAssociation extends Association{}{
src = Variable
dst = Relationship
//src_multiplicity = ONE
//dst_multiplicity = MANY
}
some sig Role extends Class{}{
attrSet = roleID //+roleName
id=roleID
no parent
}
some sig roleID extends Integer{}
abstract sig DecisionSpace extends Class{}{
attrSet = decisionSpaceName
id=namespaceID
isAbstract = No
one parent
parent in NameSpace
}
one sig decisionSpaceName extends string{}
some sig Participant extends Class{}{
attrSet=participantID
id=participantID
isAbstract = No
no parent
}
one sig participantID extends Integer{}
one sig descisionSpaceParticipantsAssociation extends Association{}{
src = DecisionSpace
dst = Participant
src_multiplicity = MANY
dst_multiplicity = MANY
}
some sig descisionSpaceVariablesAssociation extends Association{}{
//src = DecisionSpace
dst = Variable
src_multiplicity = ONE
dst_multiplicity = MANY
}
lone sig User extends Class{}{
attrSet = username+password
id=participantID
one parent
parent in Participant
isAbstract = No
}
one sig username extends string{}
lone sig password extends string{}
one sig Viewer extends Class{}{
attrSet = period
id=participantID
one parent
isAbstract = No
}
lone sig period extends Integer{}
one sig Developer extends Class{}{
attrSet = department
//id=participantID
one parent
//parent in User
//isAbstract = No
}
one sig department extends Integer{}
pred Decider{}
run Decider for 30
|
programs/oeis/031/A031164.asm
|
karttu/loda
| 0 |
241944
|
; A031164: Irreducible Euler sums of weight 8 and depth 10+2n.
; 1,4,15,40,99,212,429,800,1430,2424,3978,6288,9690,14520,21318,30624,43263,60060,82225,110968,148005,195052,254475,328640,420732,533936,672452,840480,1043460,1286832,1577532,1922496,2330445
mov $16,$0
mov $18,$0
add $18,1
lpb $18,1
clr $0,16
mov $0,$16
sub $18,1
sub $0,$18
mov $13,$0
mov $15,$0
add $15,1
lpb $15,1
clr $0,13
mov $0,$13
sub $15,1
sub $0,$15
mov $10,$0
mov $12,$0
add $12,1
lpb $12,1
clr $0,10
mov $0,$10
sub $12,1
sub $0,$12
mov $7,$0
mov $9,$0
add $9,1
lpb $9,1
mov $0,$7
sub $9,1
sub $0,$9
add $0,5
mov $2,$0
mov $4,$0
gcd $0,2
mul $0,$2
mul $4,2
mov $6,2
lpb $0,1
sub $4,$0
mov $0,5
sub $4,$6
add $4,1
bin $4,3
add $4,5
lpe
mov $1,$4
sub $1,5
div $1,4
add $8,$1
lpe
add $11,$8
lpe
add $14,$11
lpe
add $17,$14
lpe
mov $1,$17
|
data/battle/residual_effects_2.asm
|
opiter09/ASM-Machina
| 1 |
26060
|
<filename>data/battle/residual_effects_2.asm
ResidualEffects2:
; non-side effects not included in ResidualEffects1
; stat-affecting moves, sleep-inflicting moves, and Bide
; e.g., Meditate, Bide, Hypnosis
db EFFECT_01
db ATTACK_UP1_EFFECT
db DEFENSE_UP1_EFFECT
db SPEED_UP1_EFFECT
db SPECIAL_UP1_EFFECT
db ACCURACY_UP1_EFFECT
db EVASION_UP1_EFFECT
db ATTACK_DOWN1_EFFECT
db DEFENSE_DOWN1_EFFECT
db SPEED_DOWN1_EFFECT
db SPECIAL_DOWN1_EFFECT
db ACCURACY_DOWN1_EFFECT
db EVASION_DOWN1_EFFECT
db BIDE_EFFECT
db SLEEP_EFFECT
db ATTACK_UP2_EFFECT
db DEFENSE_UP2_EFFECT
db SPEED_UP2_EFFECT
db SPECIAL_UP2_EFFECT
db ACCURACY_UP2_EFFECT
db EVASION_UP2_EFFECT
db ATTACK_DOWN2_EFFECT
db DEFENSE_DOWN2_EFFECT
db SPEED_DOWN2_EFFECT
db SPECIAL_DOWN2_EFFECT
db ACCURACY_DOWN2_EFFECT
db EVASION_DOWN2_EFFECT
db -1 ; end
|
src/memory.asm
|
mdsteele/gb-pong
| 3 |
102012
|
<reponame>mdsteele/gb-pong
INCLUDE "src/hardware.inc"
;;;=========================================================================;;;
SECTION "Game-State", WRAM0
BallXVel::
DB
BallYVel::
DB
P1Score::
DB
P2Score::
DB
IsPaused::
DB
HoldingStartButton::
DB
;;;=========================================================================;;;
SECTION "Shadow-OAM", WRAM0, ALIGN[8]
ShadowOam::
UNION
DS 4 * 40
NEXTU
BallYPos::
DB
BallXPos::
DB
BallObj::
DB
DB
P1TopYPos::
DB
P1TopXPos::
DB
P1TopObj::
DB
DB
P1BotYPos::
DB
P1BotXPos::
DB
P1BotObj::
DB
DB
P2TopYPos::
DB
P2TopXPos::
DB
P2TopObj::
DB
DB
P2BotYPos::
DB
P2BotXPos::
DB
P2BotObj::
DB
DB
P1ScoreTenYPos::
DB
P1ScoreTenXPos::
DB
P1ScoreTenObj::
DB
DB
P1ScoreOneYPos::
DB
P1ScoreOneXPos::
DB
P1ScoreOneObj::
DB
DB
P2ScoreTenYPos::
DB
P2ScoreTenXPos::
DB
P2ScoreTenObj::
DB
DB
P2ScoreOneYPos::
DB
P2ScoreOneXPos::
DB
P2ScoreOneObj::
DB
DB
ENDU
ShadowOamEnd::
;;;=========================================================================;;;
SECTION "VRAM", VRAM[$8000]
VramObjTiles::
DS $800
VramSharedTiles::
DS $800
VramBgTiles::
DS $800
VramBgMap::
DS $400
VramWindowMap::
DS $400
;;;=========================================================================;;;
SECTION "OAM-Routine-ROM", ROMX
OamDmaCode::
ld a, HIGH(ShadowOam)
ldh [rDMA], a ; Start DMA transfer.
;; We need to wait 160 microseconds for the transfer to complete; the
;; following loop takes exactly that long.
ld a, 40
.loop
dec a
jr nz, .loop
ret
OamDmaCodeEnd::
SECTION "OAM-Routine-HRAM", HRAM
PerformOamDma::
DS OamDmaCodeEnd - OamDmaCode
;;;=========================================================================;;;
;;; Store the stack at the back of RAM bank 0.
SECTION "Stack", WRAM0[$CF00]
DS $100
InitStackPointer::
;;;=========================================================================;;;
|
a51test/(C0)PUSH_d.a51
|
Aimini/51cpu
| 0 |
170423
|
MOV 0x66,#0x00
MOV 0x73,#0x01
MOV 0x25,#0x02
MOV 0x30,#0x03
MOV 0x56,#0x04
MOV 0x54,#0x05
MOV 0x4C,#0x06
MOV 0x65,#0x07
PUSH 0x66
PUSH 0x73
PUSH 0x25
PUSH 0x30
PUSH 0x56
PUSH 0x54
PUSH 0x4C
PUSH 0x65
|
P6/data_P6_2/ALUTest2.asm
|
alxzzhou/BUAA_CO_2020
| 1 |
167765
|
slti $3,$0,-16199
slt $1,$4,$3
nor $6,$5,$3
srl $2,$2,0
lhu $0,6($0)
addiu $5,$4,12538
sh $3,6($0)
nor $1,$0,$3
lbu $4,2($0)
srlv $4,$4,$3
xor $3,$3,$3
subu $5,$1,$3
addiu $3,$6,22295
addu $4,$4,$3
slti $0,$0,-2982
addu $3,$3,$3
sll $3,$3,2
xori $3,$0,11806
sllv $3,$5,$3
sra $4,$3,7
sllv $4,$4,$3
addu $4,$3,$3
sb $3,12($0)
srl $5,$1,8
srav $3,$6,$3
lb $0,10($0)
srlv $4,$3,$3
ori $4,$3,47643
sll $3,$3,1
subu $6,$6,$3
srl $6,$4,9
sra $4,$4,29
subu $4,$3,$3
slti $3,$3,12199
lbu $4,0($0)
lb $3,14($0)
addu $1,$3,$3
sb $1,3($0)
sltiu $3,$5,30638
srlv $1,$3,$3
subu $3,$3,$3
sh $1,0($0)
slti $3,$4,-5827
srl $3,$3,7
xori $0,$3,5502
addu $3,$0,$3
or $4,$4,$3
sh $1,16($0)
slt $1,$3,$3
sltu $1,$2,$3
sra $5,$5,27
xor $4,$5,$3
sltiu $3,$4,21985
xori $6,$1,44776
nor $5,$1,$3
xor $3,$3,$3
srl $4,$3,19
srav $1,$1,$3
addu $6,$4,$3
slti $1,$4,14885
sllv $3,$2,$3
subu $4,$1,$3
lbu $3,14($0)
addu $3,$4,$3
ori $1,$5,65361
sh $4,10($0)
addiu $0,$5,8431
sra $0,$5,0
addu $4,$5,$3
addiu $5,$1,19642
lw $3,16($0)
subu $4,$6,$3
ori $0,$5,12147
addiu $4,$5,31027
nor $3,$4,$3
addiu $0,$3,-3710
xori $3,$3,63718
srav $0,$5,$3
sra $3,$0,6
sb $5,15($0)
slt $3,$3,$3
sll $6,$6,17
sllv $3,$3,$3
lbu $4,3($0)
lw $5,0($0)
andi $0,$1,62610
sb $3,9($0)
slti $5,$3,4312
addiu $4,$1,22064
subu $1,$1,$3
nor $4,$0,$3
addu $1,$4,$3
lw $1,16($0)
ori $3,$3,40412
srlv $4,$4,$3
srav $3,$0,$3
slti $4,$3,12783
lbu $4,5($0)
ori $4,$3,49009
andi $1,$5,40746
nor $1,$5,$3
addu $1,$1,$3
lw $5,8($0)
subu $4,$3,$3
andi $4,$5,11886
andi $3,$3,33238
sllv $4,$1,$3
ori $4,$5,5642
srl $3,$3,21
sltu $1,$3,$3
addiu $3,$5,5887
addiu $3,$4,-21895
addiu $5,$5,21751
sll $3,$4,21
sb $0,7($0)
subu $5,$4,$3
sltiu $3,$4,21096
addiu $1,$3,15101
addiu $5,$5,-24582
addiu $5,$1,-11906
nor $4,$2,$3
or $4,$1,$3
and $0,$4,$3
subu $3,$4,$3
sw $1,12($0)
and $3,$1,$3
andi $0,$3,1620
sllv $3,$5,$3
addiu $4,$3,-5442
nor $0,$4,$3
or $0,$3,$3
slti $4,$0,-6025
addiu $1,$5,-1197
sllv $3,$3,$3
subu $0,$0,$3
sltiu $1,$3,-10077
sra $4,$3,8
slt $4,$4,$3
subu $3,$3,$3
slti $4,$3,-18272
nor $5,$3,$3
srav $6,$5,$3
lw $4,12($0)
lh $3,8($0)
sra $3,$3,27
sra $3,$3,16
xor $1,$3,$3
srlv $0,$4,$3
or $1,$1,$3
sra $5,$4,20
slt $6,$3,$3
addu $1,$4,$3
subu $4,$1,$3
sll $4,$4,23
lb $3,1($0)
slti $0,$4,-1283
sltu $4,$1,$3
and $4,$5,$3
addu $4,$5,$3
srlv $5,$1,$3
addu $0,$4,$3
sh $4,4($0)
sllv $5,$4,$3
sltu $5,$3,$3
srlv $3,$5,$3
or $5,$0,$3
subu $4,$4,$3
sll $6,$4,5
lh $3,2($0)
slt $0,$0,$3
srlv $4,$3,$3
nor $1,$1,$3
subu $2,$2,$3
nor $3,$5,$3
subu $6,$5,$3
lbu $5,10($0)
sb $5,9($0)
sh $5,0($0)
lhu $1,16($0)
xori $1,$4,49048
xor $3,$0,$3
sltu $0,$4,$3
nor $4,$6,$3
xor $1,$3,$3
sltu $3,$3,$3
addiu $0,$3,-24064
lb $3,12($0)
srl $4,$5,24
sltu $5,$1,$3
sll $3,$3,27
srav $0,$5,$3
or $4,$1,$3
addiu $3,$4,19170
sll $6,$4,22
sll $3,$0,29
subu $3,$1,$3
sltu $3,$0,$3
slt $4,$4,$3
and $6,$5,$3
addiu $4,$3,-4587
sltu $0,$3,$3
addiu $3,$4,-17074
addu $4,$4,$3
srl $1,$4,21
sltiu $5,$3,-13602
ori $3,$1,64202
nor $1,$5,$3
srl $3,$0,29
sltiu $3,$4,14900
addiu $3,$4,-5973
srl $0,$3,19
slt $4,$6,$3
srl $5,$5,11
sw $4,4($0)
addiu $6,$3,13169
xor $1,$2,$3
sh $5,0($0)
xori $0,$4,45936
and $3,$3,$3
lw $4,16($0)
lbu $6,6($0)
sh $5,4($0)
lh $1,4($0)
lhu $3,8($0)
or $4,$4,$3
sltu $3,$3,$3
sll $4,$4,10
slti $5,$4,28143
ori $5,$5,56677
subu $4,$1,$3
subu $5,$6,$3
srav $3,$4,$3
sra $3,$3,14
ori $3,$3,40733
sltiu $4,$3,11269
srlv $3,$0,$3
xor $4,$4,$3
addiu $4,$3,-3455
or $5,$5,$3
sb $3,12($0)
srl $1,$1,1
subu $3,$1,$3
srl $1,$3,9
lbu $6,12($0)
andi $1,$5,39561
slt $4,$4,$3
subu $5,$0,$3
or $4,$3,$3
addiu $3,$4,-5707
slti $5,$5,23748
or $3,$0,$3
sllv $3,$1,$3
srlv $0,$6,$3
lbu $4,4($0)
lh $0,0($0)
srlv $4,$4,$3
addiu $4,$4,-10910
sh $5,14($0)
addiu $3,$5,2733
or $0,$0,$3
and $3,$3,$3
srlv $3,$3,$3
srlv $3,$3,$3
sltiu $5,$3,7514
srlv $3,$1,$3
andi $3,$5,58467
lbu $0,5($0)
sb $3,15($0)
sra $3,$3,31
sra $5,$5,19
sh $6,6($0)
lbu $2,7($0)
addiu $4,$4,31612
lb $5,12($0)
sw $1,8($0)
addiu $5,$5,22450
or $3,$5,$3
addiu $4,$3,-23387
subu $3,$2,$3
xori $5,$3,7722
sltiu $3,$4,27154
xori $1,$5,34211
xori $3,$3,9311
xor $3,$1,$3
lh $4,2($0)
addiu $5,$3,-1378
sra $4,$4,7
xori $5,$3,56200
sllv $5,$3,$3
xori $5,$5,58367
sb $1,14($0)
xori $3,$2,33515
xori $4,$4,41625
lhu $3,2($0)
sllv $4,$3,$3
lhu $5,10($0)
slti $0,$0,16392
or $3,$0,$3
lh $3,14($0)
lb $1,3($0)
lbu $4,13($0)
srlv $3,$1,$3
slti $3,$4,-20769
addu $3,$5,$3
srlv $4,$5,$3
sltu $5,$0,$3
sll $3,$1,6
sltu $4,$4,$3
lbu $1,2($0)
or $5,$4,$3
sll $4,$0,29
srav $0,$3,$3
srav $3,$0,$3
srl $4,$2,1
lhu $3,10($0)
or $1,$5,$3
sllv $5,$1,$3
andi $4,$3,46579
srav $3,$4,$3
sll $4,$3,31
subu $4,$3,$3
srlv $3,$3,$3
addiu $3,$1,29501
sltiu $4,$4,-3852
slt $1,$3,$3
sb $1,12($0)
nor $1,$1,$3
lhu $3,4($0)
lbu $5,16($0)
lbu $1,14($0)
or $6,$0,$3
xor $5,$4,$3
sra $1,$0,17
slt $2,$2,$3
srlv $1,$2,$3
addiu $5,$5,24153
sll $4,$4,8
sra $4,$4,24
addu $4,$3,$3
sltiu $0,$0,-16921
lb $3,6($0)
xori $1,$6,11517
srl $3,$3,24
srl $0,$4,0
and $1,$3,$3
sllv $4,$4,$3
andi $3,$2,21418
lh $4,16($0)
sll $6,$2,14
and $4,$4,$3
sltu $1,$3,$3
sw $5,0($0)
sb $5,2($0)
lbu $5,6($0)
lh $4,14($0)
srav $5,$5,$3
or $3,$3,$3
lhu $4,12($0)
subu $3,$5,$3
sb $1,2($0)
addiu $6,$5,4483
sra $4,$1,24
lw $3,8($0)
sw $3,8($0)
lhu $1,10($0)
addiu $4,$3,10106
andi $5,$3,31203
sw $1,0($0)
addiu $1,$3,19163
sb $3,2($0)
sw $3,4($0)
lw $4,8($0)
or $3,$4,$3
sll $1,$3,16
sra $5,$4,24
or $3,$6,$3
subu $3,$4,$3
andi $3,$6,63340
addiu $6,$4,130
sb $4,13($0)
subu $0,$0,$3
lw $6,8($0)
sra $4,$3,7
subu $6,$3,$3
andi $5,$1,52019
addu $3,$4,$3
addu $3,$0,$3
and $1,$5,$3
srl $3,$4,26
subu $5,$3,$3
sw $1,0($0)
srlv $4,$3,$3
or $3,$5,$3
sw $4,16($0)
sllv $3,$4,$3
nor $6,$6,$3
sb $4,12($0)
sh $1,8($0)
sll $1,$3,31
subu $3,$3,$3
slt $6,$3,$3
srl $3,$1,23
sllv $5,$4,$3
addu $3,$4,$3
sh $0,0($0)
andi $4,$3,1521
lbu $3,4($0)
ori $3,$3,40482
srl $4,$0,23
lbu $3,10($0)
sllv $4,$1,$3
sll $0,$4,17
xor $1,$4,$3
sll $3,$1,14
sra $4,$6,1
lw $5,0($0)
addu $3,$5,$3
addu $3,$4,$3
xori $5,$1,2216
srav $6,$3,$3
andi $3,$1,13192
sra $3,$6,23
slti $4,$0,-17020
lbu $3,14($0)
subu $3,$3,$3
or $3,$4,$3
sra $4,$1,0
subu $1,$1,$3
sllv $3,$3,$3
slt $5,$1,$3
xori $5,$4,43278
lbu $3,12($0)
addiu $4,$5,-29709
srl $6,$4,4
lb $4,4($0)
or $4,$5,$3
addiu $4,$1,-23537
lb $5,3($0)
andi $5,$1,22691
lbu $5,5($0)
addiu $4,$4,19933
subu $4,$4,$3
subu $0,$6,$3
lb $3,10($0)
andi $3,$1,29055
sh $0,0($0)
ori $0,$5,64693
addiu $1,$2,11663
ori $1,$4,7549
xori $4,$0,44337
sltiu $4,$2,19062
subu $5,$1,$3
addu $1,$1,$3
srlv $1,$0,$3
and $1,$5,$3
srlv $4,$4,$3
lw $4,0($0)
sll $1,$3,4
sll $1,$0,23
nor $5,$5,$3
addiu $4,$6,28953
subu $6,$6,$3
subu $3,$4,$3
or $4,$6,$3
addiu $4,$5,-27635
sb $4,12($0)
subu $4,$6,$3
slti $5,$1,4631
lhu $5,10($0)
subu $4,$4,$3
addiu $1,$4,-17184
ori $1,$3,36755
xori $4,$3,14331
sb $4,12($0)
addu $3,$1,$3
srav $0,$5,$3
ori $0,$4,13075
sb $1,6($0)
sw $4,16($0)
sb $1,11($0)
ori $5,$3,57137
sh $1,14($0)
xori $4,$4,18127
addiu $6,$6,5213
slt $4,$3,$3
sb $0,8($0)
sw $0,0($0)
sltu $4,$6,$3
sw $1,8($0)
nor $4,$1,$3
sllv $3,$2,$3
lh $3,6($0)
or $4,$5,$3
srlv $3,$3,$3
srlv $4,$3,$3
srlv $3,$4,$3
xor $1,$1,$3
lh $4,6($0)
addiu $6,$5,-31531
or $1,$1,$3
slti $3,$3,17805
sh $1,16($0)
subu $3,$4,$3
or $0,$0,$3
addiu $5,$3,-20463
sh $4,12($0)
addiu $1,$4,-18524
ori $3,$0,30650
lh $4,4($0)
xor $0,$5,$3
subu $3,$3,$3
addu $5,$1,$3
lw $1,8($0)
xori $6,$6,39775
sltiu $0,$1,9068
andi $5,$5,48190
sltiu $4,$6,17887
xor $3,$4,$3
lbu $5,15($0)
subu $5,$3,$3
xori $5,$5,56981
xor $5,$1,$3
srav $4,$4,$3
lw $3,8($0)
ori $3,$3,55324
sra $3,$1,11
srav $5,$3,$3
srlv $3,$2,$3
lb $4,15($0)
subu $5,$5,$3
xori $5,$0,40614
addu $3,$4,$3
srl $3,$4,26
andi $4,$5,54894
addiu $5,$4,-4213
srav $1,$4,$3
sra $5,$1,3
andi $0,$4,35669
sltiu $0,$6,-4315
xor $1,$1,$3
sh $5,8($0)
slt $3,$1,$3
addiu $4,$4,-30460
sllv $6,$4,$3
xori $6,$3,30043
srl $5,$4,25
sltu $0,$1,$3
ori $0,$1,19280
sh $1,10($0)
subu $0,$6,$3
addu $4,$5,$3
nor $1,$5,$3
lb $0,2($0)
ori $4,$3,38520
nor $0,$0,$3
nor $5,$3,$3
sra $3,$5,25
lw $3,8($0)
sra $3,$3,27
addiu $5,$3,24406
ori $6,$6,36356
and $3,$0,$3
slti $4,$5,22430
lbu $5,10($0)
sltiu $6,$3,27765
xor $5,$5,$3
addiu $4,$1,31994
srlv $3,$4,$3
sltu $3,$4,$3
sh $4,4($0)
sra $4,$1,14
slt $3,$4,$3
xor $6,$3,$3
srav $6,$2,$3
addiu $2,$2,26654
srl $3,$4,1
sll $4,$3,30
lbu $0,12($0)
sb $5,1($0)
subu $3,$3,$3
sw $1,8($0)
lb $3,7($0)
sllv $4,$5,$3
lb $3,3($0)
sra $0,$6,19
subu $4,$1,$3
andi $3,$3,28245
sllv $1,$1,$3
ori $3,$1,44365
lhu $5,0($0)
lhu $2,14($0)
sh $3,2($0)
srlv $5,$1,$3
sh $4,6($0)
addu $3,$4,$3
lbu $0,8($0)
xor $4,$3,$3
sb $3,5($0)
sltu $3,$3,$3
subu $1,$3,$3
addiu $4,$4,9535
addiu $1,$4,-19987
sltu $5,$2,$3
lhu $3,8($0)
addiu $1,$3,17844
sltiu $3,$3,-23499
addu $3,$2,$3
subu $4,$3,$3
ori $3,$3,12444
nor $4,$1,$3
sw $4,8($0)
addiu $1,$1,-16215
andi $3,$3,16547
sw $1,8($0)
sltu $5,$3,$3
sw $4,0($0)
srl $0,$1,10
srav $3,$4,$3
sltiu $4,$4,-30498
subu $4,$0,$3
addu $0,$4,$3
and $3,$3,$3
xor $3,$0,$3
sltiu $1,$5,-1084
subu $5,$5,$3
lhu $4,10($0)
srav $4,$4,$3
lhu $1,4($0)
addu $4,$0,$3
sll $1,$5,3
srav $4,$2,$3
addiu $3,$4,-29321
sltu $0,$0,$3
addiu $3,$4,24145
lbu $5,7($0)
addiu $3,$5,21701
sllv $5,$5,$3
andi $4,$6,14199
xori $3,$1,14723
srlv $3,$3,$3
lw $6,12($0)
addu $3,$4,$3
and $1,$5,$3
ori $5,$3,64768
sh $4,8($0)
addu $0,$5,$3
ori $4,$0,2018
lh $5,16($0)
addu $4,$4,$3
slt $3,$6,$3
xori $5,$3,57446
ori $1,$4,54296
sb $5,8($0)
addu $1,$1,$3
addu $0,$3,$3
or $0,$1,$3
srl $3,$3,11
lbu $4,15($0)
sh $0,14($0)
sra $3,$5,18
addu $4,$3,$3
and $4,$4,$3
srav $4,$3,$3
andi $3,$1,42883
lhu $3,14($0)
lb $3,2($0)
or $3,$3,$3
slti $1,$4,8087
srav $3,$3,$3
nor $1,$5,$3
and $3,$4,$3
srav $5,$5,$3
ori $1,$1,4968
subu $3,$1,$3
lh $2,0($0)
subu $6,$3,$3
subu $4,$3,$3
xori $3,$3,39139
sb $5,4($0)
slt $3,$3,$3
addu $3,$5,$3
slt $4,$5,$3
or $3,$3,$3
nor $1,$1,$3
sltiu $4,$4,-27701
lb $0,15($0)
srav $3,$6,$3
lbu $6,8($0)
lbu $0,0($0)
subu $4,$5,$3
sb $4,2($0)
subu $0,$5,$3
lh $3,10($0)
slt $4,$4,$3
subu $5,$1,$3
nor $3,$6,$3
srlv $3,$1,$3
ori $4,$4,12386
or $3,$3,$3
addu $3,$5,$3
sltiu $5,$3,-10254
srl $3,$5,7
slt $4,$4,$3
or $5,$3,$3
or $5,$5,$3
sb $3,10($0)
sh $3,10($0)
addu $3,$3,$3
sb $6,4($0)
addiu $1,$6,-31737
and $1,$2,$3
addiu $0,$3,-25784
lb $1,2($0)
subu $3,$5,$3
lh $6,2($0)
lw $3,4($0)
srav $6,$0,$3
lh $5,6($0)
ori $3,$4,23945
sh $0,0($0)
sltiu $1,$0,21045
nor $6,$4,$3
sltu $6,$3,$3
lhu $4,6($0)
sll $1,$5,17
ori $5,$5,33744
addu $5,$0,$3
lb $4,0($0)
srav $3,$3,$3
lw $6,0($0)
addu $5,$3,$3
sll $3,$4,10
srlv $0,$4,$3
lw $4,8($0)
addiu $4,$0,9764
lh $3,2($0)
xor $4,$4,$3
lhu $0,4($0)
slt $4,$0,$3
slti $4,$4,3060
sh $5,0($0)
srav $0,$6,$3
slt $5,$1,$3
subu $3,$1,$3
lh $5,4($0)
andi $3,$3,19184
addu $6,$6,$3
addiu $4,$4,-16594
sh $0,6($0)
xori $6,$1,45573
or $3,$5,$3
srl $5,$1,14
sltu $4,$4,$3
xori $3,$3,41187
lbu $3,11($0)
sltiu $3,$0,-20868
and $3,$5,$3
sll $3,$0,1
addu $3,$4,$3
slt $4,$3,$3
subu $4,$6,$3
sllv $1,$3,$3
srl $4,$5,4
lb $4,1($0)
sltiu $0,$3,-10665
slt $4,$5,$3
sb $3,15($0)
sllv $5,$3,$3
subu $6,$1,$3
and $3,$3,$3
addiu $3,$4,10221
lh $0,2($0)
ori $0,$5,27076
sll $6,$0,29
sh $1,12($0)
sll $1,$1,23
addiu $3,$0,-11870
sra $4,$3,29
sltu $4,$5,$3
ori $0,$0,8729
srl $3,$0,26
lw $5,16($0)
or $4,$1,$3
sh $1,12($0)
subu $0,$1,$3
andi $1,$0,64887
sllv $3,$3,$3
srl $3,$3,6
addiu $1,$3,31810
slt $6,$0,$3
sltiu $0,$4,21210
and $3,$1,$3
lh $5,2($0)
sllv $4,$4,$3
srav $1,$5,$3
xor $4,$6,$3
addiu $0,$1,-19922
subu $3,$0,$3
sltiu $1,$4,-23815
sh $1,12($0)
lbu $4,3($0)
subu $3,$4,$3
xor $4,$5,$3
lh $3,4($0)
sra $1,$1,2
srl $1,$5,15
sltu $0,$0,$3
xori $4,$6,61082
sltiu $3,$4,19785
lb $3,12($0)
sltu $6,$3,$3
addu $5,$3,$3
ori $4,$4,29137
subu $5,$3,$3
slt $5,$2,$3
lhu $5,4($0)
sw $4,4($0)
xori $1,$4,1191
srav $5,$5,$3
lhu $4,2($0)
xori $5,$4,34708
sh $1,12($0)
srl $4,$5,18
addiu $3,$4,-8252
xori $0,$4,55540
slti $5,$6,27546
sll $0,$4,15
and $1,$5,$3
and $3,$6,$3
srlv $3,$4,$3
addu $4,$0,$3
lhu $3,12($0)
xor $6,$4,$3
sra $3,$3,7
sll $1,$1,3
sw $3,8($0)
xori $5,$4,1548
srlv $5,$1,$3
slt $5,$5,$3
sltu $1,$3,$3
sh $3,12($0)
sllv $4,$6,$3
or $1,$6,$3
lbu $3,12($0)
or $5,$5,$3
srav $6,$5,$3
subu $1,$3,$3
slti $0,$6,3907
lb $4,3($0)
lh $5,16($0)
sll $5,$5,11
addu $4,$1,$3
sll $4,$3,13
sltu $3,$5,$3
lw $1,12($0)
addiu $3,$2,-10858
subu $3,$4,$3
ori $4,$5,54492
or $1,$5,$3
or $3,$3,$3
sll $0,$4,31
ori $6,$6,42606
sltu $0,$5,$3
addiu $6,$3,-20371
subu $3,$0,$3
xori $3,$3,32554
or $0,$5,$3
and $5,$5,$3
srl $3,$4,10
lw $4,0($0)
lbu $1,7($0)
or $3,$5,$3
lh $5,0($0)
srav $1,$5,$3
addiu $4,$1,-28834
andi $3,$3,5753
sltiu $4,$1,-10114
lh $1,8($0)
sltu $1,$1,$3
sltiu $5,$5,17706
sltiu $3,$3,-31642
xori $5,$4,26106
sllv $1,$5,$3
addiu $1,$3,17968
lhu $5,4($0)
nor $4,$3,$3
ori $1,$1,50184
subu $4,$4,$3
|
src/asis/a4g-a_types.ads
|
My-Colaborations/dynamo
| 15 |
5344
|
<reponame>My-Colaborations/dynamo
------------------------------------------------------------------------------
-- --
-- ASIS-for-GNAT IMPLEMENTATION COMPONENTS --
-- --
-- A 4 G . A _ T Y P E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1995-2012, Free Software Foundation, Inc. --
-- --
-- ASIS-for-GNAT is free software; you can redistribute it and/or modify it --
-- under terms of the GNU General Public License as published by the Free --
-- Software Foundation; either version 2, or (at your option) any later --
-- version. ASIS-for-GNAT is distributed in the hope that it will be use- --
-- ful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- --
-- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General --
-- Public License for more details. You should have received a copy of the --
-- GNU General Public License distributed with ASIS-for-GNAT; see file --
-- COPYING. If not, write to the Free Software Foundation, 51 Franklin --
-- Street, Fifth Floor, Boston, MA 02110-1301, USA. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
-- ASIS-for-GNAT was originally developed by the ASIS-for-GNAT team at the --
-- Software Engineering Laboratory of the Swiss Federal Institute of --
-- Technology (LGL-EPFL) in Lausanne, Switzerland, in cooperation with the --
-- Scientific Research Computer Center of Moscow State University (SRCC --
-- MSU), Russia, with funding partially provided by grants from the Swiss --
-- National Science Foundation and the Swiss Academy of Engineering --
-- Sciences. ASIS-for-GNAT is now maintained by AdaCore --
-- (http://www.ad<EMAIL>). --
-- --
------------------------------------------------------------------------------
with Ada.Characters.Latin_1; use Ada.Characters.Latin_1;
with Ada.Characters.Handling; use Ada.Characters.Handling;
with GNAT.OS_Lib; use GNAT.OS_Lib;
package A4G.A_Types is
pragma Elaborate_Body (A4G.A_Types);
-- This package is the ASIS implementation's analog of the GNAT Types
-- package (except the part related to the ASIS_OS_Time type).
-- It contains host independent type and constant definitions
-- which is supposed to be used in more than one unit in the ASIS
-- implementation.
------------------
-- ASIS_OS_Time --
------------------
-- To check, that a given abstraction is valid in the sense defined by the
-- ASIS standard (that is, that the enclosing Context of the given
-- abstraction has not been closed after creating this abstraction), ASIS
-- needs some kind of logical time (or logical time stamp). This logical
-- time is increased each time when any ASIS Context is opened. It is not
-- reset when ASIS is initialized, because it may lead to collisions in
-- validity checks
-- An ASIS abstraction is valid if its logical time stamp is equal or
-- greater than the time stamp of its enclosing Context.
type ASIS_OS_Time is private;
Nil_ASIS_OS_Time : constant ASIS_OS_Time;
Last_ASIS_OS_Time : constant ASIS_OS_Time;
procedure Increase_ASIS_OS_Time;
-- Increases the ASIS logical "clock"
function A_OS_Time return ASIS_OS_Time;
-- Gets the current value of the ASIS logical "clock"
function Later (L, R : ASIS_OS_Time) return Boolean;
-- Compares time stamps.
-----------------------------------------
-- Types for Context and Context Table --
-----------------------------------------
Inconsistent_Incremental_Context : exception;
-- raised when any inconsistency found for Incremental Tree processing
-- mode
Context_Low_Bound : constant := 0;
Context_High_Bound : constant := 1_000_000;
type Context_Id is range Context_Low_Bound .. Context_High_Bound;
-- Type used to identify entries in ASIS Context table
Non_Associated : constant Context_Id := Context_Low_Bound;
Nil_Context_Id : constant Context_Id := Context_Low_Bound;
First_Context_Id : constant Context_Id := Context_Low_Bound + 1;
---------------------------------------------
-- Types for Container and Container Table --
---------------------------------------------
Container_Low_Bound : constant := 0;
Container_High_Bound : constant := 100;
type Container_Id is range Container_Low_Bound .. Container_High_Bound;
-- Type used to identify entries in ASIS Container table
Nil_Container_Id : constant Container_Id := Container_Low_Bound;
First_Container_Id : constant Container_Id := Container_Low_Bound + 1;
-----------------------------------------------
-- Types for Compilation_Unit and Unit Table --
-----------------------------------------------
Unit_Low_Bound : constant := 0;
Unit_High_Bound : constant := 100_000;
type Unit_Id is range Unit_Low_Bound .. Unit_High_Bound;
-- Type used to identify entries in the ASIS Unit table
Nil_Unit : constant Unit_Id := Unit_Low_Bound;
No_Unit_Id : Unit_Id renames Nil_Unit;
First_Unit_Id : constant Unit_Id := Unit_Low_Bound + 1;
Standard_Id : constant Unit_Id := First_Unit_Id;
-- The entry in the Unit table corresponding to the package Standard
-- Standard goes first in any Unit table
Config_Comp_Id : constant Unit_Id := Standard_Id + 1;
-- The entry in the Unit table corresponding to the artificial
-- A_Configuration_Compilation unit. We may have at most one such unit.
-- If there is no configuration pragmas in the Context, there is no harm
-- to allocate such a unit, because the only way for an ASIS client to get
-- it is to get the enclosing unit for a configuration pragma.
type Unit_Id_List is array (Natural range <>) of Unit_Id;
Nil_Unit_Id_List : constant Unit_Id_List (1 .. 0) := (others => Nil_Unit);
--------------------------
-- Types for Tree Table --
--------------------------
Tree_Low_Bound : constant := 0;
Tree_High_Bound : constant := 100_000;
type Tree_Id is range Tree_Low_Bound .. Tree_High_Bound;
-- Type used to identify entries in ASIS Tree table
Nil_Tree : constant Tree_Id := Tree_Low_Bound;
No_Tree_Name : Tree_Id renames Nil_Tree; -- ???
First_Tree_Id : constant Tree_Id := Tree_Low_Bound + 1;
-----------------------------------------------
-- Types for Search Directories Paths Tables --
-----------------------------------------------
No_Dir : constant := 0;
First_Dir_Id : constant := 1;
Last_Dir_Id : constant := 1_000;
type Dir_Id is range No_Dir .. Last_Dir_Id;
type Search_Dir_Kinds is (
Source, -- for source search path
Object, -- for object search path
Tree); -- for tree search path
-- this type may be further expanded
--------------------------------------------
-- Types for Internal Element Structure --
--------------------------------------------
type Special_Cases is (
-- this enumeration type is needed to distinguish some special
-- cases in Element constructing and handling
Not_A_Special_Case,
A_Dummy_Block_Statement,
-- the result of an obsolescent function
-- Declarations.Body_Block_Statement
Predefined_Operation,
-- indicates the predefined operation for a user-defined type
-- (or component thereof???). Note, that such an operation is
-- defined not in the Standard package.
Explicit_From_Standard,
-- indicates the explicit Element obtained from the package
-- Standard. "Explicit" means here any construct which is
-- contained in the "source" text of Standard included in RM95
-- plus explicit constants substituting "implementation-defined"
-- italic strings in this "source"
Numeric_Error_Renaming,
-- Indicates the artificial ASIS Element created to represent the
-- obsolete renaming of Numeric_Error in the package Standard
-- (see B712-005)
Implicit_From_Standard,
-- indicates the implicit Element obtained from the package
-- Standard, that is, implicitly declared predefined operations
-- and their components, and root and universal numeric type
-- definitions and declarations
Stand_Char_Literal,
-- indicates the defining character literal declared in the
-- definition of the predefined type Standard.Character
-- or Standard.Wide_Character. An ASIS Element representing such
-- a literal has no corresponding node in the tree, and it is
-- based on the N_Defining_Identifier node for the corresponding
-- type
Expanded_Package_Instantiation,
-- indicates A_Package_Declaration element which represents the
-- package declaration which is the result of an instantiation
-- of a generic package
Expanded_Subprogram_Instantiation,
-- indicates A_Procedure_Declaration or A_Function_Declaration
-- element which represents the package declaration which is the
-- result of an instantiation of a generic package
Configuration_File_Pragma,
-- Indicates a configuration pragma belonging not to the source of some
-- Ada compilation unit, but to the configuration file (an components
-- thereof)
Rewritten_Named_Number,
-- Indicates An_Identifier Element representing a named number in the
-- situation when the corresponding tree structure is rewritten into
-- N_Integer/Real_Literal node and no original tree structure is
-- available (see BB10-002)
Is_From_Gen_Association,
-- See D722-012.
-- The problem here is that in case of a formal object, the front-end
-- creates the renaming declaration as a means to pass an actual
-- parameter, and the parameter itself (the corresponding tree node)
-- is used as a part of this renaming declaration. So we have a problem
-- with Enclosing_Element. The Parent pointer from this actual points
-- to the renaming declaration structure. In case if we are not in the
-- expanded code, we may compare levels of instantiation and it helps,
-- but in general case it is too complicated. So the solution is to
-- mark the corresponding node if it comes from the generic association
-- (and we can gen into this node only by means of a structural query!)
-- and to use this mark in the Enclosing_Element processing.
Is_From_Imp_Neq_Declaration,
-- Indicates if the given element is an implicit declaration of the
-- "/=" operation corresponding to the explicit redefinition of "=" or
-- a subcomponent thereof
-- Implicit_Inherited_Subprogram
-- indicates the declaration of an implicit inherited user-defined
-- subprogram or a component thereof.
-- may be continued...
Dummy_Base_Attribute_Designator,
Dummy_Class_Attribute_Designator,
Dummy_Base_Attribute_Prefix,
Dummy_Class_Attribute_Prefix,
-- These four values are used to mark components of the artificial
-- 'Base and 'Class attribute reference that ASIS has to simulate when
-- processing references to a formal type in the instantiation in case
-- when a formal type is an unconstrained type, and the actual type is a
-- 'Class attribute, or when an actual is a 'Base attribute and the
-- front-end creates too much of artificial data structures in the tree.
From_Limited_View
-- The corresponding Element is (a part of) a package or type limited
-- view, see RM 05 10.1.1 (12.1/2 .. 12.5.2)
-- may be continued...
);
type Normalization_Cases is (
-- This enumeration type represents the different possible states of
-- An_Association Elements in respect to normalization of associations
Is_Not_Normalized,
Is_Normalized,
-- normalized association created for an actual parameter which itself
-- is presented at the place of the call/instantiation
Is_Normalized_Defaulted,
-- normalized association created for an actual parameter which itself
-- is NOT presented at the place of the call/instantiation, so the
-- default value should be used
Is_Normalized_Defaulted_For_Box);
-- normalized association created for an actual parameter which itself
-- is NOT presented at the place of the instantiation and the definition
-- of the formal parameter includes box as the default value, so the
-- actual parameter should be found at the place of the instantiation
subtype Expanded_Spec is Special_Cases
range Expanded_Package_Instantiation .. Expanded_Subprogram_Instantiation;
subtype Normalized_Association is Normalization_Cases
range Is_Normalized .. Is_Normalized_Defaulted_For_Box;
subtype Defaulted_Association is Normalization_Cases
range Is_Normalized_Defaulted .. Is_Normalized_Defaulted_For_Box;
subtype Predefined is Special_Cases
range Predefined_Operation .. Stand_Char_Literal;
-- COMMENTS
--
-- *1* Handling the Parenthesized Expressions and
-- One_Pair_Of_Parentheses_Away and Two_Pairs_Of_Parentheses_Away
-- Special Cases.
--
-- An Asis Element of A_Parenthesized_Expression could be built
-- on the base of any tree node which could be used for building the
-- elements of all other An_Expresion subordinate kinds.
-- A_Parenthesized_Expression kind is determined by comparing (during
-- the automatic Internal_Element_Kinds determination only!!!) the
-- Paren_Count field of the node with zero - see Sinfo.ads, the
-- documentation item for "4.4 (Primary)" RM subsection, and
-- Atree.ads the documentation item related to the Paren_Count field.
--
-- When a subexpression is to be selected from the element of
-- A_Parenthesized_Expression kind by the
-- Asis_Definition.Expression_Parenthesized function, the result will
-- be built on the base of just the same node as the argument having,
-- just the same value of the Paren_Count field. If the argument has
-- more than one pair of parentheses, the result will also be of
-- A_Parenthesized_Expression kind, and the Special_Cases values
-- One_Pair_Of_Parentheses_Away and Two_Pairs_Of_Parentheses_Away
-- are intended to be used to count the pairs of parentheses remained
-- in the result element. All the corresponding element kind
-- determination and element construction should be performed in
-- "by-hand" mode, except the case when the argument parenthesized
-- expression has only one pair of parentheses.
--
-- GNAT cannot distinguish more than three levels of the enclosing
-- pairs of parentheses for a non-parenthesized enclosed expression.
-- (Paren_Count = 3 stands for any number of the enclosing parentheses
-- equal or greater than 3.) So ASIS-for-GNAT implementation cannot
-- do more than GNAT itself (of course, we could do some search in the
-- source buffer, but we prefer to agree with GNAT team that even
-- Paren_Count = 3 already is a pathological case :).
--
-- See also Asis_Definition.Expression_Parenthesized (body) and
-- A4G.Mapping.Node_To_Element (body)
--
-- *2* Root/Universal types definitions - we do not need any special
-- value for representing elements of Root_Type_Kinds, because for
-- each value there may be only one Element of the corresponding kind
-- in a given opened Context.
--
-------------------------
-- Nil String constants--
-------------------------
Nil_Asis_String : constant String := "";
Nil_Asis_Wide_String : constant Wide_String := "";
-------------------------------------------------
-- Constants for the Diagnosis string buffer --
-------------------------------------------------
ASIS_Line_Terminator : constant String := (1 => LF);
-- what about DOS-like end-of-line?
Diagnosis_String_Length : constant Positive :=
76 + ASIS_Line_Terminator'Length;
-- We are trying to set ASIS_Line_Terminator in the Diagnosis string to
-- keep text strings at most 76 characters long
Max_Diagnosis_Length : constant Positive := 32 * Diagnosis_String_Length;
-- The length of the buffer in which the Diagnosis string is formed,
-- now it is at most 32 lines 76 character each. Should be enough for
-- any practically meaningful diagnosis
Asis_Wide_Line_Terminator : constant Wide_String :=
(1 => To_Wide_Character (LF));
--
-- the physical line terminator, is used in the Diagnosis string
-- to separate the parts of the diagnosis message
-- See also documentation of the Skip_Line_Terminators procedure
-- in the (GNAT.)sinput.adb
ASIS_Line_Terminator_Len : constant Positive
:= ASIS_Line_Terminator'Length;
Incorrect_Setting : constant String := "Attempt to set Not_An_Error "
& "status with non-nil diagnosis string";
Incorrect_Setting_Len : constant Positive := Incorrect_Setting'Length;
-------------------
-- Miscellaneous --
-------------------
ASIS_Path_Separator : Character;
-- Is initialized in the package body. Takes into account that in VMS
-- ',' should be used instead of GNAT.OS_Lib.Path_Separator.
ASIS_Current_Directory : String_Access;
-- Is initialized in the package body. "[]" in VMS, "." otherwise
function Asis_Normalize_Pathname
(Name : String;
Directory : String := "";
Resolve_Links : Boolean := True;
Case_Sensitive : Boolean := True) return String;
-- ASIS version of GNAT.OS_Lib.Normalize_Pathname. It applies
-- To_Host_Dir_Spec to the result of GNAT.OS_Lib.Normalize_Pathname.
-- Should be applied to directory names only! For file names
-- GNAT.OS_Lib.Normalize_Pathname should be used.
-- ??? Is this the right place for this subprogram???
Internal_Implementation_Error : exception;
-- Means exactly this. Is supposed to be raised in control statement
-- paths which should never be reached. We need this exception mostly
-- because some parts of old ASIS code (developed at the research stage of
-- the ASIS project) sometimes are not structured properly.
function Parameter_String_To_List
(Par_String : String)
return Argument_List_Access;
-- Take a string that is a converted to the String type Parameters string
-- of the ASIS query Initialize, Associate or Finalize (??? Should we
-- process the original Wide_String Parameters string without converting
-- it to String?) and parse it into an Argument_List.
--
-- This function is similar to GNAT.OS_Int.Argument_String_To_List, but
-- it does not treat '\' as a backquoting character.
private
type ASIS_OS_Time is new Long_Integer range 0 .. Long_Integer'Last;
ASIS_Clock : ASIS_OS_Time := 1;
-- This is the ASIS logical "clock" used to ret ASIS logical time.
Nil_ASIS_OS_Time : constant ASIS_OS_Time := 0;
Last_ASIS_OS_Time : constant ASIS_OS_Time := ASIS_OS_Time'Last;
end A4G.A_Types;
|
init.asm
|
PieMyth/cs333
| 0 |
86450
|
_init: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
char *argv[] = { "sh", 0 };
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 14 sub $0x14,%esp
int pid, wpid;
if(open("console", O_RDWR) < 0){
11: 83 ec 08 sub $0x8,%esp
14: 6a 02 push $0x2
16: 68 bb 09 00 00 push $0x9bb
1b: e8 4b 04 00 00 call 46b <open>
20: 83 c4 10 add $0x10,%esp
23: 85 c0 test %eax,%eax
25: 79 26 jns 4d <main+0x4d>
mknod("console", 1, 1);
27: 83 ec 04 sub $0x4,%esp
2a: 6a 01 push $0x1
2c: 6a 01 push $0x1
2e: 68 bb 09 00 00 push $0x9bb
33: e8 3b 04 00 00 call 473 <mknod>
38: 83 c4 10 add $0x10,%esp
open("console", O_RDWR);
3b: 83 ec 08 sub $0x8,%esp
3e: 6a 02 push $0x2
40: 68 bb 09 00 00 push $0x9bb
45: e8 21 04 00 00 call 46b <open>
4a: 83 c4 10 add $0x10,%esp
}
dup(0); // stdout
4d: 83 ec 0c sub $0xc,%esp
50: 6a 00 push $0x0
52: e8 4c 04 00 00 call 4a3 <dup>
57: 83 c4 10 add $0x10,%esp
dup(0); // stderr
5a: 83 ec 0c sub $0xc,%esp
5d: 6a 00 push $0x0
5f: e8 3f 04 00 00 call 4a3 <dup>
64: 83 c4 10 add $0x10,%esp
for(;;){
printf(1, "init: starting sh\n");
67: 83 ec 08 sub $0x8,%esp
6a: 68 c3 09 00 00 push $0x9c3
6f: 6a 01 push $0x1
71: e8 8c 05 00 00 call 602 <printf>
76: 83 c4 10 add $0x10,%esp
pid = fork();
79: e8 a5 03 00 00 call 423 <fork>
7e: 89 45 f4 mov %eax,-0xc(%ebp)
if(pid < 0){
81: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
85: 79 17 jns 9e <main+0x9e>
printf(1, "init: fork failed\n");
87: 83 ec 08 sub $0x8,%esp
8a: 68 d6 09 00 00 push $0x9d6
8f: 6a 01 push $0x1
91: e8 6c 05 00 00 call 602 <printf>
96: 83 c4 10 add $0x10,%esp
exit();
99: e8 8d 03 00 00 call 42b <exit>
}
if(pid == 0){
9e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
a2: 75 3e jne e2 <main+0xe2>
exec("sh", argv);
a4: 83 ec 08 sub $0x8,%esp
a7: 68 78 0c 00 00 push $0xc78
ac: 68 b8 09 00 00 push $0x9b8
b1: e8 ad 03 00 00 call 463 <exec>
b6: 83 c4 10 add $0x10,%esp
printf(1, "init: exec sh failed\n");
b9: 83 ec 08 sub $0x8,%esp
bc: 68 e9 09 00 00 push $0x9e9
c1: 6a 01 push $0x1
c3: e8 3a 05 00 00 call 602 <printf>
c8: 83 c4 10 add $0x10,%esp
exit();
cb: e8 5b 03 00 00 call 42b <exit>
}
while((wpid=wait()) >= 0 && wpid != pid)
printf(1, "zombie!\n");
d0: 83 ec 08 sub $0x8,%esp
d3: 68 ff 09 00 00 push $0x9ff
d8: 6a 01 push $0x1
da: e8 23 05 00 00 call 602 <printf>
df: 83 c4 10 add $0x10,%esp
if(pid == 0){
exec("sh", argv);
printf(1, "init: exec sh failed\n");
exit();
}
while((wpid=wait()) >= 0 && wpid != pid)
e2: e8 4c 03 00 00 call 433 <wait>
e7: 89 45 f0 mov %eax,-0x10(%ebp)
ea: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
ee: 0f 88 73 ff ff ff js 67 <main+0x67>
f4: 8b 45 f0 mov -0x10(%ebp),%eax
f7: 3b 45 f4 cmp -0xc(%ebp),%eax
fa: 75 d4 jne d0 <main+0xd0>
printf(1, "zombie!\n");
}
fc: e9 66 ff ff ff jmp 67 <main+0x67>
00000101 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
101: 55 push %ebp
102: 89 e5 mov %esp,%ebp
104: 57 push %edi
105: 53 push %ebx
asm volatile("cld; rep stosb" :
106: 8b 4d 08 mov 0x8(%ebp),%ecx
109: 8b 55 10 mov 0x10(%ebp),%edx
10c: 8b 45 0c mov 0xc(%ebp),%eax
10f: 89 cb mov %ecx,%ebx
111: 89 df mov %ebx,%edi
113: 89 d1 mov %edx,%ecx
115: fc cld
116: f3 aa rep stos %al,%es:(%edi)
118: 89 ca mov %ecx,%edx
11a: 89 fb mov %edi,%ebx
11c: 89 5d 08 mov %ebx,0x8(%ebp)
11f: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
122: 90 nop
123: 5b pop %ebx
124: 5f pop %edi
125: 5d pop %ebp
126: c3 ret
00000127 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
127: 55 push %ebp
128: 89 e5 mov %esp,%ebp
12a: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
12d: 8b 45 08 mov 0x8(%ebp),%eax
130: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
133: 90 nop
134: 8b 45 08 mov 0x8(%ebp),%eax
137: 8d 50 01 lea 0x1(%eax),%edx
13a: 89 55 08 mov %edx,0x8(%ebp)
13d: 8b 55 0c mov 0xc(%ebp),%edx
140: 8d 4a 01 lea 0x1(%edx),%ecx
143: 89 4d 0c mov %ecx,0xc(%ebp)
146: 0f b6 12 movzbl (%edx),%edx
149: 88 10 mov %dl,(%eax)
14b: 0f b6 00 movzbl (%eax),%eax
14e: 84 c0 test %al,%al
150: 75 e2 jne 134 <strcpy+0xd>
;
return os;
152: 8b 45 fc mov -0x4(%ebp),%eax
}
155: c9 leave
156: c3 ret
00000157 <strcmp>:
int
strcmp(const char *p, const char *q)
{
157: 55 push %ebp
158: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
15a: eb 08 jmp 164 <strcmp+0xd>
p++, q++;
15c: 83 45 08 01 addl $0x1,0x8(%ebp)
160: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
164: 8b 45 08 mov 0x8(%ebp),%eax
167: 0f b6 00 movzbl (%eax),%eax
16a: 84 c0 test %al,%al
16c: 74 10 je 17e <strcmp+0x27>
16e: 8b 45 08 mov 0x8(%ebp),%eax
171: 0f b6 10 movzbl (%eax),%edx
174: 8b 45 0c mov 0xc(%ebp),%eax
177: 0f b6 00 movzbl (%eax),%eax
17a: 38 c2 cmp %al,%dl
17c: 74 de je 15c <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
17e: 8b 45 08 mov 0x8(%ebp),%eax
181: 0f b6 00 movzbl (%eax),%eax
184: 0f b6 d0 movzbl %al,%edx
187: 8b 45 0c mov 0xc(%ebp),%eax
18a: 0f b6 00 movzbl (%eax),%eax
18d: 0f b6 c0 movzbl %al,%eax
190: 29 c2 sub %eax,%edx
192: 89 d0 mov %edx,%eax
}
194: 5d pop %ebp
195: c3 ret
00000196 <strlen>:
uint
strlen(char *s)
{
196: 55 push %ebp
197: 89 e5 mov %esp,%ebp
199: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
19c: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
1a3: eb 04 jmp 1a9 <strlen+0x13>
1a5: 83 45 fc 01 addl $0x1,-0x4(%ebp)
1a9: 8b 55 fc mov -0x4(%ebp),%edx
1ac: 8b 45 08 mov 0x8(%ebp),%eax
1af: 01 d0 add %edx,%eax
1b1: 0f b6 00 movzbl (%eax),%eax
1b4: 84 c0 test %al,%al
1b6: 75 ed jne 1a5 <strlen+0xf>
;
return n;
1b8: 8b 45 fc mov -0x4(%ebp),%eax
}
1bb: c9 leave
1bc: c3 ret
000001bd <memset>:
void*
memset(void *dst, int c, uint n)
{
1bd: 55 push %ebp
1be: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
1c0: 8b 45 10 mov 0x10(%ebp),%eax
1c3: 50 push %eax
1c4: ff 75 0c pushl 0xc(%ebp)
1c7: ff 75 08 pushl 0x8(%ebp)
1ca: e8 32 ff ff ff call 101 <stosb>
1cf: 83 c4 0c add $0xc,%esp
return dst;
1d2: 8b 45 08 mov 0x8(%ebp),%eax
}
1d5: c9 leave
1d6: c3 ret
000001d7 <strchr>:
char*
strchr(const char *s, char c)
{
1d7: 55 push %ebp
1d8: 89 e5 mov %esp,%ebp
1da: 83 ec 04 sub $0x4,%esp
1dd: 8b 45 0c mov 0xc(%ebp),%eax
1e0: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
1e3: eb 14 jmp 1f9 <strchr+0x22>
if(*s == c)
1e5: 8b 45 08 mov 0x8(%ebp),%eax
1e8: 0f b6 00 movzbl (%eax),%eax
1eb: 3a 45 fc cmp -0x4(%ebp),%al
1ee: 75 05 jne 1f5 <strchr+0x1e>
return (char*)s;
1f0: 8b 45 08 mov 0x8(%ebp),%eax
1f3: eb 13 jmp 208 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
1f5: 83 45 08 01 addl $0x1,0x8(%ebp)
1f9: 8b 45 08 mov 0x8(%ebp),%eax
1fc: 0f b6 00 movzbl (%eax),%eax
1ff: 84 c0 test %al,%al
201: 75 e2 jne 1e5 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
203: b8 00 00 00 00 mov $0x0,%eax
}
208: c9 leave
209: c3 ret
0000020a <gets>:
char*
gets(char *buf, int max)
{
20a: 55 push %ebp
20b: 89 e5 mov %esp,%ebp
20d: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
210: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
217: eb 42 jmp 25b <gets+0x51>
cc = read(0, &c, 1);
219: 83 ec 04 sub $0x4,%esp
21c: 6a 01 push $0x1
21e: 8d 45 ef lea -0x11(%ebp),%eax
221: 50 push %eax
222: 6a 00 push $0x0
224: e8 1a 02 00 00 call 443 <read>
229: 83 c4 10 add $0x10,%esp
22c: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
22f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
233: 7e 33 jle 268 <gets+0x5e>
break;
buf[i++] = c;
235: 8b 45 f4 mov -0xc(%ebp),%eax
238: 8d 50 01 lea 0x1(%eax),%edx
23b: 89 55 f4 mov %edx,-0xc(%ebp)
23e: 89 c2 mov %eax,%edx
240: 8b 45 08 mov 0x8(%ebp),%eax
243: 01 c2 add %eax,%edx
245: 0f b6 45 ef movzbl -0x11(%ebp),%eax
249: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
24b: 0f b6 45 ef movzbl -0x11(%ebp),%eax
24f: 3c 0a cmp $0xa,%al
251: 74 16 je 269 <gets+0x5f>
253: 0f b6 45 ef movzbl -0x11(%ebp),%eax
257: 3c 0d cmp $0xd,%al
259: 74 0e je 269 <gets+0x5f>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
25b: 8b 45 f4 mov -0xc(%ebp),%eax
25e: 83 c0 01 add $0x1,%eax
261: 3b 45 0c cmp 0xc(%ebp),%eax
264: 7c b3 jl 219 <gets+0xf>
266: eb 01 jmp 269 <gets+0x5f>
cc = read(0, &c, 1);
if(cc < 1)
break;
268: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
269: 8b 55 f4 mov -0xc(%ebp),%edx
26c: 8b 45 08 mov 0x8(%ebp),%eax
26f: 01 d0 add %edx,%eax
271: c6 00 00 movb $0x0,(%eax)
return buf;
274: 8b 45 08 mov 0x8(%ebp),%eax
}
277: c9 leave
278: c3 ret
00000279 <stat>:
int
stat(char *n, struct stat *st)
{
279: 55 push %ebp
27a: 89 e5 mov %esp,%ebp
27c: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
27f: 83 ec 08 sub $0x8,%esp
282: 6a 00 push $0x0
284: ff 75 08 pushl 0x8(%ebp)
287: e8 df 01 00 00 call 46b <open>
28c: 83 c4 10 add $0x10,%esp
28f: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
292: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
296: 79 07 jns 29f <stat+0x26>
return -1;
298: b8 ff ff ff ff mov $0xffffffff,%eax
29d: eb 25 jmp 2c4 <stat+0x4b>
r = fstat(fd, st);
29f: 83 ec 08 sub $0x8,%esp
2a2: ff 75 0c pushl 0xc(%ebp)
2a5: ff 75 f4 pushl -0xc(%ebp)
2a8: e8 d6 01 00 00 call 483 <fstat>
2ad: 83 c4 10 add $0x10,%esp
2b0: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
2b3: 83 ec 0c sub $0xc,%esp
2b6: ff 75 f4 pushl -0xc(%ebp)
2b9: e8 95 01 00 00 call 453 <close>
2be: 83 c4 10 add $0x10,%esp
return r;
2c1: 8b 45 f0 mov -0x10(%ebp),%eax
}
2c4: c9 leave
2c5: c3 ret
000002c6 <atoi>:
int
atoi(const char *s)
{
2c6: 55 push %ebp
2c7: 89 e5 mov %esp,%ebp
2c9: 83 ec 10 sub $0x10,%esp
int n, sign;
n = 0;
2cc: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while (*s == ' ') s++;
2d3: eb 04 jmp 2d9 <atoi+0x13>
2d5: 83 45 08 01 addl $0x1,0x8(%ebp)
2d9: 8b 45 08 mov 0x8(%ebp),%eax
2dc: 0f b6 00 movzbl (%eax),%eax
2df: 3c 20 cmp $0x20,%al
2e1: 74 f2 je 2d5 <atoi+0xf>
sign = (*s == '-') ? -1 : 1;
2e3: 8b 45 08 mov 0x8(%ebp),%eax
2e6: 0f b6 00 movzbl (%eax),%eax
2e9: 3c 2d cmp $0x2d,%al
2eb: 75 07 jne 2f4 <atoi+0x2e>
2ed: b8 ff ff ff ff mov $0xffffffff,%eax
2f2: eb 05 jmp 2f9 <atoi+0x33>
2f4: b8 01 00 00 00 mov $0x1,%eax
2f9: 89 45 f8 mov %eax,-0x8(%ebp)
if (*s == '+' || *s == '-')
2fc: 8b 45 08 mov 0x8(%ebp),%eax
2ff: 0f b6 00 movzbl (%eax),%eax
302: 3c 2b cmp $0x2b,%al
304: 74 0a je 310 <atoi+0x4a>
306: 8b 45 08 mov 0x8(%ebp),%eax
309: 0f b6 00 movzbl (%eax),%eax
30c: 3c 2d cmp $0x2d,%al
30e: 75 2b jne 33b <atoi+0x75>
s++;
310: 83 45 08 01 addl $0x1,0x8(%ebp)
while('0' <= *s && *s <= '9')
314: eb 25 jmp 33b <atoi+0x75>
n = n*10 + *s++ - '0';
316: 8b 55 fc mov -0x4(%ebp),%edx
319: 89 d0 mov %edx,%eax
31b: c1 e0 02 shl $0x2,%eax
31e: 01 d0 add %edx,%eax
320: 01 c0 add %eax,%eax
322: 89 c1 mov %eax,%ecx
324: 8b 45 08 mov 0x8(%ebp),%eax
327: 8d 50 01 lea 0x1(%eax),%edx
32a: 89 55 08 mov %edx,0x8(%ebp)
32d: 0f b6 00 movzbl (%eax),%eax
330: 0f be c0 movsbl %al,%eax
333: 01 c8 add %ecx,%eax
335: 83 e8 30 sub $0x30,%eax
338: 89 45 fc mov %eax,-0x4(%ebp)
n = 0;
while (*s == ' ') s++;
sign = (*s == '-') ? -1 : 1;
if (*s == '+' || *s == '-')
s++;
while('0' <= *s && *s <= '9')
33b: 8b 45 08 mov 0x8(%ebp),%eax
33e: 0f b6 00 movzbl (%eax),%eax
341: 3c 2f cmp $0x2f,%al
343: 7e 0a jle 34f <atoi+0x89>
345: 8b 45 08 mov 0x8(%ebp),%eax
348: 0f b6 00 movzbl (%eax),%eax
34b: 3c 39 cmp $0x39,%al
34d: 7e c7 jle 316 <atoi+0x50>
n = n*10 + *s++ - '0';
return sign*n;
34f: 8b 45 f8 mov -0x8(%ebp),%eax
352: 0f af 45 fc imul -0x4(%ebp),%eax
}
356: c9 leave
357: c3 ret
00000358 <atoo>:
int
atoo(const char *s)
{
358: 55 push %ebp
359: 89 e5 mov %esp,%ebp
35b: 83 ec 10 sub $0x10,%esp
int n, sign;
n = 0;
35e: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while (*s == ' ') s++;
365: eb 04 jmp 36b <atoo+0x13>
367: 83 45 08 01 addl $0x1,0x8(%ebp)
36b: 8b 45 08 mov 0x8(%ebp),%eax
36e: 0f b6 00 movzbl (%eax),%eax
371: 3c 20 cmp $0x20,%al
373: 74 f2 je 367 <atoo+0xf>
sign = (*s == '-') ? -1 : 1;
375: 8b 45 08 mov 0x8(%ebp),%eax
378: 0f b6 00 movzbl (%eax),%eax
37b: 3c 2d cmp $0x2d,%al
37d: 75 07 jne 386 <atoo+0x2e>
37f: b8 ff ff ff ff mov $0xffffffff,%eax
384: eb 05 jmp 38b <atoo+0x33>
386: b8 01 00 00 00 mov $0x1,%eax
38b: 89 45 f8 mov %eax,-0x8(%ebp)
if (*s == '+' || *s == '-')
38e: 8b 45 08 mov 0x8(%ebp),%eax
391: 0f b6 00 movzbl (%eax),%eax
394: 3c 2b cmp $0x2b,%al
396: 74 0a je 3a2 <atoo+0x4a>
398: 8b 45 08 mov 0x8(%ebp),%eax
39b: 0f b6 00 movzbl (%eax),%eax
39e: 3c 2d cmp $0x2d,%al
3a0: 75 27 jne 3c9 <atoo+0x71>
s++;
3a2: 83 45 08 01 addl $0x1,0x8(%ebp)
while('0' <= *s && *s <= '7')
3a6: eb 21 jmp 3c9 <atoo+0x71>
n = n*8 + *s++ - '0';
3a8: 8b 45 fc mov -0x4(%ebp),%eax
3ab: 8d 0c c5 00 00 00 00 lea 0x0(,%eax,8),%ecx
3b2: 8b 45 08 mov 0x8(%ebp),%eax
3b5: 8d 50 01 lea 0x1(%eax),%edx
3b8: 89 55 08 mov %edx,0x8(%ebp)
3bb: 0f b6 00 movzbl (%eax),%eax
3be: 0f be c0 movsbl %al,%eax
3c1: 01 c8 add %ecx,%eax
3c3: 83 e8 30 sub $0x30,%eax
3c6: 89 45 fc mov %eax,-0x4(%ebp)
n = 0;
while (*s == ' ') s++;
sign = (*s == '-') ? -1 : 1;
if (*s == '+' || *s == '-')
s++;
while('0' <= *s && *s <= '7')
3c9: 8b 45 08 mov 0x8(%ebp),%eax
3cc: 0f b6 00 movzbl (%eax),%eax
3cf: 3c 2f cmp $0x2f,%al
3d1: 7e 0a jle 3dd <atoo+0x85>
3d3: 8b 45 08 mov 0x8(%ebp),%eax
3d6: 0f b6 00 movzbl (%eax),%eax
3d9: 3c 37 cmp $0x37,%al
3db: 7e cb jle 3a8 <atoo+0x50>
n = n*8 + *s++ - '0';
return sign*n;
3dd: 8b 45 f8 mov -0x8(%ebp),%eax
3e0: 0f af 45 fc imul -0x4(%ebp),%eax
}
3e4: c9 leave
3e5: c3 ret
000003e6 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
3e6: 55 push %ebp
3e7: 89 e5 mov %esp,%ebp
3e9: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
3ec: 8b 45 08 mov 0x8(%ebp),%eax
3ef: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
3f2: 8b 45 0c mov 0xc(%ebp),%eax
3f5: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
3f8: eb 17 jmp 411 <memmove+0x2b>
*dst++ = *src++;
3fa: 8b 45 fc mov -0x4(%ebp),%eax
3fd: 8d 50 01 lea 0x1(%eax),%edx
400: 89 55 fc mov %edx,-0x4(%ebp)
403: 8b 55 f8 mov -0x8(%ebp),%edx
406: 8d 4a 01 lea 0x1(%edx),%ecx
409: 89 4d f8 mov %ecx,-0x8(%ebp)
40c: 0f b6 12 movzbl (%edx),%edx
40f: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
411: 8b 45 10 mov 0x10(%ebp),%eax
414: 8d 50 ff lea -0x1(%eax),%edx
417: 89 55 10 mov %edx,0x10(%ebp)
41a: 85 c0 test %eax,%eax
41c: 7f dc jg 3fa <memmove+0x14>
*dst++ = *src++;
return vdst;
41e: 8b 45 08 mov 0x8(%ebp),%eax
}
421: c9 leave
422: c3 ret
00000423 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
423: b8 01 00 00 00 mov $0x1,%eax
428: cd 40 int $0x40
42a: c3 ret
0000042b <exit>:
SYSCALL(exit)
42b: b8 02 00 00 00 mov $0x2,%eax
430: cd 40 int $0x40
432: c3 ret
00000433 <wait>:
SYSCALL(wait)
433: b8 03 00 00 00 mov $0x3,%eax
438: cd 40 int $0x40
43a: c3 ret
0000043b <pipe>:
SYSCALL(pipe)
43b: b8 04 00 00 00 mov $0x4,%eax
440: cd 40 int $0x40
442: c3 ret
00000443 <read>:
SYSCALL(read)
443: b8 05 00 00 00 mov $0x5,%eax
448: cd 40 int $0x40
44a: c3 ret
0000044b <write>:
SYSCALL(write)
44b: b8 10 00 00 00 mov $0x10,%eax
450: cd 40 int $0x40
452: c3 ret
00000453 <close>:
SYSCALL(close)
453: b8 15 00 00 00 mov $0x15,%eax
458: cd 40 int $0x40
45a: c3 ret
0000045b <kill>:
SYSCALL(kill)
45b: b8 06 00 00 00 mov $0x6,%eax
460: cd 40 int $0x40
462: c3 ret
00000463 <exec>:
SYSCALL(exec)
463: b8 07 00 00 00 mov $0x7,%eax
468: cd 40 int $0x40
46a: c3 ret
0000046b <open>:
SYSCALL(open)
46b: b8 0f 00 00 00 mov $0xf,%eax
470: cd 40 int $0x40
472: c3 ret
00000473 <mknod>:
SYSCALL(mknod)
473: b8 11 00 00 00 mov $0x11,%eax
478: cd 40 int $0x40
47a: c3 ret
0000047b <unlink>:
SYSCALL(unlink)
47b: b8 12 00 00 00 mov $0x12,%eax
480: cd 40 int $0x40
482: c3 ret
00000483 <fstat>:
SYSCALL(fstat)
483: b8 08 00 00 00 mov $0x8,%eax
488: cd 40 int $0x40
48a: c3 ret
0000048b <link>:
SYSCALL(link)
48b: b8 13 00 00 00 mov $0x13,%eax
490: cd 40 int $0x40
492: c3 ret
00000493 <mkdir>:
SYSCALL(mkdir)
493: b8 14 00 00 00 mov $0x14,%eax
498: cd 40 int $0x40
49a: c3 ret
0000049b <chdir>:
SYSCALL(chdir)
49b: b8 09 00 00 00 mov $0x9,%eax
4a0: cd 40 int $0x40
4a2: c3 ret
000004a3 <dup>:
SYSCALL(dup)
4a3: b8 0a 00 00 00 mov $0xa,%eax
4a8: cd 40 int $0x40
4aa: c3 ret
000004ab <getpid>:
SYSCALL(getpid)
4ab: b8 0b 00 00 00 mov $0xb,%eax
4b0: cd 40 int $0x40
4b2: c3 ret
000004b3 <sbrk>:
SYSCALL(sbrk)
4b3: b8 0c 00 00 00 mov $0xc,%eax
4b8: cd 40 int $0x40
4ba: c3 ret
000004bb <sleep>:
SYSCALL(sleep)
4bb: b8 0d 00 00 00 mov $0xd,%eax
4c0: cd 40 int $0x40
4c2: c3 ret
000004c3 <uptime>:
SYSCALL(uptime)
4c3: b8 0e 00 00 00 mov $0xe,%eax
4c8: cd 40 int $0x40
4ca: c3 ret
000004cb <halt>:
SYSCALL(halt)
4cb: b8 16 00 00 00 mov $0x16,%eax
4d0: cd 40 int $0x40
4d2: c3 ret
000004d3 <date>:
SYSCALL(date)
4d3: b8 17 00 00 00 mov $0x17,%eax
4d8: cd 40 int $0x40
4da: c3 ret
000004db <getuid>:
SYSCALL(getuid)
4db: b8 18 00 00 00 mov $0x18,%eax
4e0: cd 40 int $0x40
4e2: c3 ret
000004e3 <getgid>:
SYSCALL(getgid)
4e3: b8 19 00 00 00 mov $0x19,%eax
4e8: cd 40 int $0x40
4ea: c3 ret
000004eb <getppid>:
SYSCALL(getppid)
4eb: b8 1a 00 00 00 mov $0x1a,%eax
4f0: cd 40 int $0x40
4f2: c3 ret
000004f3 <setuid>:
SYSCALL(setuid)
4f3: b8 1b 00 00 00 mov $0x1b,%eax
4f8: cd 40 int $0x40
4fa: c3 ret
000004fb <setgid>:
SYSCALL(setgid)
4fb: b8 1c 00 00 00 mov $0x1c,%eax
500: cd 40 int $0x40
502: c3 ret
00000503 <getprocs>:
SYSCALL(getprocs)
503: b8 1d 00 00 00 mov $0x1d,%eax
508: cd 40 int $0x40
50a: c3 ret
0000050b <setpriority>:
SYSCALL(setpriority)
50b: b8 1e 00 00 00 mov $0x1e,%eax
510: cd 40 int $0x40
512: c3 ret
00000513 <chmod>:
SYSCALL(chmod)
513: b8 1f 00 00 00 mov $0x1f,%eax
518: cd 40 int $0x40
51a: c3 ret
0000051b <chown>:
SYSCALL(chown)
51b: b8 20 00 00 00 mov $0x20,%eax
520: cd 40 int $0x40
522: c3 ret
00000523 <chgrp>:
SYSCALL(chgrp)
523: b8 21 00 00 00 mov $0x21,%eax
528: cd 40 int $0x40
52a: c3 ret
0000052b <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
52b: 55 push %ebp
52c: 89 e5 mov %esp,%ebp
52e: 83 ec 18 sub $0x18,%esp
531: 8b 45 0c mov 0xc(%ebp),%eax
534: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
537: 83 ec 04 sub $0x4,%esp
53a: 6a 01 push $0x1
53c: 8d 45 f4 lea -0xc(%ebp),%eax
53f: 50 push %eax
540: ff 75 08 pushl 0x8(%ebp)
543: e8 03 ff ff ff call 44b <write>
548: 83 c4 10 add $0x10,%esp
}
54b: 90 nop
54c: c9 leave
54d: c3 ret
0000054e <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
54e: 55 push %ebp
54f: 89 e5 mov %esp,%ebp
551: 53 push %ebx
552: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
555: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
55c: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
560: 74 17 je 579 <printint+0x2b>
562: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
566: 79 11 jns 579 <printint+0x2b>
neg = 1;
568: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
56f: 8b 45 0c mov 0xc(%ebp),%eax
572: f7 d8 neg %eax
574: 89 45 ec mov %eax,-0x14(%ebp)
577: eb 06 jmp 57f <printint+0x31>
} else {
x = xx;
579: 8b 45 0c mov 0xc(%ebp),%eax
57c: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
57f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
586: 8b 4d f4 mov -0xc(%ebp),%ecx
589: 8d 41 01 lea 0x1(%ecx),%eax
58c: 89 45 f4 mov %eax,-0xc(%ebp)
58f: 8b 5d 10 mov 0x10(%ebp),%ebx
592: 8b 45 ec mov -0x14(%ebp),%eax
595: ba 00 00 00 00 mov $0x0,%edx
59a: f7 f3 div %ebx
59c: 89 d0 mov %edx,%eax
59e: 0f b6 80 80 0c 00 00 movzbl 0xc80(%eax),%eax
5a5: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
5a9: 8b 5d 10 mov 0x10(%ebp),%ebx
5ac: 8b 45 ec mov -0x14(%ebp),%eax
5af: ba 00 00 00 00 mov $0x0,%edx
5b4: f7 f3 div %ebx
5b6: 89 45 ec mov %eax,-0x14(%ebp)
5b9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
5bd: 75 c7 jne 586 <printint+0x38>
if(neg)
5bf: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
5c3: 74 2d je 5f2 <printint+0xa4>
buf[i++] = '-';
5c5: 8b 45 f4 mov -0xc(%ebp),%eax
5c8: 8d 50 01 lea 0x1(%eax),%edx
5cb: 89 55 f4 mov %edx,-0xc(%ebp)
5ce: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
5d3: eb 1d jmp 5f2 <printint+0xa4>
putc(fd, buf[i]);
5d5: 8d 55 dc lea -0x24(%ebp),%edx
5d8: 8b 45 f4 mov -0xc(%ebp),%eax
5db: 01 d0 add %edx,%eax
5dd: 0f b6 00 movzbl (%eax),%eax
5e0: 0f be c0 movsbl %al,%eax
5e3: 83 ec 08 sub $0x8,%esp
5e6: 50 push %eax
5e7: ff 75 08 pushl 0x8(%ebp)
5ea: e8 3c ff ff ff call 52b <putc>
5ef: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
5f2: 83 6d f4 01 subl $0x1,-0xc(%ebp)
5f6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
5fa: 79 d9 jns 5d5 <printint+0x87>
putc(fd, buf[i]);
}
5fc: 90 nop
5fd: 8b 5d fc mov -0x4(%ebp),%ebx
600: c9 leave
601: c3 ret
00000602 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
602: 55 push %ebp
603: 89 e5 mov %esp,%ebp
605: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
608: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
60f: 8d 45 0c lea 0xc(%ebp),%eax
612: 83 c0 04 add $0x4,%eax
615: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
618: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
61f: e9 59 01 00 00 jmp 77d <printf+0x17b>
c = fmt[i] & 0xff;
624: 8b 55 0c mov 0xc(%ebp),%edx
627: 8b 45 f0 mov -0x10(%ebp),%eax
62a: 01 d0 add %edx,%eax
62c: 0f b6 00 movzbl (%eax),%eax
62f: 0f be c0 movsbl %al,%eax
632: 25 ff 00 00 00 and $0xff,%eax
637: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
63a: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
63e: 75 2c jne 66c <printf+0x6a>
if(c == '%'){
640: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
644: 75 0c jne 652 <printf+0x50>
state = '%';
646: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
64d: e9 27 01 00 00 jmp 779 <printf+0x177>
} else {
putc(fd, c);
652: 8b 45 e4 mov -0x1c(%ebp),%eax
655: 0f be c0 movsbl %al,%eax
658: 83 ec 08 sub $0x8,%esp
65b: 50 push %eax
65c: ff 75 08 pushl 0x8(%ebp)
65f: e8 c7 fe ff ff call 52b <putc>
664: 83 c4 10 add $0x10,%esp
667: e9 0d 01 00 00 jmp 779 <printf+0x177>
}
} else if(state == '%'){
66c: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
670: 0f 85 03 01 00 00 jne 779 <printf+0x177>
if(c == 'd'){
676: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
67a: 75 1e jne 69a <printf+0x98>
printint(fd, *ap, 10, 1);
67c: 8b 45 e8 mov -0x18(%ebp),%eax
67f: 8b 00 mov (%eax),%eax
681: 6a 01 push $0x1
683: 6a 0a push $0xa
685: 50 push %eax
686: ff 75 08 pushl 0x8(%ebp)
689: e8 c0 fe ff ff call 54e <printint>
68e: 83 c4 10 add $0x10,%esp
ap++;
691: 83 45 e8 04 addl $0x4,-0x18(%ebp)
695: e9 d8 00 00 00 jmp 772 <printf+0x170>
} else if(c == 'x' || c == 'p'){
69a: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
69e: 74 06 je 6a6 <printf+0xa4>
6a0: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
6a4: 75 1e jne 6c4 <printf+0xc2>
printint(fd, *ap, 16, 0);
6a6: 8b 45 e8 mov -0x18(%ebp),%eax
6a9: 8b 00 mov (%eax),%eax
6ab: 6a 00 push $0x0
6ad: 6a 10 push $0x10
6af: 50 push %eax
6b0: ff 75 08 pushl 0x8(%ebp)
6b3: e8 96 fe ff ff call 54e <printint>
6b8: 83 c4 10 add $0x10,%esp
ap++;
6bb: 83 45 e8 04 addl $0x4,-0x18(%ebp)
6bf: e9 ae 00 00 00 jmp 772 <printf+0x170>
} else if(c == 's'){
6c4: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
6c8: 75 43 jne 70d <printf+0x10b>
s = (char*)*ap;
6ca: 8b 45 e8 mov -0x18(%ebp),%eax
6cd: 8b 00 mov (%eax),%eax
6cf: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
6d2: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
6d6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
6da: 75 25 jne 701 <printf+0xff>
s = "(null)";
6dc: c7 45 f4 08 0a 00 00 movl $0xa08,-0xc(%ebp)
while(*s != 0){
6e3: eb 1c jmp 701 <printf+0xff>
putc(fd, *s);
6e5: 8b 45 f4 mov -0xc(%ebp),%eax
6e8: 0f b6 00 movzbl (%eax),%eax
6eb: 0f be c0 movsbl %al,%eax
6ee: 83 ec 08 sub $0x8,%esp
6f1: 50 push %eax
6f2: ff 75 08 pushl 0x8(%ebp)
6f5: e8 31 fe ff ff call 52b <putc>
6fa: 83 c4 10 add $0x10,%esp
s++;
6fd: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
701: 8b 45 f4 mov -0xc(%ebp),%eax
704: 0f b6 00 movzbl (%eax),%eax
707: 84 c0 test %al,%al
709: 75 da jne 6e5 <printf+0xe3>
70b: eb 65 jmp 772 <printf+0x170>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
70d: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
711: 75 1d jne 730 <printf+0x12e>
putc(fd, *ap);
713: 8b 45 e8 mov -0x18(%ebp),%eax
716: 8b 00 mov (%eax),%eax
718: 0f be c0 movsbl %al,%eax
71b: 83 ec 08 sub $0x8,%esp
71e: 50 push %eax
71f: ff 75 08 pushl 0x8(%ebp)
722: e8 04 fe ff ff call 52b <putc>
727: 83 c4 10 add $0x10,%esp
ap++;
72a: 83 45 e8 04 addl $0x4,-0x18(%ebp)
72e: eb 42 jmp 772 <printf+0x170>
} else if(c == '%'){
730: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
734: 75 17 jne 74d <printf+0x14b>
putc(fd, c);
736: 8b 45 e4 mov -0x1c(%ebp),%eax
739: 0f be c0 movsbl %al,%eax
73c: 83 ec 08 sub $0x8,%esp
73f: 50 push %eax
740: ff 75 08 pushl 0x8(%ebp)
743: e8 e3 fd ff ff call 52b <putc>
748: 83 c4 10 add $0x10,%esp
74b: eb 25 jmp 772 <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
74d: 83 ec 08 sub $0x8,%esp
750: 6a 25 push $0x25
752: ff 75 08 pushl 0x8(%ebp)
755: e8 d1 fd ff ff call 52b <putc>
75a: 83 c4 10 add $0x10,%esp
putc(fd, c);
75d: 8b 45 e4 mov -0x1c(%ebp),%eax
760: 0f be c0 movsbl %al,%eax
763: 83 ec 08 sub $0x8,%esp
766: 50 push %eax
767: ff 75 08 pushl 0x8(%ebp)
76a: e8 bc fd ff ff call 52b <putc>
76f: 83 c4 10 add $0x10,%esp
}
state = 0;
772: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
779: 83 45 f0 01 addl $0x1,-0x10(%ebp)
77d: 8b 55 0c mov 0xc(%ebp),%edx
780: 8b 45 f0 mov -0x10(%ebp),%eax
783: 01 d0 add %edx,%eax
785: 0f b6 00 movzbl (%eax),%eax
788: 84 c0 test %al,%al
78a: 0f 85 94 fe ff ff jne 624 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
790: 90 nop
791: c9 leave
792: c3 ret
00000793 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
793: 55 push %ebp
794: 89 e5 mov %esp,%ebp
796: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
799: 8b 45 08 mov 0x8(%ebp),%eax
79c: 83 e8 08 sub $0x8,%eax
79f: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
7a2: a1 9c 0c 00 00 mov 0xc9c,%eax
7a7: 89 45 fc mov %eax,-0x4(%ebp)
7aa: eb 24 jmp 7d0 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
7ac: 8b 45 fc mov -0x4(%ebp),%eax
7af: 8b 00 mov (%eax),%eax
7b1: 3b 45 fc cmp -0x4(%ebp),%eax
7b4: 77 12 ja 7c8 <free+0x35>
7b6: 8b 45 f8 mov -0x8(%ebp),%eax
7b9: 3b 45 fc cmp -0x4(%ebp),%eax
7bc: 77 24 ja 7e2 <free+0x4f>
7be: 8b 45 fc mov -0x4(%ebp),%eax
7c1: 8b 00 mov (%eax),%eax
7c3: 3b 45 f8 cmp -0x8(%ebp),%eax
7c6: 77 1a ja 7e2 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
7c8: 8b 45 fc mov -0x4(%ebp),%eax
7cb: 8b 00 mov (%eax),%eax
7cd: 89 45 fc mov %eax,-0x4(%ebp)
7d0: 8b 45 f8 mov -0x8(%ebp),%eax
7d3: 3b 45 fc cmp -0x4(%ebp),%eax
7d6: 76 d4 jbe 7ac <free+0x19>
7d8: 8b 45 fc mov -0x4(%ebp),%eax
7db: 8b 00 mov (%eax),%eax
7dd: 3b 45 f8 cmp -0x8(%ebp),%eax
7e0: 76 ca jbe 7ac <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
7e2: 8b 45 f8 mov -0x8(%ebp),%eax
7e5: 8b 40 04 mov 0x4(%eax),%eax
7e8: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
7ef: 8b 45 f8 mov -0x8(%ebp),%eax
7f2: 01 c2 add %eax,%edx
7f4: 8b 45 fc mov -0x4(%ebp),%eax
7f7: 8b 00 mov (%eax),%eax
7f9: 39 c2 cmp %eax,%edx
7fb: 75 24 jne 821 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
7fd: 8b 45 f8 mov -0x8(%ebp),%eax
800: 8b 50 04 mov 0x4(%eax),%edx
803: 8b 45 fc mov -0x4(%ebp),%eax
806: 8b 00 mov (%eax),%eax
808: 8b 40 04 mov 0x4(%eax),%eax
80b: 01 c2 add %eax,%edx
80d: 8b 45 f8 mov -0x8(%ebp),%eax
810: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
813: 8b 45 fc mov -0x4(%ebp),%eax
816: 8b 00 mov (%eax),%eax
818: 8b 10 mov (%eax),%edx
81a: 8b 45 f8 mov -0x8(%ebp),%eax
81d: 89 10 mov %edx,(%eax)
81f: eb 0a jmp 82b <free+0x98>
} else
bp->s.ptr = p->s.ptr;
821: 8b 45 fc mov -0x4(%ebp),%eax
824: 8b 10 mov (%eax),%edx
826: 8b 45 f8 mov -0x8(%ebp),%eax
829: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
82b: 8b 45 fc mov -0x4(%ebp),%eax
82e: 8b 40 04 mov 0x4(%eax),%eax
831: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
838: 8b 45 fc mov -0x4(%ebp),%eax
83b: 01 d0 add %edx,%eax
83d: 3b 45 f8 cmp -0x8(%ebp),%eax
840: 75 20 jne 862 <free+0xcf>
p->s.size += bp->s.size;
842: 8b 45 fc mov -0x4(%ebp),%eax
845: 8b 50 04 mov 0x4(%eax),%edx
848: 8b 45 f8 mov -0x8(%ebp),%eax
84b: 8b 40 04 mov 0x4(%eax),%eax
84e: 01 c2 add %eax,%edx
850: 8b 45 fc mov -0x4(%ebp),%eax
853: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
856: 8b 45 f8 mov -0x8(%ebp),%eax
859: 8b 10 mov (%eax),%edx
85b: 8b 45 fc mov -0x4(%ebp),%eax
85e: 89 10 mov %edx,(%eax)
860: eb 08 jmp 86a <free+0xd7>
} else
p->s.ptr = bp;
862: 8b 45 fc mov -0x4(%ebp),%eax
865: 8b 55 f8 mov -0x8(%ebp),%edx
868: 89 10 mov %edx,(%eax)
freep = p;
86a: 8b 45 fc mov -0x4(%ebp),%eax
86d: a3 9c 0c 00 00 mov %eax,0xc9c
}
872: 90 nop
873: c9 leave
874: c3 ret
00000875 <morecore>:
static Header*
morecore(uint nu)
{
875: 55 push %ebp
876: 89 e5 mov %esp,%ebp
878: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if(nu < 4096)
87b: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
882: 77 07 ja 88b <morecore+0x16>
nu = 4096;
884: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
88b: 8b 45 08 mov 0x8(%ebp),%eax
88e: c1 e0 03 shl $0x3,%eax
891: 83 ec 0c sub $0xc,%esp
894: 50 push %eax
895: e8 19 fc ff ff call 4b3 <sbrk>
89a: 83 c4 10 add $0x10,%esp
89d: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
8a0: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
8a4: 75 07 jne 8ad <morecore+0x38>
return 0;
8a6: b8 00 00 00 00 mov $0x0,%eax
8ab: eb 26 jmp 8d3 <morecore+0x5e>
hp = (Header*)p;
8ad: 8b 45 f4 mov -0xc(%ebp),%eax
8b0: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
8b3: 8b 45 f0 mov -0x10(%ebp),%eax
8b6: 8b 55 08 mov 0x8(%ebp),%edx
8b9: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
8bc: 8b 45 f0 mov -0x10(%ebp),%eax
8bf: 83 c0 08 add $0x8,%eax
8c2: 83 ec 0c sub $0xc,%esp
8c5: 50 push %eax
8c6: e8 c8 fe ff ff call 793 <free>
8cb: 83 c4 10 add $0x10,%esp
return freep;
8ce: a1 9c 0c 00 00 mov 0xc9c,%eax
}
8d3: c9 leave
8d4: c3 ret
000008d5 <malloc>:
void*
malloc(uint nbytes)
{
8d5: 55 push %ebp
8d6: 89 e5 mov %esp,%ebp
8d8: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
8db: 8b 45 08 mov 0x8(%ebp),%eax
8de: 83 c0 07 add $0x7,%eax
8e1: c1 e8 03 shr $0x3,%eax
8e4: 83 c0 01 add $0x1,%eax
8e7: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
8ea: a1 9c 0c 00 00 mov 0xc9c,%eax
8ef: 89 45 f0 mov %eax,-0x10(%ebp)
8f2: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8f6: 75 23 jne 91b <malloc+0x46>
base.s.ptr = freep = prevp = &base;
8f8: c7 45 f0 94 0c 00 00 movl $0xc94,-0x10(%ebp)
8ff: 8b 45 f0 mov -0x10(%ebp),%eax
902: a3 9c 0c 00 00 mov %eax,0xc9c
907: a1 9c 0c 00 00 mov 0xc9c,%eax
90c: a3 94 0c 00 00 mov %eax,0xc94
base.s.size = 0;
911: c7 05 98 0c 00 00 00 movl $0x0,0xc98
918: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
91b: 8b 45 f0 mov -0x10(%ebp),%eax
91e: 8b 00 mov (%eax),%eax
920: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
923: 8b 45 f4 mov -0xc(%ebp),%eax
926: 8b 40 04 mov 0x4(%eax),%eax
929: 3b 45 ec cmp -0x14(%ebp),%eax
92c: 72 4d jb 97b <malloc+0xa6>
if(p->s.size == nunits)
92e: 8b 45 f4 mov -0xc(%ebp),%eax
931: 8b 40 04 mov 0x4(%eax),%eax
934: 3b 45 ec cmp -0x14(%ebp),%eax
937: 75 0c jne 945 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
939: 8b 45 f4 mov -0xc(%ebp),%eax
93c: 8b 10 mov (%eax),%edx
93e: 8b 45 f0 mov -0x10(%ebp),%eax
941: 89 10 mov %edx,(%eax)
943: eb 26 jmp 96b <malloc+0x96>
else {
p->s.size -= nunits;
945: 8b 45 f4 mov -0xc(%ebp),%eax
948: 8b 40 04 mov 0x4(%eax),%eax
94b: 2b 45 ec sub -0x14(%ebp),%eax
94e: 89 c2 mov %eax,%edx
950: 8b 45 f4 mov -0xc(%ebp),%eax
953: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
956: 8b 45 f4 mov -0xc(%ebp),%eax
959: 8b 40 04 mov 0x4(%eax),%eax
95c: c1 e0 03 shl $0x3,%eax
95f: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
962: 8b 45 f4 mov -0xc(%ebp),%eax
965: 8b 55 ec mov -0x14(%ebp),%edx
968: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
96b: 8b 45 f0 mov -0x10(%ebp),%eax
96e: a3 9c 0c 00 00 mov %eax,0xc9c
return (void*)(p + 1);
973: 8b 45 f4 mov -0xc(%ebp),%eax
976: 83 c0 08 add $0x8,%eax
979: eb 3b jmp 9b6 <malloc+0xe1>
}
if(p == freep)
97b: a1 9c 0c 00 00 mov 0xc9c,%eax
980: 39 45 f4 cmp %eax,-0xc(%ebp)
983: 75 1e jne 9a3 <malloc+0xce>
if((p = morecore(nunits)) == 0)
985: 83 ec 0c sub $0xc,%esp
988: ff 75 ec pushl -0x14(%ebp)
98b: e8 e5 fe ff ff call 875 <morecore>
990: 83 c4 10 add $0x10,%esp
993: 89 45 f4 mov %eax,-0xc(%ebp)
996: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
99a: 75 07 jne 9a3 <malloc+0xce>
return 0;
99c: b8 00 00 00 00 mov $0x0,%eax
9a1: eb 13 jmp 9b6 <malloc+0xe1>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
9a3: 8b 45 f4 mov -0xc(%ebp),%eax
9a6: 89 45 f0 mov %eax,-0x10(%ebp)
9a9: 8b 45 f4 mov -0xc(%ebp),%eax
9ac: 8b 00 mov (%eax),%eax
9ae: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
9b1: e9 6d ff ff ff jmp 923 <malloc+0x4e>
}
9b6: c9 leave
9b7: c3 ret
|
examples/outdated-and-incorrect/clowns/Clowns.agda
|
cruhland/agda
| 1,989 |
3852
|
<reponame>cruhland/agda
{-# OPTIONS --no-positivity-check #-}
module Clowns where
import Equality
import Isomorphism
import Derivative
import ChainRule
open import Sets
open import Functor
open import Zipper
open import Dissect
open Functor.Recursive
open Functor.Semantics
-- Natural numbers
NatF : U
NatF = K [1] + Id
Nat : Set
Nat = μ NatF
zero : Nat
zero = inn (inl <>)
suc : Nat -> Nat
suc n = inn (inr n)
plus : Nat -> Nat -> Nat
plus n m = fold NatF φ n where
φ : ⟦ NatF ⟧ Nat -> Nat
φ (inl <>) = m
φ (inr z) = suc z
-- Lists
ListF : (A : Set) -> U
ListF A = K [1] + K A × Id
List' : (A : Set) -> Set
List' A = μ (ListF A)
nil : {A : Set} -> List' A
nil = inn (inl <>)
cons : {A : Set} -> A -> List' A -> List' A
cons x xs = inn (inr < x , xs >)
sum : List' Nat -> Nat
sum = fold (ListF Nat) φ where
φ : ⟦ ListF Nat ⟧ Nat -> Nat
φ (inl <>) = zero
φ (inr < n , m >) = plus n m
TreeF : U
TreeF = K [1] + Id × Id
Tree : Set
Tree = μ TreeF
leaf : Tree
leaf = inn (inl <>)
node : Tree -> Tree -> Tree
node l r = inn (inr < l , r >)
|
programs/oeis/089/A089257.asm
|
neoneye/loda
| 22 |
171786
|
; A089257: Even numbers n such that 2n-5 is a prime of the form 4k+3.
; 4,6,8,12,14,18,24,26,32,36,38,42,44,54,56,66,68,72,78,84,86,92,98,102,108,114,116,122,128,134,138,144,156,158,168,176,182,186,192,194,212,218,222,224,234,236,242,246,248,252,254,264,276,284,288,296,302,306,312,318,324,326,332,344,348,362,366,372,374,378,396,408,414,416,422,432,434,444,446,456,458,462,476,486,488,494,498,512,518,522,528,534,546,548,554,564,578,584,588,596
mov $1,2
mov $2,$0
pow $2,2
add $2,1
lpb $2
sub $2,1
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,4
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
div $1,4
mul $1,4
sub $1,4
div $1,4
mul $1,2
add $1,4
mov $0,$1
|
oeis/229/A229283.asm
|
neoneye/loda-programs
| 11 |
19210
|
; A229283: Number of ascending runs in {1,...,9}^n.
; Submitted by <NAME>
; 0,9,126,1539,17496,190269,2007666,20726199,210450636,2109289329,20920706406,205720279659,2008387814976,19487638017189,188098071296346,1807266603941919,17294855095950516,164918796807813849,1567655079768657486,14859368894402912979,140488578637991177256,1325185535037205239309,12473764760992408949826,117187737359849736712839,1099004326836910135895196,10289871156916553772373569,96198330350708246895213366,898090382602507588551581499,8373562128437768595416184336,77978797321076720044813216629
mov $1,1
add $1,$0
mov $2,$0
lpb $0
sub $0,1
mul $1,4
add $1,$2
mov $2,$1
mul $1,2
lpe
mov $0,$2
|
fxscriptcompiler/FCP Function Library.applescript
|
joemaller/joesfilters
| 0 |
2400
|
<filename>fxscriptcompiler/FCP Function Library.applescript
-- FCP Function Library.applescript
-- Joe's FXScript Compiler
-- Created by <NAME> on 8/18/06.
-- Copyright 2006 __MyCompanyName__. All rights reserved.
(* used by the FCP ccrash detection and recovery routines *)
property loopcount : 0
property crashcount : 0
property errorCount : 0
property startTime : missing value
global progressLib
tell me to log "loaded FCP Functions"
on FCPdismissStartupWindows()
log "FCPdismissStartupWindows()"
set loopcount to loopcount + 1
-- this checks for every startup window I can find, closes one then calls itself again until it returns true
-- check for window "Offline Files"
tell application "Final Cut Pro" to activate -- bring FCP to front
tell application "System Events"
tell process "Final Cut Pro"
try
with timeout of 30 seconds
set windowList to name of every window
(* FCP will occasionally fail to respond to System Events during launch and restoration of exising projects. this can take a while *)
end timeout
if windowList contains "External A/V" then
(key code 53) -- press escape
my FCPdismissStartupWindows()
end if
if windowList contains "Offline Files" then
click button "Continue" of window "Offline Files"
my FCPdismissStartupWindows()
end if
if button "Replace" of window 1 exists then click button "Replace" of window 1
on error the error_message number the error_number
-- i don't think is is ever getting called...
log "FAILED on: " & loopcount & ", " & error_number & " (" & error_number & ") retrying..."
log loopcount
if loopcount < 25 then my FCPdismissStartupWindows() -- loopcount is a check to prevent runaway loops
end try
end tell
end tell
return true
end FCPdismissStartupWindows
on FXBuilderBringToFront() -- makes sure frontmost window is FXBuilder
log "FXBuilderBringToFront()"
tell application "System Events"
log "*** GETTING PROCESSES ***"
log name of every process as list
log "FCP EXISTS? " & (exists process "Final Cut Pro")
if not (exists process "Final Cut Pro") then
set crashcount to crashcount + 1
progressLib's showStatus("FCP Crashed: Restarting...", true)
end if
end tell
FCPdismissStartupWindows()
tell application "System Events"
tell process "Final Cut Pro"
set windowList to name of every window
if windowList contains "FXBuilder" then
set FXBcount to 0
repeat with theWindow in windowList
if theWindow as string is "FXBuilder" then set FXBcount to FXBcount + 1
end repeat
repeat FXBcount times
perform action "AXRaise" of window "FXBuilder"
if scroll bar 1 of window "FXBuilder" exists then
return true -- end, we found a workable window
end if
if size of window "FXBuilder" is {322, 320} then
keystroke "w" using command down -- close preview window
end if
(* if there's a controls window, do nothing, which is a problem since it will remain frontmost
this will fail gracefully however and eventually open a new FXBuilder window *)
end repeat
end if
if value of attribute "AXEnabled" of menu item "FXBuilder" of menu "Tools" of menu bar 1 is false then
log "FXBuilder menu disabled. loopcount: " & loopcount
log "loopcount: " & loopcount
if loopcount < 200 then my FCPdismissStartupWindows()
end if
click menu item "FXBuilder" of menu "Tools" of menu bar 1
end tell
end tell
end FXBuilderBringToFront
on FXBuilderPasteText(sourceText) -- places sourceText into an FXBuilder window
FXBuilderBringToFront()
set the clipboard to sourceText as text
tell application "System Events"
tell process "Final Cut Pro"
tell application "Final Cut Pro" to activate
keystroke "a" using command down -- select all
key code 51 -- (delete key) delete current selected text
keystroke "va" using command down -- paste and select all
end tell
end tell
end FXBuilderPasteText
on FXBuilderSaveEncodedPlugin(plugSource, destName, destFolder)
log "FXBuilderSaveEncodedPlugin([source], " & destName & ", " & destFolder & ")"
-- need to have a catch for compile errors
--log "calling FXBuilderPasteText"
FXBuilderPasteText(plugSource) -- send source code to the FXBuilder window
try
tell application "Final Cut Pro" to activate
tell application "System Events"
tell process "Final Cut Pro"
repeat 5 times -- check for gibberish in the save default box...
with timeout of 10 seconds
log "CLICKING CREATE ENCODED"
click menu item "Create Encoded Plugin..." of menu "FXBuilder" of menu bar item "FXBuilder" of menu bar 1
log "clicked, should be the save dialog"
end timeout
tell window "Save"
if not (exists checkbox 2) then
click checkbox 1 -- make sure hide extension is visible
delay 1 -- let the interface catch up...
end if
if get value of checkbox 2 is 1 then -- checkbox 2 is the "Hide extension" option
click checkbox 2 -- make sure hide extension is not checked
delay 1 -- if the extension was hidden, wait one second for the UI to catch up with the script
end if
set theSaveExtensions to value of text field 1 as text
end tell
log theSaveExtensions
log text -6 through -1 of theSaveExtensions
log text -6 through -1 of theSaveExtensions is ".fcfcc"
if text -6 through -1 of theSaveExtensions is ".fcfcc" then exit repeat -- clean default name, continue
-- the existing text did not register correctly, so it probably contained crap characters
key code 53 -- press escape to cancel save
log "gibberish in save window"
delay 1
end repeat
end tell
end tell
FXBuilderSetSaveDialogOutputFolder(destFolder)
FXBuilderSetSaveDialogFileNameSaveFile(destName)
-- tell application "System Events" to click button "Save" of window 1 of process "Final Cut Pro"
on error the error_message number the error_number
log "Error: " & the error_number & ". " & the error_message
set errorCount to errorCount + 1
log "errorCount: " & errorCount
if errorCount > 25 then return -- safety since it ran off the rails here
FXBuilderSaveEncodedPlugin(plugSource, destName, destFolder) -- call self if there's a fatal error
end try
end FXBuilderSaveEncodedPlugin
on FXBuilderSetSaveDialogFileNameSaveFile(theFileName)
log "FXBuilderSetSaveDialogFileName(" & theFileName & ")"
-- used to simplify entering the outgoing filename when saving files
tell application "System Events"
tell process "Final Cut Pro"
tell window 1
set the clipboard to theFileName as text
repeat 5 times -- safety max loop value
tell application "Final Cut Pro" to activate
keystroke "av" using {command down} -- select all, paste
set checkVal to (value of text field 1 is equal to theFileName as text)
set checkVal to (value of text field 1 as text)
if checkVal is equal to (theFileName as text) then exit repeat
end repeat
click button "Save" -- click save
end tell
end tell
end tell
end FXBuilderSetSaveDialogFileNameSaveFile
on FXBuilderSetSaveDialogOutputFolder(thePath)
log "FXBuilderSetSaveDialogOutputFolder(" & thePath & ")"
-- used to simplify entering the destination path when saving FXScripts
-- assumes that the FXBuilder save dialog is already frontmost
-- flashes twice because the path would occasionally be entered incorrectly, the second flash is a safety check
-- added a safety max-loop value of 5 in case the folder doesn't exist or something else breaks
tell application "System Events"
tell process "Final Cut Pro"
tell window 1
set the clipboard to thePath as text
repeat 5 times -- safety max loop value
tell application "Final Cut Pro" to activate
keystroke "g" using {command down, shift down} -- Open path entry dialog
keystroke "av" using {command down} -- select all, paste
set checkVal to (value of text field 1 as text)
keystroke return -- close path entry dialog
if checkVal is equal to (thePath as text) then exit repeat
end repeat
end tell
end tell
end tell
end FXBuilderSetSaveDialogOutputFolder
|
src/stemmer.ads
|
stcarrez/ada-stemmer
| 3 |
26486
|
<filename>src/stemmer.ads
-----------------------------------------------------------------------
-- stemmer -- Multi-language stemmer with Snowball generator
-- Copyright (C) 2020 <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 Stemmer with SPARK_Mode is
WORD_MAX_LENGTH : constant := 1024;
type Context_Type is abstract tagged private;
-- Apply the stemming algorithm on the word initialized in the context.
procedure Stem (Context : in out Context_Type;
Result : out Boolean) is abstract;
-- Stem the word and return True if it was reduced.
procedure Stem_Word (Context : in out Context_Type'Class;
Word : in String;
Result : out Boolean) with
Global => null,
Pre => Word'Length < WORD_MAX_LENGTH;
-- Get the stem or the input word unmodified.
function Get_Result (Context : in Context_Type'Class) return String with
Global => null,
Post => Get_Result'Result'Length < WORD_MAX_LENGTH;
private
type Mask_Type is mod 2**32;
-- A 32-bit character value that was read from UTF-8 sequence.
-- A modular value is used because shift and logical arithmetic is necessary.
type Utf8_Type is mod 2**32;
-- Index of the Grouping_Array. The index comes from the 32-bit character value
-- minus a starting offset. We don't expect large tables and we check against
-- a maximum value.
subtype Grouping_Index is Utf8_Type range 0 .. 16384;
type Grouping_Array is array (Grouping_Index range <>) of Boolean with Pack;
subtype Among_Index is Natural range 0 .. 65535;
subtype Among_Start_Index is Among_Index range 1 .. Among_Index'Last;
subtype Operation_Index is Natural range 0 .. 65535;
subtype Result_Index is Integer range -1 .. WORD_MAX_LENGTH - 1;
subtype Char_Index is Result_Index range 0 .. Result_Index'Last;
type Among_Type is record
First : Among_Start_Index;
Last : Among_Index;
Substring_I : Integer;
Result : Integer;
Operation : Operation_Index;
end record;
type Among_Array_Type is array (Natural range <>) of Among_Type;
function Eq_S (Context : in Context_Type'Class;
S : in String) return Char_Index with
Global => null,
Pre => S'Length > 0,
Post => Eq_S'Result = 0 or Eq_S'Result = S'Length;
function Eq_S_Backward (Context : in Context_Type'Class;
S : in String) return Char_Index with
Global => null,
Pre => S'Length > 0,
Post => Eq_S_Backward'Result = 0 or Eq_S_Backward'Result = S'Length;
procedure Find_Among (Context : in out Context_Type'Class;
Amongs : in Among_Array_Type;
Pattern : in String;
Execute : access procedure
(Ctx : in out Context_Type'Class;
Operation : in Operation_Index;
Status : out Boolean);
Result : out Integer) with
Global => null,
Pre => Pattern'Length > 0 and Amongs'Length > 0;
procedure Find_Among_Backward (Context : in out Context_Type'Class;
Amongs : in Among_Array_Type;
Pattern : in String;
Execute : access procedure
(Ctx : in out Context_Type'Class;
Operation : in Operation_Index;
Status : out Boolean);
Result : out Integer) with
Global => null,
Pre => Pattern'Length > 0 and Amongs'Length > 0;
function Skip_Utf8 (Context : in Context_Type'Class) return Result_Index with
Global => null;
function Skip_Utf8 (Context : in Context_Type'Class;
N : in Positive) return Result_Index with
Global => null;
function Skip_Utf8_Backward (Context : in Context_Type'Class) return Result_Index with
Global => null;
function Skip_Utf8_Backward (Context : in Context_Type'Class;
N : in Positive) return Result_Index with
Global => null;
procedure Get_Utf8 (Context : in Context_Type'Class;
Value : out Utf8_Type;
Count : out Natural);
procedure Get_Utf8_Backward (Context : in Context_Type'Class;
Value : out Utf8_Type;
Count : out Natural);
function Length (Context : in Context_Type'Class) return Natural;
function Length_Utf8 (Context : in Context_Type'Class) return Natural;
function Check_Among (Context : in Context_Type'Class;
Pos : in Char_Index;
Shift : in Natural;
Mask : in Mask_Type) return Boolean;
procedure Out_Grouping (Context : in out Context_Type'Class;
S : in Grouping_Array;
Min : in Utf8_Type;
Max : in Utf8_Type;
Repeat : in Boolean;
Result : out Result_Index);
procedure Out_Grouping_Backward (Context : in out Context_Type'Class;
S : in Grouping_Array;
Min : in Utf8_Type;
Max : in Utf8_Type;
Repeat : in Boolean;
Result : out Result_Index);
procedure In_Grouping (Context : in out Context_Type'Class;
S : in Grouping_Array;
Min : in Utf8_Type;
Max : in Utf8_Type;
Repeat : in Boolean;
Result : out Result_Index);
procedure In_Grouping_Backward (Context : in out Context_Type'Class;
S : in Grouping_Array;
Min : in Utf8_Type;
Max : in Utf8_Type;
Repeat : in Boolean;
Result : out Result_Index);
procedure Replace (Context : in out Context_Type'Class;
C_Bra : in Char_Index;
C_Ket : in Char_Index;
S : in String;
Adjustment : out Integer) with
Global => null,
Pre => C_Bra >= Context.Lb and C_Ket >= C_Bra and C_Ket <= Context.L;
procedure Slice_Del (Context : in out Context_Type'Class) with
Global => null,
Pre => Context.Bra >= Context.Lb and Context.Ket >= Context.Bra
and Context.Ket <= Context.L;
procedure Slice_From (Context : in out Context_Type'Class;
Text : in String) with
Global => null,
Pre => Context.Bra >= Context.Lb and Context.Ket >= Context.Bra
and Context.Ket <= Context.L
and Context.L - Context.Lb + Text'Length + Context.Ket - Context.Bra < Context.P'Length;
function Slice_To (Context : in Context_Type'Class) return String;
procedure Insert (Context : in out Context_Type'Class;
C_Bra : in Char_Index;
C_Ket : in Char_Index;
S : in String) with
Global => null,
Pre => C_Bra >= Context.Lb and C_Ket >= C_Bra and C_Ket <= Context.L;
-- The context indexes follow the C paradigm: they start at 0 for the first character.
-- This is necessary because several algorithms rely on this when they compare the
-- cursor position ('C') or setup some markers from the cursor.
type Context_Type is abstract tagged record
C : Char_Index := 0;
L : Char_Index := 0;
Lb : Char_Index := 0;
Bra : Char_Index := 0;
Ket : Char_Index := 0;
P : String (1 .. WORD_MAX_LENGTH);
end record;
end Stemmer;
|
Scripts Pack Source Items/Scripts Pack/Core Components/Wi-Fi Power State.applescript
|
Phorofor/ScriptsPack.macOS
| 1 |
3620
|
# Scripts Pack - Tweak various preference variables in macOS
# <Phorofor, https://github.com/Phorofor/>
-- AirPort Power State
-- Versions compatible: 10.6.9
-- Preference Identifier:
-- Preference Key:
-- Preference location: /Library/Preferences/
-- Default value (boolean): 0
set MacVer to do shell script "sw_vers -productVersion"
set Min to "10.6.9" as string
if MacVer > Min then
set rec to "Wi-Fi"
else
set rec to "AirPort"
end if
#set defaultHD to (get path to system folder) as string
#set mcIcon to defaultHD & "Library:CoreServices:Menu Extras:AirPort.menu:Contents:Resources:AirPort.icns"
set defaultHD to (get path to applications folder) as string
set mcIcon to defaultHD & "System Preferences.app:Contents:Resources:PrefApp.icns"
try
set loIP to "Local Wireless IP: " & (do shell script "ipconfig getifaddr en1")
on error
set loIP to "No Local Wireless - 127.0.0.1 (localhost)"
end try
try
set extIP to "External IP Address: " & (do shell script "curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/<> :]//g'")
if extIP = "External IP Address: " then
set extIP to "No External IP - Internet Not Available"
end if
end try
set apW to "networksetup -setairportpower en1 "
set powerAP to do shell script "networksetup -getairportpower en1"
display dialog "Modify the " & rec & " Power?" & return & return & powerAP & return & loIP & return & extIP buttons ["Cancel", "Turn " & rec & " Off", "Turn " & rec & " On"] cancel button 1 with title rec & " Power Change" with icon file mcIcon
set the button_pressed to the button returned of the result
if the button_pressed is "Turn " & rec & " Off" then
do shell script apW & "off"
else
do shell script apW & "on"
end if
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.