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 |
|---|---|---|---|---|
gramatica.g4 | adgaol/PruebaANTLRDesc | 0 | 3637 | <reponame>adgaol/PruebaANTLRDesc
grammar gramatica;
exp returns [Exp expO]
:
{
Exp expO=new Exp();
Node node=writer.addPasoNoTerminal("EXP", null, null, expO, "null");
}
bO=b aO=a[Integer.parseInt(((ExpContext)_localctx).bO.bO.getValue())] PuntoComa
{
writer.updateNoTerminals("EXP::= B {A.valor=B.result;} A ; {print(A.result);}", ((ExpContext)_localctx).aO.aO.getValue(), expO, ((ExpContext)_localctx).bO.bO);
System.out.println(((ExpContext)_localctx).aO.aO.getValue());
_localctx.expO=expO;
writer.writeXML();
}
;
a [Integer her] returns [A aO]
:
{
A aO=new A();
Node node=writer.addPasoNoTerminal("A", "valor", "result", aO, her.toString());
}
Mas bO=b aeO=a[Integer.parseInt(((AContext)_localctx).bO.bO.getValue())+her]
{
writer.updateNoTerminals("A::= + B {A1.valor=A.valor+B.result;} A {A.result=A1.result;}", ((AContext)_localctx).aeO.aO.getValue(), aO, ((AContext)_localctx).masO.masO);
_localctx.aO=aO;
}
|
{
A aO=new A();
writer.addPasoLambda("A", "valor", "result", her.toString(), "{A.result=A.valor;}", aO);
_localctx.aO=aO;
}
;
b returns [B bO]
:
{
B bO=new B();
Node node=writer.addPasoNoTerminal("B", null, "result", bO, "null");
}
numO=Number cO=c[Integer.parseInt(((BContext)_localctx).numO.numberO.getValue())]
{
writer.updateNoTerminals("B::= number {C.valor=num.vlex;} C {B.result=C.result;}", ((BContext)_localctx).cO.cO.getValue(), bO, ((BContext)_localctx).numO.numberO);
_localctx.bO=bO;
}
;
c [Integer her] returns [C cO]
:
{
C cO=new C();
Node node=writer.addPasoNoTerminal("C", "valor", "result", cO, her.toString());
}
Por numO=Number ceO=c[her*Integer.parseInt(((CContext)_localctx).numO.numberO.getValue())]
{
writer.updateNoTerminals("C::= * number {C1.valor=C.valor*number.vlex;} C {C.result=C1.result;}", ((CContext)_localctx).ceO.cO.getValue(), cO, ((CContext)_localctx).porO.porO);
_localctx.cO=cO;}
|
{
C cO=new C();
writer.addPasoLambda("C", "valor", "result", her.toString(), "{C.result=C.valor;}", cO);
_localctx.cO=cO;
}
;
Number
: ('0'..'9')+ {
}
;
Por
: '*'{
}
;
Mas
: '+'{
}
;
PuntoComa
: ';'{
}
; |
bb-runtimes/powerpc/gdbstub/gdbstub-cpu.adb | JCGobbi/Nucleo-STM32G474RE | 0 | 14124 | <gh_stars>0
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2010, AdaCore --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
------------------------------------------------------------------------------
with System.Machine_Code;
with Interfaces; use Interfaces;
package body Gdbstub.CPU is
type Gpr_Context is array (0 .. 31) of Unsigned_32;
type Fpr_Context is array (0 .. 31) of IEEE_Float_64;
type Cpu_Context is record
Gpr : Gpr_Context;
Fpr : Fpr_Context;
PC : Unsigned_32;
MSR : Unsigned_32;
CR : Unsigned_32;
LR : Unsigned_32;
CTR : Unsigned_32;
XER : Unsigned_32;
FPSCR : Unsigned_32;
end record;
type Cpu_Context_Acc is access all Cpu_Context;
Regs : Cpu_Context_Acc;
MSR_SE : constant Unsigned_32 := 2 ** (31 - 21);
SIGTRAP : constant Integer := 5;
procedure Exception_Handler (Val : Integer; Context : Cpu_Context_Acc);
procedure Exception_Handler (Val : Integer; Context : Cpu_Context_Acc)
is
pragma Unreferenced (Val);
begin
Regs := Context;
Gdbstub.Registers_Area := Context.all'Address;
Gdbstub.Registers_Size := Cpu_Context'Size / 8;
Gdbstub.Handle_Exception (SIGTRAP);
end Exception_Handler;
procedure Get_Register_Area (Reg : Natural;
Area : out Address;
Size : out Storage_Count) is
begin
case Reg is
when 0 .. 31 =>
Area := Regs.Gpr (Reg)'Address;
Size := 4;
when 32 .. 63 =>
Area := Regs.Fpr (Reg - 32)'Address;
Size := 8;
when 64 =>
Area := Regs.PC'Address;
Size := 4;
when 65 =>
Area := Regs.MSR'Address;
Size := 4;
when 66 =>
Area := Regs.CR'Address;
Size := 4;
when 67 =>
Area := Regs.LR'Address;
Size := 4;
when 68 =>
Area := Regs.CTR'Address;
Size := 4;
when 69 =>
Area := Regs.XER'Address;
Size := 4;
when 70 =>
Area := Regs.FPSCR'Address;
Size := 4;
when others =>
Area := Null_Address;
Size := 0;
end case;
end Get_Register_Area;
type Vector_Id is range 0 .. 16#2fff#;
System_Reset_Excp : constant Vector_Id := 16#100#;
Machine_Check_Excp : constant Vector_Id := 16#200#;
DSI_Excp : constant Vector_Id := 16#300#;
ISI_Excp : constant Vector_Id := 16#400#;
External_Interrupt_Excp : constant Vector_Id := 16#500#;
Alignment_Excp : constant Vector_Id := 16#600#;
Program_Excp : constant Vector_Id := 16#700#;
FP_Unavailable_Excp : constant Vector_Id := 16#800#;
Decrementer_Excp : constant Vector_Id := 16#900#;
System_Call_Excp : constant Vector_Id := 16#C00#;
Trace_Excp : constant Vector_Id := 16#D00#;
FP_Assist_Excp : constant Vector_Id := 16#E00#;
pragma Unreferenced (Alignment_Excp);
pragma Unreferenced (System_Reset_Excp);
pragma Unreferenced (Machine_Check_Excp);
pragma Unreferenced (DSI_Excp);
pragma Unreferenced (ISI_Excp);
pragma Unreferenced (External_Interrupt_Excp);
pragma Unreferenced (FP_Assist_Excp);
pragma Unreferenced (FP_Unavailable_Excp);
pragma Unreferenced (System_Call_Excp);
pragma Unreferenced (Decrementer_Excp);
procedure Copy_Debug_Handler (Handler : Address;
Vector : Vector_Id;
Param : Integer);
pragma Import (C, Copy_Debug_Handler);
procedure Setup_Handlers is
begin
Copy_Debug_Handler (Exception_Handler'Address, Program_Excp, 0);
Copy_Debug_Handler (Exception_Handler'Address, Trace_Excp, 1);
end Setup_Handlers;
procedure Breakpoint is
procedure Debug_Trap;
pragma Import (C, Debug_Trap);
begin
if True then
Debug_Trap;
else
System.Machine_Code.Asm ("trap", Volatile => True);
end if;
end Breakpoint;
procedure Invalidate_Icache (Start : Address; Len : Storage_Offset) is
begin
for I in 0 .. Len - 1 loop
System.Machine_Code.Asm
("icbi 0,%0",
Inputs => Address'Asm_Input ("r", Start + I),
Volatile => True);
end loop;
end Invalidate_Icache;
procedure Set_Trace_Flag (Trace : Boolean) is
begin
if Trace then
Regs.MSR := Regs.MSR or MSR_SE;
else
Regs.MSR := Regs.MSR and not MSR_SE;
end if;
end Set_Trace_Flag;
end Gdbstub.CPU;
|
utils/hardware/cputype/cpu.asm | vbmacher/qsOS | 1 | 22507 | .model small
.data
text db 10,13,'Your processor is: $'
n86 db '8086',10,13,'$'
n286 db '80286',10,13,'$'
n386 db '80386',10,13,'$'
n486 db '80486',10,13,'$'
n686 db '6x86',10,13,'$'
nPentium db 'Pentium',10,13,'$'
nPentiumII db 'Pentium II',10,13,'$'
nAMD db 'AMD',10,13,'$'
.code
s:
mov ax, @data
mov ds, ax
mov dx, offset text
mov ah, 09h
int 21h
mov ax, 1686h
int 2Fh
cmp cl, 0
jne n2Check
mov dx, offset n86
jmp Print
n2Check:
cmp cl, 02h
jne n3Check
mov dx, offset n286
jmp Print
n3Check:
cmp cl, 03h
jne n4Check
mov dx, offset n386
jmp Print
n4Check:
cmp cl, 04h
jne n5Check
mov dx, offset n486
jmp Print
n5Check:
cmp cl, 05h
jne n6Check
mov dx, offset n686
jmp Print
n6Check:
cmp cl, 06h
jne n7Check
mov dx, offset nPentium
jmp Print
n7Check:
cmp cl, 07h
jne n8Check
mov dx, offset nPentiumII
jmp Print
n8Check:
cmp cl, 0ffh
jne X
mov dx, offset nAMD
Print:
mov ah, 09h
int 21h
X:
mov ax, 4c00h
int 21h
end s |
externals/mpir-3.0.0/mpn/x86_64w/core2/popcount.asm | JaminChan/eos_win | 12 | 16253 | <filename>externals/mpir-3.0.0/mpn/x86_64w/core2/popcount.asm
; PROLOGUE(mpn_popcount)
; mpn_popcount
; Copyright 2009 <NAME>
; This file is part of the MPIR Library.
; The MPIR Library is free software; you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as published
; by the Free Software Foundation; either version 2.1 of the License, or (at
; your option) any later version.
; The MPIR Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
; You should have received a copy of the GNU Lesser General Public License
; along with the MPIR Library; see the file COPYING.LIB. If not, write
; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
; Boston, MA 02110-1301, USA.
; mp_limb_t mpn_popcount(mp_ptr,mp_size_t)
; rax rdi, rsi
; rax rcx, rdx
%include "yasm_mac.inc"
CPU Core2
BITS 64
global __gmpn_popcount
%ifdef DLL
export __gmpn_popcount
%endif
PROC_FRAME __gmpn_popcount
alloc_stack 0x48
save_xmm128 xmm6, 0x00
save_xmm128 xmm7, 0x10
save_xmm128 xmm8, 0x20
save_xmm128 xmm9, 0x30
END_PROLOGUE
mov rax, 0x5555555555555555
movq xmm4, rax
movddup xmm4, xmm4
mov rax, 0x3333333333333333
movq xmm5, rax
movddup xmm5, xmm5
mov rax, 0x0f0f0f0f0f0f0f0f
movq xmm6, rax
movddup xmm6, xmm6
pxor xmm7, xmm7
pxor xmm9, xmm9
pxor xmm8, xmm8
btr rcx, 3
sbb rax, rax
sub rdx, rax
movq xmm0, rax
pandn xmm0, [rcx]
bt rdx, 0
sbb r8, r8
sub rdx, r8
movq xmm2, r8
shufpd xmm2, xmm2, 1
pandn xmm2, [rcx+rdx*8-16]
cmp rdx, 2
jne .0
add rdx, 2
movq xmm1, rax
movddup xmm1, xmm1
pand xmm0, xmm1
pandn xmm1, xmm2
movdqa xmm2, xmm1
.0: movdqa xmm1, xmm0
movdqa xmm3, xmm2
sub rdx, 8
jc .2
xalign 16
.1: psrlw xmm0, 1
pand xmm0, xmm4
psubb xmm1, xmm0
psrlw xmm2, 1
movdqa xmm0, xmm1
paddq xmm9, xmm8
psrlw xmm1, 2
pand xmm0, xmm5
pand xmm1, xmm5
paddb xmm1, xmm0
pand xmm2, xmm4
sub rdx, 4
psubb xmm3, xmm2
movdqa xmm2, xmm3
psrlw xmm3, 2
pand xmm2, xmm5
pand xmm3, xmm5
paddb xmm3, xmm2
movdqa xmm0, [rcx+rdx*8+32-32+64]
paddb xmm3, xmm1
movdqa xmm8, xmm3
psrlw xmm3, 4
pand xmm3, xmm6
movdqa xmm2, [rcx+rdx*8+32-48+64]
pand xmm8, xmm6
movdqa xmm1, [rcx+rdx*8+32-32+64]
paddb xmm8, xmm3
movdqa xmm3, [rcx+rdx*8+32-48+64]
psadbw xmm8, xmm7
jnc .1
.2: psrlw xmm0, 1
pand xmm0, xmm4
psubb xmm1, xmm0
psrlw xmm2, 1
movdqa xmm0, xmm1
paddq xmm9, xmm8
psrlw xmm1, 2
pand xmm0, xmm5
pand xmm1, xmm5
paddb xmm1, xmm0
pand xmm2, xmm4
psubb xmm3, xmm2
movdqa xmm2, xmm3
psrlw xmm3, 2
pand xmm2, xmm5
pand xmm3, xmm5
paddb xmm3, xmm2
paddb xmm3, xmm1
movdqa xmm8, xmm3
psrlw xmm3, 4
pand xmm3, xmm6
pand xmm8, xmm6
paddb xmm8, xmm3
psadbw xmm8, xmm7
cmp rdx, -3
jl .4
.3: movdqa xmm2, [rcx+rdx*8-32+64]
movdqa xmm3, xmm2
psrlw xmm2, 1
paddq xmm9, xmm8
pand xmm2, xmm4
psubb xmm3, xmm2
movdqa xmm2, xmm3
psrlw xmm3, 2
pand xmm2, xmm5
pand xmm3, xmm5
paddb xmm3, xmm2
movdqa xmm8, xmm3
psrlw xmm3, 4
pand xmm3, xmm6
pand xmm8, xmm6
paddb xmm8, xmm3
psadbw xmm8, xmm7
.4: paddq xmm9, xmm8
movq rax, xmm9
shufpd xmm9, xmm9, 1
movq r8, xmm9
add rax, r8
.5: movdqa xmm6, [rsp+0x00]
movdqa xmm7, [rsp+0x10]
movdqa xmm8, [rsp+0x20]
movdqa xmm9, [rsp+0x30]
add rsp, 0x48
ret
ENDPROC_FRAME
end
|
data/baseStats_original/azumarill.asm | adhi-thirumala/EvoYellow | 16 | 4670 | db DEX_AZUMARILL ; pokedex id
db 100 ; base hp
db 50 ; base attack
db 80 ; base defense
db 50 ; base speed
db 80 ; base special
db WATER ; species type 1
db FAIRY ; species type 2
db 47 ; catch rate
db 66 ; base exp yield
INCBIN "pic/ymon/azumarill.pic",0,1 ; 55, sprite dimensions
dw AzumarillPicFront
dw AzumarillPicBack
; attacks known at lvl 0
db TACKLE
db TAIL_WHIP
db 0
db 0
db 3 ; growth rate
; learnset
tmlearn 1,5,6,8
tmlearn 9,10,11,12,13,14
tmlearn 17,18,19,20
tmlearn 28,31,32
tmlearn 33,34,40
tmlearn 44
tmlearn 50,53,54
db BANK(MarillPicFront)
|
oeis/007/A007556.asm | neoneye/loda-programs | 11 | 9813 | ; A007556: Number of 8-ary trees with n vertices.
; 1,1,8,92,1240,18278,285384,4638348,77652024,1329890705,23190029720,410333440536,7349042994488,132969010888280,2426870706415800,44627576949364104,826044435409399800,15378186970730687400,287756293703544823872,5409093674555090316300,102094541350737142767560,1934134063853856881106420,36764463405017717385803280,700968884986728238463263460,13402495999753060831200509400,256915520489502550049876064108,4936572617413396631364993087648,95063520625867660399522048201184,1834368025289757688677644728144136
mov $1,$0
mul $1,8
mov $2,$0
trn $2,1
bin $1,$2
add $2,1
div $1,$2
mov $0,$1
|
oeis/011/A011847.asm | neoneye/loda-programs | 11 | 97305 | <reponame>neoneye/loda-programs<filename>oeis/011/A011847.asm
; A011847: Triangle of numbers read by rows: T(n,k) = floor( C(n,k)/(k+1) ), where k=0..n-1 and n >= 1.
; Submitted by <NAME>
; 1,1,1,1,1,1,1,2,2,1,1,2,3,2,1,1,3,5,5,3,1,1,3,7,8,7,3,1,1,4,9,14,14,9,4,1,1,4,12,21,25,21,12,4,1,1,5,15,30,42,42,30,15,5,1,1,5,18,41,66,77,66,41,18,5,1,1,6,22,55,99,132,132,99,55,22,6,1,1,6,26,71
lpb $0
add $1,1
sub $0,$1
lpe
add $1,1
bin $1,$0
add $0,1
mov $2,$1
div $2,$0
mov $0,$2
|
libsrc/_DEVELOPMENT/math/float/math32/lm32/c/sdcc/cos.asm | jpoikela/z88dk | 0 | 162647 |
SECTION code_fp_math32
PUBLIC _cos
EXTERN cm32_sdcc_cos
defc _cos = cm32_sdcc_cos
|
libsrc/_DEVELOPMENT/l/sccz80/5-z80/i64/l_i64_and.asm | ahjelm/z88dk | 640 | 93016 | <filename>libsrc/_DEVELOPMENT/l/sccz80/5-z80/i64/l_i64_and.asm<gh_stars>100-1000
SECTION code_l_sccz80
PUBLIC l_i64_and
EXTERN __i64_acc
; Entry: acc = LHS
; sp+2 = RHS
; Exit: acc = LHS & RHS
l_i64_and:
ld hl,2
add hl,sp
ex de,hl
ld hl,__i64_acc
ld b,8
and a
loop:
ld a,(de)
and (hl)
ld (hl),a
inc hl
inc de
djnz loop
pop de
ld hl,8
add hl,sp
ld sp,hl
push de
ret
|
unittests/ASM/PrimaryGroup/3_F7_00.asm | cobalt2727/FEX | 628 | 15456 | %ifdef CONFIG
{
"RegData": {
"RAX": "0x0200",
"RBX": "0x0600",
"RCX": "0x0600"
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x4142434445464748
mov [rdx + 8 * 0], rax
mov rax, 0x5152535455565758
mov [rdx + 8 * 1], rax
mov rax, 0x6162636465666768
mov [rdx + 8 * 2], rax
test qword [rdx + 8 * 2], 0x71727374
; test = 0x6162636465666768 & 0x71727374 = 0x61626360
; 0: CF - 00000000
; 1: - 00000010
; 2: PF - 00000100
; 3: 0 - 00000000
; 4: AF - 00000000 <- Undefined
; 5: 0 - 00000000
; 6: ZF - 00000000
; 7: SF - 00000000
; ================
; 00000110
; OF: LAHF doesn't load - 0
mov rax, 0
lahf
mov rcx, rax
test dword [rdx + 8 * 1], 0x71727374
; test = 0x55565758 & 0x71727374 = 0x51525350
; 0: CF - 00000000
; 1: - 00000010
; 2: PF - 00000100
; 3: 0 - 00000000
; 4: AF - 00000000 <- Undefined
; 5: 0 - 00000000
; 6: ZF - 00000000
; 7: SF - 00000000
; ================
; 00000110
; OF: LAHF doesn't load - 0
mov rax, 0
lahf
mov rbx, rax
test word [rdx + 8 * 0], 0x7172
; test = 0x4748 & 0x7172 = 0x4140
; 0: CF - 00000000
; 1: - 00000010
; 2: PF - 00000000
; 3: 0 - 00000000
; 4: AF - 00000000 <- Undefined
; 5: 0 - 00000000
; 6: ZF - 00000000
; 7: SF - 00000000
; ================
; 00000010
; OF: LAHF doesn't load - 0
mov rax, 0
lahf
hlt
|
src/ada/src/comms/uxas-comms-transport-receiver-zeromq-addr_attr_msg_receivers.adb | VVCAS-Sean/OpenUxAS | 88 | 29770 | <gh_stars>10-100
with ZMQ.Messages;
with UxAS.Common.Configuration_Manager;
package body UxAS.Comms.Transport.Receiver.ZeroMQ.Addr_Attr_Msg_Receivers is
----------------
-- Initialize --
----------------
overriding
procedure Initialize
(This : in out ZeroMq_Addressed_Attributed_Message_Receiver;
Entity_Id : UInt32;
Service_Id : UInt32;
Socket_Configuration : ZeroMq_Socket_Configuration)
is
begin
Initialize
(ZeroMq_Receiver_Base (This), -- call parent version
Entity_Id => Entity_Id,
Service_Id => Service_Id,
Socket_Configuration => Socket_Configuration);
This.Is_TCP_Stream := Socket_Configuration.Zmq_Socket_Type = STREAM;
end Initialize;
use Message_Lists;
function String_From_Socket (S : ZMQ.Sockets.Socket) return String;
-- NOTE: s_recv() etc are defined in OpenUxAS\src\Utilities\UxAS_ZeroMQ.h
-- as simple wrappers that hide result type conversions etc.
----------------------
-- Get_Next_Message --
----------------------
procedure Get_Next_Message
(This : in out ZeroMq_Addressed_Attributed_Message_Receiver;
Msg : out Addressed_Attributed_Message_Ref)
is
-- std::unique_ptr<uxas::communications::data::AddressedAttributedMessage> nextMsg;
begin
-- just send the next message if one is available
if not Is_Empty (This.Received_Messages) then
Msg := First_Element (This.Received_Messages);
Delete_First (This.Received_Messages);
return;
end if;
-- No messages in queue, attempt to read from socket.
-- Polling is not supported in the current Ada binding to ZMQ (as of Feb
-- 2019), although we could do it with the low-level binding. Therefore
-- we will use a blocking call (in function String_From_Socket). We
-- don't need all the code below for our demo, since the demo doesn't
-- use TcpStreams and the messages are not multipart.
-- zmq::pollitem_t pollItems [] = {
-- { *m_zmqSocket, 0, ZMQ_POLLIN, 0},
-- };
--
-- zmq::poll(&pollItems[0], 1, uxas::common::ConfigurationManager::getZeroMqReceiveSocketPollWaitTime_ms()); // wait time units are milliseconds
--
-- if (pollItems[0].revents & ZMQ_POLLIN) // polling detected received data
-- {
if This.Is_TCP_Stream then
raise Program_Error with "Get_Next_Message is not implemented for STREAM";
else -- not a stream socket
if UxAS.Common.Configuration_Manager.Is_ZeroMq_Multipart_Message then
raise Program_Error with "Get_Next_Message is not implemented for multipart messages";
else -- not a multipart message
declare
Recvd_Msg : Addressed_Attributed_Message_Ref;
Success : Boolean;
begin
-- std::unique_ptr<uxas::communications::data::AddressedAttributedMessage> recvdSinglepartAddAttMsg
-- = uxas::stduxas::make_unique<uxas::communications::data::AddressedAttributedMessage>();
Recvd_Msg := new Addressed_Attributed_Message;
-- if (recvdSinglepartAddAttMsg->setAddressAttributesAndPayloadFromDelimitedString(n_ZMQ::s_recv(*m_zmqSocket)))
Recvd_Msg.Set_Address_Attributes_And_Payload_From_Delimited_String
(Delimited_String => String_From_Socket (This.Zmq_Socket),
Result => Success);
if Success then
-- if (m_entityIdString != recvdSinglepartAddAttMsg->getMessageAttributesReference()->getSourceEntityId()
-- || m_serviceIdString != recvdSinglepartAddAttMsg->getMessageAttributesReference()->getSourceServiceId())
if This.Entity_Id_String /= Recvd_Msg.Message_Attributes_Reference.Source_Entity_Id
or This.Service_Id_String /= Recvd_Msg.Message_Attributes_Reference.Source_Service_Id
then
-- m_recvdMsgs.push_back( std::move(recvdSinglepartAddAttMsg) );
Append (This.Received_Messages, Recvd_Msg);
end if;
end if;
end;
end if; -- is a multipart message
end if; -- is a stream socket
-- now see if there was anything just put into the deque
if not Is_Empty (This.Received_Messages) then
Msg := First_Element (This.Received_Messages);
Delete_First (This.Received_Messages);
end if;
end Get_Next_Message;
------------------------
-- String_From_Socket --
------------------------
function String_From_Socket (S : ZMQ.Sockets.Socket) return String is
Message : ZMQ.Messages.Message;
begin
Message.Initialize (Size => 0);
S.Recv (Message); -- blocking
return Message.GetData;
end String_From_Socket;
end UxAS.Comms.Transport.Receiver.ZeroMQ.Addr_Attr_Msg_Receivers;
|
programs/oeis/185/A185708.asm | neoneye/loda | 22 | 166797 | ; A185708: Characteristic function of positive numbers that are primes ending in 7.
; 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,0,0,0
lpb $0
mov $1,1
mov $2,$0
seq $2,68720 ; Arithmetic derivative of squares: a(n) = 2*n*A003415(n).
add $0,$2
dif $0,5
lpe
mov $0,$1
|
core/lib/two-semi-categories/FunCategory.agda | AntoineAllioux/HoTT-Agda | 294 | 16436 | <reponame>AntoineAllioux/HoTT-Agda<gh_stars>100-1000
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Pi
open import lib.types.TwoSemiCategory
open import lib.two-semi-categories.Functor
module lib.two-semi-categories.FunCategory where
module _ {i j k} (A : Type i) (G : TwoSemiCategory j k) where
private
module G = TwoSemiCategory G
fun-El : Type (lmax i j)
fun-El = A → G.El
fun-Arr : fun-El → fun-El → Type (lmax i k)
fun-Arr F G = ∀ a → G.Arr (F a) (G a)
fun-Arr-level : (F G : fun-El) → has-level 1 (fun-Arr F G)
fun-Arr-level F G = Π-level (λ a → G.Arr-level (F a) (G a))
fun-comp : {F G H : fun-El} (α : fun-Arr F G) (β : fun-Arr G H)
→ fun-Arr F H
fun-comp α β a = G.comp (α a) (β a)
fun-assoc : {F G H I : fun-El} (α : fun-Arr F G) (β : fun-Arr G H) (γ : fun-Arr H I)
→ fun-comp (fun-comp α β) γ == fun-comp α (fun-comp β γ)
fun-assoc α β γ = λ= (λ a → G.assoc (α a) (β a) (γ a))
abstract
fun-pentagon : {F G H I J : fun-El}
(α : fun-Arr F G) (β : fun-Arr G H) (γ : fun-Arr H I) (δ : fun-Arr I J)
→ fun-assoc (fun-comp α β) γ δ ◃∙
fun-assoc α β (fun-comp γ δ) ◃∎
=ₛ
ap (λ s → fun-comp s δ) (fun-assoc α β γ) ◃∙
fun-assoc α (fun-comp β γ) δ ◃∙
ap (fun-comp α) (fun-assoc β γ δ) ◃∎
fun-pentagon α β γ δ =
fun-assoc (fun-comp α β) γ δ ◃∙
fun-assoc α β (fun-comp γ δ) ◃∎
=ₛ⟨ ∙-λ= (λ a → G.assoc (G.comp (α a) (β a)) (γ a) (δ a))
(λ a → G.assoc (α a) (β a) (G.comp (γ a) (δ a))) ⟩
λ= (λ a → G.assoc (G.comp (α a) (β a)) (γ a) (δ a) ∙
G.assoc (α a) (β a) (G.comp (γ a) (δ a))) ◃∎
=ₛ₁⟨ ap λ= (λ= (λ a → =ₛ-out (G.pentagon-identity (α a) (β a) (γ a) (δ a)))) ⟩
λ= (λ a → ap (λ s → G.comp s (δ a)) (G.assoc (α a) (β a) (γ a)) ∙
G.assoc (α a) (G.comp (β a) (γ a)) (δ a) ∙
ap (G.comp (α a)) (G.assoc (β a) (γ a) (δ a))) ◃∎
=ₛ⟨ λ=-∙∙ (λ a → ap (λ s → G.comp s (δ a)) (G.assoc (α a) (β a) (γ a)))
(λ a → G.assoc (α a) (G.comp (β a) (γ a)) (δ a))
(λ a → ap (G.comp (α a)) (G.assoc (β a) (γ a) (δ a))) ⟩
λ= (λ a → ap (λ s → G.comp s (δ a)) (G.assoc (α a) (β a) (γ a))) ◃∙
fun-assoc α (fun-comp β γ) δ ◃∙
λ= (λ a → ap (G.comp (α a)) (G.assoc (β a) (γ a) (δ a))) ◃∎
=ₛ₁⟨ 0 & 1 & ! (λ=-ap (λ a s → G.comp s (δ a)) (λ a → G.assoc (α a) (β a) (γ a))) ⟩
ap (λ s → fun-comp s δ) (fun-assoc α β γ) ◃∙
fun-assoc α (fun-comp β γ) δ ◃∙
λ= (λ a → ap (G.comp (α a)) (G.assoc (β a) (γ a) (δ a))) ◃∎
=ₛ₁⟨ 2 & 1 & ! (λ=-ap (λ a → G.comp (α a)) (λ a → G.assoc (β a) (γ a) (δ a))) ⟩
ap (λ s → fun-comp s δ) (fun-assoc α β γ) ◃∙
fun-assoc α (fun-comp β γ) δ ◃∙
ap (fun-comp α) (fun-assoc β γ δ) ◃∎ ∎ₛ
fun-cat : TwoSemiCategory (lmax i j) (lmax i k)
fun-cat =
record
{ El = fun-El
; Arr = fun-Arr
; Arr-level = fun-Arr-level
; two-semi-cat-struct =
record
{ comp = fun-comp
; assoc = fun-assoc
; pentagon-identity = fun-pentagon
}
}
module _ {i j₁ k₁ j₂ k₂} (A : Type i) {G : TwoSemiCategory j₁ k₁} {H : TwoSemiCategory j₂ k₂}
(F : TwoSemiFunctor G H) where
private
module G = TwoSemiCategory G
module H = TwoSemiCategory H
module F = TwoSemiFunctor F
module fun-G = TwoSemiCategory (fun-cat A G)
module fun-H = TwoSemiCategory (fun-cat A H)
fun-F₀ : fun-G.El → fun-H.El
fun-F₀ I = λ a → F.F₀ (I a)
fun-F₁ : {I J : fun-G.El} → fun-G.Arr I J → fun-H.Arr (fun-F₀ I) (fun-F₀ J)
fun-F₁ α = λ a → F.F₁ (α a)
fun-pres-comp : {I J K : fun-G.El} (α : fun-G.Arr I J) (β : fun-G.Arr J K)
→ fun-F₁ (fun-G.comp α β) == fun-H.comp (fun-F₁ α) (fun-F₁ β)
fun-pres-comp α β = λ= (λ a → F.pres-comp (α a) (β a))
abstract
fun-pres-comp-coh : {I J K L : fun-G.El}
(α : fun-G.Arr I J) (β : fun-G.Arr J K) (γ : fun-G.Arr K L)
→ fun-pres-comp (fun-G.comp α β) γ ◃∙
ap (λ s → fun-H.comp s (fun-F₁ γ)) (fun-pres-comp α β) ◃∙
fun-H.assoc (fun-F₁ α) (fun-F₁ β) (fun-F₁ γ) ◃∎
=ₛ
ap fun-F₁ (fun-G.assoc α β γ) ◃∙
fun-pres-comp α (fun-G.comp β γ) ◃∙
ap (fun-H.comp (fun-F₁ α)) (fun-pres-comp β γ) ◃∎
fun-pres-comp-coh α β γ =
fun-pres-comp (fun-G.comp α β) γ ◃∙
ap (λ s → fun-H.comp s (fun-F₁ γ)) (fun-pres-comp α β) ◃∙
fun-H.assoc (fun-F₁ α) (fun-F₁ β) (fun-F₁ γ) ◃∎
=ₛ₁⟨ 1 & 1 & λ=-ap (λ a s → H.comp s (fun-F₁ γ a) ) (λ a → F.pres-comp (α a) (β a)) ⟩
fun-pres-comp (fun-G.comp α β) γ ◃∙
λ= (λ a → ap (λ s → H.comp s (fun-F₁ γ a)) (F.pres-comp (α a) (β a))) ◃∙
fun-H.assoc (fun-F₁ α) (fun-F₁ β) (fun-F₁ γ) ◃∎
=ₛ⟨ ∙∙-λ= (λ a → F.pres-comp (G.comp (α a) (β a)) (γ a))
(λ a → ap (λ s → H.comp s (fun-F₁ γ a)) (F.pres-comp (α a) (β a)))
(λ a → H.assoc (fun-F₁ α a) (fun-F₁ β a) (fun-F₁ γ a)) ⟩
λ= (λ a → F.pres-comp (G.comp (α a) (β a)) (γ a) ∙
ap (λ s → H.comp s (fun-F₁ γ a)) (F.pres-comp (α a) (β a)) ∙
H.assoc (fun-F₁ α a) (fun-F₁ β a) (fun-F₁ γ a)) ◃∎
=ₛ₁⟨ ap λ= (λ= (λ a → =ₛ-out (F.pres-comp-coh (α a) (β a) (γ a)))) ⟩
λ= (λ a → ap F.F₁ (G.assoc (α a) (β a) (γ a)) ∙
F.pres-comp (α a) (G.comp (β a) (γ a)) ∙
ap (H.comp (fun-F₁ α a)) (F.pres-comp (β a) (γ a))) ◃∎
=ₛ⟨ λ=-∙∙ (λ a → ap F.F₁ (G.assoc (α a) (β a) (γ a)))
(λ a → F.pres-comp (α a) (G.comp (β a) (γ a)))
(λ a → ap (H.comp (fun-F₁ α a)) (F.pres-comp (β a) (γ a))) ⟩
λ= (λ a → ap F.F₁ (G.assoc (α a) (β a) (γ a))) ◃∙
fun-pres-comp α (fun-G.comp β γ) ◃∙
λ= (λ a → ap (H.comp (fun-F₁ α a)) (F.pres-comp (β a) (γ a))) ◃∎
=ₛ₁⟨ 0 & 1 & ! $ λ=-ap (λ _ → F.F₁) (λ a → G.assoc (α a) (β a) (γ a)) ⟩
ap fun-F₁ (fun-G.assoc α β γ) ◃∙
fun-pres-comp α (fun-G.comp β γ) ◃∙
λ= (λ a → ap (H.comp (fun-F₁ α a)) (F.pres-comp (β a) (γ a))) ◃∎
=ₛ₁⟨ 2 & 1 & ! $ λ=-ap (λ a → H.comp (fun-F₁ α a)) (λ a → F.pres-comp (β a) (γ a)) ⟩
ap fun-F₁ (fun-G.assoc α β γ) ◃∙
fun-pres-comp α (fun-G.comp β γ) ◃∙
ap (fun-H.comp (fun-F₁ α)) (fun-pres-comp β γ) ◃∎ ∎ₛ
fun-functor-map : TwoSemiFunctor (fun-cat A G) (fun-cat A H)
fun-functor-map =
record
{ F₀ = fun-F₀
; F₁ = fun-F₁
; pres-comp = fun-pres-comp
; pres-comp-coh = fun-pres-comp-coh
}
|
src/Data/Vec/Any/Membership.agda | tizmd/agda-vector-any | 0 | 8823 | open import Relation.Binary using (Setoid)
module Data.Vec.Any.Membership {a ℓ} (S : Setoid a ℓ) where
open import Level using (_⊔_)
open Setoid S renaming (Carrier to A; refl to ≈-refl; trans to ≈-trans )
open import Relation.Nullary
open import Relation.Binary
open import Data.Fin
open import Data.Nat as ℕ hiding (_⊔_)
open import Data.Product as Prod hiding (map)
open import Data.Vec as Vec hiding (map)
open import Data.Vec.Equality
open import Data.Vec.Any as Any
open import Function using (_∘_; id; flip)
open Equality S renaming (_≈_ to _≋_; trans to ≋-trans)
infix 4 _∈′_ _∉′_
_∈′_ : ∀ {n} → A → Vec A n → Set (a ⊔ ℓ)
x ∈′ xs = Any (x ≈_) xs
_∉′_ : ∀ {n} → A → Vec A n → Set (a ⊔ ℓ)
x ∉′ xs = ¬ (x ∈′ xs)
infix 4 _⊆_ _⊈_
_⊆_ : ∀ {n m} → Vec A n → Vec A m → Set _
xs ⊆ ys = ∀ {x} → x ∈′ xs → x ∈′ ys
_⊈_ : ∀ {n m} → Vec A n → Vec A m → Set _
xs ⊈ ys = ¬ (xs ⊆ ys)
-- A variant of Vec.map.
map-with-∈′ : ∀ {n b} {B : Set b}
(xs : Vec A n) → (∀ {x} → x ∈′ xs → B) → Vec B n
map-with-∈′ [] f = []
map-with-∈′ (x ∷ xs) f = f (here ≈-refl) ∷ map-with-∈′ xs (f ∘ there)
-- Finds an element satisfying the predicate.
find′ : ∀ {p n} {P : A → Set p} {xs : Vec A n} →
Any P xs → ∃ λ x → x ∈′ xs × P x
find′ (here px) = , here ≈-refl , px
find′ (there pxs) = Prod.map id (Prod.map there id) (find′ pxs)
lose′ : ∀ {p n} {P : A → Set p} {x}{xs : Vec A n} →
P Respects _≈_ → x ∈′ xs → P x → Any P xs
lose′ resp x∈′xs px = map (flip resp px) x∈′xs
|
compsci courses/CPSC355 - Computing Machinery/misc/otherresources/week5/globalvariables/asciicap.asm | q-omar/UofC | 1 | 26328 | .data // This section contains programmer-initialized data
max: .word 90
.bss //This section contains uninitialized space allocated with the .skip pseudo-op
array_uninit: .skip 26 * 1 // char array = 26 bytes
c_var: .skip 1 // char = 1 byte
h_var: .skip 2 // short int = 2 bytes
.text
fmt: .string "%c\n"
.balign 4
.global main
main:
stp x29, x30, [sp, -16]!
mov x29, sp
adrp x19, max // Load address of i (high order bits)
add x19, x19, :lo12:max // Load address of i (low order bits)
ldr w20, [x19] // Load value of max from memory to w20
// Same steps for array
adrp x19, array_uninit
add x19, x19, :lo12:array_uninit
mov x23, 0
mov w22, 'A'
b test
loop:
strb w22, [x19, x23]
add w22, w22, 1 //Calculate dec value ofnext letter
adrp x0, fmt // Set 1st arg (high order bits)
add x0, x0, :lo12:fmt // Set 1st arg (lower 12 bits)
ldrb w1, [x19, x23]
bl printf // Call printf
add x23, x23, 1 //Increment counter
test:
cmp w22, 'Z'
b.le loop
adrp x19, c_var // Load address of i (high order bits)
add x19, x19, :lo12:c_var // Load address of i (low order bits)
mov w22, 'M' // Load value to be stored at c_var
strb w22, [x19]
adrp x0, fmt // Set 1st arg (high order bits)
add x0, x0, :lo12:fmt // Set 1st arg (lower 12 bits)
ldrb w1, [x19]
bl printf
ldp x29, x30, [sp], 16 // Deallocate stack memory
ret // Return to OS
|
ffight/lcs/enemy/9A.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 5527 | <reponame>zengfr/arcade_game_romhacking_sourcecode_top_secret_data
copyright zengfr site:http://github.com/zengfr/romhack
009ACA dbra D5, $9ac8
021D1E move.l D0, ($98,A6)
021D22 move.l D0, ($9c,A6)
02243E clr.l ($9c,A6)
02255C clr.l ($9c,A6)
0225CE clr.l ($9c,A6)
022806 clr.l ($9c,A6)
0229DE clr.l ($9c,A6)
027DDA move.l ($a4,A6), D0 [enemy+98, enemy+9A]
027E08 bra $27e12 [enemy+98, enemy+9A]
027E12 move.l ($a4,A6), D0 [enemy+98, enemy+9A]
028138 move.l D0, ($98,A6)
02813C move.l D0, ($9c,A6)
028E3C move.l ($c,PC,D0.w), ($9c,A6) [enemy+98, enemy+9A]
02A312 move.l D0, ($98,A6)
02A316 move.l D0, ($9c,A6)
02A794 clr.l ($9c,A6)
02A8AC clr.l ($9c,A6)
02A91E clr.l ($9c,A6)
02AA7E clr.l ($9c,A6)
02ACAA clr.l ($9c,A6)
0353A6 bsr $36b48 [enemy+9A]
035912 move.w #$40, ($9a,A6)
035918 bsr $36acc [enemy+9A]
035984 move.w #$68, ($9a,A6)
03598A bsr $36acc [enemy+9A]
03912E bpl $39136 [enemy+9A]
copyright zengfr site:http://github.com/zengfr/romhack
|
tool/playground/A.g4 | metadave/antlr4 | 0 | 775 | lexer grammar A;
/*
For input
{{x}
}
This matches {{x} and then thinks that it can stop because it can match that
without going into the recursive call. The context for the stop state in ACTION
is (2,1,[[$, 6 $]]) so it deletes everything else associated with this token.
Seems like we should favor the first alternative, but we can't do that within
a single rule.
weird though that this one works
STRING : '"' ( '\\' '"' | . )*? '"' ;
wouldn't it get to the end of the rule also by the wild-card route?
Maybe it's a simple order of operations or order in which i process the
alternatives?
*/
//STRING : '"' ( 'x' | . )* '"' ;
ACTION : '{' ( ACTION | . )*? '}' ;
WS : [ \r\t\n]+ -> skip ;
|
nes-test-roms/stomper/smwstomp.asm | joebentley/ones | 1,461 | 244378 | ;SMW Stomper
;A Demonstration of Smooth Mid-Screen Vertical Scrolling
;WITHOUT the need for an 8 scanline 'buffer' region
;Quietust, 2002/05/18
temp:
temp_l: .block 1
temp_h: .block 1
even_frame: .block 1
shake_y: .block 1
screen_x: .block 1
screen_y: .block 1
stomper_x: .block 1
stomper_y: .block 1
irq_num: .block 1
stomper_mode: .block 1
stomper_timer: .block 1
stompershake_y: .block 1
.org $8000
.include "smwstomp/smwnsf.dat"
.org $C000
stomper:
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0A,$06,$0B,$0C,$0D
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$0F,$10,$11,$12,$13,$14,$0C,$15,$16,$09,$17,$18,$19,$1A
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$1B,$1C,$1D,$1E,$07,$08,$1F,$06,$0C,$20,$21,$22,$23,$24
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$00,$25,$26,$27,$28,$29,$15,$2A,$2B,$2C,$2D,$15,$2E,$2F,$30
.db $0E,$0E,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3A,$3B,$3C,$3D,$3E,$3F
.db $40,$41,$42,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $00,$43,$44,$45,$46,$47,$44,$45,$46,$47,$44,$45,$46,$47,$44,$45
.db $46,$47,$48,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
.db $44,$00,$00,$00,$00,$00,$00,$00,$44,$00,$00,$00,$00,$00,$00,$00
.db $44,$00,$00,$00,$00,$00,$00,$00,$44,$00,$00,$00,$00,$00,$00,$00
.db $44,$00,$00,$00,$00,$00,$00,$00,$44,$00,$00,$00,$00,$00,$00,$00
.db $44,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
palette:
.db $2D,$0F,$07,$17,$2D,$0F,$27,$17,$2D,$0F,$0C,$1C,$2D,$0F,$0F,$0F
.fill $E000-*,$00
reset: SEI
CLD
LDX #$00
STX $8000 ;reset PRG/CHR swap
STX $2000
STX $2001
INX
STX $A000 ;and mirroring
ppuinit: LDA $2002
BPL ppuinit
DEX
BPL ppuinit
TXS
INX
LDA $2002
LDY #$20
STY $2006
STX $2006
LDY #$80 ;init the 'playfield' nametable
LDA #$4E
init_vram_1: STA $2007 ;bricks (top)
DEY
BNE init_vram_1
LDY #$10
init_vram_2: LDA #$4C ;ceiling pattern
STA $2007
LDA #$4D
STA $2007
DEY
BNE init_vram_2
LDA #$00
LDY #$80
LDX #$03
init_vram_3: STA $2007 ;the room
DEY
BNE init_vram_3
DEX
BNE init_vram_3
LDY #$10
init_vram_5: LDA #$49 ;floor pattern
STA $2007
LDA #$4A
STA $2007
DEY
BNE init_vram_5
LDY #$80
LDA #$4B
init_vram_6: STA $2007 ;more bricks (bottom)
DEY
BNE init_vram_6
LDY #$40
LDA #$AA
init_vram_7: STA $2007 ;and attrib table
DEY
BNE init_vram_7
LDA #$28
STA $2006
LDA #$00
STA $2006
STA temp_l
LDA #$C0
STA temp_h
LDY #$00
init_vram_8: LDA (temp),y ;and now, the stomper
STA $2007
INC temp_l
BNE skip1
INC temp_h
skip1: LDA temp_h
CMP #$C4
BNE init_vram_8
LDA #$3F
STA $2006
STX $2006
init_pal: LDA palette,x ;load palette
STA $2007
INX
CPX #$10
BNE init_pal
LDX #$00
LDY #$00
init_chr: STX $8000 ;setup CHR banks
STY $8001
INX
INY
CPX #$03
BPL chr_not1k
INY
chr_not1k: CPX #$06
BNE init_chr
LDY #$00
STX $8000
STY $8001
INX
INY
STX $8000
STY $8001
LDA #$C0
STA $4017
JSR sound_reset ;init the sound code (stolen from SMW pirate)
INC $0700
LDA #$00
STA shake_y
STA screen_x
STA screen_y
STA stomper_mode
STA stomper_timer
STA stompershake_y
LDA #$FF
STA stomper_y
LDA #$2C
JSR sound_init ;start playing the castle tune
LDA #$88
STA $2000
CLI
JMP waitframe
nmi: CLC
LDA even_frame
ADC #$01
AND #$03
STA even_frame
BNE no_scroll
INC screen_x
INC stomper_x
no_scroll: LDA #$88
STA $2000
LDA screen_x
STA $2005
LDA shake_y
STA $2005
LDA #$88
STA $2000
LDA #$1E
STA $2001 ;main screen turn on
LDX stomper_mode ;okay, what are we doing?
BEQ stomp_init
DEX
BEQ stomp_wait
DEX
BEQ stomp_creep
DEX
BEQ stomp_fall
DEX
BEQ stomp_shake
DEX
BEQ stomp_riseshake
DEX
BEQ stomp_rise
JMP drawpipe
stomp_init: INC stomper_mode ;setup, start a delay timer
LDA #$80
STA stomper_timer
JMP drawpipe
stomp_wait: DEC stomper_timer ;wait a bit before it appears
BEQ wait_done
JMP drawpipe
stomp_creep: DEC stomper_timer ;creep down a little bit...
BEQ creep_alldone
LDA stomper_timer
AND #$03
CMP #$03
BNE creep_done
DEC stomper_y
creep_done: JMP drawpipe
stomp_fall: DEC stomper_timer ;and then fall down at full speed
BEQ fall_alldone
DEC stomper_y
DEC stomper_y
DEC stomper_y
DEC stomper_y
JMP drawpipe
stomp_shake: DEC stomper_timer ;and slam into the floor
BEQ shake_alldone
LDA even_frame
AND #$01
BEQ shake_up
LDA #$FE
STA shake_y
JMP shake_done
shake_up: LDA #$02
STA shake_y
shake_done: JMP drawpipe
stomp_riseshake:DEC stomper_timer ;keep shaking the floor a bit
BEQ riseshake_alldone ;while it's rising
INC stomper_y
INC stomper_y
LDA even_frame
AND #$01
BEQ riseshake_up
LDA #$FE
STA shake_y
JMP riseshake_done
riseshake_up: LDA #$02
STA shake_y
riseshake_done: STA stompershake_y
JMP drawpipe
stomp_rise: DEC stomper_timer ;done shaking, rise back into the ceiling
BEQ rise_alldone
INC stomper_y
INC stomper_y
JMP drawpipe
wait_done: INC stomper_mode
LDA #$4C
STA stomper_timer
LDA #$A0
STA stomper_x
LDA #$EF
STA stomper_y
JMP drawpipe
creep_alldone: INC stomper_mode
LDA #$24
STA stomper_timer
DEC stomper_y
JMP drawpipe
fall_alldone: INC stomper_mode
LDA #$40
STA stomper_timer
LDA #$1D
JSR sound_init
LDA #$0F
JSR sound_init ;play a suitable sound
JMP drawpipe
shake_alldone: INC stomper_mode
LDA #$20
STA stomper_timer
JMP drawpipe
riseshake_alldone:
INC stomper_mode
LDA #$32
STA stomper_timer
LDA #$00
STA shake_y
STA stompershake_y
JMP drawpipe
rise_alldone: LDA #$00
STA stomper_mode
JMP drawpipe
drawpipe: LDA stomper_y ;set up MMC3 interrupts
CMP #$80
BPL maybe_pipe
CMP #$4F
BMI no_pipe
BPL yes_pipe
maybe_pipe: CMP #$EE
BPL no_pipe
yes_pipe: LDA #$27
CLC
ADC shake_y
STA $C000
STA $C001
STA $E001
LDA #$FF
STA irq_num
no_pipe: JSR sound_play ;play music
RTI
irq: INC irq_num ;where is it?
BEQ first_irq ;(yeah, I *should* save regs)
BNE second_irq ;(but this is timing-critical code)
first_irq: LDA stomper_y ;top of pipe
CLC
ADC stompershake_y
STA screen_y
ASL A
ASL A
AND #$E0
LDY #$8A
STY $2000
LDY screen_y
LDX #$08
spin1: DEX
BNE spin1
LDX stomper_x
STX $2005
STY $2005
STX $2005
STA $2006
STX $2005
STY $2005
LDA stomper_y
CLC
ADC #$12
CLC
ADC stompershake_y
EOR #$FF
STA $E000
STA $C000
STA $C001
STA $E001
JMP end_irq
second_irq: LDX stomper_y ;bottom of pipe
INX
TXA
CLC
ADC #$10
EOR #$FF
CLC
ADC #$28
CLC
ADC stompershake_y
STA screen_y
ASL A
ASL A
AND #$E0
LDY #$88
STY $2000
LDY screen_y
LDX #$05
spin2: DEX
BNE spin2
NOP
NOP
LDX screen_x
STX $2005
STY $2005
STX $2005
STA $2006
STX $2005
STY $2005
STA $E000
end_irq: RTI
waitframe: JMP waitframe ;wait forever
sound_reset: .equ $85D6
sound_init: .equ $8E2F
sound_play: .equ $862A
.fill $FFFA-*,$00
.org $FFFA ;interrupt vectors
.dw nmi
.dw reset
.dw irq
.end
|
Blob_Lib/assimp-5.2.3/assimp/contrib/zlib/contrib/ada/read.adb | antholuo/Blob_Traffic | 0 | 25621 | version https://git-lfs.github.com/spec/v1
oid sha256:fa5b989aef0c5715a3fcb15de93985f7f10aeb0a7f5716745c95ed820eb9af9c
size 4248
|
test/interaction/Issue271.agda | cruhland/agda | 1,989 | 14734 | module Issue271 where
data D (A : Set) : Set where
d : D A → D A
f : {A : Set} → D A → D A
f x = d {!!}
|
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sccz80/sp1_ChangeSprType.asm | jpoikela/z88dk | 640 | 1929 | <reponame>jpoikela/z88dk
; void sp1_ChangeSprType(struct sp1_cs *c, void *drawf)
SECTION code_clib
SECTION code_temp_sp1
PUBLIC sp1_ChangeSprType
EXTERN asm_sp1_ChangeSprType
sp1_ChangeSprType:
pop bc
pop de
pop hl
push hl
push de
push bc
jp asm_sp1_ChangeSprType
|
programs/oeis/217/A217038.asm | neoneye/loda | 22 | 6683 | ; A217038: Number of powerful numbers < n.
; 0,1,1,1,2,2,2,2,3,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,6,6,7,7,7,7,7,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13
lpb $0
mov $2,$0
sub $0,1
seq $2,112526 ; Characteristic function for powerful numbers.
add $1,$2
mov $3,$1
cmp $3,0
add $1,$3
lpe
mov $0,$1
|
src/libbijection.agda | shinji-kono/automaton-in-agda | 0 | 15348 | <filename>src/libbijection.agda
module libbijection where
open import Level renaming ( zero to Zero ; suc to Suc )
open import Data.Nat
open import Data.Maybe
open import Data.List hiding ([_] ; sum )
open import Data.Nat.Properties
open import Relation.Nullary
open import Data.Empty
open import Data.Unit hiding ( _≤_ )
open import Relation.Binary.Core hiding (_⇔_)
open import Relation.Binary.Definitions
open import Relation.Binary.PropositionalEquality
open import Function.Inverse hiding (sym)
open import Function.Bijection renaming (Bijection to Bijection1)
open import Function.Equality hiding (cong)
open import logic
open import nat
-- record Bijection {n m : Level} (R : Set n) (S : Set m) : Set (n Level.⊔ m) where
-- field
-- fun← : S → R
-- fun→ : R → S
-- fiso← : (x : R) → fun← ( fun→ x ) ≡ x
-- fiso→ : (x : S ) → fun→ ( fun← x ) ≡ x
--
-- injection : {n m : Level} (R : Set n) (S : Set m) (f : R → S ) → Set (n Level.⊔ m)
-- injection R S f = (x y : R) → f x ≡ f y → x ≡ y
open Bijection
b→injection1 : {n m : Level} (R : Set n) (S : Set m) → (b : Bijection R S) → injection S R (fun← b)
b→injection1 R S b x y eq = trans ( sym ( fiso→ b x ) ) (trans ( cong (λ k → fun→ b k ) eq ) ( fiso→ b y ))
--
-- injection as an uniquneness of bijection
--
b→injection0 : {n m : Level} (R : Set n) (S : Set m) → (b : Bijection R S) → injection R S (fun→ b)
b→injection0 R S b x y eq = begin
x
≡⟨ sym ( fiso← b x ) ⟩
fun← b ( fun→ b x )
≡⟨ cong (λ k → fun← b k ) eq ⟩
fun← b ( fun→ b y )
≡⟨ fiso← b y ⟩
y
∎ where open ≡-Reasoning
open import Relation.Binary using (Rel; Setoid; Symmetric; Total)
open import Function.Surjection
≡-Setoid : {n : Level} (R : Set n) → Setoid n n
≡-Setoid R = record {
Carrier = R
; _≈_ = _≡_
; isEquivalence = record { sym = sym ; refl = refl ; trans = trans }
}
libBijection : {n m : Level} (R : Set n) (S : Set m) → Bijection R S → Bijection1 (≡-Setoid R) (≡-Setoid S)
libBijection R S b = record {
to = record { _⟨$⟩_ = λ x → fun→ b x ; cong = λ i=j → cong (fun→ b) i=j }
; bijective = record {
injective = λ {x} {y} eq → b→injection0 R S b x y eq
; surjective = record { from = record { _⟨$⟩_ = λ x → fun← b x ; cong = λ i=j → cong (fun← b) i=j }
; right-inverse-of = λ x → fiso→ b x }
}
}
fromBijection1 : {n m : Level} (R : Set n) (S : Set m) → Bijection1 (≡-Setoid R) (≡-Setoid S) → Bijection R S
fromBijection1 R S b = record {
fun← = Π._⟨$⟩_ (Surjective.from (Bijective.surjective (Bijection1.bijective b)))
; fun→ = Π._⟨$⟩_ (Bijection1.to b)
; fiso← = λ x → Bijective.injective (Bijection1.bijective b) (fb1 x)
; fiso→ = Surjective.right-inverse-of (Bijective.surjective (Bijection1.bijective b))
} where
-- fun← b x ≡ fun← b y → x ≡ y
-- fun← (fun→ ( fun← x )) ≡ fun← x
-- fun→ ( fun← x ) ≡ x
fb1 : (x : R) → Π._⟨$⟩_ (Bijection1.to b) (Surjective.from (Bijective.surjective (Bijection1.bijective b)) ⟨$⟩ (Bijection1.to b ⟨$⟩ x)) ≡ Π._⟨$⟩_ (Bijection1.to b) x
fb1 x = begin
Π._⟨$⟩_ (Bijection1.to b) (Surjective.from (Bijective.surjective (Bijection1.bijective b)) ⟨$⟩ (Bijection1.to b ⟨$⟩ x))
≡⟨ Surjective.right-inverse-of (Bijective.surjective (Bijection1.bijective b)) _ ⟩
Π._⟨$⟩_ (Bijection1.to b) x ∎ where open ≡-Reasoning
|
gfx/pokemon/poliwag/anim.asm | Dev727/ancientplatinum | 28 | 15341 | frame 0, 12
frame 3, 24
setrepeat 2
frame 0, 08
frame 1, 08
dorepeat 3
endanim
|
3-mid/opengl/source/lean/model/opengl-model-billboard-textured.ads | charlie5/lace-alire | 1 | 17461 | with
openGL.Geometry,
openGL.Texture;
package openGL.Model.billboard.textured
--
-- Models a textured billboard.
--
is
type Item (Lucid : Boolean) is new Model.billboard.item with private;
type View is access all Item'Class;
type Image_view is access Image;
type lucid_Image_view is access lucid_Image;
---------
--- Forge
--
package Forge
is
function new_Billboard (Size : in Size_t := default_Size;
Plane : in billboard.Plane;
Texture : in asset_Name;
Lucid : in Boolean := False) return View;
end Forge;
--------------
--- Attributes
--
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
procedure Texture_is (Self : in out Item; Now : in Texture.Object);
function Texture (Self : in Item) return Texture.Object;
procedure Texture_Coords_are (Self : in out Item; Now : in Coordinates);
procedure Size_is (Self : in out Item; Now : in Size_t);
procedure Image_is (Self : in out Item; Now : in Image);
procedure Image_is (Self : in out Item; Now : in lucid_Image);
private
type Item (Lucid : Boolean) is new Model.billboard.item with
record
texture_Name : asset_Name := null_Asset;
Texture : openGL.Texture.Object := openGL.Texture.null_Object; -- The texture to be applied to the billboard face.
texture_Coords : Coordinates := ((0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)); -- TODO: Should be constant/static ?
case Lucid is
when True => lucid_Image : lucid_Image_view;
when False => Image : Image_view;
end case;
end record;
end openGL.Model.billboard.textured;
|
openal-extension-efx_thin.adb | io7m/coreland-openal-ada | 1 | 29676 | -- Automatically generated, do not edit.
with OpenAL.Load;
package body OpenAL.Extension.EFX_Thin is
--
-- Load function for API pointers
--
function Load_API return API_t is
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Auxiliary_Effect_Slotf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Auxiliary_Effect_Slotfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Auxiliary_Effect_Sloti_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Auxiliary_Effect_Slotiv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Delete_Auxiliary_Effect_Slots_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Delete_Effects_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Delete_Filters_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Effectf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Effectfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Effecti_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Effectiv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Filterf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Filterfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Filteri_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Filteriv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Gen_Auxiliary_Effect_Slots_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Gen_Effects_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Gen_Filters_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Auxiliary_Effect_Slotf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Auxiliary_Effect_Slotfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Auxiliary_Effect_Sloti_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Auxiliary_Effect_Slotiv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Effectf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Effectfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Effecti_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Effectiv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Filterf_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Filterfv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Filteri_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Get_Filteriv_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Is_Auxiliary_Effect_Slot_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Is_Effect_t);
function Load_Function is new Load.Load_Subprogram
(Subprogram_Access_Type => Is_Filter_t);
begin
return API_t'
(Auxiliary_Effect_Slotf => Load_Function ("alAuxiliaryEffectSlotf"),
Auxiliary_Effect_Slotfv => Load_Function ("alAuxiliaryEffectSlotfv"),
Auxiliary_Effect_Sloti => Load_Function ("alAuxiliaryEffectSloti"),
Auxiliary_Effect_Slotiv => Load_Function ("alAuxiliaryEffectSlotiv"),
Delete_Auxiliary_Effect_Slots => Load_Function ("alDeleteAuxiliaryEffectSlots"),
Delete_Effects => Load_Function ("alDeleteEffects"),
Delete_Filters => Load_Function ("alDeleteFilters"),
Effectf => Load_Function ("alEffectf"),
Effectfv => Load_Function ("alEffectfv"),
Effecti => Load_Function ("alEffecti"),
Effectiv => Load_Function ("alEffectiv"),
Filterf => Load_Function ("alFilterf"),
Filterfv => Load_Function ("alFilterfv"),
Filteri => Load_Function ("alFilteri"),
Filteriv => Load_Function ("alFilteriv"),
Gen_Auxiliary_Effect_Slots => Load_Function ("alGenAuxiliaryEffectSlots"),
Gen_Effects => Load_Function ("alGenEffects"),
Gen_Filters => Load_Function ("alGenFilters"),
Get_Auxiliary_Effect_Slotf => Load_Function ("alGetAuxiliaryEffectSlotf"),
Get_Auxiliary_Effect_Slotfv => Load_Function ("alGetAuxiliaryEffectSlotfv"),
Get_Auxiliary_Effect_Sloti => Load_Function ("alGetAuxiliaryEffectSloti"),
Get_Auxiliary_Effect_Slotiv => Load_Function ("alGetAuxiliaryEffectSlotiv"),
Get_Effectf => Load_Function ("alGetEffectf"),
Get_Effectfv => Load_Function ("alGetEffectfv"),
Get_Effecti => Load_Function ("alGetEffecti"),
Get_Effectiv => Load_Function ("alGetEffectiv"),
Get_Filterf => Load_Function ("alGetFilterf"),
Get_Filterfv => Load_Function ("alGetFilterfv"),
Get_Filteri => Load_Function ("alGetFilteri"),
Get_Filteriv => Load_Function ("alGetFilteriv"),
Is_Auxiliary_Effect_Slot => Load_Function ("alIsAuxiliaryEffectSlot"),
Is_Effect => Load_Function ("alIsEffect"),
Is_Filter => Load_Function ("alIsFilter"));
end Load_API;
end OpenAL.Extension.EFX_Thin;
|
test/ptr.asm | killvxk/AssemblyLine | 147 | 18473 | <reponame>killvxk/AssemblyLine
SECTION .text
GLOBAL test
test:
mov ax, word [rax]
mov ax, word [rbx]
mov ax, word [rcx]
mov ax, word [rdx]
mov ax, word [rdi]
mov ax, word [r8]
mov ax, word [r9]
mov ax, word [r10]
mov ax, word [r11]
mov ax, word [r12]
mov ax, word [r13]
mov ax, word [r14]
mov ax, word [r15]
mov ax, word [rsp]
mov ax, word [rsi]
mov ax, word [rbp]
mov bx, word [rax]
mov bx, word [rbx]
mov bx, word [rcx]
mov bx, word [rdx]
mov bx, word [rdi]
mov bx, word [r8]
mov bx, word [r9]
mov bx, word [r10]
mov bx, word [r11]
mov bx, word [r12]
mov bx, word [r13]
mov bx, word [r14]
mov bx, word [r15]
mov bx, word [rsp]
mov bx, word [rsi]
mov bx, word [rbp]
mov cx, word [rax]
mov cx, word [rbx]
mov cx, word [rcx]
mov cx, word [rdx]
mov cx, word [rdi]
mov cx, word [r8]
mov cx, word [r9]
mov cx, word [r10]
mov cx, word [r11]
mov cx, word [r12]
mov cx, word [r13]
mov cx, word [r14]
mov cx, word [r15]
mov cx, word [rsp]
mov cx, word [rsi]
mov cx, word [rbp]
mov dx, word [rax]
mov dx, word [rbx]
mov dx, word [rcx]
mov dx, word [rdx]
mov dx, word [rdi]
mov dx, word [r8]
mov dx, word [r9]
mov dx, word [r10]
mov dx, word [r11]
mov dx, word [r12]
mov dx, word [r13]
mov dx, word [r14]
mov dx, word [r15]
mov dx, word [rsp]
mov dx, word [rsi]
mov dx, word [rbp]
mov di, word [rax]
mov di, word [rbx]
mov di, word [rcx]
mov di, word [rdx]
mov di, word [rdi]
mov di, word [r8]
mov di, word [r9]
mov di, word [r10]
mov di, word [r11]
mov di, word [r12]
mov di, word [r13]
mov di, word [r14]
mov di, word [r15]
mov di, word [rsp]
mov di, word [rsi]
mov di, word [rbp]
mov r8w, word [rax]
mov r8w, word [rbx]
mov r8w, word [rcx]
mov r8w, word [rdx]
mov r8w, word [rdi]
mov r8w, word [r8]
mov r8w, word [r9]
mov r8w, word [r10]
mov r8w, word [r11]
mov r8w, word [r12]
mov r8w, word [r13]
mov r8w, word [r14]
mov r8w, word [r15]
mov r8w, word [rsp]
mov r8w, word [rsi]
mov r8w, word [rbp]
mov r9w, word [rax]
mov r9w, word [rbx]
mov r9w, word [rcx]
mov r9w, word [rdx]
mov r9w, word [rdi]
mov r9w, word [r8]
mov r9w, word [r9]
mov r9w, word [r10]
mov r9w, word [r11]
mov r9w, word [r12]
mov r9w, word [r13]
mov r9w, word [r14]
mov r9w, word [r15]
mov r9w, word [rsp]
mov r9w, word [rsi]
mov r9w, word [rbp]
mov r10w, word [rax]
mov r10w, word [rbx]
mov r10w, word [rcx]
mov r10w, word [rdx]
mov r10w, word [rdi]
mov r10w, word [r8]
mov r10w, word [r9]
mov r10w, word [r10]
mov r10w, word [r11]
mov r10w, word [r12]
mov r10w, word [r13]
mov r10w, word [r14]
mov r10w, word [r15]
mov r10w, word [rsp]
mov r10w, word [rsi]
mov r10w, word [rbp]
mov r11w, word [rax]
mov r11w, word [rbx]
mov r11w, word [rcx]
mov r11w, word [rdx]
mov r11w, word [rdi]
mov r11w, word [r8]
mov r11w, word [r9]
mov r11w, word [r10]
mov r11w, word [r11]
mov r11w, word [r12]
mov r11w, word [r13]
mov r11w, word [r14]
mov r11w, word [r15]
mov r11w, word [rsp]
mov r11w, word [rsi]
mov r11w, word [rbp]
mov r12w, word [rax]
mov r12w, word [rbx]
mov r12w, word [rcx]
mov r12w, word [rdx]
mov r12w, word [rdi]
mov r12w, word [r8]
mov r12w, word [r9]
mov r12w, word [r10]
mov r12w, word [r11]
mov r12w, word [r12]
mov r12w, word [r13]
mov r12w, word [r14]
mov r12w, word [r15]
mov r12w, word [rsp]
mov r12w, word [rsi]
mov r12w, word [rbp]
mov r13w, word [rax]
mov r13w, word [rbx]
mov r13w, word [rcx]
mov r13w, word [rdx]
mov r13w, word [rdi]
mov r13w, word [r8]
mov r13w, word [r9]
mov r13w, word [r10]
mov r13w, word [r11]
mov r13w, word [r12]
mov r13w, word [r13]
mov r13w, word [r14]
mov r13w, word [r15]
mov r13w, word [rsp]
mov r13w, word [rsi]
mov r13w, word [rbp]
mov r14w, word [rax]
mov r14w, word [rbx]
mov r14w, word [rcx]
mov r14w, word [rdx]
mov r14w, word [rdi]
mov r14w, word [r8]
mov r14w, word [r9]
mov r14w, word [r10]
mov r14w, word [r11]
mov r14w, word [r12]
mov r14w, word [r13]
mov r14w, word [r14]
mov r14w, word [r15]
mov r14w, word [rsp]
mov r14w, word [rsi]
mov r14w, word [rbp]
mov r15w, word [rax]
mov r15w, word [rbx]
mov r15w, word [rcx]
mov r15w, word [rdx]
mov r15w, word [rdi]
mov r15w, word [r8]
mov r15w, word [r9]
mov r15w, word [r10]
mov r15w, word [r11]
mov r15w, word [r12]
mov r15w, word [r13]
mov r15w, word [r14]
mov r15w, word [r15]
mov r15w, word [rsp]
mov r15w, word [rsi]
mov r15w, word [rbp]
mov sp, word [rax]
mov sp, word [rbx]
mov sp, word [rcx]
mov sp, word [rdx]
mov sp, word [rdi]
mov sp, word [r8]
mov sp, word [r9]
mov sp, word [r10]
mov sp, word [r11]
mov sp, word [r12]
mov sp, word [r13]
mov sp, word [r14]
mov sp, word [r15]
mov sp, word [rsp]
mov sp, word [rsi]
mov sp, word [rbp]
mov si, word [rax]
mov si, word [rbx]
mov si, word [rcx]
mov si, word [rdx]
mov si, word [rdi]
mov si, word [r8]
mov si, word [r9]
mov si, word [r10]
mov si, word [r11]
mov si, word [r12]
mov si, word [r13]
mov si, word [r14]
mov si, word [r15]
mov si, word [rsp]
mov si, word [rsi]
mov si, word [rbp]
mov bp, word [rax]
mov bp, word [rbx]
mov bp, word [rcx]
mov bp, word [rdx]
mov bp, word [rdi]
mov bp, word [r8]
mov bp, word [r9]
mov bp, word [r10]
mov bp, word [r11]
mov bp, word [r12]
mov bp, word [r13]
mov bp, word [r14]
mov bp, word [r15]
mov bp, word [rsp]
mov bp, word [rsi]
mov bp, word [rbp]
mov ax, word [rdx+8*r15+0x7f]
mov ax, word [r9+8*rbp+0x7f]
mov ax, word [eax]
mov word [eax+0x2], ax
mov ax, word [ebx]
mov ax, word [ecx]
mov ax, word [edx]
mov ax, word [edi]
mov ax, word [r8d]
mov ax, word [r9d]
mov ax, word [r10d]
mov ax, word [r11d]
mov ax, word [r12d]
mov ax, word [r13d]
mov ax, word [r14d]
mov ax, word [r15d]
mov ax, word [esp]
mov ax, word [esi]
mov ax, word [ebp]
mov bx, word [eax]
mov bx, word [ebx]
mov bx, word [ecx]
mov bx, word [edx]
mov bx, word [edi]
mov bx, word [r8d]
mov bx, word [r9d]
mov bx, word [r10d]
mov bx, word [r11d]
mov bx, word [r12d]
mov bx, word [r13d]
mov bx, word [r14d]
mov bx, word [r15d]
mov bx, word [esp]
mov bx, word [esi]
mov bx, word [ebp]
mov cx, word [eax]
mov cx, word [ebx]
mov cx, word [ecx]
mov cx, word [edx]
mov cx, word [edi]
mov cx, word [r8d]
mov cx, word [r9d]
mov cx, word [r10d]
mov cx, word [r11d]
mov cx, word [r12d]
mov cx, word [r13d]
mov cx, word [r14d]
mov cx, word [r15d]
mov cx, word [esp]
mov cx, word [esi]
mov cx, word [ebp]
mov dx, word [eax]
mov dx, word [ebx]
mov dx, word [ecx]
mov dx, word [edx]
mov dx, word [edi]
mov dx, word [r8d]
mov dx, word [r9d]
mov dx, word [r10d]
mov dx, word [r11d]
mov dx, word [r12d]
mov dx, word [r13d]
mov dx, word [r14d]
mov dx, word [r15d]
mov dx, word [esp]
mov dx, word [esi]
mov dx, word [ebp]
mov di, word [eax]
mov di, word [ebx]
mov di, word [ecx]
mov di, word [edx]
mov di, word [edi]
mov di, word [r8d]
mov di, word [r9d]
mov di, word [r10d]
mov di, word [r11d]
mov di, word [r12d]
mov di, word [r13d]
mov di, word [r14d]
mov di, word [r15d]
mov di, word [esp]
mov di, word [esi]
mov di, word [ebp]
mov r8w, word [eax]
mov r8w, word [ebx]
mov r8w, word [ecx]
mov r8w, word [edx]
mov r8w, word [edi]
mov r8w, word [r8d]
mov r8w, word [r9d]
mov r8w, word [r10d]
mov r8w, word [r11d]
mov r8w, word [r12d]
mov r8w, word [r13d]
mov r8w, word [r14d]
mov r8w, word [r15d]
mov r8w, word [esp]
mov r8w, word [esi]
mov r8w, word [ebp]
mov r9w, word [eax]
mov r9w, word [ebx]
mov r9w, word [ecx]
mov r9w, word [edx]
mov r9w, word [edi]
mov r9w, word [r8d]
mov r9w, word [r9d]
mov r9w, word [r10d]
mov r9w, word [r11d]
mov r9w, word [r12d]
mov r9w, word [r13d]
mov r9w, word [r14d]
mov r9w, word [r15d]
mov r9w, word [esp]
mov r9w, word [esi]
mov r9w, word [ebp]
mov r10w, word [eax]
mov r10w, word [ebx]
mov r10w, word [ecx]
mov r10w, word [edx]
mov r10w, word [edi]
mov r10w, word [r8d]
mov r10w, word [r9d]
mov r10w, word [r10d]
mov r10w, word [r11d]
mov r10w, word [r12d]
mov r10w, word [r13d]
mov r10w, word [r14d]
mov r10w, word [r15d]
mov r10w, word [esp]
mov r10w, word [esi]
mov r10w, word [ebp]
mov r11w, word [eax]
mov r11w, word [ebx]
mov r11w, word [ecx]
mov r11w, word [edx]
mov r11w, word [edi]
mov r11w, word [r8d]
mov r11w, word [r9d]
mov r11w, word [r10d]
mov r11w, word [r11d]
mov r11w, word [r12d]
mov r11w, word [r13d]
mov r11w, word [r14d]
mov r11w, word [r15d]
mov r11w, word [esp]
mov r11w, word [esi]
mov r11w, word [ebp]
mov r12w, word [eax]
mov r12w, word [ebx]
mov r12w, word [ecx]
mov r12w, word [edx]
mov r12w, word [edi]
mov r12w, word [r8d]
mov r12w, word [r9d]
mov r12w, word [r10d]
mov r12w, word [r11d]
mov r12w, word [r12d]
mov r12w, word [r13d]
mov r12w, word [r14d]
mov r12w, word [r15d]
mov r12w, word [esp]
mov r12w, word [esi]
mov r12w, word [ebp]
mov r13w, word [eax]
mov r13w, word [ebx]
mov r13w, word [ecx]
mov r13w, word [edx]
mov r13w, word [edi]
mov r13w, word [r8d]
mov r13w, word [r9d]
mov r13w, word [r10d]
mov r13w, word [r11d]
mov r13w, word [r12d]
mov r13w, word [r13d]
mov r13w, word [r14d]
mov r13w, word [r15d]
mov r13w, word [esp]
mov r13w, word [esi]
mov r13w, word [ebp]
mov r14w, word [eax]
mov r14w, word [ebx]
mov r14w, word [ecx]
mov r14w, word [edx]
mov r14w, word [edi]
mov r14w, word [r8d]
mov r14w, word [r9d]
mov r14w, word [r10d]
mov r14w, word [r11d]
mov r14w, word [r12d]
mov r14w, word [r13d]
mov r14w, word [r14d]
mov r14w, word [r15d]
mov r14w, word [esp]
mov r14w, word [esi]
mov r14w, word [ebp]
mov r15w, word [eax]
mov r15w, word [ebx]
mov r15w, word [ecx]
mov r15w, word [edx]
mov r15w, word [edi]
mov r15w, word [r8d]
mov r15w, word [r9d]
mov r15w, word [r10d]
mov r15w, word [r11d]
mov r15w, word [r12d]
mov r15w, word [r13d]
mov r15w, word [r14d]
mov r15w, word [r15d]
mov r15w, word [esp]
mov r15w, word [esi]
mov r15w, word [ebp]
mov sp, word [eax]
mov sp, word [ebx]
mov sp, word [ecx]
mov sp, word [edx]
mov sp, word [edi]
mov sp, word [r8d]
mov sp, word [r9d]
mov sp, word [r10d]
mov sp, word [r11d]
mov sp, word [r12d]
mov sp, word [r13d]
mov sp, word [r14d]
mov sp, word [r15d]
mov sp, word [esp]
mov sp, word [esi]
mov sp, word [ebp]
mov si, word [eax]
mov si, word [ebx]
mov si, word [ecx]
mov si, word [edx]
mov si, word [edi]
mov si, word [r8d]
mov si, word [r9d]
mov si, word [r10d]
mov si, word [r11d]
mov si, word [r12d]
mov si, word [r13d]
mov si, word [r14d]
mov si, word [r15d]
mov si, word [esp]
mov si, word [esi]
mov si, word [ebp]
mov bp, word [eax]
mov bp, word [ebx]
mov bp, word [ecx]
mov bp, word [edx]
mov bp, word [edi]
mov bp, word [r8d]
mov bp, word [r9d]
mov bp, word [r10d]
mov bp, word [r11d]
mov bp, word [r12d]
mov bp, word [r13d]
mov bp, word [r14d]
mov bp, word [r15d]
mov bp, word [esp]
mov bp, word [esi]
mov bp, word [ebp]
mov bp, word [esi+r11d*2+0x89]
mov bp, word [ebp+r15d*4+0x89]
mov eax, dword [rax]
mov eax, dword [rbx]
mov eax, dword [rcx]
mov eax, dword [rdx]
mov eax, dword [rdi]
mov eax, dword [r8]
mov eax, dword [r9]
mov eax, dword [r10]
mov eax, dword [r11]
mov eax, dword [r12]
mov eax, dword [r13]
mov eax, dword [r14]
mov eax, dword [r15]
mov eax, dword [rsp]
mov eax, dword [rsi]
mov eax, dword [rbp]
mov ebx, dword [rax]
mov ebx, dword [rbx]
mov ebx, dword [rcx]
mov ebx, dword [rdx]
mov ebx, dword [rdi]
mov ebx, dword [r8]
mov ebx, dword [r9]
mov ebx, dword [r10]
mov ebx, dword [r11]
mov ebx, dword [r12]
mov ebx, dword [r13]
mov ebx, dword [r14]
mov ebx, dword [r15]
mov ebx, dword [rsp]
mov ebx, dword [rsi]
mov ebx, dword [rbp]
mov ecx, dword [rax]
mov ecx, dword [rbx]
mov ecx, dword [rcx]
mov ecx, dword [rdx]
mov ecx, dword [rdi]
mov ecx, dword [r8]
mov ecx, dword [r9]
mov ecx, dword [r10]
mov ecx, dword [r11]
mov ecx, dword [r12]
mov ecx, dword [r13]
mov ecx, dword [r14]
mov ecx, dword [r15]
mov ecx, dword [rsp]
mov ecx, dword [rsi]
mov ecx, dword [rbp]
mov edx, dword [rax]
mov edx, dword [rbx]
mov edx, dword [rcx]
mov edx, dword [rdx]
mov edx, dword [rdi]
mov edx, dword [r8]
mov edx, dword [r9]
mov edx, dword [r10]
mov edx, dword [r11]
mov edx, dword [r12]
mov edx, dword [r13]
mov edx, dword [r14]
mov edx, dword [r15]
mov edx, dword [rsp]
mov edx, dword [rsi]
mov edx, dword [rbp]
mov edi, dword [rax]
mov edi, dword [rbx]
mov edi, dword [rcx]
mov edi, dword [rdx]
mov edi, dword [rdi]
mov edi, dword [r8]
mov edi, dword [r9]
mov edi, dword [r10]
mov edi, dword [r11]
mov edi, dword [r12]
mov edi, dword [r13]
mov edi, dword [r14]
mov edi, dword [r15]
mov edi, dword [rsp]
mov edi, dword [rsi]
mov edi, dword [rbp]
mov r8d, dword [rax]
mov r8d, dword [rbx]
mov r8d, dword [rcx]
mov r8d, dword [rdx]
mov r8d, dword [rdi]
mov r8d, dword [r8]
mov r8d, dword [r9]
mov r8d, dword [r10]
mov r8d, dword [r11]
mov r8d, dword [r12]
mov r8d, dword [r13]
mov r8d, dword [r14]
mov r8d, dword [r15]
mov r8d, dword [rsp]
mov r8d, dword [rsi]
mov r8d, dword [rbp]
mov r9d, dword [rax]
mov r9d, dword [rbx]
mov r9d, dword [rcx]
mov r9d, dword [rdx]
mov r9d, dword [rdi]
mov r9d, dword [r8]
mov r9d, dword [r9]
mov r9d, dword [r10]
mov r9d, dword [r11]
mov r9d, dword [r12]
mov r9d, dword [r13]
mov r9d, dword [r14]
mov r9d, dword [r15]
mov r9d, dword [rsp]
mov r9d, dword [rsi]
mov r9d, dword [rbp]
mov r10d, dword [rax]
mov r10d, dword [rbx]
mov r10d, dword [rcx]
mov r10d, dword [rdx]
mov r10d, dword [rdi]
mov r10d, dword [r8]
mov r10d, dword [r9]
mov r10d, dword [r10]
mov r10d, dword [r11]
mov r10d, dword [r12]
mov r10d, dword [r13]
mov r10d, dword [r14]
mov r10d, dword [r15]
mov r10d, dword [rsp]
mov r10d, dword [rsi]
mov r10d, dword [rbp]
mov r11d, dword [rax]
mov r11d, dword [rbx]
mov r11d, dword [rcx]
mov r11d, dword [rdx]
mov r11d, dword [rdi]
mov r11d, dword [r8]
mov r11d, dword [r9]
mov r11d, dword [r10]
mov r11d, dword [r11]
mov r11d, dword [r12]
mov r11d, dword [r13]
mov r11d, dword [r14]
mov r11d, dword [r15]
mov r11d, dword [rsp]
mov r11d, dword [rsi]
mov r11d, dword [rbp]
mov r12d, dword [rax]
mov r12d, dword [rbx]
mov r12d, dword [rcx]
mov r12d, dword [rdx]
mov r12d, dword [rdi]
mov r12d, dword [r8]
mov r12d, dword [r9]
mov r12d, dword [r10]
mov r12d, dword [r11]
mov r12d, dword [r12]
mov r12d, dword [r13]
mov r12d, dword [r14]
mov r12d, dword [r15]
mov r12d, dword [rsp]
mov r12d, dword [rsi]
mov r12d, dword [rbp]
mov r13d, dword [rax]
mov r13d, dword [rbx]
mov r13d, dword [rcx]
mov r13d, dword [rdx]
mov r13d, dword [rdi]
mov r13d, dword [r8]
mov r13d, dword [r9]
mov r13d, dword [r10]
mov r13d, dword [r11]
mov r13d, dword [r12]
mov r13d, dword [r13]
mov r13d, dword [r14]
mov r13d, dword [r15]
mov r13d, dword [rsp]
mov r13d, dword [rsi]
mov r13d, dword [rbp]
mov r14d, dword [rax]
mov r14d, dword [rbx]
mov r14d, dword [rcx]
mov r14d, dword [rdx]
mov r14d, dword [rdi]
mov r14d, dword [r8]
mov r14d, dword [r9]
mov r14d, dword [r10]
mov r14d, dword [r11]
mov r14d, dword [r12]
mov r14d, dword [r13]
mov r14d, dword [r14]
mov r14d, dword [r15]
mov r14d, dword [rsp]
mov r14d, dword [rsi]
mov r14d, dword [rbp]
mov r15d, dword [rax]
mov r15d, dword [rbx]
mov r15d, dword [rcx]
mov r15d, dword [rdx]
mov r15d, dword [rdi]
mov r15d, dword [r8]
mov r15d, dword [r9]
mov r15d, dword [r10]
mov r15d, dword [r11]
mov r15d, dword [r12]
mov r15d, dword [r13]
mov r15d, dword [r14]
mov r15d, dword [r15]
mov r15d, dword [rsp]
mov r15d, dword [rsi]
mov r15d, dword [rbp]
mov esp, dword [rax]
mov esp, dword [rbx]
mov esp, dword [rcx]
mov esp, dword [rdx]
mov esp, dword [rdi]
mov esp, dword [r8]
mov esp, dword [r9]
mov esp, dword [r10]
mov esp, dword [r11]
mov esp, dword [r12]
mov esp, dword [r13]
mov esp, dword [r14]
mov esp, dword [r15]
mov esp, dword [rsp]
mov esp, dword [rsi]
mov esp, dword [rbp]
mov esi, dword [rax]
mov esi, dword [rbx]
mov esi, dword [rcx]
mov esi, dword [rdx]
mov esi, dword [rdi]
mov esi, dword [r8]
mov esi, dword [r9]
mov esi, dword [r10]
mov esi, dword [r11]
mov esi, dword [r12]
mov esi, dword [r13]
mov esi, dword [r14]
mov esi, dword [r15]
mov esi, dword [rsp]
mov esi, dword [rsi]
mov esi, dword [rbp]
mov ebp, dword [rax]
mov ebp, dword [rbx]
mov ebp, dword [rcx]
mov ebp, dword [rdx]
mov ebp, dword [rdi]
mov ebp, dword [r8]
mov ebp, dword [r9]
mov ebp, dword [r10]
mov ebp, dword [r11]
mov ebp, dword [r12]
mov ebp, dword [r13]
mov ebp, dword [r14]
mov ebp, dword [r15]
mov ebp, dword [rsp]
mov ebp, dword [rsi]
mov ebp, dword [rbp]
mov eax, dword [eax]
mov eax, dword [ebx]
mov eax, dword [ecx]
mov eax, dword [edx]
mov eax, dword [edi]
mov eax, dword [r8d]
mov eax, dword [r9d]
mov eax, dword [r10d]
mov eax, dword [r11d]
mov eax, dword [r12d]
mov eax, dword [r13d]
mov eax, dword [r14d]
mov eax, dword [r15d]
mov eax, dword [esp]
mov eax, dword [esi]
mov eax, dword [ebp]
mov ebx, dword [eax]
mov ebx, dword [ebx]
mov ebx, dword [ecx]
mov ebx, dword [edx]
mov ebx, dword [edi]
mov ebx, dword [r8d]
mov ebx, dword [r9d]
mov ebx, dword [r10d]
mov ebx, dword [r11d]
mov ebx, dword [r12d]
mov ebx, dword [r13d]
mov ebx, dword [r14d]
mov ebx, dword [r15d]
mov ebx, dword [esp]
mov ebx, dword [esi]
mov ebx, dword [ebp]
mov ecx, dword [eax]
mov ecx, dword [ebx]
mov ecx, dword [ecx]
mov ecx, dword [edx]
mov ecx, dword [edi]
mov ecx, dword [r8d]
mov ecx, dword [r9d]
mov ecx, dword [r10d]
mov ecx, dword [r11d]
mov ecx, dword [r12d]
mov ecx, dword [r13d]
mov ecx, dword [r14d]
mov ecx, dword [r15d]
mov ecx, dword [esp]
mov ecx, dword [esi]
mov ecx, dword [ebp]
mov edx, dword [eax]
mov edx, dword [ebx]
mov edx, dword [ecx]
mov edx, dword [edx]
mov edx, dword [edi]
mov edx, dword [r8d]
mov edx, dword [r9d]
mov edx, dword [r10d]
mov edx, dword [r11d]
mov edx, dword [r12d]
mov edx, dword [r13d]
mov edx, dword [r14d]
mov edx, dword [r15d]
mov edx, dword [esp]
mov edx, dword [esi]
mov edx, dword [ebp]
mov edi, dword [eax]
mov edi, dword [ebx]
mov edi, dword [ecx]
mov edi, dword [edx]
mov edi, dword [edi]
mov edi, dword [r8d]
mov edi, dword [r9d]
mov edi, dword [r10d]
mov edi, dword [r11d]
mov edi, dword [r12d]
mov edi, dword [r13d]
mov edi, dword [r14d]
mov edi, dword [r15d]
mov edi, dword [esp]
mov edi, dword [esi]
mov edi, dword [ebp]
mov r8d, dword [eax]
mov r8d, dword [ebx]
mov r8d, dword [ecx]
mov r8d, dword [edx]
mov r8d, dword [edi]
mov r8d, dword [r8d]
mov r8d, dword [r9d]
mov r8d, dword [r10d]
mov r8d, dword [r11d]
mov r8d, dword [r12d]
mov r8d, dword [r13d]
mov r8d, dword [r14d]
mov r8d, dword [r15d]
mov r8d, dword [esp]
mov r8d, dword [esi]
mov r8d, dword [ebp]
mov r9d, dword [eax]
mov r9d, dword [ebx]
mov r9d, dword [ecx]
mov r9d, dword [edx]
mov r9d, dword [edi]
mov r9d, dword [r8d]
mov r9d, dword [r9d]
mov r9d, dword [r10d]
mov r9d, dword [r11d]
mov r9d, dword [r12d]
mov r9d, dword [r13d]
mov r9d, dword [r14d]
mov r9d, dword [r15d]
mov r9d, dword [esp]
mov r9d, dword [esi]
mov r9d, dword [ebp]
mov r10d, dword [eax]
mov r10d, dword [ebx]
mov r10d, dword [ecx]
mov r10d, dword [edx]
mov r10d, dword [edi]
mov r10d, dword [r8d]
mov r10d, dword [r9d]
mov r10d, dword [r10d]
mov r10d, dword [r11d]
mov r10d, dword [r12d]
mov r10d, dword [r13d]
mov r10d, dword [r14d]
mov r10d, dword [r15d]
mov r10d, dword [esp]
mov r10d, dword [esi]
mov r10d, dword [ebp]
mov r11d, dword [eax]
mov r11d, dword [ebx]
mov r11d, dword [ecx]
mov r11d, dword [edx]
mov r11d, dword [edi]
mov r11d, dword [r8d]
mov r11d, dword [r9d]
mov r11d, dword [r10d]
mov r11d, dword [r11d]
mov r11d, dword [r12d]
mov r11d, dword [r13d]
mov r11d, dword [r14d]
mov r11d, dword [r15d]
mov r11d, dword [esp]
mov r11d, dword [esi]
mov r11d, dword [ebp]
mov r12d, dword [eax]
mov r12d, dword [ebx]
mov r12d, dword [ecx]
mov r12d, dword [edx]
mov r12d, dword [edi]
mov r12d, dword [r8d]
mov r12d, dword [r9d]
mov r12d, dword [r10d]
mov r12d, dword [r11d]
mov r12d, dword [r12d]
mov r12d, dword [r13d]
mov r12d, dword [r14d]
mov r12d, dword [r15d]
mov r12d, dword [esp]
mov r12d, dword [esi]
mov r12d, dword [ebp]
mov r13d, dword [eax]
mov r13d, dword [ebx]
mov r13d, dword [ecx]
mov r13d, dword [edx]
mov r13d, dword [edi]
mov r13d, dword [r8d]
mov r13d, dword [r9d]
mov r13d, dword [r10d]
mov r13d, dword [r11d]
mov r13d, dword [r12d]
mov r13d, dword [r13d]
mov r13d, dword [r14d]
mov r13d, dword [r15d]
mov r13d, dword [esp]
mov r13d, dword [esi]
mov r13d, dword [ebp]
mov r14d, dword [eax]
mov r14d, dword [ebx]
mov r14d, dword [ecx]
mov r14d, dword [edx]
mov r14d, dword [edi]
mov r14d, dword [r8d]
mov r14d, dword [r9d]
mov r14d, dword [r10d]
mov r14d, dword [r11d]
mov r14d, dword [r12d]
mov r14d, dword [r13d]
mov r14d, dword [r14d]
mov r14d, dword [r15d]
mov r14d, dword [esp]
mov r14d, dword [esi]
mov r14d, dword [ebp]
mov r15d, dword [eax]
mov r15d, dword [ebx]
mov r15d, dword [ecx]
mov r15d, dword [edx]
mov r15d, dword [edi]
mov r15d, dword [r8d]
mov r15d, dword [r9d]
mov r15d, dword [r10d]
mov r15d, dword [r11d]
mov r15d, dword [r12d]
mov r15d, dword [r13d]
mov r15d, dword [r14d]
mov r15d, dword [r15d]
mov r15d, dword [esp]
mov r15d, dword [esi]
mov r15d, dword [ebp]
mov esp, dword [eax]
mov esp, dword [ebx]
mov esp, dword [ecx]
mov esp, dword [edx]
mov esp, dword [edi]
mov esp, dword [r8d]
mov esp, dword [r9d]
mov esp, dword [r10d]
mov esp, dword [r11d]
mov esp, dword [r12d]
mov esp, dword [r13d]
mov esp, dword [r14d]
mov esp, dword [r15d]
mov esp, dword [esp]
mov esp, dword [esi]
mov esp, dword [ebp]
mov esi, dword [eax]
mov esi, dword [ebx]
mov esi, dword [ecx]
mov esi, dword [edx]
mov esi, dword [edi]
mov esi, dword [r8d]
mov esi, dword [r9d]
mov esi, dword [r10d]
mov esi, dword [r11d]
mov esi, dword [r12d]
mov esi, dword [r13d]
mov esi, dword [r14d]
mov esi, dword [r15d]
mov esi, dword [esp]
mov esi, dword [esi]
mov esi, dword [ebp]
mov ebp, dword [eax]
mov ebp, dword [ebx]
mov ebp, dword [ecx]
mov ebp, dword [edx]
mov ebp, dword [edi]
mov ebp, dword [r8d]
mov ebp, dword [r9d]
mov ebp, dword [r10d]
mov ebp, dword [r11d]
mov ebp, dword [r12d]
mov ebp, dword [r13d]
mov ebp, dword [r14d]
mov ebp, dword [r15d]
mov ebp, dword [esp]
mov ebp, dword [esi]
mov ebp, dword [ebp]
mov rax, qword [rax]
mov rax, qword [rbx]
mov rax, qword [rcx]
mov rax, qword [rdx]
mov rax, qword [rdi]
mov rax, qword [r8]
mov rax, qword [r9]
mov rax, qword [r10]
mov rax, qword [r11]
mov rax, qword [r12]
mov rax, qword [r13]
mov rax, qword [r14]
mov rax, qword [r15]
mov rax, qword [rsp]
mov rax, qword [rsi]
mov rax, qword [rbp]
mov rbx, qword [rax]
mov rbx, qword [rbx]
mov rbx, qword [rcx]
mov rbx, qword [rdx]
mov rbx, qword [rdi]
mov rbx, qword [r8]
mov rbx, qword [r9]
mov rbx, qword [r10]
mov rbx, qword [r11]
mov rbx, qword [r12]
mov rbx, qword [r13]
mov rbx, qword [r14]
mov rbx, qword [r15]
mov rbx, qword [rsp]
mov rbx, qword [rsi]
mov rbx, qword [rbp]
mov rcx, qword [rax]
mov rcx, qword [rbx]
mov rcx, qword [rcx]
mov rcx, qword [rdx]
mov rcx, qword [rdi]
mov rcx, qword [r8]
mov rcx, qword [r9]
mov rcx, qword [r10]
mov rcx, qword [r11]
mov rcx, qword [r12]
mov rcx, qword [r13]
mov rcx, qword [r14]
mov rcx, qword [r15]
mov rcx, qword [rsp]
mov rcx, qword [rsi]
mov rcx, qword [rbp]
mov rdx, qword [rax]
mov rdx, qword [rbx]
mov rdx, qword [rcx]
mov rdx, qword [rdx]
mov rdx, qword [rdi]
mov rdx, qword [r8]
mov rdx, qword [r9]
mov rdx, qword [r10]
mov rdx, qword [r11]
mov rdx, qword [r12]
mov rdx, qword [r13]
mov rdx, qword [r14]
mov rdx, qword [r15]
mov rdx, qword [rsp]
mov rdx, qword [rsi]
mov rdx, qword [rbp]
mov rdi, qword [rax]
mov rdi, qword [rbx]
mov rdi, qword [rcx]
mov rdi, qword [rdx]
mov rdi, qword [rdi]
mov rdi, qword [r8]
mov rdi, qword [r9]
mov rdi, qword [r10]
mov rdi, qword [r11]
mov rdi, qword [r12]
mov rdi, qword [r13]
mov rdi, qword [r14]
mov rdi, qword [r15]
mov rdi, qword [rsp]
mov rdi, qword [rsi]
mov rdi, qword [rbp]
mov r8, qword [rax]
mov r8, qword [rbx]
mov r8, qword [rcx]
mov r8, qword [rdx]
mov r8, qword [rdi]
mov r8, qword [r8]
mov r8, qword [r9]
mov r8, qword [r10]
mov r8, qword [r11]
mov r8, qword [r12]
mov r8, qword [r13]
mov r8, qword [r14]
mov r8, qword [r15]
mov r8, qword [rsp]
mov r8, qword [rsi]
mov r8, qword [rbp]
mov r9, qword [rax]
mov r9, qword [rbx]
mov r9, qword [rcx]
mov r9, qword [rdx]
mov r9, qword [rdi]
mov r9, qword [r8]
mov r9, qword [r9]
mov r9, qword [r10]
mov r9, qword [r11]
mov r9, qword [r12]
mov r9, qword [r13]
mov r9, qword [r14]
mov r9, qword [r15]
mov r9, qword [rsp]
mov r9, qword [rsi]
mov r9, qword [rbp]
mov r10, qword [rax]
mov r10, qword [rbx]
mov r10, qword [rcx]
mov r10, qword [rdx]
mov r10, qword [rdi]
mov r10, qword [r8]
mov r10, qword [r9]
mov r10, qword [r10]
mov r10, qword [r11]
mov r10, qword [r12]
mov r10, qword [r13]
mov r10, qword [r14]
mov r10, qword [r15]
mov r10, qword [rsp]
mov r10, qword [rsi]
mov r10, qword [rbp]
mov r11, qword [rax]
mov r11, qword [rbx]
mov r11, qword [rcx]
mov r11, qword [rdx]
mov r11, qword [rdi]
mov r11, qword [r8]
mov r11, qword [r9]
mov r11, qword [r10]
mov r11, qword [r11]
mov r11, qword [r12]
mov r11, qword [r13]
mov r11, qword [r14]
mov r11, qword [r15]
mov r11, qword [rsp]
mov r11, qword [rsi]
mov r11, qword [rbp]
mov r12, qword [rax]
mov r12, qword [rbx]
mov r12, qword [rcx]
mov r12, qword [rdx]
mov r12, qword [rdi]
mov r12, qword [r8]
mov r12, qword [r9]
mov r12, qword [r10]
mov r12, qword [r11]
mov r12, qword [r12]
mov r12, qword [r13]
mov r12, qword [r14]
mov r12, qword [r15]
mov r12, qword [rsp]
mov r12, qword [rsi]
mov r12, qword [rbp]
mov r13, qword [rax]
mov r13, qword [rbx]
mov r13, qword [rcx]
mov r13, qword [rdx]
mov r13, qword [rdi]
mov r13, qword [r8]
mov r13, qword [r9]
mov r13, qword [r10]
mov r13, qword [r11]
mov r13, qword [r12]
mov r13, qword [r13]
mov r13, qword [r14]
mov r13, qword [r15]
mov r13, qword [rsp]
mov r13, qword [rsi]
mov r13, qword [rbp]
mov r14, qword [rax]
mov r14, qword [rbx]
mov r14, qword [rcx]
mov r14, qword [rdx]
mov r14, qword [rdi]
mov r14, qword [r8]
mov r14, qword [r9]
mov r14, qword [r10]
mov r14, qword [r11]
mov r14, qword [r12]
mov r14, qword [r13]
mov r14, qword [r14]
mov r14, qword [r15]
mov r14, qword [rsp]
mov r14, qword [rsi]
mov r14, qword [rbp]
mov r15, qword [rax]
mov r15, qword [rbx]
mov r15, qword [rcx]
mov r15, qword [rdx]
mov r15, qword [rdi]
mov r15, qword [r8]
mov r15, qword [r9]
mov r15, qword [r10]
mov r15, qword [r11]
mov r15, qword [r12]
mov r15, qword [r13]
mov r15, qword [r14]
mov r15, qword [r15]
mov r15, qword [rsp]
mov r15, qword [rsi]
mov r15, qword [rbp]
mov rsp, qword [rax]
mov rsp, qword [rbx]
mov rsp, qword [rcx]
mov rsp, qword [rdx]
mov rsp, qword [rdi]
mov rsp, qword [r8]
mov rsp, qword [r9]
mov rsp, qword [r10]
mov rsp, qword [r11]
mov rsp, qword [r12]
mov rsp, qword [r13]
mov rsp, qword [r14]
mov rsp, qword [r15]
mov rsp, qword [rsp]
mov rsp, qword [rsi]
mov rsp, qword [rbp]
mov rsi, qword [rax]
mov rsi, qword [rbx]
mov rsi, qword [rcx]
mov rsi, qword [rdx]
mov rsi, qword [rdi]
mov rsi, qword [r8]
mov rsi, qword [r9]
mov rsi, qword [r10]
mov rsi, qword [r11]
mov rsi, qword [r12]
mov rsi, qword [r13]
mov rsi, qword [r14]
mov rsi, qword [r15]
mov rsi, qword [rsp]
mov rsi, qword [rsi]
mov rsi, qword [rbp]
mov rbp, qword [rax]
mov rbp, qword [rbx]
mov rbp, qword [rcx]
mov rbp, qword [rdx]
mov rbp, qword [rdi]
mov rbp, qword [r8]
mov rbp, qword [r9]
mov rbp, qword [r10]
mov rbp, qword [r11]
mov rbp, qword [r12]
mov rbp, qword [r13]
mov rbp, qword [r14]
mov rbp, qword [r15]
mov rbp, qword [rsp]
mov rbp, qword [rsi]
mov rbp, qword [rbp]
|
Lab-4/Q4.asm | Kaiser784/CO-lab-Submissions | 3 | 165766 | global _start
section .text
;<======= Printing an integer =========>
print_integer:
mov ebx, 10
div ebx ;dividing the number in eax to get remainder
add edx, '0' ;converting the remainder to ascii
push edx ;pushing the remainder to stack
xor edx, edx ;clearing edx for the next value
inc ecx ;increment of counter
cmp eax, 0 ;checking if the quotient is 0 to terminate the loop
jne print_integer ;if not 0 call function again
xor eax, eax ;clearing eax
reverse_array:
pop dword [result + eax] ;popping elements from the stack and placing them in result
inc eax ;keeping count of size of the string
dec ecx ;from previous function number of elements in stack
cmp ecx, 0
jne reverse_array ;loops until stack is empty
mov edx, eax
mov ecx, result
mov ebx, 1 ;file descriptor
mov eax, 4 ;system write
int 0x80 ;call kernel
xor eax, eax ;clearing stack before returning to avoid segmentation fault
xor ebx, ebx
xor ecx, ecx
xor edx, edx
ret
_start:
xor eax, eax ;clearing stack
xor ebx, ebx
xor ecx, ecx
xor edx, edx
mov ecx, string
checks:
cmp byte[ecx], 0 ; checks if at the end of string
je add_words
cmp byte[ecx], 32h ; ascii for space
je add_words
call check_vowels
inc ecx ; size of string
inc dword[char]
jmp checks
add_words:
inc dword[words]
cmp byte[ecx], 0
je numbers
inc ecx
inc dword[char]
jmp checks
check_vowels:
mov edx, vowels
mov ebx, 10
array_loop: ; loops through vowel array to check for vowels
mov al, byte[edx]
cmp al, byte[ecx]
je add_vows
inc edx
dec ebx
jnz array_loop
xor eax, eax
xor edx, edx
add_cons: ; if no vowels found add to cons and return
inc dword[cons]
ret
add_vows:
inc dword[vows]
ret
numbers:
mov eax, dword[char]
xor ecx, ecx
xor edx, edx
call print_integer
call line
mov eax, dword[words]
xor ecx, ecx
xor edx, edx
call print_integer
call line
mov eax, dword[vows]
xor ecx, ecx
xor edx, edx
call print_integer
call line
mov eax, dword[cons]
xor ecx, ecx
xor edx, edx
call print_integer
call line
Exit:
; Exit
mov eax, 1 ;system exit
int 0x80 ;call kernel
line:
; Final next line
mov ecx, msgb
mov edx, lenb
mov ebx, 1 ;file descriptor
mov eax, 4 ;system write
int 0x80 ;call kernel
ret
section .data
string db "Hello IIITDM Kancheepuram", 0
vows dd 0
cons dd 0
char dd 0
words dd 0
count dd 0
vowels db "a", "e", "i", "o", "u", "A", "E", "I", "O", "U"
msgb db 0xA, 0xD
lenb equ $ - msgb
section .bss ; space reserved for storing values
result resb 1 |
asm/sound.asm | metlinskyi/archive | 0 | 97527 | sound proc
in al,61h
or al,3
out 61h,al
mov al,10110110b
out 43h,al
mov dx,12h
mov ax,3428h
div word ptr [bx]
out 42h,al
mov al,ah
out 42h,al
pause1: push cx
mov cx,0ffh
pause2: push cx
mov cx,offffh
pause3: loop pause3
pop cx
loop pause2
pop cx
loop pause1
in al,61h
and al,0fch
out 61h,al
ret
sound endp
|
externals/mpir-3.0.0/mpn/x86/pentium/mmx/mul_1.asm | JaminChan/eos_win | 1 | 99311 | <reponame>JaminChan/eos_win<filename>externals/mpir-3.0.0/mpn/x86/pentium/mmx/mul_1.asm
dnl Intel Pentium MMX mpn_mul_1 -- mpn by limb multiplication.
dnl Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
dnl
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public License as
dnl published by the Free Software Foundation; either version 2.1 of the
dnl License, or (at your option) any later version.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with the GNU MP Library; see the file COPYING.LIB. If
dnl not, write to the Free Software Foundation, Inc., 51 Franklin Street,
dnl Fifth Floor, Boston, MA 02110-1301, USA.
include(`../config.m4')
C cycles/limb
C P5: 12.0 for 32-bit multiplier
C 7.0 for 16-bit multiplier
C mp_limb_t mpn_mul_1 (mp_ptr dst, mp_srcptr src, mp_size_t size,
C mp_limb_t multiplier);
C
C When the multiplier is 16 bits some special case MMX code is used. Small
C multipliers might arise reasonably often from mpz_mul_ui etc. If the size
C is odd there's roughly a 5 cycle penalty, so times for say size==7 and
C size==8 end up being quite close. If src isn't aligned to an 8 byte
C boundary then one limb is processed separately with roughly a 5 cycle
C penalty, so in that case it's say size==8 and size==9 which are close.
C
C Alternatives:
C
C MMX is not believed to be of any use for 32-bit multipliers, since for
C instance the current method would just have to be more or less duplicated
C for the high and low halves of the multiplier, and would probably
C therefore run at about 14 cycles, which is slower than the plain integer
C at 12.
C
C Adding the high and low MMX products using integer code seems best. An
C attempt at using paddd and carry bit propagation with pcmpgtd didn't give
C any joy. Perhaps something could be done keeping the values signed and
C thereby avoiding adjustments to make pcmpgtd into an unsigned compare, or
C perhaps not.
C
C Future:
C
C An mpn_mul_1c entrypoint would need a double carry out of the low result
C limb in the 16-bit code, unless it could be assumed the carry fits in 16
C bits, possibly as carry<multiplier, this being true of a big calculation
C done piece by piece. But let's worry about that if/when mul_1c is
C actually used.
defframe(PARAM_MULTIPLIER,16)
defframe(PARAM_SIZE, 12)
defframe(PARAM_SRC, 8)
defframe(PARAM_DST, 4)
TEXT
ALIGN(8)
PROLOGUE(mpn_mul_1)
deflit(`FRAME',0)
movl PARAM_SIZE, %ecx
movl PARAM_SRC, %edx
cmpl $1, %ecx
jne L(two_or_more)
C one limb only
movl PARAM_MULTIPLIER, %eax
movl PARAM_DST, %ecx
mull (%edx)
movl %eax, (%ecx)
movl %edx, %eax
ret
L(two_or_more):
C eax size
C ebx
C ecx carry
C edx
C esi src
C edi
C ebp
pushl %esi FRAME_pushl()
pushl %edi FRAME_pushl()
movl %edx, %esi C src
movl PARAM_DST, %edi
movl PARAM_MULTIPLIER, %eax
pushl %ebx FRAME_pushl()
leal (%esi,%ecx,4), %esi C src end
leal (%edi,%ecx,4), %edi C dst end
negl %ecx C -size
pushl %ebp FRAME_pushl()
cmpl $65536, %eax
jb L(small)
L(big):
xorl %ebx, %ebx C carry limb
sarl %ecx C -size/2
jnc L(top) C with carry flag clear
C size was odd, process one limb separately
mull 4(%esi,%ecx,8) C m * src[0]
movl %eax, 4(%edi,%ecx,8)
incl %ecx
orl %edx, %ebx C carry limb, and clear carry flag
L(top):
C eax
C ebx carry
C ecx counter, negative
C edx
C esi src end
C edi dst end
C ebp (scratch carry)
adcl $0, %ebx
movl (%esi,%ecx,8), %eax
mull PARAM_MULTIPLIER
movl %edx, %ebp
addl %eax, %ebx
adcl $0, %ebp
movl 4(%esi,%ecx,8), %eax
mull PARAM_MULTIPLIER
movl %ebx, (%edi,%ecx,8)
addl %ebp, %eax
movl %eax, 4(%edi,%ecx,8)
incl %ecx
movl %edx, %ebx
jnz L(top)
adcl $0, %ebx
popl %ebp
movl %ebx, %eax
popl %ebx
popl %edi
popl %esi
ret
L(small):
C Special case for 16-bit multiplier.
C
C eax multiplier
C ebx
C ecx -size
C edx src
C esi src end
C edi dst end
C ebp multiplier
C size<3 not supported here. At size==3 we're already a couple of
C cycles faster, so there's no threshold as such, just use the MMX
C as soon as possible.
cmpl $-3, %ecx
ja L(big)
movd %eax, %mm7 C m
pxor %mm6, %mm6 C initial carry word
punpcklwd %mm7, %mm7 C m replicated 2 times
addl $2, %ecx C -size+2
punpckldq %mm7, %mm7 C m replicated 4 times
andl $4, %edx C test alignment, clear carry flag
movq %mm7, %mm0 C m
jz L(small_entry)
C Source is unaligned, process one limb separately.
C
C Plain integer code is used here, since it's smaller and is about
C the same 13 cycles as an mmx block would be.
C
C An "addl $1,%ecx" doesn't clear the carry flag when size==3, hence
C the use of separate incl and orl.
mull -8(%esi,%ecx,4) C m * src[0]
movl %eax, -8(%edi,%ecx,4) C dst[0]
incl %ecx C one limb processed
movd %edx, %mm6 C initial carry
orl %eax, %eax C clear carry flag
jmp L(small_entry)
C The scheduling here is quite tricky, since so many instructions have
C pairing restrictions. In particular the js won't pair with a movd, and
C can't be paired with an adc since it wants flags from the inc, so
C instructions are rotated to the top of the loop to find somewhere useful
C for it.
C
C Trouble has been taken to avoid overlapping successive loop iterations,
C since that would greatly increase the size of the startup and finishup
C code. Actually there's probably not much advantage to be had from
C overlapping anyway, since the difficulties are mostly with pairing, not
C with latencies as such.
C
C In the comments x represents the src data and m the multiplier (16
C bits, but replicated 4 times).
C
C The m signs calculated in %mm3 are a loop invariant and could be held in
C say %mm5, but that would save only one instruction and hence be no faster.
L(small_top):
C eax l.low, then l.high
C ebx (h.low)
C ecx counter, -size+2 to 0 or 1
C edx (h.high)
C esi &src[size]
C edi &dst[size]
C ebp
C
C %mm0 (high products)
C %mm1 (low products)
C %mm2 (adjust for m using x signs)
C %mm3 (adjust for x using m signs)
C %mm4
C %mm5
C %mm6 h.low, then carry
C %mm7 m replicated 4 times
movd %mm6, %ebx C h.low
psrlq $32, %mm1 C l.high
movd %mm0, %edx C h.high
movq %mm0, %mm6 C new c
adcl %eax, %ebx
incl %ecx
movd %mm1, %eax C l.high
movq %mm7, %mm0
adcl %eax, %edx
movl %ebx, -16(%edi,%ecx,4)
movl %edx, -12(%edi,%ecx,4)
psrlq $32, %mm6 C c
L(small_entry):
pmulhw -8(%esi,%ecx,4), %mm0 C h = (x*m).high
movq %mm7, %mm1
pmullw -8(%esi,%ecx,4), %mm1 C l = (x*m).low
movq %mm7, %mm3
movq -8(%esi,%ecx,4), %mm2 C x
psraw $15, %mm3 C m signs
pand -8(%esi,%ecx,4), %mm3 C x selected by m signs
psraw $15, %mm2 C x signs
paddw %mm3, %mm0 C add x to h if m neg
pand %mm7, %mm2 C m selected by x signs
paddw %mm2, %mm0 C add m to h if x neg
incl %ecx
movd %mm1, %eax C l.low
punpcklwd %mm0, %mm6 C c + h.low << 16
psrlq $16, %mm0 C h.high
js L(small_top)
movd %mm6, %ebx C h.low
psrlq $32, %mm1 C l.high
adcl %eax, %ebx
popl %ebp FRAME_popl()
movd %mm0, %edx C h.high
psrlq $32, %mm0 C l.high
movd %mm1, %eax C l.high
adcl %eax, %edx
movl %ebx, -12(%edi,%ecx,4)
movd %mm0, %eax C c
adcl $0, %eax
movl %edx, -8(%edi,%ecx,4)
orl %ecx, %ecx
jnz L(small_done) C final %ecx==1 means even, ==0 odd
C Size odd, one extra limb to process.
C Plain integer code is used here, since it's smaller and is about
C the same speed as another mmx block would be.
movl %eax, %ecx
movl PARAM_MULTIPLIER, %eax
mull -4(%esi)
addl %ecx, %eax
adcl $0, %edx
movl %eax, -4(%edi)
movl %edx, %eax
L(small_done):
popl %ebx
popl %edi
popl %esi
emms
ret
EPILOGUE()
|
libsrc/_DEVELOPMENT/string/c/sccz80/strsep.asm | UnivEngineer/z88dk | 1 | 13648 |
; char *strsep(char ** restrict stringp, const char * restrict delim)
SECTION code_clib
SECTION code_string
PUBLIC strsep
EXTERN asm_strsep
strsep:
pop hl
pop de
pop bc
push bc
push de
push hl
IF __CLASSIC && __CPU_GBZ80__
call asm_strsep
ld d,h
ld e,l
ret
ELSE
jp asm_strsep
ENDIF
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _strsep
defc _strsep = strsep
ENDIF
|
MEMZ/NyanMBR/Source/Stage2/Utils/macros.asm | johnmelodyme/viruses | 4 | 160014 | %macro startInterrupt 0
pusha ; Save all registers
%endmacro
%macro finishInterrupt 0
; Acknowledge Interrupt
mov al, 0x20
out 0x20, al
popa ; Restore all registers
iret ; Return from the interrupt
%endmacro
%macro setupInterrupt 2
; Set the right segments
push ds
push 0x0000
pop ds
; Register the handler
mov word [(%1+8)*4], %2 ; Interrupt Handler
mov word [(%1+8)*4+2], 0x2000 ; Segment 0x2000
pop ds
%endmacro
|
oeis/094/A094002.asm | neoneye/loda-programs | 11 | 95653 | ; A094002: a(n+3) = 3*a(n+2) - 2*a(n+1) + 1 with a(0)=1, a(1)=5.
; 1,5,14,33,72,151,310,629,1268,2547,5106,10225,20464,40943,81902,163821,327660,655339,1310698,2621417,5242856,10485735,20971494,41943013,83886052,167772131,335544290,671088609,1342177248,2684354527,5368709086,10737418205,21474836444,42949672923,85899345882,171798691801,343597383640,687194767319,1374389534678,2748779069397,5497558138836,10995116277715,21990232555474,43980465110993,87960930222032,175921860444111,351843720888270,703687441776589,1407374883553228,2814749767106507,5629499534213066
mov $1,2
pow $1,$0
mul $1,5
sub $1,$0
sub $1,4
mov $0,$1
|
programs/oeis/221/A221686.asm | jmorken/loda | 1 | 6523 | <gh_stars>1-10
; A221686: Number of 0..n arrays of length 7 with each element differing from at least one neighbor by 1 or less, starting with 0.
; 64,320,844,1692,2856,4326,6102,8184,10572,13266,16266,19572,23184,27102,31326,35856,40692,45834,51282,57036,63096,69462,76134,83112,90396,97986,105882,114084,122592,131406,140526,149952,159684,169722,180066,190716
mov $3,4
mov $6,$0
add $6,$0
trn $6,1
trn $3,$6
mov $7,$0
mov $0,14
lpb $0
mov $0,7
mov $1,6
bin $1,$3
mov $4,2
lpe
mul $4,$1
mov $1,$4
add $1,34
mov $2,$7
mul $2,93
add $1,$2
mov $5,$7
mul $5,$7
mov $2,$5
mul $2,153
add $1,$2
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/make_util.adb | djamal2727/Main-Bearing-Analytical-Model | 0 | 18132 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- M A K E _ U T I L --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-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. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Debug;
with Errutil;
with Osint; use Osint;
with Output; use Output;
with Opt; use Opt;
with Table;
with Ada.Command_Line; use Ada.Command_Line;
with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.HTable;
package body Make_Util is
---------
-- Add --
---------
procedure Add
(Option : String_Access;
To : in out String_List_Access;
Last : in out Natural)
is
begin
if Last = To'Last then
declare
New_Options : constant String_List_Access :=
new String_List (1 .. To'Last * 2);
begin
New_Options (To'Range) := To.all;
-- Set all elements of the original options to null to avoid
-- deallocation of copies.
To.all := (others => null);
Free (To);
To := New_Options;
end;
end if;
Last := Last + 1;
To (Last) := Option;
end Add;
procedure Add
(Option : String;
To : in out String_List_Access;
Last : in out Natural)
is
begin
Add (Option => new String'(Option), To => To, Last => Last);
end Add;
-------------------------
-- Base_Name_Index_For --
-------------------------
function Base_Name_Index_For
(Main : String;
Main_Index : Int;
Index_Separator : Character) return File_Name_Type
is
Result : File_Name_Type;
begin
Name_Len := 0;
Add_Str_To_Name_Buffer (Base_Name (Main));
-- Remove the extension, if any, that is the last part of the base name
-- starting with a dot and following some characters.
for J in reverse 2 .. Name_Len loop
if Name_Buffer (J) = '.' then
Name_Len := J - 1;
exit;
end if;
end loop;
-- Add the index info, if index is different from 0
if Main_Index > 0 then
Add_Char_To_Name_Buffer (Index_Separator);
declare
Img : constant String := Main_Index'Img;
begin
Add_Str_To_Name_Buffer (Img (2 .. Img'Last));
end;
end if;
Result := Name_Find;
return Result;
end Base_Name_Index_For;
-----------------
-- Create_Name --
-----------------
function Create_Name (Name : String) return File_Name_Type is
begin
Name_Len := 0;
Add_Str_To_Name_Buffer (Name);
return Name_Find;
end Create_Name;
function Create_Name (Name : String) return Name_Id is
begin
Name_Len := 0;
Add_Str_To_Name_Buffer (Name);
return Name_Find;
end Create_Name;
function Create_Name (Name : String) return Path_Name_Type is
begin
Name_Len := 0;
Add_Str_To_Name_Buffer (Name);
return Name_Find;
end Create_Name;
---------------------------
-- Ensure_Absolute_Path --
---------------------------
procedure Ensure_Absolute_Path
(Switch : in out String_Access;
Parent : String;
Do_Fail : Fail_Proc;
For_Gnatbind : Boolean := False;
Including_Non_Switch : Boolean := True;
Including_RTS : Boolean := False)
is
begin
if Switch /= null then
declare
Sw : String (1 .. Switch'Length);
Start : Positive;
begin
Sw := Switch.all;
if Sw (1) = '-' then
if Sw'Length >= 3
and then (Sw (2) = 'I'
or else (not For_Gnatbind
and then (Sw (2) = 'L'
or else
Sw (2) = 'A')))
then
Start := 3;
if Sw = "-I-" then
return;
end if;
elsif Sw'Length >= 4
and then
(Sw (2 .. 3) = "aL" or else
Sw (2 .. 3) = "aO" or else
Sw (2 .. 3) = "aI"
or else (For_Gnatbind and then Sw (2 .. 3) = "A="))
then
Start := 4;
elsif Including_RTS
and then Sw'Length >= 7
and then Sw (2 .. 6) = "-RTS="
then
Start := 7;
else
return;
end if;
-- Because relative path arguments to --RTS= may be relative to
-- the search directory prefix, those relative path arguments
-- are converted only when they include directory information.
if not Is_Absolute_Path (Sw (Start .. Sw'Last)) then
if Parent'Length = 0 then
Do_Fail
("relative search path switches ("""
& Sw
& """) are not allowed");
elsif Including_RTS then
for J in Start .. Sw'Last loop
if Sw (J) = Directory_Separator then
Switch :=
new String'
(Sw (1 .. Start - 1)
& Parent
& Directory_Separator
& Sw (Start .. Sw'Last));
return;
end if;
end loop;
else
Switch :=
new String'
(Sw (1 .. Start - 1)
& Parent
& Directory_Separator
& Sw (Start .. Sw'Last));
end if;
end if;
elsif Including_Non_Switch then
if not Is_Absolute_Path (Sw) then
if Parent'Length = 0 then
Do_Fail
("relative paths (""" & Sw & """) are not allowed");
else
Switch := new String'(Parent & Directory_Separator & Sw);
end if;
end if;
end if;
end;
end if;
end Ensure_Absolute_Path;
----------------------------
-- Executable_Prefix_Path --
----------------------------
function Executable_Prefix_Path return String is
Exec_Name : constant String := Command_Name;
function Get_Install_Dir (S : String) return String;
-- S is the executable name preceded by the absolute or relative path,
-- e.g. "c:\usr\bin\gcc.exe". Returns the absolute directory where "bin"
-- lies (in the example "C:\usr"). If the executable is not in a "bin"
-- directory, return "".
---------------------
-- Get_Install_Dir --
---------------------
function Get_Install_Dir (S : String) return String is
Exec : String := S;
Path_Last : Integer := 0;
begin
for J in reverse Exec'Range loop
if Exec (J) = Directory_Separator then
Path_Last := J - 1;
exit;
end if;
end loop;
if Path_Last >= Exec'First + 2 then
To_Lower (Exec (Path_Last - 2 .. Path_Last));
end if;
if Path_Last < Exec'First + 2
or else Exec (Path_Last - 2 .. Path_Last) /= "bin"
or else (Path_Last - 3 >= Exec'First
and then Exec (Path_Last - 3) /= Directory_Separator)
then
return "";
end if;
return Normalize_Pathname
(Exec (Exec'First .. Path_Last - 4),
Resolve_Links => Opt.Follow_Links_For_Dirs)
& Directory_Separator;
end Get_Install_Dir;
-- Beginning of Executable_Prefix_Path
begin
-- First determine if a path prefix was placed in front of the
-- executable name.
for J in reverse Exec_Name'Range loop
if Exec_Name (J) = Directory_Separator then
return Get_Install_Dir (Exec_Name);
end if;
end loop;
-- If we get here, the user has typed the executable name with no
-- directory prefix.
declare
Path : String_Access := Locate_Exec_On_Path (Exec_Name);
begin
if Path = null then
return "";
else
declare
Dir : constant String := Get_Install_Dir (Path.all);
begin
Free (Path);
return Dir;
end;
end if;
end;
end Executable_Prefix_Path;
------------------
-- Fail_Program --
------------------
procedure Fail_Program
(S : String;
Flush_Messages : Boolean := True)
is
begin
if Flush_Messages and not No_Exit_Message then
if Total_Errors_Detected /= 0 or else Warnings_Detected /= 0 then
Errutil.Finalize;
end if;
end if;
Finish_Program (E_Fatal, S => S);
end Fail_Program;
--------------------
-- Finish_Program --
--------------------
procedure Finish_Program
(Exit_Code : Osint.Exit_Code_Type := Osint.E_Success;
S : String := "")
is
begin
if S'Length > 0 then
if Exit_Code /= E_Success then
if No_Exit_Message then
Osint.Exit_Program (E_Fatal);
else
Osint.Fail (S);
end if;
elsif not No_Exit_Message then
Write_Str (S);
end if;
end if;
-- Output Namet statistics
Namet.Finalize;
Exit_Program (Exit_Code);
end Finish_Program;
----------
-- Hash --
----------
function Hash is new GNAT.HTable.Hash (Header_Num => Header_Num);
-- Used in implementation of other functions Hash below
----------
-- Hash --
----------
function Hash (Name : File_Name_Type) return Header_Num is
begin
return Hash (Get_Name_String (Name));
end Hash;
function Hash (Name : Name_Id) return Header_Num is
begin
return Hash (Get_Name_String (Name));
end Hash;
function Hash (Name : Path_Name_Type) return Header_Num is
begin
return Hash (Get_Name_String (Name));
end Hash;
------------
-- Inform --
------------
procedure Inform (N : File_Name_Type; Msg : String) is
begin
Inform (Name_Id (N), Msg);
end Inform;
procedure Inform (N : Name_Id := No_Name; Msg : String) is
begin
Osint.Write_Program_Name;
Write_Str (": ");
if N /= No_Name then
Write_Str ("""");
declare
Name : constant String := Get_Name_String (N);
begin
if Debug.Debug_Flag_F and then Is_Absolute_Path (Name) then
Write_Str (File_Name (Name));
else
Write_Str (Name);
end if;
end;
Write_Str (""" ");
end if;
Write_Str (Msg);
Write_Eol;
end Inform;
-----------
-- Mains --
-----------
package body Mains is
package Names is new Table.Table
(Table_Component_Type => Main_Info,
Table_Index_Type => Integer,
Table_Low_Bound => 1,
Table_Initial => 10,
Table_Increment => 100,
Table_Name => "Makeutl.Mains.Names");
-- The table that stores the mains
Current : Natural := 0;
-- The index of the last main retrieved from the table
Count_Of_Mains_With_No_Tree : Natural := 0;
-- Number of main units for which we do not know the project tree
--------------
-- Add_Main --
--------------
procedure Add_Main (Name : String; Index : Int := 0) is
begin
Name_Len := 0;
Add_Str_To_Name_Buffer (Name);
Canonical_Case_File_Name (Name_Buffer (1 .. Name_Len));
Names.Increment_Last;
Names.Table (Names.Last) := (Name_Find, Index);
Mains.Count_Of_Mains_With_No_Tree :=
Mains.Count_Of_Mains_With_No_Tree + 1;
end Add_Main;
------------
-- Delete --
------------
procedure Delete is
begin
Names.Set_Last (0);
Mains.Reset;
end Delete;
---------------
-- Next_Main --
---------------
function Next_Main return String is
Info : constant Main_Info := Next_Main;
begin
if Info = No_Main_Info then
return "";
else
return Get_Name_String (Info.File);
end if;
end Next_Main;
function Next_Main return Main_Info is
begin
if Current >= Names.Last then
return No_Main_Info;
else
Current := Current + 1;
declare
Orig_Main : constant File_Name_Type :=
Names.Table (Current).File;
Current_Main : File_Name_Type;
begin
if Strip_Suffix (Orig_Main) = Orig_Main then
Get_Name_String (Orig_Main);
Add_Str_To_Name_Buffer (".adb");
Current_Main := Name_Find;
if Full_Source_Name (Current_Main) = No_File then
Get_Name_String (Orig_Main);
Add_Str_To_Name_Buffer (".ads");
Current_Main := Name_Find;
if Full_Source_Name (Current_Main) /= No_File then
Names.Table (Current).File := Current_Main;
end if;
else
Names.Table (Current).File := Current_Main;
end if;
end if;
end;
return Names.Table (Current);
end if;
end Next_Main;
---------------------
-- Number_Of_Mains --
---------------------
function Number_Of_Mains return Natural is
begin
return Names.Last;
end Number_Of_Mains;
-----------
-- Reset --
-----------
procedure Reset is
begin
Current := 0;
end Reset;
--------------------------
-- Set_Multi_Unit_Index --
--------------------------
procedure Set_Multi_Unit_Index
(Index : Int := 0)
is
begin
if Index /= 0 then
if Names.Last = 0 then
Fail_Program
("cannot specify a multi-unit index but no main "
& "on the command line");
elsif Names.Last > 1 then
Fail_Program
("cannot specify several mains with a multi-unit index");
else
Names.Table (Names.Last).Index := Index;
end if;
end if;
end Set_Multi_Unit_Index;
end Mains;
-----------------------
-- Path_Or_File_Name --
-----------------------
function Path_Or_File_Name (Path : Path_Name_Type) return String is
Path_Name : constant String := Get_Name_String (Path);
begin
if Debug.Debug_Flag_F then
return File_Name (Path_Name);
else
return Path_Name;
end if;
end Path_Or_File_Name;
-------------------
-- Unit_Index_Of --
-------------------
function Unit_Index_Of (ALI_File : File_Name_Type) return Int is
Start : Natural;
Finish : Natural;
Result : Int := 0;
begin
Get_Name_String (ALI_File);
-- First, find the last dot
Finish := Name_Len;
while Finish >= 1 and then Name_Buffer (Finish) /= '.' loop
Finish := Finish - 1;
end loop;
if Finish = 1 then
return 0;
end if;
-- Now check that the dot is preceded by digits
Start := Finish;
Finish := Finish - 1;
while Start >= 1 and then Name_Buffer (Start - 1) in '0' .. '9' loop
Start := Start - 1;
end loop;
-- If there are no digits, or if the digits are not preceded by the
-- character that precedes a unit index, this is not the ALI file of
-- a unit in a multi-unit source.
if Start > Finish
or else Start = 1
or else Name_Buffer (Start - 1) /= Multi_Unit_Index_Character
then
return 0;
end if;
-- Build the index from the digit(s)
while Start <= Finish loop
Result := Result * 10 +
Character'Pos (Name_Buffer (Start)) - Character'Pos ('0');
Start := Start + 1;
end loop;
return Result;
end Unit_Index_Of;
-----------------
-- Verbose_Msg --
-----------------
procedure Verbose_Msg
(N1 : Name_Id;
S1 : String;
N2 : Name_Id := No_Name;
S2 : String := "";
Prefix : String := " -> ";
Minimum_Verbosity : Opt.Verbosity_Level_Type := Opt.Low)
is
begin
if not Opt.Verbose_Mode
or else Minimum_Verbosity > Opt.Verbosity_Level
then
return;
end if;
Write_Str (Prefix);
Write_Str ("""");
Write_Name (N1);
Write_Str (""" ");
Write_Str (S1);
if N2 /= No_Name then
Write_Str (" """);
Write_Name (N2);
Write_Str (""" ");
end if;
Write_Str (S2);
Write_Eol;
end Verbose_Msg;
procedure Verbose_Msg
(N1 : File_Name_Type;
S1 : String;
N2 : File_Name_Type := No_File;
S2 : String := "";
Prefix : String := " -> ";
Minimum_Verbosity : Opt.Verbosity_Level_Type := Opt.Low)
is
begin
Verbose_Msg
(Name_Id (N1), S1, Name_Id (N2), S2, Prefix, Minimum_Verbosity);
end Verbose_Msg;
-----------
-- Queue --
-----------
package body Queue is
type Q_Record is record
Info : Source_Info;
Processed : Boolean;
end record;
package Q is new Table.Table
(Table_Component_Type => Q_Record,
Table_Index_Type => Natural,
Table_Low_Bound => 1,
Table_Initial => 1000,
Table_Increment => 100,
Table_Name => "Makeutl.Queue.Q");
-- This is the actual Queue
type Mark_Key is record
File : File_Name_Type;
Index : Int;
end record;
-- Identify either a mono-unit source (when Index = 0) or a specific
-- unit (index = 1's origin index of unit) in a multi-unit source.
Max_Mask_Num : constant := 2048;
subtype Mark_Num is Union_Id range 0 .. Max_Mask_Num - 1;
function Hash (Key : Mark_Key) return Mark_Num;
package Marks is new GNAT.HTable.Simple_HTable
(Header_Num => Mark_Num,
Element => Boolean,
No_Element => False,
Key => Mark_Key,
Hash => Hash,
Equal => "=");
-- A hash table to keep tracks of the marked units.
-- These are the units that have already been processed, when using the
-- gnatmake format. When using the gprbuild format, we can directly
-- store in the source_id whether the file has already been processed.
procedure Mark (Source_File : File_Name_Type; Index : Int := 0);
-- Mark a unit, identified by its source file and, when Index is not 0,
-- the index of the unit in the source file. Marking is used to signal
-- that the unit has already been inserted in the Q.
function Is_Marked
(Source_File : File_Name_Type;
Index : Int := 0) return Boolean;
-- Returns True if the unit was previously marked
Q_Processed : Natural := 0;
Q_Initialized : Boolean := False;
Q_First : Natural := 1;
-- Points to the first valid element in the queue
procedure Debug_Display (S : Source_Info);
-- A debug display for S
function Was_Processed (S : Source_Info) return Boolean;
-- Whether S has already been processed. This marks the source as
-- processed, if it hasn't already been processed.
-------------------
-- Was_Processed --
-------------------
function Was_Processed (S : Source_Info) return Boolean is
begin
if Is_Marked (S.File, S.Index) then
return True;
end if;
Mark (S.File, Index => S.Index);
return False;
end Was_Processed;
-------------------
-- Debug_Display --
-------------------
procedure Debug_Display (S : Source_Info) is
begin
Write_Name (S.File);
if S.Index /= 0 then
Write_Str (", ");
Write_Int (S.Index);
end if;
end Debug_Display;
----------
-- Hash --
----------
function Hash (Key : Mark_Key) return Mark_Num is
begin
return Union_Id (Key.File) mod Max_Mask_Num;
end Hash;
---------------
-- Is_Marked --
---------------
function Is_Marked
(Source_File : File_Name_Type;
Index : Int := 0) return Boolean
is
begin
return Marks.Get (K => (File => Source_File, Index => Index));
end Is_Marked;
----------
-- Mark --
----------
procedure Mark (Source_File : File_Name_Type; Index : Int := 0) is
begin
Marks.Set (K => (File => Source_File, Index => Index), E => True);
end Mark;
-------------
-- Extract --
-------------
procedure Extract
(Found : out Boolean;
Source : out Source_Info)
is
begin
Found := False;
if Q_First <= Q.Last then
Source := Q.Table (Q_First).Info;
Q.Table (Q_First).Processed := True;
Q_First := Q_First + 1;
Found := True;
end if;
if Found then
Q_Processed := Q_Processed + 1;
end if;
if Found and then Debug.Debug_Flag_Q then
Write_Str (" Q := Q - [ ");
Debug_Display (Source);
Write_Str (" ]");
Write_Eol;
Write_Str (" Q_First =");
Write_Int (Int (Q_First));
Write_Eol;
Write_Str (" Q.Last =");
Write_Int (Int (Q.Last));
Write_Eol;
end if;
end Extract;
---------------
-- Processed --
---------------
function Processed return Natural is
begin
return Q_Processed;
end Processed;
----------------
-- Initialize --
----------------
procedure Initialize (Force : Boolean := False) is
begin
if Force or else not Q_Initialized then
Q_Initialized := True;
Q.Init;
Q_Processed := 0;
Q_First := 1;
end if;
end Initialize;
------------
-- Insert --
------------
function Insert (Source : Source_Info) return Boolean is
begin
-- Only insert in the Q if it is not already done, to avoid
-- simultaneous compilations if -jnnn is used.
if Was_Processed (Source) then
return False;
end if;
Q.Append (New_Val => (Info => Source, Processed => False));
if Debug.Debug_Flag_Q then
Write_Str (" Q := Q + [ ");
Debug_Display (Source);
Write_Str (" ] ");
Write_Eol;
Write_Str (" Q_First =");
Write_Int (Int (Q_First));
Write_Eol;
Write_Str (" Q.Last =");
Write_Int (Int (Q.Last));
Write_Eol;
end if;
return True;
end Insert;
procedure Insert (Source : Source_Info) is
Discard : Boolean;
begin
Discard := Insert (Source);
end Insert;
--------------
-- Is_Empty --
--------------
function Is_Empty return Boolean is
begin
return Q_Processed >= Q.Last;
end Is_Empty;
----------
-- Size --
----------
function Size return Natural is
begin
return Q.Last;
end Size;
-------------
-- Element --
-------------
function Element (Rank : Positive) return File_Name_Type is
begin
if Rank <= Q.Last then
return Q.Table (Rank).Info.File;
else
return No_File;
end if;
end Element;
------------------
-- Remove_Marks --
------------------
procedure Remove_Marks is
begin
Marks.Reset;
end Remove_Marks;
end Queue;
end Make_Util;
|
asm_patches/main.asm | robertkirkman/WW_Hacking_API | 0 | 177574 |
; Put your custom ASM code for your hack into this file.
; You can also .include other ASM files into this one. For example:
;.include "includes/skip_intro.asm"
;.include "includes/bgm_file.asm"
;.include "includes/kirbymimi_v0.1_ntsc_coltzero_medli.asm"
;.include "includes/kirbymimi_v0.5.2_ntsc_coltzero.asm"
;.include "includes/kirbymimi_v1.0.1_ntsc_coltzero_magi_expanded_memory.asm"
.include "includes/kirbymimi_v1.0.1_ntsc_coltzero_magi_default_memory.asm"
|
src/linux/trendy_terminal-linux.ads | pyjarrett/archaic_terminal | 3 | 2833 | <filename>src/linux/trendy_terminal-linux.ads<gh_stars>1-10
-------------------------------------------------------------------------------
-- Copyright 2021, The Trendy Terminal Developers (see AUTHORS file)
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-------------------------------------------------------------------------------
with Interfaces.C.Strings;
with System;
package Trendy_Terminal.Linux is
---------------------------------------------------------------------------
-- Interfacing with C
---------------------------------------------------------------------------
-- Crash course in how this works.
-- https://en.wikibooks.org/wiki/Ada_Programming/Types/access#Access_vs._System.Address
type BOOL is new Interfaces.C.int;
type FD is new Interfaces.C.int;
type FILE_Ptr is new System.Address;
function fileno (Stream : FILE_Ptr) return FD with
Import => True,
Convention => C;
function isatty (File_Descriptor : FD) return BOOL with
Import => True,
Convention => C;
stdin : aliased FILE_Ptr;
stdout : aliased FILE_Ptr;
stderr : aliased FILE_Ptr;
pragma Import (C, stdin, "stdin");
pragma Import (C, stdout, "stdout");
pragma Import (C, stderr, "stderr");
NCCS : constant := 32;
type tcflag_t is new Interfaces.C.unsigned;
type cc_t is new Interfaces.C.unsigned_char;
type speed_t is new Interfaces.C.unsigned;
type cc_array is array (Natural range 0 .. NCCS - 1) of cc_t;
--!pp off
type c_lflag_t is (ISIG,
ICANON,
XCASE,
ECHO,
ECHOE,
ECHOK,
ECHONL,
NOFLSH,
TOSTOP,
ECHOCTL,
ECHOPRT,
ECHOKE,
FLUSHO,
PENDIN);
for c_lflag_t use
(ISIG => 16#0000001#,
ICANON => 16#0000002#,
XCASE => 16#0000004#,
ECHO => 16#0000010#,
ECHOE => 16#0000020#,
ECHOK => 16#0000040#,
ECHONL => 16#0000100#,
NOFLSH => 16#0000200#,
TOSTOP => 16#0000400#,
ECHOCTL => 16#0001000#,
ECHOPRT => 16#0002000#,
ECHOKE => 16#0004000#,
FLUSHO => 16#0010000#,
PENDIN => 16#0040000#
);
--!pp on
pragma Warnings (Off, "bits of *unused");
type Local_Flags is array (c_lflag_t) of Boolean with
Pack,
Size => 32;
pragma Warnings (On, "bits of *unused");
type Termios is record
c_iflag : tcflag_t;
c_oflag : tcflag_t;
c_cflag : tcflag_t;
c_lflag : Local_Flags;
c_line : cc_t;
c_cc : cc_array;
c_ispeed : speed_t;
c_ospeed : speed_t;
end record with
Convention => C;
function tcgetattr (File_Descriptor : FD; Terminal : System.Address) return BOOL with
Import => True,
Convention => C;
type Application_Time is
(TCSANOW, -- immediate effect
TCSADRAIN, -- after all output written
TCSAFLUSH -- like drain, except input received as well
);
for Application_Time use (TCSANOW => 0, TCSADRAIN => 1, TCSAFLUSH => 2);
function tcsetattr
(File_Descriptor : FD; Effect_Time : Application_Time; Terminal : System.Address) return BOOL with
Import => True,
Convention => C;
end Trendy_Terminal.Linux;
|
regtests/css-parser-tests.adb | stcarrez/ada-css | 3 | 14818 | -----------------------------------------------------------------------
-- css-parser-tests -- Unit tests for CSS parser
-- Copyright (C) 2017 <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.Text_IO;
with Ada.Directories;
with Util.Measures;
with CSS.Core.Sheets;
with CSS.Core.Errors.Default;
package body CSS.Parser.Tests is
use Ada.Strings.Unbounded;
-- ------------------------------
-- Test case name
-- ------------------------------
overriding
function Name (T : in Test) return Util.Tests.Message_String is
begin
return Util.Tests.Format ("Test CSS parser " & To_String (T.Name));
end Name;
-- ------------------------------
-- Perform the test.
-- ------------------------------
overriding
procedure Run_Test (T : in out Test) is
Name : constant String := Ada.Strings.Unbounded.To_String (T.Name);
Path : constant String := Ada.Strings.Unbounded.To_String (T.File);
Doc : aliased CSS.Core.Sheets.CSSStylesheet;
Errors : aliased CSS.Core.Errors.Default.Error_Handler;
begin
Doc.Set_Href (Name);
Ada.Text_IO.Create (Errors.File, Ada.Text_IO.Out_File, To_String (T.Result));
declare
Time : Util.Measures.Stamp;
begin
CSS.Parser.Load (Path, Doc'Unchecked_Access, Errors'Unchecked_Access);
Util.Measures.Report (Time, "CSS parse " & Name);
end;
Ada.Text_IO.Close (Errors.File);
if T.Has_Error then
T.Assert (Errors.Error_Count > 0, "No error reported for '" & Name & "'");
else
Util.Tests.Assert_Equals (T, 0, Errors.Error_Count,
"Errors reported for '" & Name & "'");
Ada.Directories.Delete_File (To_String (T.Result));
end if;
exception
when others =>
if Ada.Text_IO.Is_Open (Errors.File) then
Ada.Text_IO.Close (Errors.File);
end if;
raise;
end Run_Test;
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
use Ada.Directories;
procedure Add_Parser_Tests (Dir : in String;
Has_Error : in Boolean);
function Create_Test (Name : in String;
Path : in String) return Test_Case_Access;
Expect_Dir : constant String := "regtests/expect/";
Expect_Path : constant String := Util.Tests.Get_Path (Expect_Dir);
Result_Path : constant String := Util.Tests.Get_Test_Path ("");
Search : Search_Type;
Filter : constant Filter_Type := (others => True);
Ent : Directory_Entry_Type;
function Create_Test (Name : in String;
Path : in String) return Test_Case_Access is
Tst : Test_Case_Access;
begin
Tst := new Test;
Tst.Name := To_Unbounded_String (Name);
Tst.File := To_Unbounded_String (Path);
Tst.Expect := To_Unbounded_String (Expect_Path & Name);
Tst.Result := To_Unbounded_String (Result_Path & Name);
return Tst;
end Create_Test;
procedure Add_Parser_Tests (Dir : in String;
Has_Error : in Boolean) is
Path : constant String := Util.Tests.Get_Path (Dir);
begin
if Kind (Path) /= Directory then
Ada.Text_IO.Put_Line ("Cannot read test directory: " & Path);
end if;
Start_Search (Search, Directory => Path, Pattern => "*.css", Filter => Filter);
while More_Entries (Search) loop
Get_Next_Entry (Search, Ent);
declare
Simple : constant String := Simple_Name (Ent);
Name : constant String := Base_Name (Simple);
Tst : Test_Case_Access;
begin
if Simple /= "." and then Simple /= ".."
and then Simple /= ".svn" and then Simple (Simple'Last) /= '~'
then
Tst := Create_Test (Name, Path & "/" & Simple);
if Tst /= null then
Tst.Has_Error := Has_Error;
Suite.Add_Test (Tst.all'Access);
end if;
end if;
end;
end loop;
end Add_Parser_Tests;
begin
Add_Parser_Tests ("regtests/files/parser", False);
Add_Parser_Tests ("regtests/files/errors", True);
end Add_Tests;
end CSS.Parser.Tests;
|
unused/develop/obj/spritesheet_13_tiles.asm | pau-tomas/gbvm | 33 | 84885 | <filename>unused/develop/obj/spritesheet_13_tiles.asm
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.1.4 #12246 (Mac OS X x86_64)
;--------------------------------------------------------
.module spritesheet_13_tiles
.optsdcc -mgbz80
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _spritesheet_13_tiles
.globl ___bank_spritesheet_13_tiles
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _DATA
;--------------------------------------------------------
; ram data
;--------------------------------------------------------
.area _INITIALIZED
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area _DABS (ABS)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area _HOME
.area _GSINIT
.area _GSFINAL
.area _GSINIT
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area _HOME
.area _HOME
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area _CODE_255
.area _CODE_255
___bank_spritesheet_13_tiles = 0x00ff
_spritesheet_13_tiles:
.dw #0x0008
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x1f ; 31
.db #0x1f ; 31
.db #0x1f ; 31
.db #0x10 ; 16
.db #0x1f ; 31
.db #0x10 ; 16
.db #0x1f ; 31
.db #0x10 ; 16
.db #0x1c ; 28
.db #0x13 ; 19
.db #0x1a ; 26
.db #0x17 ; 23
.db #0x15 ; 21
.db #0x1d ; 29
.db #0x08 ; 8
.db #0x08 ; 8
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0xc0 ; 192
.db #0xc0 ; 192
.db #0xa0 ; 160
.db #0x60 ; 96
.db #0x40 ; 64
.db #0xc0 ; 192
.db #0x80 ; 128
.db #0x80 ; 128
.db #0xc0 ; 192
.db #0x40 ; 64
.db #0x60 ; 96
.db #0xa0 ; 160
.db #0x30 ; 48 '0'
.db #0xd0 ; 208
.db #0x90 ; 144
.db #0xf0 ; 240
.db #0x60 ; 96
.db #0x60 ; 96
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x10 ; 16
.db #0x10 ; 16
.db #0x38 ; 56 '8'
.db #0x28 ; 40
.db #0x38 ; 56 '8'
.db #0x28 ; 40
.db #0x38 ; 56 '8'
.db #0x28 ; 40
.db #0x3f ; 63
.db #0x2f ; 47
.db #0x7f ; 127
.db #0x6a ; 106 'j'
.db #0xf5 ; 245
.db #0xaa ; 170
.db #0xde ; 222
.db #0xa1 ; 161
.db #0x6a ; 106 'j'
.db #0x55 ; 85 'U'
.db #0x5d ; 93
.db #0x63 ; 99 'c'
.db #0x21 ; 33
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x3f ; 63
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x80 ; 128
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.db #0x00 ; 0
.area _INITIALIZER
.area _CABS (ABS)
|
baekjoon/1000/source.asm | qilip/ACMStudy | 4 | 165098 | section .data
input: db "%d %d", 0
output: db "%d", 10, 0
a: times 4 db 0
b: times 4 db 0
section .text
global main
extern scanf
extern printf
main:
;입력
push ebx
push ecx
push b
push a
push input
call scanf
add esp, 12
;덧셈
mov ebx, DWORD[a]
mov ecx, DWORD[b]
add ebx, ecx
;출력
push ebx
push output
call printf
;종료
add esp, 8
pop ecx
pop ebx
mov eax, 0
ret
;별로 마음에는 안들지만 아직 퓨어 ASM은 모르겠다.
;고치고 보니 예제 복붙이네 ㅁㄴㅇㄹ
|
examples/outdated-and-incorrect/cbs/Hear.agda | asr/agda-kanso | 1 | 9112 | <reponame>asr/agda-kanso
open import Proc
module Hear (param : Param) where
open import Basics
private open module P = Process param
open Tran
hear : {a : U}{p : Proc a} -> Guard p -> LT a -> Proc a
hear {p = p} g bot = p
hear og (lift v) = o
hear (w !g p) (lift v) = w ! p
hear (>g f) (lift v) = f v
hear (_ ! _ +g f) (lift v) = f v
hear (g1 ||g g2) (lift v) = hear g1 (lift v) || hear g2 (lift v)
hear (φ /|g g) (lift v) = φ /| hear g (downV φ v)
hear (defg x g) (lift v) = hear g (lift v)
sound : {a : U}{p : Proc a}(g : Guard p){w : LT a} ->
p -[ w ]-> hear g w
sound g {bot} = qtau
sound og {lift v} = rx-o
sound (>g _) {lift v} = rx->
sound (w !g p) {lift v} = rx-!
sound (w ! p +g f) {lift v} = rx-+
sound (g1 ||g g2) {lift v} = rx-|| (sound g1) (sound g2)
sound (φ /|g g) {lift v} = rx-/| (sound g)
sound (defg x g) {lift v} = rx-def (sound g)
uniq : {a : U}{p : Proc a}{w : LT a}{px py : Proc a} ->
p -[ w ]-> px -> p -[ w ]-> py -> px == py
uniq qtau qtau = refl
uniq rx-o rx-o = refl
uniq rx-> rx-> = refl
uniq rx-! rx-! = refl
uniq rx-+ rx-+ = refl
uniq (rx-|| l1 r1) (rx-|| l2 r2) with uniq l1 l2 | uniq r1 r2
... | refl | refl = refl
uniq (rx-/| r1) (rx-/| r2) with uniq r1 r2
... | refl = refl
uniq (rx-def r1) (rx-def r2) with uniq r1 r2
... | refl = refl
complete : {a : U}{p : Proc a}(g : Guard p){w : LT a}{p' : Proc a} ->
p -[ w ]-> p' -> p' == hear g w
complete g r = uniq r (sound g)
|
oeis/232/A232982.asm | neoneye/loda-programs | 11 | 17532 | <reponame>neoneye/loda-programs
; A232982: The Gauss factorial n_6!.
; Submitted by <NAME>(s3)
; 1,1,1,1,1,5,5,35,35,35,35,385,385,5005,5005,5005,5005,85085,85085,1616615,1616615,1616615,1616615,37182145,37182145,929553625,929553625,929553625,929553625,26957055125,26957055125,835668708875,835668708875,835668708875,835668708875,29248404810625,29248404810625
add $0,1
mov $1,1
lpb $0
mov $3,$2
gcd $3,$0
pow $3,$0
sub $0,1
add $1,$4
mov $2,6
mov $4,$0
div $4,$3
mov $3,$4
mul $3,$1
add $1,$3
lpe
mov $0,$1
div $0,2
add $0,1
|
SUBTRACTION.asm | apsrcreatix/8086 | 40 | 92705 | ASSUME CS: CODE DS: DATA
CODE SEGMENT
START:
MOV AX,8H
MOV BX,5H
SUB AX,BX
ENDS
ENDS START |
source/directories/machine-w64-mingw32/a-hifina.ads | ytomino/drake | 33 | 13227 | <filename>source/directories/machine-w64-mingw32/a-hifina.ads
pragma License (Unrestricted);
-- extended unit specialized for Windows
with Ada.IO_Exceptions;
package Ada.Hierarchical_File_Names is
-- "Pure" and detailed version of Ada.Directories.Hierarchical_File_Names.
-- This package is system-specific.
pragma Pure;
-- path delimiter
subtype Path_Delimiter_Type is Character;
-- with Static_Predicate => Path_Delimiter in '/' | '\';
Default_Path_Delimiter : constant Character := '\';
function Is_Path_Delimiter (Item : Character) return Boolean;
pragma Inline (Is_Path_Delimiter);
procedure Include_Trailing_Path_Delimiter (
S : in out String;
Last : in out Natural;
Path_Delimiter : Path_Delimiter_Type := Default_Path_Delimiter);
procedure Exclude_Trailing_Path_Delimiter (
S : String;
Last : in out Natural);
-- operations in Ada.Directories
function Simple_Name (Name : String) return String;
-- extended
-- This function returns null string instead of Name_Error,
-- if Name has no simple name part.
function Unchecked_Simple_Name (Name : String) return String;
function Containing_Directory (Name : String) return String;
-- extended
-- This function returns null string instead of Use_Error,
-- if Name has no directory part.
function Unchecked_Containing_Directory (Name : String) return String;
function Extension (Name : String) return String;
function Base_Name (Name : String) return String;
-- extended
-- There are procedure version.
procedure Simple_Name (
Name : String;
First : out Positive;
Last : out Natural);
procedure Containing_Directory (
Name : String;
First : out Positive;
Last : out Natural);
procedure Extension (
Name : String;
First : out Positive;
Last : out Natural);
procedure Base_Name (
Name : String;
First : out Positive;
Last : out Natural);
-- operations in Ada.Directories.Hierarchical_File_Names
function Is_Simple_Name (Name : String) return Boolean;
function Is_Root_Directory_Name (Name : String) return Boolean;
function Is_Parent_Directory_Name (Name : String) return Boolean;
function Is_Current_Directory_Name (Name : String) return Boolean;
function Is_Full_Name (Name : String) return Boolean;
function Is_Relative_Name (Name : String) return Boolean;
-- function Simple_Name (Name : String) return String
-- renames Directories.Simple_Name;
-- function Containing_Directory (Name : String) return String
-- renames Directories.Containing_Directory;
function Initial_Directory (Name : String) return String;
function Relative_Name (Name : String) return String;
-- extended
-- This function returns null string instead of Name_Error,
-- if Name has no directory part.
function Unchecked_Relative_Name (Name : String) return String;
-- extended
-- There are procedure version.
procedure Initial_Directory (
Name : String;
First : out Positive;
Last : out Natural);
procedure Relative_Name (
Name : String;
First : out Positive;
Last : out Natural);
function Compose (
Directory : String := "";
Relative_Name : String;
Extension : String := "";
Path_Delimiter : Path_Delimiter_Type := Default_Path_Delimiter)
return String;
-- extended
-- This function folds current/parent directory names.
-- For example: Normalized_Compose ("A/B", "../C") = "A/C".
function Normalized_Compose (
Directory : String := "";
Relative_Name : String;
Extension : String := "";
Path_Delimiter : Path_Delimiter_Type := Default_Path_Delimiter)
return String;
-- extended
-- This function returns the relative name from the base directory.
-- For example: Relative_Name ("A", "B") = "../A",
-- Relative_Name (Name, Initial_Directory (Name)) = Relative_Name (Name)
function Relative_Name (
Name : String;
From : String;
Path_Delimiter : Path_Delimiter_Type := Default_Path_Delimiter)
return String;
-- extended
-- There is a procedure version. It also propagates Use_Error.
procedure Relative_Name (
Name : String;
First : out Positive;
Last : out Natural;
From : String;
Parent_Count : out Natural);
-- extended
-- This is a "folded" version of Containing_Directory if Directory /= "".
-- Otherwise, it returns ".." as the parent directory name.
-- For example: Parent_Directory ("A/B/.") = "A"
-- Parent_Directory ("A/B/C/..") = "A"
-- Parent_Directory (Name) = Normalized_Compose (Name, "..")
function Parent_Directory (
Directory : String;
Path_Delimiter : Path_Delimiter_Type := Default_Path_Delimiter)
return String;
-- extended
-- There is a procedure version.
procedure Parent_Directory (
Directory : String;
First : out Positive;
Last : out Natural;
Parent_Count : out Natural);
-- exceptions
Name_Error : exception
renames IO_Exceptions.Name_Error;
Use_Error : exception
renames IO_Exceptions.Use_Error;
end Ada.Hierarchical_File_Names;
|
tools/l20n-grammar/L20nLexer.g4 | jarenrowan/argos-sdk | 4 | 1752 | lexer grammar L20nLexer;
Comment
: '/*' .*? '*/'
;
Open
: '<' -> pushMode(Inside)
;
Ws
: ('\r' | '\n' | '\t') -> skip
;
mode Inside;
Identifier
: [a-zA-Z0-9_]+
;
Colon
: ':'
;
MultiString
: '"""' .*? '"""'
;
String
: '"' ('\\"' | ~["])* '"'
;
Space
: [ \t\n\r]+ -> skip
;
Close
: '>' -> popMode
;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_21829_2849.asm | ljhsiun2/medusa | 9 | 80244 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r15
push %r8
push %rbx
push %rdi
lea addresses_UC_ht+0x17a69, %r12
nop
nop
nop
nop
nop
sub %r10, %r10
movb $0x61, (%r12)
nop
nop
add %r11, %r11
lea addresses_WT_ht+0x169a9, %r15
nop
nop
xor $54278, %rbx
mov (%r15), %r8w
nop
nop
nop
nop
nop
xor $33663, %rdi
lea addresses_UC_ht+0x1498b, %r15
clflush (%r15)
nop
xor $16622, %r11
movb (%r15), %r8b
nop
nop
nop
nop
cmp $13193, %r15
pop %rdi
pop %rbx
pop %r8
pop %r15
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %r9
push %rdx
push %rsi
// Store
lea addresses_WC+0xede9, %r14
xor $22561, %r11
movb $0x51, (%r14)
sub $62312, %rdx
// Load
lea addresses_US+0x1c589, %r14
nop
nop
nop
xor %rsi, %rsi
mov (%r14), %r13w
dec %rdx
// Faulty Load
lea addresses_US+0x9da9, %rsi
nop
nop
nop
nop
nop
dec %r12
mov (%rsi), %edx
lea oracles, %r13
and $0xff, %rdx
shlq $12, %rdx
mov (%r13,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %r9
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cb/cb2004a.ada | best08618/asylo | 7 | 11322 | -- CB2004A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT A PREDEFINED OR A PROGRAMMER DEFINED EXCEPTION
-- RAISED SEVERAL LEVELS INSIDE A HIERARCHY OF NESTED BLOCKS
-- CAN BE SUCCESSFULLY HANDLED IN AN OUTER BLOCK.
-- *** NOTE: This test has been modified since ACVC version 1.11 to -- 9X
-- *** remove incompatibilities associated with the transition -- 9X
-- *** to Ada 9X. -- 9X
-- *** -- 9X
-- DCB 5/12/80
-- JRK 11/17/80
-- SPS 11/2/82
-- MRM 03/30/93 REMOVED NUMERIC_ERROR FOR 9X COMPATIBILITY
WITH REPORT;
PROCEDURE CB2004A IS
USE REPORT;
FLOW_COUNT : INTEGER := 0;
E1, E2, E3 : EXCEPTION;
BEGIN
TEST("CB2004A","CHECK THAT EXCEPTIONS RAISED INSIDE NESTED " &
"BLOCKS CAN BE HANDLED IN OUTER BLOCKS");
BEGIN
-- PROGRAMMER-DEFINED EXCEPTION, SINGLE EXCEPTON_CHOICE.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E1;
FAILED("PROGRAMMER-DEFINED EXCEPTION " &
"NOT RAISED #1");
EXCEPTION
WHEN E2 | E3 =>
FAILED("WRONG PROGRAMMER-" &
"DEFINED EXCEPTION HANDLED #1");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR |
PROGRAM_ERROR | STORAGE_ERROR |
TASKING_ERROR | E2 | E3 =>
FAILED("WRONG " &
"EXCEPTION HANDLED #1");
END;
EXCEPTION
WHEN E1 =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
-- PROGRAMMER-DEFINED EXCEPTION, MULTIPLE EXCEPTION_CHOICES.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E2;
FAILED("PROGRAMMER-DEFINED EXCEPTION " &
"NOT RAISED #2");
EXCEPTION
WHEN E1 | E3 =>
FAILED("WRONG PROGRAMMER-" &
"DEFINED EXCEPTION HANDLED #2");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR |
PROGRAM_ERROR | STORAGE_ERROR |
TASKING_ERROR | E1 | E3 =>
FAILED("WRONG " &
"EXCEPTION HANDLED #2");
END;
EXCEPTION
WHEN E3 =>
FAILED("WRONG EXCEPTION HANDLED #2A");
WHEN E1 | E2 | CONSTRAINT_ERROR =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
-- PROGRAMMER-DEFINED EXCEPTION, 'OTHERS' CHOICE.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE E1;
FAILED("PROGRAMMER-DEFINED EXCEPTION " &
"NOT RAISED #3");
EXCEPTION
WHEN E2 | E3 =>
FAILED("WRONG PROGRAMMER-" &
"DEFINED EXCEPTION HANDLED #3");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR |
PROGRAM_ERROR | STORAGE_ERROR |
TASKING_ERROR | E2 | E3 =>
FAILED("WRONG " &
"EXCEPTION HANDLED #3");
END;
EXCEPTION
WHEN E2 | CONSTRAINT_ERROR =>
FAILED("WRONG EXCEPTION HANDLED #3A");
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
-- PREDEFINED EXCEPTION, SINGLE EXCEPTION_CHOICE.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE CONSTRAINT_ERROR;
FAILED("PREDEFINED EXCEPTION NOT RAISED #4");
EXCEPTION
WHEN E1 | E2 | E3 =>
FAILED("WRONG " &
"EXCEPTION HANDLED #4");
END;
EXCEPTION
WHEN PROGRAM_ERROR | STORAGE_ERROR |
TASKING_ERROR =>
FAILED("WRONG PREDEFINED " &
"EXCEPTION HANDLED #4");
END;
EXCEPTION
WHEN CONSTRAINT_ERROR =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
-- PREDEFINED EXCEPTION, MULTIPLE EXCEPTION_CHOICES.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE CONSTRAINT_ERROR;
FAILED("PREDEFINED EXCEPTION NOT RAISED #5");
EXCEPTION
WHEN E1 | E2 | E3 =>
FAILED("WRONG " &
"EXCEPTION HANDLED #5");
END;
EXCEPTION
WHEN PROGRAM_ERROR |
STORAGE_ERROR | TASKING_ERROR =>
FAILED("WRONG PREDEFINED " &
"EXCEPTION HANDLED #5");
END;
EXCEPTION
WHEN E1 | E2 =>
FAILED("WRONG EXCEPTION HANDLED #5A");
WHEN CONSTRAINT_ERROR | E3 =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
-- PREDEFINED EXCEPTION, 'OTHERS' CHOICE.
BEGIN
BEGIN
BEGIN
FLOW_COUNT := FLOW_COUNT + 1;
RAISE CONSTRAINT_ERROR;
FAILED("PREDEFINED EXCEPTION NOT RAISED #6");
EXCEPTION
WHEN E1 | E2 | E3 =>
FAILED("WRONG " &
" EXCEPTION HANDLED #6");
END;
EXCEPTION
WHEN PROGRAM_ERROR | STORAGE_ERROR |
TASKING_ERROR =>
FAILED("WRONG PREDEFINED " &
"EXCEPTION HANDLED #6");
END;
EXCEPTION
WHEN E1 =>
FAILED("WRONG EXCEPTION HANDLED #6A");
WHEN OTHERS =>
FLOW_COUNT := FLOW_COUNT + 1;
END;
EXCEPTION
WHEN E1 | E2 | E3 =>
FAILED("PROGRAMMER-DEFINED EXCEPTION HANDLED IN" &
"WRONG SCOPE");
WHEN CONSTRAINT_ERROR =>
FAILED("CONSTRAINT_ERROR HANDLED IN WRONG SCOPE");
WHEN OTHERS =>
FAILED("OTHER EXCEPTIONS HANDLED IN WRONG SCOPE");
END;
IF FLOW_COUNT /= 12 THEN
FAILED("INCORRECT FLOW_COUNT VALUE");
END IF;
RESULT;
END CB2004A;
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1122.asm | ljhsiun2/medusa | 9 | 241153 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0xb3b1, %r15
nop
inc %r9
mov $0x6162636465666768, %r13
movq %r13, %xmm7
movups %xmm7, (%r15)
and %r11, %r11
lea addresses_normal_ht+0x1644f, %r9
nop
nop
sub $41372, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
and $0xffffffffffffffc0, %r9
vmovntdq %ymm2, (%r9)
sub %r11, %r11
lea addresses_A_ht+0x13cd9, %r9
nop
nop
nop
nop
cmp %rsi, %rsi
movl $0x61626364, (%r9)
nop
nop
nop
nop
nop
add %r13, %r13
lea addresses_WC_ht+0xa719, %rcx
nop
nop
nop
nop
nop
add $24060, %r11
movw $0x6162, (%rcx)
nop
nop
nop
nop
add $7374, %r9
lea addresses_WT_ht+0x17d01, %r15
nop
nop
xor $22463, %rdi
movl $0x61626364, (%r15)
nop
nop
nop
xor $55087, %rdi
lea addresses_WT_ht+0x193a1, %r13
nop
nop
nop
nop
and $53774, %rdi
mov (%r13), %r11d
cmp %r15, %r15
lea addresses_UC_ht+0x1824f, %rdi
nop
nop
nop
and $15139, %r9
mov $0x6162636465666768, %r13
movq %r13, %xmm7
movups %xmm7, (%rdi)
nop
nop
add %rcx, %rcx
lea addresses_WT_ht+0x1b719, %rsi
lea addresses_UC_ht+0x18519, %rdi
nop
nop
cmp $57715, %r13
mov $94, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp %r13, %r13
lea addresses_D_ht+0x1b719, %rsi
lea addresses_WC_ht+0x6c25, %rdi
clflush (%rsi)
nop
sub $62779, %rbx
mov $91, %rcx
rep movsl
sub %r13, %r13
lea addresses_A_ht+0x4b59, %rdi
nop
nop
and %r13, %r13
mov $0x6162636465666768, %rcx
movq %rcx, (%rdi)
nop
xor %rdi, %rdi
lea addresses_normal_ht+0x4667, %r13
nop
nop
nop
nop
nop
cmp %r15, %r15
mov $0x6162636465666768, %r11
movq %r11, %xmm6
movups %xmm6, (%r13)
sub %rsi, %rsi
lea addresses_WT_ht+0x17399, %rdi
nop
nop
nop
cmp %r15, %r15
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
movups %xmm7, (%rdi)
nop
nop
xor $51290, %r9
lea addresses_D_ht+0x649b, %rsi
lea addresses_WT_ht+0x11919, %rdi
nop
nop
nop
nop
nop
sub $1511, %r11
mov $96, %rcx
rep movsw
nop
add $62563, %rcx
lea addresses_D_ht+0x13e29, %rsi
lea addresses_normal_ht+0xc319, %rdi
nop
sub $52670, %rbx
mov $54, %rcx
rep movsl
and %r9, %r9
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %rax
push %rbx
push %rcx
push %rsi
// Faulty Load
lea addresses_WC+0x1319, %r11
sub $6873, %rsi
mov (%r11), %cx
lea oracles, %rax
and $0xff, %rcx
shlq $12, %rcx
mov (%rax,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %rbx
pop %rax
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 32, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_UC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_normal_ht'}}
{'38': 21829}
38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38
*/
|
ada/gui/agar-input_device.ads | auzkok/libagar | 286 | 12676 | ------------------------------------------------------------------------------
-- AGAR GUI LIBRARY --
-- A G A R . I N P U T _ D E V I C E --
-- S p e c --
------------------------------------------------------------------------------
with Interfaces.C;
with Interfaces.C.Strings;
with Agar.Object;
with System;
--
-- Generic input device
--
package Agar.Input_Device is
package C renames Interfaces.C;
package CS renames Interfaces.C.Strings;
use type C.unsigned;
type Input_Device is limited record
Super : aliased Agar.Object.Object; -- [Object -> Input_Device]
Driver : System.Address; -- Agar.Driver.Driver_Access
Descr : CS.chars_ptr; -- Long description
Flags : C.unsigned;
C_Pad : Interfaces.Unsigned_32;
end record
with Convention => C;
type Input_Device_Access is access all Input_Device with Convention => C;
subtype Input_Device_not_null_Access is not null Input_Device_Access;
end Agar.Input_Device;
|
ffight/lcs/1p/A8.asm | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | 6 | 25620 | copyright zengfr site:http://github.com/zengfr/romhack
008EE4 clr.b ($6d0,A5)
00A2C6 dbra D0, $a2c0
00A382 dbra D0, $a37c
copyright zengfr site:http://github.com/zengfr/romhack
|
test/Succeed/Issue333.agda | shlevy/agda | 1,989 | 8127 | {-# OPTIONS --universe-polymorphism #-}
module Issue333 where
open import Common.Level
data Σ a b (A : Set a) (B : A → Set b) : Set (a ⊔ b) where
_,_ : (x : A) → B x → Σ a b A B
P : ∀ a b (A : Set a) (B : Set b) → Set (a ⊔ b)
P a b A B = Σ a b A (λ _ → B)
postulate
A B : Set
foo : Σ lzero lzero A λ (y : A) → P lzero lzero A B
bar : Set₁
bar = helper foo
where
helper : (Σ _ _ A λ (y : A) → P _ _ _ _) → Set₁
helper (y , (x⇓ , fy⇑)) = Set
|
source/pools/machine-apple-darwin/s-unball.ads | ytomino/drake | 33 | 276 | pragma License (Unrestricted);
-- implementation unit specialized for Darwin
with System.Storage_Elements;
private with C.malloc.malloc;
package System.Unbounded_Allocators is
-- Separated storage pool for local scope.
pragma Preelaborate;
type Unbounded_Allocator is limited private;
procedure Initialize (Object : in out Unbounded_Allocator);
procedure Finalize (Object : in out Unbounded_Allocator);
procedure Allocate (
Allocator : Unbounded_Allocator;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
procedure Deallocate (
Allocator : Unbounded_Allocator;
Storage_Address : Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
function Allocator_Of (Storage_Address : Address)
return Unbounded_Allocator;
private
type Unbounded_Allocator is new C.malloc.malloc.malloc_zone_t_ptr;
end System.Unbounded_Allocators;
|
programs/oeis/106/A106466.asm | neoneye/loda | 22 | 169317 | <gh_stars>10-100
; A106466: Interleave 1,2,3,.. with 1,1,2,2,3,3,...
; 1,1,2,1,3,2,4,2,5,3,6,3,7,4,8,4,9,5,10,5,11,6,12,6,13,7,14,7,15,8,16,8,17,9,18,9,19,10,20,10,21,11,22,11,23,12,24,12,25,13,26,13,27,14,28,14,29,15,30,15,31,16,32,16,33,17,34,17,35,18,36
add $0,3
dif $0,2
div $0,2
|
unicode-general_category-alias.ads | annexi-strayline/ASAP-Unicode | 1 | 4970 | ------------------------------------------------------------------------------
-- --
-- Unicode Utilities --
-- --
-- General Category Query Utility --
-- --
-- Alias Lookup and Conversion --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2019, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * <NAME> (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the 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 --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
package Unicode.General_Category.Alias with Pure is
subtype General_Category_Alias_String is String (1 .. 2);
type General_Category_Alias_List
is array (General_Category_Type) of General_Category_Alias_String
with Preelaborable_Initialization;
General_Category_Aliases: constant General_Category_Alias_List
:= (Letter_Uppercase => "Lu",
Letter_Lowercase => "Ll",
Letter_Titlecase => "Lt",
Letter_Modifier => "Lm",
Letter_Other => "Lo",
Mark_Nonspacing => "Mn",
Mark_Spacing_Combining => "Mc",
Mark_Enclosing => "Me",
Number_Decimal_Digit => "Nd",
Number_Letter => "Nl",
Number_Other => "No",
Punctuation_Connector => "Pc",
Punctuation_Dash => "Pd",
Punctuation_Open => "Ps",
Punctuation_Close => "Pe",
Punctuation_Initial_Quote => "Pi",
Punctuation_Final_Quote => "Pf",
Punctuation_Other => "Po",
Symbol_Math => "Sm",
Symbol_Currency => "Sc",
Symbol_Modifier => "Sk",
Symbol_Other => "So",
Separator_Space => "Zs",
Separator_Line => "Zl",
Separator_Paragraph => "Zp",
Other_Control => "Cc",
Other_Format => "Cf",
Other_Surrogate => "Cs",
Other_Private_Use => "Co",
Other_Not_Assigned => "Cn");
function Category_By_Alias (Alias: in General_Category_Alias_String)
return General_Category_Type;
-- Raises CONSTRAINT_ERROR if Alias does not identify a General_Category
-- value.
end Unicode.General_Category.Alias;
|
RTC/rtcrakdia002.asm | xfrings/8051-Experiments | 0 | 176848 | ;REAL TIME DIGITAL CLOCK ON MULTIPLEXED 7SEGMENT LED COMMON ANODE DISPLAY
;ASTER
;10/11/2008 ::::: 16:37
;PORT SPECIFICATION :::::::: P0 ---- DATA ::::: INPUT FOR ULN2003
; P2.6 - C , P2.7 - B , P2.8 - A ::::: INPUT FOR 74LS138
;:::::::::::::::::::::::::::::::::::::::::::DIAGNOSTICS ONLY::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
;TIME FORMAT :::::::: HH : MM : SS
ORG 0000H
SJMP 0030H
ORG 0030H
START: MOV P0,#00H
MOV P2,#00H
MOV R3,#00H
MOV R2,#02H
MOV DPTR,#NOS
BACK: CLR A
MOVC A,@A+DPTR
CJNE A,#00H,SKIPA
MOV DPTR,#NOS
SJMP NXTA
SKIPA: INC DPTR
MOV P0,A
LCALL DELAYV
SJMP BACK
NXTA: LCALL NXMOD
SJMP BACK
;----------------------------------------------------------------------------
NXMOD: MOV A,R3 ;NXMOD TAKES 17T STATES WITHOUT DELAYV LOOP
INC A
MOV R3,A
CJNE A,#06H,SKIP
CLR A
MOV R3,A
SKIP: MOV C,ACC.0 ; XYZ 0 0 ZYX
MOV ACC.7,C
MOV C,ACC.1
MOV ACC.6,C
MOV C,ACC.2
MOV ACC.5,C
MOV P2,A
RET
;-------------------------------------------------------------------------------
DELAYV: MOV R7,#08H
WAITC: MOV R6,#0FFH
WAITB: MOV R5,#0FFH
WAITA: DJNZ R5,WAITA
DJNZ R6,WAITB
DJNZ R7,WAITC
RET
NOS: DB 77H,11H,6BH,3BH,1DH,3EH,7EH,13H,7FH,3FH,0
END
|
source/word_replacing_in_file.asm | timchenko24/TASM | 0 | 178972 | .model small
.stack 100h
input macro var1
push ax
push dx
mov ah, 0ah
lea dx, var1
int 21h
pop dx
pop ax
endm
output macro var1
push ax
push dx
mov ah, 9
lea dx, var1
int 21h
pop dx
pop ax
endm
pathZero macro path
push bx
push si
mov bl, path[1]
mov bh,0
mov si,bx
mov path[si+2], 0
pop si
pop bx
endm
.data
p1 db "Enter file path: ",13,10,'$'
p2 db 13,10,"Enter new file path: ",13,10,'$'
p3 db 13,10,"File has been created!",13,10,'$'
p4 db 13,10,"Error",13,10,'$'
p5 db 13,10,"Failed to open file",13,10,'$'
p6 db 13,10,"Failed to create file",13,10,'$'
p7 db 13,10,"Failed to read from file",13,10,'$'
p8 db 13,10,"Failed to write in file",13,10,'$'
path1 db 20,?,20 dup(?)
path2 db 20,?,20 dup(?)
fNum1 dw ?
fNum2 dw ?
buffer1 db 100 dup(?)
buffer2 db 100 dup(?)
wi db ?
word1 db "yarrow"
word2 db "medicinal plant"
.code
begin:
mov ax, @data
mov ds, ax
mov es, ax
output p1
input path1
pathZero path1
output p2
input path2
pathZero path2
mov ah, 3dh
lea dx, path1[2]
mov al, 0
int 21h
jc OpenFileError
mov fNum1, ax
mov cx, 0
mov ah, 3ch
lea dx, path2[2]
int 21h
jc CreateFileError
mov fNum2, ax
output p3
xor ax, ax
mov ah, 3fh
mov bx, fNum1
mov cx, 100
lea dx, buffer1
int 21h
jc ReadFileError
mov cx, 0
mov si, 0
mov di, 0
mov bp, 0
mov wi, 0
jmp BufferScan
OpenFileError:
output p5
jmp Exit
CreateFileError:
output p6
jmp Exit
ReadFileError:
output p7
jmp Exit
WriteFileError:
output p8
jmp Exit
BufferScan:
pop si
cmp cx, 100
je EndOfBuffer
mov al, buffer1[si]
cmp al, word1[bp]
jne SkipWord
inc si
inc bp
cmp bp, 6
je Change
jmp BufferScan
SkipWord:
mov al, buffer1[si]
cmp al, ' '
je Space
mov buffer2[di], al
inc cx
inc si
inc di
jmp SkipWord
Space:
mov bp, 0
inc si
jmp BufferScan
Change:
push si
mov si, 0
ChangeLoop:
inc di
mov al, word2[si]
mov buffer2[di], al
inc cx
cmp si, 14
je BufferScan
inc si
inc di
jmp ChangeLoop
EndOfBuffer:
mov ah, 40h
mov bx, fNum2
mov cx, 100
lea dx, buffer2
int 21h
jc WriteFileError
jmp Exit
Exit:
mov ah, 4ch
int 21h
end begin |
oeis/054/A054489.asm | neoneye/loda-programs | 11 | 12055 | <reponame>neoneye/loda-programs
; A054489: Expansion of (1+4*x)/(1-6*x+x^2).
; 1,10,59,344,2005,11686,68111,396980,2313769,13485634,78600035,458114576,2670087421,15562409950,90704372279,528663823724,3081278570065,17959007596666,104672767009931,610077594462920,3555792799767589,20724679204142614,120792282425088095,704029015346385956,4103381809653227641,23916261842572979890,139394189245784651699,812448873632134930304,4735299052547024930125,27599345441650014650446,160860773597353062972551,937565296142468363184860,5464531003257457116136609,31849620723402274333634794
mov $1,4
mov $2,7
lpb $0
sub $0,1
add $1,$2
add $2,$1
add $2,$1
add $1,$2
lpe
div $1,4
mov $0,$1
|
core/lib/types/BAut.agda | AntoineAllioux/HoTT-Agda | 294 | 11008 | <gh_stars>100-1000
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.NConnected
open import lib.types.Nat
open import lib.types.Subtype
open import lib.types.Truncation
-- classifying types of automorphism groups of types
module lib.types.BAut where
BAut : ∀ {i} → Type i → Type (lsucc i)
BAut {i} A = Σ (Type i) λ X → Trunc -1 (A == X)
BAut-prop : ∀ {i} (A : Type i) → SubtypeProp (Type i) (lsucc i)
BAut-prop A = ((λ X → Trunc -1 (A == X)) , (λ X → Trunc-level))
pBAut : ∀ {i} → Type i → Ptd (lsucc i)
de⊙ (pBAut A) = BAut A
pt (pBAut A) = A , [ idp ]
BAut-trunc-path : ∀ {i} (A X : Type i) → (tp : Trunc -1 (A == X))
→ Trunc -1 ((A , [ idp ]) == (X , tp) :> BAut A)
BAut-trunc-path {i} A X = Trunc-elim λ p → [ pair= p prop-has-all-paths-↓ ]
BAut-conn : ∀ {i} (A : Type i) → is-connected 0 (BAut A)
fst (has-level-apply (BAut-conn A)) = [ pt (pBAut A) ]
snd (has-level-apply (BAut-conn A)) = Trunc-elim (λ { (X , tp) → <– (=ₜ-equiv [ A , [ idp ] ] [ X , tp ])
(BAut-trunc-path A X tp) })
|
programs/oeis/051/A051036.asm | karttu/loda | 1 | 167857 | <filename>programs/oeis/051/A051036.asm
; A051036: a(n) = binomial(n, floor(n/4)).
; 1,1,1,1,4,5,6,7,28,36,45,55,220,286,364,455,1820,2380,3060,3876,15504,20349,26334,33649,134596,177100,230230,296010,1184040,1560780,2035800,2629575,10518300,13884156,18156204,23535820,94143280,124403620
mov $1,$0
div $0,4
bin $1,$0
|
src/flyweights/flyweights-untracked_lists.ads | jhumphry/auto_counters | 5 | 9994 | <gh_stars>1-10
-- flyweights-untracked_lists.ads
-- A package of singly-linked lists for the Flyweights packages without resource
-- tracking or release
-- Copyright (c) 2016, <NAME>
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
pragma Profile (No_Implementation_Extensions);
with Flyweights_Lists_Spec;
generic
type Element(<>) is limited private;
type Element_Access is access Element;
with function "=" (Left, Right : in Element) return Boolean is <>;
package Flyweights.Untracked_Lists is
type Node is private;
type List is access Node;
Empty_List : constant List := null;
procedure Insert (L : in out List;
E : in out Element_Access);
procedure Increment (L : in out List;
E : in Element_Access);
procedure Remove (L : in out List;
Data_Ptr : in Element_Access);
package Lists_Spec is
new Flyweights_Lists_Spec(Element_Access => Element_Access,
List => List,
Empty_List => Empty_List,
Insert => Insert,
Increment => Increment,
Remove => Remove);
private
subtype Node_Access is List;
type Node is
record
Next : Node_Access;
Data : Element_Access;
end record;
end Flyweights.Untracked_Lists;
|
programs/oeis/255/A255680.asm | karttu/loda | 1 | 13481 | ; A255680: a(n) = n*(n mod 3)*(n mod 5).
; 0,1,8,0,16,0,0,14,48,0,0,22,0,39,112,0,16,68,0,76,0,0,44,138,0,0,52,0,84,232,0,31,128,0,136,0,0,74,228,0,0,82,0,129,352,0,46,188,0,196,0,0,104,318,0,0,112,0,174,472,0,61,248,0,256,0,0,134,408,0,0,142,0,219,592,0,76,308,0,316,0,0,164,498,0,0,172,0,264,712,0,91,368,0,376,0,0,194,588,0,0,202,0,309,832,0,106,428,0,436,0,0,224,678,0,0,232,0,354,952,0,121,488,0,496,0,0,254,768,0,0,262,0,399,1072,0,136,548,0,556,0,0,284,858,0,0,292,0,444,1192,0,151,608,0,616,0,0,314,948,0,0,322,0,489,1312,0,166,668,0,676,0,0,344,1038,0,0,352,0,534,1432,0,181,728,0,736,0,0,374,1128,0,0,382,0,579,1552,0,196,788,0,796,0,0,404,1218,0,0,412,0,624,1672,0,211,848,0,856,0,0,434,1308,0,0,442,0,669,1792,0,226,908,0,916,0,0,464,1398,0,0,472,0,714,1912,0,241,968,0,976,0,0,494,1488,0
mov $1,$0
mod $0,5
mul $0,$1
mod $1,3
mul $1,$0
|
src/Categories/Category/Monoidal/Instance/Cats.agda | bblfish/agda-categories | 5 | 8598 | <reponame>bblfish/agda-categories<filename>src/Categories/Category/Monoidal/Instance/Cats.agda
{-# OPTIONS --without-K --safe #-}
-- The category of Cats is Monoidal
module Categories.Category.Monoidal.Instance.Cats where
open import Level
open import Data.Product using (Σ; _×_; _,_; proj₁; proj₂; uncurry)
open import Categories.Category
open import Categories.Functor using (Functor; _∘F_) renaming (id to idF)
open import Categories.Category.Instance.Cats
open import Categories.Category.Monoidal
open import Categories.Functor.Bifunctor
open import Categories.Category.Instance.One
open import Categories.Category.Product
open import Categories.Category.Product.Properties
import Categories.Category.Cartesian as Cartesian
open import Categories.NaturalTransformation.NaturalIsomorphism using (NaturalIsomorphism)
-- Cats is a Monoidal Category with Product as Bifunctor
module Product {o ℓ e : Level} where
private
C = Cats o ℓ e
open Cartesian C
Cats-has-all : BinaryProducts
Cats-has-all = record { product = λ {A} {B} → record
{ A×B = Product A B
; π₁ = πˡ
; π₂ = πʳ
; ⟨_,_⟩ = _※_
; project₁ = λ {_} {h} {i} → project₁ {i = h} {j = i}
; project₂ = λ {_} {h} {i} → project₂ {i = h} {j = i}
; unique = unique
} }
Cats-is : Cartesian
Cats-is = record { terminal = One-⊤ ; products = Cats-has-all }
private
module Cart = Cartesian.Cartesian Cats-is
Cats-Monoidal : Monoidal C
Cats-Monoidal = Cart.monoidal
|
source/web/fastcgi/fastcgi-application.adb | svn2github/matreshka | 24 | 25656 | <reponame>svn2github/matreshka<gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010, <NAME> <<EMAIL>> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the <NAME>, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.FastCGI.Server;
with Matreshka.FastCGI.Streaming_Server;
package body FastCGI.Application is
-------------
-- Execute --
-------------
procedure Execute (Handler : FastCGI.Application.Callback) is
begin
Matreshka.FastCGI.Server.Execute (Handler);
end Execute;
-------------
-- Execute --
-------------
procedure Execute
(Responder_Factory : FastCGI.Application.Responder_Factory) is
begin
Matreshka.FastCGI.Streaming_Server.Execute (Responder_Factory);
end Execute;
--------------
-- Finalize --
--------------
procedure Finalize is
begin
null;
end Finalize;
----------------
-- Initialize --
----------------
procedure Initialize is
begin
null;
end Initialize;
end FastCGI.Application;
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca_notsx.log_5063_428.asm | ljhsiun2/medusa | 9 | 94434 | .global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r14
push %r8
// Faulty Load
lea addresses_WT+0x192c3, %r8
nop
nop
nop
nop
and $43303, %r10
movntdqa (%r8), %xmm2
vpextrq $0, %xmm2, %r14
lea oracles, %r13
and $0xff, %r14
shlq $12, %r14
mov (%r13,%r14,1), %r14
pop %r8
pop %r14
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': True, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'00': 5063}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/g-altive.ads | djamal2727/Main-Bearing-Analytical-Model | 0 | 7804 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . A L T I V E C --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-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. --
-- --
------------------------------------------------------------------------------
-------------------------
-- General description --
-------------------------
-- This is the root of a package hierarchy offering an Ada binding to the
-- PowerPC AltiVec extensions, a set of 128bit vector types together with a
-- set of subprograms operating on them. Relevant documents are:
-- o AltiVec Technology, Programming Interface Manual (1999-06)
-- to which we will refer as [PIM], describes the data types, the
-- functional interface and the ABI conventions.
-- o AltiVec Technology, Programming Environments Manual (2002-02)
-- to which we will refer as [PEM], describes the hardware architecture
-- and instruction set.
-- These documents, as well as a number of others of general interest on the
-- AltiVec technology, are available from the Motorola/AltiVec Web site at:
-- http://www.freescale.com/altivec
-- The binding interface is structured to allow alternate implementations:
-- for real AltiVec capable targets, and for other targets. In the latter
-- case, everything is emulated in software. The two versions are referred
-- to as:
-- o The Hard binding for AltiVec capable targets (with the appropriate
-- hardware support and corresponding instruction set)
-- o The Soft binding for other targets (with the low level primitives
-- emulated in software).
-- In addition, interfaces that are not strictly part of the base AltiVec API
-- are provided, such as vector conversions to and from array representations,
-- which are of interest for client applications (e.g. for vector
-- initialization purposes).
-- Only the soft binding is available today
-----------------------------------------
-- General package architecture survey --
-----------------------------------------
-- The various vector representations are all "containers" of elementary
-- values, the possible types of which are declared in this root package to
-- be generally accessible.
-- From the user standpoint, the binding materializes as a consistent
-- hierarchy of units:
-- GNAT.Altivec
-- (component types)
-- |
-- o----------------o----------------o-------------o
-- | | | |
-- Vector_Types Vector_Operations Vector_Views Conversions
-- Users can manipulate vectors through two families of types: Vector
-- types and View types.
-- Vector types are available through the Vector_Types and Vector_Operations
-- packages, which implement the core binding to the AltiVec API, as
-- described in [PIM-2.1 data types] and [PIM-4 AltiVec operations and
-- predicates].
-- The layout of Vector objects is dependant on the target machine
-- endianness, and View types were devised to offer a higher level user
-- interface. With Views, a vector of 4 uints (1, 2, 3, 4) is always declared
-- with a VUI_View := (Values => (1, 2, 3, 4)), element 1 first, natural
-- notation to denote the element values, and indexed notation is available
-- to access individual elements.
-- View types do not represent Altivec vectors per se, in the sense that the
-- Altivec_Operations are not available for them. They are intended to allow
-- Vector initializations as well as access to the Vector component values.
-- The GNAT.Altivec.Conversions package is provided to convert a View to the
-- corresponding Vector and vice-versa.
---------------------------
-- Underlying principles --
---------------------------
-- Internally, the binding relies on an abstraction of the Altivec API, a
-- rich set of functions around a core of low level primitives mapping to
-- AltiVec instructions. See for instance "vec_add" in [PIM-4.4 Generic and
-- Specific AltiVec operations], with no less than six result/arguments
-- combinations of byte vector types that map to "vaddubm".
-- The "soft" version is a software emulation of the low level primitives.
-- The "hard" version would map to real AltiVec instructions via GCC builtins
-- and inlining.
-- See the "Design Notes" section below for additional details on the
-- internals.
-------------------
-- Example usage --
-------------------
-- Here is a sample program declaring and initializing two vectors, 'add'ing
-- them and displaying the result components:
-- with GNAT.Altivec.Vector_Types; use GNAT.Altivec.Vector_Types;
-- with GNAT.Altivec.Vector_Operations; use GNAT.Altivec.Vector_Operations;
-- with GNAT.Altivec.Vector_Views; use GNAT.Altivec.Vector_Views;
-- with GNAT.Altivec.Conversions; use GNAT.Altivec.Conversions;
-- use GNAT.Altivec;
-- with Ada.Text_IO; use Ada.Text_IO;
-- procedure Sample is
-- Va : Vector_Unsigned_Int := To_Vector ((Values => (1, 2, 3, 4)));
-- Vb : Vector_Unsigned_Int := To_Vector ((Values => (1, 2, 3, 4)));
-- Vs : Vector_Unsigned_Int;
-- Vs_View : VUI_View;
-- begin
-- Vs := Vec_Add (Va, Vb);
-- Vs_View := To_View (Vs);
-- for I in Vs_View.Values'Range loop
-- Put_Line (Unsigned_Int'Image (Vs_View.Values (I)));
-- end loop;
-- end;
-- $ gnatmake sample.adb
-- [...]
-- $ ./sample
-- 2
-- 4
-- 6
-- 8
------------------------------------------------------------------------------
with System;
package GNAT.Altivec is
-- Definitions of constants and vector/array component types common to all
-- the versions of the binding.
-- All the vector types are 128bits
VECTOR_BIT : constant := 128;
-------------------------------------------
-- [PIM-2.3.1 Alignment of vector types] --
-------------------------------------------
-- "A defined data item of any vector data type in memory is always
-- aligned on a 16-byte boundary. A pointer to any vector data type always
-- points to a 16-byte boundary. The compiler is responsible for aligning
-- vector data types on 16-byte boundaries."
VECTOR_ALIGNMENT : constant := Natural'Min (16, Standard'Maximum_Alignment);
-- This value is used to set the alignment of vector datatypes in both the
-- hard and the soft binding implementations.
--
-- We want this value to never be greater than 16, because none of the
-- binding implementations requires larger alignments and such a value
-- would cause useless space to be allocated/wasted for vector objects.
-- Furthermore, the alignment of 16 matches the hard binding leading to
-- a more faithful emulation.
--
-- It needs to be exactly 16 for the hard binding, and the initializing
-- expression is just right for this purpose since Maximum_Alignment is
-- expected to be 16 for the real Altivec ABI.
--
-- The soft binding doesn't rely on strict 16byte alignment, and we want
-- the value to be no greater than Standard'Maximum_Alignment in this case
-- to ensure it is supported on every possible target.
-------------------------------------------------------
-- [PIM-2.1] Data Types - Interpretation of contents --
-------------------------------------------------------
---------------------
-- char components --
---------------------
CHAR_BIT : constant := 8;
SCHAR_MIN : constant := -2 ** (CHAR_BIT - 1);
SCHAR_MAX : constant := 2 ** (CHAR_BIT - 1) - 1;
UCHAR_MAX : constant := 2 ** CHAR_BIT - 1;
type unsigned_char is mod UCHAR_MAX + 1;
for unsigned_char'Size use CHAR_BIT;
type signed_char is range SCHAR_MIN .. SCHAR_MAX;
for signed_char'Size use CHAR_BIT;
subtype bool_char is unsigned_char;
-- ??? There is a difference here between what the Altivec Technology
-- Programming Interface Manual says and what GCC says. In the manual,
-- vector_bool_char is a vector_unsigned_char, while in altivec.h it
-- is a vector_signed_char.
bool_char_True : constant bool_char := bool_char'Last;
bool_char_False : constant bool_char := 0;
----------------------
-- short components --
----------------------
SHORT_BIT : constant := 16;
SSHORT_MIN : constant := -2 ** (SHORT_BIT - 1);
SSHORT_MAX : constant := 2 ** (SHORT_BIT - 1) - 1;
USHORT_MAX : constant := 2 ** SHORT_BIT - 1;
type unsigned_short is mod USHORT_MAX + 1;
for unsigned_short'Size use SHORT_BIT;
subtype unsigned_short_int is unsigned_short;
type signed_short is range SSHORT_MIN .. SSHORT_MAX;
for signed_short'Size use SHORT_BIT;
subtype signed_short_int is signed_short;
subtype bool_short is unsigned_short;
-- ??? See bool_char
bool_short_True : constant bool_short := bool_short'Last;
bool_short_False : constant bool_short := 0;
subtype bool_short_int is bool_short;
--------------------
-- int components --
--------------------
INT_BIT : constant := 32;
SINT_MIN : constant := -2 ** (INT_BIT - 1);
SINT_MAX : constant := 2 ** (INT_BIT - 1) - 1;
UINT_MAX : constant := 2 ** INT_BIT - 1;
type unsigned_int is mod UINT_MAX + 1;
for unsigned_int'Size use INT_BIT;
type signed_int is range SINT_MIN .. SINT_MAX;
for signed_int'Size use INT_BIT;
subtype bool_int is unsigned_int;
-- ??? See bool_char
bool_int_True : constant bool_int := bool_int'Last;
bool_int_False : constant bool_int := 0;
----------------------
-- float components --
----------------------
FLOAT_BIT : constant := 32;
FLOAT_DIGIT : constant := 6;
FLOAT_MIN : constant := -16#0.FFFF_FF#E+32;
FLOAT_MAX : constant := 16#0.FFFF_FF#E+32;
type C_float is digits FLOAT_DIGIT range FLOAT_MIN .. FLOAT_MAX;
for C_float'Size use FLOAT_BIT;
-- Altivec operations always use the standard native floating-point
-- support of the target. Note that this means that there may be
-- minor differences in results between targets when the floating-
-- point implementations are slightly different, as would happen
-- with normal non-Altivec floating-point operations. In particular
-- the Altivec simulations may yield slightly different results
-- from those obtained on a true hardware Altivec target if the
-- floating-point implementation is not 100% compatible.
----------------------
-- pixel components --
----------------------
subtype pixel is unsigned_short;
-----------------------------------------------------------
-- Subtypes for variants found in the GCC implementation --
-----------------------------------------------------------
subtype c_int is signed_int;
subtype c_short is c_int;
LONG_BIT : constant := 32;
-- Some of the GCC builtins are built with "long" arguments and
-- expect SImode to come in.
SLONG_MIN : constant := -2 ** (LONG_BIT - 1);
SLONG_MAX : constant := 2 ** (LONG_BIT - 1) - 1;
ULONG_MAX : constant := 2 ** LONG_BIT - 1;
type signed_long is range SLONG_MIN .. SLONG_MAX;
type unsigned_long is mod ULONG_MAX + 1;
subtype c_long is signed_long;
subtype c_ptr is System.Address;
---------------------------------------------------------
-- Access types, for the sake of some argument passing --
---------------------------------------------------------
type signed_char_ptr is access all signed_char;
type unsigned_char_ptr is access all unsigned_char;
type short_ptr is access all c_short;
type signed_short_ptr is access all signed_short;
type unsigned_short_ptr is access all unsigned_short;
type int_ptr is access all c_int;
type signed_int_ptr is access all signed_int;
type unsigned_int_ptr is access all unsigned_int;
type long_ptr is access all c_long;
type signed_long_ptr is access all signed_long;
type unsigned_long_ptr is access all unsigned_long;
type float_ptr is access all Float;
--
type const_signed_char_ptr is access constant signed_char;
type const_unsigned_char_ptr is access constant unsigned_char;
type const_short_ptr is access constant c_short;
type const_signed_short_ptr is access constant signed_short;
type const_unsigned_short_ptr is access constant unsigned_short;
type const_int_ptr is access constant c_int;
type const_signed_int_ptr is access constant signed_int;
type const_unsigned_int_ptr is access constant unsigned_int;
type const_long_ptr is access constant c_long;
type const_signed_long_ptr is access constant signed_long;
type const_unsigned_long_ptr is access constant unsigned_long;
type const_float_ptr is access constant Float;
-- Access to const volatile arguments need specialized types
type volatile_float is new Float;
pragma Volatile (volatile_float);
type volatile_signed_char is new signed_char;
pragma Volatile (volatile_signed_char);
type volatile_unsigned_char is new unsigned_char;
pragma Volatile (volatile_unsigned_char);
type volatile_signed_short is new signed_short;
pragma Volatile (volatile_signed_short);
type volatile_unsigned_short is new unsigned_short;
pragma Volatile (volatile_unsigned_short);
type volatile_signed_int is new signed_int;
pragma Volatile (volatile_signed_int);
type volatile_unsigned_int is new unsigned_int;
pragma Volatile (volatile_unsigned_int);
type volatile_signed_long is new signed_long;
pragma Volatile (volatile_signed_long);
type volatile_unsigned_long is new unsigned_long;
pragma Volatile (volatile_unsigned_long);
type constv_char_ptr is access constant volatile_signed_char;
type constv_signed_char_ptr is access constant volatile_signed_char;
type constv_unsigned_char_ptr is access constant volatile_unsigned_char;
type constv_short_ptr is access constant volatile_signed_short;
type constv_signed_short_ptr is access constant volatile_signed_short;
type constv_unsigned_short_ptr is access constant volatile_unsigned_short;
type constv_int_ptr is access constant volatile_signed_int;
type constv_signed_int_ptr is access constant volatile_signed_int;
type constv_unsigned_int_ptr is access constant volatile_unsigned_int;
type constv_long_ptr is access constant volatile_signed_long;
type constv_signed_long_ptr is access constant volatile_signed_long;
type constv_unsigned_long_ptr is access constant volatile_unsigned_long;
type constv_float_ptr is access constant volatile_float;
private
-----------------------
-- Various constants --
-----------------------
CR6_EQ : constant := 0;
CR6_EQ_REV : constant := 1;
CR6_LT : constant := 2;
CR6_LT_REV : constant := 3;
end GNAT.Altivec;
--------------------
-- Design Notes --
--------------------
------------------------
-- General principles --
------------------------
-- The internal organization has been devised from a number of driving ideas:
-- o From the clients standpoint, the two versions of the binding should be
-- as easily exchangable as possible,
-- o From the maintenance standpoint, we want to avoid as much code
-- duplication as possible.
-- o From both standpoints above, we want to maintain a clear interface
-- separation between the base bindings to the Motorola API and the
-- additional facilities.
-- The identification of the low level interface is directly inspired by the
-- the base API organization, basically consisting of a rich set of functions
-- around a core of low level primitives mapping to AltiVec instructions.
-- See for instance "vec_add" in [PIM-4.4 Generic and Specific AltiVec
-- operations]: no less than six result/arguments combinations of byte vector
-- types map to "vaddubm".
-- The "hard" version of the low level primitives map to real AltiVec
-- instructions via the corresponding GCC builtins. The "soft" version is
-- a software emulation of those.
---------------------------------------
-- The Low_Level_Vectors abstraction --
---------------------------------------
-- The AltiVec C interface spirit is to map a large set of C functions down
-- to a much smaller set of AltiVec instructions, most of them operating on a
-- set of vector data types in a transparent manner. See for instance the
-- case of vec_add, which maps six combinations of result/argument types to
-- vaddubm for signed/unsigned/bool variants of 'char' components.
-- The GCC implementation of this idiom for C/C++ is to setup builtins
-- corresponding to the instructions and to expose the C user function as
-- wrappers around those builtins with no-op type conversions as required.
-- Typically, for the vec_add case mentioned above, we have (altivec.h):
--
-- inline __vector signed char
-- vec_add (__vector signed char a1, __vector signed char a2)
-- {
-- return (__vector signed char)
-- __builtin_altivec_vaddubm ((__vector signed char) a1,
-- (__vector signed char) a2);
-- }
-- inline __vector unsigned char
-- vec_add (__vector __bool char a1, __vector unsigned char a2)
-- {
-- return (__vector unsigned char)
-- __builtin_altivec_vaddubm ((__vector signed char) a1,
-- (__vector signed char) a2);
-- }
-- The central idea for the Ada bindings is to leverage on the existing GCC
-- architecture, with the introduction of a Low_Level_Vectors abstraction.
-- This abstraction acts as a representative of the vector-types and builtins
-- compiler interface for either the Hard or the Soft case.
-- For the Hard binding, Low_Level_Vectors exposes data types with a GCC
-- internal translation identical to the "vector ..." C types, and a set of
-- subprograms mapping straight to the internal GCC builtins.
-- For the Soft binding, Low_Level_Vectors exposes the same set of types
-- and subprograms, with bodies simulating the instructions behavior.
-- Vector_Types/Operations "simply" bind the user types and operations to
-- some Low_Level_Vectors implementation, selected in accordance with the
-- target
-- To achieve a complete Hard/Soft independence in the Vector_Types and
-- Vector_Operations implementations, both versions of the low level support
-- are expected to expose a number of facilities:
-- o Private data type declarations for base vector representations embedded
-- in the user visible vector types, that is:
-- LL_VBC, LL_VUC and LL_VSC
-- for vector_bool_char, vector_unsigned_char and vector_signed_char
-- LL_VBS, LL_VUS and LL_VSS
-- for vector_bool_short, vector_unsigned_short and vector_signed_short
-- LL_VBI, LL_VUI and LL_VSI
-- for vector_bool_int, vector_unsigned_int and vector_signed_int
-- as well as:
-- LL_VP for vector_pixel and LL_VF for vector_float
-- o Primitive operations corresponding to the AltiVec hardware instruction
-- names, like "vaddubm". The whole set is not described here. The actual
-- sets are inspired from the GCC builtins which are invoked from GCC's
-- "altivec.h".
-- o An LL_Altivec convention identifier, specifying the calling convention
-- to be used to access the aforementioned primitive operations.
-- Besides:
-- o Unchecked_Conversion are expected to be allowed between any pair of
-- exposed data types, and are expected to have no effect on the value
-- bit patterns.
-------------------------
-- Vector views layout --
-------------------------
-- Vector Views combine intuitive user level ordering for both elements
-- within a vector and bytes within each element. They basically map to an
-- array representation where array(i) always represents element (i), in the
-- natural target representation. This way, a user vector (1, 2, 3, 4) is
-- represented as:
-- Increasing Addresses
-- ------------------------------------------------------------------------->
-- | 0x0 0x0 0x0 0x1 | 0x0 0x0 0x0 0x2 | 0x0 0x0 0x0 0x3 | 0x0 0x0 0x0 0x4 |
-- | V (0), BE | V (1), BE | V (2), BE | V (3), BE |
-- on a big endian target, and as:
-- | 0x1 0x0 0x0 0x0 | 0x2 0x0 0x0 0x0 | 0x3 0x0 0x0 0x0 | 0x4 0x0 0x0 0x0 |
-- | V (0), LE | V (1), LE | V (2), LE | V (3), LE |
-- on a little-endian target
-------------------------
-- Vector types layout --
-------------------------
-- In the case of the hard binding, the layout of the vector type in
-- memory is documented by the Altivec documentation. In the case of the
-- soft binding, the simplest solution is to represent a vector as an
-- array of components. This representation can depend on the endianness.
-- We can consider three possibilities:
-- * First component at the lowest address, components in big endian format.
-- It is the natural way to represent an array in big endian, and it would
-- also be the natural way to represent a quad-word integer in big endian.
-- Example:
-- Let V be a vector of unsigned int which value is (1, 2, 3, 4). It is
-- represented as:
-- Addresses growing
-- ------------------------------------------------------------------------->
-- | 0x0 0x0 0x0 0x1 | 0x0 0x0 0x0 0x2 | 0x0 0x0 0x0 0x3 | 0x0 0x0 0x0 0x4 |
-- | V (0), BE | V (1), BE | V (2), BE | V (3), BE |
-- * First component at the lowest address, components in little endian
-- format. It is the natural way to represent an array in little endian.
-- Example:
-- Let V be a vector of unsigned int which value is (1, 2, 3, 4). It is
-- represented as:
-- Addresses growing
-- ------------------------------------------------------------------------->
-- | 0x1 0x0 0x0 0x0 | 0x2 0x0 0x0 0x0 | 0x3 0x0 0x0 0x0 | 0x4 0x0 0x0 0x0 |
-- | V (0), LE | V (1), LE | V (2), LE | V (3), LE |
-- * Last component at the lowest address, components in little endian format.
-- It is the natural way to represent a quad-word integer in little endian.
-- Example:
-- Let V be a vector of unsigned int which value is (1, 2, 3, 4). It is
-- represented as:
-- Addresses growing
-- ------------------------------------------------------------------------->
-- | 0x4 0x0 0x0 0x0 | 0x3 0x0 0x0 0x0 | 0x2 0x0 0x0 0x0 | 0x1 0x0 0x0 0x0 |
-- | V (3), LE | V (2), LE | V (1), LE | V (0), LE |
-- There is actually a fourth case (components in big endian, first
-- component at the lowest address), but it does not have any interesting
-- properties: it is neither the natural way to represent a quad-word on any
-- machine, nor the natural way to represent an array on any machine.
-- Example:
-- Let V be a vector of unsigned int which value is (1, 2, 3, 4). It is
-- represented as:
-- Addresses growing
-- ------------------------------------------------------------------------->
-- | 0x0 0x0 0x0 0x4 | 0x0 0x0 0x0 0x3 | 0x0 0x0 0x0 0x2 | 0x0 0x0 0x0 0x1 |
-- | V (3), BE | V (2), BE | V (1), BE | V (0), BE |
-- Most of the Altivec operations are specific to a component size, and
-- can be implemented with any of these three formats. But some operations
-- are defined by the same Altivec primitive operation for different type
-- sizes:
-- * operations doing arithmetics on a complete vector, seen as a quad-word;
-- * operations dealing with memory.
-- Operations on a complete vector:
-- --------------------------------
-- Examples:
-- vec_sll/vsl : shift left on the entire vector.
-- vec_slo/vslo: shift left on the entire vector, by octet.
-- Those operations works on vectors seens as a quad-word.
-- Let us suppose that we have a conversion operation named To_Quad_Word
-- for converting vector types to a quad-word.
-- Let A be a Altivec vector of 16 components:
-- A = (A(0), A(1), A(2), A(3), ... , A(14), A(15))
-- Let B be a Altivec vector of 8 components verifying:
-- B = (A(0) |8| A(1), A(2) |8| A(3), ... , A(14) |8| A(15))
-- Let C be a Altivec vector of 4 components verifying:
-- C = (A(0) |8| A(1) |8| A(2) |8| A(3), ... ,
-- A(12) |8| A(13) |8| A(14) |8| A(15))
-- (definition: |8| is the concatenation operation between two bytes;
-- i.e. 0x1 |8| 0x2 = 0x0102)
-- According to [PIM - 4.2 byte ordering], we have the following property:
-- To_Quad_Word (A) = To_Quad_Word (B) = To_Quad_Word (C)
-- Let To_Type_Of_A be a conversion operation from the type of B to the
-- type of A. The quad-word operations are only implemented by one
-- Altivec primitive operation. That means that, if QW_Operation is a
-- quad-word operation, we should have:
-- QW_Operation (To_Type_Of_A (B)) = QW_Operation (A)
-- That is true iff:
-- To_Quad_Word (To_Type_Of_A (B)) = To_Quad_Word (A)
-- As To_Quad_Word is a bijection. we have:
-- To_Type_Of_A (B) = A
-- resp. any combination of A, B, C:
-- To_Type_Of_A (C) = A
-- To_Type_Of_B (A) = B
-- To_Type_Of_C (B) = C
-- ...
-- Making sure that the properties described above are verified by the
-- conversion operations between vector types has different implications
-- depending on the layout of the vector types:
-- * with format 1 and 3: only a unchecked conversion is needed;
-- * with format 2 and 4: some reorganisation is needed for conversions
-- between vector types with different component sizes; that has a cost on the
-- efficiency, plus the complexity of having different memory pattern for
-- the same quad-word value, depending on the type.
-- Operation dealing with memory:
-- ------------------------------
-- These operations are either load operation (vec_ld and the
-- corresponding primitive operation: vlx) or store operation (vec_st
-- and the corresponding primitive operation: vstx).
-- According to [PIM 4.4 - vec_ld], those operations take in input
-- either an access to a vector (e.g. a const_vector_unsigned_int_ptr)
-- or an access to a flow of components (e.g. a const_unsigned_int_ptr),
-- relying on the same Altivec primitive operations. That means that both
-- should have the same representation in memory.
-- For the stream, it is easier to adopt the format of the target. That
-- means that, in memory, the components of the vector should also have the
-- format of the target. meaning that we will prefer:
-- * On a big endian target: format 1 or 4
-- * On a little endian target: format 2 or 3
-- Conclusion:
-- -----------
-- To take into consideration the constraint brought about by the routines
-- operating on quad-words and the routines operating on memory, the best
-- choice seems to be:
-- * On a big endian target: format 1;
-- * On a little endian target: format 3.
-- Those layout choices are enforced by GNAT.Altivec.Low_Level_Conversions,
-- which is the endianness-dependant unit providing conversions between
-- vector views and vector types.
----------------------
-- Layouts summary --
----------------------
-- For a user abstract vector of 4 uints (1, 2, 3, 4), increasing
-- addresses from left to right:
-- =========================================================================
-- BIG ENDIAN TARGET MEMORY LAYOUT for (1, 2, 3, 4)
-- =========================================================================
-- View
-- -------------------------------------------------------------------------
-- | 0x0 0x0 0x0 0x1 | 0x0 0x0 0x0 0x2 | 0x0 0x0 0x0 0x3 | 0x0 0x0 0x0 0x4 |
-- | V (0), BE | V (1), BE | V (2), BE | V (3), BE |
-- -------------------------------------------------------------------------
-- Vector
-- -------------------------------------------------------------------------
-- | 0x0 0x0 0x0 0x1 | 0x0 0x0 0x0 0x2 | 0x0 0x0 0x0 0x3 | 0x0 0x0 0x0 0x4 |
-- | V (0), BE | V (1), BE | V (2), BE | V (3), BE |
-- -------------------------------------------------------------------------
-- =========================================================================
-- LITTLE ENDIAN TARGET MEMORY LAYOUT for (1, 2, 3, 4)
-- =========================================================================
-- View
-- -------------------------------------------------------------------------
-- | 0x1 0x0 0x0 0x0 | 0x2 0x0 0x0 0x0 | 0x3 0x0 0x0 0x0 | 0x4 0x0 0x0 0x0 |
-- | V (0), LE | V (1), LE | V (2), LE | V (3), LE |
-- Vector
-- -------------------------------------------------------------------------
-- | 0x4 0x0 0x0 0x0 | 0x3 0x0 0x0 0x0 | 0x2 0x0 0x0 0x0 | 0x1 0x0 0x0 0x0 |
-- | V (3), LE | V (2), LE | V (1), LE | V (0), LE |
-- -------------------------------------------------------------------------
-- These layouts are common to both the soft and hard implementations on
-- Altivec capable targets.
|
src/Adjunction.agda | nad/equality | 3 | 14443 | <reponame>nad/equality<filename>src/Adjunction.agda
------------------------------------------------------------------------
-- Adjunctions and monads (for 1-categories)
------------------------------------------------------------------------
-- The code is based on the presentation in the HoTT book (but might
-- not follow it exactly).
{-# OPTIONS --without-K --safe #-}
open import Equality
module Adjunction
{reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where
open import Prelude hiding (id)
open import Category eq
open Derived-definitions-and-properties eq
open import Functor eq
------------------------------------------------------------------------
-- Adjunctions
private
-- Is-left-adjoint-of ext F G means that F is a left adjoint of G.
-- This definition tries to follow the HoTT book closely.
Is-left-adjoint-of :
∀ {ℓ₁ ℓ₂} {C : Precategory ℓ₁ ℓ₂}
{ℓ₃ ℓ₄} {D : Precategory ℓ₃ ℓ₄} →
Extensionality (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄) (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄) →
C ⇨ D → D ⇨ C → Type _
Is-left-adjoint-of {ℓ₁} {ℓ₂} {C} {ℓ₃} {ℓ₄} {D} ext F G =
∃ λ (η : id⇨ ⇾ G ∙⇨ F) →
∃ λ (ε : F ∙⇨ G ⇾ id⇨) →
subst ((F ∙⇨ G) ∙⇨ F ⇾_) (id⇨∙⇨ ext₁) (ε ⇾∙⇨ F) ∙⇾
subst (_⇾ (F ∙⇨ G) ∙⇨ F) (∙⇨id⇨ ext₁)
(subst (F ∙⇨ id⇨ ⇾_) (∙⇨-assoc ext₁ F G) (F ⇨∙⇾ η))
≡
id⇾ F
×
subst (G ∙⇨ F ∙⇨ G ⇾_) (∙⇨id⇨ ext₂) (G ⇨∙⇾ ε) ∙⇾
subst (_⇾ G ∙⇨ F ∙⇨ G) (id⇨∙⇨ ext₂)
(subst (id⇨ ∙⇨ G ⇾_) (sym $ ∙⇨-assoc ext₂ G F) (η ⇾∙⇨ G))
≡
id⇾ G
where
ext₁ : Extensionality (ℓ₁ ⊔ ℓ₂) (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₄)
ext₁ = lower-extensionality (ℓ₃ ⊔ ℓ₄) ℓ₃ ext
ext₂ : Extensionality (ℓ₃ ⊔ ℓ₄) (ℓ₂ ⊔ ℓ₃ ⊔ ℓ₄)
ext₂ = lower-extensionality (ℓ₁ ⊔ ℓ₂) ℓ₁ ext
-- F ⊣ G means that F is a left adjoint of G.
--
-- This definition avoids the use of subst in the previous definition
-- by making use of the equality characterisation for natural
-- transformations (equality-characterisation⇾). I (NAD) took the idea
-- for this definition from the HoTT-Agda library
-- (https://github.com/HoTT/HoTT-Agda/blob/2871c6f6dbe90b47b3b2770e57abc4732cd1c295/theorems/homotopy/PtdAdjoint.agda).
--
-- TODO: Prove that the two definitions are equivalent.
_⊣_ :
∀ {ℓ₁ ℓ₂} {C : Precategory ℓ₁ ℓ₂}
{ℓ₃ ℓ₄} {D : Precategory ℓ₃ ℓ₄} →
C ⇨ D → D ⇨ C → Type _
_⊣_ {ℓ₁} {ℓ₂} {C} {ℓ₃} {ℓ₄} {D} F G =
∃ λ (η : id⇨ ⇾ G ∙⇨ F) →
∃ λ (ε : F ∙⇨ G ⇾ id⇨) →
(∀ {X} → transformation ε D.∙ (F ⊙ transformation η {X = X}) ≡ D.id)
×
(∀ {X} → (G ⊙ transformation ε {X = X}) C.∙ transformation η ≡ C.id)
where
open _⇾_
module C = Precategory C
module D = Precategory D
-- Adjunctions.
Adjunction :
∀ {ℓ₁ ℓ₂ ℓ₃ ℓ₄} →
Precategory ℓ₁ ℓ₂ → Precategory ℓ₃ ℓ₄ → Type _
Adjunction C D = ∃ λ (F : C ⇨ D) → ∃ λ (G : D ⇨ C) → F ⊣ G
------------------------------------------------------------------------
-- Monads
-- A monad on a precategory.
--
-- This definition is taken from Wikipedia
-- (https://en.wikipedia.org/wiki/Monad_%28category_theory%29).
Monad : ∀ {ℓ₁ ℓ₂} (C : Precategory ℓ₁ ℓ₂) → Type (ℓ₁ ⊔ ℓ₂)
Monad C =
∃ λ (F : C ⇨ C) →
∃ λ (η : id⇨ ⇾ F) →
∃ λ (μ : F ∙⇨ F ⇾ F) →
(∀ {X} → transformation μ ∙ (F ⊙ transformation μ {X = X})
≡
transformation μ ∙ transformation μ {X = F ⊚ X})
×
(∀ {X} → transformation μ ∙ (F ⊙ transformation η {X = X}) ≡ id)
×
(∀ {X} → transformation μ ∙ transformation η {X = F ⊚ X} ≡ id)
where
open _⇾_
open Precategory C
-- Adjunctions give rise to monads.
--
-- This definition is taken from Wikipedia
-- (https://en.wikipedia.org/wiki/Monad_%28category_theory%29).
adjunction→monad :
∀ {ℓ₁ ℓ₂} {C : Precategory ℓ₁ ℓ₂}
{ℓ₃ ℓ₄} {D : Precategory ℓ₃ ℓ₄} →
Adjunction C D → Monad C
adjunction→monad {C = C} {D = D} (F , G , η , ε , εFFη≡1 , GεηG≡1) =
G ∙⇨ F
, η
, GεF
, lemma₁
, lemma₂
, lemma₃
where
open _⇾_
module C = Precategory C
module D = Precategory D
-- This natural transformation is defined directly, rather than by
-- using composition, to avoid the use of casts.
GεF : (G ∙⇨ F) ∙⇨ (G ∙⇨ F) ⇾ G ∙⇨ F
natural-transformation GεF =
G ⊙ transformation ε
, nat
where
abstract
nat :
∀ {X Y} {f : C.Hom X Y} →
((G ∙⇨ F) ⊙ f) C.∙ (G ⊙ transformation ε) ≡
(G ⊙ transformation ε) C.∙ (((G ∙⇨ F) ∙⇨ (G ∙⇨ F)) ⊙ f)
nat {f = f} =
((G ∙⇨ F) ⊙ f) C.∙ (G ⊙ transformation ε) ≡⟨⟩
(G ⊙ F ⊙ f) C.∙ (G ⊙ transformation ε) ≡⟨ sym (⊙-∙ G) ⟩
G ⊙ ((F ⊙ f) D.∙ transformation ε) ≡⟨ cong (G ⊙_) (natural ε) ⟩
G ⊙ (transformation ε D.∙ (F ⊙ G ⊙ F ⊙ f)) ≡⟨ ⊙-∙ G ⟩
(G ⊙ transformation ε) C.∙ (G ⊙ F ⊙ G ⊙ F ⊙ f) ≡⟨⟩
(G ⊙ transformation ε) C.∙ (((G ∙⇨ F) ∙⇨ (G ∙⇨ F)) ⊙ f) ∎
abstract
lemma₁ :
∀ {X} →
transformation GεF {X = X} C.∙ ((G ∙⇨ F) ⊙ transformation GεF) ≡
transformation GεF C.∙ transformation GεF
lemma₁ =
(G ⊙ transformation ε) C.∙ (G ⊙ F ⊙ G ⊙ transformation ε) ≡⟨ sym (⊙-∙ G) ⟩
G ⊙ (transformation ε D.∙ (F ⊙ G ⊙ transformation ε)) ≡⟨ cong (G ⊙_) (sym $ natural ε) ⟩
G ⊙ (transformation ε D.∙ transformation ε) ≡⟨ ⊙-∙ G ⟩∎
(G ⊙ transformation ε) C.∙ (G ⊙ transformation ε) ∎
lemma₂ :
∀ {X} →
transformation GεF {X = X} C.∙ ((G ∙⇨ F) ⊙ transformation η) ≡
C.id
lemma₂ =
(G ⊙ transformation ε) C.∙ (G ⊙ F ⊙ transformation η) ≡⟨ sym (⊙-∙ G) ⟩
G ⊙ (transformation ε D.∙ (F ⊙ transformation η)) ≡⟨ cong (G ⊙_) εFFη≡1 ⟩
G ⊙ D.id ≡⟨ ⊙-id G ⟩∎
C.id ∎
lemma₃ :
∀ {X} →
transformation GεF {X = X} C.∙ transformation η ≡ C.id
lemma₃ =
(G ⊙ transformation ε) C.∙ transformation η ≡⟨ GεηG≡1 ⟩∎
C.id ∎
|
programs/oeis/294/A294246.asm | neoneye/loda | 22 | 16218 | <gh_stars>10-100
; A294246: Sum of the smaller parts of the partitions of 2n into two parts with smaller part nonsquarefree.
; 0,0,0,4,4,4,4,12,21,21,21,33,33,33,33,49,49,67,67,87,87,87,87,111,136,136,163,191,191,191,191,223,223,223,223,259,259,259,259,299,299,299,299,343,388,388,388,436,485,535,535,587,587,641,641,697,697,697
mov $3,$0
mov $6,$0
lpb $3
mov $0,$6
sub $3,1
sub $0,$3
mov $5,0
lpb $0
mov $2,$0
seq $2,75423 ; rad(n) - 1, where rad(n) is the squarefree kernel of n (A007947).
add $5,$0
mov $0,$2
mov $4,$2
min $4,1
add $5,$4
lpe
add $1,$5
lpe
mov $0,$1
|
programs/oeis/303/A303873.asm | neoneye/loda | 22 | 168278 | <gh_stars>10-100
; A303873: Total area of the family of squares with side length n such that n = p + q, p divides q and p < q.
; 0,0,9,16,25,72,49,128,162,200,121,576,169,392,675,768,289,1296,361,1600,1323,968,529,3456,1250,1352,2187,3136,841,5400,961,4096,3267,2312,3675,9072,1369,2888,4563,9600,1681,10584,1849,7744,10125,4232,2209,18432
add $0,1
mov $2,3
mov $3,$0
mov $4,$0
lpb $3
mov $5,$4
lpb $5
add $1,$4
mov $6,$0
mul $0,$2
div $0,$2
mod $6,$2
cmp $6,0
sub $5,$6
lpe
add $2,1
mov $6,$0
cmp $6,1
cmp $6,0
sub $3,$6
lpe
mov $0,$1
|
programs/oeis/047/A047624.asm | neoneye/loda | 22 | 166095 | ; A047624: Numbers that are congruent to {0, 1, 3, 5} mod 8.
; 0,1,3,5,8,9,11,13,16,17,19,21,24,25,27,29,32,33,35,37,40,41,43,45,48,49,51,53,56,57,59,61,64,65,67,69,72,73,75,77,80,81,83,85,88,89,91,93,96,97,99,101,104,105,107,109,112,113,115,117,120,121,123,125,128,129,131,133,136,137,139,141,144,145,147,149,152,153,155,157,160,161,163,165,168,169,171,173,176,177,179,181,184,185,187,189,192,193,195,197
mov $1,$0
mul $0,8
add $1,11
mod $1,4
add $0,$1
sub $0,3
div $0,4
|
cards/bn5/ItemCards/136-E009 Ray's Locator.asm | RockmanEXEZone/MMBN-Mod-Card-Kit | 10 | 98831 | .include "defaults_item.asm"
table_file_jp equ "exe5-utf8.tbl"
table_file_en equ "bn5-utf8.tbl"
game_code_len equ 3
game_code equ 0x4252424A // BRBJ
game_code_2 equ 0x42524245 // BRBE
game_code_3 equ 0x42524250 // BRBP
card_type equ 0
card_id equ 9
card_no equ "009"
card_sub equ "Item Card 009"
card_sub_x equ 62
card_desc_len equ 1
card_desc_1 equ "Ray's Locator"
card_desc_2 equ ""
card_desc_3 equ ""
card_name_jp_full equ "西古レイの探し物"
card_name_jp_game equ "さいこレイのさがしもの"
card_name_en_full equ "Ray's Locator"
card_name_en_game equ "Ray's Locator"
card_game_desc_jp_len equ 2
card_game_desc_jp_1 equ "さいこレイのさがしもの!"
card_game_desc_jp_2 equ "エネミーサーチを3コ手に入れた!"
card_game_desc_jp_3 equ ""
card_game_desc_en_len equ 2
card_game_desc_en_1 equ "Ray's locator!"
card_game_desc_en_2 equ "Got 3 LocEnemy!"
card_game_desc_en_3 equ "" |
Driver/Printer/DotMatrix/Gemini9/gemini9Manager.asm | steakknife/pcgeos | 504 | 171629 | COMMENT }%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Bluechip 9-pin printer driver
FILE: gemini9Manager.asm
AUTHOR: <NAME>
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 3/90 initial version
DESCRIPTION:
This file contains the source for the bchip 9-pin printer driver
$Id: gemini9Manager.asm,v 1.1 97/04/18 11:54:34 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%}
;--------------------------------------
; Include files
;--------------------------------------
include printcomInclude.def
;------------------------------------------------------------------------------
; Constants and Macros
;------------------------------------------------------------------------------
include printcomConstant.def
include gemini9Constant.def
include printcomMacro.def
include printcomDotMatrix.rdef
;------------------------------------------------------------------------------
; Driver Info Table
;------------------------------------------------------------------------------
idata segment ; MODULE_FIXED
DriverTable DriverExtendedInfoStruct \
< <Entry:DriverStrategy,
mask DA_HAS_EXTENDED_INFO,
DRIVER_TYPE_PRINTER >,
handle DriverInfo
>
public DriverTable
idata ends
;------------------------------------------------------------------------------
; Entry Code
;------------------------------------------------------------------------------
Entry segment resource ; MODULE_FIXED
include printcomEntry.asm ; entry point, misc bookeeping routines
include printcomTables.asm ; jump table for some driver calls
include printcomInfo.asm ; various info getting/setting routines
include printcomAdmin.asm ; misc init routines
include printcomNoEscapes.asm ; module jump table for driver escape calls
Entry ends
;------------------------------------------------------------------------------
; Driver code
;------------------------------------------------------------------------------
CommonCode segment resource ; MODULE_STANDARD
include printcomIBMJob.asm ; StartJob/EndJob/SetPaperpath routines
include printcomDotMatrixDialog.asm ; code to implement UI setting
include printcomDotMatrixPage.asm ; code to implement Page routines
include printcomEpsonMXText.asm ; common code to implement text routines
include printcomEpsonStyles.asm ; code to implement Style setting routines
include printcomStream.asm ; code to talk with the stream driver
include printcomDotMatrixBuffer.asm ; code to deal with graphic print buffers
include printcomNoColor.asm ; code to implement Color routines
include printcomStarSGGraphics.asm ; common Star 9-pin graphics routines
include printcomStarSGCursor.asm ; common Epson 9-pin cursor routines
include gemini9ControlCodes.asm ; Tables of printer commands
CommonCode ends
;------------------------------------------------------------------------------
; Device Info Resources (each in their own resource)
;------------------------------------------------------------------------------
include gemini9DriverInfo.asm ; overall driver info
include gemini9Info.asm ; specific info for generic printer
include gemini9wInfo.asm ; specific info for generic wide printer
end
|
tests/testdata/tbuilder-in-16-bad.asm | roycrippen/sicxe | 0 | 10968 | test START 0
EXTDEF foo
foo EQU 1 * 2 * 3 * 4 + 500 . error: exported symbol must be relative
END test
|
kv-avm-comm_tests.adb | davidkristola/vole | 4 | 7011 | <reponame>davidkristola/vole<filename>kv-avm-comm_tests.adb
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Ada.Streams.Stream_IO;
with Interfaces;
with AUnit.Assertions; use AUnit.Assertions;
with kv.avm.Ini;
with kv.avm.Capabilities;
with kv.avm.Control;
with kv.avm.Registers;
with kv.avm.Machines;
with kv.avm.Services;
with kv.avm.Affiliates;
with kv.avm.Clients;
with kv.avm.Servers;
with kv.avm.Tuples;
with kv.avm.Transactions;
with kv.avm.Brokers;
with kv.avm.Actor_References;
with kv.avm.Memories;
with kv.avm.Log;
with kv.avm.Transactions.Basic;
with kv.avm.Messages;
with kv.avm.Processors;
with kv.avm.Instances;
with kv.avm.Test.Runners;
with kv.avm.Routers;
with kv.avm.Actors;
package body kv.avm.Comm_Tests is
use Interfaces;
package SIO renames Ada.Streams.Stream_IO;
-----------------------------------------------------------------------------
procedure Set_Up (T : in out Comm_Test_Case) is
begin
kv.avm.Log.Verbose := False;
end Set_Up;
-----------------------------------------------------------------------------
procedure Tear_Down (T : in out Comm_Test_Case) is
begin
null;
end Tear_Down;
-----------------------------------------------------------------------------
function Name(T : Test_01) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 01: ini.");
end Name;
procedure Run_Test(T : in out Test_01) is
Settings : kv.avm.Ini.Settings_Type;
Tuple : kv.avm.Tuples.Tuple_Type;
Element : access constant kv.avm.Registers.Register_Type;
use kv.avm.Registers;
begin
Put_Line("test 01");
Settings.Parse_Line("#water = liquid");
Settings.Parse_Line("port = 13");
Settings.Parse_Line("pi = 3.14");
Assert(not Settings.Has("water"), "invalid key error");
Assert(Settings.Has("port"), "valid key error(port)");
Assert(Settings.Has("pi"), "valid key error(pi)");
Assert(Settings.Lookup_As_String("port") = "13", "string lookup error");
Assert(Settings.Lookup_As_Integer("port") = 13, "integer lookup error");
Assert(Settings.Lookup_As_String("pi") = "3.14", "string lookup error(pi)");
Assert(Settings.Value_Count_For_Key("pi") = 1, "wrong value count for pi");
Settings.Parse_Line("affiliate_address = [""localhost"", 29678]");
Settings.Parse_Line("affiliate_address = [""192.168.127.12"", 29678]");
Assert(Settings.Value_Count_For_Key("affiliate_address") = 2, "wrong value count for affiliate_address");
Assert(Settings.Lookup_As_String("affiliate_address", 2) = "[""192.168.127.12"", 29678]", "indexed string lookup error");
Put_Line("test 01 -- Lookup_As_Tuple");
Tuple := Settings.Lookup_As_Tuple("affiliate_address", 2);
Put_Line("test 01 -- Peek");
Element := Tuple.Peek(0);
Assert(Element.The_String = "192.168.127.12", "wrong IP address (got '" & (+Element.The_String) & "', expexted '192.168.127.12'");
Element := Tuple.Peek(1);
Assert(Element.all = Make_S(29678), "tuple port lookup error");
end Run_Test;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
package Test_Cap is
type Fake_Cap_Type is new kv.avm.Capabilities.Capability_Interface with
record
Called : Boolean := False;
end record;
overriding procedure Execute
(Self : in out Fake_Cap_Type;
Machine : in out kv.avm.Control.Control_Interface'CLASS;
Input : in kv.avm.Registers.Register_Type;
Output : out kv.avm.Registers.Register_Type;
Status : out kv.avm.Control.Status_Type);
end Test_Cap;
package body Test_Cap is
procedure Execute
(Self : in out Fake_Cap_Type;
Machine : in out kv.avm.Control.Control_Interface'CLASS;
Input : in kv.avm.Registers.Register_Type;
Output : out kv.avm.Registers.Register_Type;
Status : out kv.avm.Control.Status_Type) is
begin
Self.Called := True;
Output := kv.avm.Registers.Make_U(1397);
Status := kv.avm.Control.Active;
end Execute;
end Test_Cap;
-----------------------------------------------------------------------------
function Name(T : Test_02) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 02: capabilities.");
end Name;
procedure Run_Test(T : in out Test_02) is
Cap_Pool : kv.avm.Capabilities.Capabilities_Type;
Cap : aliased Test_Cap.Fake_Cap_Type;
Reg_In : kv.avm.Registers.Register_Type := kv.avm.Registers.Make_S(0);
Reg_Out : kv.avm.Registers.Register_Type;
VM : aliased kv.avm.Machines.Machine_Type;
Status : kv.avm.Control.Status_Type;
use kv.avm.Control;
begin
Put_Line("test 02");
Cap_Pool.Add("Fake", Cap'UNCHECKED_ACCESS);
Assert(Cap_Pool.Has("Fake"), "has error");
Assert(not Cap_Pool.Has("Real"), "not has error");
Assert(not Cap.Called, "Cap init'd to called");
Cap_Pool.Execute("Fake", VM, Reg_In, Reg_Out, Status);
Assert(Status = Active, "wrong good status");
Assert(Cap.Called, "Cap not called");
Cap_Pool.Execute("Real", VM, Reg_In, Reg_Out, Status);
Assert(Status = Error, "wrong bad status");
end Run_Test;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
package Test_Client is
type Fake_Client_Type is new kv.avm.Clients.Client_Interface with
record
Status : kv.avm.Clients.Status_Type := kv.avm.Clients.Uninitialized;
Port : Natural := 0;
Address : Unbounded_String;
Pending : kv.avm.Transactions.Transactions_Access;
Domain : Interfaces.Unsigned_32;
Drop_Transaction : Boolean := False;
Drop_Count : Natural := 0;
end record;
type Fake_Client_Access is access all Fake_Client_Type;
overriding procedure Bind_Address
(Self : in out Fake_Client_Type;
Address : in String);
overriding procedure Bind_Port
(Self : in out Fake_Client_Type;
Port : in Positive);
overriding procedure Open
(Self : in out Fake_Client_Type);
overriding procedure Close
(Self : in out Fake_Client_Type);
overriding function Get_Status
(Self : Fake_Client_Type) return kv.avm.Clients.Status_Type;
overriding function Is_Open
(Self : Fake_Client_Type) return Boolean;
overriding procedure Send_Transaction
(Self : in out Fake_Client_Type;
Transaction : in kv.avm.Transactions.Transactions_Interface'CLASS);
overriding procedure Conclude_Transaction
(Self : in out Fake_Client_Type);
overriding function Is_Transaction_Pending(Self : Fake_Client_Type) return Boolean;
overriding function Get_Transaction(Self : Fake_Client_Type) return kv.avm.Transactions.Transactions_Access;
overriding
function Get_Domain(Self : Fake_Client_Type) return Interfaces.Unsigned_32;
type Fake_Client_Factory is new kv.avm.Clients.Client_Factory with null record;
overriding procedure New_Client
(Self : in out Fake_Client_Factory;
Client : out kv.avm.Clients.Client_Access);
end Test_Client;
package body Test_Client is
-------------------------------------------------------------------------
procedure Bind_Address
(Self : in out Fake_Client_Type;
Address : in String) is
begin
kv.avm.Log.Put_Line("Test_Client.Bind_Address called with <" & Address & ">");
Self.Address := To_Unbounded_String(Address);
if Self.Port /= 0 then
Self.Status := kv.avm.Clients.Closed;
end if;
end;
-------------------------------------------------------------------------
procedure Bind_Port
(Self : in out Fake_Client_Type;
Port : in Positive) is
begin
Self.Port := Port;
if Self.Address /= "" then
Self.Status := kv.avm.Clients.Closed;
end if;
end;
-------------------------------------------------------------------------
procedure Open
(Self : in out Fake_Client_Type) is
begin
Self.Status := kv.avm.Clients.Running;
end;
-------------------------------------------------------------------------
procedure Close
(Self : in out Fake_Client_Type) is
begin
Self.Status := kv.avm.Clients.Closed;
end;
-------------------------------------------------------------------------
function Get_Status
(Self : Fake_Client_Type) return kv.avm.Clients.Status_Type is
begin
return Self.Status;
end Get_Status;
-------------------------------------------------------------------------
function Is_Open
(Self : Fake_Client_Type) return Boolean is
begin
return Self.Status in kv.avm.Clients.Open_Status_Type;
end Is_Open;
-------------------------------------------------------------------------
procedure Send_Transaction
(Self : in out Fake_Client_Type;
Transaction : in kv.avm.Transactions.Transactions_Interface'CLASS) is
begin
if Self.Drop_Transaction then
Self.Drop_Count := Self.Drop_Count + 1;
else
Self.Status := kv.avm.Clients.Transacting;
Self.Pending := Transaction.New_Copy;
end if;
end Send_Transaction;
-------------------------------------------------------------------------
procedure Conclude_Transaction
(Self : in out Fake_Client_Type) is
begin
kv.avm.Transactions.Free(Self.Pending);
Self.Status := kv.avm.Clients.Running;
end Conclude_Transaction;
-------------------------------------------------------------------------
function Is_Transaction_Pending(Self : Fake_Client_Type) return Boolean is
use kv.avm.Transactions;
begin
return Self.Pending /= null;
end Is_Transaction_Pending;
-------------------------------------------------------------------------
function Get_Transaction(Self : Fake_Client_Type) return kv.avm.Transactions.Transactions_Access is
begin
return Self.Pending;
end Get_Transaction;
-------------------------------------------------------------------------
function Get_Domain(Self : Fake_Client_Type) return Interfaces.Unsigned_32 is
begin
return Self.Domain;
end Get_Domain;
-------------------------------------------------------------------------
procedure New_Client
(Self : in out Fake_Client_Factory;
Client : out kv.avm.Clients.Client_Access) is
begin
kv.avm.Log.Put_Line("Test_Client.New_Client called");
Client := new Fake_Client_Type;
end;
end Test_Client;
-----------------------------------------------------------------------------
function Name(T : Test_03) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 03: affiliates.");
end Name;
procedure Run_Test(T : in out Test_03) is
Settings : kv.avm.Ini.Settings_Type;
Affiliator : kv.avm.Affiliates.Affiliates_Type;
Factory : aliased Test_Client.Fake_Client_Factory;
Client : kv.avm.Clients.Client_Access;
Fake_Client : Test_Client.Fake_Client_Access;
use kv.avm.Clients;
begin
Put_Line("test 03");
Settings.Parse_Line("server_port = localhost");
Settings.Parse_Line("affiliate_address = [""localhost"", 29678]");
Settings.Parse_Line("affiliate_address = [""192.168.127.12"", 29678]");
Affiliator.Initialize(Settings, null, Factory'UNCHECKED_ACCESS, null);
Assert(Affiliator.Client_Count = 2, "wrong number of clients");
Client := Affiliator.Get_Client(1);
Assert(not Client.Is_Open, "client 1 should not be open");
Fake_Client := Test_Client.Fake_Client_Access(Client);
Assert(Fake_Client.Port = 29678, "fake client 1 has wrong port");
Fake_Client.Domain := 88;
Client := Affiliator.Get_Client(2);
Assert(not Client.Is_Open, "client 2 should not be open");
Fake_Client := Test_Client.Fake_Client_Access(Client);
Assert(Fake_Client.Address = "192.168.127.12", "fake client 2 has wrong address");
Fake_Client.Domain := 77;
Affiliator.Open_Clients;
Assert(Client.Is_Open, "client 2 should be open");
-- Check domain-related processing
Client := Affiliator.Get_Domain_Client(66);
Assert(Client = null, "Get_Domain_Client returned non-null for an invalid domain");
Client := Affiliator.Get_Domain_Client(88);
Assert(Client /= null, "Get_Domain_Client returned null for a valid domain (88)");
Assert(Client.Get_Domain = 88, "expected 88, got" & Interfaces.Unsigned_32'IMAGE(Client.Get_Domain));
Client := Affiliator.Get_Domain_Client(77);
Assert(Client /= null, "Get_Domain_Client returned null for a valid domain (77)");
Assert(Client.Get_Domain = 77, "expected 77, got" & Interfaces.Unsigned_32'IMAGE(Client.Get_Domain));
end Run_Test;
-----------------------------------------------------------------------------
function Name(T : Test_04) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 04: capabilities II.");
end Name;
procedure Run_Test(T : in out Test_04) is
Cap_Pool : kv.avm.Capabilities.Capabilities_Type;
Cap : aliased Test_Cap.Fake_Cap_Type;
Reg_In : kv.avm.Registers.Register_Type := kv.avm.Registers.Make_S(0);
Reg_Out : kv.avm.Registers.Register_Type;
VM : aliased kv.avm.Machines.Machine_Type;
Status : kv.avm.Control.Status_Type;
use kv.avm.Control;
use kv.avm.Registers;
begin
Put_Line("test 04");
VM.Set_Capabilities(Cap_Pool);
Cap_Pool.Add("Fake", Cap'UNCHECKED_ACCESS);
Assert(not Cap.Called, "Cap init'd to called");
VM.Trap_To_The_Machine("Fake", Reg_In, Reg_Out, Status);
Assert(Status = Active, "wrong good status");
Assert(Cap.Called, "Cap not called");
Assert(Reg_Out = kv.avm.Registers.Make_U(1397), "trap output is wrong");
end Run_Test;
-----------------------------------------------------------------------------
function Name(T : Test_05) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 05: brokers.");
end Name;
procedure Run_Test(T : in out Test_05) is
Broker : aliased kv.avm.Brokers.Broker_Type;
Cap_Pool : kv.avm.Capabilities.Capabilities_Type;
Actor_Ref : kv.avm.Actor_References.Actor_Reference_Type;
VM : aliased kv.avm.Machines.Machine_Type;
Status : kv.avm.Control.Status_Type;
Broker_Key : constant String := "Broker";
Registered_Actor_Name : constant String := "Test_Actor";
UnRegistered_Actor_Name : constant String := "Bad_Actor";
Runtime_Added_Actor_Name : constant String := "Added_Later";
Broker_Get_Operation : constant String := "Get";
Broker_Has_Operation : constant String := "Has";
Broker_Add_Operation : constant String := "Add";
Reg_In : kv.avm.Registers.Register_Type;
Reg_Out : kv.avm.Registers.Register_Type;
use kv.avm.Control;
use kv.avm.Registers;
use kv.avm.Actor_References;
function Make_Request(Parameters : kv.avm.Memories.Register_Set_Type) return kv.avm.Registers.Register_Type is
Request_Information : kv.avm.Memories.Register_Array_Type;
Request : kv.avm.Tuples.Tuple_Type;
begin
Request_Information.Initialize(Parameters);
Request.Fold(Request_Information);
return Make_Tuple(Request);
end Make_Request;
begin
Put_Line("test 05");
--kv.avm.Log.Verbose := True;
VM.Set_Capabilities(Cap_Pool);
Cap_Pool.Add(Broker_Key, Broker'UNCHECKED_ACCESS);
Actor_Ref.Initialize(512);
-- Add it to the broker with a name
Broker.Add(Actor_Ref, Registered_Actor_Name);
-- execute the broker passing in the name
Reg_In := Make_Request( (Make_String(Broker_Get_Operation), Make_String(Registered_Actor_Name)) );
VM.Trap_To_The_Machine(Broker_Key, Reg_In, Reg_Out, Status);
-- check to see that the instance reference is returned
Assert(Status = Active, "wrong status (Get)");
Assert(Reg_Out.Format = Actor_Reference, "wrong return type (Get)");
Assert(Reg_Out.Instance = Actor_Ref, "Broker.Get operation did not return the supplied actor reference");
Reg_In := Make_Request( (Make_String(Broker_Has_Operation), Make_String(UnRegistered_Actor_Name)) );
VM.Trap_To_The_Machine(Broker_Key, Reg_In, Reg_Out, Status);
Assert(Status = Active, "wrong status (Has)"); -- Status is always Active unless there is a fatal error
Assert(Reg_Out.Format = Bit_Or_Boolean, "wrong return type (Has)");
Assert(not Reg_Out.Bit, "Broker.Has returned True when asked about the unregistered actor");
Reg_In := Make_Request( (Make_String(Broker_Has_Operation), Make_String(Registered_Actor_Name)) );
VM.Trap_To_The_Machine(Broker_Key, Reg_In, Reg_Out, Status);
Assert(Reg_Out.Bit, "Broker.Has returned False when asked about the test actor");
Actor_Ref.Initialize(87);
Reg_In := Make_Request( (Make_String(Broker_Add_Operation), Make_String(Runtime_Added_Actor_Name), Make_Ref(Actor_Ref)) );
VM.Trap_To_The_Machine(Broker_Key, Reg_In, Reg_Out, Status);
Assert(Broker.Is_Available(Runtime_Added_Actor_Name), "Runtime add didn't work");
Reg_In := Make_Request( (Make_String("Not_A_Valid_Operation"), Make_String(Runtime_Added_Actor_Name)) );
VM.Trap_To_The_Machine(Broker_Key, Reg_In, Reg_Out, Status);
Assert(Status = Error, "wrong status (Not_A_Valid_Operation)");
end Run_Test;
-----------------------------------------------------------------------------
function Make_Tuple(Parameters : kv.avm.Memories.Register_Set_Type) return kv.avm.Tuples.Tuple_Type is
Prepared_Data : kv.avm.Memories.Register_Array_Type;
Folded_Data : kv.avm.Tuples.Tuple_Type;
begin
Prepared_Data.Initialize(Parameters);
Folded_Data.Fold(Prepared_Data);
return Folded_Data;
end Make_Tuple;
-----------------------------------------------------------------------------
function Name(T : Test_06) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 06: transaction streaming.");
end Name;
procedure Run_Test(T : in out Test_06) is
use kv.avm.Registers;
File_Name : constant String := "comm_test_06_stream_data.bin";
File_Out : SIO.File_Type;
Stream_Out : SIO.Stream_Access;
File_In : SIO.File_Type;
Stream_In : SIO.Stream_Access;
Reg_Out : Register_Type;
Reg_In : Register_Type;
Close_Out : kv.avm.Transactions.Basic.Close_Connections_Type;
Close_In : kv.avm.Transactions.Transactions_Access;
Broker_Out : kv.avm.Transactions.Basic.Register_Instance_Type;
Broker_In : kv.avm.Transactions.Transactions_Access;
Reply_Out : kv.avm.Transactions.Basic.Reply_Transaction_Type;
Reply_In : kv.avm.Transactions.Transactions_Access;
Inner_Tuple : kv.avm.Tuples.Tuple_Type;
Outer_Tuple : kv.avm.Tuples.Tuple_Type;
Message_Out : kv.avm.Transactions.Basic.Send_Message_Type;
Message_In : kv.avm.Transactions.Transactions_Access;
Test_Message : kv.avm.Messages.Message_Type;
AR_Src : kv.avm.Actor_References.Actor_Reference_Type;
AR_Rep : kv.avm.Actor_References.Actor_Reference_Type;
AR_Dst : kv.avm.Actor_References.Actor_Reference_Type;
use kv.avm.Transactions;
use Interfaces;
use kv.avm.Tuples;
begin
Put_Line("test 06");
-- Set up output data
Reg_Out := kv.avm.Registers.Make_String("Hello World!");
Broker_Out.Set_Name("One");
Inner_Tuple := Make_Tuple( (Reg_Out, kv.avm.Registers.Make_U(100)) );
Outer_Tuple := Make_Tuple( (kv.avm.Registers.Make_S(-99), kv.avm.Registers.Make_Tuple(Inner_Tuple)) );
Reply_Out.Set_Data(Outer_Tuple);
Reply_Out.Set_Future(16384);
AR_Src.Initialize(65);
AR_Rep.Initialize(66);
AR_Dst.Initialize(67);
Test_Message.Initialize
(Source => AR_Src,
Reply_To => AR_Rep,
Destination => AR_Dst,
Message_Name => "Test_Message",
Data => Inner_Tuple,
Future => 32768);
Message_Out.Set_Message(Test_Message);
SIO.Create(File_Out, SIO.Out_File, File_Name);
Stream_Out := SIO.Stream(File_Out);
Register_Type'WRITE(Stream_Out, Reg_Out);
kv.avm.Transactions.Transactions_Interface'CLASS'OUTPUT(Stream_Out, Close_Out);
kv.avm.Transactions.Transactions_Interface'CLASS'OUTPUT(Stream_Out, Broker_Out);
kv.avm.Transactions.Transactions_Interface'CLASS'OUTPUT(Stream_Out, Reply_Out);
kv.avm.Transactions.Transactions_Interface'CLASS'OUTPUT(Stream_Out, Message_Out);
-- ...
SIO.Close(File_Out);
SIO.Open(File_In, SIO.In_File, File_Name);
Stream_In := SIO.Stream(File_In);
Register_Type'READ(Stream_In, Reg_In);
Close_In := kv.avm.Transactions.New_Transaction_From_Stream(Stream_In);
Broker_In := kv.avm.Transactions.New_Transaction_From_Stream(Stream_In);
Reply_In := kv.avm.Transactions.New_Transaction_From_Stream(Stream_In);
Message_In := kv.avm.Transactions.New_Transaction_From_Stream(Stream_In);
-- ...
SIO.Close(File_In);
-- Check the data
Assert(Reg_In = Reg_Out, "register streaming failed");
Assert(Close_Out.Equals(Close_In.all), "close connection transaction streaming failed");
Assert(Broker_Out.Equals(Broker_In.all), "register instance transaction streaming failed");
Assert(Basic.Reply_Transaction_Type(Reply_In.all).Get_Future = 16384, "wrong future");
Assert(Basic.Reply_Transaction_Type(Reply_In.all).Get_Data.Peek(1).Folded_Tuple.Peek(0).all = Reg_Out, "wrong Peek(1).Peek(0) from " & Basic.Reply_Transaction_Type(Reply_In.all).Get_Data.To_String);
Assert(Basic.Reply_Transaction_Type(Reply_In.all).Get_Data = Outer_Tuple, "wrong tuple");
Assert(Reply_Out.Equals(Reply_In.all), "reply transaction streaming failed");
Assert(Message_Out.Equals(Message_In.all), "send message transaction streaming failed");
end Run_Test;
-----------------------------------------------------------------------------
function Name(T : Test_07) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 07: Routing.");
end Name;
procedure Run_Test(T : in out Test_07) is
VM : aliased kv.avm.Machines.Machine_Type;
CPU : aliased kv.avm.Processors.Processor_Type;
Instance_Factory : aliased kv.avm.Test.Runners.Runner_Factory;
Router : kv.avm.Routers.Router_Type;
Runner : kv.avm.Test.Runners.Runner_Access;
Local_Actor_Ref : kv.avm.Actor_References.Actor_Reference_Type;
Remote_Actor_Ref : kv.avm.Actor_References.Actor_Reference_Type;
Status : kv.avm.Control.Status_Type;
Message : kv.avm.Messages.Message_Type;
Fixed : kv.avm.Memories.Register_Array_Type;
Actor : kv.avm.Actors.Actor_Access;
Data : kv.avm.Tuples.Tuple_Type;
Settings : kv.avm.Ini.Settings_Type;
Affiliator : kv.avm.Affiliates.Affiliates_Type;
Client_Factory : aliased Test_Client.Fake_Client_Factory;
Client : kv.avm.Clients.Client_Access;
Fake_Client : Test_Client.Fake_Client_Access;
TEST_DOMAIN : constant Interfaces.Unsigned_32 := 400;
Transaction : kv.avm.Transactions.Transactions_Access;
Sent_Transaction : kv.avm.Transactions.Basic.Send_Message_Access;
Sent_Message : kv.avm.Messages.Message_Type;
use kv.avm.Clients;
use kv.avm.Control;
begin
Put_Line("test 07");
--kv.avm.Log.Verbose := True;
kv.avm.Actor_References.Set_Local_Domain(13);
VM.Initialize(CPU'UNCHECKED_ACCESS, Instance_Factory'UNCHECKED_ACCESS);
CPU.Initialize(VM'UNCHECKED_ACCESS);
Router := VM.Get_Router;
Actor := kv.avm.Actors.New_Actor("A1", null, 0, Fixed);
VM.New_Actor("A1", Local_Actor_Ref);
Assert(Local_Actor_Ref.Is_Local, "local actor ref reports remote");
Runner := Instance_Factory.Get_Runner_By_ID(1); -- ID = count
Data.Fold_Empty;
Settings.Parse_Line("server_port = localhost");
Settings.Parse_Line("affiliate_address = [""localhost"", 29678]");
Affiliator := Router.Get_Affiliator;
Affiliator.Initialize(Settings, null, Client_Factory'UNCHECKED_ACCESS, VM'UNCHECKED_ACCESS);
Client := Affiliator.Get_Client(1);
Fake_Client := Test_Client.Fake_Client_Access(Client);
Fake_Client.Domain := TEST_DOMAIN;
-- Create a local message and make sure it is routed locally
Message.Initialize
(Source => kv.avm.Actor_References.Null_Reference,
Reply_To => kv.avm.Actor_References.Null_Reference,
Destination => Local_Actor_Ref,
Message_Name => "Local",
Data => Data,
Future => 0);
Router.Post_Message(Message, Status);
Assert(Runner.Last_Msg.Get_Name = "Local", "the 'Local' message wasn't delivered");
-- Create a remote message and make sure it is routed to the right client
Remote_Actor_Ref.Initialize(Key => 800, Domain => TEST_DOMAIN);
Assert(not Remote_Actor_Ref.Is_Local, "remote actor ref reports local");
Put_Line(Remote_Actor_Ref.Image);
Message.Finalize;
Message.Initialize
(Source => kv.avm.Actor_References.Null_Reference,
Reply_To => kv.avm.Actor_References.Null_Reference,
Destination => Remote_Actor_Ref,
Message_Name => "Remote",
Data => Data,
Future => 0);
Router.Post_Message(Message, Status);
Assert(Status = Active, "Expected status to be Active, but it was " & kv.avm.Control.Status_Type'IMAGE(Status));
Assert(Client.Is_Transaction_Pending, "Expected a transaction to be pending (due to send_transaction)");
Transaction := Client.Get_Transaction;
Assert(Transaction.all in kv.avm.Transactions.Basic.Send_Message_Type, "wrong transaction type");
Sent_Transaction := kv.avm.Transactions.Basic.Send_Message_Access(Transaction);
Sent_Message := Sent_Transaction.Get_Message;
Put_Line("Sent_Message = " & Sent_Message.Debug);
Assert(Sent_Message.Get_Name = "Remote", "wrong message");
Client.Conclude_Transaction; -- Free the allocated copy of the transaction
Assert(not Client.Is_Transaction_Pending, "Expected a transaction to be NOT pending");
-- Check remote replies replies
Router.Post_Response
(Reply_To => Remote_Actor_Ref,
Answer => Data,
Future => 32);
Assert(Client.Is_Transaction_Pending, "Expected a transaction to be pending (due to Reply_Transaction)");
Transaction := Client.Get_Transaction;
Assert(Transaction.all in kv.avm.Transactions.Basic.Reply_Transaction_Type, "wrong transaction type (expected Reply_Transaction_Type)");
kv.avm.Clients.Free(Client);
end Run_Test;
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
package Fake_Servers is
type Server_Type;
type Server_Access is access all Server_Type;
type Server_Type is new kv.avm.Servers.Server_Interface with
record
Myself : Server_Access;
Poll_Count : Natural := 0;
Connection : Test_Client.Fake_Client_Access;
end record;
procedure Initialize(Self : access Server_Type);
procedure Pend_Client
(Self : in out Server_Type;
Domain : in Interfaces.Unsigned_32);
overriding
function Is_Connection_Waiting(Self : Server_Type) return Boolean;
overriding
function Get_Connection(Self : Server_Type) return kv.avm.Clients.Client_Access;
end Fake_Servers;
package body Fake_Servers is
-------------------------------------------------------------------------
procedure Initialize(Self : access Server_Type) is
begin
Self.Myself := Self.all'UNCHECKED_ACCESS;
end Initialize;
-------------------------------------------------------------------------
procedure Pend_Client
(Self : in out Server_Type;
Domain : in Interfaces.Unsigned_32) is
begin
Self.Connection := new Test_Client.Fake_Client_Type;
Self.Connection.Open;
Self.Connection.Domain := Domain;
end Pend_Client;
-------------------------------------------------------------------------
function Is_Connection_Waiting(Self : Server_Type) return Boolean is
use Test_Client;
begin
return Self.Connection /= null;
end Is_Connection_Waiting;
-------------------------------------------------------------------------
function Get_Connection(Self : Server_Type) return kv.avm.Clients.Client_Access is
Answer : kv.avm.Clients.Client_Access := kv.avm.Clients.Client_Access(Self.Connection);
begin
Self.Myself.Connection := null;
return Answer;
end Get_Connection;
end Fake_Servers;
-----------------------------------------------------------------------------
function Name(T : Test_08) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 08: Affiliates -- receive side.");
end Name;
procedure Run_Test(T : in out Test_08) is
VM : aliased kv.avm.Machines.Machine_Type;
CPU : aliased kv.avm.Processors.Processor_Type;
Instance_Factory : aliased kv.avm.Test.Runners.Runner_Factory;
Settings : kv.avm.Ini.Settings_Type;
Affiliator : kv.avm.Affiliates.Affiliates_Type;
Client_Factory : aliased Test_Client.Fake_Client_Factory;
Client : kv.avm.Clients.Client_Access;
Client_1 : Test_Client.Fake_Client_Access;
Client_2 : Test_Client.Fake_Client_Access;
TEST_DOMAIN : constant Interfaces.Unsigned_32 := 399;
ADDED_DOMAIN : constant Interfaces.Unsigned_32 := 401;
Server : aliased Fake_Servers.Server_Type;
Send_Transaction : kv.avm.Transactions.Basic.Send_Message_Type;
Reply_Transaction : kv.avm.Transactions.Basic.Reply_Transaction_Type;
Actor_1_Ref : kv.avm.Actor_References.Actor_Reference_Type;
Actor_2_Ref : kv.avm.Actor_References.Actor_Reference_Type;
Message : kv.avm.Messages.Message_Type;
Data : kv.avm.Tuples.Tuple_Type;
use kv.avm.Clients;
use kv.avm.Transactions;
begin
Put_Line("test 08");
kv.avm.Log.Verbose := True;
kv.avm.Actor_References.Set_Local_Domain(14);
VM.Initialize(CPU'UNCHECKED_ACCESS, Instance_Factory'UNCHECKED_ACCESS);
CPU.Initialize(VM'UNCHECKED_ACCESS);
Affiliator := VM.Get_Router.Get_Affiliator;
Settings.Parse_Line("server_port = localhost");
Settings.Parse_Line("affiliate_address = [""localhost"", 29678]");
Server.Initialize;
Affiliator.Initialize(Settings, Server'UNCHECKED_ACCESS, Client_Factory'UNCHECKED_ACCESS, VM'UNCHECKED_ACCESS);
Client := Affiliator.Get_Client(1);
Client_1 := Test_Client.Fake_Client_Access(Client);
Client_1.Domain := TEST_DOMAIN;
Actor_1_Ref.Initialize(8, TEST_DOMAIN);
Actor_2_Ref.Initialize(9, ADDED_DOMAIN);
Data.Fold_Empty;
-- poll the affiliator
Affiliator.Periodic_Processing;
Assert(Affiliator.Client_Count = 1, "should have 1 client");
-- it will poll the server, which will add a new client
Server.Pend_Client(ADDED_DOMAIN);
Affiliator.Periodic_Processing;
Assert(Affiliator.Client_Count = 2, "should have 2 clients");
Client := Affiliator.Get_Domain_Client(ADDED_DOMAIN);
Assert(Client /= null, "Get_Domain_Client returned null for a valid domain (ADDED_DOMAIN)");
Client_2 := Test_Client.Fake_Client_Access(Client);
-- a client will then send a message
Message.Initialize
(Source => Actor_2_Ref,
Reply_To => Actor_2_Ref,
Destination => Actor_1_Ref,
Message_Name => "Msg_2_To_1",
Data => Data,
Future => 5);
Send_Transaction.Set_Message(Message);
Client_2.Pending := Send_Transaction.New_Copy;
Affiliator.Periodic_Processing;
-- test to see if it is routed
Assert(Client_1.Pending /= null, "Client_1 has not been given a transaction");
-- replies
Free(Client_1.Pending);
Reply_Transaction.Set_Reply_To(Actor_2_Ref);
Reply_Transaction.Set_Data(Data);
Reply_Transaction.Set_Future(5);
Client_1.Pending := Reply_Transaction.New_Copy;
Client_2.Drop_Transaction := True; -- Have the fake behave properly and not re-reflect the transaction
Affiliator.Periodic_Processing;
Assert(Client_2.Drop_Count = 1, "response was not sent back to client 2");
--!@#$ register actors
end Run_Test;
-----------------------------------------------------------------------------
function Name(T : Test_09) return AUnit.Message_String is
pragma Unreferenced(T);
begin
return AUnit.Format("comm test 09: tbd.");
end Name;
procedure Run_Test(T : in out Test_09) is
begin
Put_Line("test 09");
end Run_Test;
end kv.avm.Comm_Tests;
|
programs/oeis/094/A094798.asm | jmorken/loda | 1 | 167785 | <reponame>jmorken/loda
; A094798: Number of times 1 is used in writing out all the numbers 1 through n.
; 1,1,1,1,1,1,1,1,1,2,4,5,6,7,8,9,10,11,12,12,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,21,23,24,25,26,27,28,29,30,31,33,36,38,40,42,44,46,48,50,52,53,55,56,57,58,59,60,61,62,63,64,66,67,68,69,70,71,72,73,74,75,77,78,79,80,81,82,83,84,85,86,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,104,105,106,107,108,110,111,112,113,114,115,116,117,118,119,121,122,123,124,125,126,127,128,129,130,132,133,134,135,136,137,138,139,140,140,141,141,141,141,141,141,141,141,141,142,144,145,146,147,148,149,150,151,152,152,153,153,153,153,153,153,153,153,153,153,154,154,154,154,154,154,154,154,154,154,155,155,155,155,155,155,155,155,155,155
mov $2,$0
add $2,1
lpb $2
sub $2,1
add $3,1
mov $0,$3
cal $0,268643 ; Number of 1's in decimal representation of n.
mov $4,$0
add $4,$0
div $4,2
add $1,$4
lpe
|
MTMR/AppleScripts/iTunes.next.scpt | FedorZaytsev/MTMR | 3,715 | 1390 | <reponame>FedorZaytsev/MTMR
if application "iTunes" is running then
tell application "iTunes"
if player state is playing then
next track
end if
end tell
end if
|
Asm/3.2.asm | cquca/csco_book_codes | 3 | 99570 | li $v0,1
add $a0,$t0,$0
syscall |
oeis/345/A345455.asm | neoneye/loda-programs | 11 | 162306 | <reponame>neoneye/loda-programs<gh_stars>10-100
; A345455: a(n) = Sum_{k=0..n} binomial(5*n+1,5*k).
; Submitted by <NAME>(s4)
; 1,7,474,12393,427351,13333932,430470899,13733091643,439924466026,14072420067757,450374698997499,14411355379952868,461170414282959151,14757375158697584607,472236871202375365274,15111570273013075344193,483570355262634763462351,15474250187010469617520732,495176019086193515059131099,15845632465456355278795776243,507060240506025436642823915626,16225927678321869390432319046757,519229685904491632965074077358099,16615349946745751373116593882725268,531691198320240025451625786635143351
add $0,1
mul $0,5
sub $0,4
seq $0,139398 ; a(n) = Sum_{k >= 0} binomial(n,5*k).
|
applet/aide/source/editors/aide-editor-of_block.ads | charlie5/aIDE | 3 | 26398 | with
AdaM.Entity,
AdaM.Block,
gtk.Widget;
private
with
aIDE.Editor.of_exception_Handler,
gtk.Text_View,
gtk.Box,
gtk.Label,
gtk.Frame,
gtk.Expander;
package aIDE.Editor.of_block
is
type Item is new Editor.item with private;
type View is access all Item'Class;
package Forge
is
function to_block_Editor (the_Block : in AdaM.Block.view) return View;
end Forge;
overriding
function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget;
procedure Target_is (Self : in out Item; Now : in AdaM.Block.view);
function Target (Self : in Item) return AdaM.Block.view;
private
use gtk.Text_View,
gtk.Expander,
gtk.Box,
gtk.Label,
gtk.Frame;
type my_Expander_Record is new Gtk_Expander_Record with
record
-- Target : AdaM.Source.Entities_View;
Target : AdaM.Entity.Entities_View;
Editor : aIDE.Editor.of_block.view;
end record;
type my_Expander is access all my_Expander_Record'Class;
type Item is new Editor.item with
record
Block : AdaM.Block.view;
block_editor_Frame : Gtk_Frame;
top_Box : gtk_Box;
declare_Label : Gtk_Label;
declare_Expander : my_Expander;
declare_Box : gtk_Box;
begin_Label : Gtk_Label;
begin_Expander : my_Expander;
begin_Box : gtk_Box;
exception_Label : Gtk_Label;
exception_Expander : my_Expander;
exception_Box : gtk_Box;
begin_Text,
exception_Text : Gtk_Text_View;
exception_Handler : aIDE.Editor.of_exception_Handler.view;
end record;
overriding
procedure freshen (Self : in out Item);
end aIDE.Editor.of_block;
|
FPGA Lab./RISC_CPU/RISC/Fibonacci.asm | MekAkUActOR/Ugrad_Projects | 0 | 167167 | <reponame>MekAkUActOR/Ugrad_Projects
00000000
00000001
10100000
00000000
11010000
00000001
10100000
00000001
11010000
00000010
10110000
00000010
11010000
00000000
01010000
00000001
11010000
00000010
10110000
00000000
11010000
00000001
10000000
00011101
00100000
00000000
11100000
00001010
00000000
11101001
11100000
00011100 |
Library/Spool/UI/uiSpoolSummonsPrint.asm | steakknife/pcgeos | 504 | 104571 | <filename>Library/Spool/UI/uiSpoolSummonsPrint.asm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1989 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Library/Spool/UI
FILE: uiSpoolSummonsPrint.asm
AUTHOR: <NAME>, March 30, 1990
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial revision
DESCRIPTION:
Contains all the procedures & method handlers that retrieve
information from the printer drivers and .INI file(s).
$Id: uiSpoolSummonsPrint.asm,v 1.1 97/04/07 11:10:39 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsPrinterInstalledRemoved
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Notification that a printer device was added or removed
CALLED BY: GLOBAL (MSG_PRINTER_INSTALLED_REMOVED)
PASS: *DS:SI = SpoolSummonsClass object
DS:DI = SpoolSummonsClassInstance
RETURN: Nothing
DESTROYED: AX, CX, DX, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsPrinterInstalledRemoved method dynamic SpoolSummonsClass,
MSG_PRINTER_INSTALLED_REMOVED
; If there are no more printers, close the print dialog.
; Otherwise, just re-initialize.
;
or ds:[di].SSI_flags, mask SSF_RELOAD_PRINTER_LIST
mov cx, PDT_ALL_LOCAL_AND_NETWORK
call SpoolGetNumPrinters
tst ax
jz bringDown
call SpoolSummonsInitialize
jmp exit
bringDown:
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
mov cx, IC_DISMISS
mov si, offset PrinterChangeBox
call ObjCallInstanceNoLock
mov ax, MSG_GEN_GUP_INTERACTION_COMMAND
mov cx, IC_DISMISS
mov si, offset PrintDialogBox
call ObjCallInstanceNoLock
exit:
ret
SpoolSummonsPrinterInstalledRemoved endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsRequestPrinterMoniker
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Sets the moniker (a printer name) for a single list entry
CALLED BY: UI (MSG_META_GEN_LIST_REQUEST_ENTRY_MONIKER)
PASS: DS:*SI = SpoolSummons object
DS:DI = SpoolSummons instance data
CX:DX = OD of the dynamic list
BP = Requested entry #
RETURN: Nothing (but a method is sent back)
DESTROYED: AX, BX, CX, DX, DI, SI, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsRequestPrinterMoniker method dynamic SpoolSummonsClass,
MSG_SPOOL_SUMMONS_REQUEST_PRINTER_MONIKER
.enter
;
; Make sure we've actually got a printer
tst ds:[di].SSI_printDataHan
jz done
; Access the printer strings
;
push si ; save the SpoolSummons chunk
push ds, dx ; save the GenDynamicList OD
call SSOpenPrintStrings ; lock the file, etc...
mov dx, bp ; printer number => DX
call SpoolSummonsGetPrinterCategory ; string => DS:SI
; string length => CX
; Send method to the GenDynamicList
;
mov cx, ds
mov dx, si ; printer name => CX:DX
pop ds, si ; GenDynamicList OD => DS:SI
mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT
call ObjCallInstanceNoLock ; send the message
; Finally, unlock the strings block
;
pop si ; restore SpoolSummons chunk
call SSClosePrintStrings ; close the print strings
done:
.leave
ret
SpoolSummonsRequestPrinterMoniker endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadPrinters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load all the available printers from the .INI file
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: AX = Number of VALID printers
CX = Number of printers
DX = Currently selected printer
DS:DI = SpoolSummonsInstance
Carry = Set if need to reset everything
= Clear if nothing has changed
DESTROYED: BX
PSEUDO CODE/STRATEGY:
Should be called each time the SpoolSummons comes on screen.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadPrinters proc near
class SpoolSummonsClass
uses bp, es
.enter
; See if we need to reload our data
;
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
test ds:[di].SSI_flags, mask SSF_RELOAD_PRINTER_LIST
jz exit ; if no changes, do nothing
; First remove the old UI, if necessary
;
andnf ds:[di].SSI_flags, not (mask SSF_RELOAD_PRINTER_LIST)
mov cx, ds:[di].SSI_currentPrinter ; printer # => CX
call RemovePrinterUIBoth ; remove all current UI
; Load all the names of the printer devices into a block
;
call SpoolSummonsLoadPrinterNames ; # of devices => AX
; memory block => BX
; memory block size => CX
; default system printer => DI
; Store away the data
;
mov bp, ds:[si] ; dereference the handle
add bp, ds:[bp].SpoolSummons_offset ; access my instance data
mov ds:[bp].SSI_numPrinters, ax ; store number of printers
xchg ds:[bp].SSI_printDataHan, bx ; and the printers data handle
mov ds:[bp].SSI_printDataLen, cx ; and the length of the data
mov ds:[bp].SSI_sysDefPrinter, di ; store the system's default
mov dx, ds:[bp].SSI_appDefPrinter ; application default => DX
mov cx, ax ; number of printers => CX & AX
tst bx ; was there an old data handle
jz done ; no, so go on
call MemFree ; else free this block handle
; Exit here
done:
call SpoolSummonsLoadInfo ; load all the information
call SpoolSummonsAssignDefault ; assign the default printer
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access my instance data
mov ax, ds:[di].SSI_numValidPrinters
mov ds:[di].SSI_currentPrinter, -1 ; reset the current printer
stc ; must reset everything
exit:
.leave
ret
SpoolSummonsLoadPrinters endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadPrinterNames
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the printer names for the current driver type
CALLED BY: SpoolSummonsLoadPrinters
PASS: *DS:SI = SpoolSummonsClass object
RETURN: AX = Number of devices
BX = Handle of block holding device strings (NULL if none)
CX = Size of memory block
DI = Default system printer
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 11/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadPrinterNames proc near
class SpoolSummonsClass
uses si, es
.enter
; Get the number of device available
;
mov di, ds:[si]
add di, ds:[di].SpoolSummons_offset
mov cl, ds:[di].SSI_driverType
mov dh, cl
clr ch
call SpoolGetNumPrinters ; number of printers => AX
tst ax
jz error
; Allocate a block large enough to hold the device strings
;
push ax
mov cl, GEODE_MAX_DEVICE_NAME_SIZE
mul cl ; # of byte => AX
mov si, ax
mov bx, ds:[LMBH_handle]
call MemOwner ; owner (app process) => BX
mov cx, mask HF_SHARABLE or mask HF_SWAPABLE or \
((mask HAF_LOCK) shl 8)
call MemAllocSetOwner
pop bp ; max # of printers => BP
jc error ; if no memory, fail
; Load the printer names, one by one. Register usage:
; AX = Printer #
; CX = Valid # of printers
; DH = PrinterDeviceType we want
; BP = Total # of printers
; ES:DI = Buffer for printer names
;
mov es, ax
clr ax, cx, di
stringLoop:
push cx
call SpoolGetPrinterString ; fill buffer with string
pop cx
jc noMore
inc ax
cmp dh, PDT_ALL ; if looking for all devices
je havePrinter ; ...then skip none
cmp dl, dh ; else compare device types
jne stringLoop ; ...and skip mismatches
havePrinter:
inc cx
cmp cx, bp
je noMore
add di, GEODE_MAX_DEVICE_NAME_SIZE
jmp stringLoop
; OK, we've loaded all of the printers. Clean up &
; choose the default printer. If we have PDT_ALL or
; PDT_PRINTER, use the value in the .INI file. Else,
; choose the first device.
noMore:
call MemUnlock ; unlock device strings block
call SpoolGetDefaultPrinter ; default printer => AX
cmp dh, PDT_PRINTER ; if device = printer
je done ; ...use returned value
clr ax ; else use first device
done:
mov_tr di, ax ; default => DI
mov_tr ax, cx ; # of devices => AX
mov cx, si ; size of block => CX
exit:
.leave
ret
; Some sort of error was returned. Abort, abort.
error:
clr ax, bx, cx, di
jmp exit
SpoolSummonsLoadPrinterNames endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsLoadInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load all the information about every printer
CALLED BY: SpoolSummonsLoadPrinters
PASS: DS:*SI = SpoolSummonsClass instance data
RETURN: AX = Chunk handle to the PrinterInfoTable
= 0 if no printers
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/14/90 Initial version
Don 4/18/91 Only initialize structures - load no printers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsLoadInfo proc near
class SpoolSummonsClass
uses cx, dx, di
.enter
; Destroy the old handle, allocate a new buffer
;
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset
mov cx, ds:[di].SSI_numPrinters ; number of printers => CX
clr ax
xchg ax, ds:[di].SSI_printInfoChunk
mov ds:[di].SSI_numValidPrinters, 0 ; assume no valid printers
tst ax ; invalid handle ??
jz getNew ; yes, so jump
call LMemFree ; free the chunk
clr ax ; now there's no handle
getNew:
jcxz done ; no printers (AX = 0)
push cx ; save the number if printers
mov al, size PrinterInfoStruct
mul cl ; assume < 256 printers
mov cx, ax ; size => CX
mov al, mask OCF_IGNORE_DIRTY ; ignore dirty
call LMemAlloc ; allocate the chunk
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov ds:[di].SSI_printInfoChunk, ax ; store the new chunk
pop cx ; number of printers => CX
; Initialize all the PrinterInfoStructs
;
mov di, ax ; information chunk => DI
mov di, ds:[di] ; dereference handle
initLoop:
mov ds:[di].PIS_info, 0 ; not initialized
add di, size PrinterInfoStruct ; go to the next structure
loop initLoop
done:
.leave
ret
SpoolSummonsLoadInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsAssignDefault
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Assign the default printer, based upon the application's
desires and what printers are valid
CALLED BY: SpoolSummonsLoadPrinters
PASS: DS:*SI = SpoolSummonClass instance data
AX = PrinterInfoChunk handle
CX = Number of printers
DX = Application default printer
DI = System default printer
RETURN: DX = Default printer
DESTROYED: AX, BX, DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/18/90 Initial version
Don 4/18/91 Call standard routine to load printer info
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsAssignDefault proc near
uses cx
.enter
; Test the default case
;
tst ax ; any information chunk
jz done
cmp dx, -1 ; no application default ??
jne defaultLoop
mov dx, di ; else use system default
jmp defaultLoop
; Find a default printer
startLoop:
clr ax, dx ; start at printer zero
defaultLoop:
xchg cx, dx
call AccessPrinterInfoStruct
xchg cx, dx
jc tryAnother ; if invalid, try another
test ds:[di].PIS_info, mask SSPI_VALID
jnz done
tryAnother:
tst ax
jnz startLoop
inc dx ; go to the next printer
loop defaultLoop
mov dx, -1 ; no default found = ouch!
done:
.leave
ret
SpoolSummonsAssignDefault endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterCategory
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns the appropriate printer category string
CALLED BY: GLOBAL
PASS: DS:DI = Printer data strings
CX = Number of bytes in the strings block
DX = Number of string to access (0 is the first)
RETURN: DS:SI = Requested string
CX = Length of the string
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSGetPrinterCategory proc far
call SpoolSummonsGetPrinterCategory
ret
SSGetPrinterCategory endp
SpoolSummonsGetPrinterCategory proc near
uses ax, di, es
.enter
; Now that the printer names are stored in an array, this is simple
;
EC < cmp dx, MAXIMUM_NUMBER_OF_PRINTERS >
EC < ERROR_A SPOOL_SUMMONS_TOO_MANY_PRINTERS >
mov al, GEODE_MAX_DEVICE_NAME_SIZE
mul dl
mov si, ax ; printer name => DS:SI
; Now calculate the length of the string
;
segmov es, ds
mov di, ax ; start of string => ES:DI
call LocalStringLength ; cx <- length w/o NULL
.leave
ret
SpoolSummonsGetPrinterCategory endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns the printer information for a specific printer
CALLED BY: SpoolSummonsPrinterSelected
PASS: DS:*SI = SpoolSummonsClass instance data
CX = Printer number
RETURN: CL = PaperInputOptions
CH = Maximum PaperSizes
DL = Printer attributes
DH = SpoolSummonsPrinterInfo
(If not valid, CX contains the PRINT_CONTROL_ERROR
enumerated type to use in an error box)
DESTROYED: DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 6/14/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsGetPrinterInfo proc near
uses ax
.enter
; Now get out the information
;
clr dx ; assume no printers
call AccessPrinterInfoStruct
mov cx, PCERR_NO_PRINTERS ; assume no printers
jc done ; fail if error
mov dl, ds:[di].PIS_POM
mov dh, ds:[di].PIS_info
mov cx, ds:[di].PIS_error ; error, just in case
done:
.leave
ret
SpoolSummonsGetPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AccessPrinterInfoStruct
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Returns pointer to the proper PrinterInfoStruct
CALLED BY: INTERNAL
PASS: DS:*SI = SpoolSummonsClass specific instance data
CX = Printer number (0 to MAXIMUM_NUMBER_OF_PRINTERS)
RETURN: DS:DI = PrinterInfoStruct
Carry = Set if no such printer
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/26/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AccessPrinterInfoStruct proc near
class SpoolSummonsClass
uses ax, cx
.enter
; Access the correct PrinterInfoStruct
;
EC < cmp cx, MAXIMUM_NUMBER_OF_PRINTERS >
EC < ERROR_A SPOOL_SUMMONS_TOO_MANY_PRINTERS >
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
cmp cx, ds:[di].SSI_numPrinters ; if printer # too large, error
jae error ; printer # too large!
push cx ; save printer number
mov di, ds:[di].SSI_printInfoChunk ; table chunk => DI
mov di, ds:[di] ; dereference the chunk
mov al, size PrinterInfoStruct
mul cl
add di, ax ; DS:DI => PrinterInfoStruct
pop cx ; printer number => CX
test ds:[di].PIS_info, mask SSPI_INITIALIZED
jnz done
call LoadPrinterInfo ; load printer information
done:
.leave
ret
error:
stc
jmp done
AccessPrinterInfoStruct endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LoadPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the printer information for a specific printer
CALLED BY: AccessPrinterInfoStruct
PASS: DS:*SI = SpoolSummonClass instance data
DS:DI = PrinterInfoStruct
CX = Printer number
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/18/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LoadPrinterInfo proc near
uses ax, bx, cx, dx, di, es
class SpoolSummonsClass
.enter
; Some set-up work
;
push si ; save the SpoolSummons chunk
segmov es, ds ; PrinterInfoStruct => ES:DI
or es:[di].PIS_info, mask SSPI_INITIALIZED
push di, cx
call SSOpenPrintStrings ; open the print strings
pop dx ; printer number => DX
call SpoolSummonsGetPrinterCategory ; device name => DS:SI
pop di ; PrinterInfoStruct => ES:DI
ConvPrinterNameToIniCat
; Now grab all the specific information
;
call GrabPrinterInfo ; grab the printer information
ConvPrinterNameDone
; Now clean up
;
segmov ds, es ; PrinterInfoStruct => DS:DI
pop si ; restore the chunk handle
mov di, ds:[si] ; dereference the handle
add di, ds:[di].SpoolSummons_offset ; access my instance data
test dl, mask SSPI_VALID ; valid printer ??
jz done
inc ds:[di].SSI_numValidPrinters
done:
call SSClosePrintStrings ; unlock the string block
.leave
ret
LoadPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GrabPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Grab specific information from the printer
CALLED BY: LoadPrinterInfo
PASS: DS:SI = Printer name string
ES:DI = PrinterInfoStruct
RETURN: DL = SpoolSummonsPrinterInfo
SSPI_VALID is important
DESTROYED: AX, CX, DH
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/11/90 Initial version
Don 5/9/90 Perform some wonderful error checking
Don 2/22/91 Cleaned up the code
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ssPortString byte 'port', 0
GrabPrinterInfo proc near
uses bx, bp, ds, es, si
SBCS < deviceName local (MAX_DEVICE_NAME_SIZE) dup (char) >
DBCS < deviceName local (MAX_DEVICE_NAME_SIZE) dup (wchar) >
driverStrategy local fptr.far
printInfo local SpoolSummonsPrinterInfo
.enter
; Determine if we are printing to a file or not
;
mov printInfo, 0 ; initalize to zero
push es, di, bp ; save local variable staff
mov cx, cs
mov dx, offset SpoolSummonsCode:ssPortString
segmov es, ss
lea di, ss:[deviceName] ; ES:DI is the buffer (temp)
SBCS < mov bp,(MAX_DEVICE_NAME_SIZE) or INITFILE_UPCASE_CHARS>
DBCS < mov bp,(MAX_DEVICE_NAME_SIZE*(size wchar)) or INITFILE_UPCASE_CHARS>
call InitFileReadString
pop bp ; local variables => BP
jc getDriverName ; if failure, give up
SBCS < cmp {char} es:[di], 'F' ; F as in "FILE" ?? >
DBCS < cmp {wchar} es:[di], 'F' ; F as in "FILE" ?? >
jne getDriverName
or printInfo, mask SSPI_PRINT_TO_FILE
; Get the driver name (SpoolSummonsPrinterInfo in AL)
getDriverName:
call SpoolLoadDriverLow ; load the printer driver
pop es, di ; restore saved data
jc fail
; Access the PrintDriverInfo block
;
mov driverStrategy.offset, cx
mov driverStrategy.segment, dx ; store the FAR address
push bx ; save the Driver handle
xchg ax, bx ; PState handle => BX
push di ; save the PrinterInfoStruct
mov di, DR_PRINT_DRIVER_INFO
call driverStrategy ; PrintDriverInfo => DX:SI
xchg bx, dx
call MemLock
add si, size DriverExtendedInfoTable
mov ds, ax ; PrintDriverInfo => DS:SI
pop di ; PrinterInfoStruct => ES:DI
push di
call CopyDriverInfo ; copy the driver information
call MemUnlock
mov bx, dx ; PState handle => BX
; Access the PrinterInfo block for this specific printer
;
mov di, DR_PRINT_DEVICE_INFO ; get the print device info
call driverStrategy ; PrinterInfo => DX:SI
call MemFree ; free the PState
mov bx, dx ; PrinterInfo handle => BX
tst bx ; if null handle returned,
jz deviceInvalid ; ...device is bogus
call MemLock ; lock the handle
mov ds, ax ; DS:SI => PrinterInfo
pop di ; ES:DI => PrinterInfoStruct
call CopyPrinterInfo ; copy all the data over
call MemUnlock ; unlock the PrinterInfo
mov dl, mask SSPI_VALID
freeDriver:
pop bx ; restore the Driver Handle
push ds
segmov ds,es
call SpoolFreeDriver ; free up the driver
pop ds
jmp done ; and we're done
; Assume after this point that PrinterInfoStruct is in ES:DI
fail:
mov es:[di].PIS_error, ax ; store cause of error
clr dl
done:
or dl, printInfo ; include earlier information
or es:[di].PIS_info, dl ; store SSPI_VALID or not
.leave
ret
; Handle invalid device case (SpoolLoadDriverLow will never
; catch this case because UserLoadExtendedDriver does not)
deviceInvalid:
pop di ; ES:DI => PrinterInfoStruct
mov es:[di].PIS_error, PCERR_PRINTER_NOT_KNOWN
clr dl ; don't set SSPI_VALID
jmp freeDriver
GrabPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolLoadDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load a printer driver
CALLED BY: EXTERNAL
PASS: *DS:SI = SpoolSummonsClass object
DX = Printer number
RETURN: see SpoolLoadDriverLow
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/21/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolLoadDriver proc near
uses di
.enter
; Set up for lower-level call
;
push ds, dx ; save segment, printer number
call SSOpenPrintStrings
pop dx
call SpoolSummonsGetPrinterCategory ; printer category => DS:SI
ConvPrinterNameToIniCat
call SpoolLoadDriverLow ; load the printer driver
ConvPrinterNameDone
; Clean up
;
pop ds
pushf ; save carry result
mov si, offset PrintDialogBox ; SpoolSummonsClass => DS:*SI
call SSClosePrintStrings
popf ; restore carry
.leave
ret
SpoolLoadDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolFreeDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Free a driver
CALLED BY: UTILITY
PASS: DS = Segment of SpoolSummons object
BX = Handle of driver or FREE_DRIVER_IMMEDIATELY
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolFreeDriver proc near
class SpoolSummonsClass
uses bx, si
.enter
; We cache this driver, and free the currently cached driver
;
mov si, offset PrintDialogBox
EC < call ECCheckObject >
mov si, ds:[si]
add si, ds:[si].SpoolSummons_offset
xchg bx, ds:[si].SSI_cachedDriver
tst bx
jz done
; See if drivers should be freed immediately, in case
; this object is getting destroyed. Make sure we handle
; a case where FREE_DRIVER_IMMEDIATELY is passed more
; than once.
;
cmp bx, FREE_DRIVER_IMMEDIATELY
jne freeDriver
xchg bx, ds:[si].SSI_cachedDriver
cmp bx, FREE_DRIVER_IMMEDIATELY
je done
freeDriver:
call GeodeFreeDriver
done:
.leave
ret
SpoolFreeDriver endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolFreeDriverAndUIBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Free a driver and a memory block that was duplicated from
a resource in that driver
CALLED BY: UTILITY
PASS: DS = Segment of SpoolSummons object
BX = Handle of driver
CX:DX = OD of object in duplicated tree
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/ 8/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolFreeDriverAndUIBlock proc near
class SpoolSummonsClass
uses ax, cx, dx, di, si, bp
.enter
; Record an event we will send to ourselves
;
mov ax, MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER
mov bp, bx ; driver handle => BP
mov bx, ds:[LMBH_handle]
mov si, offset PrintDialogBox
mov di, mask MF_RECORD
call ObjMessage
; Now flush the input queue for the block
;
mov ax, MSG_META_OBJ_FLUSH_INPUT_QUEUE
mov dx, cx ; handle of block to be freed
mov cx, di ; event to send ourselves
clr bp ; start the flush process
call ObjCallInstanceNoLock
.leave
ret
SpoolFreeDriverAndUIBlock endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsFreeUIBlockAndDriver
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Message sent back after flusing UI queue
CALLED BY: GLOBAL (MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER)
PASS: *DS:SI = SpoolSummonsClass object
DS:DI = SpoolSummonsClassInstance
CX:DX = OD of object in duplicated block
BP = Handle of driver to free
RETURN: Nothing
DESTROYED: AX, CX, DX, BP
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 11/16/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsFreeUIBlockAndDriver method dynamic SpoolSummonsClass,
MSG_SPOOL_SUMMONS_FREE_UI_BLOCK_AND_DRIVER
.enter
; First free the block
;
push bp
mov ax, MSG_META_BLOCK_FREE
mov bx, cx
mov si, dx ; duplicated tree => BX:SI
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
; Now free the driver
;
pop bx
call SpoolFreeDriver
.leave
ret
SpoolSummonsFreeUIBlockAndDriver endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolLoadDriverLow
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load a printer driver
CALLED BY: SpoolLoadDriver(), GrabPrinterInfo()
PASS: DS:SI = Printer category name
ES = Segment holding SpoolSummons object
RETURN: AX = PState handle
BX = Driver handle
DX:CX = Driver Strategy
Carry = Clear (success)
- or -
AX = PrinterControlErrors
BX = garbage
DX:CX = garbage
Carry = Set (failure)
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Call SpoolFreeDriver instead of GeodeFreeDriver to
free the just-loaded printer driver
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolLoadDriverLow proc near
uses ds, si
.enter
; First allocate a PState
;
mov ax, (size PState)
mov cx, ALLOC_DYNAMIC_NO_ERR or ((mask HAF_ZERO_INIT) shl 8)
call MemAlloc ; handle => BX (PState)
push bx ; save PState handle
; Access this driver, please
;
mov ax, SP_PRINTER_DRIVERS
mov cx, PRINT_PROTO_MAJOR
mov dx, PRINT_PROTO_MINOR
call UserLoadExtendedDriver ; driver handle => BX
jc error ; if error, abort
; The driver is loaded. Now set up a few things
;
call GeodeInfoDriver ; to get strategy routine
mov cx, ds:[si].DIS_strategy.offset
mov dx, ds:[si].DIS_strategy.segment
pop ax ; PState handle => AX
clc ; indicate success
done:
.leave
ret
; We couldn't set device. Fail & clean up
error:
pop bx ; PState handle => BX
call MemFree ; free the PState
mov ax, PCERR_PRINTER_NOT_KNOWN ; error type => AX
stc ; set carry for failure
jmp done ; we're outta here
SpoolLoadDriverLow endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyDriverInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Load the driver-dependent information
CALLED BY: GrabPrinterInfo
PASS: DS:SI = PrintDriverInfo
ES:DI = PrinterInfoStruct
RETURN: Nothing
DESTROYED: AX
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 4/17/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyDriverInfo proc near
.enter
mov ax, ds:[si].PDI_timeoutValue
mov es:[di].PIS_timeout, ax
mov al, ds:[si].PDI_driverType ; PrinterDriverType => AL
mov es:[di].PIS_driverType, al
.leave
ret
CopyDriverInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CopyPrinterInfo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Copy the needed information out of the PrinterInfo table
into my own PrinterInfoStruct
CALLED BY: GrabPrinterInfo
PASS: DS:SI = PrinterInfo
ES:DI = PrinterInfoStruct
RETURN: Nothing
DESTROYED: AX
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 2/22/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CopyPrinterInfo proc near
.enter
; Determine what printer modes this beast supports
;
clr al ; initially no printer modes
tst ds:[si].PI_lowRes ; low resolution graphics
jz mode1
or al, mask POM_GRAPHICS_LOW
mode1:
tst ds:[si].PI_medRes ; medium resolution graphics
jz mode2
or al, mask POM_GRAPHICS_MEDIUM
mode2:
tst ds:[si].PI_hiRes ; high-resolution graphics
jz mode3
or al, mask POM_GRAPHICS_HIGH
mode3:
tst ds:[si].PI_draft ; text draft
jz mode4
or al, mask POM_TEXT_DRAFT
mode4:
tst ds:[si].PI_nlq ; near letter quality
jz modeDone
or al, mask POM_TEXT_NLQ
; Now copy all the information we need
modeDone:
mov es:[di].PIS_POM, al ; store the PrinterOutputModes
; Set some information flags
;
mov ax, ds:[si].PI_paperWidth
mov es:[di].PIS_maxWidth, ax
test ds:[si].PI_connect, mask PC_FILE
jz mainUI
or es:[di].PIS_info, mask SSPI_CAPABLE_TO_FILE
mainUI:
tst ds:[si].PI_mainUI.chunk
jz optionUI
or es:[di].PIS_info, mask SSPI_UI_IN_DIALOG_BOX
optionUI:
tst ds:[si].PI_optionsUI.chunk
jz done
or es:[di].PIS_info, mask SSPI_UI_IN_OPTIONS_BOX
done:
.leave
ret
CopyPrinterInfo endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SpoolSummonsGetPrinterStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Provides a copy of the block containing the print strings
CALLED BY: GLOBAL (MSG_SPOOL_SUMMONS_GET_PRINTER_STRINGS)
PASS: DS:*SI = SpoolSummons instance data
RETURN: CX = Length of the buffer
DX = Handle to block holding the strings
BP = Currently selected printer
DESTROYED: AX, BX, DI
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SpoolSummonsGetPrinterStrings method SpoolSummonsClass, \
MSG_SPOOL_SUMMONS_GET_PRINTER_STRINGS
.enter
push ds, si ; save the SpoolSummons handle
call SSOpenPrintStrings ; get some important data
mov bp, dx ; current printer => BP
inc cx ; leave room for NULL
mov dx, cx ; store in DX
mov ax, cx ; bytes to allocate
mov cx, ((mask HF_SHARABLE or mask HF_SWAPABLE) or \
((mask HAF_LOCK or mask HAF_NO_ERR) shl 8))
call MemAlloc ; allocate a block
mov si, di ; DS:SI is the string buffer
mov es, ax
clr di ; ES:DI is the blank buffer
mov cx, dx ; bytes to copy => CX
rep movsb ; copy the bytes
mov cx, dx ; string size => CX
dec cx ; without NULL, actually
mov dx, bx ; block handle => DX
call MemUnlock ; unlock the block
pop ds, si ; restore the SpoolSummons obj
call SSClosePrintStrings ; unlock the strings block
.leave
ret
SpoolSummonsGetPrinterStrings endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSOpenPrintStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Access the print strings block and lock it
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: DS:DI = Printer strings
CX = Length of the strings buffer
DX = Current printer (0 -> N-1)
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSOpenPrintStrings proc near
class SpoolSummonsClass
uses ax, bx
.enter
mov di, ds:[si] ; derference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov bx, ds:[di].SSI_printDataHan
mov cx, ds:[di].SSI_printDataLen
mov dx, ds:[di].SSI_currentPrinter
call MemLock
mov ds, ax
clr di
.leave
ret
SSOpenPrintStrings endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SSClosePrintStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Access the print strings block and unlock it
CALLED BY: GLOBAL
PASS: DS:*SI = SpoolSummons instance data
RETURN: Nothing
DESTROYED: Nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Don 3/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SSClosePrintStrings proc near
class SpoolSummonsClass
uses bx, di
.enter
mov di, ds:[si] ; derference the handle
add di, ds:[di].SpoolSummons_offset ; access the instance data
mov bx, ds:[di].SSI_printDataHan ; block handle => BX
call MemUnlock ; unlock the block
.leave
ret
SSClosePrintStrings endp
SpoolSummonsCode ends
|
src/Imp.g4 | joshuachp/have-fun-language-antlr4 | 0 | 5453 | <reponame>joshuachp/have-fun-language-antlr4<gh_stars>0
grammar Imp;
prog : fun* com EOF;
com : IF LPAR exp RPAR THEN LBRACE com RBRACE ELSE LBRACE com RBRACE # if
| ID ASSIGN exp # assign
| SKIPP # skip
| com SEMICOLON com # seq
| WHILE LPAR exp RPAR LBRACE com RBRACE # while
| OUT LPAR exp RPAR # out
;
exp : NAT # nat
| BOOL # bool
| LPAR exp RPAR # parExp
| <assoc=right> exp POW exp # pow
| NOT exp # not
| exp op=(DIV | MUL | MOD) exp # divMulMod
| exp op=(PLUS | MINUS) exp # plusMinus
| exp op=(LT | LEQ | GEQ | GT) exp # cmpExp
| exp op=(EQQ | NEQ) exp # eqExp
| exp op=(AND | OR) exp # logicExp
| ID # id
| ID LPAR (exp (COLON exp)*)? RPAR # call
;
fun: FUN ID LPAR (ID (COLON ID)*)? RPAR LBRACE (com SEMICOLON)? RETURN exp RBRACE;
NAT : '0' | [1-9][0-9]*;
BOOL : 'true' | 'false';
PLUS : '+';
MINUS : '-';
MUL : '*';
DIV : '/';
MOD : 'mod';
POW : '^';
AND : '&';
OR : '|';
EQQ : '==';
NEQ : '!=';
LEQ : '<=';
GEQ : '>=';
LT : '<';
GT : '>';
NOT : '!';
IF : 'if';
THEN : 'then';
ELSE : 'else';
WHILE : 'while';
SKIPP : 'skip';
ASSIGN : '=';
OUT : 'out';
FUN : 'fun';
RETURN : 'return';
LPAR : '(';
RPAR : ')';
LBRACE : '{';
RBRACE : '}';
SEMICOLON : ';';
COLON : ',';
ID : [a-z]+;
WS : [ \t\r\n]+ -> skip;
|
boot/kernel_entry.asm | Menotdan/DripOSfailures | 0 | 93020 | [bits 64]
[extern main] ; Define calling point. Must have same name as kernel.c 'main' function
call main ; Calls the C function. The linker will know where it is placed in memory
jmp $
|
test/Fail/Issue1015OnlyRecord.agda | hborum/agda | 3 | 7490 | <reponame>hborum/agda<gh_stars>1-10
{-# OPTIONS --copatterns #-}
open import Common.Size
record R (i : Size) : Set where
inductive
constructor delay
field
force : (j : Size< i) → R j
open R
inh : (i : Size) → R i
force (inh i) j = inh j
-- Should give termination error
data ⊥ : Set where
elim : R ∞ → ⊥
elim (delay f) = elim (f ∞)
-- Gives termination error, as expected.
|
awa/plugins/awa-comments/src/awa-comments-modules.ads | fuzzysloth/ada-awa | 81 | 26073 | -----------------------------------------------------------------------
-- awa-comments-module -- Comments module
-- Copyright (C) 2011, 2012, 2013, 2014 <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 ASF.Applications;
with ADO;
with AWA.Modules;
with AWA.Modules.Get;
with AWA.Modules.Lifecycles;
with AWA.Comments.Models;
-- == Integration ==
-- The <tt>Comment_Module</tt> manages the comments associated with entities. It provides
-- operations that are used by the comment beans to manage the comments.
-- An instance of the <tt>Comment_Module</tt> must be declared and registered in the
-- AWA application. The module instance can be defined as follows:
--
-- type Application is new AWA.Applications.Application with record
-- Comment_Module : aliased AWA.Comments.Modules.Comment_Module;
-- end record;
--
-- And registered in the `Initialize_Modules` procedure by using:
--
-- Register (App => App.Self.all'Access,
-- Name => AWA.Comments.Modules.NAME,
-- URI => "comments",
-- Module => App.Comment_Module'Access);
--
package AWA.Comments.Modules is
NAME : constant String := "comments";
Not_Found : exception;
-- The <tt>Comment_Lifecycle</tt> package allows to receive life cycle events related
-- to the <tt>Comment</tt> object.
package Comment_Lifecycle is
new AWA.Modules.Lifecycles (Element_Type => AWA.Comments.Models.Comment_Ref'Class);
subtype Listener is Comment_Lifecycle.Listener;
type Comment_Module is new AWA.Modules.Module with null record;
type Comment_Module_Access is access all Comment_Module'Class;
overriding
procedure Initialize (Plugin : in out Comment_Module;
App : in AWA.Modules.Application_Access;
Props : in ASF.Applications.Config);
-- Load the comment identified by the given identifier.
procedure Load_Comment (Model : in Comment_Module;
Comment : in out AWA.Comments.Models.Comment_Ref'Class;
Id : in ADO.Identifier);
-- Create a new comment for the associated database entity.
procedure Create_Comment (Model : in Comment_Module;
Permission : in String;
Entity_Type : in String;
Comment : in out AWA.Comments.Models.Comment_Ref'Class);
-- Update the comment represented by <tt>Comment</tt> if the current user has the
-- permission identified by <tt>Permission</tt>.
procedure Update_Comment (Model : in Comment_Module;
Permission : in String;
Comment : in out AWA.Comments.Models.Comment_Ref'Class);
-- Delete the comment represented by <tt>Comment</tt> if the current user has the
-- permission identified by <tt>Permission</tt>.
procedure Delete_Comment (Model : in Comment_Module;
Permission : in String;
Comment : in out AWA.Comments.Models.Comment_Ref'Class);
-- Set the publication status of the comment represented by <tt>Comment</tt>
-- if the current user has the permission identified by <tt>Permission</tt>.
procedure Publish_Comment (Model : in Comment_Module;
Permission : in String;
Id : in ADO.Identifier;
Status : in AWA.Comments.Models.Status_Type;
Comment : in out AWA.Comments.Models.Comment_Ref'Class);
function Get_Comment_Module is
new AWA.Modules.Get (Comment_Module, Comment_Module_Access, NAME);
end AWA.Comments.Modules;
|
oeis/065/A065170.asm | neoneye/loda-programs | 11 | 160006 | ; A065170: Permutation t->t-3 of Z, folded to N.
; Submitted by <NAME>
; 7,5,9,3,11,1,13,2,15,4,17,6,19,8,21,10,23,12,25,14,27,16,29,18,31,20,33,22,35,24,37,26,39,28,41,30,43,32,45,34,47,36,49,38,51,40,53,42,55,44,57,46,59,48,61,50,63,52,65,54,67,56,69,58,71,60,73,62,75,64,77,66,79,68,81,70,83,72,85,74,87,76,89,78,91,80,93,82,95,84,97,86,99,88,101,90,103,92,105,94
mov $2,$0
mul $0,4
mod $0,8
mul $0,$2
sub $0,12
min $0,10
div $2,2
mul $2,4
sub $0,$2
sub $0,3
div $0,2
sub $1,$0
mov $0,$1
|
Ada/src/Problem_69.adb | Tim-Tom/project-euler | 0 | 19963 | <reponame>Tim-Tom/project-euler<gh_stars>0
with Ada.Text_IO;
with PrimeUtilities;
package body Problem_69 is
package IO renames Ada.Text_IO;
subtype One_Million is Integer range 1 .. 1_000_000;
best : One_Million := 1;
package Million_Primes is new PrimeUtilities(One_Million);
procedure Solve is
prime : One_Million;
gen : Million_Primes.Prime_Generator := Million_Primes.Make_Generator(One_Million'Last);
begin
-- The Euler number can be calculated by multiplying together the percent of the numbers that
-- each prime factor of the number will remove. Since we're scaling by the number itself
-- getting bigger numbers will not help us, just a larger percent of numbers filtered. Each
-- prime factor will filter out 1/p of the numbers in the number line, leaving p-1/p
-- remaining. So the smaller the primes we can pick, the larger the percent of numbers we will
-- filter out. And since we're picking the smallest primes, we know we could never pick more
-- larger primes and end up with a smaller end target (because we could replace the larger
-- prime with a smaller prime, get a better ratio). As a result we can just multiply from the
-- smallest prime number upwards until we get above our maximum ratio.
loop
Million_Primes.Next_Prime(gen, prime);
exit when prime = 1;
exit when One_Million'Last / prime < best;
best := best * prime;
end loop;
IO.Put_Line(Integer'Image(best));
end Solve;
end Problem_69;
|
problems/048/a048.adb | melwyncarlo/ProjectEuler | 0 | 9480 | <filename>problems/048/a048.adb
with Ada.Text_IO;
with Ada.Strings.Fixed;
-- Copyright 2021 <NAME>
procedure A048 is
use Ada.Text_IO;
use Ada.Strings.Fixed;
Max_N : constant Integer := 1000;
Sum_Val : String (1 .. 10) := "0000000001";
Temp_Str : String (1 .. 20);
Product_Val : String (1 .. 10);
Sub_Product_Sum : array (Integer range 1 .. 10) of String (1 .. 10);
Carry_Val, Temp_Val, Sub_Product, Sub_Product_Len : Integer;
begin
for I in 2 .. Max_N loop
if (I mod 10) /= 0 then
Product_Val := "0000000001";
for J in 1 .. I loop
Sub_Product_Sum := (others => ("0000000000"));
for K in reverse 1 .. 10 loop
Sub_Product := (Character'Pos (Product_Val (K))
- Character'Pos ('0'))
* I;
Sub_Product_Len := Trim (Integer'Image (Sub_Product),
Ada.Strings.Both)'Length;
if Sub_Product_Len < 10 then
Temp_Str (1 .. (10 - Sub_Product_Len)) :=
(10 - Sub_Product_Len) * "0";
Temp_Str ((11 - Sub_Product_Len) .. 10) :=
Trim (Integer'Image (Sub_Product), Ada.Strings.Both);
Sub_Product_Len := 10;
else
Temp_Str := Integer'Image (Sub_Product);
end if;
Sub_Product_Sum (K) (1 .. K) :=
Temp_Str ((Sub_Product_Len - K + 1) .. Sub_Product_Len);
end loop;
Carry_Val := 0;
for L in reverse 1 .. 10 loop
Temp_Val := Character'Pos (Sub_Product_Sum (1) (L))
+ Character'Pos (Sub_Product_Sum (2) (L))
+ Character'Pos (Sub_Product_Sum (3) (L))
+ Character'Pos (Sub_Product_Sum (4) (L))
+ Character'Pos (Sub_Product_Sum (5) (L))
+ Character'Pos (Sub_Product_Sum (6) (L))
+ Character'Pos (Sub_Product_Sum (7) (L))
+ Character'Pos (Sub_Product_Sum (8) (L))
+ Character'Pos (Sub_Product_Sum (9) (L))
+ Character'Pos (Sub_Product_Sum (10) (L))
- (Character'Pos ('0') * 10)
+ Carry_Val;
Carry_Val := Integer (Float'Floor (
Float (Temp_Val) / 10.0));
Product_Val (L) := Character'Val (
Character'Pos ('0') + (Temp_Val mod 10));
end loop;
end loop;
Carry_Val := 0;
for J in reverse 1 .. 10 loop
Temp_Val := Character'Pos (Sum_Val (J))
+ Character'Pos (Product_Val (J))
- Character'Pos ('0')
- Character'Pos ('0')
+ Carry_Val;
Carry_Val := Integer (Float'Floor (Float (Temp_Val) / 10.0));
Sum_Val (J) := Character'Val (
Character'Pos ('0') + (Temp_Val mod 10));
end loop;
end if;
end loop;
Put (Sum_Val);
end A048;
|
Numeral/Natural/Relation/Order/Classical.agda | Lolirofle/stuff-in-agda | 6 | 11278 | <filename>Numeral/Natural/Relation/Order/Classical.agda
module Numeral.Natural.Relation.Order.Classical where
import Lvl
open import Logic.Propositional
open import Numeral.Natural
open import Numeral.Natural.Relation.Order
open import Numeral.Natural.Relation.Order.Decidable
open import Numeral.Natural.Relation.Order.Proofs
open import Relator.Equals
open import Relator.Equals.Proofs
open import Structure.Relator.Properties
open import Relator.Ordering.Proofs
open import Type.Properties.Decidable.Proofs
open import Type
instance
[≰][>]-sub : (_≰_) ⊆₂ (_>_)
[≰][>]-sub = From-[≤][<].ByReflTriSub.[≰][>]-sub (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [<]-classical = decider-classical _ ⦄
instance
[≯][≤]-sub : (_≯_) ⊆₂ (_≤_)
[≯][≤]-sub = From-[≤][<].ByReflTriSub.[≯][≤]-sub (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [≤]-classical = decider-classical _ ⦄
instance
[≱][<]-sub : (_≱_) ⊆₂ (_<_)
[≱][<]-sub = From-[≤][<].ByReflTriSub.[≱][<]-sub (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [<]-classical = decider-classical _ ⦄
instance
[≮][≥]-sub : (_≮_) ⊆₂ (_≥_)
[≮][≥]-sub = From-[≤][<].ByReflTriSub.[≮][≥]-sub (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [≤]-classical = decider-classical _ ⦄
[≤]-or-[>] : ∀{a b : ℕ} → (a ≤ b) ∨ (a > b)
[≤]-or-[>] = From-[≤][<].ByReflTriSub.[≤]-or-[>] (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [≤]-classical = decider-classical _ ⦄ ⦃ [<]-classical = decider-classical _ ⦄
[≥]-or-[<] : ∀{a b : ℕ} → (a ≥ b) ∨ (a < b)
[≥]-or-[<] = From-[≤][<].ByReflTriSub.[≥]-or-[<] (_≤_)(_<_) ⦃ [<][≤]-sub = intro(sub₂(_<_)(_≤_)) ⦄ ⦃ [≤]-classical = decider-classical _ ⦄ ⦃ [<]-classical = decider-classical _ ⦄
|
programs/oeis/341/A341740.asm | jmorken/loda | 1 | 95583 | <filename>programs/oeis/341/A341740.asm
; A341740: a(n) is the maximum value of the magic constant in a normal magic triangle of order n.
; 12,23,37,54,74,97,123,152,184,219,257,298,342,389,439,492,548,607,669,734,802,873,947,1024,1104,1187,1273,1362,1454,1549,1647,1748,1852,1959,2069,2182,2298,2417,2539,2664,2792,2923,3057,3194,3334,3477,3623,3772,3924
add $0,3
mul $0,2
mov $1,$0
mul $0,8
add $1,3
add $1,$0
pow $1,2
mul $1,2
sub $1,6498
div $1,432
add $1,12
|
Transynther/x86/_processed/NC/_ht_zr_un_/i7-7700_9_0x48.log_21829_2716.asm | ljhsiun2/medusa | 9 | 161575 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x8c44, %r12
nop
nop
nop
nop
xor %rcx, %rcx
mov (%r12), %rax
nop
nop
cmp $30453, %r11
lea addresses_A_ht+0x7df8, %rax
dec %rdi
movups (%rax), %xmm4
vpextrq $0, %xmm4, %r13
cmp %r11, %r11
lea addresses_WT_ht+0xce3d, %r12
nop
cmp $4392, %r15
movb $0x61, (%r12)
nop
nop
nop
nop
nop
sub $46970, %r12
lea addresses_D_ht+0xb245, %rax
inc %r13
movw $0x6162, (%rax)
sub %rax, %rax
lea addresses_A_ht+0x150f1, %rsi
lea addresses_normal_ht+0x170f1, %rdi
nop
nop
nop
nop
nop
and $15721, %r11
mov $115, %rcx
rep movsw
nop
and $12375, %rcx
lea addresses_D_ht+0xd031, %r11
nop
and $47545, %rcx
movups (%r11), %xmm3
vpextrq $1, %xmm3, %rax
add $4994, %r12
lea addresses_D_ht+0x1b8f1, %rsi
clflush (%rsi)
nop
nop
nop
nop
add %rdi, %rdi
movb $0x61, (%rsi)
cmp $51787, %r13
lea addresses_UC_ht+0x14e71, %rcx
nop
nop
nop
nop
nop
sub $61574, %r13
movw $0x6162, (%rcx)
nop
nop
nop
nop
nop
add $27548, %r12
lea addresses_A_ht+0xe5f1, %rdi
nop
nop
nop
nop
nop
cmp %r12, %r12
movw $0x6162, (%rdi)
nop
inc %rsi
lea addresses_A_ht+0xed01, %r15
nop
xor $10756, %rcx
mov $0x6162636465666768, %rax
movq %rax, %xmm7
and $0xffffffffffffffc0, %r15
movaps %xmm7, (%r15)
sub $51521, %rax
lea addresses_UC_ht+0x182d9, %r15
nop
sub $26058, %r12
and $0xffffffffffffffc0, %r15
movntdqa (%r15), %xmm4
vpextrq $1, %xmm4, %rcx
nop
xor $13008, %r12
lea addresses_WT_ht+0x152b1, %rdi
nop
nop
nop
inc %rsi
vmovups (%rdi), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $0, %xmm3, %r12
nop
dec %r11
lea addresses_A_ht+0x123f1, %r12
nop
dec %rsi
vmovups (%r12), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %r11
sub $34727, %r15
lea addresses_UC_ht+0x16731, %rsi
lea addresses_WT_ht+0xf751, %rdi
nop
nop
nop
nop
nop
add %rax, %rax
mov $33, %rcx
rep movsl
nop
nop
nop
cmp %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rax
push %rbp
push %rdi
push %rsi
// Store
lea addresses_normal+0x14f1, %rbp
cmp $49884, %rax
movb $0x51, (%rbp)
sub %rax, %rax
// Store
lea addresses_RW+0x18c7, %r13
nop
nop
nop
nop
cmp %rsi, %rsi
movb $0x51, (%r13)
nop
nop
nop
nop
nop
add %rax, %rax
// Store
lea addresses_WC+0x40f1, %rdi
nop
xor %r9, %r9
movb $0x51, (%rdi)
add $28850, %rax
// Store
mov $0x4b535000000008f1, %r13
cmp $44140, %rax
mov $0x5152535455565758, %rdi
movq %rdi, %xmm1
vmovups %ymm1, (%r13)
nop
nop
and %rax, %rax
// Faulty Load
mov $0x4b535000000008f1, %r15
nop
nop
nop
nop
and %rax, %rax
vmovups (%r15), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rdi
lea oracles, %r15
and $0xff, %rdi
shlq $12, %rdi
mov (%r15,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': True, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 11, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 16, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'08': 2, '47': 4204, 'dd': 1, '45': 10068, '00': 7550, '21': 1, 'bb': 1, 'c0': 1, 'ff': 1}
00 45 00 45 47 45 45 47 00 00 00 47 45 45 45 45 47 45 00 45 45 47 45 00 45 45 47 00 00 47 00 45 45 00 45 47 45 00 00 45 47 45 00 00 00 45 00 45 45 47 45 45 45 47 00 45 45 47 45 45 47 00 45 47 00 47 00 00 47 00 00 45 47 00 00 00 47 00 45 45 00 00 00 00 45 47 45 47 45 45 45 45 45 47 00 00 45 47 00 00 00 00 00 45 47 45 47 45 00 47 45 45 00 45 00 45 47 45 47 00 00 45 45 47 00 47 45 45 45 45 45 47 00 45 45 45 47 00 00 00 45 47 00 45 45 47 00 45 45 47 45 47 00 00 47 00 47 00 00 45 00 00 00 45 45 45 47 45 47 00 00 45 47 45 00 45 45 00 47 c0 45 00 00 00 47 45 47 45 00 45 45 00 45 00 45 45 47 45 45 00 47 45 00 45 00 45 00 00 45 00 45 00 00 45 45 00 00 47 00 45 45 47 45 45 00 45 00 00 00 45 00 45 45 45 45 00 00 45 00 00 00 00 45 00 47 00 45 00 45 00 47 45 45 45 45 45 00 47 45 47 45 45 00 00 45 00 45 45 45 45 00 45 47 45 00 47 45 45 45 45 45 45 45 45 47 45 45 45 47 00 00 00 45 45 47 45 00 45 00 47 45 45 00 00 00 00 45 45 47 00 45 45 45 45 00 47 45 45 47 00 45 45 47 00 45 45 45 00 45 00 47 00 00 00 47 00 45 45 00 45 47 45 45 00 47 00 00 00 45 45 47 45 45 00 00 47 45 00 00 45 47 00 00 47 45 00 00 47 00 45 45 45 47 45 45 47 45 45 00 00 45 45 00 45 00 45 45 47 45 00 45 47 45 47 00 45 45 47 45 00 45 45 00 45 45 00 45 45 45 47 00 00 00 47 00 00 47 45 47 00 00 45 45 47 45 45 45 45 45 00 45 00 00 47 45 00 00 45 00 45 00 45 00 47 45 45 45 45 45 45 00 00 45 47 45 45 45 00 45 47 45 45 47 45 00 00 45 45 45 45 47 00 47 45 45 47 00 00 47 47 00 45 45 00 47 47 45 45 00 47 45 47 00 00 45 47 45 45 00 45 00 45 47 00 47 45 00 00 45 47 45 00 00 47 45 47 45 45 47 45 00 00 45 47 45 45 47 00 45 45 00 45 45 00 00 47 00 47 45 45 47 45 00 45 47 45 45 47 45 47 45 45 00 45 45 47 45 47 00 45 47 45 45 45 47 45 45 45 45 00 45 45 47 45 00 45 45 45 47 45 45 47 45 00 00 00 45 45 00 45 45 45 00 45 47 00 45 00 45 45 45 47 00 00 47 00 45 45 47 00 00 47 45 45 45 45 00 47 00 45 00 45 45 45 00 00 00 45 45 45 47 00 00 00 45 45 47 00 00 45 45 45 00 45 00 45 00 45 00 00 00 45 45 00 00 45 45 45 47 00 47 00 00 47 00 45 45 47 00 00 45 45 00 00 45 45 47 00 00 45 47 45 47 00 00 45 45 45 00 45 47 45 00 00 47 00 45 45 00 00 45 00 00 45 45 00 45 45 45 00 00 47 00 45 45 45 45 47 45 47 45 45 45 00 00 45 47 47 45 47 45 45 45 45 00 47 45 45 47 00 45 47 00 00 45 45 47 00 45 45 00 00 00 00 00 45 00 00 00 45 45 00 45 00 00 00 47 47 47 00 45 45 47 00 45 45 00 00 00 47 00 00 00 47 00 47 00 00 45 00 47 00 47 45 45 45 00 45 47 45 00 00 45 00 45 00 45 00 45 00 00 47 45 47 00 00 45 45 00 45 00 45 00 00 00 00 45 45 47 00 00 45 45 45 45 45 47 45 00 00 00 47 45 00 47 45 00 00 00 45 47 45 45 45 45 45 00 45 00 00 45 47 00 45 00 00 00 45 00 00 47 00 45 45 45 00 00 00 00 45 47 45 00 00 45 47 47 47 00 00 47 00 00 45 45 45 45 47 45 45 00 00 00 00 47 00 45 45 45 47 45 45 45 45 47 45 00 45 00 45 47 45 00 00 45 47 45 00 45 45 45 45 45 00 00 45 47 45 45 45 45 47 45 45 47 45 00 00 47 45 47 00 00 00 00 45 45 45 00 00 45 00 47 45 45 00 45 45 45 45 47 00 00 00 45 45 45 45 00 45 45 00 45 00 45 45 45 45 47 47 45 00 45 45 00 45 00 45 45 45
*/
|
ee/wman/syspal.asm | olifink/smsqe | 0 | 247762 | ; WMAN system palette V1.02 2002 <NAME>
;
; 2005-03-25 1.01 Fixed error return of wm.jbpal (MK)
; 2017-12-13 1.02 Moved config to own file to reduce QDOS binary size (MK)
xdef wm_setsp
xdef wm_getsp
xdef wm_getspentry
xdef wm_initsp
xdef wm_jbpal
xdef wsp_winbd
xdef wsp_winbg
xdef wsp_winfg
xdef wsp_winmg
xdef wsp_titlebg
xdef wsp_titletextbg
xdef wsp_titlefg
xdef wsp_litemhigh
xdef wsp_litemavabg
xdef wsp_litemavafg
xdef wsp_litemselbg
xdef wsp_litemselfg
xdef wsp_litemunabg
xdef wsp_litemunafg
xdef wsp_infwinbd
xdef wsp_infwinbg
xdef wsp_infwinfg
xdef wsp_infwinmg
xdef wsp_subinfbd
xdef wsp_subinfbg
xdef wsp_subinffg
xdef wsp_subinfmg
xdef wsp_appbd
xdef wsp_appbg
xdef wsp_appfg
xdef wsp_appmg
xdef wsp_apphigh
xdef wsp_appiavabg
xdef wsp_appiavafg
xdef wsp_appiselbg
xdef wsp_appiselfg
xdef wsp_appiunabg
xdef wsp_appiunafg
xdef wsp_scrbar
xdef wsp_scrbarsec
xdef wsp_scrbararr
xdef wsp_buthigh
xdef wsp_butbd
xdef wsp_butbg
xdef wsp_butfg
xdef wsp_hintbd
xdef wsp_hintbg
xdef wsp_hintfg
xdef wsp_hintmg
xdef wsp_errbg
xdef wsp_errfg
xdef wsp_errmg
xdef wsp_shaded
xdef wsp_3ddark
xdef wsp_3dlight
xdef wsp_vertfill
xdef wsp_subtitbg
xdef wsp_subtittxtbg
xdef wsp_subtitfg
xdef wsp_mindexbg
xdef wsp_mindexfg
xdef wsp_separator
xref wmc_error
xref gu_achpp
include 'dev8_ee_wman_data'
include 'dev8_keys_qdos_sms'
include 'dev8_keys_sys'
include 'dev8_keys_con'
include 'dev8_keys_err'
include 'dev8_keys_jcb'
include 'dev8_mac_assert'
section wman
; some system palette defines
wsp.low equ 0 ; lowest entry
wsp.high equ 56 ; highest entry
wsp.entries equ wsp.high-wsp.low+1 ; number of entries per palette
wsp.palettes equ 4 ; number of palettes
wsp.sizes equ 2*wsp.entries ; size of one palette
wsp.size equ wsp.palettes*wsp.sizes ; size of all palettes
; palette block header
wpb.jobtab equ 0 ; rel ptr to job table
wpb.pal1 equ 2 ; rel ptr to palettes
wpb.pal2 equ 4
wpb.pal3 equ 6
wpb.pal4 equ 8
wpb.size equ 10 ; size of block
; job table entry
wjb.tag equ 0 ; job tag
wjb.pal equ 3 ; palette for this job
wjb.ownpal equ 4 ; pointer to job's own palette
wjb.size equ 8 ; size of block
wjb..size equ 3 ; shift for block size
; ptr to all default blocks
wsp_tables
dc.w wsp_table1-*
dc.w wsp_table2-*
dc.w wsp_table3-*
dc.w wsp_table4-*
; Main, configurable palette
wsp_table1
wsp_winbd dc.w 0 ; Main window
wsp_winbg dc.w $07
wsp_winfg dc.w 0
wsp_winmg dc.w $02
wsp_titlebg dc.w $5c ; Title bar
wsp_titletextbg dc.w $07
wsp_titlefg dc.w $00
wsp_litemhigh dc.w 0 ; Loose item (within main window)
wsp_litemavabg dc.w $07
wsp_litemavafg dc.w 0
wsp_litemselbg dc.w $04
wsp_litemselfg dc.w 0
wsp_litemunabg dc.w $07
wsp_litemunafg dc.w $04
wsp_infwinbd dc.w $04 ; Information window
wsp_infwinbg dc.w $07
wsp_infwinfg dc.w 0
wsp_infwinmg dc.w $02
wsp_subinfbd dc.w $07 ; Information win in another inf win
wsp_subinfbg dc.w $04
wsp_subinffg dc.w 0
wsp_subinfmg dc.w $07
wsp_appbd dc.w $04 ; Application (menu) window
wsp_appbg dc.w $07
wsp_appfg dc.w $00
wsp_appmg dc.w $02
wsp_apphigh dc.w $00
wsp_appiavabg dc.w $07
wsp_appiavafg dc.w 0
wsp_appiselbg dc.w $04
wsp_appiselfg dc.w 0
wsp_appiunabg dc.w $07
wsp_appiunafg dc.w $04
wsp_scrbar dc.w $07 ; Scroll/pan in app window
wsp_scrbarsec dc.w 0
wsp_scrbararr dc.w $04
wsp_buthigh dc.w 0 ; QPAC2 button frame colours
wsp_butbd dc.w $04
wsp_butbg dc.w $07
wsp_butfg dc.w 0
wsp_hintbd dc.w $07 ; Popup help colours
wsp_hintbg dc.w $04
wsp_hintfg dc.w $07
wsp_hintmg dc.w $02
wsp_errbg dc.w $02 ; Error colours
wsp_errfg dc.w $07
wsp_errmg dc.w $04
wsp_shaded dc.w $1f ; See device selection in QPAC2 files
wsp_3ddark dc.w $02 ; The colours used for 3D borders
wsp_3dlight dc.w $07
wsp_vertfill dc.w $9f ; See device window in QPAC2 files (->)
wsp_subtitbg dc.w $5c ; Title bar that is not main title
wsp_subtittxtbg dc.w $07
wsp_subtitfg dc.w $00
wsp_mindexbg dc.w $07 ; Menu window index (e.g. A B C D ...)
wsp_mindexfg dc.w $00
wsp_separator dc.w $04 ; Seperator line. Must fit to InfWin
; Red/black
wsp_table2
dc.w $07,$00,$07,$04,$52,$00,$07,$07
dc.w $00,$07,$02,$07,$00,$02,$02,$00
dc.w $07,$04,$00,$02,$07,$00,$02,$00
dc.w $07,$04,$07,$00,$07,$02,$07,$00
dc.w $02,$00,$07,$02,$07,$02,$00,$07
dc.w $00,$02,$00,$04,$04,$00,$02,$10
dc.w $04,$00,$90,$52,$00,$07,$00,$02
dc.w $02
; White/red
wsp_table3
dc.w $00,$07,$00,$04,$6a,$07,$00,$00
dc.w $07,$00,$02,$00,$07,$02,$02,$07
dc.w $00,$04,$07,$02,$00,$07,$02,$07
dc.w $00,$04,$00,$07,$00,$02,$00,$07
dc.w $02,$07,$00,$02,$00,$02,$07,$00
dc.w $07,$02,$07,$04,$04,$07,$02,$2f
dc.w $04,$07,$af,$6a,$07,$00,$07,$02
dc.w $02
; Red/green
wsp_table4
dc.w $07,$00,$07,$02,$64,$00,$07,$07
dc.w $00,$07,$04,$07,$00,$04,$04,$00
dc.w $07,$02,$00,$04,$07,$00,$04,$00
dc.w $07,$02,$07,$00,$07,$04,$07,$00
dc.w $04,$00,$07,$04,$07,$04,$00,$07
dc.w $00,$04,$00,$02,$02,$00,$04,$20
dc.w $02,$00,$a0,$64,$00,$07,$02,$04
dc.w $04
;+++
; Vector $7C WM.SETSP
;
; Set system palette entries
;
; Call parameters Return parameters
;
; D1.w start index D1 preserved
; D2.w number of elements D2 preserved
; D3.w palette number D3+ all preserved
;
; A0 A0 preserved
; A1 pointer to palette entries / 0 A1 preserved
; A2 A2 preserved
; A3 A3 preserved
; A4 A4 preserved
; A5 not used by any routine
; A6 not used by any routine
;
; Error returns:
; IPAR Illegal index number / invalid number of elements
;
; Set the entries of the system palette to the values in the buffer,
; beginning with the index in D1 (counting from 0) and ending with the
; index D1 + D2 - 1.
;
; If A1 = 0 then the entries are taken out of the default table. Otherwise
; the buffer must hold an array of words with the colour values of the
; different items. The colour format is the standard WMAN colour format as
; described elsewhere.
;---
saveregs reg d1-d2/a0-a1
wm_setsp
movem.l saveregs,-(sp)
bsr.s wm_checkranges
bne.s wsp_rts
move.l a1,d0 ; buffer given?
bne.s wsp_set
lea wsp_tables,a1 ; default values
adda.w d3,a1
adda.w d3,a1
adda.w (a1),a1
adda.w d1,a1 ; one entry is 16 bit
adda.w d1,a1
wsp_set
bsr wm_getspaddress
bne.s wsp_nc
adda.w d1,a0
adda.w d1,a0
bra.s wsp_copye
wsp_copy
move.w (a1)+,(a0)+ ; word entries
wsp_copye
dbf d2,wsp_copy
moveq #0,d0
wsp_rts
movem.l (sp)+,saveregs
rts
wsp_nc
moveq #err.nc,d0
movem.l (sp)+,saveregs
rts
wm_checkranges
cmp.w #wsp.palettes-1,d3
bhi.s wm_iparr
cmpi.w #wsp.high,d1
bhi.s wm_iparr
move.w d1,d0
add.w d2,d0
bcs.s wm_iparr ; Overflow (D2 negative)?
cmpi.w #wsp.entries,d0
bhi.s wm_iparr ; D1 + D2 > max entries?
moveq #0,d0
rts
wm_iparr
moveq #err.ipar,d0
rts
;+++
; Vector $80 WM.GETSP
;
; Read system palette entries
;
; Call parameters Return parameters
;
; D1.w start index D1.w preserved
; D2.w number of elements / -1 D2 preserved / item count
; D3.w palette number D3+ all preserved
;
; A0 A0 preserved
; A1 pointer to entry buffer A1 preserved
; A2 A2 preserved
; A3 A3 preserved
; A4 A4 preserved
; A5 not used by any routine
; A6 not used by any routine
;
; Error returns:
; IPAR Illegal index number / invalid number of elements
;
; Copies entries of the system palette into the given buffer, beginning with
; the index in D1 (counting from 0) and ending with the index D1 + D2 - 1. The
; buffer must be big enough to hold all requested entries.
;
; If D1 is given as -1 the function just returns the number of items held in
; the system palette. This can increase when more items get defined in new
; WMAN version. This is guaranteed to be below 256.
;---
wm_getsp
cmp.w #-1,d2
bne.s wgp_get
move.w #wsp.entries,d2 ; only return item count
moveq #0,d0
rts
wgp_get
movem.l saveregs,-(sp)
bsr.s wm_checkranges
bne.s wgp_rts
bsr.s wm_getspaddress
bne.s wsp_nc
adda.w d1,a0
adda.w d1,a0
bra.s wgp_copye
wgp_copy
move.w (a0)+,(a1)+ ; word entries
wgp_copye
dbf d2,wgp_copy
moveq #0,d0
wgp_rts
movem.l (sp)+,saveregs
rts
;+++
; Get single system palette entry
;
; d1 cr index / entry
;---
wm_getspentry
cmpi.w #wsp.high,d1 ; out of range?
bhi wmc_error
move.l a0,-(sp)
lea wsp_table1,a0
bsr.s wm_getjobpalette
adda.w d1,a0
adda.w d1,a0
move.w (a0),d1
move.l (sp)+,a0
rts
;+++
; Get system palette address
;
; d3 c p palette number
; a0 r palette address
;---
wm_getspaddress
movem.l d0/d1,-(sp)
bsr.s wm_getspvec
adda.w #wpb.pal1,a0
adda.w d3,a0
adda.w d3,a0
adda.w (a0),a0
movem.l (sp)+,d0/d1
rts
;+++
; Get pointer to system palette block
;
; d1 r current job ID
; a0 r pointer to palette
;---
wm_getspvec
movem.l d2,-(sp)
moveq #sms.info,d0
trap #1
move.l sys_clnk(a0),a0 ; console linkage
move.l pt_wdata(a0),a0 ; WMAN data
move.l wd_syspal(a0),a0 ; system palette
movem.l (sp)+,d2
tst.l d0
rts
;+++
; Get system palette address for this job
;
; a0 r palette address
;---
wm_getjobpalette
movem.l d0-d3/a1,-(sp)
bsr.s wm_getspvec ; also returns job ID
moveq #0,d3 ; default to first palette
move.l a0,a1 ; ptr to system palette block
move.l d1,d2 ; job tag / job ID
swap d2
assert wpb.jobtab,0
; adda.w #wpb.jobtab,a1
adda.w (a1),a1
lsl.w #wjb..size,d1
adda.w d1,a1
cmp.w wjb.tag(a1),d2 ; compare job tag
bne.s wmgjp_calc ; no entry for use, take default
move.b wjb.pal(a1),d3 ; get palette number from table
cmp.b #-1,d3 ; own palette?
bne.s wmgjp_calc ; no, go ahead
move.l wjb.ownpal(a1),d0
beq.s wmgjp_calc ; own not set, take default
move.l d0,a0
bra.s wmgjp_rts
wmgjp_calc
adda.w #wpb.pal1,a0
adda.w d3,a0
adda.w d3,a0
adda.w (a0),a0
wmgjp_rts
movem.l (sp)+,d0-d3/a1
rts
;+++
; Vector $90 WM.JBPAL
;
; Set system palette number of job
;
; Call parameters Return parameters
;
; D1.l job ID / -1 D1 preserved
; D2 D2 preserved
; D3.w palette number / -1 D3+ all preserved
;
; A0 A0 preserved
; A1 ptr to job palette or 0 (D3=-1) A1 preserved
; A2 A2 preserved
; A3 A3 preserved
; A4 A4 preserved
; A5 not used by any routine
; A6 not used by any routine
;
; Error returns:
; IJOB Illegal job ID
; IPAR Illegal palette number
;
; Sets the active system palette for the given job.
;---
wm_jbpal
movem.l d1-d2/d4/a0,-(sp)
moveq #err.ipar,d0
cmp.w #-1,d3 ; palette number in range?
blt.s wmjp_rts
cmp.w #wsp.palettes,d3
bge.s wmjp_rts
move.l d1,d4
moveq #sms.info,d0
trap #1
cmp.l #-1,d4 ; need current job ID?
bne.s wmjp_givenid
move.l d1,d4 ; yes, take it
wmjp_givenid
cmp.w sys_jbtp(a0),d4 ; job number to large?
bhi.s wmjp_ijob ; ... yes
move.l sys_jbtb(a0),a0 ; job table
lsl.w #2,d4 ; to job table entry size
move.l (a0,d4.w),a0
move.w jcb_tag(a0),d1
move.l d4,d2
swap d2 ; tag of given job ID
cmp.w d2,d1
bne.s wmjp_ijob ; must match
bsr wm_getspvec
assert wpb.jobtab,0
; adda.w #wsp.jobtab,a0
adda.w (a0),a0
lsl.w #wjb..size-2,d4
adda.w d4,a0
cmp.w wjb.tag(a0),d2 ; already an entry for this job?
beq.s wmjp_noreset
move.w d2,wjb.tag(a0) ; new entry, save tag
clr.l wjb.ownpal(a0) ; clear ptr to job's own palette
wmjp_noreset
move.b d3,wjb.pal(a0) ; save number
bpl.s wmjp_rts ; if not own job palette, exit
move.l a1,d0 ; ptr to palette given?
beq.s wmjp_rts ; no, exit
move.l a1,wjb.ownpal(a0)
moveq #0,d0
wmjp_rts
movem.l (sp)+,d1-d2/d4/a0
rts
wmjp_ijob
moveq #err.ijob,d0
bra.s wmjp_rts
;+++
; Allocate and initialise system palette with values from config block
;
; d0 r error code
; a0 r pointer to allocated area
;
; status return standard
;---
wm_initsp
movem.l d1-d3/a1,-(sp)
moveq #sms.info,d0
trap #1
move.l sys_jbtt(a0),d0
sub.l sys_jbtb(a0),d0 ; size of job table
lsl.l #wjb..size-2,d0 ; shift to have size of own job table
add.l #wsp.size+wpb.size,d0 ; room for palette and header
jsr gu_achpp
bne.s wmi_rts
; fill in pointers
move.w #wpb.size-wpb.pal1,wpb.pal1(a0)
move.w #wpb.size-wpb.pal2+1*wsp.sizes,wpb.pal2(a0)
move.w #wpb.size-wpb.pal3+2*wsp.sizes,wpb.pal3(a0)
move.w #wpb.size-wpb.pal4+3*wsp.sizes,wpb.pal4(a0)
move.w #wpb.size-wpb.jobtab+4*wsp.sizes,wpb.jobtab(a0) ; jobs are last
move.l a0,-(sp)
adda.l #wpb.size,a0
lea wsp_table1,a1
move.w #wsp.size/2-1,d0
wmi_loop
move.w (a1)+,(a0)+
dbf d0,wmi_loop
move.l (sp)+,a0
moveq #0,d0
wmi_rts
movem.l (sp)+,d1-d3/a1
rts
end
|
P6/data_P6/testpoint/testpoint92.asm | alxzzhou/BUAA_CO_2020 | 1 | 12212 | <gh_stars>1-10
ori $1, $0, 13
ori $2, $0, 14
ori $3, $0, 0
ori $4, $0, 3
sw $4, 0($0)
sw $1, 4($0)
sw $3, 8($0)
sw $3, 12($0)
sw $1, 16($0)
sw $1, 20($0)
sw $4, 24($0)
sw $3, 28($0)
sw $1, 32($0)
sw $4, 36($0)
sw $1, 40($0)
sw $4, 44($0)
sw $2, 48($0)
sw $3, 52($0)
sw $1, 56($0)
sw $2, 60($0)
sw $4, 64($0)
sw $1, 68($0)
sw $1, 72($0)
sw $3, 76($0)
sw $4, 80($0)
sw $1, 84($0)
sw $4, 88($0)
sw $2, 92($0)
sw $2, 96($0)
sw $3, 100($0)
sw $2, 104($0)
sw $1, 108($0)
sw $3, 112($0)
sw $4, 116($0)
sw $2, 120($0)
sw $1, 124($0)
multu $2, $2
sllv $2, $2, $2
sll $0, $0, 0
nor $4, $2, $2
TAG1:
sll $0, $0, 0
and $1, $4, $3
srl $3, $4, 14
sltu $3, $3, $4
TAG2:
beq $3, $3, TAG3
lui $1, 12
slti $2, $1, 6
bgez $3, TAG3
TAG3:
mflo $1
blez $2, TAG4
mfhi $3
lui $4, 13
TAG4:
subu $4, $4, $4
mtlo $4
mflo $3
lb $1, 0($3)
TAG5:
bne $1, $1, TAG6
lui $4, 5
nor $4, $1, $1
mflo $3
TAG6:
slti $3, $3, 10
srav $4, $3, $3
lbu $1, 0($3)
bgez $3, TAG7
TAG7:
mfhi $4
mtlo $4
sb $1, 0($1)
mthi $1
TAG8:
blez $4, TAG9
sb $4, 0($4)
bgtz $4, TAG9
sltu $2, $4, $4
TAG9:
mult $2, $2
bgez $2, TAG10
sll $0, $0, 0
slt $2, $2, $2
TAG10:
srav $4, $2, $2
div $2, $4
mthi $4
divu $2, $2
TAG11:
lui $1, 10
bne $1, $4, TAG12
sltu $2, $4, $1
bltz $4, TAG12
TAG12:
lui $4, 1
ori $3, $2, 1
sb $2, 0($3)
bltz $2, TAG13
TAG13:
sb $3, 0($3)
beq $3, $3, TAG14
lb $2, 0($3)
mtlo $3
TAG14:
sb $2, 0($2)
slti $1, $2, 14
lui $2, 11
sb $2, 0($1)
TAG15:
subu $3, $2, $2
bne $3, $3, TAG16
mult $3, $2
lui $1, 12
TAG16:
beq $1, $1, TAG17
or $4, $1, $1
mfhi $2
lw $4, 0($2)
TAG17:
divu $4, $4
bgtz $4, TAG18
mthi $4
beq $4, $4, TAG18
TAG18:
mthi $4
nor $2, $4, $4
slti $2, $4, 14
subu $4, $2, $4
TAG19:
bgtz $4, TAG20
srl $3, $4, 13
sll $0, $0, 0
lui $4, 0
TAG20:
lui $2, 13
mflo $3
bltz $2, TAG21
sll $0, $0, 0
TAG21:
mthi $3
mthi $3
bgtz $3, TAG22
lui $1, 1
TAG22:
srlv $3, $1, $1
sll $0, $0, 0
sll $0, $0, 0
sra $4, $3, 7
TAG23:
sll $0, $0, 0
lw $1, -512($4)
sw $1, 0($1)
sllv $1, $4, $1
TAG24:
and $3, $1, $1
div $1, $1
mtlo $1
mthi $3
TAG25:
mflo $2
mthi $3
srlv $1, $2, $2
lhu $3, -512($3)
TAG26:
sb $3, 0($3)
sw $3, 0($3)
bne $3, $3, TAG27
sltiu $1, $3, 12
TAG27:
divu $1, $1
sb $1, 0($1)
bne $1, $1, TAG28
mflo $4
TAG28:
lbu $3, 0($4)
mult $3, $3
mult $3, $4
div $4, $3
TAG29:
bltz $3, TAG30
lbu $4, 0($3)
lbu $1, 0($3)
xori $1, $1, 0
TAG30:
mflo $3
or $4, $3, $1
addu $2, $4, $4
sb $2, 0($4)
TAG31:
mfhi $3
mtlo $2
subu $3, $2, $2
mflo $3
TAG32:
bgez $3, TAG33
mflo $2
mflo $4
bltz $2, TAG33
TAG33:
sb $4, 0($4)
bltz $4, TAG34
sb $4, 0($4)
multu $4, $4
TAG34:
mfhi $1
bgtz $1, TAG35
and $1, $4, $1
sb $4, 0($4)
TAG35:
bltz $1, TAG36
sll $2, $1, 7
xor $2, $2, $1
sltiu $3, $2, 2
TAG36:
mfhi $3
slt $3, $3, $3
lh $3, 0($3)
mtlo $3
TAG37:
sw $3, -256($3)
lui $4, 13
mfhi $1
sll $0, $0, 0
TAG38:
sh $3, -256($3)
bne $3, $3, TAG39
divu $3, $3
lui $3, 7
TAG39:
mthi $3
beq $3, $3, TAG40
sll $0, $0, 0
sh $3, 0($3)
TAG40:
lui $1, 15
mthi $1
mflo $4
sll $3, $1, 8
TAG41:
bgez $3, TAG42
lui $2, 7
beq $3, $3, TAG42
mflo $4
TAG42:
or $3, $4, $4
mfhi $3
and $2, $4, $3
bgtz $2, TAG43
TAG43:
sh $2, 0($2)
mflo $1
sb $2, 0($1)
sltu $1, $2, $2
TAG44:
addi $3, $1, 8
lui $3, 14
sll $0, $0, 0
sll $0, $0, 0
TAG45:
slti $3, $3, 7
sra $4, $3, 15
mfhi $2
nor $1, $2, $2
TAG46:
bne $1, $1, TAG47
sll $0, $0, 0
sll $0, $0, 0
mfhi $2
TAG47:
mtlo $2
xori $2, $2, 11
beq $2, $2, TAG48
lui $4, 3
TAG48:
multu $4, $4
andi $4, $4, 1
mfhi $4
divu $4, $4
TAG49:
multu $4, $4
or $1, $4, $4
srlv $2, $4, $4
srlv $3, $1, $1
TAG50:
mtlo $3
bgtz $3, TAG51
lui $4, 12
div $4, $4
TAG51:
bgez $4, TAG52
sll $0, $0, 0
sh $4, 0($4)
div $4, $4
TAG52:
bne $4, $4, TAG53
sll $0, $0, 0
sll $0, $0, 0
addi $3, $2, 13
TAG53:
lui $2, 7
beq $2, $2, TAG54
mfhi $4
sh $2, 0($2)
TAG54:
sh $4, 0($4)
ori $2, $4, 8
mfhi $3
lhu $3, 0($2)
TAG55:
lhu $1, 0($3)
sw $3, 0($3)
lui $1, 9
addu $1, $3, $1
TAG56:
addu $2, $1, $1
andi $4, $2, 14
sll $0, $0, 0
lui $4, 5
TAG57:
xor $3, $4, $4
mfhi $4
bgtz $3, TAG58
multu $3, $3
TAG58:
addu $1, $4, $4
lui $3, 5
srlv $4, $4, $3
xor $2, $4, $4
TAG59:
mtlo $2
sw $2, 0($2)
lui $3, 13
mthi $2
TAG60:
sll $0, $0, 0
addiu $1, $3, 13
beq $1, $3, TAG61
ori $1, $1, 3
TAG61:
subu $3, $1, $1
mthi $3
lui $4, 5
lui $1, 7
TAG62:
ori $3, $1, 11
mfhi $4
mfhi $2
sll $0, $0, 0
TAG63:
mflo $1
mult $3, $1
mtlo $1
multu $3, $1
TAG64:
sltiu $3, $1, 13
bne $3, $3, TAG65
sb $3, 0($3)
mfhi $2
TAG65:
mult $2, $2
and $2, $2, $2
slti $4, $2, 7
blez $2, TAG66
TAG66:
lb $3, 0($4)
bgtz $3, TAG67
mtlo $3
sra $2, $4, 9
TAG67:
lui $4, 15
sw $4, 0($2)
mthi $2
sll $0, $0, 0
TAG68:
ori $4, $2, 10
mtlo $2
blez $2, TAG69
addu $4, $4, $2
TAG69:
bne $4, $4, TAG70
mfhi $2
lh $4, 0($4)
bltz $4, TAG70
TAG70:
srav $2, $4, $4
mflo $1
mthi $4
mthi $4
TAG71:
bgez $1, TAG72
sb $1, 0($1)
divu $1, $1
sb $1, 0($1)
TAG72:
sb $1, 0($1)
beq $1, $1, TAG73
mtlo $1
lh $1, 0($1)
TAG73:
blez $1, TAG74
mtlo $1
divu $1, $1
sb $1, 0($1)
TAG74:
mflo $1
lui $4, 2
lhu $1, 0($1)
mult $1, $1
TAG75:
nor $1, $1, $1
mthi $1
lbu $4, 1($1)
sllv $3, $1, $4
TAG76:
mtlo $3
bne $3, $3, TAG77
and $4, $3, $3
addiu $4, $3, 8
TAG77:
lb $3, 0($4)
bgez $3, TAG78
lhu $3, 0($3)
div $4, $4
TAG78:
bgtz $3, TAG79
mthi $3
bgez $3, TAG79
lui $4, 12
TAG79:
nor $4, $4, $4
beq $4, $4, TAG80
mfhi $4
lh $2, 0($4)
TAG80:
mfhi $2
mthi $2
bgez $2, TAG81
subu $2, $2, $2
TAG81:
or $4, $2, $2
mtlo $2
mult $4, $4
sb $4, 0($2)
TAG82:
multu $4, $4
addiu $3, $4, 5
lhu $1, 0($4)
mtlo $3
TAG83:
mtlo $1
beq $1, $1, TAG84
sllv $4, $1, $1
slt $2, $1, $1
TAG84:
lui $1, 7
mtlo $1
beq $2, $1, TAG85
sll $0, $0, 0
TAG85:
lui $2, 15
subu $4, $2, $2
sll $0, $0, 0
beq $4, $2, TAG86
TAG86:
mfhi $3
lui $1, 2
subu $2, $1, $1
bltz $3, TAG87
TAG87:
lbu $1, 0($2)
lui $1, 0
lbu $2, 0($1)
mflo $1
TAG88:
blez $1, TAG89
mthi $1
mfhi $2
mflo $3
TAG89:
mtlo $3
sll $2, $3, 12
addiu $4, $2, 9
ori $2, $3, 5
TAG90:
mthi $2
lui $3, 1
mthi $3
sll $0, $0, 0
TAG91:
mfhi $3
lui $3, 6
divu $3, $3
multu $3, $3
TAG92:
mult $3, $3
multu $3, $3
mflo $3
lui $2, 10
TAG93:
bgez $2, TAG94
mtlo $2
srlv $3, $2, $2
addiu $3, $3, 8
TAG94:
srlv $1, $3, $3
lw $2, 0($1)
lui $4, 7
sra $4, $2, 9
TAG95:
lui $1, 2
lui $4, 14
beq $4, $1, TAG96
mfhi $3
TAG96:
mult $3, $3
lui $2, 6
andi $3, $2, 2
sh $3, 0($3)
TAG97:
lui $1, 4
sltiu $4, $1, 7
sb $3, 0($3)
lhu $1, 0($3)
TAG98:
sb $1, 0($1)
bgez $1, TAG99
lh $1, 0($1)
addi $4, $1, 6
TAG99:
lw $2, 0($4)
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG100:
sll $0, $0, 0
lui $1, 10
blez $1, TAG101
subu $2, $2, $1
TAG101:
mthi $2
blez $2, TAG102
mfhi $2
lui $4, 11
TAG102:
sll $0, $0, 0
sll $0, $0, 0
blez $2, TAG103
sra $4, $4, 14
TAG103:
andi $4, $4, 1
mfhi $1
mult $4, $4
lw $1, 0($4)
TAG104:
sll $0, $0, 0
mthi $1
lui $2, 14
sll $0, $0, 0
TAG105:
mfhi $3
sll $0, $0, 0
sll $0, $0, 0
mflo $4
TAG106:
mthi $4
nor $2, $4, $4
mtlo $4
slt $2, $4, $2
TAG107:
xori $3, $2, 12
lw $4, 0($3)
div $2, $3
sltiu $1, $4, 10
TAG108:
mflo $2
mflo $2
mtlo $2
lbu $4, 0($1)
TAG109:
lhu $1, 0($4)
lui $2, 8
sw $1, 0($4)
sll $4, $2, 11
TAG110:
sll $0, $0, 0
mthi $1
bgtz $4, TAG111
or $3, $4, $4
TAG111:
beq $3, $3, TAG112
sll $0, $0, 0
mfhi $2
mfhi $4
TAG112:
xori $2, $4, 13
mtlo $2
bne $4, $4, TAG113
or $4, $2, $2
TAG113:
mthi $4
sll $4, $4, 13
lui $4, 1
blez $4, TAG114
TAG114:
mtlo $4
or $2, $4, $4
multu $4, $4
lui $1, 0
TAG115:
slt $4, $1, $1
bltz $4, TAG116
lui $4, 12
mfhi $3
TAG116:
mult $3, $3
sll $3, $3, 14
mthi $3
lui $1, 14
TAG117:
bgtz $1, TAG118
or $2, $1, $1
mtlo $2
lui $2, 7
TAG118:
sll $0, $0, 0
addiu $2, $2, 6
lui $1, 7
mflo $2
TAG119:
mthi $2
bgtz $2, TAG120
lb $4, 0($2)
lui $2, 12
TAG120:
sltu $2, $2, $2
bgez $2, TAG121
lw $2, 0($2)
addi $3, $2, 7
TAG121:
sll $0, $0, 0
mthi $4
or $4, $3, $4
lui $3, 4
TAG122:
divu $3, $3
divu $3, $3
bltz $3, TAG123
slti $1, $3, 14
TAG123:
xori $1, $1, 9
sra $3, $1, 0
bne $1, $3, TAG124
mflo $3
TAG124:
lui $4, 2
sll $0, $0, 0
sll $0, $0, 0
mthi $4
TAG125:
mtlo $3
srav $2, $3, $3
mflo $4
bne $2, $2, TAG126
TAG126:
mtlo $4
lb $1, 0($4)
multu $1, $1
sub $4, $1, $1
TAG127:
mthi $4
multu $4, $4
bltz $4, TAG128
addu $4, $4, $4
TAG128:
mtlo $4
lhu $2, 0($4)
mtlo $4
mult $2, $2
TAG129:
beq $2, $2, TAG130
sh $2, 0($2)
slti $3, $2, 6
sra $2, $2, 5
TAG130:
blez $2, TAG131
lh $1, 0($2)
mtlo $1
slti $1, $1, 13
TAG131:
sltu $4, $1, $1
beq $4, $4, TAG132
lw $2, 0($1)
sw $2, 0($1)
TAG132:
mflo $1
sw $1, 0($2)
blez $1, TAG133
lb $4, 0($2)
TAG133:
beq $4, $4, TAG134
lb $3, 0($4)
bne $4, $4, TAG134
xor $1, $3, $4
TAG134:
sw $1, 0($1)
nor $1, $1, $1
addu $2, $1, $1
sh $1, 2($2)
TAG135:
beq $2, $2, TAG136
mtlo $2
sll $3, $2, 4
lui $2, 8
TAG136:
bne $2, $2, TAG137
lw $1, 2($2)
lw $2, 2($2)
sll $0, $0, 0
TAG137:
xor $4, $2, $2
bltz $4, TAG138
sll $0, $0, 0
sra $4, $4, 2
TAG138:
multu $4, $4
sltiu $3, $4, 8
sb $4, 0($3)
mult $3, $4
TAG139:
mfhi $3
lh $4, 0($3)
bgez $3, TAG140
sb $4, -255($4)
TAG140:
sll $0, $0, 0
sb $2, -255($4)
mtlo $4
mtlo $2
TAG141:
beq $2, $2, TAG142
lui $1, 4
subu $2, $1, $2
multu $2, $1
TAG142:
bgtz $2, TAG143
sll $0, $0, 0
lh $4, 0($3)
mult $3, $4
TAG143:
div $4, $4
beq $4, $4, TAG144
andi $4, $4, 15
mflo $4
TAG144:
bgtz $4, TAG145
subu $3, $4, $4
blez $4, TAG145
sh $3, 0($4)
TAG145:
beq $3, $3, TAG146
mfhi $3
beq $3, $3, TAG146
mthi $3
TAG146:
beq $3, $3, TAG147
sw $3, 0($3)
bne $3, $3, TAG147
lui $1, 11
TAG147:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
andi $2, $1, 12
TAG148:
mtlo $2
addiu $1, $2, 14
mtlo $2
lh $3, 0($2)
TAG149:
mthi $3
lbu $2, 0($3)
lhu $1, 0($3)
sltu $3, $2, $1
TAG150:
lui $3, 14
xori $4, $3, 4
mfhi $3
mult $3, $3
TAG151:
lui $3, 12
beq $3, $3, TAG152
sll $0, $0, 0
lui $3, 15
TAG152:
bltz $3, TAG153
mflo $2
bne $2, $3, TAG153
lui $4, 8
TAG153:
nor $2, $4, $4
multu $4, $2
sll $0, $0, 0
mult $4, $4
TAG154:
sll $0, $0, 0
sll $0, $0, 0
sll $3, $3, 1
srav $2, $2, $3
TAG155:
ori $4, $2, 5
blez $2, TAG156
mflo $4
addiu $2, $2, 7
TAG156:
bltz $2, TAG157
sll $0, $0, 0
srl $2, $3, 0
sb $3, 0($3)
TAG157:
subu $3, $2, $2
mtlo $2
div $2, $2
mult $3, $3
TAG158:
bne $3, $3, TAG159
sb $3, 0($3)
bne $3, $3, TAG159
mflo $1
TAG159:
multu $1, $1
multu $1, $1
mfhi $4
and $3, $4, $4
TAG160:
mfhi $2
mflo $3
blez $3, TAG161
lui $3, 7
TAG161:
mtlo $3
sll $0, $0, 0
bne $3, $3, TAG162
mthi $3
TAG162:
mtlo $3
sra $2, $3, 7
sll $0, $0, 0
lhu $1, -3584($2)
TAG163:
mflo $2
lhu $3, 0($1)
lw $3, 0($3)
addi $1, $3, 5
TAG164:
mflo $2
bltz $2, TAG165
subu $2, $2, $2
lh $1, 0($2)
TAG165:
lui $2, 2
sb $1, 0($1)
lw $1, 0($1)
sub $4, $2, $1
TAG166:
mthi $4
sra $3, $4, 0
mfhi $2
blez $4, TAG167
TAG167:
sllv $4, $2, $2
sll $0, $0, 0
srl $3, $4, 6
bgtz $3, TAG168
TAG168:
sw $3, -2048($3)
lb $1, -2048($3)
nor $4, $3, $3
mthi $4
TAG169:
lui $2, 10
mflo $4
sll $0, $0, 0
mtlo $4
TAG170:
divu $4, $4
beq $4, $4, TAG171
lui $3, 4
andi $1, $3, 14
TAG171:
sw $1, 0($1)
mtlo $1
beq $1, $1, TAG172
lbu $3, 0($1)
TAG172:
sw $3, 0($3)
mthi $3
lui $1, 2
xor $3, $1, $3
TAG173:
mult $3, $3
blez $3, TAG174
divu $3, $3
div $3, $3
TAG174:
addiu $4, $3, 12
blez $3, TAG175
sll $0, $0, 0
sll $0, $0, 0
TAG175:
mtlo $3
mflo $1
mthi $3
sll $0, $0, 0
TAG176:
mflo $1
mult $3, $3
mflo $3
lw $4, 0($3)
TAG177:
sb $4, 0($4)
mflo $3
beq $4, $3, TAG178
mfhi $2
TAG178:
mtlo $2
lui $2, 8
div $2, $2
bgez $2, TAG179
TAG179:
slt $1, $2, $2
mflo $3
mult $2, $3
mthi $1
TAG180:
mult $3, $3
divu $3, $3
multu $3, $3
bne $3, $3, TAG181
TAG181:
mtlo $3
addiu $2, $3, 10
addiu $1, $2, 9
beq $2, $3, TAG182
TAG182:
sh $1, 0($1)
sh $1, 0($1)
sh $1, 0($1)
srav $1, $1, $1
TAG183:
beq $1, $1, TAG184
andi $1, $1, 1
mtlo $1
lui $2, 2
TAG184:
mflo $1
addiu $3, $2, 14
sb $1, 0($1)
sb $2, 0($1)
TAG185:
bne $3, $3, TAG186
mult $3, $3
sb $3, 0($3)
sb $3, 0($3)
TAG186:
ori $1, $3, 3
slti $4, $3, 6
mult $4, $4
mthi $3
TAG187:
mult $4, $4
srlv $1, $4, $4
multu $1, $1
mfhi $4
TAG188:
mthi $4
multu $4, $4
addiu $3, $4, 6
bne $3, $4, TAG189
TAG189:
multu $3, $3
bgtz $3, TAG190
lbu $3, 0($3)
lbu $3, 0($3)
TAG190:
beq $3, $3, TAG191
srl $2, $3, 3
mtlo $3
srav $2, $3, $3
TAG191:
sll $4, $2, 10
mult $4, $2
sh $4, 0($2)
sh $4, 0($2)
TAG192:
add $3, $4, $4
bne $4, $4, TAG193
multu $4, $4
lui $4, 15
TAG193:
mtlo $4
multu $4, $4
sltu $2, $4, $4
bne $4, $4, TAG194
TAG194:
lw $2, 0($2)
lb $2, 0($2)
mthi $2
mflo $4
TAG195:
addu $4, $4, $4
sh $4, 0($4)
lbu $4, 0($4)
mfhi $2
TAG196:
lui $4, 6
lw $1, 0($2)
mtlo $1
sll $0, $0, 0
TAG197:
multu $1, $1
lui $4, 13
addi $3, $1, 11
lbu $2, 0($1)
TAG198:
mult $2, $2
mult $2, $2
mfhi $1
sllv $1, $1, $1
TAG199:
sb $1, 0($1)
srl $3, $1, 3
mtlo $3
slti $4, $1, 14
TAG200:
mfhi $3
sllv $1, $4, $3
sb $3, 0($1)
mflo $4
TAG201:
xori $3, $4, 3
andi $2, $3, 2
beq $4, $2, TAG202
lui $3, 3
TAG202:
sll $0, $0, 0
beq $3, $3, TAG203
mtlo $3
addu $2, $3, $3
TAG203:
and $4, $2, $2
subu $2, $2, $2
sltiu $2, $2, 1
lhu $3, 0($4)
TAG204:
mtlo $3
srl $4, $3, 13
srl $4, $4, 2
ori $2, $3, 5
TAG205:
mfhi $4
mflo $4
sh $4, 0($4)
bltz $4, TAG206
TAG206:
slt $4, $4, $4
beq $4, $4, TAG207
mflo $3
lw $1, 0($4)
TAG207:
addiu $1, $1, 5
sh $1, 0($1)
lh $1, 0($1)
bltz $1, TAG208
TAG208:
lui $1, 2
sll $0, $0, 0
mthi $1
beq $1, $1, TAG209
TAG209:
mthi $1
mtlo $1
sll $0, $0, 0
lw $4, 0($3)
TAG210:
srl $3, $4, 11
lbu $1, 0($4)
lui $1, 1
mult $1, $3
TAG211:
sll $0, $0, 0
mflo $3
multu $3, $3
sll $0, $0, 0
TAG212:
mflo $3
mtlo $3
sltiu $2, $3, 15
multu $2, $3
TAG213:
sll $1, $2, 10
addiu $2, $1, 7
xori $4, $2, 3
sh $2, -1031($2)
TAG214:
divu $4, $4
lui $1, 10
lb $1, -1028($4)
bne $1, $4, TAG215
TAG215:
divu $1, $1
sltu $4, $1, $1
bltz $1, TAG216
lb $4, 0($1)
TAG216:
lui $2, 14
lw $3, 0($4)
multu $4, $2
bne $2, $3, TAG217
TAG217:
slt $2, $3, $3
sw $3, 0($2)
bltz $3, TAG218
sh $3, 0($2)
TAG218:
lui $1, 12
addiu $1, $2, 6
xor $3, $2, $2
beq $2, $2, TAG219
TAG219:
sh $3, 0($3)
xori $1, $3, 2
xor $4, $1, $3
mthi $1
TAG220:
mfhi $3
ori $3, $3, 10
div $3, $3
divu $4, $3
TAG221:
lui $2, 6
lb $2, 0($3)
addiu $4, $3, 10
nor $3, $2, $2
TAG222:
slti $2, $3, 13
sllv $3, $3, $2
mfhi $3
sh $2, 0($3)
TAG223:
slti $2, $3, 6
bne $3, $3, TAG224
mtlo $3
slti $1, $2, 11
TAG224:
sb $1, 0($1)
div $1, $1
lbu $2, 0($1)
mfhi $1
TAG225:
mthi $1
lbu $1, 0($1)
beq $1, $1, TAG226
lui $3, 7
TAG226:
ori $3, $3, 14
sll $0, $0, 0
multu $3, $3
sll $0, $0, 0
TAG227:
mtlo $3
ori $1, $3, 1
bne $1, $3, TAG228
sll $0, $0, 0
TAG228:
bgez $1, TAG229
lui $1, 14
sll $4, $1, 14
mthi $4
TAG229:
mult $4, $4
div $4, $4
lui $3, 0
blez $3, TAG230
TAG230:
sub $3, $3, $3
mtlo $3
lhu $2, 0($3)
sltu $2, $2, $2
TAG231:
mult $2, $2
mflo $1
mult $1, $2
addu $3, $2, $1
TAG232:
nor $1, $3, $3
beq $3, $3, TAG233
sh $3, 1($1)
sltiu $3, $3, 15
TAG233:
mtlo $3
andi $1, $3, 5
srav $2, $3, $3
lh $2, 0($2)
TAG234:
sllv $2, $2, $2
multu $2, $2
bltz $2, TAG235
sb $2, 0($2)
TAG235:
mflo $4
mfhi $4
bne $2, $4, TAG236
lbu $4, 0($4)
TAG236:
sb $4, 0($4)
sltiu $3, $4, 14
beq $3, $4, TAG237
lui $1, 15
TAG237:
mthi $1
mthi $1
sll $0, $0, 0
lui $2, 6
TAG238:
lui $3, 13
mult $3, $3
beq $3, $3, TAG239
lui $4, 6
TAG239:
sll $0, $0, 0
addu $3, $4, $4
lui $1, 6
lui $4, 1
TAG240:
div $4, $4
and $3, $4, $4
lui $1, 10
mtlo $3
TAG241:
mfhi $3
addiu $3, $1, 7
sll $0, $0, 0
sll $0, $0, 0
TAG242:
bne $2, $2, TAG243
mfhi $2
and $3, $2, $2
mflo $4
TAG243:
div $4, $4
sll $0, $0, 0
sll $0, $0, 0
beq $4, $4, TAG244
TAG244:
mult $3, $3
lhu $2, 0($3)
mflo $3
bne $3, $3, TAG245
TAG245:
sb $3, 0($3)
bne $3, $3, TAG246
nor $4, $3, $3
bne $4, $4, TAG246
TAG246:
lui $1, 15
mult $4, $1
sll $0, $0, 0
divu $4, $1
TAG247:
sll $0, $0, 0
mfhi $1
slt $4, $1, $1
divu $4, $1
TAG248:
lhu $4, 0($4)
mflo $2
lui $2, 7
sltiu $2, $4, 6
TAG249:
lui $4, 13
sb $2, 0($2)
bgez $4, TAG250
sb $2, 0($2)
TAG250:
nor $3, $4, $4
bltz $3, TAG251
addiu $3, $4, 3
beq $3, $4, TAG251
TAG251:
mtlo $3
beq $3, $3, TAG252
lui $2, 15
mflo $1
TAG252:
div $1, $1
mthi $1
beq $1, $1, TAG253
mthi $1
TAG253:
mfhi $1
div $1, $1
sll $0, $0, 0
divu $1, $1
TAG254:
mfhi $1
sw $1, 0($1)
bgtz $1, TAG255
mfhi $1
TAG255:
mthi $1
sub $4, $1, $1
slti $4, $1, 9
sb $4, 0($4)
TAG256:
bgez $4, TAG257
mtlo $4
mtlo $4
multu $4, $4
TAG257:
mthi $4
mtlo $4
bne $4, $4, TAG258
mfhi $2
TAG258:
slt $4, $2, $2
bgtz $4, TAG259
mtlo $4
andi $4, $2, 6
TAG259:
lh $1, 0($4)
sltu $2, $4, $4
sll $2, $4, 11
mthi $2
TAG260:
mtlo $2
mult $2, $2
mult $2, $2
nor $4, $2, $2
TAG261:
sltu $2, $4, $4
lw $2, 0($2)
multu $4, $2
multu $2, $4
TAG262:
bgtz $2, TAG263
sh $2, -256($2)
divu $2, $2
beq $2, $2, TAG263
TAG263:
ori $1, $2, 7
mult $1, $1
mfhi $4
bne $2, $1, TAG264
TAG264:
lui $4, 10
lui $4, 12
sll $0, $0, 0
mfhi $1
TAG265:
mthi $1
blez $1, TAG266
sw $1, 0($1)
bgtz $1, TAG266
TAG266:
slti $4, $1, 15
mthi $4
mthi $4
sh $1, 0($1)
TAG267:
lb $4, 0($4)
multu $4, $4
xor $4, $4, $4
lb $3, 0($4)
TAG268:
mflo $2
bltz $2, TAG269
andi $3, $3, 7
addi $2, $2, 4
TAG269:
bgtz $2, TAG270
sb $2, 0($2)
addiu $2, $2, 5
lb $3, 0($2)
TAG270:
bne $3, $3, TAG271
mthi $3
lb $4, 0($3)
addi $1, $4, 4
TAG271:
ori $3, $1, 10
mflo $3
mflo $4
srl $3, $1, 1
TAG272:
mflo $2
xori $3, $3, 2
sw $3, 0($3)
addi $1, $3, 11
TAG273:
div $1, $1
lbu $4, 0($1)
mfhi $4
bltz $4, TAG274
TAG274:
mthi $4
mfhi $2
lw $4, 0($2)
lui $3, 13
TAG275:
bgez $3, TAG276
addiu $1, $3, 6
lh $3, 0($3)
mthi $3
TAG276:
mult $3, $3
bgez $3, TAG277
sll $0, $0, 0
bne $3, $3, TAG277
TAG277:
lui $1, 4
bne $3, $3, TAG278
divu $1, $1
sra $2, $3, 4
TAG278:
div $2, $2
bne $2, $2, TAG279
sll $0, $0, 0
lui $4, 6
TAG279:
beq $4, $4, TAG280
lui $3, 14
addiu $1, $3, 5
bltz $1, TAG280
TAG280:
sll $0, $0, 0
beq $1, $1, TAG281
andi $1, $1, 1
lui $4, 12
TAG281:
sll $0, $0, 0
mthi $4
mfhi $1
slti $2, $4, 15
TAG282:
lui $2, 0
lui $4, 6
mtlo $2
lui $1, 7
TAG283:
bgtz $1, TAG284
slt $3, $1, $1
lui $1, 2
sra $1, $1, 9
TAG284:
addu $4, $1, $1
mthi $1
sllv $4, $4, $4
beq $1, $4, TAG285
TAG285:
sll $0, $0, 0
sll $0, $0, 0
subu $1, $1, $1
mthi $1
TAG286:
mtlo $1
mtlo $1
sllv $3, $1, $1
sltiu $4, $3, 2
TAG287:
multu $4, $4
sb $4, 0($4)
sra $1, $4, 3
sltu $4, $1, $4
TAG288:
sb $4, 0($4)
lb $3, 0($4)
lb $4, 0($4)
sll $4, $4, 4
TAG289:
div $4, $4
lw $2, 0($4)
addu $3, $4, $2
divu $4, $2
TAG290:
bgez $3, TAG291
multu $3, $3
mthi $3
xor $3, $3, $3
TAG291:
lui $2, 14
bne $2, $2, TAG292
and $4, $3, $3
mfhi $1
TAG292:
mtlo $1
multu $1, $1
mult $1, $1
bgez $1, TAG293
TAG293:
mfhi $1
and $3, $1, $1
sh $1, 0($1)
slti $2, $1, 7
TAG294:
beq $2, $2, TAG295
or $3, $2, $2
div $3, $3
lui $3, 8
TAG295:
xori $3, $3, 13
sw $3, 0($3)
div $3, $3
slti $3, $3, 3
TAG296:
blez $3, TAG297
lui $4, 15
bgez $3, TAG297
or $4, $4, $4
TAG297:
lui $4, 5
srav $1, $4, $4
sll $0, $0, 0
blez $1, TAG298
TAG298:
lui $1, 1
andi $1, $1, 9
sub $2, $1, $1
xor $1, $1, $2
TAG299:
mult $1, $1
lw $3, 0($1)
bgez $1, TAG300
sw $3, 0($1)
TAG300:
mult $3, $3
xori $1, $3, 9
bgez $3, TAG301
lhu $1, 0($3)
TAG301:
beq $1, $1, TAG302
mfhi $1
beq $1, $1, TAG302
and $2, $1, $1
TAG302:
sll $2, $2, 9
sll $1, $2, 13
srlv $3, $1, $2
bltz $3, TAG303
TAG303:
lh $1, 0($3)
addi $2, $1, 6
lui $3, 2
lui $2, 8
TAG304:
sll $0, $0, 0
addu $1, $2, $2
lui $4, 2
ori $2, $1, 0
TAG305:
beq $2, $2, TAG306
mtlo $2
srl $1, $2, 6
bgez $1, TAG306
TAG306:
mtlo $1
mthi $1
sll $0, $0, 0
mfhi $1
TAG307:
srl $2, $1, 9
xori $1, $1, 14
slti $4, $2, 14
mtlo $1
TAG308:
lui $1, 8
lbu $1, 0($4)
bgtz $4, TAG309
sllv $2, $4, $1
TAG309:
mflo $4
lbu $4, 0($2)
bgtz $4, TAG310
or $2, $4, $4
TAG310:
srl $2, $2, 13
mfhi $2
bgtz $2, TAG311
mtlo $2
TAG311:
bgtz $2, TAG312
sll $0, $0, 0
bgtz $2, TAG312
mflo $2
TAG312:
mfhi $2
sll $0, $0, 0
sltu $1, $2, $2
multu $2, $1
TAG313:
mtlo $1
lw $2, 0($1)
sub $2, $1, $1
and $4, $1, $1
TAG314:
mult $4, $4
sw $4, 0($4)
nor $1, $4, $4
sra $1, $4, 9
TAG315:
lui $4, 4
sltiu $3, $4, 13
mult $1, $3
mflo $2
TAG316:
beq $2, $2, TAG317
mflo $2
bgtz $2, TAG317
mflo $2
TAG317:
bne $2, $2, TAG318
mthi $2
add $1, $2, $2
bne $1, $2, TAG318
TAG318:
subu $2, $1, $1
mflo $3
xori $2, $1, 8
lui $3, 4
TAG319:
sll $0, $0, 0
divu $3, $3
beq $3, $3, TAG320
addiu $1, $3, 13
TAG320:
mthi $1
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
TAG321:
sll $0, $0, 0
beq $1, $1, TAG322
mtlo $1
xor $2, $1, $1
TAG322:
mflo $1
bne $2, $1, TAG323
mthi $1
srlv $4, $2, $2
TAG323:
mflo $2
xori $3, $4, 12
beq $3, $2, TAG324
srlv $2, $2, $4
TAG324:
bgez $2, TAG325
mtlo $2
lui $2, 11
sltu $2, $2, $2
TAG325:
bgez $2, TAG326
mthi $2
div $2, $2
bne $2, $2, TAG326
TAG326:
mult $2, $2
mult $2, $2
sllv $2, $2, $2
div $2, $2
TAG327:
bgez $2, TAG328
mtlo $2
bltz $2, TAG328
mtlo $2
TAG328:
mtlo $2
mthi $2
mfhi $4
mflo $1
TAG329:
sll $0, $0, 0
sll $0, $0, 0
beq $4, $2, TAG330
mflo $4
TAG330:
bgez $4, TAG331
multu $4, $4
xor $2, $4, $4
lui $1, 0
TAG331:
mfhi $2
mthi $1
mthi $1
sll $0, $0, 0
TAG332:
multu $3, $3
bltz $3, TAG333
mtlo $3
beq $3, $3, TAG333
TAG333:
mtlo $3
sra $4, $3, 2
mtlo $3
mthi $3
TAG334:
sll $0, $0, 0
bne $4, $4, TAG335
mthi $4
or $4, $4, $4
TAG335:
sltiu $2, $4, 0
mtlo $4
or $2, $4, $2
sll $0, $0, 0
TAG336:
mtlo $1
sb $1, 0($1)
bne $1, $1, TAG337
mflo $4
TAG337:
lui $1, 15
bgez $1, TAG338
sll $0, $0, 0
multu $1, $3
TAG338:
bltz $3, TAG339
mthi $3
blez $3, TAG339
lui $3, 8
TAG339:
sll $0, $0, 0
sll $0, $0, 0
sw $4, 0($4)
bne $4, $4, TAG340
TAG340:
mfhi $1
bne $1, $1, TAG341
div $1, $1
divu $1, $1
TAG341:
lui $1, 6
lui $3, 4
addu $2, $3, $3
blez $1, TAG342
TAG342:
lui $3, 1
div $2, $2
bgtz $3, TAG343
divu $2, $3
TAG343:
slt $4, $3, $3
mfhi $3
lui $3, 2
xor $3, $3, $3
TAG344:
lbu $3, 0($3)
sw $3, 0($3)
mflo $1
lui $2, 8
TAG345:
mflo $4
subu $4, $2, $2
sll $0, $0, 0
lb $1, 0($4)
TAG346:
lb $2, 0($1)
addi $2, $2, 6
mtlo $2
mult $2, $1
TAG347:
andi $4, $2, 12
bltz $2, TAG348
mult $2, $4
mult $2, $4
TAG348:
sw $4, 0($4)
mtlo $4
sw $4, 0($4)
andi $1, $4, 12
TAG349:
subu $3, $1, $1
bgtz $3, TAG350
lh $2, 0($1)
div $3, $2
TAG350:
sw $2, 0($2)
bgez $2, TAG351
ori $4, $2, 15
srl $3, $4, 2
TAG351:
addu $4, $3, $3
sh $4, 0($4)
mtlo $4
ori $2, $3, 11
TAG352:
mtlo $2
bne $2, $2, TAG353
andi $1, $2, 8
mtlo $1
TAG353:
sw $1, 0($1)
lhu $3, 0($1)
sb $3, 0($1)
lui $4, 11
TAG354:
addu $3, $4, $4
sll $0, $0, 0
multu $3, $4
sll $0, $0, 0
TAG355:
div $1, $1
xor $2, $1, $1
sw $2, 0($2)
xori $1, $2, 8
TAG356:
lui $4, 9
beq $1, $1, TAG357
lui $1, 8
lbu $3, 0($1)
TAG357:
sll $0, $0, 0
sll $0, $0, 0
slt $2, $3, $3
slt $4, $4, $3
TAG358:
bgtz $4, TAG359
mfhi $1
bltz $4, TAG359
mthi $4
TAG359:
sh $1, 0($1)
sh $1, 0($1)
sb $1, 0($1)
addi $2, $1, 12
TAG360:
mtlo $2
mthi $2
subu $4, $2, $2
sh $4, 0($2)
TAG361:
addiu $1, $4, 3
sw $1, 0($4)
bgtz $4, TAG362
or $1, $1, $1
TAG362:
bltz $1, TAG363
mthi $1
mtlo $1
srl $1, $1, 2
TAG363:
bgez $1, TAG364
sltiu $3, $1, 10
mfhi $1
mtlo $3
TAG364:
lui $2, 9
addi $1, $1, 8
sll $0, $0, 0
blez $1, TAG365
TAG365:
mtlo $1
addiu $2, $1, 6
mthi $2
mfhi $2
TAG366:
srlv $4, $2, $2
beq $2, $2, TAG367
sltiu $1, $4, 11
xor $3, $1, $2
TAG367:
sb $3, 0($3)
multu $3, $3
bltz $3, TAG368
lb $4, 0($3)
TAG368:
sb $4, 0($4)
mtlo $4
sb $4, 0($4)
lui $1, 6
TAG369:
sltu $1, $1, $1
lui $4, 14
slt $1, $1, $1
sub $1, $1, $1
TAG370:
mfhi $1
sllv $2, $1, $1
multu $1, $2
multu $1, $1
TAG371:
nor $4, $2, $2
lui $3, 10
lw $1, 1($4)
sltiu $1, $1, 10
TAG372:
lui $4, 0
sb $1, 0($4)
bltz $1, TAG373
addiu $1, $1, 10
TAG373:
sll $4, $1, 10
sh $4, -10240($4)
sw $1, -10240($4)
mfhi $4
TAG374:
addu $2, $4, $4
sh $4, 0($2)
bgtz $2, TAG375
mult $2, $4
TAG375:
addiu $3, $2, 8
div $3, $3
beq $3, $2, TAG376
nor $3, $2, $2
TAG376:
mfhi $2
mflo $2
sltiu $1, $2, 13
lui $3, 2
TAG377:
slt $1, $3, $3
mtlo $1
mtlo $1
addu $1, $3, $1
TAG378:
div $1, $1
sll $0, $0, 0
xor $4, $1, $1
sltiu $3, $1, 14
TAG379:
bne $3, $3, TAG380
sub $3, $3, $3
xori $2, $3, 0
lui $2, 11
TAG380:
bgez $2, TAG381
mthi $2
sh $2, 0($2)
lb $2, 0($2)
TAG381:
sltu $2, $2, $2
beq $2, $2, TAG382
add $2, $2, $2
sw $2, 0($2)
TAG382:
multu $2, $2
addi $4, $2, 11
srlv $4, $4, $4
multu $4, $4
TAG383:
xor $1, $4, $4
lui $1, 11
mtlo $1
sll $0, $0, 0
TAG384:
bgez $2, TAG385
sb $2, 0($2)
mfhi $1
lui $3, 10
TAG385:
lh $1, 0($3)
blez $3, TAG386
sb $1, 0($3)
bgtz $3, TAG386
TAG386:
mflo $4
mult $4, $1
blez $1, TAG387
lb $3, 0($1)
TAG387:
mtlo $3
mflo $2
mthi $3
sh $3, 0($3)
TAG388:
sll $2, $2, 12
mthi $2
bgez $2, TAG389
mfhi $3
TAG389:
lui $1, 1
sll $0, $0, 0
lui $4, 14
sll $0, $0, 0
TAG390:
sll $0, $0, 0
beq $4, $4, TAG391
mflo $4
bgtz $4, TAG391
TAG391:
mflo $3
beq $3, $4, TAG392
mfhi $3
blez $4, TAG392
TAG392:
mfhi $3
mflo $1
mult $3, $3
bne $1, $3, TAG393
TAG393:
mflo $3
lb $4, 0($1)
lhu $3, 0($4)
bne $3, $3, TAG394
TAG394:
multu $3, $3
mult $3, $3
mtlo $3
srav $2, $3, $3
TAG395:
beq $2, $2, TAG396
lui $2, 8
lui $4, 12
subu $2, $2, $2
TAG396:
bne $2, $2, TAG397
xor $1, $2, $2
multu $2, $2
sltiu $3, $1, 6
TAG397:
mflo $2
xori $4, $3, 11
bgez $2, TAG398
lui $4, 7
TAG398:
bgtz $4, TAG399
sll $0, $0, 0
sub $4, $4, $4
lhu $1, 0($4)
TAG399:
xori $2, $1, 1
addu $2, $1, $1
lbu $3, 0($2)
bne $1, $3, TAG400
TAG400:
sh $3, 0($3)
bne $3, $3, TAG401
mflo $1
multu $3, $1
TAG401:
bgtz $1, TAG402
mtlo $1
sh $1, 0($1)
bne $1, $1, TAG402
TAG402:
mflo $4
nor $4, $4, $1
lui $3, 7
lb $4, 0($1)
TAG403:
sw $4, 0($4)
lb $2, 0($4)
blez $4, TAG404
or $2, $2, $4
TAG404:
sllv $1, $2, $2
mthi $1
mtlo $2
beq $2, $1, TAG405
TAG405:
mthi $1
lhu $2, 0($1)
mfhi $2
bltz $2, TAG406
TAG406:
srl $2, $2, 11
srav $4, $2, $2
multu $2, $2
sh $2, 0($2)
TAG407:
ori $1, $4, 8
bne $1, $4, TAG408
srav $2, $4, $1
lui $1, 5
TAG408:
mthi $1
bgtz $1, TAG409
addu $4, $1, $1
xor $3, $4, $4
TAG409:
sll $0, $0, 0
mfhi $1
mtlo $4
div $4, $4
TAG410:
lui $4, 1
bltz $1, TAG411
sltiu $2, $4, 12
mflo $3
TAG411:
lui $2, 7
addu $4, $2, $3
sll $0, $0, 0
beq $4, $1, TAG412
TAG412:
mflo $2
bgez $2, TAG413
addu $2, $2, $2
sw $2, 0($2)
TAG413:
addu $4, $2, $2
bgtz $4, TAG414
srl $2, $4, 13
lui $1, 11
TAG414:
sb $1, 0($1)
lui $3, 5
lui $1, 9
mtlo $1
TAG415:
sltiu $4, $1, 3
beq $4, $1, TAG416
mtlo $1
bgez $1, TAG416
TAG416:
ori $3, $4, 8
lh $4, 0($3)
mfhi $1
bne $1, $1, TAG417
TAG417:
sub $4, $1, $1
ori $1, $1, 6
beq $4, $1, TAG418
mfhi $2
TAG418:
ori $4, $2, 4
sw $2, 0($4)
divu $2, $4
mtlo $2
TAG419:
sll $1, $4, 4
bgez $1, TAG420
mflo $4
slt $3, $4, $4
TAG420:
sh $3, 0($3)
nor $1, $3, $3
srl $1, $3, 4
nor $4, $1, $3
TAG421:
srl $4, $4, 14
sll $0, $0, 0
mflo $2
bgtz $2, TAG422
TAG422:
lui $3, 5
mfhi $2
and $2, $3, $2
sltiu $1, $2, 0
TAG423:
lui $1, 2
lui $4, 4
sll $0, $0, 0
lui $4, 5
TAG424:
mtlo $4
subu $3, $4, $4
mflo $4
mtlo $4
TAG425:
bgez $4, TAG426
mthi $4
blez $4, TAG426
sb $4, 0($4)
TAG426:
xori $2, $4, 11
slti $4, $2, 2
nor $3, $4, $2
sll $0, $0, 0
TAG427:
sll $0, $0, 0
sltiu $1, $4, 10
mthi $4
bne $3, $4, TAG428
TAG428:
lbu $1, 0($1)
blez $1, TAG429
lui $3, 12
lui $3, 6
TAG429:
blez $3, TAG430
ori $4, $3, 10
srlv $3, $3, $4
sll $0, $0, 0
TAG430:
add $4, $1, $1
mthi $1
mflo $4
div $4, $4
TAG431:
div $4, $4
mfhi $1
lui $4, 4
sll $0, $0, 0
TAG432:
xori $1, $4, 3
multu $1, $1
sll $0, $0, 0
beq $4, $4, TAG433
TAG433:
sll $0, $0, 0
mtlo $4
mflo $2
sll $0, $0, 0
TAG434:
multu $2, $2
sll $0, $0, 0
mtlo $2
mflo $4
TAG435:
addu $4, $4, $4
sll $0, $0, 0
lui $4, 12
mthi $4
TAG436:
bgez $4, TAG437
mtlo $4
mflo $3
bltz $4, TAG437
TAG437:
or $2, $3, $3
lui $2, 8
mtlo $2
sw $2, -768($3)
TAG438:
sll $0, $0, 0
div $2, $2
mtlo $2
beq $2, $2, TAG439
TAG439:
subu $3, $2, $2
sllv $4, $2, $2
nor $2, $4, $2
lui $4, 4
TAG440:
mflo $4
div $4, $4
blez $4, TAG441
mflo $2
TAG441:
sb $2, 0($2)
slti $3, $2, 7
sra $2, $2, 0
sb $2, 0($2)
TAG442:
lui $4, 4
sll $0, $0, 0
lbu $2, 0($2)
mflo $3
TAG443:
sll $1, $3, 4
bne $3, $1, TAG444
sltu $4, $3, $3
sh $4, 0($3)
TAG444:
lui $2, 15
bgtz $4, TAG445
mthi $2
sll $0, $0, 0
TAG445:
bgtz $2, TAG446
sll $0, $0, 0
beq $2, $2, TAG446
lhu $4, 0($2)
TAG446:
addiu $3, $4, 12
mfhi $3
bne $3, $3, TAG447
mthi $4
TAG447:
lui $4, 1
bltz $3, TAG448
xor $3, $3, $3
lb $4, 0($3)
TAG448:
sll $1, $4, 8
addu $2, $4, $1
lui $3, 15
lui $2, 6
TAG449:
mflo $2
bgtz $2, TAG450
multu $2, $2
srl $4, $2, 15
TAG450:
multu $4, $4
sw $4, 0($4)
mfhi $4
add $2, $4, $4
TAG451:
mfhi $3
mflo $3
sh $3, 0($3)
multu $3, $3
TAG452:
mult $3, $3
lui $1, 14
andi $3, $3, 6
beq $1, $3, TAG453
TAG453:
mthi $3
sw $3, 0($3)
lui $1, 4
divu $3, $1
TAG454:
lui $4, 13
beq $4, $4, TAG455
mfhi $1
lui $1, 4
TAG455:
mult $1, $1
mflo $1
mfhi $3
bne $1, $1, TAG456
TAG456:
add $2, $3, $3
mfhi $2
mthi $2
sltiu $4, $2, 7
TAG457:
lui $3, 4
mfhi $2
bne $4, $4, TAG458
sltu $2, $4, $3
TAG458:
lb $2, 0($2)
bgez $2, TAG459
lbu $4, 0($2)
lui $3, 14
TAG459:
mfhi $2
bgez $2, TAG460
lhu $3, 0($2)
lh $2, 0($3)
TAG460:
sw $2, 0($2)
addiu $1, $2, 13
sb $1, 0($1)
multu $1, $1
TAG461:
sltiu $2, $1, 10
mthi $1
mflo $3
or $1, $3, $3
TAG462:
slti $2, $1, 14
bgez $2, TAG463
slt $2, $2, $1
xori $4, $1, 7
TAG463:
mthi $4
multu $4, $4
bltz $4, TAG464
lw $1, 0($4)
TAG464:
lbu $1, 0($1)
beq $1, $1, TAG465
mfhi $3
bgez $1, TAG465
TAG465:
lw $2, 0($3)
sb $2, 0($2)
bgez $3, TAG466
mflo $3
TAG466:
beq $3, $3, TAG467
lui $3, 2
lhu $2, 0($3)
lui $3, 15
TAG467:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG468:
blez $1, TAG469
mflo $2
andi $4, $2, 6
xor $2, $2, $2
TAG469:
lb $1, 0($2)
mfhi $3
sh $2, 0($1)
mflo $4
TAG470:
blez $4, TAG471
mult $4, $4
mflo $1
mflo $4
TAG471:
mult $4, $4
slti $3, $4, 5
mult $3, $4
sh $4, 0($4)
TAG472:
lb $4, 0($3)
mult $4, $3
lui $3, 11
mflo $2
TAG473:
beq $2, $2, TAG474
mtlo $2
beq $2, $2, TAG474
lui $2, 7
TAG474:
xori $2, $2, 5
lui $1, 6
mflo $3
lb $4, 0($2)
TAG475:
sw $4, 0($4)
lui $2, 8
div $4, $2
sltu $1, $4, $4
TAG476:
lui $2, 5
mfhi $4
addi $3, $1, 9
mfhi $4
TAG477:
nor $3, $4, $4
mfhi $1
lw $1, 0($1)
multu $4, $1
TAG478:
lui $3, 0
mthi $1
mtlo $1
mfhi $4
TAG479:
sw $4, 0($4)
mflo $4
ori $4, $4, 2
beq $4, $4, TAG480
TAG480:
sh $4, 0($4)
addu $3, $4, $4
xori $3, $4, 5
bne $3, $3, TAG481
TAG481:
div $3, $3
slt $1, $3, $3
bltz $3, TAG482
sh $3, 0($1)
TAG482:
blez $1, TAG483
srl $2, $1, 14
blez $2, TAG483
mflo $3
TAG483:
lui $2, 0
sh $2, 0($2)
lui $2, 13
mthi $2
TAG484:
sll $0, $0, 0
mflo $3
sll $0, $0, 0
srl $4, $3, 14
TAG485:
mthi $4
sw $4, 0($4)
lh $2, 0($4)
mtlo $2
TAG486:
lhu $1, 0($2)
sb $1, 0($1)
multu $2, $1
blez $2, TAG487
TAG487:
and $1, $1, $1
mtlo $1
mtlo $1
bgez $1, TAG488
TAG488:
sltu $3, $1, $1
sw $1, 0($1)
sh $3, 0($1)
bne $1, $1, TAG489
TAG489:
mthi $3
mult $3, $3
lw $2, 0($3)
sh $3, 0($2)
TAG490:
bgez $2, TAG491
mfhi $1
sb $1, 0($1)
lui $1, 9
TAG491:
beq $1, $1, TAG492
lw $4, 0($1)
srlv $4, $1, $1
mtlo $4
TAG492:
mult $4, $4
lb $4, 0($4)
sb $4, 0($4)
mtlo $4
TAG493:
lui $4, 0
sh $4, 0($4)
sh $4, 0($4)
lb $1, 0($4)
TAG494:
mflo $4
nor $2, $4, $4
lhu $3, 0($1)
bne $2, $3, TAG495
TAG495:
addiu $3, $3, 9
srav $2, $3, $3
mtlo $3
lh $1, 0($3)
TAG496:
sw $1, 0($1)
mtlo $1
sra $2, $1, 14
bne $2, $2, TAG497
TAG497:
sb $2, 0($2)
bne $2, $2, TAG498
mthi $2
lui $4, 3
TAG498:
beq $4, $4, TAG499
mfhi $3
mfhi $4
lui $4, 1
TAG499:
mfhi $3
sb $3, 0($3)
lui $1, 7
srl $4, $3, 15
TAG500:
multu $4, $4
multu $4, $4
sw $4, 0($4)
bltz $4, TAG501
TAG501:
multu $4, $4
beq $4, $4, TAG502
mult $4, $4
lhu $3, 0($4)
TAG502:
addi $1, $3, 14
nor $4, $1, $1
xori $1, $1, 2
lui $4, 0
TAG503:
mtlo $4
mfhi $1
lui $3, 13
lui $4, 12
TAG504:
mult $4, $4
sll $0, $0, 0
div $4, $4
sll $0, $0, 0
TAG505:
mtlo $2
lui $2, 5
lui $2, 9
sll $1, $2, 10
TAG506:
sll $0, $0, 0
sll $0, $0, 0
sllv $3, $2, $1
mtlo $3
TAG507:
andi $4, $3, 0
bne $3, $3, TAG508
multu $4, $3
beq $4, $3, TAG508
TAG508:
lhu $1, 0($4)
slti $3, $4, 5
beq $3, $4, TAG509
sltiu $1, $3, 5
TAG509:
mfhi $4
lui $2, 13
srav $1, $2, $4
bgtz $1, TAG510
TAG510:
mtlo $1
beq $1, $1, TAG511
mflo $4
ori $4, $4, 7
TAG511:
lui $4, 7
sltiu $2, $4, 12
sb $4, 0($2)
mfhi $4
TAG512:
sb $4, 0($4)
sllv $1, $4, $4
bne $1, $4, TAG513
lhu $2, 0($4)
TAG513:
sra $2, $2, 11
andi $4, $2, 2
lui $3, 11
mult $4, $2
TAG514:
mflo $3
sra $3, $3, 8
mfhi $4
sra $1, $3, 2
TAG515:
mtlo $1
sh $1, 0($1)
sw $1, 0($1)
mflo $2
TAG516:
sub $3, $2, $2
bgez $2, TAG517
lui $2, 12
lui $1, 0
TAG517:
lw $4, 0($1)
mfhi $3
lui $2, 10
beq $3, $1, TAG518
TAG518:
mult $2, $2
sll $0, $0, 0
srl $3, $2, 4
bne $2, $3, TAG519
TAG519:
sltiu $4, $3, 6
sll $0, $0, 0
mtlo $3
lui $2, 14
TAG520:
lui $4, 14
addiu $2, $4, 9
bltz $2, TAG521
lui $2, 13
TAG521:
mthi $2
bgtz $2, TAG522
sll $0, $0, 0
mult $2, $2
TAG522:
divu $2, $2
mthi $2
sll $0, $0, 0
lui $4, 15
TAG523:
subu $2, $4, $4
div $4, $4
sll $0, $0, 0
sh $4, 0($2)
TAG524:
mflo $4
andi $1, $2, 5
ori $2, $2, 4
sll $4, $4, 8
TAG525:
sw $4, -256($4)
blez $4, TAG526
mult $4, $4
subu $1, $4, $4
TAG526:
bgez $1, TAG527
lbu $1, 0($1)
mthi $1
mflo $3
TAG527:
mthi $3
sllv $3, $3, $3
sll $0, $0, 0
divu $3, $3
TAG528:
divu $3, $3
sll $0, $0, 0
mfhi $1
andi $4, $1, 2
TAG529:
bltz $4, TAG530
mtlo $4
lui $2, 3
beq $2, $2, TAG530
TAG530:
sll $0, $0, 0
lui $1, 1
beq $1, $2, TAG531
multu $1, $1
TAG531:
sll $0, $0, 0
sll $0, $0, 0
mfhi $2
addu $1, $1, $2
TAG532:
divu $1, $1
sll $0, $0, 0
sll $0, $0, 0
bgtz $1, TAG533
TAG533:
sll $0, $0, 0
bltz $1, TAG534
lui $2, 7
lui $4, 4
TAG534:
divu $4, $4
mtlo $4
sra $4, $4, 4
lh $1, -16384($4)
TAG535:
sll $0, $0, 0
divu $4, $4
andi $1, $4, 14
lui $1, 11
TAG536:
bgez $1, TAG537
sll $0, $0, 0
sh $1, 0($3)
srl $4, $3, 10
TAG537:
mthi $4
sllv $4, $4, $4
lui $2, 1
addiu $3, $2, 11
TAG538:
bne $3, $3, TAG539
sll $0, $0, 0
sll $0, $0, 0
andi $4, $3, 10
TAG539:
mfhi $2
bne $4, $4, TAG540
sltiu $4, $4, 5
bgtz $2, TAG540
TAG540:
sw $4, 0($4)
mtlo $4
bgtz $4, TAG541
sra $4, $4, 9
TAG541:
bltz $4, TAG542
multu $4, $4
mfhi $4
multu $4, $4
TAG542:
sll $4, $4, 9
mfhi $3
ori $4, $4, 9
and $2, $4, $4
TAG543:
bgez $2, TAG544
sb $2, 0($2)
bne $2, $2, TAG544
mthi $2
TAG544:
sltiu $2, $2, 3
sb $2, 0($2)
mtlo $2
blez $2, TAG545
TAG545:
sll $4, $2, 0
bgez $2, TAG546
mtlo $2
mult $2, $2
TAG546:
mflo $3
multu $3, $4
sh $4, 0($3)
bgez $4, TAG547
TAG547:
mfhi $1
bgtz $1, TAG548
add $1, $1, $1
mfhi $3
TAG548:
beq $3, $3, TAG549
mfhi $3
lw $1, 0($3)
add $4, $3, $3
TAG549:
ori $1, $4, 12
divu $4, $1
addiu $1, $4, 11
subu $1, $1, $4
TAG550:
sra $3, $1, 13
addiu $2, $3, 11
bltz $3, TAG551
lui $2, 13
TAG551:
mthi $2
sll $0, $0, 0
xor $2, $2, $4
subu $1, $2, $2
TAG552:
xori $3, $1, 3
bne $1, $3, TAG553
sh $3, 0($1)
bne $1, $1, TAG553
TAG553:
lbu $1, 0($3)
sb $3, 0($3)
addiu $3, $1, 0
bne $1, $3, TAG554
TAG554:
sw $3, 0($3)
addu $4, $3, $3
sh $3, 0($4)
sh $4, 0($3)
TAG555:
mult $4, $4
mthi $4
mtlo $4
mfhi $1
TAG556:
mtlo $1
multu $1, $1
lui $4, 5
mthi $4
TAG557:
sllv $2, $4, $4
lui $2, 8
xor $4, $4, $2
mthi $4
TAG558:
bltz $4, TAG559
sll $0, $0, 0
subu $2, $1, $4
addu $3, $1, $4
TAG559:
beq $3, $3, TAG560
mthi $3
sh $3, 0($3)
lui $4, 6
TAG560:
sll $0, $0, 0
srav $3, $4, $4
bgez $3, TAG561
srl $1, $4, 13
TAG561:
bltz $1, TAG562
divu $1, $1
sw $1, 0($1)
mflo $3
TAG562:
lui $1, 4
addiu $2, $3, 11
lui $4, 1
lb $3, 0($3)
TAG563:
sw $3, 0($3)
sra $4, $3, 0
srav $4, $3, $3
mflo $2
TAG564:
bltz $2, TAG565
lui $2, 4
subu $4, $2, $2
mfhi $4
TAG565:
mtlo $4
beq $4, $4, TAG566
mult $4, $4
lhu $2, 0($4)
TAG566:
addiu $1, $2, 4
addiu $4, $2, 9
mthi $4
mthi $2
TAG567:
bgtz $4, TAG568
sltiu $2, $4, 11
sltiu $4, $2, 5
mtlo $4
TAG568:
divu $4, $4
lui $2, 4
bltz $4, TAG569
and $3, $2, $4
TAG569:
bgtz $3, TAG570
multu $3, $3
lw $4, 0($3)
divu $4, $4
TAG570:
bltz $4, TAG571
mtlo $4
divu $4, $4
bne $4, $4, TAG571
TAG571:
mthi $4
sll $1, $4, 5
beq $4, $1, TAG572
mthi $4
TAG572:
mtlo $1
slti $2, $1, 12
sll $0, $0, 0
lw $4, 0($2)
TAG573:
blez $4, TAG574
mult $4, $4
bne $4, $4, TAG574
mult $4, $4
TAG574:
multu $4, $4
mthi $4
sb $4, 0($4)
beq $4, $4, TAG575
TAG575:
sw $4, 0($4)
lui $1, 2
mult $1, $1
blez $4, TAG576
TAG576:
addiu $2, $1, 4
mthi $1
mthi $2
beq $1, $2, TAG577
TAG577:
sll $3, $2, 12
sll $0, $0, 0
sll $0, $0, 0
mthi $3
TAG578:
bne $1, $1, TAG579
srav $2, $1, $1
addu $4, $2, $2
sll $0, $0, 0
TAG579:
div $2, $2
mflo $2
lui $2, 14
sll $0, $0, 0
TAG580:
lui $1, 1
srlv $2, $4, $4
mtlo $1
lui $4, 8
TAG581:
mflo $3
bgtz $4, TAG582
lui $1, 6
div $1, $4
TAG582:
xor $1, $1, $1
lb $3, 0($1)
mtlo $3
addiu $2, $1, 0
TAG583:
mtlo $2
lh $2, 0($2)
blez $2, TAG584
slt $3, $2, $2
TAG584:
bltz $3, TAG585
sltiu $4, $3, 11
sw $4, 0($3)
ori $3, $3, 5
TAG585:
beq $3, $3, TAG586
sb $3, 0($3)
mult $3, $3
mthi $3
TAG586:
and $4, $3, $3
sb $3, 0($3)
addiu $4, $4, 1
mult $4, $3
TAG587:
sb $4, 0($4)
mtlo $4
sll $2, $4, 8
beq $2, $2, TAG588
TAG588:
multu $2, $2
sw $2, -1536($2)
multu $2, $2
mflo $4
TAG589:
divu $4, $4
mfhi $1
bne $1, $1, TAG590
sub $2, $1, $1
TAG590:
sb $2, 0($2)
lui $3, 10
bltz $2, TAG591
sll $0, $0, 0
TAG591:
sh $2, 0($2)
slt $4, $2, $2
sra $1, $2, 10
beq $2, $2, TAG592
TAG592:
multu $1, $1
mtlo $1
lh $2, 0($1)
addiu $3, $2, 4
TAG593:
sb $3, 0($3)
sltu $1, $3, $3
mult $1, $3
addu $4, $3, $3
TAG594:
div $4, $4
nor $3, $4, $4
mthi $4
bltz $4, TAG595
TAG595:
sll $2, $3, 8
ori $3, $2, 10
mfhi $1
bltz $2, TAG596
TAG596:
mthi $1
mtlo $1
sw $1, 0($1)
and $1, $1, $1
TAG597:
mtlo $1
bgez $1, TAG598
div $1, $1
sra $1, $1, 14
TAG598:
lui $2, 6
lui $2, 7
lui $2, 9
mflo $4
TAG599:
mflo $1
slti $2, $4, 4
mflo $1
sb $4, 0($2)
TAG600:
sb $1, 0($1)
bgtz $1, TAG601
sb $1, 0($1)
mthi $1
TAG601:
sb $1, 0($1)
mflo $4
addiu $2, $1, 4
div $1, $1
TAG602:
bltz $2, TAG603
slt $2, $2, $2
mtlo $2
mthi $2
TAG603:
lh $2, 0($2)
mthi $2
sb $2, -256($2)
lui $1, 12
TAG604:
mult $1, $1
sll $0, $0, 0
lui $1, 14
bgez $1, TAG605
TAG605:
mtlo $1
sll $0, $0, 0
sll $0, $0, 0
mtlo $1
TAG606:
divu $3, $3
mfhi $4
blez $3, TAG607
mthi $3
TAG607:
subu $3, $4, $4
lbu $4, 0($3)
lhu $1, 0($3)
sb $4, 0($3)
TAG608:
lui $3, 8
sw $3, -256($1)
lui $3, 6
lui $2, 12
TAG609:
addiu $3, $2, 8
lui $1, 9
sra $3, $1, 12
mfhi $2
TAG610:
blez $2, TAG611
addu $3, $2, $2
sh $3, 0($2)
div $3, $2
TAG611:
mflo $4
sltu $4, $3, $4
mtlo $4
lui $2, 8
TAG612:
mflo $3
blez $2, TAG613
mfhi $2
bgtz $2, TAG613
TAG613:
multu $2, $2
div $2, $2
divu $2, $2
lui $1, 0
TAG614:
beq $1, $1, TAG615
lui $4, 13
andi $3, $1, 7
mult $1, $3
TAG615:
bgez $3, TAG616
lh $4, 0($3)
lui $2, 9
lhu $2, 0($2)
TAG616:
sh $2, 2294($2)
sw $2, 2294($2)
bne $2, $2, TAG617
sw $2, 2294($2)
TAG617:
addu $3, $2, $2
mfhi $3
mtlo $3
mthi $2
TAG618:
mtlo $3
bltz $3, TAG619
mult $3, $3
sb $3, 0($3)
TAG619:
andi $4, $3, 1
lui $2, 2
sll $0, $0, 0
slt $4, $2, $2
TAG620:
lui $3, 14
blez $4, TAG621
multu $4, $4
sw $3, 0($3)
TAG621:
lui $3, 6
addiu $2, $3, 14
mfhi $4
bgtz $4, TAG622
TAG622:
lui $2, 8
bgez $4, TAG623
sll $1, $2, 1
mflo $3
TAG623:
blez $3, TAG624
sll $0, $0, 0
blez $3, TAG624
divu $3, $3
TAG624:
lui $4, 1
bgtz $3, TAG625
divu $4, $4
bne $4, $3, TAG625
TAG625:
sll $0, $0, 0
sll $0, $0, 0
beq $4, $1, TAG626
srlv $1, $4, $4
TAG626:
bne $1, $1, TAG627
xori $3, $1, 3
bne $3, $3, TAG627
div $1, $3
TAG627:
sll $0, $0, 0
div $2, $2
mthi $2
mthi $2
TAG628:
bgtz $2, TAG629
mthi $2
mfhi $3
mfhi $3
TAG629:
bgez $3, TAG630
ori $1, $3, 3
lui $2, 9
div $2, $3
TAG630:
lui $1, 1
bgtz $2, TAG631
mfhi $2
lui $2, 6
TAG631:
mtlo $2
beq $2, $2, TAG632
divu $2, $2
multu $2, $2
TAG632:
sll $0, $0, 0
mthi $2
lui $3, 6
beq $2, $3, TAG633
TAG633:
mult $3, $3
divu $3, $3
mthi $3
lui $4, 0
TAG634:
beq $4, $4, TAG635
lui $3, 2
ori $2, $4, 14
bne $4, $2, TAG635
TAG635:
div $2, $2
sll $0, $0, 0
lui $4, 5
lui $4, 1
TAG636:
lui $4, 8
bltz $4, TAG637
sll $0, $0, 0
multu $4, $4
TAG637:
sll $0, $0, 0
addiu $2, $2, 15
mtlo $2
sltiu $3, $2, 6
TAG638:
lui $1, 12
subu $3, $3, $1
sll $0, $0, 0
lui $4, 1
TAG639:
sll $0, $0, 0
bgez $4, TAG640
lui $3, 3
lui $1, 7
TAG640:
mthi $1
bltz $1, TAG641
mflo $3
mflo $4
TAG641:
mtlo $4
lui $2, 2
multu $4, $4
lui $4, 3
TAG642:
multu $4, $4
lui $2, 2
lui $2, 11
lui $4, 13
TAG643:
bltz $4, TAG644
div $4, $4
xori $1, $4, 12
bgez $1, TAG644
TAG644:
srlv $3, $1, $1
andi $1, $1, 5
lhu $3, 0($1)
bne $3, $3, TAG645
TAG645:
mflo $3
bne $3, $3, TAG646
lbu $2, 0($3)
div $2, $3
TAG646:
mflo $3
mtlo $3
ori $3, $3, 11
sh $3, -255($3)
TAG647:
and $4, $3, $3
mthi $4
mflo $4
div $4, $3
TAG648:
mtlo $4
mthi $4
bltz $4, TAG649
mtlo $4
TAG649:
sltiu $2, $4, 5
mult $2, $2
slt $1, $2, $2
sb $1, 0($1)
TAG650:
sw $1, 0($1)
mfhi $1
multu $1, $1
lb $2, 0($1)
TAG651:
multu $2, $2
lui $3, 11
slti $2, $2, 5
blez $3, TAG652
TAG652:
sb $2, 0($2)
andi $4, $2, 2
lui $4, 0
lb $1, 0($2)
TAG653:
mtlo $1
bgtz $1, TAG654
mtlo $1
xor $1, $1, $1
TAG654:
lb $1, 0($1)
addiu $1, $1, 8
bgtz $1, TAG655
sb $1, 0($1)
TAG655:
sb $1, 0($1)
beq $1, $1, TAG656
lb $2, 0($1)
lbu $2, 0($2)
TAG656:
blez $2, TAG657
divu $2, $2
sltiu $4, $2, 5
bgez $2, TAG657
TAG657:
multu $4, $4
multu $4, $4
add $1, $4, $4
sh $4, 0($1)
TAG658:
sltiu $3, $1, 1
multu $1, $1
sb $1, 0($3)
beq $3, $3, TAG659
TAG659:
divu $3, $3
xori $2, $3, 7
mflo $3
mfhi $3
TAG660:
multu $3, $3
bne $3, $3, TAG661
sltiu $4, $3, 4
lui $3, 1
TAG661:
bltz $3, TAG662
multu $3, $3
bne $3, $3, TAG662
multu $3, $3
TAG662:
srl $2, $3, 5
nor $1, $3, $3
beq $2, $2, TAG663
mfhi $3
TAG663:
lui $4, 5
lui $3, 10
lui $4, 13
sll $0, $0, 0
TAG664:
lui $3, 2
bltz $2, TAG665
lui $1, 5
bne $1, $2, TAG665
TAG665:
sll $0, $0, 0
sll $0, $0, 0
mfhi $1
addu $1, $1, $1
TAG666:
beq $1, $1, TAG667
divu $1, $1
lui $3, 12
mtlo $3
TAG667:
mtlo $3
multu $3, $3
sll $0, $0, 0
bne $3, $3, TAG668
TAG668:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
bgtz $3, TAG669
TAG669:
lui $4, 7
bgtz $3, TAG670
mult $4, $3
bgtz $3, TAG670
TAG670:
mthi $4
sll $0, $0, 0
sll $0, $0, 0
bgtz $4, TAG671
TAG671:
div $4, $4
bgez $4, TAG672
sltu $1, $4, $4
mtlo $4
TAG672:
mfhi $1
slti $4, $1, 4
xori $3, $1, 9
mflo $3
TAG673:
mtlo $3
mthi $3
mtlo $3
beq $3, $3, TAG674
TAG674:
mflo $2
lbu $4, 0($2)
lui $1, 14
beq $2, $3, TAG675
TAG675:
mthi $1
andi $1, $1, 15
lui $1, 15
subu $1, $1, $1
TAG676:
subu $3, $1, $1
bne $1, $1, TAG677
and $1, $3, $1
sw $3, 0($3)
TAG677:
or $1, $1, $1
blez $1, TAG678
lui $2, 13
sll $3, $1, 9
TAG678:
mtlo $3
mflo $2
multu $2, $3
sh $2, 0($2)
TAG679:
mfhi $2
mtlo $2
sb $2, 0($2)
add $1, $2, $2
TAG680:
lh $4, 0($1)
sh $1, 0($1)
mtlo $1
sw $4, 0($1)
TAG681:
andi $3, $4, 8
mflo $1
mthi $1
sh $4, 0($3)
TAG682:
mtlo $1
sltiu $3, $1, 10
beq $1, $1, TAG683
mthi $1
TAG683:
sb $3, 0($3)
mflo $1
mflo $1
sllv $4, $1, $1
TAG684:
mthi $4
beq $4, $4, TAG685
nor $2, $4, $4
sw $2, 0($2)
TAG685:
bgtz $2, TAG686
sw $2, 1($2)
lbu $3, 1($2)
sh $3, 1($2)
TAG686:
mtlo $3
mtlo $3
bgtz $3, TAG687
xori $4, $3, 15
TAG687:
sb $4, -240($4)
bltz $4, TAG688
div $4, $4
and $3, $4, $4
TAG688:
bgez $3, TAG689
mflo $4
mthi $4
andi $2, $3, 0
TAG689:
mflo $1
bne $2, $2, TAG690
addu $4, $1, $1
addiu $2, $2, 2
TAG690:
beq $2, $2, TAG691
mtlo $2
sltiu $2, $2, 9
div $2, $2
TAG691:
mflo $1
bgez $2, TAG692
multu $2, $1
mthi $2
TAG692:
lb $2, 0($1)
blez $2, TAG693
lhu $1, 0($2)
bgez $1, TAG693
TAG693:
xor $4, $1, $1
mtlo $1
add $3, $4, $1
bne $4, $3, TAG694
TAG694:
lui $4, 11
bltz $4, TAG695
lh $4, -240($3)
lui $2, 10
TAG695:
multu $2, $2
sll $0, $0, 0
div $2, $2
div $2, $2
TAG696:
bgtz $2, TAG697
mthi $2
bgez $2, TAG697
ori $3, $2, 0
TAG697:
addu $3, $3, $3
beq $3, $3, TAG698
sw $3, -480($3)
lbu $3, 0($3)
TAG698:
beq $3, $3, TAG699
div $3, $3
mtlo $3
mthi $3
TAG699:
sh $3, -480($3)
sra $1, $3, 11
blez $1, TAG700
multu $3, $1
TAG700:
srav $4, $1, $1
sb $1, 0($4)
mflo $1
lh $3, 0($1)
TAG701:
lui $2, 10
blez $2, TAG702
sw $3, -256($3)
lw $3, -256($3)
TAG702:
bltz $3, TAG703
sb $3, -256($3)
div $3, $3
beq $3, $3, TAG703
TAG703:
slt $2, $3, $3
sb $2, 0($2)
and $1, $3, $3
bne $3, $2, TAG704
TAG704:
sh $1, -256($1)
xor $4, $1, $1
sh $1, 0($4)
mthi $1
TAG705:
bne $4, $4, TAG706
mflo $1
sllv $2, $4, $4
mfhi $4
TAG706:
mfhi $3
mflo $3
lbu $3, -256($4)
lh $4, 0($3)
TAG707:
div $4, $4
lui $4, 10
lui $1, 1
mfhi $2
TAG708:
bne $2, $2, TAG709
srav $4, $2, $2
lb $2, 0($4)
and $3, $2, $4
TAG709:
sh $3, 0($3)
or $3, $3, $3
ori $3, $3, 0
lui $3, 13
TAG710:
andi $1, $3, 5
mtlo $3
mtlo $1
mthi $1
TAG711:
blez $1, TAG712
multu $1, $1
srl $3, $1, 1
sub $4, $1, $1
TAG712:
multu $4, $4
bne $4, $4, TAG713
mfhi $4
xori $4, $4, 9
TAG713:
multu $4, $4
sra $4, $4, 6
mflo $1
mthi $1
TAG714:
srav $1, $1, $1
sb $1, 0($1)
mtlo $1
bltz $1, TAG715
TAG715:
mthi $1
lbu $4, 0($1)
sub $1, $1, $4
slti $3, $1, 2
TAG716:
lui $1, 1
lb $4, 0($3)
sb $1, 0($3)
mult $3, $4
TAG717:
sw $4, 0($4)
mfhi $2
bgtz $4, TAG718
sb $2, 0($2)
TAG718:
sb $2, 0($2)
slt $4, $2, $2
bne $2, $4, TAG719
lh $1, 0($4)
TAG719:
blez $1, TAG720
mtlo $1
sra $2, $1, 10
subu $3, $1, $1
TAG720:
subu $4, $3, $3
add $2, $4, $4
nor $4, $4, $4
mthi $2
TAG721:
bgez $4, TAG722
xori $1, $4, 15
sw $4, 1($4)
mtlo $1
TAG722:
mtlo $1
mfhi $1
ori $3, $1, 10
bne $1, $3, TAG723
TAG723:
mthi $3
lui $3, 5
sll $0, $0, 0
sra $4, $3, 9
TAG724:
sw $4, -640($4)
slti $4, $4, 15
mult $4, $4
sub $1, $4, $4
TAG725:
mflo $4
and $2, $1, $1
lb $1, 0($2)
mfhi $2
TAG726:
bgtz $2, TAG727
sh $2, 0($2)
sub $2, $2, $2
beq $2, $2, TAG727
TAG727:
sw $2, 0($2)
lhu $2, 0($2)
slti $1, $2, 7
addiu $4, $1, 6
TAG728:
mfhi $1
mtlo $4
addu $4, $4, $1
div $4, $4
TAG729:
mthi $4
mfhi $1
mthi $1
mflo $2
TAG730:
blez $2, TAG731
lbu $3, 0($2)
sw $2, 0($3)
bne $3, $3, TAG731
TAG731:
lb $4, 0($3)
sb $3, 0($3)
sw $3, 0($3)
addi $3, $3, 12
TAG732:
addu $4, $3, $3
divu $3, $4
mflo $3
lw $1, 0($3)
TAG733:
mult $1, $1
sra $2, $1, 15
mult $1, $2
addiu $2, $2, 12
TAG734:
mtlo $2
andi $1, $2, 12
mflo $2
mtlo $1
TAG735:
sltiu $3, $2, 14
blez $2, TAG736
mflo $3
addiu $1, $2, 5
TAG736:
mthi $1
lbu $2, 0($1)
multu $1, $2
lui $1, 15
TAG737:
sll $0, $0, 0
div $1, $1
div $1, $1
bne $1, $1, TAG738
TAG738:
divu $1, $1
mfhi $3
bgez $3, TAG739
sh $3, 0($3)
TAG739:
sltu $3, $3, $3
mflo $2
mtlo $2
andi $1, $3, 2
TAG740:
sb $1, 0($1)
mult $1, $1
mtlo $1
lui $1, 15
TAG741:
subu $4, $1, $1
sh $4, 0($4)
bne $1, $1, TAG742
sll $0, $0, 0
TAG742:
mthi $4
lui $4, 11
sll $0, $0, 0
bgtz $4, TAG743
TAG743:
nor $2, $4, $4
xori $2, $4, 12
blez $4, TAG744
sll $0, $0, 0
TAG744:
ori $2, $2, 0
multu $2, $2
nor $4, $2, $2
mtlo $2
TAG745:
andi $4, $4, 0
mfhi $1
sb $4, 0($1)
mthi $1
TAG746:
mthi $1
mthi $1
sb $1, 0($1)
lb $4, 0($1)
TAG747:
multu $4, $4
beq $4, $4, TAG748
srlv $3, $4, $4
sh $3, 0($4)
TAG748:
multu $3, $3
bgez $3, TAG749
xori $3, $3, 6
divu $3, $3
TAG749:
beq $3, $3, TAG750
sh $3, 0($3)
bltz $3, TAG750
lui $2, 6
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop |
Microprocessor_Interfacing_CSE_2006/Base_Conversion_and_Matrices_Lab_5/bcd_to_hex.asm | aadhityasw/VIT-Labs | 2 | 177182 | <reponame>aadhityasw/VIT-Labs
data segment
bcd dw 25h
bin dw ?
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov ax,bcd
mov ax,0fh
mov bx,ax
mov ax,bcd
ans ax,0f0h
mov cl,04h
ror al,cl
mov cx,0ah
mul cx
add ax,bx
mov bin,ax
mov ah,4ch
hlt
code ends
end start
|
source/asis/asis-statements.adb | faelys/gela-asis | 4 | 26719 | ------------------------------------------------------------------------------
-- <NAME> A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $
-- Purpose:
-- Procedural wrapper over Object-Oriented ASIS implementation
package body Asis.Statements is
-------------------
-- Aborted_Tasks --
-------------------
function Aborted_Tasks
(Statement : in Asis.Statement)
return Asis.Expression_List
is
begin
Check_Nil_Element (Statement, "Aborted_Tasks");
return Aborted_Tasks (Statement.all);
end Aborted_Tasks;
------------------------------------
-- Accept_Body_Exception_Handlers --
------------------------------------
function Accept_Body_Exception_Handlers
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Statement, "Accept_Body_Exception_Handlers");
return Accept_Body_Exception_Handlers (Statement.all, Include_Pragmas);
end Accept_Body_Exception_Handlers;
----------------------------
-- Accept_Body_Statements --
----------------------------
function Accept_Body_Statements
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Statement, "Accept_Body_Statements");
return Accept_Body_Statements (Statement.all, Include_Pragmas);
end Accept_Body_Statements;
------------------------------
-- Accept_Entry_Direct_Name --
------------------------------
function Accept_Entry_Direct_Name
(Statement : in Asis.Statement)
return Asis.Name
is
begin
Check_Nil_Element (Statement, "Accept_Entry_Direct_Name");
return Accept_Entry_Direct_Name (Statement.all);
end Accept_Entry_Direct_Name;
------------------------
-- Accept_Entry_Index --
------------------------
function Accept_Entry_Index
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Accept_Entry_Index");
return Accept_Entry_Index (Statement.all);
end Accept_Entry_Index;
-----------------------
-- Accept_Parameters --
-----------------------
function Accept_Parameters
(Statement : in Asis.Statement)
return Asis.Parameter_Specification_List
is
begin
Check_Nil_Element (Statement, "Accept_Parameters");
return Accept_Parameters (Statement.all);
end Accept_Parameters;
---------------------------
-- Assignment_Expression --
---------------------------
function Assignment_Expression
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Assignment_Expression");
return Assignment_Expression (Statement.all);
end Assignment_Expression;
------------------------------
-- Assignment_Variable_Name --
------------------------------
function Assignment_Variable_Name
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Assignment_Variable_Name");
return Assignment_Variable_Name (Statement.all);
end Assignment_Variable_Name;
-----------------------------
-- Block_Declarative_Items --
-----------------------------
function Block_Declarative_Items
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Declarative_Item_List
is
begin
Check_Nil_Element (Statement, "Block_Declarative_Items");
return Block_Declarative_Items (Statement.all, Include_Pragmas);
end Block_Declarative_Items;
------------------------------
-- Block_Exception_Handlers --
------------------------------
function Block_Exception_Handlers
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Exception_Handler_List
is
begin
Check_Nil_Element (Statement, "Block_Exception_Handlers");
return Block_Exception_Handlers (Statement.all, Include_Pragmas);
end Block_Exception_Handlers;
----------------------
-- Block_Statements --
----------------------
function Block_Statements
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Statement, "Block_Statements");
return Block_Statements (Statement.all, Include_Pragmas);
end Block_Statements;
-------------------------------
-- Call_Statement_Parameters --
-------------------------------
function Call_Statement_Parameters
(Statement : in Asis.Statement;
Normalized : in Boolean := False)
return Asis.Association_List
is
begin
Check_Nil_Element (Statement, "Call_Statement_Parameters");
if Normalized then
return Normalized_Call_Statement_Parameters (Statement.all);
else
return Call_Statement_Parameters (Statement.all);
end if;
end Call_Statement_Parameters;
-----------------
-- Called_Name --
-----------------
function Called_Name
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Called_Name");
return Called_Name (Statement.all);
end Called_Name;
---------------------
-- Case_Expression --
---------------------
function Case_Expression
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Case_Expression");
return Case_Expression (Statement.all);
end Case_Expression;
----------------------------------------
-- Case_Statement_Alternative_Choices --
----------------------------------------
function Case_Statement_Alternative_Choices
(Path : in Asis.Path)
return Asis.Element_List
is
begin
Check_Nil_Element (Path, "Case_Statement_Alternative_Choices");
return Case_Statement_Alternative_Choices (Path.all);
end Case_Statement_Alternative_Choices;
------------------------------------
-- Choice_Parameter_Specification --
------------------------------------
function Choice_Parameter_Specification
(Handler : in Asis.Exception_Handler)
return Asis.Declaration
is
begin
Check_Nil_Element (Handler, "Choice_Parameter_Specification");
return Choice_Parameter_Specification (Handler.all);
end Choice_Parameter_Specification;
--------------------------
-- Condition_Expression --
--------------------------
function Condition_Expression
(Path : in Asis.Path)
return Asis.Expression
is
begin
Check_Nil_Element (Path, "Condition_Expression");
return Condition_Expression (Path.all);
end Condition_Expression;
---------------------------------
-- Corresponding_Called_Entity --
---------------------------------
function Corresponding_Called_Entity
(Statement : in Asis.Statement)
return Asis.Declaration
is
begin
Check_Nil_Element (Statement, "Corresponding_Called_Entity");
return Corresponding_Called_Entity (Statement.all);
end Corresponding_Called_Entity;
-----------------------------------------
-- Corresponding_Destination_Statement --
-----------------------------------------
function Corresponding_Destination_Statement
(Statement : in Asis.Statement)
return Asis.Statement
is
begin
Check_Nil_Element (Statement, "Corresponding_Destination_Statement");
return Corresponding_Destination_Statement (Statement.all);
end Corresponding_Destination_Statement;
-------------------------
-- Corresponding_Entry --
-------------------------
function Corresponding_Entry
(Statement : in Asis.Statement)
return Asis.Declaration
is
begin
Check_Nil_Element (Statement, "Corresponding_Entry");
return Corresponding_Entry (Statement.all);
end Corresponding_Entry;
-------------------------------
-- Corresponding_Loop_Exited --
-------------------------------
function Corresponding_Loop_Exited
(Statement : in Asis.Statement)
return Asis.Statement
is
begin
Check_Nil_Element (Statement, "Corresponding_Loop_Exited");
return Corresponding_Loop_Exited (Statement.all);
end Corresponding_Loop_Exited;
----------------------
-- Delay_Expression --
----------------------
function Delay_Expression
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Delay_Expression");
return Delay_Expression (Statement.all);
end Delay_Expression;
-----------------------
-- Exception_Choices --
-----------------------
function Exception_Choices
(Handler : in Asis.Exception_Handler)
return Asis.Element_List
is
begin
Check_Nil_Element (Handler, "Exception_Choices");
return Exception_Choices (Handler.all);
end Exception_Choices;
--------------------
-- Exit_Condition --
--------------------
function Exit_Condition
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Exit_Condition");
return Exit_Condition (Statement.all);
end Exit_Condition;
--------------------
-- Exit_Loop_Name --
--------------------
function Exit_Loop_Name
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Exit_Loop_Name");
return Exit_Loop_Name (Statement.all);
end Exit_Loop_Name;
----------------------------------------
-- Extended_Return_Exception_Handlers --
----------------------------------------
function Extended_Return_Exception_Handlers
(Statement : Asis.Statement;
Include_Pragmas : Boolean := False)
return Asis.Exception_Handler_List
is
begin
Check_Nil_Element (Statement, "Extended_Return_Exception_Handlers");
return Extended_Return_Exception_Handlers (Statement.all,
Include_Pragmas);
end Extended_Return_Exception_Handlers;
--------------------------------
-- Extended_Return_Statements --
--------------------------------
function Extended_Return_Statements
(Statement : Asis.Statement;
Include_Pragmas : Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Statement, "Extended_Return_Statements");
return Extended_Return_Statements (Statement.all, Include_Pragmas);
end Extended_Return_Statements;
--------------------------------------
-- For_Loop_Parameter_Specification --
--------------------------------------
function For_Loop_Parameter_Specification
(Statement : in Asis.Statement)
return Asis.Declaration
is
begin
Check_Nil_Element (Statement, "For_Loop_Parameter_Specification");
return Loop_Parameter_Specification (Statement.all);
end For_Loop_Parameter_Specification;
----------------
-- Goto_Label --
----------------
function Goto_Label
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Goto_Label");
return Goto_Label (Statement.all);
end Goto_Label;
-----------
-- Guard --
-----------
function Guard
(Path : in Asis.Path)
return Asis.Expression
is
begin
Check_Nil_Element (Path, "Guard");
return Guard (Path.all);
end Guard;
------------------------
-- Handler_Statements --
------------------------
function Handler_Statements
(Handler : in Asis.Exception_Handler;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Handler, "Handler_Statements");
return Handler_Statements (Handler.all, Include_Pragmas);
end Handler_Statements;
--------------------------------------
-- Is_Call_On_Dispatching_Operation --
--------------------------------------
function Is_Call_On_Dispatching_Operation
(Call : in Asis.Element)
return Boolean
is
begin
Check_Nil_Element (Call, "Is_Call_On_Dispatching_Operation");
return Is_Call_On_Dispatching_Operation (Call.all);
end Is_Call_On_Dispatching_Operation;
----------------------
-- Is_Declare_Block --
----------------------
function Is_Declare_Block
(Statement : in Asis.Statement)
return Boolean
is
begin
Check_Nil_Element (Statement, "Is_Declare_Block");
return Is_Declare_Block (Statement.all);
end Is_Declare_Block;
-------------------------
-- Is_Dispatching_Call --
-------------------------
function Is_Dispatching_Call (Call : in Asis.Element) return Boolean is
begin
Check_Nil_Element (Call, "Is_Dispatching_Call");
return Is_Dispatching_Call (Call.all);
end Is_Dispatching_Call;
----------------------
-- Is_Name_Repeated --
----------------------
function Is_Name_Repeated
(Statement : in Asis.Statement)
return Boolean
is
begin
Check_Nil_Element (Statement, "Is_Name_Repeated");
return Is_Name_Repeated (Statement.all);
end Is_Name_Repeated;
-----------------
-- Label_Names --
-----------------
function Label_Names
(Statement : in Asis.Statement)
return Asis.Defining_Name_List
is
begin
Check_Nil_Element (Statement, "Label_Names");
return Label_Names (Statement.all);
end Label_Names;
---------------------
-- Loop_Statements --
---------------------
function Loop_Statements
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Statement, "Loop_Statements");
return Loop_Statements (Statement.all, Include_Pragmas);
end Loop_Statements;
--------------------------
-- Qualified_Expression --
--------------------------
function Qualified_Expression
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Qualified_Expression");
return Qualified_Expression (Statement.all);
end Qualified_Expression;
----------------------
-- Raised_Exception --
----------------------
function Raised_Exception
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Raised_Exception");
return Raised_Exception (Statement.all);
end Raised_Exception;
-----------------------------
-- Raise_Statement_Message --
-----------------------------
function Raise_Statement_Message -- 13.3(2)
(Statement : Asis.Statement)
return Asis.Expression is
begin
Check_Nil_Element (Statement, "Raise_Statement_Message");
return Raise_Statement_Message (Statement.all);
end Raise_Statement_Message;
------------------------
-- Requeue_Entry_Name --
------------------------
function Requeue_Entry_Name
(Statement : in Asis.Statement)
return Asis.Name
is
begin
Check_Nil_Element (Statement, "Requeue_Entry_Name");
return Requeue_Entry_Name (Statement.all);
end Requeue_Entry_Name;
-----------------------
-- Return_Expression --
-----------------------
function Return_Expression
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "Return_Expression");
return Return_Expression (Statement.all);
end Return_Expression;
---------------------------------
-- Return_Object_Specification --
---------------------------------
function Return_Object_Specification
(Statement : Asis.Statement)
return Asis.Declaration
is
begin
Check_Nil_Element (Statement, "Return_Object_Specification");
return Return_Object_Specification (Statement.all);
end Return_Object_Specification;
----------------------------
-- Sequence_Of_Statements --
----------------------------
function Sequence_Of_Statements
(Path : in Asis.Path;
Include_Pragmas : in Boolean := False)
return Asis.Statement_List
is
begin
Check_Nil_Element (Path, "Sequence_Of_Statements");
return Sequence_Of_Statements (Path.all, Include_Pragmas);
end Sequence_Of_Statements;
--------------------------
-- Statement_Identifier --
--------------------------
function Statement_Identifier
(Statement : in Asis.Statement)
return Asis.Defining_Name
is
begin
Check_Nil_Element (Statement, "Statement_Identifier");
return Statement_Identifier (Statement.all);
end Statement_Identifier;
---------------------
-- Statement_Paths --
---------------------
function Statement_Paths
(Statement : in Asis.Statement;
Include_Pragmas : in Boolean := False)
return Asis.Path_List
is
begin
Check_Nil_Element (Statement, "Statement_Paths");
return Statement_Paths (Statement.all, Include_Pragmas);
end Statement_Paths;
---------------------
-- While_Condition --
---------------------
function While_Condition
(Statement : in Asis.Statement)
return Asis.Expression
is
begin
Check_Nil_Element (Statement, "While_Condition");
return While_Condition (Statement.all);
end While_Condition;
end Asis.Statements;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the <NAME>, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
src/util/icon/nextrec.asm | olifink/qspread | 0 | 17709 | <filename>src/util/icon/nextrec.asm
* Sprite nextrec
*
* Mode 4
* +|-------------------+
* -gg g g wwww -
* |g g g rww |
* |gg ggg rwrw |
* |g gwww rwr w |
* |g wgrrrw rwr |
* | www wwwrwrwwwww|
* | wrrrw rwr w|
* | www wwwrwrwwwwr w|
* | wrrrw rwr w w|
* |ww wwwrwrwwwr wr w|
* |w rwr w w w|
* |w rr rwr rr wr wwww|
* |w wr w w |
* |w r rr rrr wwww |
* |w w |
* |wwwwwwwwwwwwww |
* +|-------------------+
*
section sprite
xdef mes_nextrec
xref mes_zero
mes_nextrec
dc.w $0100,$0000
dc.w 20,16,0,0
dc.l mcs_nextrec-*
dc.l mes_zero-*
dc.l 0
mcs_nextrec
dc.w $D400,$0101
dc.w $E0E0,$0000
dc.w $9400,$0000
dc.w $60E0,$0000
dc.w $DC00,$0001
dc.w $A0E0,$0000
dc.w $8703,$8183
dc.w $20A0,$0000
dc.w $8C0B,$42C7
dc.w $0000,$0000
dc.w $0E0E,$757F
dc.w $F0F0,$0000
dc.w $111F,$081C
dc.w $1010,$0000
dc.w $3939,$D7FF
dc.w $90D0,$0000
dc.w $447C,$2070
dc.w $9090,$0000
dc.w $C7C7,$5CFE
dc.w $90D0,$0000
dc.w $8081,$84C4
dc.w $9090,$0000
dc.w $81B3,$04B6
dc.w $F0F0,$0000
dc.w $8283,$0404
dc.w $8080,$0000
dc.w $80AC,$0777
dc.w $8080,$0000
dc.w $8080,$0404
dc.w $0000,$0000
dc.w $FFFF,$FCFC
dc.w $0000,$0000
end
mms_nextrec
dc.w $D4D4,$0101
dc.w $E0E0,$0000
dc.w $9494,$0000
dc.w $E0E0,$0000
dc.w $DCDC,$0101
dc.w $E0E0,$0000
dc.w $8787,$8383
dc.w $A0A0,$0000
dc.w $8F8F,$C7C7
dc.w $0000,$0000
dc.w $0E0E,$7F7F
dc.w $F0F0,$0000
dc.w $1F1F,$1C1C
dc.w $1010,$0000
dc.w $3939,$FFFF
dc.w $D0D0,$0000
dc.w $7C7C,$7070
dc.w $9090,$0000
dc.w $C7C7,$FEFE
dc.w $D0D0,$0000
dc.w $8181,$C4C4
dc.w $9090,$0000
dc.w $B3B3,$B6B6
dc.w $F0F0,$0000
dc.w $8383,$0404
dc.w $8080,$0000
dc.w $ACAC,$7777
dc.w $8080,$0000
dc.w $8080,$0404
dc.w $0000,$0000
dc.w $FFFF,$FCFC
dc.w $0000,$0000
*
end
|
src/taskbar.adb | docandrew/troodon | 5 | 19879 | <filename>src/taskbar.adb<gh_stars>1-10
with Ada.Text_IO;
with Ada.Unchecked_Deallocation;
with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings; use Interfaces.C.Strings;
with System;
with xcb; use xcb;
with xproto; use xproto;
with Events; use Events;
with Setup;
with Util; use Util;
-------------------------------------------------------------------------------
-- taskbar
-------------------------------------------------------------------------------
package body Taskbar is
TASKBAR_HEIGHT : constant := 32;
TASKBAR_BG : constant := 16#FF77_7777#;
-- Set this to exit the taskbar event loop.
close : Boolean := False;
tbWindow : xcb_window_t;
---------------------------------------------------------------------------
-- clientConnect
-- establishes a connection to the X server
---------------------------------------------------------------------------
function clientConnect return access xcb_connection_t is
screenNumber : aliased Interfaces.C.int;
connection : access xcb_connection_t;
begin
-- open connection to X server
connection := xcb_connect (Null_Ptr, screenNumber'Access);
if xcb_connection_has_error (connection) > 0 then
Ada.Text_IO.Put_Line ("Troodon: (Taskbar) could not connect to server");
return null;
end if;
Ada.Text_IO.Put_Line ("Troodon: (Taskbar) Connected to X Server!");
Ada.Text_IO.Put_Line ("Troodon: (Taskbar) Default screen # =" & screenNumber'Image);
return connection;
end clientConnect;
---------------------------------------------------------------------------
-- taskbarEventLoop
---------------------------------------------------------------------------
procedure taskbarEventLoop(connection : access xcb_connection_t) is
procedure free is new Ada.Unchecked_Deallocation (Object => xcb_generic_event_t, Name => Events.eventPtr);
--focusedWindow : xcb_window_t;
XCB_EVENT_MASK : constant := 2#0111_1111#;
event : events.eventPtr;
ignore : Interfaces.C.int;
begin
ignore := xcb_flush (connection);
loop
--Ada.Text_IO.Put_Line("Start Event Loop");
event := events.eventPtr (xcb_wait_for_event (connection));
exit when event = null;
Ada.Text_IO.Put_Line("Troodon: (Taskbar) Received Event " & event.response_type'Image);
case (event.response_type and XCB_EVENT_MASK) is
when CONST_XCB_KEY_PRESS =>
Ada.Text_IO.Put_Line("Troodon: (Taskbar) Keypress");
when others =>
null;
end case;
free(event);
exit when close = True;
end loop;
Ada.Text_IO.Put_Line("Troodon: (Taskbar) Exiting.");
xcb_disconnect (connection);
end taskbarEventLoop;
---------------------------------------------------------------------------
-- start
---------------------------------------------------------------------------
procedure start is
begin
Taskbar.StartTask;
end start;
---------------------------------------------------------------------------
-- stop
-- We set the close flag and then close the taskbar's window, so it
-- receives the event letting it know it's done, exiting the loop and
-- ending the task.
---------------------------------------------------------------------------
procedure stop (c : access xcb_connection_t) is
cookie : xcb_void_cookie_t;
error : access xcb_generic_error_t;
begin
Ada.Text_IO.Put_Line ("Troodon: (Taskbar) Shutting down.");
close := True;
cookie := xcb_destroy_window_checked (c, tbWindow);
error := xcb_request_check (c, cookie);
if error /= null then
Ada.Text_IO.Put_Line ("Troodon: (Taskbar) Error destroying taskbar window, error:" & error.error_code'Image);
end if;
end stop;
---------------------------------------------------------------------------
-- Taskbar component.
--
-- Troodon desktop environment components are Ada tasks running their own
-- threads. This makes it easy to share information and is lightweight,
-- avoiding process context-switching overhead and expensive IPC or clunky
-- stdio piping between DE elements.
---------------------------------------------------------------------------
task body Taskbar is
-- Connect to X server
connection : access xcb_connection_t;
screen : access xcb_screen_t;
root : xcb_window_t;
taskbarAttr : aliased xcb_create_window_value_list_t;
cookie : xcb_void_cookie_t;
geom : xcb_get_geometry_reply_t;
ignore : Interfaces.C.int;
-- EWMH Properties
wmType : xcb_atom_t;
begin
-- select
accept StartTask;
Ada.Text_IO.Put_Line("Taskbar: Starting.");
connection := clientConnect;
screen := xcb_setup_roots_iterator (xcb_get_setup(connection)).data;
root := Setup.getRootWindow (connection);
tbWindow := xcb_generate_id (connection);
Ada.Text_IO.Put_Line("Taskbar: Creating new window with id" & tbWindow'Image);
-- We want the panel to run the full length of the screen, so query the
-- root window geometry to figure out how big to make it.
geom := util.getWindowGeometry(connection, root);
-- Set up the window
taskbarAttr.background_pixel := TASKBAR_BG;
taskbarAttr.event_mask := XCB_EVENT_MASK_EXPOSURE or
XCB_EVENT_MASK_KEY_PRESS or
XCB_EVENT_MASK_KEY_RELEASE or
XCB_EVENT_MASK_STRUCTURE_NOTIFY;
cookie :=
xcb_create_window_aux (c => connection,
depth => XCB_COPY_FROM_PARENT,
wid => tbWindow,
parent => root,
x => 0,
y => short(geom.height - TASKBAR_HEIGHT),
width => geom.width,
height => TASKBAR_HEIGHT,
border_width => 0,
u_class => xcb_window_class_t'Pos (XCB_WINDOW_CLASS_INPUT_OUTPUT),
visual => screen.root_visual,
value_mask => XCB_CW_BACK_PIXEL or XCB_CW_EVENT_MASK,
value_list => taskbarAttr'Access);
-- Set some window properties to let Troodon know we're a taskbar
-- @TODO figure out what properties to set if EWMH not available
if setup.ewmh /= null then
wmType := setup.ewmh.u_NET_WM_WINDOW_TYPE_DOCK;
Ada.Text_IO.Put_Line("Taskbar: Setting window type to docked");
cookie := xcb_change_property(c => connection,
mode => unsigned_char(xcb_prop_mode_t'Pos(XCB_PROP_MODE_REPLACE)),
window => tbWindow,
property => setup.ewmh.u_NET_WM_WINDOW_TYPE,
c_type => XCB_ATOM_ATOM,
format => 8,
data_len => xcb_atom_t'Size / 8,
data => wmType'Address);
end if;
-- Make taskbar visible
cookie := xcb_map_window (connection, tbWindow);
ignore := xcb_flush (connection);
-- enter event loop
taskbarEventLoop(connection);
-- or
-- terminate;
-- end select;
end Taskbar;
end Taskbar;
|
oeis/002/A002478.asm | neoneye/loda-programs | 11 | 165806 | <reponame>neoneye/loda-programs
; A002478: Bisection of A000930.
; Submitted by <NAME>
; 1,1,3,6,13,28,60,129,277,595,1278,2745,5896,12664,27201,58425,125491,269542,578949,1243524,2670964,5736961,12322413,26467299,56849086,122106097,262271568,563332848,1209982081,2598919345,5582216355,11990037126,25753389181,55315679788,118812495276,255197244033,548137914373,1177344897715,2528817970494,5431645680297,11666626519000,25058735850088,53823634568385,115607732787561,248313737774419,533352837917926,1145588046254325,2460607459864596,5285136390291172,11351939356274689,24382819596721629
lpb $0
mov $2,$3
bin $2,$0
sub $0,1
add $1,$2
add $3,2
lpe
mov $0,$1
add $0,1
|
source/resolver/program-interpretations-symbols.ads | reznikmm/gela | 0 | 29380 | <filename>source/resolver/program-interpretations-symbols.ads<gh_stars>0
-- SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Ada.Iterator_Interfaces;
package Program.Interpretations.Symbols is
pragma Preelaborate;
type Cursor is record
Index : Natural;
Symbol : Program.Symbols.Symbol;
end record;
function Has_Element (Self : Cursor) return Boolean is (Self.Index > 0);
package Iterators is new Ada.Iterator_Interfaces (Cursor, Has_Element);
type Iterator is new Iterators.Forward_Iterator with private;
function Each (Set : Interpretation_Set) return Iterator;
private
type Iterator is new Iterators.Forward_Iterator with record
Set : Interpretation_Set;
end record;
overriding function First (Self : Iterator) return Cursor;
overriding function Next
(Self : Iterator;
Position : Cursor) return Cursor;
end Program.Interpretations.Symbols;
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_21829_1566.asm | ljhsiun2/medusa | 9 | 87633 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r8
push %r9
push %rbx
push %rdx
push %rsi
lea addresses_WT_ht+0x1cbcd, %r12
nop
nop
nop
nop
cmp %r11, %r11
movups (%r12), %xmm2
vpextrq $1, %xmm2, %rsi
nop
cmp %r8, %r8
lea addresses_UC_ht+0x87cd, %rbx
nop
nop
nop
nop
xor %r9, %r9
movb $0x61, (%rbx)
nop
add %r11, %r11
pop %rsi
pop %rdx
pop %rbx
pop %r9
pop %r8
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r14
push %r15
push %rax
push %rdi
// Store
lea addresses_WT+0x117cd, %rdi
nop
nop
dec %r14
mov $0x5152535455565758, %r15
movq %r15, (%rdi)
dec %r12
// Faulty Load
lea addresses_WT+0x117cd, %rdi
cmp $35023, %r14
movb (%rdi), %r13b
lea oracles, %r12
and $0xff, %r13
shlq $12, %r13
mov (%r12,%r13,1), %r13
pop %rdi
pop %rax
pop %r15
pop %r14
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}}
{'58': 21829}
58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58
*/
|
src/config.ads | SSOCsoft/Log_Reporter | 0 | 10207 | -- The Config package provides configuration parameters via GNAT's ability to
-- see Shared_Passive objects as a persistant value; unfortunately, this is not
-- usable for variable-length/unconstrained types (eg String). In order to use
-- the ability anyway we implement Pascal-style strings, which are 256-bytes and
-- store the length in the first byte.
--
-- The unary-plus operator is for converting between String and Pascal_String.
-- The Procedure/Function pairs are for setting/retriving the value of the named
-- configuration parameter and are associated with objects in the PRIVATE part.
Package Config with Shared_Passive is
---------------------
-- CONSTANT VALUES --
---------------------
-- A string-object is 256 Bytes.
String_Object_Size : Constant := 256;
-----------
-- TYPES --
-----------
-- This type is the length-byte for the string, it ranges from 0 to 255.
Type Natural_255 is range Natural'First..Natural'Pred(String_Object_Size)
with Size => 8, Object_Size => 8;
-- A length-prefixed string.
Type Pascal_String is private;
-- Conversion functions.
Function "+"( Item : Pascal_String ) return String;
Function "+"( Item : String ) return Pascal_String
with Pre => Item'Length in 0..Natural'Pred(String_Object_Size);
------------
-- VALUES --
------------
Function Host return Pascal_String;
Procedure Host( Item : String )
with Pre => Item'Length in Natural_255;
Function User return Pascal_String;
Procedure User( Item : String )
with Pre => Item'Length in Natural_255;
Function Password return Pascal_String;
Procedure Password( Item : String )
with Pre => Item'Length in Natural_255;
Private
-- A string of 255 bytes in length.
Subtype Max_String_255 is String(1..255);
-- A String of up to 255 bytes, indicated by a prefixed length byte.
-- We use the initalization-value of length 0 and all other bytes ASCII.NUL.
-- Further, we specify to the compiler that this object is exactly sized as
-- 2,048 Bits (8*256 Bytes) and that the size-in-RAM should be so as well.
Type Pascal_String is record
Length : Natural_255 := 0;
Text : Max_String_255:= (others => ASCII.NUL);
end record
with Size => 8*String_Object_Size, Object_Size => 8*String_Object_Size;
mailhost: Pascal_String:= (
Length => 4,
Text => "HOST" & (5..Max_String_255'Last => <>)
);
mailuser: Pascal_String:= (
Length => 4,
Text => "USER" & (5..Max_String_255'Last => <>)
);
mailpassword: Pascal_String:= (
Length => 4,
Text => "<PASSWORD>" & (5..Max_String_255'Last => <>)
);
End Config;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.