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
alloy4fun_models/trainstlt/models/4/wuBidrmMDkzb2PwXQ.als
Kaixi26/org.alloytools.alloy
0
2377
<filename>alloy4fun_models/trainstlt/models/4/wuBidrmMDkzb2PwXQ.als open main pred idwuBidrmMDkzb2PwXQ_prop5 { all t:Train |{ always (t.pos in Exit implies t.pos'= t.pos) } } pred __repair { idwuBidrmMDkzb2PwXQ_prop5 } check __repair { idwuBidrmMDkzb2PwXQ_prop5 <=> prop5o }
extern/gnat_sdl/gnat_sdl/src/malloc_h.ads
AdaCore/training_material
15
10935
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; with umingw_h; package malloc_h is -- arg-macro: procedure alloca (x) -- __builtin_alloca((x)) type u_heapinfo is record u_pentry : access int; -- c:\home\ochem\install\bin\../lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/include/malloc.h:47 u_size : aliased umingw_h.size_t; -- c:\home\ochem\install\bin\../lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/include/malloc.h:48 u_useflag : aliased int; -- c:\home\ochem\install\bin\../lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/include/malloc.h:49 end record; pragma Convention (C_Pass_By_Copy, u_heapinfo); -- c:\home\ochem\install\bin\../lib/gcc/i686-pc-mingw32/4.7.3/../../../../i686-pc-mingw32/include/malloc.h:46 -- skipped func _resetstkoflw -- skipped func _set_malloc_crt_max_wait -- skipped func _expand -- skipped func _msize -- skipped func _get_sbh_threshold -- skipped func _set_sbh_threshold -- skipped func _set_amblksiz -- skipped func _get_amblksiz -- skipped func _heapadd -- skipped func _heapchk -- skipped func _heapmin -- skipped func _heapset -- skipped func _heapwalk -- skipped func _heapused -- skipped func _get_heap_handle -- skipped func _MarkAllocaS -- skipped func _freea end malloc_h;
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xca_notsx.log_21829_1661.asm
ljhsiun2/medusa
9
171475
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r11 push %rbx push %rcx push %rsi lea addresses_D_ht+0x15995, %rsi nop nop sub %r11, %r11 vmovups (%rsi), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %rbx nop nop nop nop inc %rcx pop %rsi pop %rcx pop %rbx pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r9 push %rbp push %rcx push %rdi // Load lea addresses_UC+0x1cdb5, %r11 dec %r10 mov (%r11), %di nop add $24205, %r9 // Store lea addresses_A+0x1ec0d, %rdi sub $41479, %rcx mov $0x5152535455565758, %rbp movq %rbp, %xmm2 vmovups %ymm2, (%rdi) nop nop nop add %rcx, %rcx // Faulty Load lea addresses_WT+0xf075, %rcx nop nop nop sub $36377, %r11 movb (%rcx), %r9b lea oracles, %rbp and $0xff, %r9 shlq $12, %r9 mov (%rbp,%r9,1), %r9 pop %rdi pop %rcx pop %rbp pop %r9 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4}} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
src/tcg-outputs-pdf.adb
Fabien-Chouteau/tiled-code-gen
1
29978
<filename>src/tcg-outputs-pdf.adb ------------------------------------------------------------------------------ -- -- -- tiled-code-gen -- -- -- -- Copyright (C) 2018 <NAME> -- -- -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with Ada.Directories; with Ada.Text_IO; with PDF_Out; use PDF_Out; with TCG.Palette; with TCG.Tilesets; with TCG.Tile_Layers; with TCG.Utils; package body TCG.Outputs.PDF is use type Palette.Color_Id; use type Palette.ARGB_Color; use type Tilesets.Master_Tile_Id; function Convert (C : Palette.ARGB_Color) return PDF_Out.Color_Type; procedure Draw_Square (Outfile : in out PDF_Out_File; Rect : Rectangle; Color : Color_Type); procedure Put_Palette_Info (Outfile : in out PDF_Out_File; Rect_Size : Real := 60.0; Colors_Per_Line : Natural := 3); procedure Draw_Tile (Outfile : in out PDF_Out_File; Id : Tilesets.Master_Tile_Id; Rect : Rectangle); procedure Put_Master_Tileset (Outfile : in out PDF_Out_File; Tile_Size : Real := 130.0; Tiles_Per_Line : Natural := 2); procedure Draw_Tile_Collision (Outfile : in out PDF_Out_File; Id : Tilesets.Master_Tile_Id; Rect : Rectangle); procedure Put_Master_Tileset_Collisions (Outfile : in out PDF_Out_File; Tile_Size : Real := 130.0; Tiles_Per_Line : Natural := 2); procedure Put_Map (Outfile : in out PDF_Out_File; M : Maps.Map); ------------- -- Convert -- ------------- function Convert (C : Palette.ARGB_Color) return PDF_Out.Color_Type is R : constant Real := Real (C.R) / Real (Palette.Component'Last); G : constant Real := Real (C.G) / Real (Palette.Component'Last); B : constant Real := Real (C.B) / Real (Palette.Component'Last); begin return (R, G, B); end Convert; ----------------- -- Draw_Square -- ----------------- procedure Draw_Square (Outfile : in out PDF_Out_File; Rect : Rectangle; Color : PDF_Out.Color_Type) is begin PDF_Out.Color (Outfile, Color); Draw (Outfile, Rect, fill); end Draw_Square; ---------------------- -- Put_Palette_Info -- ---------------------- procedure Put_Palette_Info (Outfile : in out PDF_Out_File; Rect_Size : Real := 60.0; Colors_Per_Line : Natural := 3) is Layout : constant Rectangle := PDF_Out.Layout (Outfile); Top_Margin : constant Real := 100.0; Left_Margin : constant Real := Rect_Size; Spacing : constant Real := (Layout.width - Left_Margin) / Real (Colors_Per_Line); X : Real := Layout.x_min + Left_Margin; Y : Real := Layout.y_min + Layout.height - Rect_Size - Top_Margin; Cnt : Natural := 1; C : Palette.ARGB_Color; begin Font_Size (Outfile, 40.0); Put_Line (Outfile, "Color Palette"); Font_Size (Outfile, 11.0); for Id in Palette.First_Id .. Palette.Last_Id loop C := Palette.Convert (Id); Draw_Square (Outfile, (X, Y, Rect_Size, Rect_Size), Convert (C)); Color (Outfile, PDF_Out.black); Put_XY (Outfile, X + Rect_Size * 1.3, Y + Rect_Size * 0.8, "Color #" & Id'Img); New_Line (Outfile); Put_Line (Outfile, "R:" & C.R'Img); Put_Line (Outfile, "G:" & C.G'Img); Put_Line (Outfile, "B:" & C.B'Img); if Palette.Transparent = Id then Put_Line (Outfile, "Transparent"); end if; if Cnt mod Colors_Per_Line = 0 then Y := Y - (Rect_Size + 20.0); X := Layout.x_min + Left_Margin; if Y <= Top_Margin then New_Page (Outfile); Y := Layout.y_min + Layout.height - Rect_Size - Top_Margin; end if; else X := X + Spacing; end if; Cnt := Cnt + 1; end loop; end Put_Palette_Info; --------------- -- Draw_Tile -- --------------- procedure Draw_Tile (Outfile : in out PDF_Out_File; Id : Tilesets.Master_Tile_Id; Rect : Rectangle) is Pix_W : constant Real := Rect.width / Real (Tilesets.Tile_Width); Pix_H : constant Real := Rect.height / Real (Tilesets.Tile_Height); C : Palette.ARGB_Color; begin for PX in 1 .. Tilesets.Tile_Width loop for PY in 1 .. Tilesets.Tile_Height loop C := Tilesets.Pix (Id, PX, (Tilesets.Tile_Height - PY + 1)); if C /= Palette.Transparent then Draw_Square (Outfile, (Rect.x_min + Real (PX - 1) * Pix_W, Rect.y_min + Real (PY - 1) * Pix_H, Pix_W, Pix_H), Convert (C)); end if; end loop; end loop; end Draw_Tile; ------------------------ -- Put_Master_Tileset -- ------------------------ procedure Put_Master_Tileset (Outfile : in out PDF_Out_File; Tile_Size : Real := 130.0; Tiles_Per_Line : Natural := 2) is Layout : constant Rectangle := PDF_Out.Layout (Outfile); Top_Margin : constant Real := 100.0; Left_Margin : constant Real := 50.0; Spacing : constant Real := (Layout.width - Left_Margin) / Real (Tiles_Per_Line); X : Real := Layout.x_min + Left_Margin; Y : Real := Layout.y_min + Layout.height - Tile_Size - Top_Margin; Cnt : Natural := 1; begin Font_Size (Outfile, 40.0); Put_Line (Outfile, "Tileset"); Font_Size (Outfile, 12.0); for Id in Tilesets.First_Id .. Tilesets.Last_Id loop if Id /= Tilesets.No_Tile then Draw_Tile (Outfile, Id, (X, Y, Tile_Size, Tile_Size)); end if; Color (Outfile, PDF_Out.black); Draw (Outfile, (X, Y, Tile_Size, Tile_Size), stroke); Put_XY (Outfile, X + Tile_Size * 1.1, Y + Tile_Size * 0.8, "Tile #" & Id'Img); New_Line (Outfile); if Id = Tilesets.No_Tile then Put_Line (Outfile, "No tile"); end if; New_Line (Outfile); if Cnt mod Tiles_Per_Line = 0 then Y := Y - (Tile_Size + 20.0); X := Layout.x_min + Left_Margin; if Y <= Top_Margin then New_Page (Outfile); Y := Layout.y_min + Layout.height - Tile_Size - Top_Margin; end if; else X := X + Spacing; end if; Cnt := Cnt + 1; end loop; end Put_Master_Tileset; ------------------------- -- Draw_Tile_Collision -- ------------------------- procedure Draw_Tile_Collision (Outfile : in out PDF_Out_File; Id : Tilesets.Master_Tile_Id; Rect : Rectangle) is Pix_W : constant Real := Rect.width / Real (Tilesets.Tile_Width); Pix_H : constant Real := Rect.height / Real (Tilesets.Tile_Height); begin for PX in 1 .. Tilesets.Tile_Width loop for PY in 1 .. Tilesets.Tile_Height loop if Tilesets.Collision (Id, PX, (Tilesets.Tile_Height - PY + 1)) then Draw_Square (Outfile, (Rect.x_min + Real (PX - 1) * Pix_W, Rect.y_min + Real (PY - 1) * Pix_H, Pix_W, Pix_H), (1.0, 0.0, 0.0)); end if; end loop; end loop; end Draw_Tile_Collision; ----------------------------------- -- Put_Master_Tileset_Collisions -- ----------------------------------- procedure Put_Master_Tileset_Collisions (Outfile : in out PDF_Out_File; Tile_Size : Real := 130.0; Tiles_Per_Line : Natural := 2) is Layout : constant Rectangle := PDF_Out.Layout (Outfile); Top_Margin : constant Real := 100.0; Left_Margin : constant Real := 50.0; Spacing : constant Real := (Layout.width - Left_Margin) / Real (Tiles_Per_Line); X : Real := Layout.x_min + Left_Margin; Y : Real := Layout.y_min + Layout.height - Tile_Size - Top_Margin; Cnt : Natural := 1; begin Font_Size (Outfile, 40.0); Put_Line (Outfile, "Tileset collisions"); Font_Size (Outfile, 12.0); for Id in Tilesets.First_Id .. Tilesets.Last_Id loop if Id /= Tilesets.No_Tile then Draw_Tile_Collision (Outfile, Id, (X, Y, Tile_Size, Tile_Size)); end if; Color (Outfile, PDF_Out.black); Draw (Outfile, (X, Y, Tile_Size, Tile_Size), stroke); Put_XY (Outfile, X + Tile_Size * 1.1, Y + Tile_Size * 0.8, "Tile #" & Id'Img); New_Line (Outfile); if Id = Tilesets.No_Tile then Put_Line (Outfile, "No tile"); end if; New_Line (Outfile); if Cnt mod Tiles_Per_Line = 0 then Y := Y - (Tile_Size + 20.0); X := Layout.x_min + Left_Margin; if Y <= Top_Margin then New_Page (Outfile); Y := Layout.y_min + Layout.height - Tile_Size - Top_Margin; end if; else X := X + Spacing; end if; Cnt := Cnt + 1; end loop; end Put_Master_Tileset_Collisions; ------------- -- Put_Map -- ------------- procedure Put_Map (Outfile : in out PDF_Out_File; M : Maps.Map) is Tile_Width : constant Natural := Maps.Tile_Width (M); Tile_Height : constant Natural := Maps.Tile_Height (M); Width : constant Natural := Maps.Width (M) * Tile_Width; Height : constant Natural := Maps.Height (M) * Tile_Height; Layout : constant Rectangle := PDF_Out.Layout (Outfile); Pix_W : constant Real := Layout.width / Real (Width); Pix_H : constant Real := Layout.height / Real (Height); Pix_Size : constant Real := Real'Min (Pix_W, Pix_H); C : Palette.ARGB_Color; T_Id : Tilesets.Master_Tile_Id; begin New_Page (Outfile); for Y in reverse 0 .. Height - 1 loop for X in 0 .. Width - 1 loop C := Palette.Transparent; for L in reverse Maps.First_Layer (M) .. Maps.Last_Layer (M) loop T_Id := Maps.Master_Tile (M, Tile_Layers.Tile (Maps.Layer (M, L), 1 + X / Tile_Width, 1 + Y / Tile_Height)); if T_Id /= Tilesets.No_Tile then C := Tilesets.Pix (T_Id, 1 + X mod Tile_Width, 1 + Y mod Tile_Height); end if; if C /= Palette.Transparent then Draw_Square (Outfile, (Layout.x_min + Real (X) * Pix_Size, Layout.y_min + Real (Width - 1 - Y) * Pix_Size, Pix_Size, Pix_Size), Convert (C)); exit; end if; end loop; end loop; end loop; Color (Outfile, PDF_Out.black); Font_Size (Outfile, 20.0); Put_XY (Outfile, 50.0, Layout.y_min + Layout.height - 30.0, Maps.Name (M)); New_Line (Outfile); Font_Size (Outfile, 12.0); for L in reverse Maps.First_Layer (M) .. Maps.Last_Layer (M) loop Put_Line (Outfile, " - " & Tile_Layers.Name (Maps.Layer (M, L))); end loop; end Put_Map; ----------------- -- Gen_PDF_Doc -- ----------------- procedure Gen_PDF_Doc (Directory : String; Filename : String; Map_List : TCG.Maps.List.List) is Outfile : PDF_Out_File; begin if not TCG.Utils.Make_Dir (Directory) then Ada.Text_IO.Put_Line (Ada.Text_IO.Standard_Error, "Cannot create directory for documentation: '" & Directory & "'"); return; end if; Create (Outfile, Ada.Directories.Compose (Directory, Filename)); Title (Outfile, ""); Subject (Outfile, ""); Keywords (Outfile, "Tiled, maps, sprites, palette"); Creator_Application (Outfile, "Tiled_Code_Gen"); Page_Setup (Outfile, A4_portrait); Put_Palette_Info (Outfile); New_Page (Outfile); Put_Master_Tileset (Outfile, Tile_Size => 50.0, Tiles_Per_Line => 5); New_Page (Outfile); Put_Master_Tileset_Collisions (Outfile, Tile_Size => 50.0, Tiles_Per_Line => 5); for M of Map_List loop Put_Map (Outfile, M); end loop; Close (Outfile); end Gen_PDF_Doc; end TCG.Outputs.PDF;
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/Over-p.asm
prismotizm/gigaleak
0
17589
Name: Over-p.asm Type: file Size: 16237 Last-Modified: '1992-07-30T05:00:33Z' SHA-1: 05AA3B7910E74362885E6980DC9C75AA999F2CE3 Description: null
E4/E4(1)/E4.a51
JDong-chen/51singleChipC_Experiment_Code
0
83140
<gh_stars>0 org 00H ajmp main0 org 30H main0: jb P2.0,main1 lcall delay jb P2.0,main1 mov P0,#10011111B main1: jb P2.1,main2 lcall delay jb P2.1,main1 mov P0,#00100101B main2: jb P2.2,main3 lcall delay jb P2.2,main1 mov P0,#00001101B main3: jb P2.3,main4 lcall delay jb P2.3,main1 mov P0,#10011001B main4: jb P2.4,main5 lcall delay jb P2.4,main1 mov P0,#01001001B main5: jb P2.5,main6 lcall delay jb P2.5,main1 mov P0,#01000001B main6: jb P2.6,main7 lcall delay jb P2.6,main1 mov P0,#00011111B main7: jb P2.7,main0 lcall delay jb P2.7,main1 mov P0,#00000001B ajmp main0 delay: mov r4,#1 l3: mov r2,#00H l1: mov r3,#00H l2: djnz r3,l2 djnz r2,l1 djnz r4,l3 ret end
Main.adb
christopherL91/Ada_Testing
0
17650
-- The MIT License (MIT) -- Copyright (c) 2015 <NAME> -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. -- Author: <NAME> -- Date: 2/2 - 15 with Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Test_Package; use Test_Package; with Ada.IO_Exceptions; procedure Main is -- Number of elements. Num_Ages: constant Natural := 10; --Define types. type Ages is array (1..Num_Ages) of Integer; -- Variables. test: Ages; procedure inputAges(a : Ages) is begin -- inputAges for i in a'Range loop Get(test(i)); end loop; end inputAges; procedure printArray(a : Ages) is begin -- printArray for i in a'Range loop Ada.Text_IO.Put_Line(Integer'Image(a(i))); end loop; end printArray; begin -- Main Ada.Text_IO.Put_Line("Hello world"); Hello; -- Calls Test_Package.Hello; inputAges(test); -- Fill array with numbers. printArray(test); -- Print array on STDOUT. exception when ADA.IO_EXCEPTIONS.DATA_ERROR => Ada.Text_IO.Put_Line("Invalid input!"); when ADA.IO_EXCEPTIONS.END_ERROR => Ada.Text_IO.Put_Line("bye bye"); end Main;
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshr_saddrcup.asm
jpoikela/z88dk
640
9552
; void *tshr_saddrcup(void *saddr) SECTION code_clib SECTION code_arch PUBLIC _tshr_saddrcup EXTERN _zx_saddrcup defc _tshr_saddrcup = _zx_saddrcup
test/07-binarize.g4
nsumner/antlr2cnf
3
5947
grammar test07; entry: a; a: b c c | c c c; b: d d d; c: '0'; d: '1';
oeis/142/A142625.asm
neoneye/loda-programs
11
18735
<reponame>neoneye/loda-programs ; A142625: Primes congruent to 34 mod 55. ; Submitted by <NAME> ; 89,199,419,859,1409,2069,2179,2399,2729,3169,3389,3499,3719,4049,4159,5039,5479,6029,6359,6469,6689,7019,7129,7349,7459,7789,8009,8669,8779,8999,9109,9439,9769,10099,10429,10979,11969,12409,12739,12959,13399,13619,13729,14389,14939,15269,16369,16699,17029,17359,17579,17909,18679,18899,19009,19559,19889,20219,20549,20879,21319,21649,22639,22859,23189,23629,24179,24509,25169,25609,25939,26489,27259,27479,27809,27919,28579,28909,29129,29569,29789,30119,30449,30559,31219,31769,32099,32429,32869 mov $1,44 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,1 mov $3,$1 mul $3,2 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,55 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 mul $0,2 sub $0,109
libsrc/_DEVELOPMENT/arch/ts2068/misc/c/sccz80/tshc_visit_wc_attr_callee.asm
jpoikela/z88dk
38
241996
; void tshc_visit_wc_attr(struct r_Rect8 *r, void *function) SECTION code_clib SECTION code_arch PUBLIC tshc_visit_wc_attr_callee EXTERN asm_tshc_visit_wc_attr tshc_visit_wc_attr_callee: pop af pop de pop ix push af jp asm_tshc_visit_wc_attr
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_40.asm
ljhsiun2/medusa
9
12221
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_D_ht+0x2b10, %rsi lea addresses_UC_ht+0x18680, %rdi clflush (%rdi) nop nop nop nop nop cmp %rbp, %rbp mov $105, %rcx rep movsq nop nop sub $25609, %rbx lea addresses_WT_ht+0x1ca30, %rsi lea addresses_UC_ht+0x19080, %rdi nop cmp %r13, %r13 mov $103, %rcx rep movsw nop nop nop dec %rbx lea addresses_WT_ht+0xf33c, %rsi nop nop nop nop sub %r14, %r14 mov $0x6162636465666768, %rbp movq %rbp, %xmm6 movups %xmm6, (%rsi) nop nop nop nop nop add $544, %rbx lea addresses_WT_ht+0x10c28, %r13 nop nop nop nop nop add $6943, %rsi mov $0x6162636465666768, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%r13) add $22481, %rsi lea addresses_UC_ht+0x82c8, %r13 nop nop nop nop cmp $64713, %rcx mov (%r13), %bx and %rsi, %rsi lea addresses_D_ht+0x12c80, %rsi lea addresses_WC_ht+0x1a5ec, %rdi clflush (%rsi) and $9241, %r9 mov $6, %rcx rep movsw nop nop nop nop nop cmp %rdi, %rdi lea addresses_WC_ht+0x15670, %rbx cmp $42605, %r9 movups (%rbx), %xmm7 vpextrq $1, %xmm7, %rdi nop nop nop nop xor %r9, %r9 lea addresses_A_ht+0x1ee80, %rdi nop nop nop nop xor %r14, %r14 movups (%rdi), %xmm3 vpextrq $1, %xmm3, %rbp nop nop cmp %rdi, %rdi lea addresses_D_ht+0x1cb80, %rbx nop nop nop lfence mov (%rbx), %r9d nop add $28289, %r9 lea addresses_WT_ht+0x1aa00, %r14 clflush (%r14) nop nop cmp %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm1 movups %xmm1, (%r14) nop sub %r14, %r14 lea addresses_A_ht+0x8018, %rbx sub $64529, %rbp movl $0x61626364, (%rbx) nop nop nop nop cmp $17793, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %rbp push %rcx push %rdi push %rdx push %rsi // Store lea addresses_RW+0x3e80, %rbp nop nop nop nop and $20190, %r10 mov $0x5152535455565758, %rsi movq %rsi, (%rbp) nop nop nop xor %rsi, %rsi // Store lea addresses_RW+0xca80, %rdx nop nop nop nop dec %rcx movl $0x51525354, (%rdx) nop nop nop add %rdi, %rdi // Faulty Load lea addresses_PSE+0x2680, %r13 nop nop nop cmp %rdx, %rdx movb (%r13), %r10b lea oracles, %rdx and $0xff, %r10 shlq $12, %r10 mov (%rdx,%r10,1), %r10 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 8, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 3, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': True}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
programs/oeis/161/A161707.asm
karttu/loda
0
11479
<filename>programs/oeis/161/A161707.asm ; A161707: a(n) = (4*n^3 - 9*n^2 + 11*n + 3)/3. ; 1,3,7,21,53,111,203,337,521,763,1071,1453,1917,2471,3123,3881,4753,5747,6871,8133,9541,11103,12827,14721,16793,19051,21503,24157,27021,30103,33411,36953,40737,44771,49063,53621,58453,63567,68971,74673,80681,87003,93647,100621,107933,115591,123603,131977,140721,149843,159351,169253,179557,190271,201403,212961,224953,237387,250271,263613,277421,291703,306467,321721,337473,353731,370503,387797,405621,423983,442891,462353,482377,502971,524143,545901,568253,591207,614771,638953,663761,689203,715287,742021,769413,797471,826203,855617,885721,916523,948031,980253,1013197,1046871,1081283,1116441,1152353,1189027,1226471,1264693,1303701,1343503,1384107,1425521,1467753,1510811,1554703,1599437,1645021,1691463,1738771,1786953,1836017,1885971,1936823,1988581,2041253,2094847,2149371,2204833,2261241,2318603,2376927,2436221,2496493,2557751,2620003,2683257,2747521,2812803,2879111,2946453,3014837,3084271,3154763,3226321,3298953,3372667,3447471,3523373,3600381,3678503,3757747,3838121,3919633,4002291,4086103,4171077,4257221,4344543,4433051,4522753,4613657,4705771,4799103,4893661,4989453,5086487,5184771,5284313,5385121,5487203,5590567,5695221,5801173,5908431,6017003,6126897,6238121,6350683,6464591,6579853,6696477,6814471,6933843,7054601,7176753,7300307,7425271,7551653,7679461,7808703,7939387,8071521,8205113,8340171,8476703,8614717,8754221,8895223,9037731,9181753,9327297,9474371,9622983,9773141,9924853,10078127,10232971,10389393,10547401,10707003,10868207,11031021,11195453,11361511,11529203,11698537,11869521,12042163,12216471,12392453,12570117,12749471,12930523,13113281,13297753,13483947,13671871,13861533,14052941,14246103,14441027,14637721,14836193,15036451,15238503,15442357,15648021,15855503,16064811,16275953,16488937,16703771,16920463,17139021,17359453,17581767,17805971,18032073,18260081,18490003,18721847,18955621,19191333,19428991,19668603,19910177,20153721,20399243 mov $2,$0 lpb $0,1 sub $0,1 add $1,$2 add $2,3 add $2,$0 sub $2,6 add $2,$0 lpe mul $1,2 add $1,1
test/codegen/loops.asm
shivansh/gogo
24
804
.data a.0: .word 0 newline.1: .asciiz "\n" i.2: .word 0 t0: .word 0 .text runtime: addi $sp, $sp, -4 sw $ra, 0($sp) lw $ra, 0($sp) addi $sp, $sp, 4 jr $ra .end runtime .globl main .ent main main: li $3, 0 # a.0 -> $3 sw $3, a.0 # spilled a.0, freed $3 li $3, 0 # i.2 -> $3 # Store dirty variables back into memory sw $3, i.2 l2: lw $3, i.2 # i.2 -> $3 bge $3, 4, l0 li $3, 1 # t0 -> $3 # Store dirty variables back into memory sw $3, t0 j l1 l0: li $3, 0 # t0 -> $3 # Store dirty variables back into memory sw $3, t0 l1: lw $3, t0 # t0 -> $3 blt $3, 1, l3 lw $3, a.0 # a.0 -> $3 addi $3, $3, 1 li $2, 1 move $4, $3 syscall li $2, 4 la $4, newline.1 syscall lw $5, i.2 # i.2 -> $5 addi $5, $5, 1 # Store dirty variables back into memory sw $3, a.0 sw $5, i.2 j l2 l3: li $2, 10 syscall .end main
Data/EquipmentEquates.asm
ped7g/EliteNext
9
16208
<gh_stars>1-10 EQ_FUEL EQU 0 EQ_MISSILE EQU 1 EQ_CARGO_BAY EQU 2 EQ_ECM EQU 3 EQ_FUEL_SCOOPS EQU 4 EQ_ESCAPE_POD EQU 5 EQ_ENERGY_BOMB EQU 6 EQ_ENERGY_UNIT EQU 7 EQ_DOCK_COMP EQU 8 EQ_GAL_DRIVE EQU 9 EQ_FRONT_PULSE EQU 10 EQ_REAR_PULSE EQU 11 EQ_LEFT_PULSE EQU 12 EQ_RIGHT_PULSE EQU 13 EQ_FRONT_BEAM EQU 14 EQ_REAR_BEAM EQU 15 EQ_LEFT_BEAM EQU 16 EQ_RIGHT_BEAM EQU 17 EQ_FRONT_MINING EQU 18 EQ_REAR_MINING EQU 19 EQ_LEFT_MINING EQU 20 EQ_RIGHT_MINING EQU 21 EQ_FRONT_MILITARY EQU 22 EQ_REAR_MILITARY EQU 23 EQ_LEFT_MILITARY EQU 24 EQ_RIGHT_MILITARY EQU 25 EQ_ITEM_COUNT EQU EQ_RIGHT_MILITARY+1
src/Monad.agda
nad/equality
3
14523
------------------------------------------------------------------------ -- Monads ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Monad {reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where open import Logical-equivalence using (_⇔_) open import Prelude open import Bijection eq using (_↔_) open Derived-definitions-and-properties eq open import Function-universe eq using (inverse) ------------------------------------------------------------------------ -- Basic definitions -- Raw monads and raw monad transformers. open import Monad.Raw public -- Monads. record Monad {d c} (M : Type d → Type c) : Type (lsuc d ⊔ c) where constructor mk field ⦃ raw-monad ⦄ : Raw-monad M left-identity : ∀ {A B} (x : A) (f : A → M B) → return x >>= f ≡ f x right-identity : ∀ {A} (x : M A) → x >>= return ≡ x associativity : ∀ {A B C} → (x : M A) (f : A → M B) (g : B → M C) → x >>= (λ x → f x >>= g) ≡ x >>= f >>= g -- Monads are functors. map-id : ∀ {A} (x : M A) → map id x ≡ x map-id x = x >>= return ∘ id ≡⟨⟩ x >>= return ≡⟨ right-identity _ ⟩∎ x ∎ map-∘ : Extensionality d c → ∀ {A B C} (f : B → C) (g : A → B) (x : M A) → map (f ∘ g) x ≡ map f (map g x) map-∘ ext f g x = x >>= return ∘ (f ∘ g) ≡⟨ cong (x >>=_) (apply-ext ext λ _ → sym $ left-identity _ _) ⟩ x >>= (λ x → return (g x) >>= return ∘ f) ≡⟨ associativity _ _ _ ⟩∎ (x >>= return ∘ g) >>= return ∘ f ∎ -- More lemmas. map-return : ∀ {A B} (f : A → B) (x : A) → map {M = M} f (return x) ≡ return (f x) map-return f x = return x >>= return ∘ f ≡⟨ left-identity _ _ ⟩∎ return (f x) ∎ map->>= : ∀ {A B C} (f : B → C) (x : M A) (g : A → M B) → map f (x >>= g) ≡ x >>= map f ∘ g map->>= f x g = x >>= g >>= return ∘ f ≡⟨ sym $ associativity _ _ _ ⟩ x >>= (λ x → g x >>= return ∘ f) ≡⟨⟩ x >>= (λ x → map f (g x)) ≡⟨ refl _ ⟩∎ x >>= map f ∘ g ∎ >>=-map : Extensionality d c → ∀ {A B C} (f : A → B) (x : M A) (g : B → M C) → map f x >>= g ≡ x >>= g ∘ f >>=-map ext f x g = (x >>= return ∘ f) >>= g ≡⟨ sym $ associativity _ _ _ ⟩ x >>= (λ x → return (f x) >>= g) ≡⟨ cong (x >>=_) (apply-ext ext λ _ → left-identity _ _) ⟩∎ x >>= g ∘ f ∎ open Monad ⦃ … ⦄ public hiding (raw-monad) -- Monad transformers. record Monad-transformer {d c₁ c₂} (F : (Type d → Type c₁) → (Type d → Type c₂)) : Type (lsuc (c₁ ⊔ d) ⊔ c₂) where constructor mk field transform : ∀ {M} ⦃ is-monad : Monad M ⦄ → Monad (F M) liftᵐ : ∀ {M A} ⦃ is-monad : Monad M ⦄ → M A → F M A lift-return : ∀ {M A} ⦃ is-monad : Monad M ⦄ (x : A) → let module M = Raw-monad (Monad.raw-monad transform) in liftᵐ {M = M} (return x) ≡ M.return x lift->>= : ∀ {M A B} ⦃ is-monad : Monad M ⦄ (x : M A) (f : A → M B) → let module M = Raw-monad (Monad.raw-monad transform) in liftᵐ (x >>= f) ≡ liftᵐ x M.>>= liftᵐ ∘ f open Monad-transformer ⦃ … ⦄ public using (liftᵐ; lift-return; lift->>=) ------------------------------------------------------------------------ -- Preservation lemmas -- If F and G are pointwise logically equivalent, then Raw-monad F and -- Raw-monad G are logically equivalent. ⇔→raw⇔raw : ∀ {a f g} {F : Type a → Type f} {G : Type a → Type g} → (∀ x → F x ⇔ G x) → Raw-monad F ⇔ Raw-monad G ⇔→raw⇔raw {a} = λ F⇔G → record { to = to F⇔G ; from = to (inverse ∘ F⇔G) } where to : ∀ {f g} {F : Type a → Type f} {G : Type a → Type g} → (∀ x → F x ⇔ G x) → Raw-monad F → Raw-monad G Raw-monad.return (to F⇔G F-monad) x = _⇔_.to (F⇔G _) (F.return x) where module F = Raw-monad F-monad Raw-monad._>>=_ (to F⇔G F-monad) x f = _⇔_.to (F⇔G _) (_⇔_.from (F⇔G _) x F.>>= λ x → _⇔_.from (F⇔G _) (f x)) where module F = Raw-monad F-monad -- If F and G are pointwise isomorphic, then Raw-monad F and -- Raw-monad G are isomorphic (assuming extensionality). ↔→raw↔raw : ∀ {a f g} → Extensionality (lsuc a ⊔ f ⊔ g) (lsuc a ⊔ f ⊔ g) → {F : Type a → Type f} {G : Type a → Type g} → (∀ x → F x ↔ G x) → Raw-monad F ↔ Raw-monad G ↔→raw↔raw {a} {f} {g} = λ ext F↔G → record { surjection = record { logical-equivalence = ⇔→raw⇔raw (_↔_.logical-equivalence ∘ F↔G) ; right-inverse-of = to∘to (lower-extensionality f f ext) (inverse ∘ F↔G) } ; left-inverse-of = to∘to (lower-extensionality g g ext) F↔G } where to∘to : ∀ {f g} {F : Type a → Type f} {G : Type a → Type g} → Extensionality (lsuc a ⊔ f) (lsuc a ⊔ f) → (F↔G : ∀ x → F x ↔ G x) (F-monad : Raw-monad F) → let eq = ⇔→raw⇔raw (_↔_.logical-equivalence ∘ F↔G) in _⇔_.from eq (_⇔_.to eq F-monad) ≡ F-monad to∘to {f} ext F↔G (mk return _>>=_) = cong₂ mk (implicit-extensionality (lower-extensionality f (lsuc a) ext) λ _ → apply-ext (lower-extensionality _ (lsuc a) ext) λ x → _↔_.from (F↔G _) (_↔_.to (F↔G _) (return x)) ≡⟨ _↔_.left-inverse-of (F↔G _) _ ⟩∎ return x ∎) (implicit-extensionality (lower-extensionality f lzero ext) λ _ → implicit-extensionality (lower-extensionality f (lsuc a) ext) λ _ → apply-ext (lower-extensionality (lsuc a) (lsuc a) ext) λ x → apply-ext (lower-extensionality (lsuc a) (lsuc a) ext) λ f → _↔_.from (F↔G _) (_↔_.to (F↔G _) (_↔_.from (F↔G _) (_↔_.to (F↔G _) x) >>= λ x → _↔_.from (F↔G _) (_↔_.to (F↔G _) (f x)))) ≡⟨ _↔_.left-inverse-of (F↔G _) _ ⟩ (_↔_.from (F↔G _) (_↔_.to (F↔G _) x) >>= λ x → _↔_.from (F↔G _) (_↔_.to (F↔G _) (f x))) ≡⟨ cong₂ _>>=_ (_↔_.left-inverse-of (F↔G _) _) (apply-ext (lower-extensionality _ (lsuc a) ext) λ _ → _↔_.left-inverse-of (F↔G _) _) ⟩∎ x >>= f ∎) -- If F and G are pointwise isomorphic, then Monad F and Monad G are -- logically equivalent (assuming extensionality). ↔→⇔ : ∀ {a f g} → Extensionality a (f ⊔ g) → {F : Type a → Type f} {G : Type a → Type g} → (∀ x → F x ↔ G x) → Monad F ⇔ Monad G ↔→⇔ {a} {f} {g} = λ ext F↔G → record { to = to (lower-extensionality lzero g ext) F↔G ; from = to (lower-extensionality lzero f ext) (inverse ∘ F↔G) } where to : ∀ {f g} {F : Type a → Type f} {G : Type a → Type g} → Extensionality a f → (∀ x → F x ↔ G x) → Monad F → Monad G Monad.raw-monad (to ext F↔G F-monad) = _⇔_.to (⇔→raw⇔raw (_↔_.logical-equivalence ∘ F↔G)) F.raw-monad where module F = Monad F-monad Monad.left-identity (to ext F↔G F-monad) x f = _↔_.to (F↔G _) (_↔_.from (F↔G _) (_↔_.to (F↔G _) (FR.return x)) FR.>>= λ x → _↔_.from (F↔G _) (f x)) ≡⟨ cong (λ y → _↔_.to (F↔G _) (y FR.>>= _)) (_↔_.left-inverse-of (F↔G _) _) ⟩ _↔_.to (F↔G _) (FR.return x FR.>>= λ x → _↔_.from (F↔G _) (f x)) ≡⟨ cong (_↔_.to (F↔G _)) (FM.left-identity _ _) ⟩ _↔_.to (F↔G _) (_↔_.from (F↔G _) (f x)) ≡⟨ _↔_.right-inverse-of (F↔G _) _ ⟩∎ f x ∎ where module FM = Monad F-monad module FR = Raw-monad FM.raw-monad Monad.right-identity (to ext F↔G F-monad) x = _↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= λ x → _↔_.from (F↔G _) (_↔_.to (F↔G _) (FR.return x))) ≡⟨ cong (λ g → _↔_.to (F↔G _) (_ FR.>>= g)) (apply-ext ext λ _ → _↔_.left-inverse-of (F↔G _) _) ⟩ _↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= FR.return) ≡⟨ cong (_↔_.to (F↔G _)) (FM.right-identity _) ⟩ _↔_.to (F↔G _) (_↔_.from (F↔G _) x) ≡⟨ _↔_.right-inverse-of (F↔G _) _ ⟩∎ x ∎ where module FM = Monad F-monad module FR = Raw-monad FM.raw-monad Monad.associativity (to ext F↔G F-monad) x f g = _↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= λ x → _↔_.from (F↔G _) (_↔_.to (F↔G _) (_↔_.from (F↔G _) (f x) FR.>>= λ x → _↔_.from (F↔G _) (g x)))) ≡⟨ cong (λ g → _↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= g)) (apply-ext ext λ _ → _↔_.left-inverse-of (F↔G _) _) ⟩ _↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= λ x → _↔_.from (F↔G _) (f x) FR.>>= λ x → _↔_.from (F↔G _) (g x)) ≡⟨ cong (_↔_.to (F↔G _)) (FM.associativity _ _ _) ⟩ _↔_.to (F↔G _) ((_↔_.from (F↔G _) x FR.>>= λ x → _↔_.from (F↔G _) (f x)) FR.>>= λ x → _↔_.from (F↔G _) (g x)) ≡⟨ cong (λ y → _↔_.to (F↔G _) (y FR.>>= _)) (sym $ _↔_.left-inverse-of (F↔G _) _) ⟩∎ _↔_.to (F↔G _) (_↔_.from (F↔G _) (_↔_.to (F↔G _) (_↔_.from (F↔G _) x FR.>>= λ x → _↔_.from (F↔G _) (f x))) FR.>>= λ x → _↔_.from (F↔G _) (g x)) ∎ where module FM = Monad F-monad module FR = Raw-monad FM.raw-monad ------------------------------------------------------------------------ -- Identity monads -- The identity monad. identity-monad : ∀ {ℓ} → Monad {d = ℓ} id Raw-monad.return (Monad.raw-monad identity-monad) x = x Raw-monad._>>=_ (Monad.raw-monad identity-monad) x f = f x Monad.left-identity identity-monad x f = refl (f x) Monad.right-identity identity-monad x = refl x Monad.associativity identity-monad x f g = refl (g (f x)) -- The identity monad, defined using a wrapper type to make instance -- resolution easier. record Id {a} (A : Type a) : Type a where constructor wrap field run : A open Id public instance Id-raw-monad : ∀ {ℓ} → Raw-monad {d = ℓ} Id run (Raw-monad.return Id-raw-monad x) = x run (Raw-monad._>>=_ Id-raw-monad x f) = run (f (run x)) Id-monad : ∀ {ℓ} → Monad {d = ℓ} Id Monad.raw-monad Id-monad = Id-raw-monad Monad.left-identity Id-monad x f = cong wrap (refl (run (f x))) Monad.right-identity Id-monad x = cong wrap (refl (run x)) Monad.associativity Id-monad x f g = cong wrap (refl (run (g (run (f (run x))))))
programs/oeis/343/A343175.asm
neoneye/loda
22
1148
; A343175: a(0)=2; for n > 0, a(n) = 2^(2*n-1) + 2^n + 1. ; 2,5,13,41,145,545,2113,8321,33025,131585,525313,2099201,8392705,33562625,134234113,536903681,2147549185,8590065665,34360000513,137439477761,549756862465,2199025352705,8796097216513,35184380477441,140737505132545,562949986975745,2251799880794113 seq $0,28400 ; a(n) = (2^n + 1)^2. sub $0,1 div $0,2 add $0,1
Validation/pyFrame3DD-master/gcc-master/gcc/ada/sem_elim.adb
djamal2727/Main-Bearing-Analytical-Model
0
15151
<filename>Validation/pyFrame3DD-master/gcc-master/gcc/ada/sem_elim.adb ------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S E M _ E L I M -- -- -- -- B o d y -- -- -- -- Copyright (C) 1997-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 Einfo; use Einfo; with Errout; use Errout; with Lib; use Lib; with Namet; use Namet; with Nlists; use Nlists; with Opt; use Opt; with Sem; use Sem; with Sem_Aux; use Sem_Aux; with Sem_Prag; use Sem_Prag; with Sem_Util; use Sem_Util; with Sinput; use Sinput; with Sinfo; use Sinfo; with Snames; use Snames; with Stand; use Stand; with Stringt; use Stringt; with Table; with GNAT.HTable; use GNAT.HTable; package body Sem_Elim is No_Elimination : Boolean; -- Set True if no Eliminate pragmas active --------------------- -- Data Structures -- --------------------- -- A single pragma Eliminate is represented by the following record type Elim_Data; type Access_Elim_Data is access Elim_Data; type Names is array (Nat range <>) of Name_Id; -- Type used to represent set of names. Used for names in Unit_Name -- and also the set of names in Argument_Types. type Access_Names is access Names; type Elim_Data is record Unit_Name : Access_Names; -- Unit name, broken down into a set of names (e.g. A.B.C is -- represented as Name_Id values for A, B, C in sequence). Entity_Name : Name_Id; -- Entity name if Entity parameter if present. If no Entity parameter -- was supplied, then Entity_Node is set to Empty, and the Entity_Name -- field contains the last identifier name in the Unit_Name. Entity_Scope : Access_Names; -- Static scope of the entity within the compilation unit represented by -- Unit_Name. Entity_Node : Node_Id; -- Save node of entity argument, for posting error messages. Set -- to Empty if there is no entity argument. Parameter_Types : Access_Names; -- Set to set of names given for parameter types. If no parameter -- types argument is present, this argument is set to null. Result_Type : Name_Id; -- Result type name if Result_Types parameter present, No_Name if not Source_Location : Name_Id; -- String describing the source location of subprogram defining name if -- Source_Location parameter present, No_Name if not Hash_Link : Access_Elim_Data; -- Link for hash table use Homonym : Access_Elim_Data; -- Pointer to next entry with same key Prag : Node_Id; -- Node_Id for Eliminate pragma end record; ---------------- -- Hash_Table -- ---------------- -- Setup hash table using the Entity_Name field as the hash key subtype Element is Elim_Data; subtype Elmt_Ptr is Access_Elim_Data; subtype Key is Name_Id; type Header_Num is range 0 .. 1023; Null_Ptr : constant Elmt_Ptr := null; ---------------------- -- Hash_Subprograms -- ---------------------- package Hash_Subprograms is function Equal (F1, F2 : Key) return Boolean; pragma Inline (Equal); function Get_Key (E : Elmt_Ptr) return Key; pragma Inline (Get_Key); function Hash (F : Key) return Header_Num; pragma Inline (Hash); function Next (E : Elmt_Ptr) return Elmt_Ptr; pragma Inline (Next); procedure Set_Next (E : Elmt_Ptr; Next : Elmt_Ptr); pragma Inline (Set_Next); end Hash_Subprograms; package body Hash_Subprograms is ----------- -- Equal -- ----------- function Equal (F1, F2 : Key) return Boolean is begin return F1 = F2; end Equal; ------------- -- Get_Key -- ------------- function Get_Key (E : Elmt_Ptr) return Key is begin return E.Entity_Name; end Get_Key; ---------- -- Hash -- ---------- function Hash (F : Key) return Header_Num is begin return Header_Num (Int (F) mod 1024); end Hash; ---------- -- Next -- ---------- function Next (E : Elmt_Ptr) return Elmt_Ptr is begin return E.Hash_Link; end Next; -------------- -- Set_Next -- -------------- procedure Set_Next (E : Elmt_Ptr; Next : Elmt_Ptr) is begin E.Hash_Link := Next; end Set_Next; end Hash_Subprograms; ------------ -- Tables -- ------------ -- The following table records the data for each pragma, using the -- entity name as the hash key for retrieval. Entries in this table -- are set by Process_Eliminate_Pragma and read by Check_Eliminated. package Elim_Hash_Table is new Static_HTable ( Header_Num => Header_Num, Element => Element, Elmt_Ptr => Elmt_Ptr, Null_Ptr => Null_Ptr, Set_Next => Hash_Subprograms.Set_Next, Next => Hash_Subprograms.Next, Key => Key, Get_Key => Hash_Subprograms.Get_Key, Hash => Hash_Subprograms.Hash, Equal => Hash_Subprograms.Equal); -- The following table records entities for subprograms that are -- eliminated, and corresponding eliminate pragmas that caused the -- elimination. Entries in this table are set by Check_Eliminated -- and read by Eliminate_Error_Msg. type Elim_Entity_Entry is record Prag : Node_Id; Subp : Entity_Id; end record; package Elim_Entities is new Table.Table ( Table_Component_Type => Elim_Entity_Entry, Table_Index_Type => Name_Id'Base, Table_Low_Bound => First_Name_Id, Table_Initial => 50, Table_Increment => 200, Table_Name => "Elim_Entries"); ---------------------- -- Check_Eliminated -- ---------------------- procedure Check_Eliminated (E : Entity_Id) is Elmt : Access_Elim_Data; Scop : Entity_Id; Form : Entity_Id; Up : Nat; begin if No_Elimination then return; -- Elimination of objects and types is not implemented yet elsif Ekind (E) not in Subprogram_Kind then return; end if; -- Loop through homonyms for this key Elmt := Elim_Hash_Table.Get (Chars (E)); while Elmt /= null loop Check_Homonyms : declare procedure Set_Eliminated; -- Set current subprogram entity as eliminated -------------------- -- Set_Eliminated -- -------------------- procedure Set_Eliminated is Overridden : Entity_Id; begin if Is_Dispatching_Operation (E) then -- If an overriding dispatching primitive is eliminated then -- its parent must have been eliminated. If the parent is an -- inherited operation, check the operation that it renames, -- because flag Eliminated is only set on source operations. Overridden := Overridden_Operation (E); if Present (Overridden) and then not Comes_From_Source (Overridden) and then Present (Alias (Overridden)) then Overridden := Alias (Overridden); end if; if Present (Overridden) and then not Is_Eliminated (Overridden) and then not Is_Abstract_Subprogram (Overridden) then Error_Msg_Name_1 := Chars (E); Error_Msg_N ("cannot eliminate subprogram %", E); return; end if; end if; Set_Is_Eliminated (E); Elim_Entities.Append ((Prag => Elmt.Prag, Subp => E)); end Set_Eliminated; -- Start of processing for Check_Homonyms begin -- First we check that the name of the entity matches if Elmt.Entity_Name /= Chars (E) then goto Continue; end if; -- Find enclosing unit, and verify that its name and those of its -- parents match. Scop := Cunit_Entity (Current_Sem_Unit); -- Now see if compilation unit matches Up := Elmt.Unit_Name'Last; -- If we are within a subunit, the name in the pragma has been -- parsed as a child unit, but the current compilation unit is in -- fact the parent in which the subunit is embedded. We must skip -- the first name which is that of the subunit to match the pragma -- specification. Body may be that of a package or subprogram. declare Par : Node_Id; begin Par := Parent (E); while Present (Par) loop if Nkind (Par) = N_Subunit then if Chars (Defining_Entity (Proper_Body (Par))) = Elmt.Unit_Name (Up) then Up := Up - 1; exit; else goto Continue; end if; end if; Par := Parent (Par); end loop; end; for J in reverse Elmt.Unit_Name'First .. Up loop if Elmt.Unit_Name (J) /= Chars (Scop) then goto Continue; end if; Scop := Scope (Scop); if Scop /= Standard_Standard and then J = 1 then goto Continue; end if; end loop; if Scop /= Standard_Standard then goto Continue; end if; if Present (Elmt.Entity_Node) and then Elmt.Entity_Scope /= null then -- Check that names of enclosing scopes match. Skip blocks and -- wrapper package of subprogram instances, which do not appear -- in the pragma. Scop := Scope (E); for J in reverse Elmt.Entity_Scope'Range loop while Ekind (Scop) = E_Block or else (Ekind (Scop) = E_Package and then Is_Wrapper_Package (Scop)) loop Scop := Scope (Scop); end loop; if Elmt.Entity_Scope (J) /= Chars (Scop) then if Ekind (Scop) /= E_Protected_Type or else Comes_From_Source (Scop) then goto Continue; -- For simple protected declarations, retrieve the source -- name of the object, which appeared in the Eliminate -- pragma. else declare Decl : constant Node_Id := Original_Node (Parent (Scop)); begin if Elmt.Entity_Scope (J) /= Chars (Defining_Identifier (Decl)) then if J > 0 then null; end if; goto Continue; end if; end; end if; end if; Scop := Scope (Scop); end loop; end if; -- If given entity is a library level subprogram and pragma had a -- single parameter, a match. if Is_Compilation_Unit (E) and then Is_Subprogram (E) and then No (Elmt.Entity_Node) then Set_Eliminated; return; -- Check for case of type or object with two parameter case elsif (Is_Type (E) or else Is_Object (E)) and then Elmt.Result_Type = No_Name and then Elmt.Parameter_Types = null then Set_Eliminated; return; -- Check for case of subprogram elsif Ekind (E) in E_Function | E_Procedure then -- If Source_Location present, then see if it matches if Elmt.Source_Location /= No_Name then Get_Name_String (Elmt.Source_Location); declare Sloc_Trace : constant String := Name_Buffer (1 .. Name_Len); Idx : Natural := Sloc_Trace'First; -- Index in Sloc_Trace, if equals to 0, then we have -- completely traversed Sloc_Trace Last : constant Natural := Sloc_Trace'Last; P : Source_Ptr; Sindex : Source_File_Index; function File_Name_Match return Boolean; -- This function is supposed to be called when Idx points -- to the beginning of the new file name, and Name_Buffer -- is set to contain the name of the proper source file -- from the chain corresponding to the Sloc of E. First -- it checks that these two files have the same name. If -- this check is successful, moves Idx to point to the -- beginning of the column number. function Line_Num_Match return Boolean; -- This function is supposed to be called when Idx points -- to the beginning of the column number, and P is -- set to point to the proper Sloc the chain -- corresponding to the Sloc of E. First it checks that -- the line number Idx points on and the line number -- corresponding to P are the same. If this check is -- successful, moves Idx to point to the beginning of -- the next file name in Sloc_Trace. If there is no file -- name any more, Idx is set to 0. function Different_Trace_Lengths return Boolean; -- From Idx and P, defines if there are in both traces -- more element(s) in the instantiation chains. Returns -- False if one trace contains more element(s), but -- another does not. If both traces contains more -- elements (that is, the function returns False), moves -- P ahead in the chain corresponding to E, recomputes -- Sindex and sets the name of the corresponding file in -- Name_Buffer function Skip_Spaces return Natural; -- If Sloc_Trace (Idx) is not space character, returns -- Idx. Otherwise returns the index of the nearest -- non-space character in Sloc_Trace to the right of Idx. -- Returns 0 if there is no such character. ----------------------------- -- Different_Trace_Lengths -- ----------------------------- function Different_Trace_Lengths return Boolean is begin P := Instantiation (Sindex); if (P = No_Location and then Idx /= 0) or else (P /= No_Location and then Idx = 0) then return True; else if P /= No_Location then Sindex := Get_Source_File_Index (P); Get_Name_String (File_Name (Sindex)); end if; return False; end if; end Different_Trace_Lengths; --------------------- -- File_Name_Match -- --------------------- function File_Name_Match return Boolean is Tmp_Idx : Natural; End_Idx : Natural; begin if Idx = 0 then return False; end if; -- Find first colon. If no colon, then return False. -- If there is a colon, Tmp_Idx is set to point just -- before the colon. Tmp_Idx := Idx - 1; loop if Tmp_Idx >= Last then return False; elsif Sloc_Trace (Tmp_Idx + 1) = ':' then exit; else Tmp_Idx := Tmp_Idx + 1; end if; end loop; -- Find last non-space before this colon. If there is -- no space character before this colon, then return -- False. Otherwise, End_Idx is set to point to this -- non-space character. End_Idx := Tmp_Idx; loop if End_Idx < Idx then return False; elsif Sloc_Trace (End_Idx) /= ' ' then exit; else End_Idx := End_Idx - 1; end if; end loop; -- Now see if file name matches what is in Name_Buffer -- and if so, step Idx past it and return True. If the -- name does not match, return False. if Sloc_Trace (Idx .. End_Idx) = Name_Buffer (1 .. Name_Len) then Idx := Tmp_Idx + 2; Idx := Skip_Spaces; return True; else return False; end if; end File_Name_Match; -------------------- -- Line_Num_Match -- -------------------- function Line_Num_Match return Boolean is N : Nat := 0; begin if Idx = 0 then return False; end if; while Idx <= Last and then Sloc_Trace (Idx) in '0' .. '9' loop N := N * 10 + (Character'Pos (Sloc_Trace (Idx)) - Character'Pos ('0')); Idx := Idx + 1; end loop; if Get_Physical_Line_Number (P) = Physical_Line_Number (N) then while Idx <= Last and then Sloc_Trace (Idx) /= '[' loop Idx := Idx + 1; end loop; if Idx <= Last then pragma Assert (Sloc_Trace (Idx) = '['); Idx := Idx + 1; Idx := Skip_Spaces; else Idx := 0; end if; return True; else return False; end if; end Line_Num_Match; ----------------- -- Skip_Spaces -- ----------------- function Skip_Spaces return Natural is Res : Natural; begin Res := Idx; while Sloc_Trace (Res) = ' ' loop Res := Res + 1; if Res > Last then Res := 0; exit; end if; end loop; return Res; end Skip_Spaces; begin P := Sloc (E); Sindex := Get_Source_File_Index (P); Get_Name_String (File_Name (Sindex)); Idx := Skip_Spaces; while Idx > 0 loop if not File_Name_Match then goto Continue; elsif not Line_Num_Match then goto Continue; end if; if Different_Trace_Lengths then goto Continue; end if; end loop; end; end if; -- If we have a Result_Type, then we must have a function with -- the proper result type. if Elmt.Result_Type /= No_Name then if Ekind (E) /= E_Function or else Chars (Etype (E)) /= Elmt.Result_Type then goto Continue; end if; end if; -- If we have Parameter_Types, they must match if Elmt.Parameter_Types /= null then Form := First_Formal (E); if No (Form) and then Elmt.Parameter_Types'Length = 1 and then Elmt.Parameter_Types (1) = No_Name then -- Parameterless procedure matches null; elsif Elmt.Parameter_Types = null then goto Continue; else for J in Elmt.Parameter_Types'Range loop if No (Form) or else Chars (Etype (Form)) /= Elmt.Parameter_Types (J) then goto Continue; else Next_Formal (Form); end if; end loop; if Present (Form) then goto Continue; end if; end if; end if; -- If we fall through, this is match Set_Eliminated; return; end if; end Check_Homonyms; <<Continue>> Elmt := Elmt.Homonym; end loop; return; end Check_Eliminated; ------------------------------------- -- Check_For_Eliminated_Subprogram -- ------------------------------------- procedure Check_For_Eliminated_Subprogram (N : Node_Id; S : Entity_Id) is Ultimate_Subp : constant Entity_Id := Ultimate_Alias (S); Enclosing_Subp : Entity_Id; begin -- No check needed within a default expression for a formal, since this -- is not really a use, and the expression (a call or attribute) may -- never be used if the enclosing subprogram is itself eliminated. if In_Spec_Expression then return; end if; if Is_Eliminated (Ultimate_Subp) and then not Inside_A_Generic and then not Is_Generic_Unit (Cunit_Entity (Current_Sem_Unit)) then Enclosing_Subp := Current_Subprogram; while Present (Enclosing_Subp) loop if Is_Eliminated (Enclosing_Subp) then return; end if; Enclosing_Subp := Enclosing_Subprogram (Enclosing_Subp); end loop; -- Emit error, unless we are within an instance body and the expander -- is disabled, indicating an instance within an enclosing generic. -- In an instance, the ultimate alias is an internal entity, so place -- the message on the original subprogram. if In_Instance_Body and then not Expander_Active then null; elsif Comes_From_Source (Ultimate_Subp) then Eliminate_Error_Msg (N, Ultimate_Subp); else Eliminate_Error_Msg (N, S); end if; end if; end Check_For_Eliminated_Subprogram; ------------------------- -- Eliminate_Error_Msg -- ------------------------- procedure Eliminate_Error_Msg (N : Node_Id; E : Entity_Id) is begin for J in Elim_Entities.First .. Elim_Entities.Last loop if E = Elim_Entities.Table (J).Subp then Error_Msg_Sloc := Sloc (Elim_Entities.Table (J).Prag); Error_Msg_NE ("cannot reference subprogram & eliminated #", N, E); return; end if; end loop; -- If this is an internal operation generated for a protected operation, -- its name does not match the source name, so just report the error. if not Comes_From_Source (E) and then Present (First_Entity (E)) and then Is_Concurrent_Record_Type (Etype (First_Entity (E))) then Error_Msg_NE ("cannot reference eliminated protected subprogram", N, E); -- Otherwise should not fall through, entry should be in table else Error_Msg_NE ("subprogram& is called but its alias is eliminated", N, E); -- raise Program_Error; end if; end Eliminate_Error_Msg; ---------------- -- Initialize -- ---------------- procedure Initialize is begin Elim_Hash_Table.Reset; Elim_Entities.Init; No_Elimination := True; end Initialize; ------------------------------ -- Process_Eliminate_Pragma -- ------------------------------ procedure Process_Eliminate_Pragma (Pragma_Node : Node_Id; Arg_Unit_Name : Node_Id; Arg_Entity : Node_Id; Arg_Parameter_Types : Node_Id; Arg_Result_Type : Node_Id; Arg_Source_Location : Node_Id) is Data : constant Access_Elim_Data := new Elim_Data; -- Build result data here Elmt : Access_Elim_Data; Num_Names : Nat := 0; -- Number of names in unit name Lit : Node_Id; Arg_Ent : Entity_Id; Arg_Uname : Node_Id; function OK_Selected_Component (N : Node_Id) return Boolean; -- Test if N is a selected component with all identifiers, or a selected -- component whose selector is an operator symbol. As a side effect -- if result is True, sets Num_Names to the number of names present -- (identifiers, and operator if any). --------------------------- -- OK_Selected_Component -- --------------------------- function OK_Selected_Component (N : Node_Id) return Boolean is begin if Nkind (N) = N_Identifier or else Nkind (N) = N_Operator_Symbol then Num_Names := Num_Names + 1; return True; elsif Nkind (N) = N_Selected_Component then return OK_Selected_Component (Prefix (N)) and then OK_Selected_Component (Selector_Name (N)); else return False; end if; end OK_Selected_Component; -- Start of processing for Process_Eliminate_Pragma begin Data.Prag := Pragma_Node; Error_Msg_Name_1 := Name_Eliminate; -- Process Unit_Name argument if Nkind (Arg_Unit_Name) = N_Identifier then Data.Unit_Name := new Names'(1 => Chars (Arg_Unit_Name)); Num_Names := 1; elsif OK_Selected_Component (Arg_Unit_Name) then Data.Unit_Name := new Names (1 .. Num_Names); Arg_Uname := Arg_Unit_Name; for J in reverse 2 .. Num_Names loop Data.Unit_Name (J) := Chars (Selector_Name (Arg_Uname)); Arg_Uname := Prefix (Arg_Uname); end loop; Data.Unit_Name (1) := Chars (Arg_Uname); else Error_Msg_N ("wrong form for Unit_Name parameter of pragma%", Arg_Unit_Name); return; end if; -- Process Entity argument if Present (Arg_Entity) then Num_Names := 0; if Nkind (Arg_Entity) = N_Identifier or else Nkind (Arg_Entity) = N_Operator_Symbol then Data.Entity_Name := Chars (Arg_Entity); Data.Entity_Node := Arg_Entity; Data.Entity_Scope := null; elsif OK_Selected_Component (Arg_Entity) then Data.Entity_Scope := new Names (1 .. Num_Names - 1); Data.Entity_Name := Chars (Selector_Name (Arg_Entity)); Data.Entity_Node := Arg_Entity; Arg_Ent := Prefix (Arg_Entity); for J in reverse 2 .. Num_Names - 1 loop Data.Entity_Scope (J) := Chars (Selector_Name (Arg_Ent)); Arg_Ent := Prefix (Arg_Ent); end loop; Data.Entity_Scope (1) := Chars (Arg_Ent); elsif Is_Config_Static_String (Arg_Entity) then Data.Entity_Name := Name_Find; Data.Entity_Node := Arg_Entity; else return; end if; else Data.Entity_Node := Empty; Data.Entity_Name := Data.Unit_Name (Num_Names); end if; -- Process Parameter_Types argument if Present (Arg_Parameter_Types) then -- Here for aggregate case if Nkind (Arg_Parameter_Types) = N_Aggregate then Data.Parameter_Types := new Names (1 .. List_Length (Expressions (Arg_Parameter_Types))); Lit := First (Expressions (Arg_Parameter_Types)); for J in Data.Parameter_Types'Range loop if Is_Config_Static_String (Lit) then Data.Parameter_Types (J) := Name_Find; Next (Lit); else return; end if; end loop; -- Otherwise we must have case of one name, which looks like a -- parenthesized literal rather than an aggregate. elsif Paren_Count (Arg_Parameter_Types) /= 1 then Error_Msg_N ("wrong form for argument of pragma Eliminate", Arg_Parameter_Types); return; elsif Is_Config_Static_String (Arg_Parameter_Types) then String_To_Name_Buffer (Strval (Arg_Parameter_Types)); if Name_Len = 0 then -- Parameterless procedure Data.Parameter_Types := new Names'(1 => No_Name); else Data.Parameter_Types := new Names'(1 => Name_Find); end if; else return; end if; end if; -- Process Result_Types argument if Present (Arg_Result_Type) then if Is_Config_Static_String (Arg_Result_Type) then Data.Result_Type := Name_Find; else return; end if; -- Here if no Result_Types argument else Data.Result_Type := No_Name; end if; -- Process Source_Location argument if Present (Arg_Source_Location) then if Is_Config_Static_String (Arg_Source_Location) then Data.Source_Location := Name_Find; else return; end if; else Data.Source_Location := No_Name; end if; Elmt := Elim_Hash_Table.Get (Hash_Subprograms.Get_Key (Data)); -- If we already have an entry with this same key, then link -- it into the chain of entries for this key. if Elmt /= null then Data.Homonym := Elmt.Homonym; Elmt.Homonym := Data; -- Otherwise create a new entry else Elim_Hash_Table.Set (Data); end if; No_Elimination := False; end Process_Eliminate_Pragma; end Sem_Elim;
Branches/print_array.asm
berkcetinsaya/MIPSLanguageExamples
0
90086
.data list: .word 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 size: .word 10 NL: .asciiz "\n" .text lw $t3, size # get the size of array la $t1, list # get array address li $t2, 0 # set loop counter loop: beq $t2, $t3, exit # check for array end lw $a0, ($t1) # print list element li $v0, 1 syscall la $a0, NL # print a newline li $v0, 4 syscall addi $t2, $t2, 1 # advance loop counter addi $t1, $t1, 4 # advance array pointer b loop # repeat the loop exit: li $v0, 10 syscall
Categories/Functor/Construction/Exponential.agda
elpinal/exsub-ccc
3
16011
module Categories.Functor.Construction.Exponential where open import Categories.Category open import Categories.Category.Product using (Product) open import Categories.Category.CartesianClosed open import Categories.Category.Cartesian open import Categories.Category.BinaryProducts open import Categories.Object.Exponential open import Categories.Functor.Bifunctor open import Data.Product using (_,_; proj₁; proj₂) module _ {o ℓ e} (𝒞 : Category o ℓ e) (cartesianClosed : CartesianClosed 𝒞) where open import Categories.Morphism.Reasoning 𝒞 open CartesianClosed cartesianClosed open Cartesian cartesian open BinaryProducts products open Category 𝒞 open Equiv private P : Category _ _ _ P = Product 𝒞 op Exp : Bifunctor 𝒞 (Category.op 𝒞) 𝒞 Exp = record { F₀ = λ (x , y) → x ^ y ; F₁ = λ (f , g) → λg (f ∘ eval′ ∘ (id ⁂ g)) ; identity = λ {A} → begin λg (id ∘ eval′ ∘ (id ⁂ id)) ≈⟨ λ-cong identityˡ ⟩ λg (eval′ ∘ (id ⁂ id)) ≈⟨ λ-cong (elimʳ (Equiv.trans (⟨⟩-cong₂ identityˡ identityˡ) η)) ⟩ λg eval′ ≈⟨ η-id′ ⟩ id ∎ ; homomorphism = λ {X} {Y} {Z} {f} {g} → begin λg ((proj₁ g ∘ proj₁ f) ∘ eval′ ∘ (id ⁂ (proj₂ f ∘ proj₂ g))) ≈⟨ λ-cong assoc ⟩ λg (proj₁ g ∘ proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f ∘ proj₂ g)) ≈˘⟨ λ-cong (∘-resp-≈ʳ (∘-resp-≈ʳ (∘-resp-≈ʳ (trans ⁂∘⁂ (⁂-cong₂ identity² refl))))) ⟩ λg (proj₁ g ∘ proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f) ∘ (id ⁂ proj₂ g)) ≈˘⟨ λ-cong (∘-resp-≈ʳ assoc²') ⟩ λg (proj₁ g ∘ (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ∘ (id ⁂ proj₂ g)) ≈˘⟨ λ-cong (∘-resp-≈ʳ (pullˡ β′)) ⟩ λg (proj₁ g ∘ eval′ ∘ (λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ⁂ id) ∘ (id ⁂ proj₂ g)) ≈⟨ λ-cong (∘-resp-≈ʳ (∘-resp-≈ʳ ⁂∘⁂)) ⟩ λg (proj₁ g ∘ eval′ ∘ (λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ∘ id ⁂ id ∘ proj₂ g)) ≈⟨ λ-cong (∘-resp-≈ʳ (∘-resp-≈ʳ (⁂-cong₂ (trans identityʳ (sym identityˡ)) (trans identityˡ (sym identityʳ))))) ⟩ λg (proj₁ g ∘ eval′ ∘ (id ∘ λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ⁂ proj₂ g ∘ id)) ≈˘⟨ λ-cong (∘-resp-≈ʳ (∘-resp-≈ʳ ⁂∘⁂)) ⟩ λg (proj₁ g ∘ eval′ ∘ (id ⁂ proj₂ g) ∘ (λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ⁂ id)) ≈˘⟨ λ-cong assoc²' ⟩ λg ((proj₁ g ∘ eval′ ∘ (id ⁂ proj₂ g)) ∘ (λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ⁂ id)) ≈˘⟨ exp.subst product product ⟩ λg (proj₁ g ∘ eval′ ∘ (id ⁂ proj₂ g)) ∘ λg (proj₁ f ∘ eval′ ∘ (id ⁂ proj₂ f)) ∎ ; F-resp-≈ = λ (x , y) → λ-cong (∘-resp-≈ x (∘-resp-≈ʳ (⁂-cong₂ Equiv.refl y))) } where open HomReasoning
SoundEngine/DemoSource/demo_asm6.asm
beetrootpaul/FamiStudio
2
96710
; HEADER INES_MAPPER = 0 ; 0 = NROM INES_MIRROR = 1 ; 0 = horizontal mirroring, 1 = vertical mirroring INES_SRAM = 0 ; 1 = battery backed SRAM at $6000-7FFF .db 'N', 'E', 'S', $1A ; ID .db $02 ; 16k PRG bank count .db $01 ; 8k CHR bank count .db INES_MIRROR | (INES_SRAM << 1) | ((INES_MAPPER & $f) << 4) .db (INES_MAPPER & %11110000) .db $0, $0, $0, $0, $0, $0, $0, $0 ; padding .fillvalue $ff ; ZEROPAGE .enum $0000 nmi_lock: .dsb 1 ; prevents NMI re-entry nmi_count: .dsb 1 ; is incremented every NMI nmi_ready: .dsb 1 ; set to 1 to push a PPU frame update, 2 to turn rendering off next NMI nmt_row_update_len: .dsb 1 ; number of bytes in nmt_row_update buffer nmt_col_update_len: .dsb 1 ; number of bytes in nmt_col_update buffer scroll_x: .dsb 1 ; x scroll position scroll_y: .dsb 1 ; y scroll position scroll_nmt: .dsb 1 ; nametable select (0-3 = $2000,$2400,$2800,$2C00) gamepad: .dsb 1 gamepad_previous: .dsb 1 gamepad_pressed: .dsb 1 song_index: .dsb 1 pause_flag: .dsb 1 ; General purpose temporary vars. r0: .dsb 1 r1: .dsb 1 r2: .dsb 1 r3: .dsb 1 r4: .dsb 1 ; General purpose pointers. p0: .dsb 2 .ende ; RAM .enum $0300 nmt_col_update: .dsb 128 ; nametable update entry buffer for PPU update (column mode) nmt_row_update: .dsb 128 ; nametable update entry buffer for PPU update (column mode) palette: .dsb 32 ; palette buffer for PPU update .ende ; OAM .enum $0200 oam: .dsb 256 ; sprite OAM data to be uploaded by DMA .ende ; CODE .base $8000 ; FamiStudio config. FAMISTUDIO_CFG_EXTERNAL = 1 FAMISTUDIO_CFG_DPCM_SUPPORT = 1 FAMISTUDIO_CFG_SFX_SUPPORT = 1 FAMISTUDIO_CFG_SFX_STREAMS = 2 FAMISTUDIO_CFG_EQUALIZER = 1 FAMISTUDIO_USE_VOLUME_TRACK = 1 FAMISTUDIO_USE_PITCH_TRACK = 1 FAMISTUDIO_USE_SLIDE_NOTES = 1 FAMISTUDIO_USE_VIBRATO = 1 FAMISTUDIO_USE_ARPEGGIO = 1 FAMISTUDIO_CFG_SMOOTH_VIBRATO = 1 FAMISTUDIO_DPCM_OFF = $e000 ; ASM6-specific config. FAMISTUDIO_ASM6_ZP_ENUM = $0014 FAMISTUDIO_ASM6_BSS_ENUM = $0420 FAMISTUDIO_ASM6_CODE_BASE = $8000 .include "..\famistudio_asm6.asm" ; Our single screen. screen_data_rle: .incbin "demo.rle" default_palette: .incbin "demo.pal" .incbin "demo.pal" ; Silver Surfer - BGM 2 song_title_silver_surfer: .db $ff, $ff, $ff, $12, $22, $25, $2f, $1e, $2b, $ff, $12, $2e, $2b, $1f, $1e, $2b, $ff, $4c, $ff, $01, $06, $0c, $ff, $36, $ff, $ff, $ff, $ff ; Journey To Silius - Menu song_title_jts: .db $ff, $ff, $09, $28, $2e, $2b, $27, $1e, $32, $ff, $13, $28, $ff, $12, $22, $25, $22, $2e, $2c, $ff, $4c, $ff, $0c, $1e, $27, $2e, $ff, $ff ; Shatterhand - Final Area song_title_shatterhand: .db $ff, $ff, $12, $21, $1a, $2d, $2d, $1e, $2b, $21, $1a, $27, $1d, $ff, $4c, $ff, $05, $22, $27, $1a, $25, $ff, $00, $2b, $1e, $1a, $ff, $ff NUM_SONGS = 3 reset: sei ; mask interrupts lda #0 sta $2000 ; disable NMI sta $2001 ; disable rendering sta $4015 ; disable APU sound sta $4010 ; disable DMC IRQ lda #$40 sta $4017 ; disable APU IRQ cld ; disable decimal mode ldx #$FF txs ; initialize stack ; wait for first vblank bit $2002 @wait_vblank_loop: bit $2002 bpl @wait_vblank_loop ; clear all RAM to 0 lda #0 ldx #0 @clear_ram_loop: sta $0000, X sta $0100, X sta $0200, X sta $0300, X sta $0400, X sta $0500, X sta $0600, X sta $0700, X inx bne @clear_ram_loop ; place all sprites offscreen at Y=255 lda #255 ldx #0 @clear_oam_loop: sta oam, X inx inx inx inx bne @clear_oam_loop ; wait for second vblank @wait_vblank_loop2: bit $2002 bpl @wait_vblank_loop2 ; NES is initialized, ready to begin! ; enable the NMI for graphical updates, and jump to our main program lda #%10001000 sta $2000 jmp main nmi: ; save registers pha txa pha tya pha ; prevent NMI re-entry lda nmi_lock beq @lock_nmi jmp @nmi_end @lock_nmi: lda #1 sta nmi_lock inc nmi_count lda nmi_ready bne @check_rendering_off ; nmi_ready == 0 not ready to update PPU jmp @ppu_update_end @check_rendering_off: cmp #2 ; nmi_ready == 2 turns rendering off bne @oam_dma lda #%00000000 sta $2001 ldx #0 stx nmi_ready jmp @ppu_update_end @oam_dma: ; sprite OAM DMA ldx #0 stx $2003 lda #>(oam) sta $4014 ; nametable update (column) @col_update: ldx #0 cpx nmt_col_update_len beq @row_update lda #%10001100 sta $2000 ; set vertical nametable increment @nmt_col_update_loop: lda nmt_col_update, x inx sta $2006 lda nmt_col_update, x inx sta $2006 ldy nmt_col_update, x inx @col_loop: lda nmt_col_update, x inx sta $2007 dey bne @col_loop cpx nmt_col_update_len bcc @nmt_col_update_loop lda #0 sta nmt_col_update_len ; nametable update (row) @row_update: lda #%10001000 sta $2000 ; set horizontal nametable increment ldx #0 cpx nmt_row_update_len bcs @palettes @nmt_row_update_loop: lda nmt_row_update, x inx sta $2006 lda nmt_row_update, x inx sta $2006 ldy nmt_row_update, x inx @row_loop: lda nmt_row_update, x inx sta $2007 dey bne @row_loop cpx nmt_row_update_len bcc @nmt_row_update_loop lda #0 sta nmt_row_update_len ; palettes @palettes: lda #%10001000 sta $2000 ; set horizontal nametable increment lda $2002 lda #$3F sta $2006 ldx #0 stx $2006 ; set 0PPU address to $3F00 @pal_loop: lda palette, X sta $2007 inx cpx #32 bne @pal_loop @scroll: lda scroll_nmt and #%00000011 ; keep only lowest 2 bits to prevent error ora #%10001000 sta $2000 lda scroll_x sta $2005 lda scroll_y sta $2005 ; enable rendering lda #%00011110 sta $2001 ; flag PPU update complete ldx #0 stx nmi_ready @ppu_update_end: ; if this engine had music/sound, this would be a good place to play it ; unlock re-entry flag lda #0 sta nmi_lock @nmi_end: ; restore registers and return pla tay pla tax pla rti irq: rti ; ppu_update: waits until next NMI, turns rendering on (if not already), uploads OAM, palette, and nametable update to PPU ppu_update: lda #1 sta nmi_ready @wait: lda nmi_ready bne @wait rts ; ppu_skip: waits until next NMI, does not update PPU ppu_skip: lda nmi_count @wait: cmp nmi_count beq @wait rts ; ppu_off: waits until next NMI, turns rendering off (now safe to write PPU directly via $2007) ppu_off: lda #2 sta nmi_ready @wait: lda nmi_ready bne @wait rts PAD_A = $01 PAD_B = $02 PAD_SELECT = $04 PAD_START = $08 PAD_U = $10 PAD_D = $20 PAD_L = $40 PAD_R = $80 gamepad_poll: ; strobe the gamepad to latch current button state lda #1 sta $4016 lda #0 sta $4016 ; read 8 bytes from the interface at $4016 ldx #8 @gamepad_loop: pha lda $4016 ; combine low two bits and store in carry bit and #%00000011 cmp #%00000001 pla ; rotate carry into gamepad variable ror a dex bne @gamepad_loop sta gamepad rts gamepad_poll_dpcm_safe: lda gamepad sta gamepad_previous jsr gamepad_poll @reread: lda gamepad pha jsr gamepad_poll pla cmp gamepad bne @reread @toggle: eor gamepad_previous and gamepad sta gamepad_pressed rts play_song: @text_ptr = p0 lda song_index cmp #1 beq @journey_to_silius cmp #2 beq @shatterhand ; Here since both of our songs came from different FamiStudio projects, ; they are actually 3 different song data, with a single song in each. ; For a real game, if would be preferable to export all songs together ; so that instruments shared across multiple songs are only exported once. @silver_surfer: lda #<song_title_silver_surfer sta @text_ptr+0 lda #>song_title_silver_surfer sta @text_ptr+1 ldx #<music_data_silver_surfer_c_stephen_ruddy ldy #>music_data_silver_surfer_c_stephen_ruddy jmp @play_song @journey_to_silius: lda #<song_title_jts sta @text_ptr+0 lda #>song_title_jts sta @text_ptr+1 ldx #<music_data_journey_to_silius ldy #>music_data_journey_to_silius jmp @play_song @shatterhand: lda #<song_title_shatterhand sta @text_ptr+0 lda #>song_title_shatterhand sta @text_ptr+1 ldx #<music_data_shatterhand ldy #>music_data_shatterhand jmp @play_song @play_song: lda #1 ; NTSC jsr famistudio_init lda #0 jsr famistudio_music_play ;update title. ldx #2 ldy #15 jsr draw_text jsr ppu_update rts equalizer_lookup: .byte $f0, $f0, $f0, $f0 ; 0 .byte $f0, $f0, $f0, $b8 ; 1 .byte $f0, $f0, $f0, $c8 ; 2 .byte $f0, $f0, $b8, $c8 ; 3 .byte $f0, $f0, $c8, $c8 ; 4 .byte $f0, $b8, $c8, $c8 ; 5 .byte $f0, $c8, $c8, $c8 ; 6 .byte $b8, $c8, $c8, $c8 ; 7 .byte $c8, $c8, $c8, $c8 ; 8 equalizer_color_lookup: .byte $01, $02, $00, $02, $01 ; a = channel to update update_equalizer: @pos_x = r0 @color_offset = r1 tay lda equalizer_color_lookup, y sta @color_offset tya ; compute x position. asl a asl a sta @pos_x ; compute lookup index. lda famistudio_chn_note_counter, y asl a asl a tay ; compute 2 addresses ldx nmt_col_update_len lda #$22 sta nmt_col_update,x sta nmt_col_update+7,x lda #$47 clc adc @pos_x sta nmt_col_update+1,x adc #1 sta nmt_col_update+8,x lda #4 sta nmt_col_update+2,x sta nmt_col_update+9,x lda equalizer_lookup, y adc @color_offset sta nmt_col_update+3,x sta nmt_col_update+10,x lda equalizer_lookup+1, y adc @color_offset sta nmt_col_update+4,x sta nmt_col_update+11,x lda equalizer_lookup+2, y adc @color_offset sta nmt_col_update+5,x sta nmt_col_update+12,x lda equalizer_lookup+3, y adc @color_offset sta nmt_col_update+6,x sta nmt_col_update+13,x lda #14 adc nmt_col_update_len sta nmt_col_update_len rts main: ldx #0 @palette_loop: lda default_palette, X sta palette, X inx cpx #32 bcc @palette_loop jsr setup_background lda #0 ; song zero. sta song_index jsr play_song jsr ppu_update ; Load SFX ldx #<sounds ldy #>sounds jsr famistudio_sfx_init @loop: jsr gamepad_poll_dpcm_safe @check_right: lda gamepad_pressed and #PAD_R beq @check_left ; dont go beyond last song. lda song_index cmp #(NUM_SONGS - 1) beq @draw ; next song. clc adc #1 sta song_index jsr play_song jmp @draw_done @check_left: lda gamepad_pressed and #PAD_L beq @check_select ; dont go below zero lda song_index beq @draw sec sbc #1 sta song_index jsr play_song jmp @draw_done @check_select: lda gamepad_pressed and #PAD_SELECT beq @check_start ; Undocumented: selects plays a SFX sample when journey to silius is loaded. lda song_index cmp #1 bne @draw lda #21 jsr famistudio_sfx_sample_play jmp @draw @check_start: lda gamepad_pressed and #PAD_START beq @check_a lda #1 eor pause_flag sta pause_flag jsr famistudio_music_pause jmp @draw @check_a: lda gamepad_pressed and #PAD_A beq @check_b lda #0 ldx #FAMISTUDIO_SFX_CH0 jsr famistudio_sfx_play beq @draw @check_b: lda gamepad_pressed and #PAD_B beq @draw lda #1 ldx #FAMISTUDIO_SFX_CH1 jsr famistudio_sfx_play beq @draw @draw: jsr famistudio_update ; TODO: Call in NMI. lda #0 jsr update_equalizer lda #1 jsr update_equalizer lda #2 jsr update_equalizer lda #3 jsr update_equalizer lda #4 jsr update_equalizer @draw_done: jsr ppu_update jmp @loop ; Shiru's code. ; x = lo byte of RLE data addr ; y = hi byte of RLE data addr rle_decompress: @rle_lo = r0 @rle_high = r1 @rle_tag = r2 @rle_byte = r3 stx <@rle_lo sty <@rle_high ldy #0 jsr rle_read_byte sta <@rle_tag @loop: jsr rle_read_byte cmp @rle_tag beq @is_rle sta $2007 sta <@rle_byte bne @loop @is_rle: jsr rle_read_byte cmp #0 beq @done tax lda <@rle_byte @rle_loop: sta $2007 dex bne @rle_loop beq @loop @done: ;.4 rts rle_read_byte: @rle_lo = r0 @rle_high = r1 lda (@rle_lo),y inc @rle_lo bne @done inc @rle_high @done: rts ; Draws text with rendering on. ; x/y = tile position ; p0 = pointer to text data. draw_text: @temp_x = r2 @temp = r3 @text_ptr = p0 stx @temp_x ldx nmt_row_update_len tya lsr lsr lsr ora #$20 ; high bits of Y + $20 sta nmt_row_update,x inx tya asl asl asl asl asl sta @temp lda @temp_x ora @temp sta nmt_row_update,x inx lda #28 ; all our strings have 28 characters. sta nmt_row_update,x inx ldy #0 @text_loop: lda (@text_ptr),y sta nmt_row_update,x inx iny cpy #28 bne @text_loop stx nmt_row_update_len rts setup_background: ; first nametable, start by clearing to empty lda $2002 ; reset latch lda #$20 sta $2006 lda #$00 sta $2006 ; BG image. ldx #<screen_data_rle ldy #>screen_data_rle jsr rle_decompress ; Add a few sprites to the FamiStudio logo. lda #80 sta oam+3 lda #15 sta oam+0 lda #$81 sta oam+1 lda #1 sta oam+2 lda #72 sta oam+7 lda #23 sta oam+4 lda #$90 sta oam+5 lda #1 sta oam+6 lda #88 sta oam+11 lda #23 sta oam+8 lda #$92 sta oam+9 lda #1 sta oam+10 rts ; SONG .org $a000 song_silver_surfer: .include "song_silver_surfer_asm6.asm" sfx_data: .include "sfx_asm6.asm" .org $c000 song_journey_to_silius: .include "song_journey_to_silius_asm6.asm" .org $d000 song_shatterhand: .include "song_shatterhand_asm6.asm" ; DPCM .org $e000 .incbin "song_journey_to_silius_asm6.dmc" ; VECTORS .org $fffa .dw nmi .dw reset .dw irq ; CHARS .incbin "demo.chr" .incbin "demo.chr"
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_1119.asm
ljhsiun2/medusa
9
9674
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x9263, %rsi nop nop nop nop cmp $42880, %r9 movups (%rsi), %xmm3 vpextrq $1, %xmm3, %rcx nop nop nop nop nop xor $7475, %rdi lea addresses_WC_ht+0x1ed0b, %rax nop nop nop nop mfence mov $0x6162636465666768, %rbp movq %rbp, %xmm4 movups %xmm4, (%rax) nop nop sub %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r9 push %rbp push %rdx push %rsi // Faulty Load lea addresses_WC+0xcc8b, %r10 nop nop nop and $11542, %r9 movaps (%r10), %xmm1 vpextrq $0, %xmm1, %rbp lea oracles, %r9 and $0xff, %rbp shlq $12, %rbp mov (%r9,%rbp,1), %rbp pop %rsi pop %rdx pop %rbp pop %r9 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WC', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}} {'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 */
src/main/antlr/CommandExecutionCtxParser.g4
MarkL4YG/core-framework
8
249
parser grammar CommandExecutionCtxParser; options { tokenVocab = CommandExecutionCtxLexer; } commandExecution : parameter? (WHITESPACE parameter)* | argument? (WHITESPACE argument)* ; parameter : PARAMETER | QUOTED_PARAMETER ; argument : ARGUMENT_HEAD_EQ parameter | ARGUMENT_OPTION ;
test/Fail/MisformedTypeSignature.agda
cruhland/agda
1,989
12259
<reponame>cruhland/agda<gh_stars>1000+ module MisformedTypeSignature where postulate A : Set (f g) : A
src/TemporalOps/Next.agda
DimaSamoz/temporal-type-systems
4
5984
{- Next step operator. -} module TemporalOps.Next where open import CategoryTheory.Categories open import CategoryTheory.Instances.Reactive open import CategoryTheory.Functor open import CategoryTheory.CartesianStrength open import TemporalOps.Common open import Data.Product open import Data.Sum -- One-step delay operator. ▹_ : τ -> τ (▹ A) zero = ⊤ zero (▹ A) (suc n) = A n infixr 70 ▹_ -- Functor instance for ▹ F-▹ : Endofunctor ℝeactive F-▹ = record { omap = ▹_ ; fmap = fmap-▹ ; fmap-id = λ {_ n} -> fmap-▹-id {n = n} ; fmap-∘ = λ {_ _ _ _ _ n} -> fmap-▹-∘ {n = n} ; fmap-cong = fmap-▹-cong } where -- Lifting of ▹ fmap-▹ : {A B : τ} -> A ⇴ B -> ▹ A ⇴ ▹ B fmap-▹ f zero = λ _ → top.tt fmap-▹ f (suc n) = f n -- ▹ preserves identities fmap-▹-id : ∀ {A : τ} {n : ℕ} {a : ▹ A at n} -> (fmap-▹ id at n) a ≡ a fmap-▹-id {n = zero} = refl fmap-▹-id {n = suc n} = refl -- ▹ preserves composition fmap-▹-∘ : ∀ {A B C : τ} {g : B ⇴ C} {f : A ⇴ B} {n : ℕ} {a : ▹ A at n} -> (fmap-▹ (g ∘ f) at n) a ≡ (fmap-▹ g ∘ fmap-▹ f at n) a fmap-▹-∘ {n = zero} = refl fmap-▹-∘ {n = suc n} = refl -- ▹ is congruent fmap-▹-cong : ∀{A B : τ} {f f′ : A ⇴ B} -> ({n : ℕ} {a : A at n} -> f n a ≡ f′ n a) -> ({n : ℕ} {a : ▹ A at n} -> (fmap-▹ f at n) a ≡ (fmap-▹ f′ at n) a) fmap-▹-cong e {zero} = refl fmap-▹-cong e {suc n} = e -- ▹ is a Cartesian functor F-cart-▹ : CartesianFunctor F-▹ ℝeactive-cart ℝeactive-cart F-cart-▹ = record { u = u-▹ ; m = m-▹ ; m-nat₁ = m-nat₁-▹ ; m-nat₂ = m-nat₂-▹ ; associative = λ {A}{B}{C}{n}{a} -> assoc-▹ {A}{B}{C}{n}{a} ; unital-right = λ {A}{n}{a} -> unit-right-▹ {A}{n}{a} ; unital-left = λ {A}{n}{a} -> unit-left-▹ {A}{n}{a} } where open Functor F-▹ u-▹ : ⊤ ⇴ ▹ ⊤ u-▹ zero t = top.tt u-▹ (suc n) t = top.tt m-▹ : ∀(A B : τ) -> ▹ A ⊗ ▹ B ⇴ ▹ (A ⊗ B) m-▹ A B zero _ = top.tt m-▹ A B (suc n) p = p m-nat₁-▹ : ∀{A B C : τ} (f : A ⇴ B) -> fmap (f * id) ∘ m-▹ A C ≈ m-▹ B C ∘ fmap f * id m-nat₁-▹ f {zero} {a} = refl m-nat₁-▹ f {suc n} {a} = refl m-nat₂-▹ : ∀{A B C : τ} (f : A ⇴ B) -> fmap (id * f) ∘ m-▹ C A ≈ m-▹ C B ∘ id * fmap f m-nat₂-▹ f {zero} {a} = refl m-nat₂-▹ f {suc n} {a} = refl assoc-▹ : ∀{A B C : τ} -> m-▹ A (B ⊗ C) ∘ id * m-▹ B C ∘ assoc-right ≈ fmap assoc-right ∘ m-▹ (A ⊗ B) C ∘ m-▹ A B * id assoc-▹ {A} {B} {C} {zero} {a} = refl assoc-▹ {A} {B} {C} {suc n} {(▹A , ▹B) , ▹C} = refl unit-right-▹ : ∀{A : τ} -> fmap unit-right ∘ m-▹ A ⊤ ∘ (id * u-▹) ≈ unit-right unit-right-▹ {A} {zero} {a} = refl unit-right-▹ {A} {suc n} {a} = refl unit-left-▹ : ∀{A : τ} -> fmap unit-left ∘ m-▹ ⊤ A ∘ (u-▹ * id) ≈ unit-left unit-left-▹ {A} {zero} {a} = refl unit-left-▹ {A} {suc n} {a} = refl -- ▹ preserves coproducts sum-▹ : ∀{A B : τ} -> (▹ A ⊕ ▹ B) ⇴ ▹ (A ⊕ B) sum-▹ zero v = top.tt sum-▹ (suc n) v = v
boot.asm
ygos/jwos
0
22943
<gh_stars>0 org 07c00h ; 告诉编译器程序加载到7c00处 mov ax, cs mov ds, ax mov es, ax call DispStr ; 调用显示字符串例程 jmp $ ; 无限循环 DispStr: mov ax, BootMessage mov bp, ax ; ES:BP = 串地址 mov cx, 16 ; CX = 串长度 mov ax, 01301h ; AH = 13, AL = 01h mov bx, 000ch ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮) mov dl, 0 int 10h ; 10h 号中断 ret BootMessage: db "Hello, 中国 jingwu! xxxx" times 510-($-$$) db 0 ; 填充剩下的空间,使生成的二进制代码恰好为512字节 dw 0xaa55 ; 结束标志
programs/oeis/014/A014941.asm
neoneye/loda
22
88944
; A014941: a(1)=1, a(n) = n*23^(n-1) + a(n-1). ; 1,47,1634,50302,1449507,40067565,1076318788,28314922364,733113789893,18744640404523,474436263754662,11908153358721786,296798270974985959,7353307338085529321,181245852206166776456,4447409619636426706168 add $0,1 lpb $0 add $2,$0 sub $0,1 mul $2,23 mov $1,$2 lpe div $1,23 mov $0,$1
src/drivers/zumo_buzzer.ads
yannickmoy/SPARKZumo
6
26019
--pragma SPARK_Mode; with Types; use Types; -- @summary -- Interface to the robot's buzzer -- -- @description -- This is not totally implemented yet. DO NOT USE!! -- package Zumo_Buzzer is -- True if the interface is init'd Initd : Boolean := False; -- Init the interface procedure Init with Pre => not Initd, Post => Initd; -- Play a note at a frequency -- @param Freq the frequency to play -- @param Dur the duration to the play the note -- @param Vol the volume to play the note procedure PlayFrequency (Freq : Frequency; Dur : Duration; Vol : Volume) with Pre => Initd; -- Play a specific note -- @param Note which note to play -- @param Dur the duration of the note to play -- @param Vol the volume of the note to play procedure PlayNote (Note : Integer; Dur : Duration; Vol : Volume) with Pre => Initd; function PlayCheck return Boolean; -- Am I currently playing a note? -- @return true if I am playing a note function IsPlaying return Boolean; -- Enough already! Stop playing loud annoying noises. procedure StopPlaying; end Zumo_Buzzer;
agda/StalinSort.agda
bluoxy/stalin-sort
0
418
module StalinSort where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open import Data.Nat using (ℕ; _≤_; _≤?_) open import Data.List using (List; _∷_; []) open import Relation.Nullary using (Dec; yes; no) -- Implementation of Stalin Sort stalinSort : List ℕ → List ℕ stalinSort [] = [] stalinSort (x ∷ []) = x ∷ [] stalinSort (x ∷ y ∷ zs) with x ≤? y ...| yes m≤n = x ∷ stalinSort (y ∷ zs) ...| no m≰n = stalinSort (x ∷ zs) -- Example Test _ : stalinSort (2 ∷ 3 ∷ 5 ∷ 4 ∷ 6 ∷ []) ≡ (2 ∷ 3 ∷ 5 ∷ 6 ∷ []) _ = refl -------------------- Correctness of Stalin Sort ------------------------- {- This section is only interesting for Logic and Formal Verification enthusiasts. Although I tried to sketch the formal proof that Stalin Sort always returns a Sorted List, there is a point in the proof that I couldn't solve yet. I declared it as a postulate, so somebody can try improving it by giving an lemma that remove the postulate and finish the proof =D -} -- A proof that x is less than all values in xs (thanks to <NAME>) data _≤*_ (x : ℕ) : List ℕ → Set where [] : x ≤* [] _∷_ : ∀ {y ys} → (x ≤ y) → y ≤* ys → x ≤* (y ∷ ys) -- Proof that a list is sorted (thanks to <NAME>) data SortedList : List ℕ → Set where [] : SortedList [] _∷_ : ∀ {x xs} → x ≤* xs → SortedList xs → SortedList (x ∷ xs) -- This is necessary to prove the correctness, I can't find a way yet ... postulate less-stalin : ∀ (x y : ℕ) (zs : List ℕ) → x ≤ y → x ≤* stalinSort (y ∷ zs) -- Proof that Stalin Sort returns a sorted list stalinSort-correctness : ∀ (xs : List ℕ) → SortedList (stalinSort xs) stalinSort-correctness [] = [] stalinSort-correctness (x ∷ []) = [] ∷ [] stalinSort-correctness (x ∷ y ∷ zs) with x ≤? y ...| yes m≤n = less-stalin x y zs m≤n ∷ (stalinSort-correctness (y ∷ zs)) ...| no m≰n = stalinSort-correctness (x ∷ zs)
src/Sym_Expr/symbolic_expressions-solving.adb
fintatarta/eugen
0
3137
with Ada.Text_IO; use Ada.Text_IO; package body Symbolic_Expressions.Solving is procedure Mastica (X : Boolean) is begin null; end Mastica; ---------------------- -- Triangular_Solve -- ---------------------- procedure Triangular_Solve (What : in Equation_Tables.Map; Result : out Variable_Tables.Map; Success : out Boolean) is use Equation_Tables; Verbose : constant Boolean := True; Copy : Equation_Tables.Map := What; Buffer : Equation_Tables.Map; Something_Done : Boolean; Expr : Symbolic_Expression; Pos : Cursor; begin -- for Pos in What.Iterate loop -- Put_Line (">> " & id_image (Key (Pos)) & "=" & Dump (Element (Pos))); -- end loop; -- -- The algorithm used is very simple and general, although maybe -- not the most efficient (since its cost can grow as N*N). We -- iterate over the set of equations, replacing variables according -- to the partial solution stored in Result. If, as a consequence -- of such substitution, an expression becomes constant, it is -- removed from the set of equations and stored in Result. The -- iteration will end when the system becomes empty or when -- no equation are moved from the system to the solution -- Something_Done := True; while (not Copy.Is_Empty) and Something_Done loop Buffer.Clear; Something_Done := False; -- Mastica does nothing, but without this Something_Done -- seems to remain stuck to True. Optimizer bug? Mastica (Something_Done); Pos := Copy.First; while Pos /= No_Element loop Expr := Replace (Element (Pos), Result); if Is_Constant (Expr) then Result.Insert (Key (Pos), Eval (Expr)); Something_Done := True; else Buffer.Insert (Key(Pos), Expr); end if; Next (Pos); end loop; Copy := Buffer; end loop; Success := Copy.Is_Empty; if not Success and Verbose then for Pos in Copy.Iterate loop Put_Line ("-->" & ID_image (Key (Pos)) & "=" & Dump (Element (Pos))); end loop; end if; end Triangular_Solve; end Symbolic_Expressions.Solving;
test/Succeed/non-fol-theorems/AgdaInternalTerms/VarEmptyArgumentsTerm.agda
asr/apia
10
8846
------------------------------------------------------------------------------ -- Testing Agda internal terms: @Var Nat Args@ when @Args = []@ ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module AgdaInternalTerms.VarEmptyArgumentsTerm where postulate D : Set postulate id : (P : D → Set)(x : D) → P x → P x {-# ATP prove id #-}
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_21829_1171.asm
ljhsiun2/medusa
9
82246
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x9c75, %rsi lea addresses_UC_ht+0x1ed11, %rdi nop nop nop nop cmp %rax, %rax mov $80, %rcx rep movsl inc %rax lea addresses_WC_ht+0x6611, %r10 nop nop nop nop nop cmp $51453, %rax mov (%r10), %r9 nop nop inc %rax lea addresses_A_ht+0x6605, %rsi lea addresses_WC_ht+0x1d4c, %rdi nop nop nop sub %rdx, %rdx mov $71, %rcx rep movsb nop nop nop inc %r10 lea addresses_D_ht+0xbb11, %rdx nop nop nop nop nop sub %r9, %r9 and $0xffffffffffffffc0, %rdx vmovntdqa (%rdx), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rax nop nop and %rdx, %rdx lea addresses_WC_ht+0x17e39, %rsi nop cmp $38588, %rdi movb $0x61, (%rsi) nop nop nop inc %rax lea addresses_A_ht+0x1c811, %rcx nop nop nop nop nop add %r9, %r9 mov (%rcx), %ax nop nop add $28080, %rdi lea addresses_A_ht+0x1bd11, %rdx nop nop sub $21441, %r9 movb (%rdx), %r10b sub $65172, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r8 push %rbx push %rdi push %rsi // Faulty Load lea addresses_US+0x1f811, %r11 nop nop nop xor %rbx, %rbx mov (%r11), %r12d lea oracles, %rdi and $0xff, %r12 shlq $12, %r12 mov (%rdi,%r12,1), %r12 pop %rsi pop %rdi pop %rbx pop %r8 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_US', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 4, 'type': 'addresses_US', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WC_ht', 'congruent': 5}} {'dst': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 6}} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 3}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A_ht', 'congruent': 6}} {'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 */
game.asm
t0a5ted/Asm-Platformer
1
96694
<filename>game.asm extern printf %define STAGE_WIDTH 0x50 %define STAGE_HEIGHT 0x20 %define GROUND 'X' %define PLAYER 'O' ; Program variables section .data is_running: dw 1 timespec: tv_sec dq 0 tv_nsec dq 100000000 clear_str: db `\033[H\033[2J` clear_len: equ $ - clear_str curs_x: dq 0 curs_y: dq 0 curs_write_str: db "DEBUG", 0 set_curs_pos_format: db `\033[%u;%uH%s`, 10, 0 draw_ground_count: dq 1 player_x: dq 20 player_y: dq 20 buff: db "asd", 0 file: db "/dev/input/event3", 0 section .text global main main: cmp dword[is_running], 1 je GameLoop jmp Exit GameLoop: call ClearScr mov word[draw_ground_count], 0x1 call DrawGround call DrawPlayer xor ah, ah int 80h cmp ah, 01h je Exit mov rax, 35 mov rdi, timespec xor rsi, rsi syscall jmp main ; Uses: eax DrawPlayer: mov eax, [player_x] mov [curs_x], eax mov eax, [player_y] mov [curs_y], eax mov eax, PLAYER mov [curs_write_str], eax call WriteToXY ret ; Uses: eax DrawGround: mov eax, [draw_ground_count] mov [curs_x], eax mov eax, STAGE_HEIGHT mov [curs_y], eax mov eax, GROUND mov [curs_write_str], eax call WriteToXY mov eax, 0x1 add [draw_ground_count], eax mov al, [draw_ground_count] mov ah, STAGE_WIDTH cmp al, ah jne DrawGround ret Exit: ; exit mov rax, 0x3C mov rdi, 0x0 ; error code 0 syscall ; Clears the screen ClearScr: mov rax, 0x1 ; write syscall mov rdi, 0x1 ; choose stdout mov rsi, clear_str mov rdx, clear_len syscall ret ; Write curs_write_str to Position (curs_x, curs_y) WriteToXY: mov rdi, set_curs_pos_format mov rsi, [curs_y] mov rdx, [curs_x] mov rcx, curs_write_str mov rax, 0 call printf ret
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_2155.asm
ljhsiun2/medusa
9
96370
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r8 push %rax push %rbx lea addresses_UC_ht+0x15068, %r15 nop nop and %rax, %rax vmovups (%r15), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %r14 xor %r8, %r8 lea addresses_A_ht+0x1e20, %r14 nop add $2907, %r8 movups (%r14), %xmm6 vpextrq $0, %xmm6, %rbx nop dec %r15 pop %rbx pop %rax pop %r8 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r14 push %r15 push %rbp push %rcx push %rdx // Load lea addresses_WC+0x194a8, %r14 nop nop nop nop nop sub $14773, %r10 mov (%r14), %cx nop nop nop nop and $30868, %r14 // Store lea addresses_WC+0xc828, %rbp nop nop nop nop cmp $5183, %rdx mov $0x5152535455565758, %r12 movq %r12, (%rbp) nop nop add $56393, %rcx // Faulty Load lea addresses_UC+0x124e8, %rdx nop nop cmp $17237, %rbp mov (%rdx), %r12w lea oracles, %r10 and $0xff, %r12 shlq $12, %r12 mov (%r10,%r12,1), %r12 pop %rdx pop %rcx pop %rbp pop %r15 pop %r14 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC', 'same': False, 'size': 2, 'congruent': 5, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_UC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
src/Categories/Functor/Core.agda
laMudri/agda-categories
0
5865
<reponame>laMudri/agda-categories {-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Functor.Core where open import Level private variable o ℓ e o′ ℓ′ e′ : Level record Functor (C : Category o ℓ e) (D : Category o′ ℓ′ e′) : Set (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′ ⊔ e′) where eta-equality private module C = Category C private module D = Category D field F₀ : C.Obj → D.Obj F₁ : ∀ {A B} (f : C [ A , B ]) → D [ F₀ A , F₀ B ] identity : ∀ {A} → D [ F₁ (C.id {A}) ≈ D.id ] homomorphism : ∀ {X Y Z} {f : C [ X , Y ]} {g : C [ Y , Z ]} → D [ F₁ (C [ g ∘ f ]) ≈ D [ F₁ g ∘ F₁ f ] ] F-resp-≈ : ∀ {A B} {f g : C [ A , B ]} → C [ f ≈ g ] → D [ F₁ f ≈ F₁ g ] -- nice shorthands ₀ = F₀ ₁ = F₁ op : Functor C.op D.op op = record { F₀ = F₀ ; F₁ = F₁ ; identity = identity ; homomorphism = homomorphism ; F-resp-≈ = F-resp-≈ }
src/devices/SAMD51/ATSAMD51G18A/sam-clock_generator-ids.ads
Fabien-Chouteau/samd51-hal
1
11193
-- Generated by a script from an "avr tools device file" (atdf) package SAM.Clock_Generator.IDs is TRACE : constant Peripheral_Id := 47; AC : constant Peripheral_Id := 32; ADC0 : constant Peripheral_Id := 40; ADC1 : constant Peripheral_Id := 41; CCL : constant Peripheral_Id := 33; DAC : constant Peripheral_Id := 42; EIC : constant Peripheral_Id := 4; EVSYS_0 : constant Peripheral_Id := 11; EVSYS_1 : constant Peripheral_Id := 12; EVSYS_2 : constant Peripheral_Id := 13; EVSYS_3 : constant Peripheral_Id := 14; EVSYS_4 : constant Peripheral_Id := 15; EVSYS_5 : constant Peripheral_Id := 16; EVSYS_6 : constant Peripheral_Id := 17; EVSYS_7 : constant Peripheral_Id := 18; EVSYS_8 : constant Peripheral_Id := 19; EVSYS_9 : constant Peripheral_Id := 20; EVSYS_10 : constant Peripheral_Id := 21; EVSYS_11 : constant Peripheral_Id := 22; FREQM_MSR : constant Peripheral_Id := 5; FREQM_REF : constant Peripheral_Id := 6; OSCCTRL_DFLL48 : constant Peripheral_Id := 0; OSCCTRL_FDPLL0 : constant Peripheral_Id := 1; OSCCTRL_FDPLL1 : constant Peripheral_Id := 2; OSCCTRL_FDPLL032K : constant Peripheral_Id := 3; OSCCTRL_FDPLL132K : constant Peripheral_Id := 3; PDEC : constant Peripheral_Id := 31; SDHC0 : constant Peripheral_Id := 45; SDHC0_SLOW : constant Peripheral_Id := 3; SERCOM0_CORE : constant Peripheral_Id := 7; SERCOM0_SLOW : constant Peripheral_Id := 3; SERCOM1_CORE : constant Peripheral_Id := 8; SERCOM1_SLOW : constant Peripheral_Id := 3; SERCOM2_CORE : constant Peripheral_Id := 23; SERCOM2_SLOW : constant Peripheral_Id := 3; SERCOM3_CORE : constant Peripheral_Id := 24; SERCOM3_SLOW : constant Peripheral_Id := 3; SERCOM4_CORE : constant Peripheral_Id := 34; SERCOM4_SLOW : constant Peripheral_Id := 3; SERCOM5_CORE : constant Peripheral_Id := 35; SERCOM5_SLOW : constant Peripheral_Id := 3; TC0 : constant Peripheral_Id := 9; TC1 : constant Peripheral_Id := 9; TC2 : constant Peripheral_Id := 26; TC3 : constant Peripheral_Id := 26; TCC0 : constant Peripheral_Id := 25; TCC1 : constant Peripheral_Id := 25; TCC2 : constant Peripheral_Id := 29; USB : constant Peripheral_Id := 10; end SAM.Clock_Generator.IDs;
Computer_Science/8_Assembly_Level_Programming/p02_Input_Output.asm
Soumya14022002/Algos-for-all-Amigos
10
90881
<filename>Computer_Science/8_Assembly_Level_Programming/p02_Input_Output.asm .model small .data .code mov ah, 1h ; This statement is for reading a character. It saves the character in register al int 21h ; DOS interrupt. The system waits till the character gets input mov dl, al ; Moves (copies) the character (stored in al) to dl mov ah, 2h ; Prints the value in register dl int 21h ; Initiates the display end
test/asset/agda-stdlib-1.0/Algebra/Solver/Monoid.agda
omega12345/agda-mode
0
10576
<reponame>omega12345/agda-mode ------------------------------------------------------------------------ -- The Agda standard library -- -- Solver for monoid equalities ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra module Algebra.Solver.Monoid {m₁ m₂} (M : Monoid m₁ m₂) where open import Data.Fin as Fin hiding (_≟_) import Data.Fin.Properties as Fin open import Data.List.Base hiding (lookup) import Data.List.Relation.Binary.Equality.DecPropositional as ListEq open import Data.Maybe as Maybe using (Maybe; decToMaybe; From-just; from-just) open import Data.Nat.Base using (ℕ) open import Data.Product open import Data.Vec using (Vec; lookup) open import Function using (_∘_; _$_) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality as P using (_≡_) import Relation.Binary.Reflection open import Relation.Nullary import Relation.Nullary.Decidable as Dec open Monoid M open import Relation.Binary.Reasoning.Setoid setoid ------------------------------------------------------------------------ -- Monoid expressions -- There is one constructor for every operation, plus one for -- variables; there may be at most n variables. infixr 5 _⊕_ data Expr (n : ℕ) : Set where var : Fin n → Expr n id : Expr n _⊕_ : Expr n → Expr n → Expr n -- An environment contains one value for every variable. Env : ℕ → Set _ Env n = Vec Carrier n -- The semantics of an expression is a function from an environment to -- a value. ⟦_⟧ : ∀ {n} → Expr n → Env n → Carrier ⟦ var x ⟧ ρ = lookup ρ x ⟦ id ⟧ ρ = ε ⟦ e₁ ⊕ e₂ ⟧ ρ = ⟦ e₁ ⟧ ρ ∙ ⟦ e₂ ⟧ ρ ------------------------------------------------------------------------ -- Normal forms -- A normal form is a list of variables. Normal : ℕ → Set Normal n = List (Fin n) -- The semantics of a normal form. ⟦_⟧⇓ : ∀ {n} → Normal n → Env n → Carrier ⟦ [] ⟧⇓ ρ = ε ⟦ x ∷ nf ⟧⇓ ρ = lookup ρ x ∙ ⟦ nf ⟧⇓ ρ -- A normaliser. normalise : ∀ {n} → Expr n → Normal n normalise (var x) = x ∷ [] normalise id = [] normalise (e₁ ⊕ e₂) = normalise e₁ ++ normalise e₂ -- The normaliser is homomorphic with respect to _++_/_∙_. homomorphic : ∀ {n} (nf₁ nf₂ : Normal n) (ρ : Env n) → ⟦ nf₁ ++ nf₂ ⟧⇓ ρ ≈ (⟦ nf₁ ⟧⇓ ρ ∙ ⟦ nf₂ ⟧⇓ ρ) homomorphic [] nf₂ ρ = begin ⟦ nf₂ ⟧⇓ ρ ≈⟨ sym $ identityˡ _ ⟩ ε ∙ ⟦ nf₂ ⟧⇓ ρ ∎ homomorphic (x ∷ nf₁) nf₂ ρ = begin lookup ρ x ∙ ⟦ nf₁ ++ nf₂ ⟧⇓ ρ ≈⟨ ∙-congˡ (homomorphic nf₁ nf₂ ρ) ⟩ lookup ρ x ∙ (⟦ nf₁ ⟧⇓ ρ ∙ ⟦ nf₂ ⟧⇓ ρ) ≈⟨ sym $ assoc _ _ _ ⟩ lookup ρ x ∙ ⟦ nf₁ ⟧⇓ ρ ∙ ⟦ nf₂ ⟧⇓ ρ ∎ -- The normaliser preserves the semantics of the expression. normalise-correct : ∀ {n} (e : Expr n) (ρ : Env n) → ⟦ normalise e ⟧⇓ ρ ≈ ⟦ e ⟧ ρ normalise-correct (var x) ρ = begin lookup ρ x ∙ ε ≈⟨ identityʳ _ ⟩ lookup ρ x ∎ normalise-correct id ρ = begin ε ∎ normalise-correct (e₁ ⊕ e₂) ρ = begin ⟦ normalise e₁ ++ normalise e₂ ⟧⇓ ρ ≈⟨ homomorphic (normalise e₁) (normalise e₂) ρ ⟩ ⟦ normalise e₁ ⟧⇓ ρ ∙ ⟦ normalise e₂ ⟧⇓ ρ ≈⟨ ∙-cong (normalise-correct e₁ ρ) (normalise-correct e₂ ρ) ⟩ ⟦ e₁ ⟧ ρ ∙ ⟦ e₂ ⟧ ρ ∎ ------------------------------------------------------------------------ -- "Tactics" open module R = Relation.Binary.Reflection setoid var ⟦_⟧ (⟦_⟧⇓ ∘ normalise) normalise-correct public using (solve; _⊜_) -- We can decide if two normal forms are /syntactically/ equal. infix 5 _≟_ _≟_ : ∀ {n} → Decidable {A = Normal n} _≡_ nf₁ ≟ nf₂ = Dec.map′ ≋⇒≡ ≡⇒≋ (nf₁ ≋? nf₂) where open ListEq Fin._≟_ -- We can also give a sound, but not necessarily complete, procedure -- for determining if two expressions have the same semantics. prove′ : ∀ {n} (e₁ e₂ : Expr n) → Maybe (∀ ρ → ⟦ e₁ ⟧ ρ ≈ ⟦ e₂ ⟧ ρ) prove′ e₁ e₂ = Maybe.map lemma $ decToMaybe (normalise e₁ ≟ normalise e₂) where lemma : normalise e₁ ≡ normalise e₂ → ∀ ρ → ⟦ e₁ ⟧ ρ ≈ ⟦ e₂ ⟧ ρ lemma eq ρ = R.prove ρ e₁ e₂ (begin ⟦ normalise e₁ ⟧⇓ ρ ≡⟨ P.cong (λ e → ⟦ e ⟧⇓ ρ) eq ⟩ ⟦ normalise e₂ ⟧⇓ ρ ∎) -- This procedure can be combined with from-just. prove : ∀ n (es : Expr n × Expr n) → From-just (uncurry prove′ es) prove _ = from-just ∘ uncurry prove′
programs/oeis/288/A288132.asm
karttu/loda
0
11844
<gh_stars>0 ; A288132: Fixed point of the mapping 00->0010, 1->11, starting with 00. ; 0,0,1,0,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 lpb $0,1 trn $0,$3 add $1,2 sub $1,$0 trn $0,1 trn $1,1 mov $2,$3 trn $2,1 add $2,1 add $3,$2 lpe
10 Adapted from others/11 Rich Walsh/02 Durations/7 Create adjustable autofollow.applescript
streth11/Qlab-Scripts
0
750
<reponame>streth11/Qlab-Scripts<filename>10 Adapted from others/11 Rich Walsh/02 Durations/7 Create adjustable autofollow.applescript -- @description Create adjustable autofollow -- @author <NAME> -- @link bensmithsound.uk -- @source <NAME> -- @version 1.0 -- @testedmacos 10.13.6 -- @testedqlab 4.6.9 -- @about Makes the current cue autocontinue with a post-wait of the duration of the cue -- @separateprocess FALSE -- @changelog -- v1.0 + init -- USER DEFINED VARIABLES ----------------- set userDelta to 0 -- Change this to a negative value to have cues overlap ---------- END OF USER DEFINED VARIABLES -- -- RUN SCRIPT ----------------------------- repeat with eachCue in (selected of front workspace as list) set post wait of eachCue to ((duration of eachCue) + userDelta) set continue mode of eachCue to auto_continue end repeat
programs/oeis/008/A008669.asm
karttu/loda
0
94327
<gh_stars>0 ; A008669: Molien series for 4-dimensional complex reflection group of order 7680 (in powers of x^4). ; 1,1,2,3,4,6,8,10,13,16,20,24,29,34,40,47,54,62,71,80,91,102,114,127,141,156,172,189,207,226,247,268,291,315,340,367,395,424,455,487,521,556,593,631,671,713,756,801,848,896,947,999,1053,1109,1167,1227,1289,1353,1419,1487,1558,1630,1705,1782,1861,1943,2027,2113,2202,2293,2387,2483,2582,2683,2787,2894,3003,3115,3230,3347,3468,3591,3717,3846,3978,4113,4251,4392,4536,4683,4834,4987,5144,5304,5467,5634,5804,5977,6154,6334,6518,6705,6896,7090,7288,7490,7695,7904,8117,8333,8554,8778,9006,9238,9474,9714,9958,10206,10458,10714,10975,11239,11508,11781,12058,12340,12626,12916,13211,13510,13814,14122,14435,14752,15074,15401,15732,16068,16409,16754,17105,17460,17820,18185,18555,18930,19310,19695,20085,20480,20881,21286,21697,22113,22534,22961,23393,23830,24273,24721,25175,25634,26099,26569,27045,27527,28014,28507,29006,29510,30021,30537,31059,31587,32121,32661,33207,33759,34317,34881,35452,36028,36611,37200,37795,38397,39005,39619,40240,40867,41501,42141,42788,43441,44101,44768,45441,46121,46808,47501,48202,48909,49623,50344,51072,51807,52549,53298,54054,54817,55588,56365,57150,57942,58741,59548,60362,61183,62012,62848,63692,64543,65402,66268,67142,68024,68913,69810,70715,71627,72548,73476,74412,75356,76308,77268,78236,79212,80196,81188,82189,83197,84214,85239,86272,87314,88364,89422,90489,91564 mov $2,$0 add $2,1 mov $4,$0 lpb $2,1 mov $0,$4 sub $2,1 sub $0,$2 cal $0,25795 ; Expansion of 1/((1-x^2)*(1-x^3)*(1-x^5)). mov $3,$0 add $3,2 mul $3,5 sub $3,10 div $3,5 add $1,$3 lpe
source/vampire-r3-user_page.ads
ytomino/vampire
1
12093
-- The Village of Vampire by YT, このソースコードはNYSLです with Tabula.Users; procedure Vampire.R3.User_Page ( Output : not null access Ada.Streams.Root_Stream_Type'Class; Form : in Forms.Root_Form_Type'Class; Template : in String; Summaries : in Tabula.Villages.Lists.Summary_Maps.Map; User_Id : in String; User_Password : in String; User_Info : in Users.User_Info);
src/Functoriality.agda
vituscze/HoTT-lectures
0
16134
<filename>src/Functoriality.agda {-# OPTIONS --without-K #-} module Functoriality {a} {A : Set a} where open import PathOperations open import Types ap⁻¹ : ∀ {b} {B : Set b} {x y : A} (f : A → B) (p : x ≡ y) → ap f (p ⁻¹) ≡ (ap f p) ⁻¹ ap⁻¹ f = J (λ _ _ p → ap f (p ⁻¹) ≡ ap f p ⁻¹) (λ _ → refl) _ _ ap· : ∀ {b} {B : Set b} {x y z : A} (f : A → B) (p : x ≡ y) (q : y ≡ z) → ap f (p · q) ≡ ap f p · ap f q ap· {z = z} f = J (λ _ y p → (q : y ≡ z) → ap f (p · q) ≡ ap f p · ap f q) (λ _ _ → refl) _ _ ap-id : {x y : A} (p : x ≡ y) → ap id p ≡ p ap-id = J (λ _ _ p → ap id p ≡ p) (λ _ → refl) _ _ ap-∘ : ∀ {b c} {B : Set b} {C : Set c} {x y : A} (f : B → C) (g : A → B) (p : x ≡ y) → ap (f ∘ g) p ≡ ap f (ap g p) ap-∘ f g = J (λ _ _ p → ap (f ∘ g) p ≡ ap f (ap g p)) (λ _ → refl) _ _
src/gl/implementation/gl-enums-indexes.adb
Roldak/OpenGLAda
79
3578
<filename>src/gl/implementation/gl-enums-indexes.adb -- part of OpenGLAda, (c) 2017 <NAME> -- released under the terms of the MIT license, see the file "COPYING" package body GL.Enums.Indexes is function Representation (Value : Index) return Int is begin return Min_Representation + Value; end Representation; function Value (Representation : Int) return Index is begin return Representation - Min_Representation; end Value; end GL.Enums.Indexes;
subs/listinit.asm
DigitalMars/optlink
28
171429
TITLE LISTINIT - Copyright (c) SLR Systems 1994 INCLUDE MACROS INCLUDE IO_STRUC PUBLIC LIST_INIT .DATA EXTERNDEF _FILE_LIST_GARRAY:STD_PTR_S,OUTFILE_GARRAY:STD_PTR_S EXTERNDEF LOUTALL:DWORD,IMP_OUTALL:DWORD .CODE ROOT_TEXT EXTERNDEF _open_output:proc,_flush_buffer:proc,LST_OUT:PROC,ROOT_RET:PROC,IMP_OUT:PROC LIST_INIT PROC ; ;EAX IS OUTFILE GINDEX ; ;RETURNS: ; EAX IS OUTPUT DEVICE ; ;SET UP OUTPUT STUFF FOR LISTING ;FIRST, IF LISTING DEVICE IS NUL, SET JMP TABLE TO 'RET' ;ELSE IF DEVICE IS CONSOLE, STE JMP TABLE TO JUST OUTPUT LINE ; CALL LIST_INIT1 MOV LOUTALL,EAX MOV EAX,ECX RET LIST_INIT ENDP if fg_segm PUBLIC IMP_INIT IMP_INIT PROC ; ; ; CALL LIST_INIT1 CMP EAX,OFF LST_OUT JNZ L1$ MOV EAX,OFF IMP_OUT L1$: MOV IMP_OUTALL,EAX MOV EAX,ECX RET IMP_INIT ENDP endif if fg_rom PUBLIC BINOUT_INIT BINOUT_INIT PROC CALL LIST_INIT1 CMP CX,OFF LST_OUT JNZ 1$ LEA CX,BIN_OUT 1$: MOV BOUTALL.OFFS,CX if @CodeSize MOV BOUTALL.SEGM,AX endif RET BINOUT_INIT ENDP endif LIST_INIT1 PROC NEAR ; ;EAX IS OUTFILE GINDEX ; ;RETURNS: ; EAX IS OUTPUT ROUTINE ; ECX IS OUTPUT DEVICE ; TEST EAX,EAX JZ L1$ CONVERT EAX,EAX,OUTFILE_GARRAY MOV EAX,[EAX].OUTFILE_STRUCT._OF_FILE_LIST_GINDEX MOV ECX,EAX CONVERT EAX,EAX,_FILE_LIST_GARRAY TEST [EAX].NFN_STRUCT.NFN_FLAGS,MASK NFN_NUL JZ L5$ L1$: MOV EAX,OFF ROOT_RET XOR ECX,ECX RET L5$: ; ;NEED TO ALLOCATE BUFFER SPACE LIKE OBJ FILE ; MOV EAX,ECX push EAX call _open_output add ESP,4 MOV [EAX].MYO_STRUCT.MYO_FLUSHBUF,OFF _flush_buffer mov ECX,EAX MOV EAX,OFF LST_OUT RET LIST_INIT1 ENDP END
LISTA3/railway.ads
druzzt/NIEZAWODNE_SYSTEMY_INFORMATYCZNE
0
17072
package Railway with SPARK_Mode is type One_Signal_State is (Red, Green); type Route_Type is (Route_Left_Middle, -- lewy do srodkowego Route_Middle_Right, -- srodkowy do prawego Route_Right_Middle, -- prawy do srodkowego Route_Middle_Left, -- srodkowy do lewego Route_Enter_Left, -- wjazd z lewej Route_Leave_Right, -- wyjazd z prawej Route_Enter_Right, -- wjazd z prawej Route_Leave_Left); -- wyjazd z lewej type One_Segment_State is (Occupied_Standing, -- zajety, stoi Occupied_Moving_Left, -- zajety, w lewo Occupied_Moving_Right, -- zajety, w prawo Reserved_Moving_From_Left, -- resvd, mv z lew Reserved_Moving_From_Right, -- rsvd, mv z praw Free); -- WOLNE type Segment_State_Type is record Left, -- lewy segment Middle, -- srodkowy segment Right : One_Segment_State; -- prawy segment end record; type Signal_State_Type is record Left_Middle, -- lewy do srodkowego stan Middle_Left, -- srodkowy do lewego stan Middle_Right, -- srodkowy do prawego stan Right_Middle: One_Signal_State; -- prawy do srodkowego stan end record; Segment_State : Segment_State_Type := (others => Free); -- stan segmentu Signal_State : Signal_State_Type := (others => Red); -- stan sygnalizatora function Correct_Signals return Boolean is ( (if Signal_State.Left_Middle = Green then Segment_State.Left = Occupied_Moving_Right and Segment_State.Middle = Reserved_Moving_From_Left) and then (if Signal_state.Middle_Left = Green then Segment_State.Middle = Occupied_Moving_Left and Segment_State.Left = Reserved_Moving_From_Right) and then (if Signal_state.Middle_Right = Green then Segment_State.Middle = Occupied_Moving_Right and Segment_State.Right = Reserved_Moving_From_Left) and then (if Signal_state.Right_Middle = Green then Segment_State.Right = Occupied_Moving_Left and Segment_State.Middle = Reserved_Moving_From_Right)); function Correct_Segments return Boolean is ( (if Segment_State.Left /= Reserved_Moving_From_Right then Signal_State.Middle_Left = Red) and (if Segment_State.Middle /= Reserved_Moving_From_Left then Signal_State.Left_Middle = Red) and (if Segment_State.Middle /= Reserved_Moving_From_Right then Signal_State.Right_Middle = Red) and (if Segment_State.Right /= Reserved_Moving_From_Left then Signal_State.Middle_Right = Red)); procedure Open_Route (Route: in Route_Type; Success: out Boolean) with Global => (In_Out => (Segment_State, Signal_State)), Pre => Correct_Signals and Correct_Segments, Depends => ((Segment_State, Success) => (Route, Segment_State), Signal_State => (Segment_State, Route, Signal_State)), Post => Correct_Signals and Correct_Segments; procedure Move_Train (Route: in Route_Type; Success: out Boolean) with Global => (In_Out => (Segment_State, Signal_State)), Pre => Correct_Signals and Correct_Segments, Depends => ((Segment_State, Success) => (Route, Segment_State), Signal_State => (Segment_State, Route, Signal_State)), Post => Correct_Signals and Correct_Segments; --Just to Open_Route and then if possible Move_Train. procedure Train (Route : in Route_Type; retval : in out Boolean); end Railway;
test/assembler/push_i16_v/data/program.asm
jfitz/virtual-processor
0
243730
MAIN: PUSH I16 14920 OUT OUT EXIT
src/clic-config-load.ads
alire-project/clic
9
23622
with TOML; package CLIC.Config.Load is procedure From_TOML (C : in out CLIC.Config.Instance; Origin : String; Path : String; Check : Check_Import := null); function Load_TOML_File (Path : String) return TOML.TOML_Value; end CLIC.Config.Load;
nicolai/anonymousExistence/Sec8taboos.agda
nicolaikraus/HoTT-Agda
1
4956
<reponame>nicolaikraus/HoTT-Agda<gh_stars>1-10 {-# OPTIONS --without-K #-} open import library.Basics hiding (Type ; Σ ; S) open import library.types.Sigma open import Sec2preliminaries open import Sec3hedberg open import Sec4hasConstToSplit open import Sec5factorConst open import Sec6hasConstToDecEq open import Sec7populatedness module Sec8taboos where -- Subsection 8.1 all-hasConst : Type₁ all-hasConst = (X : Type) → hasConst X -- Theorem 8.1 module functional-subrelation (ac : all-hasConst) (X : Type) (R : X × X → Type) where all-sets : (Y : Type) → is-set Y all-sets Y = pathHasConst→isSet (λ y₁ y₂ → ac _) R₋ : (x : X) → Type R₋ x = Σ X λ y → R(x , y) k : (x : X) → (R₋ x) → (R₋ x) k x = fst (ac _) kc : (x : X) → const (k x) kc x = snd (ac _) S : X × X → Type S (x , y) = Σ (R(x , y)) λ a → (y , a) == k x (y , a) -- the relation S S₋ : (x : X) → Type S₋ x = Σ X λ y → S(x , y) -- fix kₓ is equivalent to Sₓ -- This is just Σ-assoc. We try to make it more readable by adding some (trivial) steps. fixk-S : (x : X) → (fix (k x)) ≃ S₋ x fixk-S x = (fix (k x)) ≃⟨ ide _ ⟩ (Σ (Σ X λ y → R(x , y)) λ a → a == k x a) ≃⟨ Σ-assoc ⟩ (Σ X λ y → Σ (R(x , y)) λ r → (y , r) == k x (y , r)) ≃⟨ ide _ ⟩ (S₋ x) ≃∎ -- claim (0) subrelation : (x y : X) → S(x , y) → R(x , y) subrelation x y (r , _) = r -- claim (1) prop-Sx : (x : X) → is-prop (S₋ x) prop-Sx x = equiv-preserves-level {A = fix (k x)} {B = (S₋ x)} (fixk-S x) (fixed-point _ (kc x)) -- claim (2) same-domain : (x : X) → (R₋ x) ↔ (S₋ x) same-domain x = rs , sr where rs : (R₋ x) → (S₋ x) rs a = –> (fixk-S x) (to-fix (k x) (kc x) a) sr : (S₋ x) → (R₋ x) sr (y , r , _) = y , r -- claim (3) prop-S : (x y : X) → is-prop (S (x , y)) prop-S x y = all-paths-is-prop all-paths where all-paths : (s₁ s₂ : S(x , y)) → s₁ == s₂ all-paths s₁ s₂ = ss where yss : (y , s₁) == (y , s₂) yss = prop-has-all-paths (prop-Sx x) _ _ ss : s₁ == s₂ ss = set-lemma (all-sets _) y s₁ s₂ yss -- intermediate definition -- see the caveat about the notion 'epimorphism' in the article is-split-epimorphism : {U V : Type} → (U → V) → Type is-split-epimorphism {U} {V} e = Σ (V → U) λ s → (v : V) → e (s v) == v is-epimorphism : {U V : Type} → (U → V) → Type₁ is-epimorphism {U} {V} e = (W : Type) → (f g : V → W) → ((u : U) → f (e u) == g (e u)) → (v : V) → f v == g v -- Lemma 8.2 path-trunc-epi→set : {Y : Type} → ((y₁ y₂ : Y) → is-epimorphism (∣_∣ {X = y₁ == y₂})) → is-set Y path-trunc-epi→set {Y} path-epi = reminder special-case where f : (y₁ y₂ : Y) → Trunc (y₁ == y₂) → Y f y₁ _ _ = y₁ g : (y₁ y₂ : Y) → Trunc (y₁ == y₂) → Y g _ y₂ _ = y₂ special-case : (y₁ y₂ : Y) → Trunc (y₁ == y₂) → y₁ == y₂ special-case y₁ y₂ = path-epi y₁ y₂ Y (f y₁ y₂) (g y₁ y₂) (idf _) reminder : hseparated Y → is-set Y reminder = fst set-characterizations ∘ snd (snd set-characterizations) -- Theorem 8.3 (1) all-split→all-deceq : ((X : Type) → is-split-epimorphism (∣_∣ {X = X})) → (X : Type) → has-dec-eq X all-split→all-deceq all-split = all-hasConst→dec-eq ac where ac : (X : Type) → hasConst X ac X = snd hasConst↔splitSup (fst (all-split X)) -- Theorem 8.3 (2) all-epi→all-set : ((X : Type) → is-epimorphism (∣_∣ {X = X})) → (X : Type) → is-set X all-epi→all-set all-epi X = path-trunc-epi→set (λ y₁ y₂ → all-epi (y₁ == y₂)) -- Subsection 8.2 -- Lemma 8.4, first proof pop-splitSup-1 : {X : Type} → Pop (splitSup X) pop-splitSup-1 {X} f c = to-fix f c (hasConst→splitSup (g , gc)) where g : X → X g x = f (λ _ → x) ∣ x ∣ gc : const g gc x₁ x₂ = g x₁ =⟨ idp ⟩ f (λ _ → x₁) ∣ x₁ ∣ =⟨ ap (λ k → k ∣ x₁ ∣) (c (λ _ → x₁) (λ _ → x₂)) ⟩ f (λ _ → x₂) ∣ x₁ ∣ =⟨ ap (f (λ _ → x₂)) (prop-has-all-paths (h-tr X) ∣ x₁ ∣ ∣ x₂ ∣) ⟩ f (λ _ → x₂) ∣ x₂ ∣ =⟨ idp ⟩ g x₂ ∎ -- Lemma 8.4, second proof pop-splitSup-2 : {X : Type} → Pop (splitSup X) pop-splitSup-2 {X} = snd (pop-alt₂ {splitSup X}) get-P where get-P : (P : Type) → is-prop P → splitSup X ↔ P → P get-P P pp (hstp , phst) = hstp free-hst where xp : X → P xp x = hstp (λ _ → x) zp : Trunc X → P zp = rec pp xp free-hst : splitSup X free-hst z = phst (zp z) z -- Lemma 8.5, third proof pop-splitSup-3 : {X : Type} → Pop (splitSup X) pop-splitSup-3 {X} = snd pop-alt translation where translation-aux : splitSup (splitSup X) → splitSup X translation-aux = λ hsthst z → hsthst (trunc-functorial {X = X} {Y = splitSup X} (λ x _ → x) z) z translation : Trunc (splitSup (splitSup X)) → Trunc (splitSup X) translation = trunc-functorial translation-aux -- Theorem 8.5 module thm85 where One = (X : Type) → Pop X → Trunc X Two = (X : Type) → Trunc (splitSup X) Three = (P : Type) → is-prop P → (Y : P → Type) → ((p : P) → Trunc (Y p)) → Trunc ((p : P) → Y p) Four = (X Y : Type) → (X → Y) → (Pop X → Pop Y) One→Two : One → Two One→Two poptr X = poptr (splitSup X) pop-splitSup-1 Two→One : Two → One Two→One trhst X pop = fst pop-alt pop (trhst X) One→Four : One → Four One→Four poptr X Y f = Trunc→Pop ∘ (trunc-functorial f) ∘ (poptr X) Four→One : Four → One Four→One funct X px = prop-pop (h-tr _) pz where pz : Pop (Trunc X) pz = funct X (Trunc X) ∣_∣ px -- only very slightly different to the proof in the article One→Three : One → Three One→Three poptr P pp Y = λ py → poptr _ (snd pop-alt' (λ hst p₀ → hst (contr-trick p₀ py) p₀)) where contr-trick : (p₀ : P) → ((p : P) → Trunc (Y p)) → Trunc ((p : P) → Y p) contr-trick p₀ py = rec {X = Y p₀} {P = Trunc ((p : P) → Y p)} (h-tr _) (λ y₀ → ∣ <– (thm55aux.neutral-contr-exp {P = P} {Y = Y} pp p₀) y₀ ∣) (py p₀) Three→Two : Three → Two Three→Two proj X = proj (Trunc X) (h-tr _) (λ _ → X) (idf _) -- Subsection 8.3 -- Some very simple lemmata -- If P is a proposition, so is P + ¬ P dec-is-prop : {P : Type} → (Funext {X = P} {Y = Empty}) → is-prop P → is-prop (P + ¬ P) dec-is-prop {P} fext pp = all-paths-is-prop (λ { (inl p₁) (inl p₂) → ap inl (prop-has-all-paths pp _ _) ; (inl p₁) (inr np₂) → Empty-elim {A = λ _ → inl p₁ == inr np₂} (np₂ p₁) ; (inr np₁) (inl p₂) → Empty-elim {A = λ _ → inr np₁ == inl p₂} (np₁ p₂) ; (inr np₁) (inr np₂) → ap inr (fext np₁ np₂ (λ p → prop-has-all-paths (λ ()) _ _)) }) -- Theorem 8.7 nonempty-pop→lem : ((X : Type) → Funext {X} {Empty}) → ((X : Type) → (¬(¬ X) → Pop X)) → LEM nonempty-pop→lem fext nn-pop P pp = from-fix {X = dec} (idf _) (nn-pop dec nndec (idf _) idc) where dec : Type dec = P + ¬ P idc : const (idf dec) idc = λ _ _ → prop-has-all-paths (dec-is-prop {P} (fext P) pp) _ _ nndec : ¬(¬ dec) nndec ndec = (λ np → ndec (inr np)) λ p → ndec (inl p) -- Corollary 8.8 nonempty-pop↔lem : ((X : Type) → Funext {X} {Empty}) → ((X : Type) → (¬(¬ X) → Pop X)) ↔₁₁ LEM nonempty-pop↔lem fext = nonempty-pop→lem fext , other where other : LEM → ((X : Type) → (¬(¬ X) → Pop X)) other lem X nnX = p where pnp : Pop X + ¬ (Pop X) pnp = lem (Pop X) pop-property₂ p : Pop X p = match pnp withl idf _ withr (λ np → Empty-elim {A = λ _ → Pop X} (nnX (λ x → np (pop-property₁ x))))
alloy4fun_models/trainstlt/models/14/J2gTrHSs7uMtYMqAo.als
Kaixi26/org.alloytools.alloy
0
5160
open main pred idJ2gTrHSs7uMtYMqAo_prop15 { eventually always some pos =>(pos != pos') } pred __repair { idJ2gTrHSs7uMtYMqAo_prop15 } check __repair { idJ2gTrHSs7uMtYMqAo_prop15 <=> prop15o }
oeis/158/A158863.asm
neoneye/loda-programs
11
88626
<gh_stars>10-100 ; A158863: Maximal excess of a 3-normalized Hadamard matrix of order 4n. ; Submitted by <NAME> ; 4,8,36,32,76,72,124,128,180,200,244,288,316 mov $3,$0 mov $5,$0 gcd $0,2 mov $1,$5 add $1,$0 div $1,$0 mul $3,$0 mov $4,$5 div $4,2 mul $1,$4 sub $1,$5 mov $2,$3 mul $2,2 add $1,$2 mov $0,$1 mul $0,4 add $0,4
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xca_notsx.log_21829_401.asm
ljhsiun2/medusa
9
28714
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r15 push %r8 push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_WT_ht+0xb4c1, %rbp clflush (%rbp) nop nop nop nop nop cmp %r15, %r15 movl $0x61626364, (%rbp) nop nop nop nop nop and %rbx, %rbx lea addresses_WT_ht+0x11e21, %rdi clflush (%rdi) nop nop nop sub %r12, %r12 mov (%rdi), %r11 sub $21383, %rbx lea addresses_WT_ht+0x1f61, %rsi lea addresses_A_ht+0x12821, %rdi nop nop nop sub %r12, %r12 mov $117, %rcx rep movsw nop nop nop nop sub %rbp, %rbp lea addresses_A_ht+0x4e59, %r12 nop xor $15309, %r8 mov (%r12), %cx nop nop nop nop add %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %r8 push %rax push %rsi // Faulty Load mov $0x4163210000000421, %rsi and %r8, %r8 mov (%rsi), %r13d lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rsi pop %rax pop %r8 pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_NC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 3}} {'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 */
test/Succeed/Issue204/Dependency.agda
shlevy/agda
1,989
12448
module Issue204.Dependency where open import Common.Level public renaming (lsuc to suc) record R (ℓ : Level) : Set (suc ℓ) where data D (ℓ : Level) : Set (suc ℓ) where module M {ℓ : Level} (d : D ℓ) where
puzzle_02/src/puzzle_02.adb
AdaForge/Advent_of_Code_2020
0
11817
procedure Puzzle_02 is begin null; end Puzzle_02;
dcf/src/dcf-unzip.ads
onox/dcf-ada
5
12612
-- SPDX-License-Identifier: MIT -- -- Copyright (c) 1999 - 2018 <NAME> -- SWITZERLAND -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal -- in the Software without restriction, including without limitation the rights -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -- copies of the Software, and to permit persons to whom the Software is -- furnished to do so, subject to the following conditions: -- -- The above copyright notice and this permission notice shall be included in -- all copies or substantial portions of the Software. -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -- THE SOFTWARE. -- UnZip -- ----- -- -- This library allows to uncompress deflated, enhanced deflated, and -- stored streams from a Zip archive stream. -- -- Pure Ada 2005+ code, 100% portable: OS-, CPU- and compiler- independent. -- Ada translation and substantial rewriting by <NAME> -- On the web: see the Zip.web constant. -- based on Pascal version 2.10 by <NAME>, -- http://www.foyeh.org/ -- itself based on Pascal version by <NAME>, -- itself based on C code by Info-Zip group (Mark Adler et al.) -- http://www.info-zip.org/UnZip.html -- Technical documentation: read appnote.txt with DCF.Zip; private with Ada.Streams; package DCF.Unzip is pragma Preelaborate; type Name_Conflict_Intervention is (Yes, No, Yes_To_All, None, Rename_It); subtype Pkzip_Method is Zip.Pkzip_Method; subtype File_Size_Type is Zip.File_Size_Type; -- Data sizes in archive CRC_Error : exception; Uncompressed_Size_Error : exception; Write_Error : exception; private type P_Stream is not null access all Ada.Streams.Root_Stream_Type'Class; end DCF.Unzip;
test/Succeed/Issue2226.agda
shlevy/agda
0
2800
<filename>test/Succeed/Issue2226.agda -- Andreas, 2018-03-12 -- The fix for #2963 introduced a change in the quotation behavior -- of method definitions inside a record. open import Agda.Builtin.Float open import Agda.Builtin.Reflection open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Equality open import Agda.Builtin.Sigma infixl 6 _>>=_ _>>=_ = bindTC macro getDef : Name → Term → TC ⊤ getDef x a = getDefinition x >>= quoteTC >>= unify a record Foo (A : Set) : Set where constructor mkFoo field foo : A foo₁ : A foo₁ = foo open module FooI = Foo {{...}} postulate A : Set instance FooA : Foo A -- Projection-like foo₂ : {A : Set} {r : Foo A} → A foo₂ {r = mkFoo x} = x bar : A bar = foo bar₁ : A bar₁ = foo₁ bar₂ : A bar₂ = foo₂ {r = FooA} pattern rArg v x = arg (arg-info v relevant) x pattern vArg x = rArg visible x pattern hArg x = rArg hidden x pattern iArg x = rArg instance′ x pattern `? = hArg unknown pattern fun₀ b = function (clause [] [] b ∷ []) pattern fun₁ tel p b = function (clause tel (p ∷ []) b ∷ []) pattern fun₂ tel p q b = function (clause tel (p ∷ q ∷ []) b ∷ []) -- foo {{r}} = Foo.foo {_} r foo-def : getDef foo ≡ fun₁ (("r" , iArg (def (quote Foo) (vArg (var 0 []) ∷ []))) ∷ []) (iArg (var 0)) (def (quote Foo.foo) (`? ∷ vArg (var 0 []) ∷ [])) foo-def = refl -- Andreas, 2018-03-12: Behavior before fix of #2963: -- foo₁ {{r}} = Foo.foo₁ {_} r -- foo₁-def : getDef foo₁ ≡ fun₁ (iArg (var "r")) (def (quote Foo.foo₁) (`? ∷ vArg (var 0 []) ∷ [])) -- NOW: -- foo₁ {A} {{r}} = Foo.foo₁ {A} r foo₁-def : getDef foo₁ ≡ fun₂ (("A" , hArg (agda-sort (lit 0))) ∷ ("r" , iArg (def (quote Foo) (vArg (var 0 []) ∷ []))) ∷ []) (hArg (var 1)) (iArg (var 0)) (def (quote Foo.foo₁) (hArg (var 1 []) ∷ vArg (var 0 []) ∷ [])) foo₁-def = refl -- bar = foo {_} FooA bar-def : getDef bar ≡ fun₀ (def (quote Foo.foo) (`? ∷ vArg (def (quote FooA) []) ∷ [])) bar-def = refl -- bar₁ = Foo.foo₁ {A} FooA bar₁-def : getDef bar₁ ≡ fun₀ (def (quote Foo.foo₁) (hArg (def (quote A) []) ∷ vArg (def (quote FooA) []) ∷ [])) bar₁-def = refl -- bar₂ = foo₂ {_} {FooA} bar₂-def : getDef bar₂ ≡ fun₀ (def (quote foo₂) (`? ∷ hArg (def (quote FooA) []) ∷ [])) bar₂-def = refl --- Originally reported test case --- defToTerm : Name → Definition → List (Arg Term) → Term defToTerm _ (function cs) as = pat-lam cs as defToTerm _ (data-cons d) as = con d as defToTerm _ _ _ = unknown derefImmediate : Term → TC Term derefImmediate (def f args) = getDefinition f >>= λ f' → returnTC (defToTerm f f' args) derefImmediate x = returnTC x reflectTerm : Name → TC Term reflectTerm n = getType n >>= λ ty → getDefinition n >>= λ x → derefImmediate (defToTerm n x []) >>= λ x → checkType x ty macro reflect : Name → Term → TC ⊤ reflect n a = reflectTerm n >>= quoteTC >>= unify a {- Define typeclass Semigroup a => Plus a -} record SemigroupLaws {ℓ} (t : Set ℓ) : Set ℓ where infixr 5 _++_ field _++_ : t → t → t -- associative : ∀ {a b c} → (a ++ b) ++ c ≡ a ++ b ++ c record PlusOp {ℓ} (t : Set ℓ) : Set ℓ where field semigroup : SemigroupLaws t infixr 6 _+_ _+_ = SemigroupLaws._++_ semigroup instance floatPlus : PlusOp Float floatPlus = record { semigroup = record { _++_ = Agda.Builtin.Float.primFloatPlus } } open PlusOp {{...}} -- The issue: works : Float works = PlusOp._+_ floatPlus 3.0 5.0 resultWorks : Term resultWorks = reflect works fails : Float fails = 3.0 + 5.0 resultFails : Term resultFails = reflect fails
oeis/073/A073522.asm
neoneye/loda-programs
11
161354
<filename>oeis/073/A073522.asm<gh_stars>10-100 ; A073522: A set of 25 consecutive primes that form a 5 X 5 magic square with the (non-minimal) magic constant 1703. ; Submitted by <NAME>(w4) ; 269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419 add $0,55 seq $0,65091 ; Odd primes.
wc.asm
prakhar987/xv6-system-calls
5
83643
_wc: file format elf32-i386 Disassembly of section .text: 00000000 <wc>: char buf[512]; void wc(int fd, char *name) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 83 ec 28 sub $0x28,%esp int i, n; int l, w, c, inword; l = w = c = 0; 6: c7 45 e8 00 00 00 00 movl $0x0,-0x18(%ebp) d: 8b 45 e8 mov -0x18(%ebp),%eax 10: 89 45 ec mov %eax,-0x14(%ebp) 13: 8b 45 ec mov -0x14(%ebp),%eax 16: 89 45 f0 mov %eax,-0x10(%ebp) inword = 0; 19: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) while((n = read(fd, buf, sizeof(buf))) > 0){ 20: eb 69 jmp 8b <wc+0x8b> for(i=0; i<n; i++){ 22: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 29: eb 58 jmp 83 <wc+0x83> c++; 2b: 83 45 e8 01 addl $0x1,-0x18(%ebp) if(buf[i] == '\n') 2f: 8b 45 f4 mov -0xc(%ebp),%eax 32: 05 40 0c 00 00 add $0xc40,%eax 37: 0f b6 00 movzbl (%eax),%eax 3a: 3c 0a cmp $0xa,%al 3c: 75 04 jne 42 <wc+0x42> l++; 3e: 83 45 f0 01 addl $0x1,-0x10(%ebp) if(strchr(" \r\t\n\v", buf[i])) 42: 8b 45 f4 mov -0xc(%ebp),%eax 45: 05 40 0c 00 00 add $0xc40,%eax 4a: 0f b6 00 movzbl (%eax),%eax 4d: 0f be c0 movsbl %al,%eax 50: 83 ec 08 sub $0x8,%esp 53: 50 push %eax 54: 68 49 09 00 00 push $0x949 59: e8 35 02 00 00 call 293 <strchr> 5e: 83 c4 10 add $0x10,%esp 61: 85 c0 test %eax,%eax 63: 74 09 je 6e <wc+0x6e> inword = 0; 65: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 6c: eb 11 jmp 7f <wc+0x7f> else if(!inword){ 6e: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp) 72: 75 0b jne 7f <wc+0x7f> w++; 74: 83 45 ec 01 addl $0x1,-0x14(%ebp) inword = 1; 78: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) int l, w, c, inword; l = w = c = 0; inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ for(i=0; i<n; i++){ 7f: 83 45 f4 01 addl $0x1,-0xc(%ebp) 83: 8b 45 f4 mov -0xc(%ebp),%eax 86: 3b 45 e0 cmp -0x20(%ebp),%eax 89: 7c a0 jl 2b <wc+0x2b> int i, n; int l, w, c, inword; l = w = c = 0; inword = 0; while((n = read(fd, buf, sizeof(buf))) > 0){ 8b: 83 ec 04 sub $0x4,%esp 8e: 68 00 02 00 00 push $0x200 93: 68 40 0c 00 00 push $0xc40 98: ff 75 08 pushl 0x8(%ebp) 9b: e8 8c 03 00 00 call 42c <read> a0: 83 c4 10 add $0x10,%esp a3: 89 45 e0 mov %eax,-0x20(%ebp) a6: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) aa: 0f 8f 72 ff ff ff jg 22 <wc+0x22> w++; inword = 1; } } } if(n < 0){ b0: 83 7d e0 00 cmpl $0x0,-0x20(%ebp) b4: 79 17 jns cd <wc+0xcd> printf(1, "wc: read error\n"); b6: 83 ec 08 sub $0x8,%esp b9: 68 4f 09 00 00 push $0x94f be: 6a 01 push $0x1 c0: e8 ce 04 00 00 call 593 <printf> c5: 83 c4 10 add $0x10,%esp exit(); c8: e8 47 03 00 00 call 414 <exit> } printf(1, "%d %d %d %s\n", l, w, c, name); cd: 83 ec 08 sub $0x8,%esp d0: ff 75 0c pushl 0xc(%ebp) d3: ff 75 e8 pushl -0x18(%ebp) d6: ff 75 ec pushl -0x14(%ebp) d9: ff 75 f0 pushl -0x10(%ebp) dc: 68 5f 09 00 00 push $0x95f e1: 6a 01 push $0x1 e3: e8 ab 04 00 00 call 593 <printf> e8: 83 c4 20 add $0x20,%esp } eb: 90 nop ec: c9 leave ed: c3 ret 000000ee <main>: int main(int argc, char *argv[]) { ee: 8d 4c 24 04 lea 0x4(%esp),%ecx f2: 83 e4 f0 and $0xfffffff0,%esp f5: ff 71 fc pushl -0x4(%ecx) f8: 55 push %ebp f9: 89 e5 mov %esp,%ebp fb: 53 push %ebx fc: 51 push %ecx fd: 83 ec 10 sub $0x10,%esp 100: 89 cb mov %ecx,%ebx int fd, i; if(argc <= 1){ 102: 83 3b 01 cmpl $0x1,(%ebx) 105: 7f 17 jg 11e <main+0x30> wc(0, ""); 107: 83 ec 08 sub $0x8,%esp 10a: 68 6c 09 00 00 push $0x96c 10f: 6a 00 push $0x0 111: e8 ea fe ff ff call 0 <wc> 116: 83 c4 10 add $0x10,%esp exit(); 119: e8 f6 02 00 00 call 414 <exit> } for(i = 1; i < argc; i++){ 11e: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp) 125: e9 83 00 00 00 jmp 1ad <main+0xbf> if((fd = open(argv[i], 0)) < 0){ 12a: 8b 45 f4 mov -0xc(%ebp),%eax 12d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 134: 8b 43 04 mov 0x4(%ebx),%eax 137: 01 d0 add %edx,%eax 139: 8b 00 mov (%eax),%eax 13b: 83 ec 08 sub $0x8,%esp 13e: 6a 00 push $0x0 140: 50 push %eax 141: e8 0e 03 00 00 call 454 <open> 146: 83 c4 10 add $0x10,%esp 149: 89 45 f0 mov %eax,-0x10(%ebp) 14c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 150: 79 29 jns 17b <main+0x8d> printf(1, "wc: cannot open %s\n", argv[i]); 152: 8b 45 f4 mov -0xc(%ebp),%eax 155: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 15c: 8b 43 04 mov 0x4(%ebx),%eax 15f: 01 d0 add %edx,%eax 161: 8b 00 mov (%eax),%eax 163: 83 ec 04 sub $0x4,%esp 166: 50 push %eax 167: 68 6d 09 00 00 push $0x96d 16c: 6a 01 push $0x1 16e: e8 20 04 00 00 call 593 <printf> 173: 83 c4 10 add $0x10,%esp exit(); 176: e8 99 02 00 00 call 414 <exit> } wc(fd, argv[i]); 17b: 8b 45 f4 mov -0xc(%ebp),%eax 17e: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx 185: 8b 43 04 mov 0x4(%ebx),%eax 188: 01 d0 add %edx,%eax 18a: 8b 00 mov (%eax),%eax 18c: 83 ec 08 sub $0x8,%esp 18f: 50 push %eax 190: ff 75 f0 pushl -0x10(%ebp) 193: e8 68 fe ff ff call 0 <wc> 198: 83 c4 10 add $0x10,%esp close(fd); 19b: 83 ec 0c sub $0xc,%esp 19e: ff 75 f0 pushl -0x10(%ebp) 1a1: e8 96 02 00 00 call 43c <close> 1a6: 83 c4 10 add $0x10,%esp if(argc <= 1){ wc(0, ""); exit(); } for(i = 1; i < argc; i++){ 1a9: 83 45 f4 01 addl $0x1,-0xc(%ebp) 1ad: 8b 45 f4 mov -0xc(%ebp),%eax 1b0: 3b 03 cmp (%ebx),%eax 1b2: 0f 8c 72 ff ff ff jl 12a <main+0x3c> exit(); } wc(fd, argv[i]); close(fd); } exit(); 1b8: e8 57 02 00 00 call 414 <exit> 000001bd <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 1bd: 55 push %ebp 1be: 89 e5 mov %esp,%ebp 1c0: 57 push %edi 1c1: 53 push %ebx asm volatile("cld; rep stosb" : 1c2: 8b 4d 08 mov 0x8(%ebp),%ecx 1c5: 8b 55 10 mov 0x10(%ebp),%edx 1c8: 8b 45 0c mov 0xc(%ebp),%eax 1cb: 89 cb mov %ecx,%ebx 1cd: 89 df mov %ebx,%edi 1cf: 89 d1 mov %edx,%ecx 1d1: fc cld 1d2: f3 aa rep stos %al,%es:(%edi) 1d4: 89 ca mov %ecx,%edx 1d6: 89 fb mov %edi,%ebx 1d8: 89 5d 08 mov %ebx,0x8(%ebp) 1db: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 1de: 90 nop 1df: 5b pop %ebx 1e0: 5f pop %edi 1e1: 5d pop %ebp 1e2: c3 ret 000001e3 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 1e3: 55 push %ebp 1e4: 89 e5 mov %esp,%ebp 1e6: 83 ec 10 sub $0x10,%esp char *os; os = s; 1e9: 8b 45 08 mov 0x8(%ebp),%eax 1ec: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 1ef: 90 nop 1f0: 8b 45 08 mov 0x8(%ebp),%eax 1f3: 8d 50 01 lea 0x1(%eax),%edx 1f6: 89 55 08 mov %edx,0x8(%ebp) 1f9: 8b 55 0c mov 0xc(%ebp),%edx 1fc: 8d 4a 01 lea 0x1(%edx),%ecx 1ff: 89 4d 0c mov %ecx,0xc(%ebp) 202: 0f b6 12 movzbl (%edx),%edx 205: 88 10 mov %dl,(%eax) 207: 0f b6 00 movzbl (%eax),%eax 20a: 84 c0 test %al,%al 20c: 75 e2 jne 1f0 <strcpy+0xd> ; return os; 20e: 8b 45 fc mov -0x4(%ebp),%eax } 211: c9 leave 212: c3 ret 00000213 <strcmp>: int strcmp(const char *p, const char *q) { 213: 55 push %ebp 214: 89 e5 mov %esp,%ebp while(*p && *p == *q) 216: eb 08 jmp 220 <strcmp+0xd> p++, q++; 218: 83 45 08 01 addl $0x1,0x8(%ebp) 21c: 83 45 0c 01 addl $0x1,0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 220: 8b 45 08 mov 0x8(%ebp),%eax 223: 0f b6 00 movzbl (%eax),%eax 226: 84 c0 test %al,%al 228: 74 10 je 23a <strcmp+0x27> 22a: 8b 45 08 mov 0x8(%ebp),%eax 22d: 0f b6 10 movzbl (%eax),%edx 230: 8b 45 0c mov 0xc(%ebp),%eax 233: 0f b6 00 movzbl (%eax),%eax 236: 38 c2 cmp %al,%dl 238: 74 de je 218 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 23a: 8b 45 08 mov 0x8(%ebp),%eax 23d: 0f b6 00 movzbl (%eax),%eax 240: 0f b6 d0 movzbl %al,%edx 243: 8b 45 0c mov 0xc(%ebp),%eax 246: 0f b6 00 movzbl (%eax),%eax 249: 0f b6 c0 movzbl %al,%eax 24c: 29 c2 sub %eax,%edx 24e: 89 d0 mov %edx,%eax } 250: 5d pop %ebp 251: c3 ret 00000252 <strlen>: uint strlen(char *s) { 252: 55 push %ebp 253: 89 e5 mov %esp,%ebp 255: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) 258: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) 25f: eb 04 jmp 265 <strlen+0x13> 261: 83 45 fc 01 addl $0x1,-0x4(%ebp) 265: 8b 55 fc mov -0x4(%ebp),%edx 268: 8b 45 08 mov 0x8(%ebp),%eax 26b: 01 d0 add %edx,%eax 26d: 0f b6 00 movzbl (%eax),%eax 270: 84 c0 test %al,%al 272: 75 ed jne 261 <strlen+0xf> ; return n; 274: 8b 45 fc mov -0x4(%ebp),%eax } 277: c9 leave 278: c3 ret 00000279 <memset>: void* memset(void *dst, int c, uint n) { 279: 55 push %ebp 27a: 89 e5 mov %esp,%ebp stosb(dst, c, n); 27c: 8b 45 10 mov 0x10(%ebp),%eax 27f: 50 push %eax 280: ff 75 0c pushl 0xc(%ebp) 283: ff 75 08 pushl 0x8(%ebp) 286: e8 32 ff ff ff call 1bd <stosb> 28b: 83 c4 0c add $0xc,%esp return dst; 28e: 8b 45 08 mov 0x8(%ebp),%eax } 291: c9 leave 292: c3 ret 00000293 <strchr>: char* strchr(const char *s, char c) { 293: 55 push %ebp 294: 89 e5 mov %esp,%ebp 296: 83 ec 04 sub $0x4,%esp 299: 8b 45 0c mov 0xc(%ebp),%eax 29c: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) 29f: eb 14 jmp 2b5 <strchr+0x22> if(*s == c) 2a1: 8b 45 08 mov 0x8(%ebp),%eax 2a4: 0f b6 00 movzbl (%eax),%eax 2a7: 3a 45 fc cmp -0x4(%ebp),%al 2aa: 75 05 jne 2b1 <strchr+0x1e> return (char*)s; 2ac: 8b 45 08 mov 0x8(%ebp),%eax 2af: eb 13 jmp 2c4 <strchr+0x31> } char* strchr(const char *s, char c) { for(; *s; s++) 2b1: 83 45 08 01 addl $0x1,0x8(%ebp) 2b5: 8b 45 08 mov 0x8(%ebp),%eax 2b8: 0f b6 00 movzbl (%eax),%eax 2bb: 84 c0 test %al,%al 2bd: 75 e2 jne 2a1 <strchr+0xe> if(*s == c) return (char*)s; return 0; 2bf: b8 00 00 00 00 mov $0x0,%eax } 2c4: c9 leave 2c5: c3 ret 000002c6 <gets>: char* gets(char *buf, int max) { 2c6: 55 push %ebp 2c7: 89 e5 mov %esp,%ebp 2c9: 83 ec 18 sub $0x18,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 2cc: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 2d3: eb 42 jmp 317 <gets+0x51> cc = read(0, &c, 1); 2d5: 83 ec 04 sub $0x4,%esp 2d8: 6a 01 push $0x1 2da: 8d 45 ef lea -0x11(%ebp),%eax 2dd: 50 push %eax 2de: 6a 00 push $0x0 2e0: e8 47 01 00 00 call 42c <read> 2e5: 83 c4 10 add $0x10,%esp 2e8: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 2eb: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 2ef: 7e 33 jle 324 <gets+0x5e> break; buf[i++] = c; 2f1: 8b 45 f4 mov -0xc(%ebp),%eax 2f4: 8d 50 01 lea 0x1(%eax),%edx 2f7: 89 55 f4 mov %edx,-0xc(%ebp) 2fa: 89 c2 mov %eax,%edx 2fc: 8b 45 08 mov 0x8(%ebp),%eax 2ff: 01 c2 add %eax,%edx 301: 0f b6 45 ef movzbl -0x11(%ebp),%eax 305: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 307: 0f b6 45 ef movzbl -0x11(%ebp),%eax 30b: 3c 0a cmp $0xa,%al 30d: 74 16 je 325 <gets+0x5f> 30f: 0f b6 45 ef movzbl -0x11(%ebp),%eax 313: 3c 0d cmp $0xd,%al 315: 74 0e je 325 <gets+0x5f> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 317: 8b 45 f4 mov -0xc(%ebp),%eax 31a: 83 c0 01 add $0x1,%eax 31d: 3b 45 0c cmp 0xc(%ebp),%eax 320: 7c b3 jl 2d5 <gets+0xf> 322: eb 01 jmp 325 <gets+0x5f> cc = read(0, &c, 1); if(cc < 1) break; 324: 90 nop buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 325: 8b 55 f4 mov -0xc(%ebp),%edx 328: 8b 45 08 mov 0x8(%ebp),%eax 32b: 01 d0 add %edx,%eax 32d: c6 00 00 movb $0x0,(%eax) return buf; 330: 8b 45 08 mov 0x8(%ebp),%eax } 333: c9 leave 334: c3 ret 00000335 <stat>: int stat(char *n, struct stat *st) { 335: 55 push %ebp 336: 89 e5 mov %esp,%ebp 338: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); 33b: 83 ec 08 sub $0x8,%esp 33e: 6a 00 push $0x0 340: ff 75 08 pushl 0x8(%ebp) 343: e8 0c 01 00 00 call 454 <open> 348: 83 c4 10 add $0x10,%esp 34b: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 34e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 352: 79 07 jns 35b <stat+0x26> return -1; 354: b8 ff ff ff ff mov $0xffffffff,%eax 359: eb 25 jmp 380 <stat+0x4b> r = fstat(fd, st); 35b: 83 ec 08 sub $0x8,%esp 35e: ff 75 0c pushl 0xc(%ebp) 361: ff 75 f4 pushl -0xc(%ebp) 364: e8 03 01 00 00 call 46c <fstat> 369: 83 c4 10 add $0x10,%esp 36c: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 36f: 83 ec 0c sub $0xc,%esp 372: ff 75 f4 pushl -0xc(%ebp) 375: e8 c2 00 00 00 call 43c <close> 37a: 83 c4 10 add $0x10,%esp return r; 37d: 8b 45 f0 mov -0x10(%ebp),%eax } 380: c9 leave 381: c3 ret 00000382 <atoi>: int atoi(const char *s) { 382: 55 push %ebp 383: 89 e5 mov %esp,%ebp 385: 83 ec 10 sub $0x10,%esp int n; n = 0; 388: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 38f: eb 25 jmp 3b6 <atoi+0x34> n = n*10 + *s++ - '0'; 391: 8b 55 fc mov -0x4(%ebp),%edx 394: 89 d0 mov %edx,%eax 396: c1 e0 02 shl $0x2,%eax 399: 01 d0 add %edx,%eax 39b: 01 c0 add %eax,%eax 39d: 89 c1 mov %eax,%ecx 39f: 8b 45 08 mov 0x8(%ebp),%eax 3a2: 8d 50 01 lea 0x1(%eax),%edx 3a5: 89 55 08 mov %edx,0x8(%ebp) 3a8: 0f b6 00 movzbl (%eax),%eax 3ab: 0f be c0 movsbl %al,%eax 3ae: 01 c8 add %ecx,%eax 3b0: 83 e8 30 sub $0x30,%eax 3b3: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 3b6: 8b 45 08 mov 0x8(%ebp),%eax 3b9: 0f b6 00 movzbl (%eax),%eax 3bc: 3c 2f cmp $0x2f,%al 3be: 7e 0a jle 3ca <atoi+0x48> 3c0: 8b 45 08 mov 0x8(%ebp),%eax 3c3: 0f b6 00 movzbl (%eax),%eax 3c6: 3c 39 cmp $0x39,%al 3c8: 7e c7 jle 391 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 3ca: 8b 45 fc mov -0x4(%ebp),%eax } 3cd: c9 leave 3ce: c3 ret 000003cf <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 3cf: 55 push %ebp 3d0: 89 e5 mov %esp,%ebp 3d2: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 3d5: 8b 45 08 mov 0x8(%ebp),%eax 3d8: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 3db: 8b 45 0c mov 0xc(%ebp),%eax 3de: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 3e1: eb 17 jmp 3fa <memmove+0x2b> *dst++ = *src++; 3e3: 8b 45 fc mov -0x4(%ebp),%eax 3e6: 8d 50 01 lea 0x1(%eax),%edx 3e9: 89 55 fc mov %edx,-0x4(%ebp) 3ec: 8b 55 f8 mov -0x8(%ebp),%edx 3ef: 8d 4a 01 lea 0x1(%edx),%ecx 3f2: 89 4d f8 mov %ecx,-0x8(%ebp) 3f5: 0f b6 12 movzbl (%edx),%edx 3f8: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 3fa: 8b 45 10 mov 0x10(%ebp),%eax 3fd: 8d 50 ff lea -0x1(%eax),%edx 400: 89 55 10 mov %edx,0x10(%ebp) 403: 85 c0 test %eax,%eax 405: 7f dc jg 3e3 <memmove+0x14> *dst++ = *src++; return vdst; 407: 8b 45 08 mov 0x8(%ebp),%eax } 40a: c9 leave 40b: c3 ret 0000040c <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 40c: b8 01 00 00 00 mov $0x1,%eax 411: cd 40 int $0x40 413: c3 ret 00000414 <exit>: SYSCALL(exit) 414: b8 02 00 00 00 mov $0x2,%eax 419: cd 40 int $0x40 41b: c3 ret 0000041c <wait>: SYSCALL(wait) 41c: b8 03 00 00 00 mov $0x3,%eax 421: cd 40 int $0x40 423: c3 ret 00000424 <pipe>: SYSCALL(pipe) 424: b8 04 00 00 00 mov $0x4,%eax 429: cd 40 int $0x40 42b: c3 ret 0000042c <read>: SYSCALL(read) 42c: b8 05 00 00 00 mov $0x5,%eax 431: cd 40 int $0x40 433: c3 ret 00000434 <write>: SYSCALL(write) 434: b8 10 00 00 00 mov $0x10,%eax 439: cd 40 int $0x40 43b: c3 ret 0000043c <close>: SYSCALL(close) 43c: b8 15 00 00 00 mov $0x15,%eax 441: cd 40 int $0x40 443: c3 ret 00000444 <kill>: SYSCALL(kill) 444: b8 06 00 00 00 mov $0x6,%eax 449: cd 40 int $0x40 44b: c3 ret 0000044c <exec>: SYSCALL(exec) 44c: b8 07 00 00 00 mov $0x7,%eax 451: cd 40 int $0x40 453: c3 ret 00000454 <open>: SYSCALL(open) 454: b8 0f 00 00 00 mov $0xf,%eax 459: cd 40 int $0x40 45b: c3 ret 0000045c <mknod>: SYSCALL(mknod) 45c: b8 11 00 00 00 mov $0x11,%eax 461: cd 40 int $0x40 463: c3 ret 00000464 <unlink>: SYSCALL(unlink) 464: b8 12 00 00 00 mov $0x12,%eax 469: cd 40 int $0x40 46b: c3 ret 0000046c <fstat>: SYSCALL(fstat) 46c: b8 08 00 00 00 mov $0x8,%eax 471: cd 40 int $0x40 473: c3 ret 00000474 <link>: SYSCALL(link) 474: b8 13 00 00 00 mov $0x13,%eax 479: cd 40 int $0x40 47b: c3 ret 0000047c <mkdir>: SYSCALL(mkdir) 47c: b8 14 00 00 00 mov $0x14,%eax 481: cd 40 int $0x40 483: c3 ret 00000484 <chdir>: SYSCALL(chdir) 484: b8 09 00 00 00 mov $0x9,%eax 489: cd 40 int $0x40 48b: c3 ret 0000048c <dup>: SYSCALL(dup) 48c: b8 0a 00 00 00 mov $0xa,%eax 491: cd 40 int $0x40 493: c3 ret 00000494 <getpid>: SYSCALL(getpid) 494: b8 0b 00 00 00 mov $0xb,%eax 499: cd 40 int $0x40 49b: c3 ret 0000049c <sbrk>: SYSCALL(sbrk) 49c: b8 0c 00 00 00 mov $0xc,%eax 4a1: cd 40 int $0x40 4a3: c3 ret 000004a4 <sleep>: SYSCALL(sleep) 4a4: b8 0d 00 00 00 mov $0xd,%eax 4a9: cd 40 int $0x40 4ab: c3 ret 000004ac <uptime>: SYSCALL(uptime) 4ac: b8 0e 00 00 00 mov $0xe,%eax 4b1: cd 40 int $0x40 4b3: c3 ret 000004b4 <waitx>: SYSCALL(waitx) 4b4: b8 16 00 00 00 mov $0x16,%eax 4b9: cd 40 int $0x40 4bb: c3 ret 000004bc <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 4bc: 55 push %ebp 4bd: 89 e5 mov %esp,%ebp 4bf: 83 ec 18 sub $0x18,%esp 4c2: 8b 45 0c mov 0xc(%ebp),%eax 4c5: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 4c8: 83 ec 04 sub $0x4,%esp 4cb: 6a 01 push $0x1 4cd: 8d 45 f4 lea -0xc(%ebp),%eax 4d0: 50 push %eax 4d1: ff 75 08 pushl 0x8(%ebp) 4d4: e8 5b ff ff ff call 434 <write> 4d9: 83 c4 10 add $0x10,%esp } 4dc: 90 nop 4dd: c9 leave 4de: c3 ret 000004df <printint>: static void printint(int fd, int xx, int base, int sgn) { 4df: 55 push %ebp 4e0: 89 e5 mov %esp,%ebp 4e2: 53 push %ebx 4e3: 83 ec 24 sub $0x24,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 4e6: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 4ed: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 4f1: 74 17 je 50a <printint+0x2b> 4f3: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 4f7: 79 11 jns 50a <printint+0x2b> neg = 1; 4f9: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 500: 8b 45 0c mov 0xc(%ebp),%eax 503: f7 d8 neg %eax 505: 89 45 ec mov %eax,-0x14(%ebp) 508: eb 06 jmp 510 <printint+0x31> } else { x = xx; 50a: 8b 45 0c mov 0xc(%ebp),%eax 50d: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 510: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 517: 8b 4d f4 mov -0xc(%ebp),%ecx 51a: 8d 41 01 lea 0x1(%ecx),%eax 51d: 89 45 f4 mov %eax,-0xc(%ebp) 520: 8b 5d 10 mov 0x10(%ebp),%ebx 523: 8b 45 ec mov -0x14(%ebp),%eax 526: ba 00 00 00 00 mov $0x0,%edx 52b: f7 f3 div %ebx 52d: 89 d0 mov %edx,%eax 52f: 0f b6 80 f4 0b 00 00 movzbl 0xbf4(%eax),%eax 536: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 53a: 8b 5d 10 mov 0x10(%ebp),%ebx 53d: 8b 45 ec mov -0x14(%ebp),%eax 540: ba 00 00 00 00 mov $0x0,%edx 545: f7 f3 div %ebx 547: 89 45 ec mov %eax,-0x14(%ebp) 54a: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 54e: 75 c7 jne 517 <printint+0x38> if(neg) 550: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 554: 74 2d je 583 <printint+0xa4> buf[i++] = '-'; 556: 8b 45 f4 mov -0xc(%ebp),%eax 559: 8d 50 01 lea 0x1(%eax),%edx 55c: 89 55 f4 mov %edx,-0xc(%ebp) 55f: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 564: eb 1d jmp 583 <printint+0xa4> putc(fd, buf[i]); 566: 8d 55 dc lea -0x24(%ebp),%edx 569: 8b 45 f4 mov -0xc(%ebp),%eax 56c: 01 d0 add %edx,%eax 56e: 0f b6 00 movzbl (%eax),%eax 571: 0f be c0 movsbl %al,%eax 574: 83 ec 08 sub $0x8,%esp 577: 50 push %eax 578: ff 75 08 pushl 0x8(%ebp) 57b: e8 3c ff ff ff call 4bc <putc> 580: 83 c4 10 add $0x10,%esp buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 583: 83 6d f4 01 subl $0x1,-0xc(%ebp) 587: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 58b: 79 d9 jns 566 <printint+0x87> putc(fd, buf[i]); } 58d: 90 nop 58e: 8b 5d fc mov -0x4(%ebp),%ebx 591: c9 leave 592: c3 ret 00000593 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 593: 55 push %ebp 594: 89 e5 mov %esp,%ebp 596: 83 ec 28 sub $0x28,%esp char *s; int c, i, state; uint *ap; state = 0; 599: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 5a0: 8d 45 0c lea 0xc(%ebp),%eax 5a3: 83 c0 04 add $0x4,%eax 5a6: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 5a9: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 5b0: e9 59 01 00 00 jmp 70e <printf+0x17b> c = fmt[i] & 0xff; 5b5: 8b 55 0c mov 0xc(%ebp),%edx 5b8: 8b 45 f0 mov -0x10(%ebp),%eax 5bb: 01 d0 add %edx,%eax 5bd: 0f b6 00 movzbl (%eax),%eax 5c0: 0f be c0 movsbl %al,%eax 5c3: 25 ff 00 00 00 and $0xff,%eax 5c8: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 5cb: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 5cf: 75 2c jne 5fd <printf+0x6a> if(c == '%'){ 5d1: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 5d5: 75 0c jne 5e3 <printf+0x50> state = '%'; 5d7: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 5de: e9 27 01 00 00 jmp 70a <printf+0x177> } else { putc(fd, c); 5e3: 8b 45 e4 mov -0x1c(%ebp),%eax 5e6: 0f be c0 movsbl %al,%eax 5e9: 83 ec 08 sub $0x8,%esp 5ec: 50 push %eax 5ed: ff 75 08 pushl 0x8(%ebp) 5f0: e8 c7 fe ff ff call 4bc <putc> 5f5: 83 c4 10 add $0x10,%esp 5f8: e9 0d 01 00 00 jmp 70a <printf+0x177> } } else if(state == '%'){ 5fd: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 601: 0f 85 03 01 00 00 jne 70a <printf+0x177> if(c == 'd'){ 607: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 60b: 75 1e jne 62b <printf+0x98> printint(fd, *ap, 10, 1); 60d: 8b 45 e8 mov -0x18(%ebp),%eax 610: 8b 00 mov (%eax),%eax 612: 6a 01 push $0x1 614: 6a 0a push $0xa 616: 50 push %eax 617: ff 75 08 pushl 0x8(%ebp) 61a: e8 c0 fe ff ff call 4df <printint> 61f: 83 c4 10 add $0x10,%esp ap++; 622: 83 45 e8 04 addl $0x4,-0x18(%ebp) 626: e9 d8 00 00 00 jmp 703 <printf+0x170> } else if(c == 'x' || c == 'p'){ 62b: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 62f: 74 06 je 637 <printf+0xa4> 631: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 635: 75 1e jne 655 <printf+0xc2> printint(fd, *ap, 16, 0); 637: 8b 45 e8 mov -0x18(%ebp),%eax 63a: 8b 00 mov (%eax),%eax 63c: 6a 00 push $0x0 63e: 6a 10 push $0x10 640: 50 push %eax 641: ff 75 08 pushl 0x8(%ebp) 644: e8 96 fe ff ff call 4df <printint> 649: 83 c4 10 add $0x10,%esp ap++; 64c: 83 45 e8 04 addl $0x4,-0x18(%ebp) 650: e9 ae 00 00 00 jmp 703 <printf+0x170> } else if(c == 's'){ 655: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 659: 75 43 jne 69e <printf+0x10b> s = (char*)*ap; 65b: 8b 45 e8 mov -0x18(%ebp),%eax 65e: 8b 00 mov (%eax),%eax 660: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 663: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 667: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 66b: 75 25 jne 692 <printf+0xff> s = "(null)"; 66d: c7 45 f4 81 09 00 00 movl $0x981,-0xc(%ebp) while(*s != 0){ 674: eb 1c jmp 692 <printf+0xff> putc(fd, *s); 676: 8b 45 f4 mov -0xc(%ebp),%eax 679: 0f b6 00 movzbl (%eax),%eax 67c: 0f be c0 movsbl %al,%eax 67f: 83 ec 08 sub $0x8,%esp 682: 50 push %eax 683: ff 75 08 pushl 0x8(%ebp) 686: e8 31 fe ff ff call 4bc <putc> 68b: 83 c4 10 add $0x10,%esp s++; 68e: 83 45 f4 01 addl $0x1,-0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 692: 8b 45 f4 mov -0xc(%ebp),%eax 695: 0f b6 00 movzbl (%eax),%eax 698: 84 c0 test %al,%al 69a: 75 da jne 676 <printf+0xe3> 69c: eb 65 jmp 703 <printf+0x170> putc(fd, *s); s++; } } else if(c == 'c'){ 69e: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 6a2: 75 1d jne 6c1 <printf+0x12e> putc(fd, *ap); 6a4: 8b 45 e8 mov -0x18(%ebp),%eax 6a7: 8b 00 mov (%eax),%eax 6a9: 0f be c0 movsbl %al,%eax 6ac: 83 ec 08 sub $0x8,%esp 6af: 50 push %eax 6b0: ff 75 08 pushl 0x8(%ebp) 6b3: e8 04 fe ff ff call 4bc <putc> 6b8: 83 c4 10 add $0x10,%esp ap++; 6bb: 83 45 e8 04 addl $0x4,-0x18(%ebp) 6bf: eb 42 jmp 703 <printf+0x170> } else if(c == '%'){ 6c1: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 6c5: 75 17 jne 6de <printf+0x14b> putc(fd, c); 6c7: 8b 45 e4 mov -0x1c(%ebp),%eax 6ca: 0f be c0 movsbl %al,%eax 6cd: 83 ec 08 sub $0x8,%esp 6d0: 50 push %eax 6d1: ff 75 08 pushl 0x8(%ebp) 6d4: e8 e3 fd ff ff call 4bc <putc> 6d9: 83 c4 10 add $0x10,%esp 6dc: eb 25 jmp 703 <printf+0x170> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 6de: 83 ec 08 sub $0x8,%esp 6e1: 6a 25 push $0x25 6e3: ff 75 08 pushl 0x8(%ebp) 6e6: e8 d1 fd ff ff call 4bc <putc> 6eb: 83 c4 10 add $0x10,%esp putc(fd, c); 6ee: 8b 45 e4 mov -0x1c(%ebp),%eax 6f1: 0f be c0 movsbl %al,%eax 6f4: 83 ec 08 sub $0x8,%esp 6f7: 50 push %eax 6f8: ff 75 08 pushl 0x8(%ebp) 6fb: e8 bc fd ff ff call 4bc <putc> 700: 83 c4 10 add $0x10,%esp } state = 0; 703: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 70a: 83 45 f0 01 addl $0x1,-0x10(%ebp) 70e: 8b 55 0c mov 0xc(%ebp),%edx 711: 8b 45 f0 mov -0x10(%ebp),%eax 714: 01 d0 add %edx,%eax 716: 0f b6 00 movzbl (%eax),%eax 719: 84 c0 test %al,%al 71b: 0f 85 94 fe ff ff jne 5b5 <printf+0x22> putc(fd, c); } state = 0; } } } 721: 90 nop 722: c9 leave 723: c3 ret 00000724 <free>: static Header base; static Header *freep; void free(void *ap) { 724: 55 push %ebp 725: 89 e5 mov %esp,%ebp 727: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 72a: 8b 45 08 mov 0x8(%ebp),%eax 72d: 83 e8 08 sub $0x8,%eax 730: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 733: a1 28 0c 00 00 mov 0xc28,%eax 738: 89 45 fc mov %eax,-0x4(%ebp) 73b: eb 24 jmp 761 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 73d: 8b 45 fc mov -0x4(%ebp),%eax 740: 8b 00 mov (%eax),%eax 742: 3b 45 fc cmp -0x4(%ebp),%eax 745: 77 12 ja 759 <free+0x35> 747: 8b 45 f8 mov -0x8(%ebp),%eax 74a: 3b 45 fc cmp -0x4(%ebp),%eax 74d: 77 24 ja 773 <free+0x4f> 74f: 8b 45 fc mov -0x4(%ebp),%eax 752: 8b 00 mov (%eax),%eax 754: 3b 45 f8 cmp -0x8(%ebp),%eax 757: 77 1a ja 773 <free+0x4f> free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 759: 8b 45 fc mov -0x4(%ebp),%eax 75c: 8b 00 mov (%eax),%eax 75e: 89 45 fc mov %eax,-0x4(%ebp) 761: 8b 45 f8 mov -0x8(%ebp),%eax 764: 3b 45 fc cmp -0x4(%ebp),%eax 767: 76 d4 jbe 73d <free+0x19> 769: 8b 45 fc mov -0x4(%ebp),%eax 76c: 8b 00 mov (%eax),%eax 76e: 3b 45 f8 cmp -0x8(%ebp),%eax 771: 76 ca jbe 73d <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 773: 8b 45 f8 mov -0x8(%ebp),%eax 776: 8b 40 04 mov 0x4(%eax),%eax 779: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 780: 8b 45 f8 mov -0x8(%ebp),%eax 783: 01 c2 add %eax,%edx 785: 8b 45 fc mov -0x4(%ebp),%eax 788: 8b 00 mov (%eax),%eax 78a: 39 c2 cmp %eax,%edx 78c: 75 24 jne 7b2 <free+0x8e> bp->s.size += p->s.ptr->s.size; 78e: 8b 45 f8 mov -0x8(%ebp),%eax 791: 8b 50 04 mov 0x4(%eax),%edx 794: 8b 45 fc mov -0x4(%ebp),%eax 797: 8b 00 mov (%eax),%eax 799: 8b 40 04 mov 0x4(%eax),%eax 79c: 01 c2 add %eax,%edx 79e: 8b 45 f8 mov -0x8(%ebp),%eax 7a1: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 7a4: 8b 45 fc mov -0x4(%ebp),%eax 7a7: 8b 00 mov (%eax),%eax 7a9: 8b 10 mov (%eax),%edx 7ab: 8b 45 f8 mov -0x8(%ebp),%eax 7ae: 89 10 mov %edx,(%eax) 7b0: eb 0a jmp 7bc <free+0x98> } else bp->s.ptr = p->s.ptr; 7b2: 8b 45 fc mov -0x4(%ebp),%eax 7b5: 8b 10 mov (%eax),%edx 7b7: 8b 45 f8 mov -0x8(%ebp),%eax 7ba: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 7bc: 8b 45 fc mov -0x4(%ebp),%eax 7bf: 8b 40 04 mov 0x4(%eax),%eax 7c2: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 7c9: 8b 45 fc mov -0x4(%ebp),%eax 7cc: 01 d0 add %edx,%eax 7ce: 3b 45 f8 cmp -0x8(%ebp),%eax 7d1: 75 20 jne 7f3 <free+0xcf> p->s.size += bp->s.size; 7d3: 8b 45 fc mov -0x4(%ebp),%eax 7d6: 8b 50 04 mov 0x4(%eax),%edx 7d9: 8b 45 f8 mov -0x8(%ebp),%eax 7dc: 8b 40 04 mov 0x4(%eax),%eax 7df: 01 c2 add %eax,%edx 7e1: 8b 45 fc mov -0x4(%ebp),%eax 7e4: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 7e7: 8b 45 f8 mov -0x8(%ebp),%eax 7ea: 8b 10 mov (%eax),%edx 7ec: 8b 45 fc mov -0x4(%ebp),%eax 7ef: 89 10 mov %edx,(%eax) 7f1: eb 08 jmp 7fb <free+0xd7> } else p->s.ptr = bp; 7f3: 8b 45 fc mov -0x4(%ebp),%eax 7f6: 8b 55 f8 mov -0x8(%ebp),%edx 7f9: 89 10 mov %edx,(%eax) freep = p; 7fb: 8b 45 fc mov -0x4(%ebp),%eax 7fe: a3 28 0c 00 00 mov %eax,0xc28 } 803: 90 nop 804: c9 leave 805: c3 ret 00000806 <morecore>: static Header* morecore(uint nu) { 806: 55 push %ebp 807: 89 e5 mov %esp,%ebp 809: 83 ec 18 sub $0x18,%esp char *p; Header *hp; if(nu < 4096) 80c: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 813: 77 07 ja 81c <morecore+0x16> nu = 4096; 815: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 81c: 8b 45 08 mov 0x8(%ebp),%eax 81f: c1 e0 03 shl $0x3,%eax 822: 83 ec 0c sub $0xc,%esp 825: 50 push %eax 826: e8 71 fc ff ff call 49c <sbrk> 82b: 83 c4 10 add $0x10,%esp 82e: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 831: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 835: 75 07 jne 83e <morecore+0x38> return 0; 837: b8 00 00 00 00 mov $0x0,%eax 83c: eb 26 jmp 864 <morecore+0x5e> hp = (Header*)p; 83e: 8b 45 f4 mov -0xc(%ebp),%eax 841: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 844: 8b 45 f0 mov -0x10(%ebp),%eax 847: 8b 55 08 mov 0x8(%ebp),%edx 84a: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 84d: 8b 45 f0 mov -0x10(%ebp),%eax 850: 83 c0 08 add $0x8,%eax 853: 83 ec 0c sub $0xc,%esp 856: 50 push %eax 857: e8 c8 fe ff ff call 724 <free> 85c: 83 c4 10 add $0x10,%esp return freep; 85f: a1 28 0c 00 00 mov 0xc28,%eax } 864: c9 leave 865: c3 ret 00000866 <malloc>: void* malloc(uint nbytes) { 866: 55 push %ebp 867: 89 e5 mov %esp,%ebp 869: 83 ec 18 sub $0x18,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 86c: 8b 45 08 mov 0x8(%ebp),%eax 86f: 83 c0 07 add $0x7,%eax 872: c1 e8 03 shr $0x3,%eax 875: 83 c0 01 add $0x1,%eax 878: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 87b: a1 28 0c 00 00 mov 0xc28,%eax 880: 89 45 f0 mov %eax,-0x10(%ebp) 883: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 887: 75 23 jne 8ac <malloc+0x46> base.s.ptr = freep = prevp = &base; 889: c7 45 f0 20 0c 00 00 movl $0xc20,-0x10(%ebp) 890: 8b 45 f0 mov -0x10(%ebp),%eax 893: a3 28 0c 00 00 mov %eax,0xc28 898: a1 28 0c 00 00 mov 0xc28,%eax 89d: a3 20 0c 00 00 mov %eax,0xc20 base.s.size = 0; 8a2: c7 05 24 0c 00 00 00 movl $0x0,0xc24 8a9: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 8ac: 8b 45 f0 mov -0x10(%ebp),%eax 8af: 8b 00 mov (%eax),%eax 8b1: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 8b4: 8b 45 f4 mov -0xc(%ebp),%eax 8b7: 8b 40 04 mov 0x4(%eax),%eax 8ba: 3b 45 ec cmp -0x14(%ebp),%eax 8bd: 72 4d jb 90c <malloc+0xa6> if(p->s.size == nunits) 8bf: 8b 45 f4 mov -0xc(%ebp),%eax 8c2: 8b 40 04 mov 0x4(%eax),%eax 8c5: 3b 45 ec cmp -0x14(%ebp),%eax 8c8: 75 0c jne 8d6 <malloc+0x70> prevp->s.ptr = p->s.ptr; 8ca: 8b 45 f4 mov -0xc(%ebp),%eax 8cd: 8b 10 mov (%eax),%edx 8cf: 8b 45 f0 mov -0x10(%ebp),%eax 8d2: 89 10 mov %edx,(%eax) 8d4: eb 26 jmp 8fc <malloc+0x96> else { p->s.size -= nunits; 8d6: 8b 45 f4 mov -0xc(%ebp),%eax 8d9: 8b 40 04 mov 0x4(%eax),%eax 8dc: 2b 45 ec sub -0x14(%ebp),%eax 8df: 89 c2 mov %eax,%edx 8e1: 8b 45 f4 mov -0xc(%ebp),%eax 8e4: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 8e7: 8b 45 f4 mov -0xc(%ebp),%eax 8ea: 8b 40 04 mov 0x4(%eax),%eax 8ed: c1 e0 03 shl $0x3,%eax 8f0: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 8f3: 8b 45 f4 mov -0xc(%ebp),%eax 8f6: 8b 55 ec mov -0x14(%ebp),%edx 8f9: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 8fc: 8b 45 f0 mov -0x10(%ebp),%eax 8ff: a3 28 0c 00 00 mov %eax,0xc28 return (void*)(p + 1); 904: 8b 45 f4 mov -0xc(%ebp),%eax 907: 83 c0 08 add $0x8,%eax 90a: eb 3b jmp 947 <malloc+0xe1> } if(p == freep) 90c: a1 28 0c 00 00 mov 0xc28,%eax 911: 39 45 f4 cmp %eax,-0xc(%ebp) 914: 75 1e jne 934 <malloc+0xce> if((p = morecore(nunits)) == 0) 916: 83 ec 0c sub $0xc,%esp 919: ff 75 ec pushl -0x14(%ebp) 91c: e8 e5 fe ff ff call 806 <morecore> 921: 83 c4 10 add $0x10,%esp 924: 89 45 f4 mov %eax,-0xc(%ebp) 927: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 92b: 75 07 jne 934 <malloc+0xce> return 0; 92d: b8 00 00 00 00 mov $0x0,%eax 932: eb 13 jmp 947 <malloc+0xe1> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 934: 8b 45 f4 mov -0xc(%ebp),%eax 937: 89 45 f0 mov %eax,-0x10(%ebp) 93a: 8b 45 f4 mov -0xc(%ebp),%eax 93d: 8b 00 mov (%eax),%eax 93f: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 942: e9 6d ff ff ff jmp 8b4 <malloc+0x4e> } 947: c9 leave 948: c3 ret
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48_notsx.log_21829_352.asm
ljhsiun2/medusa
9
91523
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r8 push %rbp push %rdx // Faulty Load lea addresses_UC+0x4be7, %r10 clflush (%r10) nop nop nop cmp $31538, %rbp movaps (%r10), %xmm5 vpextrq $0, %xmm5, %r8 lea oracles, %rbp and $0xff, %r8 shlq $12, %r8 mov (%rbp,%r8,1), %r8 pop %rdx pop %rbp pop %r8 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC', 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_UC', 'congruent': 0}} <gen_prepare_buffer> {'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 */
asmlib/struct.nasm
fengjixuchui/napoca
170
7525
<filename>asmlib/struct.nasm ; ; Copyright (c) 2020 Bitdefender ; SPDX-License-Identifier: Apache-2.0 ; %ifndef _STRUCT_YASM_ %define _STRUCT_YASM_ %ifdef DOC_FILE struct.nasm - macro definitions for C-like syntax constructs such as struct, enum, sizeof, etc %endif %idefine sizeof(X) X %+ _size ; define one or more dynamically generated symbol name(s) with associated value(s) %macro xdefine 2-* %rep %0/2 ; for each pair %xdefine %1 %2 ; actual definition %rotate 2 ; advance to next pair %endrep %endmacro ; define a dynamically generated symbol as the result of a concatenation of two symbols to avoid early evaluation %macro xconcat 3 %xdefine %1 %2 %+ %3 %endmacro %define _struct _struc %define struct _struc %define _endstruct _endstruc %define endstruct _endstruc %ifdef DOC_METHOD Structure definition start %endif %macro _struc 1 %push struct ; local context for temporary definitions that are discarded at _endstruc %assign %$pos 0 ; local variable to count the occupied bytes %xdefine %$name %1 ; remember the first param (the name of the defined structure type) %assign %$padding_cnt 0 ; a suffix for managing padding fields ; define standard member types available while inside structure definition %idefine byte(x) members x, 1 %idefine word(x) members x, 2 %idefine dword(x) members x, 4 %idefine qword(x) members x, 8 %idefine void(x) members x, 0 %idefine word_align raw_align 2 %idefine dword_align raw_align 4 %idefine qword_align raw_align 8 %idefine raw_align(x) raw_align x %idefine align(x) raw_align x %idefine byte(x,n) members x, 1*n %idefine word(x,n) members x, 2*n %idefine dword(x,n) members x, 4*n %idefine qword(x,n) members x, 8*n %endmacro %ifdef DOC_METHOD Structure definition end %endif %macro _endstruc 0 xdefine %$name %+ _size, %$pos ; ..._size is defined as total occupied bytes (for compatibility with standart 'struct' macro) xdefine %$name %+ _members, {%$members} ; ..._members will remember how each member is defined (useful for structure instantiation) xdefine %$name(X), {substruct X, %$name}, {%$name(X,Y)}, {members X, Y} ; STRUCT_NAME(name) will instantiate the substruct macro ; STRUCT_NAME(name,count) will generate space for an array of n elements %pop ; free all temporary definitions that were used to keep track of members %undef byte %undef word %undef dword %undef qword %undef word_align %undef dword_align %undef qword_align %undef raw_align %undef align %undef void %endmacro %imacro raw_align 1 ; align current structure's pos to a given alignment value by adding a padding field %assign %$value %1 %if %1 == 0 %assign %$value 1 %endif %if (%$pos % %$value) != 0 %assign %$value %$value - (%$pos % %1) members align %+ %$padding_cnt, %$value %assign %$padding_cnt %$padding_cnt + 1 %endif ;%error %$members %endmacro %ifdef DOC_METHOD Definine structure members: list of pairs (name, sizeof) %endif %macro members 2+ %rep %0/2 ; for each pair xdefine %$name %+ . %+ %1, %$pos ; define name.member as pos %assign %$pos %$pos + %2 ; advance pos %ifndef %$members %define %$members %1, %2 ; consider the first pair (member, sizeof) as all members for now %else %xdefine %$tmp %$members ; use an intermediary variable to capture the current list of pairs %define %$members %$tmp, %1, %2 ; append the new pair to the existing list %endif %rotate 2 ; get to the next pair %endrep %endmacro ; RAW(name, bytes) will generate a member 'name' of size = 'bytes' %idefine RAW(x,y) members x, y ; use the members macro to define a member named 'x' of 'y' bytes ; helper macro for 'substruct': generate sub-names and add to the current members list of pairs (name, size) each sub-member with its size %macro generatemembers 3-* %xdefine %$substructure %1 %rotate 1 %rep (%0 - 1)/2 members %$substructure %+ . %+ %1, %2 %rotate 2 %endrep %endmacro %ifdef DOC_METHOD sub-structure inside a structure: generates a .whole_structure definition for where it starts and then member names for each sub-member substruct substruct_name, struct_type %endif %macro substruct 2 members %1, 0 ; generate a dummy member of size 0 for substruct_name generatemembers %1, %2 %+ _members ; generate sub-fields (named like substruct_name.field1, substruct_name.field2, ...) %endmacro %ifdef DOC_METHOD structure instantiation helper: label-like definitions for members %endif %macro GENLABELS 3-* %xdefine %$base %1 ; remember the base (similar to a global label for which sub-labels would be defined %assign %$index 0 ; how many bytes were emitted %rotate 1 ; skip the base part %rep (%0 - 1)/2 ; for each field's pair of (name, size) xdefine %$structstart %+ . %+ %1, (%$structstart + %$index) ; define a global symbol base.subname equal to the address of this field (not just an offset inside structure) %assign %$index %$index + %2 ; get to the next pair %rotate 2 %endrep %endmacro %ifdef DOC_METHOD structure instantiasion _istruc variable_name, structure_type_name %endif %macro _istruc 2 %push istruct ; create a context for some local variables %define %$structname %2 ; remember the structure type %xdefine %$structstart %1 ; remember the address (the '$' symbol) where the structure is being emitted %1: ; generate the actual label which will capture the current value of '$' GENLABELS %1, %{$structname}_members ; define each name.fieldname symbols as label + offset %endmacro ; add optional padding until a given member position and then emit bytes for it %imacro _at 2 xdefine %$temp, %$structname %+ . %+ %1 ; make times %$temp - ($-%$structstart) db 0 %2 %undef %$temp %endmacro %ifdef DOC_METHOD end of a structure instantiasion, this will set to 0 any remaining uninitialized field and free preproc definitions %endif %macro _iend 0 times %{$structname}_size-($-%$structstart) db 0 %pop ; destroy all temporary definitions %endmacro %ifdef DOC_METHOD generate symbols based on a counter optionally given as parameter or considered 0 in the beginning %endif %imacro startenum 0-2 %push ENUM %if %0 >= 1 %assign %$counter %1 %else %assign %$counter 0 %endif %if %0 >= 2 %xdefine %$basename %2 %endif %endmacro %imacro stopenum 0 %ifnctx ENUM %error endenum without matchin enum %else %pop %endif %endmacro %imacro enum 1 %ifnctx ENUM %error endenum without matchin enum %else %xdefine %1 %$counter %assign %$counter %$counter + 1 %endif %endmacro %imacro enumpos 1 %assign %$counter %1 %endmacro %imacro enumbit 1-* %ifnctx ENUM %error endenum without matchin enum %else %rep %0 %ifdef %$basename xdefine %$basename %+ . %+ %1, (1 << %$counter) %else %xdefine %1 (1 << %$counter) %endif %assign %$counter %$counter + 1 %rotate 1 %endrep %endif %endmacro %define as , %macro _with 3-* %define %$name %{1}. %define %$type %2 %define %$delta %3 %rotate 3 %rep (%0-2)/2 %define asijgfyojdlaskjasd (%$delta + %$type %+ . %+ %1) xconcat %$name %+ %1, asijgfyoj, dlaskjasd %rotate 2 %endrep %endmacro %macro with 2-3 ; with rax, STR, delta %push with %if %0 == 2 _with %1, %2, %1, %2 %+ _members %else _with %1, %2, %3, %2 %+ _members %endif %endmacro %macro unconcat 2 %undef %1%2 %endmacro %macro _endwith 0-* %rep %0/2 unconcat %$name, %1 %rotate 2 %endrep %endmacro %macro endwith 0-1 %ifnctx with %error endwith without matching with! %else _endwith %$type %+ _members %pop %endif %endmacro %endif ; _STRUCT_YASM_ %ifdef DOC_FILE Syntax example/use case of the defined macros _struc A word (x) dword (y) _endstruc _struc B word (x) dword (y) A (a) _endstruc _struc C word (x) dword (y) B (b) _endstruc _istruc structura, C _at x, dw 1 _at b.x, dw 2 _iend mov eax, [ebx + C.b.a.x] with eax as C mov [eax.b.x], ax ; => mov [eax + field_offset], ax endwith eax with name as C, rbx + rdi mov [name.b.x], ax ; => mov [rbx+rdi + field_offset], ax endwith name mov ecx, [structura.b.x] mov ecx, [structura.b.a.y] %endif
_build/dispatcher/jmp_ippsDLPGetSize_1b609b9b.asm
zyktrcn/ippcp
1
241610
<reponame>zyktrcn/ippcp extern m7_ippsDLPGetSize:function extern n8_ippsDLPGetSize:function extern y8_ippsDLPGetSize:function extern e9_ippsDLPGetSize:function extern l9_ippsDLPGetSize:function extern n0_ippsDLPGetSize:function extern k0_ippsDLPGetSize:function extern ippcpJumpIndexForMergedLibs extern ippcpSafeInit:function segment .data align 8 dq .Lin_ippsDLPGetSize .Larraddr_ippsDLPGetSize: dq m7_ippsDLPGetSize dq n8_ippsDLPGetSize dq y8_ippsDLPGetSize dq e9_ippsDLPGetSize dq l9_ippsDLPGetSize dq n0_ippsDLPGetSize dq k0_ippsDLPGetSize segment .text global ippsDLPGetSize:function (ippsDLPGetSize.LEndippsDLPGetSize - ippsDLPGetSize) .Lin_ippsDLPGetSize: db 0xf3, 0x0f, 0x1e, 0xfa call ippcpSafeInit wrt ..plt align 16 ippsDLPGetSize: db 0xf3, 0x0f, 0x1e, 0xfa mov rax, qword [rel ippcpJumpIndexForMergedLibs wrt ..gotpc] movsxd rax, dword [rax] lea r11, [rel .Larraddr_ippsDLPGetSize] mov r11, qword [r11+rax*8] jmp r11 .LEndippsDLPGetSize:
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_21_1668.asm
ljhsiun2/medusa
9
25875
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x1ed0c, %rdi xor %r9, %r9 vmovups (%rdi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $1, %xmm5, %rbx nop nop nop nop cmp %rdx, %rdx lea addresses_UC_ht+0x15cde, %rsi lea addresses_UC_ht+0x7a0c, %rdi nop add $27736, %r9 mov $50, %rcx rep movsw nop nop nop nop nop and $38677, %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r8 push %rax push %rcx // Store mov $0xd2c, %r10 nop nop nop nop xor %r14, %r14 movw $0x5152, (%r10) nop nop nop nop sub $37805, %r10 // Faulty Load lea addresses_PSE+0xfd0c, %r8 nop nop nop and $7978, %r14 mov (%r8), %rcx lea oracles, %r14 and $0xff, %rcx shlq $12, %rcx mov (%r14,%rcx,1), %rcx pop %rcx pop %rax pop %r8 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': True}} {'33': 21} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
randomly-solved-programs/for loop.asm
informramiz/Assembly-Language-Programs
0
80454
<filename>randomly-solved-programs/for loop.asm .MODEL SMALL .STACK 100H .DATA MSG1 DB 'ENTER A NUMBER IN HEX (A-F) : $' MSG2 DB 0DH,0AH,'NUMBER IN DECIMAL IS: $' .CODE MAIN PROC MOV CX,80 MOV AH,2 MOV DL,'*' TOP: INT 21H JCXZ EXIT LOOP TOP EXIT: MOV AH,4CH INT 21H MAIN ENDP END MAIN
src/tom/library/sl/ada/abstractstrategypackage.ads
rewriting/tom
36
2515
<reponame>rewriting/tom with ObjectPack, StrategyPackage, EnvironmentPackage, IntrospectorPackage, VisitablePackage, PositionPackage; use ObjectPack, StrategyPackage, EnvironmentPackage, IntrospectorPackage, VisitablePackage, PositionPackage; package AbstractStrategyPackage is type AbstractStrategy is abstract new Strategy and Object with record env: EnvironmentPtr := null; end record; type AbstractStrategyPtr is access all AbstractStrategy'Class; ---------------------------------------------------------------------------- -- Strategy implementation ---------------------------------------------------------------------------- function visit(str: access AbstractStrategy; any: access Environment) return VisitablePtr; function visit(str: access AbstractStrategy; any: VisitablePtr) return VisitablePtr; function visit(str: access AbstractStrategy; envt: access Environment; i: access Introspector'Class) return ObjectPtr; function visit(str: access AbstractStrategy; any: ObjectPtr; i: access Introspector'Class) return ObjectPtr; function visitLight(str: access AbstractStrategy; any: VisitablePtr) return VisitablePtr; function getEnvironment(str: AbstractStrategy) return access Environment; procedure setEnvironment(str: in out AbstractStrategy; env: access Environment); ---------------------------------------------------------------------------- function getRoot(str: AbstractStrategy) return ObjectPtr; procedure setRoot(str: in out AbstractStrategy; any: ObjectPtr); function getSubject(str: AbstractStrategy) return ObjectPtr; procedure setSubject(str: in out AbstractStrategy; any: ObjectPtr); function getPosition(str: AbstractStrategy) return Position; function getAncestor(str: AbstractStrategy) return ObjectPtr; procedure init(str: in out Strategy'Class; i: IntrospectorPtr); procedure init(str: in out Strategy'Class; env: access Environment); ---------------------------------------------------------------------------- end AbstractStrategyPackage;
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c8/c86003a.ada
best08618/asylo
7
17374
-- C86003A.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 'STANDARD' IS NOT TREATED AS A RESERVED WORD IN -- SELECTED COMPONENT NAMES. -- RM 01/21/80 -- EG 10/29/85 ELIMINATE THE USE OF NUMERIC_ERROR IN TEST. -- RLB 06/29/01 CORRECTED TO ALLOW AGGRESSIVE OPTIMIZATION. WITH REPORT ; PROCEDURE C86003A IS USE REPORT ; BEGIN TEST("C86003A" , "CHECK THAT 'STANDARD' IS NOT TREATED AS A" & " RESERVED WORD IN SELECTED COMPONENT NAMES" ); DECLARE -- A BEGIN DECLARE PACKAGE STANDARD IS CHARACTER : BOOLEAN ; TYPE INTEGER IS (FALSE, TRUE) ; CONSTRAINT_ERROR : EXCEPTION ; END STANDARD ; TYPE REC2 IS RECORD AA , BB : BOOLEAN := FALSE ; END RECORD; TYPE REC1 IS RECORD STANDARD : REC2 ; END RECORD; A : REC1 ; TYPE ASI IS ACCESS STANDARD.INTEGER ; VASI : ASI ; VI : INTEGER RANGE 1 .. 10; -- THE "REAL" STANDARD -- TYPE 'INTEGER' BEGIN VASI := NEW STANDARD.INTEGER'(STANDARD.FALSE); STANDARD.CHARACTER := A.STANDARD.BB ; IF STANDARD.CHARACTER THEN FAILED( "RES. (VAR.)" ); END IF; VI := IDENT_INT(11); -- TO CAUSE THE "REAL" -- (PREDEFINED) CONSTRAINT_ERROR -- EXCEPTION. IF VI /= IDENT_INT(11) THEN FAILED ("WRONG VALUE - V1"); ELSE FAILED ("OUT OF RANGE VALUE - V1"); END IF; EXCEPTION WHEN STANDARD.CONSTRAINT_ERROR => FAILED ("RES. (EXC.)"); WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED - A"); END ; EXCEPTION WHEN OTHERS => FAILED( "EXCEPTION RAISED BY DECL. (A)" ); END ; -- A DECLARE -- B TYPE REC IS RECORD INTEGER : BOOLEAN := FALSE ; END RECORD; STANDARD : REC ; BEGIN IF STANDARD.INTEGER THEN FAILED( "RESERVED - REC.,INT."); END IF; END ; -- B RESULT ; END C86003A ;
Assembly/room_object_table.asm
CaitSith2/Enemizer
0
17000
modified_room_object_table: ; Enemizer will write to here skip #$1000
awa/plugins/awa-counters/src/awa-counters-components.adb
fuzzysloth/ada-awa
81
2092
----------------------------------------------------------------------- -- awa-counters-components -- Counter UI component -- Copyright (C) 2015 <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 Util.Beans.Objects; with Util.Beans.Basic; with AWA.Counters.Beans; with ASF.Components.Base; with ASF.Views.Nodes; with ASF.Utils; with ASF.Contexts.Writer; package body AWA.Counters.Components is TEXT_ATTRIBUTE_NAMES : Util.Strings.String_Set.Set; function Create_Counter return ASF.Components.Base.UIComponent_Access; -- ------------------------------ -- Create a UICounter component. -- ------------------------------ function Create_Counter return ASF.Components.Base.UIComponent_Access is begin return new UICounter; end Create_Counter; URI : aliased constant String := "http://code.google.com/p/ada-awa/jsf"; COUNTER_TAG : aliased constant String := "counter"; AWA_Bindings : aliased constant ASF.Factory.Binding_Array := (1 => (Name => COUNTER_TAG'Access, Component => Create_Counter'Access, Tag => ASF.Views.Nodes.Create_Component_Node'Access) ); AWA_Factory : aliased constant ASF.Factory.Factory_Bindings := (URI => URI'Access, Bindings => AWA_Bindings'Access); -- ------------------------------ -- Get the AWA Counter component factory. -- ------------------------------ function Definition return ASF.Factory.Factory_Bindings_Access is begin return AWA_Factory'Access; end Definition; -- ------------------------------ -- Check if the counter value is hidden. -- ------------------------------ function Is_Hidden (UI : in UICounter; Context : in ASF.Contexts.Faces.Faces_Context'Class) return Boolean is Value : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, "hidden"); begin return Util.Beans.Objects.To_Boolean (Value); end Is_Hidden; -- ------------------------------ -- Render the counter component. Starts the DL/DD list and write the input -- component with the possible associated error message. -- ------------------------------ overriding procedure Encode_Begin (UI : in UICounter; Context : in out ASF.Contexts.Faces.Faces_Context'Class) is begin if not UI.Is_Rendered (Context) then return; end if; declare Value : constant Util.Beans.Objects.Object := UI.Get_Attribute (Context, "value"); Bean : constant access Util.Beans.Basic.Readonly_Bean'Class := Util.Beans.Objects.To_Bean (Value); Writer : constant ASF.Contexts.Writer.Response_Writer_Access := Context.Get_Response_Writer; Counter : AWA.Counters.Beans.Counter_Bean_Access; begin if Bean = null then ASF.Components.Base.Log_Error (UI, "There is no counter bean value"); return; elsif not (Bean.all in AWA.Counters.Beans.Counter_Bean'Class) then ASF.Components.Base.Log_Error (UI, "The bean value is not a Counter_Bean"); return; end if; Counter := AWA.Counters.Beans.Counter_Bean'Class (Bean.all)'Unchecked_Access; -- Increment the counter associated with the optional key. AWA.Counters.Increment (Counter => Counter.Counter, Key => Counter.Object); -- Render the counter within an optional <span>. if Counter.Value >= 0 and not UI.Is_Hidden (Context) then Writer.Start_Optional_Element ("span"); UI.Render_Attributes (Context, TEXT_ATTRIBUTE_NAMES, Writer); Writer.Write_Text (Integer'Image (Counter.Value)); Writer.End_Optional_Element ("span"); end if; end; end Encode_Begin; begin ASF.Utils.Set_Text_Attributes (TEXT_ATTRIBUTE_NAMES); end AWA.Counters.Components;
mc-sema/validator/x86/tests/PBLENDVBrr.asm
randolphwong/mcsema
2
24452
<reponame>randolphwong/mcsema BITS 32 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_SF|FLAG_OF|FLAG_PF ;TEST_FILE_META_END ; allocate 16 byte aligned stack space for the packed values ;TEST_BEGIN_RECORDING lea ecx, [esp-0x20] and ecx, 0xfffffff0 ; load a 128 bit value into xmm0 mov DWORD [ecx], 0x55555555 mov DWORD [ecx+4], 0x14530451 mov DWORD [ecx+8], 0x1badb002 mov DWORD [ecx+12], 0xf0f0f0f0 movaps xmm2, [ecx] ; load a 128 bit value into xmm1 mov DWORD [ecx], 0xaaaaaaaa mov DWORD [ecx+4], 0xcafebabe mov DWORD [ecx+8], 0x2badb002 mov DWORD [ecx+12], 0x0e0e0e0e movaps xmm1, [ecx] ; load a 128 bit value into xmm1 mov DWORD [ecx], 0xf010803a mov DWORD [ecx+4], 0x21fe2abe mov DWORD [ecx+8], 0x3b087072 mov DWORD [ecx+12], 0x1e0efe0e movaps xmm0, [ecx] pblendvb xmm1, xmm2, xmm0 mov ecx, 0 ;TEST_END_RECORDING xor ecx, ecx cvtsi2sd xmm0, ecx cvtsi2sd xmm1, ecx
Baldecchi_Code/main.s3d.asm
silviobacci/Virtual_and_Augmented_Reality_FPS
2
170243
0: PUSHN 0 1: CALLX 16 :CVMMOUSE 0 2: POP G0:MOUSE 3: CALLX 10 :CVMJOYSTICK 0 4: POP G1:JOYSTICK 5: CALLX 13 :CVMMMAVI 0 6: POP G2:MMAVI 7: CALLX 15 :CVMMMMP3 0 8: POP G3:MMMP3 9: CALLX 14 :CVMMMMIDI 0 10: POP G4:MMMIDI 11: MOV 45 G159:A 12: MOV <cVct0 [ 0 , 30 , 30 ]> G160:CAMPOS 13: MOV False G162:SWITCHED_VIEW 14: MOV True G163:IS_FIRST 15: MOV 0 G164:LAST_MOUSE_X 16: MOV 0 G165:LAST_MOUSE_Y 17: MOV 0 G166:LAST_MOUSE_Z 18: MOV 0 G167:LAST_DELTAX 19: MOV 0 G168:COUNTER 20: MOV 0 G169:MESHROT_X 21: MOV 0 G170:MESHROT_Y 22: MOV 8 G171:OFFSET_W 23: MOV 30 G172:OFFSET_H 24: MOV 0 G173:MESHROT_Y_CUMULATIVE 25: MOV 0 G174:MESHROT_X_CUMULATIVE 26: MOV 1.2 G175:RHO 27: MOV <cVct1 [ 0 , 10 , 10 ]> G177:POSL 28: RET 29: PUSHN 8 30: JNV P1:CAM Quad:33 31: CALLX 2 :CAMERAGETCURRENT 0 32: POP P1:CAM 33: JNV P2:ROT_SENSITIVITY_X Quad:35 34: MOV 0.025 P2:ROT_SENSITIVITY_X 35: JNV P3:ROT_SENSITIVITY_Y Quad:37 36: MOV 0.01 P3:ROT_SENSITIVITY_Y 37: JNV S7:$STATIC$_00000001_#FLAG_000008# Quad:41 38: MOV 1 S5:$STATIC$_00000019_INERTIA 39: MOV 1 S6:$STATIC$_00000008_$VALUE_INERTIA$ 40: MOV 1 S7:$STATIC$_00000001_#FLAG_000008# 41: JNV S10:$STATIC$_00000002_#FLAG_000011# Quad:45 42: MOV 0 S8:$STATIC$_00000022_LASTDX 43: MOV 0 S9:$STATIC$_00000011_$VALUE_LASTDX$ 44: MOV 1 S10:$STATIC$_00000002_#FLAG_000011# 45: JNV S13:$STATIC$_00000003_#FLAG_000014# Quad:49 46: MOV 0 S11:$STATIC$_00000023_LASTDY 47: MOV 0 S12:$STATIC$_00000012_$VALUE_LASTDY$ 48: MOV 1 S13:$STATIC$_00000003_#FLAG_000014# 49: MOV False BP(1) 50: JNV S18:$STATIC$_00000004_#FLAG_000019# Quad:56 51: MOV False S14:$STATIC$_00000021_INMOUSER 52: MOV False S15:$STATIC$_00000010_$VALUE_INMOUSER$ 53: MOV False S16:$STATIC$_00000020_INMOUSEL 54: MOV False S17:$STATIC$_00000009_$VALUE_INMOUSEL$ 55: MOV 1 S18:$STATIC$_00000004_#FLAG_000019# 56: JNV S23:$STATIC$_00000005_#FLAG_000024# Quad:62 57: MOV 0 S19:$STATIC$_00000024_PRECX 58: MOV 0 S20:$STATIC$_00000013_$VALUE_PRECX$ 59: MOV 0 S21:$STATIC$_00000025_PRECY 60: MOV 0 S22:$STATIC$_00000014_$VALUE_PRECY$ 61: MOV 1 S23:$STATIC$_00000005_#FLAG_000024# 62: JNV S28:$STATIC$_00000006_#FLAG_000029# Quad:68 63: MOV 0 S24:$STATIC$_00000026_ROTX 64: MOV 0 S25:$STATIC$_00000015_$VALUE_ROTX$ 65: MOV 0 S26:$STATIC$_00000027_ROTY 66: MOV 0 S27:$STATIC$_00000016_$VALUE_ROTY$ 67: MOV 1 S28:$STATIC$_00000006_#FLAG_000029# 68: JNV S33:$STATIC$_00000007_#FLAG_000034# Quad:74 69: MOV S24:$STATIC$_00000026_ROTX S29:$STATIC$_00000028_X 70: MOV S24:$STATIC$_00000026_ROTX S30:$STATIC$_00000017_$VALUE_X$ 71: MOV S26:$STATIC$_00000027_ROTY S31:$STATIC$_00000029_Y 72: MOV S26:$STATIC$_00000027_ROTY S32:$STATIC$_00000018_$VALUE_Y$ 73: MOV 1 S33:$STATIC$_00000007_#FLAG_000034# 74: JNV P4:INERTIA_FRAMES Quad:77 75: MOV False BP(1) 76: JMP Quad:80 77: JNEQ P4:INERTIA_FRAMES 0 Quad:80 78: MOV True BP(1) 79: JMP Quad:80 80: MGET G0:MOUSE m_0 BP(4) 81: SUB BP(4) S19:$STATIC$_00000024_PRECX BP(2) 82: MGET G0:MOUSE m_1 BP(4) 83: SUB BP(4) S21:$STATIC$_00000025_PRECY BP(3) 84: MGET G0:MOUSE m_2 BP(4) 85: JNB BP(4) Quad:102 86: JNB S16:$STATIC$_00000020_INMOUSEL Quad:98 87: MUL BP(2) P2:ROT_SENSITIVITY_X BP(4) 88: ADD BP(4) S29:$STATIC$_00000028_X 89: MUL BP(3) P3:ROT_SENSITIVITY_Y BP(4) 90: SUB BP(4) S31:$STATIC$_00000029_Y 91: MOV BP(2) S8:$STATIC$_00000022_LASTDX 92: MOV BP(3) S11:$STATIC$_00000023_LASTDY 93: JLEQ S31:$STATIC$_00000029_Y 70 Quad:95 94: MOV 70 S31:$STATIC$_00000029_Y 95: JGEQ S31:$STATIC$_00000029_Y -70 Quad:100 96: MOV -70 S31:$STATIC$_00000029_Y 97: JMP Quad:100 98: MGET G0:MOUSE m_0 S19:$STATIC$_00000024_PRECX 99: MGET G0:MOUSE m_1 S21:$STATIC$_00000025_PRECY 100: MOV True S16:$STATIC$_00000020_INMOUSEL 101: JMP Quad:115 102: JNB S16:$STATIC$_00000020_INMOUSEL Quad:115 103: JLEQ S5:$STATIC$_00000019_INERTIA 0 Quad:105 104: JNB BP(1) Quad:108 105: MOV False S16:$STATIC$_00000020_INMOUSEL 106: MOV 1 S5:$STATIC$_00000019_INERTIA 107: JMP Quad:115 108: MUL S8:$STATIC$_00000022_LASTDX S5:$STATIC$_00000019_INERTIA BP(4) 109: MUL P2:ROT_SENSITIVITY_X BP(4) 110: ADD BP(4) S29:$STATIC$_00000028_X 111: MUL S11:$STATIC$_00000023_LASTDY S5:$STATIC$_00000019_INERTIA BP(4) 112: MUL P3:ROT_SENSITIVITY_Y BP(4) 113: SUB BP(4) S31:$STATIC$_00000029_Y 114: SUB 0.05 S5:$STATIC$_00000019_INERTIA 115: NEG S31:$STATIC$_00000029_Y BP(4) 116: PUSH 0 117: PUSH 0 118: PUSH 1 119: PUSH BP(4) 120: CALLM P1:CAM m_3 4 121: POPN 5 122: PUSH 0 123: PUSH 1 124: PUSH 0 125: PUSH S29:$STATIC$_00000028_X 126: CALLM P1:CAM m_4 4 127: POPN 5 128: RET Void 129: PUSHN 13 130: MOV False BP(1) 131: JNV S36:$STATIC$_00000030_#FLAG_000037# Quad:135 132: MOV 1 S34:$STATIC$_00000049_INERTIA 133: MOV 1 S35:$STATIC$_00000039_$VALUE_INERTIA$ 134: MOV 1 S36:$STATIC$_00000030_#FLAG_000037# 135: MOV 0.025 BP(2) 136: JNV S39:$STATIC$_00000031_#FLAG_000040# Quad:140 137: MOV 0 S37:$STATIC$_00000052_LASTDX 138: MOV 0 S38:$STATIC$_00000042_$VALUE_LASTDX$ 139: MOV 1 S39:$STATIC$_00000031_#FLAG_000040# 140: JNV S42:$STATIC$_00000032_#FLAG_000043# Quad:144 141: MOV 0 S40:$STATIC$_00000053_LASTDY 142: MOV 0 S41:$STATIC$_00000043_$VALUE_LASTDY$ 143: MOV 1 S42:$STATIC$_00000032_#FLAG_000043# 144: JNV S45:$STATIC$_00000033_#FLAG_000046# Quad:148 145: MOV False S43:$STATIC$_00000048_FLYING 146: MOV False S44:$STATIC$_00000038_$VALUE_FLYING$ 147: MOV 1 S45:$STATIC$_00000033_#FLAG_000046# 148: JNV S48:$STATIC$_00000034_#FLAG_000049# Quad:152 149: MOV 0 S46:$STATIC$_00000056_XANGLE 150: MOV 0 S47:$STATIC$_00000046_$VALUE_XANGLE$ 151: MOV 1 S48:$STATIC$_00000034_#FLAG_000049# 152: JNV S51:$STATIC$_00000035_#FLAG_000052# Quad:156 153: MOV 0 S49:$STATIC$_00000057_YANGLE 154: MOV 0 S50:$STATIC$_00000047_$VALUE_YANGLE$ 155: MOV 1 S51:$STATIC$_00000035_#FLAG_000052# 156: JNV P1:CAM Quad:159 157: CALLX 2 :CAMERAGETCURRENT 0 158: POP P1:CAM 159: JNV P2:ROT_SENSITIVITY Quad:161 160: MOV 0.01 P2:ROT_SENSITIVITY 161: JNV P3:TRASL_SENSITIVITY Quad:163 162: MOV 0.001 P3:TRASL_SENSITIVITY 163: JNV P4:YTRASL_SENSITIVITY Quad:165 164: MOV 0.01 P4:YTRASL_SENSITIVITY 165: JNV P5:INERTIA_FRAMES Quad:169 166: MOV False BP(1) 167: MOV 0.025 BP(2) 168: JMP Quad:173 169: JNEQ P5:INERTIA_FRAMES 0 Quad:172 170: MOV True BP(1) 171: JMP Quad:173 172: DIV 1 P5:INERTIA_FRAMES BP(2) 173: JNV P6:DOACTUALROTATION Quad:175 174: MOV True P6:DOACTUALROTATION 175: CALLM P1:CAM m_5 0 176: POP BP(3) 177: JNV S56:$STATIC$_00000036_#FLAG_000057# Quad:183 178: MOV False S52:$STATIC$_00000051_INMOUSER 179: MOV False S53:$STATIC$_00000041_$VALUE_INMOUSER$ 180: MOV False S54:$STATIC$_00000050_INMOUSEL 181: MOV False S55:$STATIC$_00000040_$VALUE_INMOUSEL$ 182: MOV 1 S56:$STATIC$_00000036_#FLAG_000057# 183: JNV S61:$STATIC$_00000037_#FLAG_000062# Quad:189 184: MOV 0 S57:$STATIC$_00000054_PRECX 185: MOV 0 S58:$STATIC$_00000044_$VALUE_PRECX$ 186: MOV 0 S59:$STATIC$_00000055_PRECY 187: MOV 0 S60:$STATIC$_00000045_$VALUE_PRECY$ 188: MOV 1 S61:$STATIC$_00000037_#FLAG_000062# 189: MGET G0:MOUSE m_0 BP(6) 190: SUB BP(6) S57:$STATIC$_00000054_PRECX BP(4) 191: MGET G0:MOUSE m_1 BP(6) 192: SUB BP(6) S59:$STATIC$_00000055_PRECY BP(5) 193: MGET G0:MOUSE m_2 BP(6) 194: JNB BP(6) Quad:225 195: MGET G0:MOUSE m_6 BP(6) 196: JB BP(6) Quad:225 197: JNB S54:$STATIC$_00000050_INMOUSEL Quad:220 198: JNB P6:DOACTUALROTATION Quad:207 199: MUL BP(4) P2:ROT_SENSITIVITY BP(6) 200: PUSH 0 201: PUSH 1 202: PUSH 0 203: PUSH BP(6) 204: CALLM P1:CAM m_4 4 205: POPN 5 206: JMP Quad:209 207: MUL BP(4) P2:ROT_SENSITIVITY BP(6) 208: ADD BP(6) S49:$STATIC$_00000057_YANGLE 209: CALLM P1:CAM m_7 0 210: POP BP(6) 211: MUL BP(5) P3:TRASL_SENSITIVITY BP(7) 212: MUL BP(3) BP(7) 213: ADD BP(7) BP(6) 214: PUSH BP(6) 215: CALLM P1:CAM m_8 1 216: POPN 2 217: MOV BP(4) S37:$STATIC$_00000052_LASTDX 218: MOV BP(5) S40:$STATIC$_00000053_LASTDY 219: JMP Quad:222 220: MGET G0:MOUSE m_0 S57:$STATIC$_00000054_PRECX 221: MGET G0:MOUSE m_1 S59:$STATIC$_00000055_PRECY 222: MOV True S54:$STATIC$_00000050_INMOUSEL 223: MOV False S52:$STATIC$_00000051_INMOUSER 224: JMP Quad:293 225: MGET G0:MOUSE m_6 BP(6) 226: JNB BP(6) Quad:246 227: JNB S52:$STATIC$_00000051_INMOUSER Quad:241 228: CALLM P1:CAM m_7 0 229: POP BP(6) 230: VNEW 3 BP(7) 231: NEG BP(5) BP(8) 232: MUL P4:YTRASL_SENSITIVITY BP(8) 233: SET BP(8) 1 BP(7) 234: ADD BP(7) BP(6) 235: PUSH BP(6) 236: CALLM P1:CAM m_8 1 237: POPN 2 238: MOV BP(4) S37:$STATIC$_00000052_LASTDX 239: MOV BP(5) S40:$STATIC$_00000053_LASTDY 240: JMP Quad:243 241: MGET G0:MOUSE m_0 S57:$STATIC$_00000054_PRECX 242: MGET G0:MOUSE m_1 S59:$STATIC$_00000055_PRECY 243: MOV True S52:$STATIC$_00000051_INMOUSER 244: MOV False S54:$STATIC$_00000050_INMOUSEL 245: JMP Quad:293 246: JNB BP(1) Quad:250 247: MOV False S52:$STATIC$_00000051_INMOUSER 248: MOV False S54:$STATIC$_00000050_INMOUSEL 249: JMP Quad:293 250: JNB S54:$STATIC$_00000050_INMOUSEL Quad:277 251: JNB P6:DOACTUALROTATION Quad:261 252: MUL S34:$STATIC$_00000049_INERTIA BP(4) BP(6) 253: MUL P2:ROT_SENSITIVITY BP(6) 254: PUSH 0 255: PUSH 1 256: PUSH 0 257: PUSH BP(6) 258: CALLM P1:CAM m_4 4 259: POPN 5 260: JMP Quad:264 261: MUL S34:$STATIC$_00000049_INERTIA BP(4) BP(6) 262: MUL P2:ROT_SENSITIVITY BP(6) 263: ADD BP(6) S49:$STATIC$_00000057_YANGLE 264: CALLM P1:CAM m_7 0 265: POP BP(6) 266: MUL S34:$STATIC$_00000049_INERTIA BP(5) BP(7) 267: MUL P3:TRASL_SENSITIVITY BP(7) 268: MUL BP(3) BP(7) 269: ADD BP(7) BP(6) 270: PUSH BP(6) 271: CALLM P1:CAM m_8 1 272: POPN 2 273: SUB BP(2) S34:$STATIC$_00000049_INERTIA 274: JGR S34:$STATIC$_00000049_INERTIA 0 Quad:277 275: MOV False S54:$STATIC$_00000050_INMOUSEL 276: MOV 1 S34:$STATIC$_00000049_INERTIA 277: JNB S52:$STATIC$_00000051_INMOUSER Quad:293 278: CALLM P1:CAM m_7 0 279: POP BP(6) 280: VNEW 3 BP(7) 281: NEG S34:$STATIC$_00000049_INERTIA BP(8) 282: MUL BP(5) BP(8) 283: MUL P4:YTRASL_SENSITIVITY BP(8) 284: SET BP(8) 1 BP(7) 285: ADD BP(7) BP(6) 286: PUSH BP(6) 287: CALLM P1:CAM m_8 1 288: POPN 2 289: SUB BP(2) S34:$STATIC$_00000049_INERTIA 290: JGR S34:$STATIC$_00000049_INERTIA 0 Quad:293 291: MOV False S52:$STATIC$_00000051_INMOUSER 292: MOV 1 S34:$STATIC$_00000049_INERTIA 293: VNEW 2 BP(6) 294: SET S46:$STATIC$_00000056_XANGLE 0 BP(6) 295: SET S49:$STATIC$_00000057_YANGLE 1 BP(6) 296: RET BP(6) 297: PUSHN 28 298: MOV False BP(1) 299: JNV S64:$STATIC$_00000058_#FLAG_000065# Quad:303 300: MOV 1 S62:$STATIC$_00000077_INERTIA 301: MOV 1 S63:$STATIC$_00000067_$VALUE_INERTIA$ 302: MOV 1 S64:$STATIC$_00000058_#FLAG_000065# 303: MOV 0.025 BP(2) 304: JNV S67:$STATIC$_00000059_#FLAG_000068# Quad:308 305: MOV 0 S65:$STATIC$_00000080_LASTDX 306: MOV 0 S66:$STATIC$_00000070_$VALUE_LASTDX$ 307: MOV 1 S67:$STATIC$_00000059_#FLAG_000068# 308: JNV S70:$STATIC$_00000060_#FLAG_000071# Quad:312 309: MOV 0 S68:$STATIC$_00000081_LASTDY 310: MOV 0 S69:$STATIC$_00000071_$VALUE_LASTDY$ 311: MOV 1 S70:$STATIC$_00000060_#FLAG_000071# 312: JNV S73:$STATIC$_00000061_#FLAG_000074# Quad:316 313: MOV False S71:$STATIC$_00000076_FLYING 314: MOV False S72:$STATIC$_00000066_$VALUE_FLYING$ 315: MOV 1 S73:$STATIC$_00000061_#FLAG_000074# 316: JNV S76:$STATIC$_00000062_#FLAG_000077# Quad:320 317: MOV 0 S74:$STATIC$_00000084_XANGLE 318: MOV 0 S75:$STATIC$_00000074_$VALUE_XANGLE$ 319: MOV 1 S76:$STATIC$_00000062_#FLAG_000077# 320: JNV S79:$STATIC$_00000063_#FLAG_000080# Quad:324 321: MOV 0 S77:$STATIC$_00000085_YANGLE 322: MOV 0 S78:$STATIC$_00000075_$VALUE_YANGLE$ 323: MOV 1 S79:$STATIC$_00000063_#FLAG_000080# 324: JNV P1:CAM Quad:327 325: CALLX 2 :CAMERAGETCURRENT 0 326: POP P1:CAM 327: JNV P2:TRASL_SENSITIVITY Quad:329 328: MOV 0.001 P2:TRASL_SENSITIVITY 329: JNV P3:ROT_SENSITIVITY Quad:331 330: MOV 0.01 P3:ROT_SENSITIVITY 331: JNV P4:INERTIA_FRAMES Quad:335 332: MOV False BP(1) 333: MOV 0.025 BP(2) 334: JMP Quad:339 335: JNEQ P4:INERTIA_FRAMES 0 Quad:338 336: MOV True BP(1) 337: JMP Quad:339 338: DIV 1 P4:INERTIA_FRAMES BP(2) 339: JNV P5:DOACTUALROTATION Quad:341 340: MOV True P5:DOACTUALROTATION 341: CALLM P1:CAM m_9 0 342: POP BP(4) 343: CALLM P1:CAM m_10 0 344: POP BP(3) 345: CALLM P1:CAM m_5 0 346: POP BP(5) 347: JNV S84:$STATIC$_00000064_#FLAG_000085# Quad:353 348: MOV False S80:$STATIC$_00000079_INMOUSER 349: MOV False S81:$STATIC$_00000069_$VALUE_INMOUSER$ 350: MOV False S82:$STATIC$_00000078_INMOUSEL 351: MOV False S83:$STATIC$_00000068_$VALUE_INMOUSEL$ 352: MOV 1 S84:$STATIC$_00000064_#FLAG_000085# 353: JNV S89:$STATIC$_00000065_#FLAG_000090# Quad:359 354: MOV 0 S85:$STATIC$_00000082_PRECX 355: MOV 0 S86:$STATIC$_00000072_$VALUE_PRECX$ 356: MOV 0 S87:$STATIC$_00000083_PRECY 357: MOV 0 S88:$STATIC$_00000073_$VALUE_PRECY$ 358: MOV 1 S89:$STATIC$_00000065_#FLAG_000090# 359: MGET G0:MOUSE m_0 BP(8) 360: SUB BP(8) S85:$STATIC$_00000082_PRECX BP(6) 361: MGET G0:MOUSE m_1 BP(8) 362: SUB BP(8) S87:$STATIC$_00000083_PRECY BP(7) 363: MGET G0:MOUSE m_2 BP(8) 364: JNB BP(8) Quad:397 365: MGET G0:MOUSE m_6 BP(8) 366: JB BP(8) Quad:397 367: JNB S82:$STATIC$_00000078_INMOUSEL Quad:391 368: JNB P5:DOACTUALROTATION Quad:384 369: MUL BP(6) P3:ROT_SENSITIVITY BP(8) 370: PUSH 0 371: PUSH 1 372: PUSH 0 373: PUSH BP(8) 374: CALLM P1:CAM m_4 4 375: POPN 5 376: MUL BP(7) P3:ROT_SENSITIVITY BP(8) 377: PUSH 0 378: PUSH 0 379: PUSH 1 380: PUSH BP(8) 381: CALLM P1:CAM m_11 4 382: POPN 5 383: JMP Quad:388 384: MUL BP(7) P3:ROT_SENSITIVITY BP(8) 385: ADD BP(8) S74:$STATIC$_00000084_XANGLE 386: MUL BP(6) P3:ROT_SENSITIVITY BP(8) 387: ADD BP(8) S77:$STATIC$_00000085_YANGLE 388: MOV BP(6) S65:$STATIC$_00000080_LASTDX 389: MOV BP(7) S68:$STATIC$_00000081_LASTDY 390: JMP Quad:393 391: MGET G0:MOUSE m_0 S85:$STATIC$_00000082_PRECX 392: MGET G0:MOUSE m_1 S87:$STATIC$_00000083_PRECY 393: MOV True S82:$STATIC$_00000078_INMOUSEL 394: MOV False S80:$STATIC$_00000079_INMOUSER 395: MOV False S71:$STATIC$_00000076_FLYING 396: JMP Quad:512 397: MGET G0:MOUSE m_6 BP(8) 398: JNB BP(8) Quad:443 399: JNB S80:$STATIC$_00000079_INMOUSER Quad:438 400: MGET G0:MOUSE m_2 BP(8) 401: JB BP(8) Quad:407 402: PUSH 17 403: CALLX 33 :KEYPRESSED 1 404: POP BP(8) 405: POPN 1 406: JNB BP(8) Quad:420 407: NEG BP(3) BP(8) 408: MGET G0:MOUSE m_1 BP(9) 409: SUB S87:$STATIC$_00000083_PRECY BP(9) 410: MUL BP(9) BP(8) 411: CALLM P1:CAM m_7 0 412: POP BP(9) 413: MUL BP(8) P2:TRASL_SENSITIVITY BP(10) 414: ADD BP(10) BP(9) 415: PUSH BP(9) 416: CALLM P1:CAM m_8 1 417: POPN 2 418: MOV True S71:$STATIC$_00000076_FLYING 419: JMP Quad:435 420: MGET G0:MOUSE m_0 BP(9) 421: SUB S85:$STATIC$_00000082_PRECX BP(9) 422: MUL BP(4) BP(9) 423: MGET G0:MOUSE m_1 BP(10) 424: SUB S87:$STATIC$_00000083_PRECY BP(10) 425: MUL BP(5) BP(10) 426: CALLM P1:CAM m_7 0 427: POP BP(11) 428: ADD BP(10) BP(9) BP(12) 429: MUL P2:TRASL_SENSITIVITY BP(12) 430: ADD BP(12) BP(11) 431: PUSH BP(11) 432: CALLM P1:CAM m_8 1 433: POPN 2 434: MOV False S71:$STATIC$_00000076_FLYING 435: MOV BP(6) S65:$STATIC$_00000080_LASTDX 436: MOV BP(7) S68:$STATIC$_00000081_LASTDY 437: JMP Quad:440 438: MGET G0:MOUSE m_0 S85:$STATIC$_00000082_PRECX 439: MGET G0:MOUSE m_1 S87:$STATIC$_00000083_PRECY 440: MOV True S80:$STATIC$_00000079_INMOUSER 441: MOV False S82:$STATIC$_00000078_INMOUSEL 442: JMP Quad:512 443: JNB BP(1) Quad:447 444: MOV False S80:$STATIC$_00000079_INMOUSER 445: MOV False S82:$STATIC$_00000078_INMOUSEL 446: JMP Quad:512 447: JNB S82:$STATIC$_00000078_INMOUSEL Quad:476 448: JNB P5:DOACTUALROTATION Quad:466 449: MUL S62:$STATIC$_00000077_INERTIA S65:$STATIC$_00000080_LASTDX BP(11) 450: MUL P3:ROT_SENSITIVITY BP(11) 451: PUSH 0 452: PUSH 1 453: PUSH 0 454: PUSH BP(11) 455: CALLM P1:CAM m_4 4 456: POPN 5 457: MUL S62:$STATIC$_00000077_INERTIA S68:$STATIC$_00000081_LASTDY BP(11) 458: MUL P3:ROT_SENSITIVITY BP(11) 459: PUSH 0 460: PUSH 0 461: PUSH 1 462: PUSH BP(11) 463: CALLM P1:CAM m_11 4 464: POPN 5 465: JMP Quad:472 466: MUL S62:$STATIC$_00000077_INERTIA S68:$STATIC$_00000081_LASTDY BP(14) 467: MUL P3:ROT_SENSITIVITY BP(14) 468: ADD BP(14) S74:$STATIC$_00000084_XANGLE 469: MUL S62:$STATIC$_00000077_INERTIA S65:$STATIC$_00000080_LASTDX BP(14) 470: MUL P3:ROT_SENSITIVITY BP(14) 471: ADD BP(14) S77:$STATIC$_00000085_YANGLE 472: SUB BP(2) S62:$STATIC$_00000077_INERTIA 473: JGR S62:$STATIC$_00000077_INERTIA 0 Quad:476 474: MOV False S82:$STATIC$_00000078_INMOUSEL 475: MOV 1 S62:$STATIC$_00000077_INERTIA 476: JNB S80:$STATIC$_00000079_INMOUSER Quad:512 477: JNB S71:$STATIC$_00000076_FLYING Quad:491 478: CALLM P1:CAM m_10 0 479: POP BP(11) 480: NEG BP(11) BP(11) 481: MUL S68:$STATIC$_00000081_LASTDY BP(11) 482: MUL S62:$STATIC$_00000077_INERTIA BP(11) 483: CALLM P1:CAM m_7 0 484: POP BP(12) 485: MUL BP(11) P2:TRASL_SENSITIVITY BP(13) 486: ADD BP(13) BP(12) 487: PUSH BP(12) 488: CALLM P1:CAM m_8 1 489: POPN 2 490: JMP Quad:507 491: CALLM P1:CAM m_9 0 492: POP BP(12) 493: MUL S65:$STATIC$_00000080_LASTDX BP(12) 494: MUL S62:$STATIC$_00000077_INERTIA BP(12) 495: CALLM P1:CAM m_5 0 496: POP BP(13) 497: MUL S68:$STATIC$_00000081_LASTDY BP(13) 498: MUL S62:$STATIC$_00000077_INERTIA BP(13) 499: CALLM P1:CAM m_7 0 500: POP BP(14) 501: ADD BP(13) BP(12) BP(15) 502: MUL P2:TRASL_SENSITIVITY BP(15) 503: ADD BP(15) BP(14) 504: PUSH BP(14) 505: CALLM P1:CAM m_8 1 506: POPN 2 507: SUB BP(2) S62:$STATIC$_00000077_INERTIA 508: JGR S62:$STATIC$_00000077_INERTIA 0 Quad:512 509: MOV False S80:$STATIC$_00000079_INMOUSER 510: MOV 1 S62:$STATIC$_00000077_INERTIA 511: MOV False S71:$STATIC$_00000076_FLYING 512: VNEW 2 BP(8) 513: SET S74:$STATIC$_00000084_XANGLE 0 BP(8) 514: SET S77:$STATIC$_00000085_YANGLE 1 BP(8) 515: RET BP(8) 516: PUSHN 9 517: JNV P1:CAM Quad:520 518: CALLX 2 :CAMERAGETCURRENT 0 519: POP P1:CAM 520: JNV P2:DLIM Quad:522 521: MOV <cVct2 [ 10 , 150 ]> P2:DLIM 522: JNV P3:ROTLIM Quad:524 523: MOV <cVct3 [ 10 , 100 ]> P3:ROTLIM 524: JNV P4:ROT_SENSITIVITY_X Quad:526 525: MOV 0.025 P4:ROT_SENSITIVITY_X 526: JNV P5:ROT_SENSITIVITY_Y Quad:528 527: MOV 0.01 P5:ROT_SENSITIVITY_Y 528: JNV P6:ZOOM_SENSITIVITY Quad:530 529: MOV 0.01 P6:ZOOM_SENSITIVITY 530: JNV S92:$STATIC$_00000086_#FLAG_000093# Quad:534 531: MOV 1 S90:$STATIC$_00000107_INERTIA 532: MOV 1 S91:$STATIC$_00000096_$VALUE_INERTIA$ 533: MOV 1 S92:$STATIC$_00000086_#FLAG_000093# 534: JNV S95:$STATIC$_00000087_#FLAG_000096# Quad:538 535: MOV 0 S93:$STATIC$_00000111_LASTDX 536: MOV 0 S94:$STATIC$_00000100_$VALUE_LASTDX$ 537: MOV 1 S95:$STATIC$_00000087_#FLAG_000096# 538: JNV S98:$STATIC$_00000088_#FLAG_000099# Quad:542 539: MOV 0 S96:$STATIC$_00000112_LASTDY 540: MOV 0 S97:$STATIC$_00000101_$VALUE_LASTDY$ 541: MOV 1 S98:$STATIC$_00000088_#FLAG_000099# 542: MOV False BP(1) 543: MOV 0.025 BP(2) 544: JNV P7:INERTIA_FRAMES Quad:548 545: MOV False BP(1) 546: MOV 0.025 BP(2) 547: JMP Quad:552 548: JNEQ P7:INERTIA_FRAMES 0 Quad:551 549: MOV True BP(1) 550: JMP Quad:552 551: DIV 1 P7:INERTIA_FRAMES BP(2) 552: JNV S103:$STATIC$_00000089_#FLAG_000104# Quad:558 553: MOV False S99:$STATIC$_00000110_INMOUSER 554: MOV False S100:$STATIC$_00000099_$VALUE_INMOUSER$ 555: MOV False S101:$STATIC$_00000109_INMOUSEL 556: MOV False S102:$STATIC$_00000098_$VALUE_INMOUSEL$ 557: MOV 1 S103:$STATIC$_00000089_#FLAG_000104# 558: JNV S108:$STATIC$_00000090_#FLAG_000109# Quad:564 559: MOV 0 S104:$STATIC$_00000113_PRECX 560: MOV 0 S105:$STATIC$_00000102_$VALUE_PRECX$ 561: MOV 0 S106:$STATIC$_00000114_PRECY 562: MOV 0 S107:$STATIC$_00000103_$VALUE_PRECY$ 563: MOV 1 S108:$STATIC$_00000090_#FLAG_000109# 564: JNV S111:$STATIC$_00000091_#FLAG_000112# Quad:577 565: CALLX 2 :CAMERAGETCURRENT 0 566: POP BP(3) 567: CALLM BP(3) m_12 0 568: POP BP(3) 569: CALLX 2 :CAMERAGETCURRENT 0 570: POP BP(4) 571: CALLM BP(4) m_7 0 572: POP BP(4) 573: SUB BP(4) BP(3) 574: MOV BP(3) S109:$STATIC$_00000108_INIVEC 575: MOV BP(3) S110:$STATIC$_00000097_$VALUE_INIVEC$ 576: MOV 1 S111:$STATIC$_00000091_#FLAG_000112# 577: JNV S114:$STATIC$_00000092_#FLAG_000115# Quad:590 578: MGET S109:$STATIC$_00000108_INIVEC m_0 BP(3) 579: MGET S109:$STATIC$_00000108_INIVEC m_13 BP(4) 580: PUSH BP(4) 581: PUSH BP(3) 582: CALLX 0 :ATAN2 2 583: POP BP(3) 584: POPN 2 585: MUL 57.2958 BP(3) 586: ADD 270 BP(3) BP(3) 587: MOV BP(3) S112:$STATIC$_00000115_X 588: MOV BP(3) S113:$STATIC$_00000104_$VALUE_X$ 589: MOV 1 S114:$STATIC$_00000092_#FLAG_000115# 590: JNV S117:$STATIC$_00000093_#FLAG_000118# Quad:603 591: MGET S109:$STATIC$_00000108_INIVEC m_1 BP(3) 592: MGET S109:$STATIC$_00000108_INIVEC m_13 BP(4) 593: PUSH BP(4) 594: PUSH BP(3) 595: CALLX 0 :ATAN2 2 596: POP BP(3) 597: POPN 2 598: MUL 57.2958 BP(3) 599: ADD 180 BP(3) BP(3) 600: MOV BP(3) S115:$STATIC$_00000116_Y 601: MOV BP(3) S116:$STATIC$_00000105_$VALUE_Y$ 602: MOV 1 S117:$STATIC$_00000093_#FLAG_000118# 603: JNV S120:$STATIC$_00000094_#FLAG_000121# Quad:608 604: MODL S109:$STATIC$_00000108_INIVEC BP(3) 605: MOV BP(3) S118:$STATIC$_00000106_D 606: MOV BP(3) S119:$STATIC$_00000095_$VALUE_D$ 607: MOV 1 S120:$STATIC$_00000094_#FLAG_000121# 608: MGET G0:MOUSE m_2 BP(3) 609: JNB BP(3) Quad:630 610: JNB S101:$STATIC$_00000109_INMOUSEL Quad:626 611: MGET G0:MOUSE m_0 BP(3) 612: SUB BP(3) S104:$STATIC$_00000113_PRECX S93:$STATIC$_00000111_LASTDX 613: MGET G0:MOUSE m_1 BP(3) 614: SUB BP(3) S106:$STATIC$_00000114_PRECY S96:$STATIC$_00000112_LASTDY 615: MUL S93:$STATIC$_00000111_LASTDX P4:ROT_SENSITIVITY_X BP(3) 616: SUB BP(3) S112:$STATIC$_00000115_X 617: MUL S96:$STATIC$_00000112_LASTDY P5:ROT_SENSITIVITY_Y BP(3) 618: ADD BP(3) S115:$STATIC$_00000116_Y 619: GET P3:ROTLIM 0 BP(3) 620: JGEQ S115:$STATIC$_00000116_Y BP(3) Quad:622 621: GET P3:ROTLIM 0 S115:$STATIC$_00000116_Y 622: GET P3:ROTLIM 1 BP(3) 623: JLEQ S115:$STATIC$_00000116_Y BP(3) Quad:628 624: GET P3:ROTLIM 1 S115:$STATIC$_00000116_Y 625: JMP Quad:628 626: MGET G0:MOUSE m_0 S104:$STATIC$_00000113_PRECX 627: MGET G0:MOUSE m_1 S106:$STATIC$_00000114_PRECY 628: MOV True S101:$STATIC$_00000109_INMOUSEL 629: JMP Quad:643 630: JNB S101:$STATIC$_00000109_INMOUSEL Quad:643 631: JLEQ S90:$STATIC$_00000107_INERTIA 0 Quad:633 632: JNB BP(1) Quad:636 633: MOV False S101:$STATIC$_00000109_INMOUSEL 634: MOV 1 S90:$STATIC$_00000107_INERTIA 635: JMP Quad:643 636: MUL S93:$STATIC$_00000111_LASTDX S90:$STATIC$_00000107_INERTIA BP(5) 637: MUL P4:ROT_SENSITIVITY_X BP(5) 638: SUB BP(5) S112:$STATIC$_00000115_X 639: MUL S96:$STATIC$_00000112_LASTDY S90:$STATIC$_00000107_INERTIA BP(5) 640: MUL P5:ROT_SENSITIVITY_Y BP(5) 641: ADD BP(5) S115:$STATIC$_00000116_Y 642: SUB 0.05 S90:$STATIC$_00000107_INERTIA 643: MGET G0:MOUSE m_2 BP(3) 644: JB BP(3) Quad:665 645: MGET G0:MOUSE m_6 BP(3) 646: JNB BP(3) Quad:665 647: JNB S99:$STATIC$_00000110_INMOUSER Quad:661 648: MGET G0:MOUSE m_1 BP(3) 649: SUB BP(3) S106:$STATIC$_00000114_PRECY S96:$STATIC$_00000112_LASTDY 650: MGET G0:MOUSE m_0 BP(3) 651: SUB BP(3) S104:$STATIC$_00000113_PRECX S93:$STATIC$_00000111_LASTDX 652: MUL S96:$STATIC$_00000112_LASTDY P6:ZOOM_SENSITIVITY BP(3) 653: ADD BP(3) S118:$STATIC$_00000106_D 654: GET P2:DLIM 0 BP(3) 655: JGEQ S118:$STATIC$_00000106_D BP(3) Quad:657 656: GET P2:DLIM 0 S118:$STATIC$_00000106_D 657: GET P2:DLIM 1 BP(3) 658: JLEQ S118:$STATIC$_00000106_D BP(3) Quad:663 659: GET P2:DLIM 1 S118:$STATIC$_00000106_D 660: JMP Quad:663 661: MGET G0:MOUSE m_0 S104:$STATIC$_00000113_PRECX 662: MGET G0:MOUSE m_1 S106:$STATIC$_00000114_PRECY 663: MOV True S99:$STATIC$_00000110_INMOUSER 664: JMP Quad:675 665: JNB S99:$STATIC$_00000110_INMOUSER Quad:675 666: JLEQ S90:$STATIC$_00000107_INERTIA 0 Quad:668 667: JNB BP(1) Quad:671 668: MOV False S99:$STATIC$_00000110_INMOUSER 669: MOV 1 S90:$STATIC$_00000107_INERTIA 670: JMP Quad:675 671: MUL S96:$STATIC$_00000112_LASTDY S90:$STATIC$_00000107_INERTIA BP(5) 672: MUL P6:ZOOM_SENSITIVITY BP(5) 673: ADD BP(5) S118:$STATIC$_00000106_D 674: SUB BP(2) S90:$STATIC$_00000107_INERTIA 675: NEG S115:$STATIC$_00000116_Y BP(3) 676: VNEW 3 BP(4) 677: SET S118:$STATIC$_00000106_D 1 BP(4) 678: PUSH BP(4) 679: PUSH 0 680: PUSH 0 681: PUSH 1 682: PUSH BP(3) 683: CALLX 46 :VECTORROTATE 5 684: POP BP(3) 685: POPN 5 686: VNEW 3 BP(4) 687: MGET BP(3) m_0 BP(5) 688: SET BP(5) 0 BP(4) 689: MGET BP(3) m_13 BP(5) 690: SET BP(5) 2 BP(4) 691: PUSH BP(4) 692: PUSH 0 693: PUSH 1 694: PUSH 0 695: PUSH S112:$STATIC$_00000115_X 696: CALLX 46 :VECTORROTATE 5 697: POP BP(4) 698: POPN 5 699: MGET BP(3) m_1 BP(5) 700: MSET BP(5) m_1 BP(4) 701: CALLM P1:CAM m_12 0 702: POP BP(5) 703: ADD BP(4) BP(5) BP(5) 704: PUSH BP(5) 705: CALLM P1:CAM m_8 1 706: POPN 2 707: RET Void 708: PUSHN 35 709: JNV S123:$STATIC$_00000117_#FLAG_000124# Quad:713 710: MOV 0 S121:$STATIC$_00000142_XANGLE 711: MOV 0 S122:$STATIC$_00000133_$VALUE_XANGLE$ 712: MOV 1 S123:$STATIC$_00000117_#FLAG_000124# 713: JNV S126:$STATIC$_00000118_#FLAG_000127# Quad:717 714: MOV 0 S124:$STATIC$_00000143_YANGLE 715: MOV 0 S125:$STATIC$_00000134_$VALUE_YANGLE$ 716: MOV 1 S126:$STATIC$_00000118_#FLAG_000127# 717: MGET G1:JOYSTICK m_14 BP(1) 718: JB BP(1) Quad:720 719: RET Void 720: MOV False BP(1) 721: JNV S129:$STATIC$_00000119_#FLAG_000130# Quad:725 722: MOV 1 S127:$STATIC$_00000135_INERTIA 723: MOV 1 S128:$STATIC$_00000126_$VALUE_INERTIA$ 724: MOV 1 S129:$STATIC$_00000119_#FLAG_000130# 725: MOV 0.025 BP(2) 726: JNV P1:CAM Quad:729 727: CALLX 2 :CAMERAGETCURRENT 0 728: POP P1:CAM 729: JNV P2:TRASL_SENSITIVITY Quad:731 730: MOV 0.0003 P2:TRASL_SENSITIVITY 731: JNV P3:ROT_SENSITIVITY Quad:733 732: MOV 0.0004 P3:ROT_SENSITIVITY 733: JNV P4:FLY Quad:735 734: MOV False P4:FLY 735: JNV P7:DOACTUALROTATION Quad:737 736: MOV True P7:DOACTUALROTATION 737: JNV P5:INERTIA_FRAMES Quad:741 738: MOV False BP(1) 739: MOV 0.05 BP(2) 740: JMP Quad:745 741: JNEQ P5:INERTIA_FRAMES 0 Quad:744 742: MOV True BP(1) 743: JMP Quad:745 744: DIV 1 P5:INERTIA_FRAMES BP(2) 745: JNV P6:DELTA_JOY_ZERO Quad:747 746: MOV 0.03 P6:DELTA_JOY_ZERO 747: CALLM P1:CAM m_9 0 748: POP BP(4) 749: CALLM P1:CAM m_10 0 750: POP BP(5) 751: CALLM P1:CAM m_5 0 752: POP BP(3) 753: JNV S132:$STATIC$_00000120_#FLAG_000133# Quad:757 754: MOV 0 S130:$STATIC$_00000138_LASTDX 755: MOV 0 S131:$STATIC$_00000129_$VALUE_LASTDX$ 756: MOV 1 S132:$STATIC$_00000120_#FLAG_000133# 757: JNV S135:$STATIC$_00000121_#FLAG_000136# Quad:761 758: MOV 0 S133:$STATIC$_00000139_LASTDY 759: MOV 0 S134:$STATIC$_00000130_$VALUE_LASTDY$ 760: MOV 1 S135:$STATIC$_00000121_#FLAG_000136# 761: JNV S138:$STATIC$_00000122_#FLAG_000139# Quad:765 762: MOV 0 S136:$STATIC$_00000140_LASTDZ 763: MOV 0 S137:$STATIC$_00000131_$VALUE_LASTDZ$ 764: MOV 1 S138:$STATIC$_00000122_#FLAG_000139# 765: JNV S141:$STATIC$_00000123_#FLAG_000142# Quad:769 766: MOV 0 S139:$STATIC$_00000137_LASTDR 767: MOV 0 S140:$STATIC$_00000128_$VALUE_LASTDR$ 768: MOV 1 S141:$STATIC$_00000123_#FLAG_000142# 769: JNV S144:$STATIC$_00000124_#FLAG_000145# Quad:773 770: MOV 0 S142:$STATIC$_00000136_LASTDH 771: MOV 0 S143:$STATIC$_00000127_$VALUE_LASTDH$ 772: MOV 1 S144:$STATIC$_00000124_#FLAG_000145# 773: MOV 0.5 BP(6) 774: MOV True BP(7) 775: MGET G1:JOYSTICK m_0 BP(8) 776: SUB 0.5 P6:DELTA_JOY_ZERO BP(9) 777: JLSS BP(8) BP(9) Quad:783 778: MGET G1:JOYSTICK m_0 BP(9) 779: ADD 0.5 P6:DELTA_JOY_ZERO BP(10) 780: JGR BP(9) BP(10) Quad:783 781: MOV 0.5 BP(8) 782: JMP Quad:785 783: MGET G1:JOYSTICK m_0 BP(8) 784: MOV False BP(7) 785: MGET G1:JOYSTICK m_1 BP(9) 786: SUB 0.5 P6:DELTA_JOY_ZERO BP(10) 787: JLSS BP(9) BP(10) Quad:793 788: MGET G1:JOYSTICK m_1 BP(10) 789: ADD 0.5 P6:DELTA_JOY_ZERO BP(11) 790: JGR BP(10) BP(11) Quad:793 791: MOV 0.5 BP(9) 792: JMP Quad:795 793: MGET G1:JOYSTICK m_1 BP(9) 794: MOV False BP(7) 795: MGET G1:JOYSTICK m_13 BP(10) 796: SUB 0.5 P6:DELTA_JOY_ZERO BP(11) 797: JLSS BP(10) BP(11) Quad:803 798: MGET G1:JOYSTICK m_13 BP(11) 799: ADD 0.5 P6:DELTA_JOY_ZERO BP(12) 800: JGR BP(11) BP(12) Quad:803 801: MOV 0.5 BP(10) 802: JMP Quad:805 803: MGET G1:JOYSTICK m_13 BP(10) 804: MOV False BP(7) 805: MGET G1:JOYSTICK m_15 BP(11) 806: SUB 0.5 P6:DELTA_JOY_ZERO BP(12) 807: JLSS BP(11) BP(12) Quad:813 808: MGET G1:JOYSTICK m_15 BP(12) 809: ADD 0.5 P6:DELTA_JOY_ZERO BP(13) 810: JGR BP(12) BP(13) Quad:813 811: MOV 0.5 BP(11) 812: JMP Quad:815 813: MGET G1:JOYSTICK m_15 BP(11) 814: MOV False BP(7) 815: MUL BP(6) 127 BP(17) 816: SUB 0.5 BP(8) BP(18) 817: MUL BP(17) BP(18) BP(13) 818: MUL BP(6) -127 BP(17) 819: SUB 0.5 BP(9) BP(18) 820: MUL BP(17) BP(18) BP(12) 821: MUL BP(6) 127 BP(17) 822: SUB 0.5 BP(10) BP(18) 823: MUL BP(17) BP(18) BP(16) 824: MUL BP(6) 127 BP(17) 825: SUB 0.5 BP(11) BP(18) 826: MUL BP(17) BP(18) BP(15) 827: MOV 0 BP(14) 828: MGET G1:JOYSTICK m_16 BP(17) 829: JB BP(17) Quad:832 830: MGET G1:JOYSTICK m_17 BP(17) 831: JNB BP(17) Quad:835 832: MUL BP(6) 127 BP(17) 833: MUL BP(17) 0.5 BP(14) 834: MOV False BP(7) 835: MGET G1:JOYSTICK m_18 BP(17) 836: JB BP(17) Quad:839 837: MGET G1:JOYSTICK m_19 BP(17) 838: JNB BP(17) Quad:843 839: NEG BP(6) BP(17) 840: MUL 127 BP(17) 841: MUL BP(17) 0.5 BP(14) 842: MOV False BP(7) 843: JNV S147:$STATIC$_00000125_#FLAG_000148# Quad:847 844: MOV False S145:$STATIC$_00000141_STOP 845: MOV False S146:$STATIC$_00000132_$VALUE_STOP$ 846: MOV 1 S147:$STATIC$_00000125_#FLAG_000148# 847: JB BP(7) Quad:921 848: JB P4:FLY Quad:874 849: CALLM P1:CAM m_7 0 850: POP BP(17) 851: VNEW 3 BP(18) 852: GET BP(3) 0 BP(19) 853: NEG BP(19) BP(19) 854: SET BP(19) 0 BP(18) 855: GET BP(3) 2 BP(19) 856: NEG BP(19) BP(19) 857: SET BP(19) 2 BP(18) 858: NEG BP(12) BP(19) 859: MUL BP(19) BP(18) 860: MUL P2:TRASL_SENSITIVITY BP(18) 861: ADD BP(18) BP(17) 862: NEG BP(13) BP(18) 863: MUL P2:TRASL_SENSITIVITY BP(18) 864: MUL BP(4) BP(18) 865: ADD BP(18) BP(17) 866: NEG BP(14) BP(18) 867: MUL P2:TRASL_SENSITIVITY BP(18) 868: MUL BP(5) BP(18) 869: ADD BP(18) BP(17) 870: PUSH BP(17) 871: CALLM P1:CAM m_8 1 872: POPN 2 873: JMP Quad:892 874: CALLM P1:CAM m_7 0 875: POP BP(17) 876: NEG BP(3) BP(18) 877: NEG BP(12) BP(19) 878: MUL P2:TRASL_SENSITIVITY BP(19) 879: MUL BP(19) BP(18) 880: ADD BP(18) BP(17) 881: NEG BP(13) BP(18) 882: MUL P2:TRASL_SENSITIVITY BP(18) 883: MUL BP(4) BP(18) 884: ADD BP(18) BP(17) 885: NEG BP(14) BP(18) 886: MUL P2:TRASL_SENSITIVITY BP(18) 887: MUL BP(5) BP(18) 888: ADD BP(18) BP(17) 889: PUSH BP(17) 890: CALLM P1:CAM m_8 1 891: POPN 2 892: JNB P7:DOACTUALROTATION Quad:910 893: NEG BP(15) BP(17) 894: MUL P3:ROT_SENSITIVITY BP(17) 895: PUSH 0 896: PUSH 0 897: PUSH 1 898: PUSH BP(17) 899: CALLM P1:CAM m_11 4 900: POPN 5 901: NEG BP(16) BP(17) 902: MUL P3:ROT_SENSITIVITY BP(17) 903: PUSH 0 904: PUSH 1 905: PUSH 0 906: PUSH BP(17) 907: CALLM P1:CAM m_4 4 908: POPN 5 909: JMP Quad:914 910: MUL BP(16) P3:ROT_SENSITIVITY BP(17) 911: SUB BP(17) S124:$STATIC$_00000143_YANGLE 912: MUL BP(15) P3:ROT_SENSITIVITY BP(17) 913: SUB BP(17) S121:$STATIC$_00000142_XANGLE 914: MOV BP(13) S130:$STATIC$_00000138_LASTDX 915: MOV BP(12) S133:$STATIC$_00000139_LASTDY 916: MOV BP(16) S136:$STATIC$_00000140_LASTDZ 917: MOV BP(15) S139:$STATIC$_00000137_LASTDR 918: MOV BP(14) S142:$STATIC$_00000136_LASTDH 919: MOV False S145:$STATIC$_00000141_STOP 920: JMP Quad:1003 921: JB S145:$STATIC$_00000141_STOP Quad:1003 922: JB BP(1) Quad:1003 923: JNB P7:DOACTUALROTATION Quad:943 924: NEG S139:$STATIC$_00000137_LASTDR BP(17) 925: MUL P3:ROT_SENSITIVITY BP(17) 926: MUL S127:$STATIC$_00000135_INERTIA BP(17) 927: PUSH 0 928: PUSH 0 929: PUSH 1 930: PUSH BP(17) 931: CALLM P1:CAM m_11 4 932: POPN 5 933: NEG S136:$STATIC$_00000140_LASTDZ BP(17) 934: MUL P3:ROT_SENSITIVITY BP(17) 935: MUL S127:$STATIC$_00000135_INERTIA BP(17) 936: PUSH 0 937: PUSH 1 938: PUSH 0 939: PUSH BP(17) 940: CALLM P1:CAM m_4 4 941: POPN 5 942: JMP Quad:949 943: MUL S136:$STATIC$_00000140_LASTDZ P3:ROT_SENSITIVITY BP(17) 944: MUL S127:$STATIC$_00000135_INERTIA BP(17) 945: SUB BP(17) S124:$STATIC$_00000143_YANGLE 946: MUL S139:$STATIC$_00000137_LASTDR P3:ROT_SENSITIVITY BP(17) 947: MUL S127:$STATIC$_00000135_INERTIA BP(17) 948: SUB BP(17) S121:$STATIC$_00000142_XANGLE 949: JB P4:FLY Quad:978 950: CALLM P1:CAM m_7 0 951: POP BP(17) 952: VNEW 3 BP(18) 953: GET BP(3) 0 BP(19) 954: NEG BP(19) BP(19) 955: SET BP(19) 0 BP(18) 956: GET BP(3) 2 BP(19) 957: NEG BP(19) BP(19) 958: SET BP(19) 2 BP(18) 959: NEG S133:$STATIC$_00000139_LASTDY BP(19) 960: MUL BP(19) BP(18) 961: MUL P2:TRASL_SENSITIVITY BP(18) 962: MUL S127:$STATIC$_00000135_INERTIA BP(18) 963: ADD BP(18) BP(17) 964: NEG S130:$STATIC$_00000138_LASTDX BP(18) 965: MUL P2:TRASL_SENSITIVITY BP(18) 966: MUL S127:$STATIC$_00000135_INERTIA BP(18) 967: MUL BP(4) BP(18) 968: ADD BP(18) BP(17) 969: NEG S142:$STATIC$_00000136_LASTDH BP(18) 970: MUL P2:TRASL_SENSITIVITY BP(18) 971: MUL S127:$STATIC$_00000135_INERTIA BP(18) 972: MUL BP(5) BP(18) 973: ADD BP(18) BP(17) 974: PUSH BP(17) 975: CALLM P1:CAM m_8 1 976: POPN 2 977: JMP Quad:999 978: CALLM P1:CAM m_7 0 979: POP BP(17) 980: NEG BP(3) BP(18) 981: NEG S133:$STATIC$_00000139_LASTDY BP(19) 982: MUL P2:TRASL_SENSITIVITY BP(19) 983: MUL S127:$STATIC$_00000135_INERTIA BP(19) 984: MUL BP(19) BP(18) 985: ADD BP(18) BP(17) 986: NEG S130:$STATIC$_00000138_LASTDX BP(18) 987: MUL P2:TRASL_SENSITIVITY BP(18) 988: MUL S127:$STATIC$_00000135_INERTIA BP(18) 989: MUL BP(4) BP(18) 990: ADD BP(18) BP(17) 991: NEG S142:$STATIC$_00000136_LASTDH BP(18) 992: MUL P2:TRASL_SENSITIVITY BP(18) 993: MUL S127:$STATIC$_00000135_INERTIA BP(18) 994: MUL BP(5) BP(18) 995: ADD BP(18) BP(17) 996: PUSH BP(17) 997: CALLM P1:CAM m_8 1 998: POPN 2 999: SUB BP(2) S127:$STATIC$_00000135_INERTIA 1000: JGR S127:$STATIC$_00000135_INERTIA 0 Quad:1003 1001: MOV 1 S127:$STATIC$_00000135_INERTIA 1002: MOV True S145:$STATIC$_00000141_STOP 1003: VNEW 2 BP(17) 1004: SET S121:$STATIC$_00000142_XANGLE 0 BP(17) 1005: SET S124:$STATIC$_00000143_YANGLE 1 BP(17) 1006: RET BP(17) 1007: PUSHN 3 1008: CALLM G148:WINDOW m_20 0 1009: POP BP(1) 1010: GET BP(1) 0 BP(2) 1011: PUSH BP(2) 1012: CALLX 45 :TOFLOAT 1 1013: POP G149:WINDOW_W 1014: POPN 1 1015: GET BP(1) 1 BP(2) 1016: PUSH BP(2) 1017: CALLX 45 :TOFLOAT 1 1018: POP G150:WINDOW_H 1019: POPN 1 1020: DIV G149:WINDOW_W G150:WINDOW_H BP(2) 1021: RET BP(2) 1022: PUSHN 0 1023: PUSH False 1024: CALLM G148:WINDOW m_21 1 1025: POPN 2 1026: CALLM G148:WINDOW m_22 0 1027: POPN 1 1028: RET Void 1029: PUSHN 0 1030: MSET True m_23 P1:STARTUP 1031: RET Void 1032: PUSHN 4 1033: MGET P1:THIS m_24 BP(1) 1034: MGET P1:THIS m_25 BP(2) 1035: MGET P1:THIS m_26 BP(3) 1036: MUL BP(3) BP(2) 1037: ADD BP(2) BP(1) 1038: MSET BP(1) m_24 P1:THIS 1039: MGET P1:THIS m_27 BP(1) 1040: MGET P1:THIS m_28 BP(2) 1041: MGET P1:THIS m_26 BP(3) 1042: MUL BP(3) BP(2) 1043: ADD BP(2) BP(1) 1044: MSET BP(1) m_27 P1:THIS 1045: MGET P1:THIS m_26 BP(1) 1046: MGET P1:THIS m_24 BP(2) 1047: MUL BP(2) BP(1) 1048: MSET BP(1) m_29 P1:THIS 1049: MGET P1:THIS m_26 BP(1) 1050: MGET P1:THIS m_27 BP(2) 1051: MUL BP(2) BP(1) 1052: MSET BP(1) m_30 P1:THIS 1053: MGET P1:THIS m_30 BP(1) 1054: MGET P1:THIS m_29 BP(2) 1055: DIV BP(2) BP(1) 1056: ATAN BP(1) BP(1) 1057: MUL 0.0174533 BP(1) 1058: MSET BP(1) m_31 P1:THIS 1059: MGET P1:THIS m_25 BP(1) 1060: OUT <cStr4 "<ACCX:"> 1061: OUT BP(1) 1062: OUT <cStr5 "> "> 1063: OUT <cStr6 "\n"> 1064: MGET P1:THIS m_28 BP(1) 1065: OUT <cStr7 "<ACCY:"> 1066: OUT BP(1) 1067: OUT <cStr5 "> "> 1068: OUT <cStr6 "\n"> 1069: MGET P1:THIS m_29 BP(1) 1070: OUT <cStr8 "<DX:"> 1071: OUT BP(1) 1072: OUT <cStr5 "> "> 1073: OUT <cStr6 "\n"> 1074: MGET P1:THIS m_30 BP(1) 1075: OUT <cStr9 "<DY:"> 1076: OUT BP(1) 1077: OUT <cStr5 "> "> 1078: OUT <cStr6 "\n"> 1079: MGET P1:THIS m_24 BP(1) 1080: OUT <cStr10 "<SPEEDX:"> 1081: OUT BP(1) 1082: OUT <cStr5 "> "> 1083: OUT <cStr6 "\n"> 1084: MGET P1:THIS m_27 BP(1) 1085: OUT <cStr11 "<SPEEDY:"> 1086: OUT BP(1) 1087: OUT <cStr5 "> "> 1088: OUT <cStr6 "\n"> 1089: MGET P1:THIS m_32 BP(1) 1090: GET BP(1) 0 BP(2) 1091: MGET P1:THIS m_33 BP(3) 1092: GET BP(3) 0 BP(3) 1093: MGET P1:THIS m_29 BP(4) 1094: MUL BP(4) BP(3) 1095: ADD BP(3) BP(2) 1096: SET BP(2) 0 BP(1) 1097: MSET BP(1) m_32 P1:THIS 1098: MGET P1:THIS m_32 BP(1) 1099: GET BP(1) 1 BP(2) 1100: MGET P1:THIS m_30 BP(3) 1101: ADD BP(3) BP(2) 1102: SET BP(2) 1 BP(1) 1103: MSET BP(1) m_32 P1:THIS 1104: MGET P1:THIS m_32 BP(1) 1105: GET BP(1) 2 BP(2) 1106: MGET P1:THIS m_33 BP(3) 1107: GET BP(3) 2 BP(3) 1108: MGET P1:THIS m_29 BP(4) 1109: MUL BP(4) BP(3) 1110: ADD BP(3) BP(2) 1111: SET BP(2) 2 BP(1) 1112: MSET BP(1) m_32 P1:THIS 1113: MGET P1:THIS m_24 BP(1) 1114: ABS BP(1) BP(1) 1115: MUL 0.000131476 BP(1) 1116: MGET P1:THIS m_31 BP(2) 1117: COS BP(2) BP(2) 1118: MUL BP(2) BP(1) 1119: MSET BP(1) m_25 P1:THIS 1120: MGET P1:THIS m_27 BP(1) 1121: ABS BP(1) BP(1) 1122: MUL 0.000131476 BP(1) 1123: MGET P1:THIS m_31 BP(2) 1124: SIN BP(2) BP(2) 1125: MUL BP(2) BP(1) 1126: SUB -9.81 BP(1) BP(1) 1127: MSET BP(1) m_28 P1:THIS 1128: RET Void 1129: PUSHN 3 1130: OUT <cStr12 "<D:"> 1131: OUT P3:D 1132: OUT <cStr5 "> "> 1133: OUT <cStr6 "\n"> 1134: VNEW 3 BP(1) 1135: GET P3:D 2 BP(2) 1136: NEG BP(2) BP(2) 1137: SET BP(2) 0 BP(1) 1138: GET P3:D 0 BP(2) 1139: SET BP(2) 2 BP(1) 1140: MUL 0.5 BP(1) 1141: ADD P2:P BP(1) BP(1) 1142: VNEW 3 BP(2) 1143: GET P3:D 1 BP(3) 1144: SUB 0.5 BP(3) BP(3) 1145: SET BP(3) 1 BP(2) 1146: ADD BP(2) BP(1) 1147: MSET BP(1) m_32 P1:THIS 1148: MSET P3:D m_33 P1:THIS 1149: MSET P3:D m_33 P1:THIS 1150: MGET P1:THIS m_33 BP(1) 1151: GET BP(1) 1 BP(1) 1152: MUL 90 BP(1) 1153: MSET BP(1) m_31 P1:THIS 1154: MGET P1:THIS m_31 BP(1) 1155: MUL 0.0174533 BP(1) 1156: COS BP(1) BP(1) 1157: MUL 10000 BP(1) 1158: MSET BP(1) m_25 P1:THIS 1159: MGET P1:THIS m_31 BP(1) 1160: MUL 0.0174533 BP(1) 1161: SIN BP(1) BP(1) 1162: MUL 10000 BP(1) 1163: MSET BP(1) m_28 P1:THIS 1164: MSET True m_34 P1:THIS 1165: RET Void 1166: PUSHN 2 1167: MSET 0.0166667 m_26 P1:THIS 1168: MSET False m_34 P1:THIS 1169: MSET 0 m_35 P1:THIS 1170: MSET P2:P m_32 P1:THIS 1171: MSET P4:C m_36 P1:THIS 1172: PUSH 9 1173: CALLX 17 :CVMNEWMESH 1 1174: POP BP(1) 1175: POPN 1 1176: MSET BP(1) m_37 P1:THIS 1177: MGET P1:THIS m_37 BP(1) 1178: PUSH 0.2 1179: CALLM BP(1) m_38 1 1180: POPN 2 1181: MGET P1:THIS m_37 BP(1) 1182: MGET P1:THIS m_36 BP(2) 1183: PUSH BP(2) 1184: CALLM BP(1) m_39 1 1185: POPN 2 1186: MGET P1:THIS m_37 BP(1) 1187: PUSH BP(1) 1188: CALLX 18 :CVMOBJ 1 1189: POP BP(1) 1190: POPN 1 1191: MSET BP(1) m_40 P1:THIS 1192: MGET P1:THIS m_40 BP(1) 1193: MGET P1:THIS m_32 BP(2) 1194: PUSH BP(2) 1195: CALLM BP(1) m_8 1 1196: POPN 2 1197: MSET 0 m_24 P1:THIS 1198: MSET 0 m_27 P1:THIS 1199: MSET 0 m_29 P1:THIS 1200: MSET 0 m_30 P1:THIS 1201: RET Void 1202: PUSHN 1 1203: MGET P1:THIS m_34 BP(1) 1204: JNB BP(1) Quad:1208 1205: MGET P1:THIS m_40 BP(1) 1206: CALLM BP(1) m_41 0 1207: POPN 1 1208: RET Void 1209: PUSHN 2 1210: MGET P1:THIS m_40 BP(1) 1211: MGET P1:THIS m_32 BP(2) 1212: PUSH BP(2) 1213: CALLM BP(1) m_8 1 1214: POPN 2 1215: MGET P1:THIS m_34 BP(1) 1216: JNB BP(1) Quad:1223 1217: CALLM P1:THIS m_42 0 1218: POPN 1 1219: MGET P1:THIS m_32 BP(1) 1220: GET BP(1) 1 BP(1) 1221: JGR BP(1) 0 Quad:1223 1222: MSET False m_34 P1:THIS 1223: RET Void 1224: PUSHN 2 1225: ANEW 4 BP(1) 1226: SET P1:W 0 BP(1) 1227: SET P2:H 1 BP(1) 1228: SET P3:X 2 BP(1) 1229: SET P4:Y 3 BP(1) 1230: RET BP(1) 1231: PUSHN 4 1232: GET P1:TO_COPY 0 BP(1) 1233: GET P1:TO_COPY 1 BP(2) 1234: GET P1:TO_COPY 2 BP(3) 1235: GET P1:TO_COPY 3 BP(4) 1236: PUSH BP(4) 1237: PUSH BP(3) 1238: PUSH BP(2) 1239: PUSH BP(1) 1240: CALL Quad:1224 :CREATE_BOX 1241: POP BP(1) 1242: POPN 4 1243: RET BP(1) 1244: PUSHN 6 1245: MGET G0:MOUSE m_0 BP(1) 1246: DIV G149:WINDOW_W BP(1) 1247: MGET G0:MOUSE m_1 BP(2) 1248: DIV G150:WINDOW_H BP(2) 1249: SUB 1 BP(2) BP(2) 1250: GET P1:BOX 0 BP(3) 1251: GET P1:BOX 2 BP(4) 1252: DIV 2 BP(4) 1253: SUB BP(4) BP(3) 1254: JLSS BP(1) BP(3) Quad:1271 1255: GET P1:BOX 0 BP(3) 1256: GET P1:BOX 2 BP(4) 1257: DIV 2 BP(4) 1258: ADD BP(4) BP(3) 1259: JGR BP(1) BP(3) Quad:1271 1260: GET P1:BOX 1 BP(3) 1261: GET P1:BOX 3 BP(4) 1262: DIV 2 BP(4) 1263: SUB BP(4) BP(3) 1264: JLSS BP(2) BP(3) Quad:1271 1265: GET P1:BOX 1 BP(3) 1266: GET P1:BOX 3 BP(4) 1267: DIV 2 BP(4) 1268: ADD BP(4) BP(3) 1269: JGR BP(2) BP(3) Quad:1271 1270: RET True 1271: RET False 1272: PUSHN 11 1273: MUL P1:FONTSIZE 96 BP(1) 1274: DIV 72 BP(1) 1275: MUL BP(1) 0.415 BP(2) 1276: DIV BP(1) G150:WINDOW_H BP(3) 1277: DIV BP(2) G149:WINDOW_W BP(4) 1278: ANEW 2 BP(5) 1279: MUL P2:TEXT_LEN BP(4) BP(6) 1280: SET BP(6) 0 BP(5) 1281: DIV BP(3) 2 BP(6) 1282: SET BP(6) 1 BP(5) 1283: RET BP(5) 1284: PUSHN 5 1285: MOV <cVct13 [ 139 , 63 , 51 ]> BP(1) 1286: DIV 255 BP(1) 1287: PUSH BP(1) 1288: CALLX 5 :CONSOLECOLOR 1 1289: POPN 2 1290: GET P1:BOX 0 BP(1) 1291: GET P1:BOX 2 BP(2) 1292: DIV 2 BP(2) 1293: SUB BP(2) BP(1) 1294: GET P1:BOX 1 BP(2) 1295: GET P1:BOX 3 BP(3) 1296: DIV 2 BP(3) 1297: ADD BP(3) BP(2) 1298: GET P1:BOX 2 BP(3) 1299: GET P1:BOX 3 BP(4) 1300: PUSH BP(4) 1301: PUSH BP(3) 1302: PUSH BP(2) 1303: PUSH BP(1) 1304: CALLX 6 :CONSOLEFILLEDRECT 4 1305: POPN 5 1306: MUL P3:FONTSIZE G151:RESOLUTION BP(1) 1307: PUSH BP(1) 1308: CALLX 4 :CEIL 1 1309: POP P3:FONTSIZE 1310: POPN 1 1311: LEN P2:TEXT BP(1) 1312: PUSH BP(1) 1313: PUSH P3:FONTSIZE 1314: CALL Quad:1272 :FONTSIZE_TO_BOXSIZE 1315: POP BP(1) 1316: POPN 2 1317: MOV <cVct14 [ 255 , 255 , 255 ]> BP(2) 1318: DIV 255 BP(2) 1319: PUSH BP(2) 1320: CALLX 5 :CONSOLECOLOR 1 1321: POPN 2 1322: PUSH P3:FONTSIZE 1323: PUSH <cStr15 "Consolas"> 1324: CALLX 8 :CONSOLEFONT 2 1325: POPN 3 1326: GET P1:BOX 0 BP(2) 1327: GET BP(1) 0 BP(3) 1328: DIV 2 BP(3) 1329: SUB BP(3) BP(2) 1330: GET P1:BOX 1 BP(3) 1331: GET BP(1) 1 BP(4) 1332: DIV 2 BP(4) 1333: SUB BP(4) BP(3) 1334: PUSH P2:TEXT 1335: PUSH BP(3) 1336: PUSH BP(2) 1337: CALLX 9 :CONSOLETEXT 3 1338: POPN 4 1339: RET Void 1340: PUSHN 1 1341: GET P1:BOX 3 BP(1) 1342: MUL P2:DISPLACEMENT BP(1) 1343: ADD 0.5 BP(1) BP(1) 1344: SET BP(1) 1 P1:BOX 1345: PUSH 30 1346: PUSH <cStr16 "First Person Shooter"> 1347: PUSH P1:BOX 1348: CALL Quad:1284 :DRAW_BOX 1349: POPN 4 1350: RET Void 1351: PUSHN 1 1352: GET P2:BOX 3 BP(1) 1353: MUL P3:DISPLACEMENT BP(1) 1354: ADD 0.5 BP(1) BP(1) 1355: SET BP(1) 1 P2:BOX 1356: PUSH 20 1357: PUSH P1:TEXT 1358: PUSH P2:BOX 1359: CALL Quad:1284 :DRAW_BOX 1360: POPN 4 1361: RET Void 1362: PUSHN 1 1363: GET P2:BOX 3 BP(1) 1364: MUL P3:DISPLACEMENT BP(1) 1365: ADD 0.5 BP(1) BP(1) 1366: SET BP(1) 1 P2:BOX 1367: PUSH 10 1368: PUSH P1:TEXT 1369: PUSH P2:BOX 1370: CALL Quad:1284 :DRAW_BOX 1371: POPN 4 1372: RET Void 1373: PUSHN 4 1374: MOV <cVct17 [ 244 , 225 , 174 ]> BP(1) 1375: DIV 255 BP(1) 1376: PUSH BP(1) 1377: CALLX 5 :CONSOLECOLOR 1 1378: POPN 2 1379: GET P1:BOX 0 BP(1) 1380: GET P1:BOX 1 BP(2) 1381: GET P1:BOX 2 BP(3) 1382: GET P1:BOX 3 BP(4) 1383: PUSH BP(4) 1384: PUSH BP(3) 1385: PUSH BP(2) 1386: PUSH BP(1) 1387: CALLX 6 :CONSOLEFILLEDRECT 4 1388: POPN 5 1389: RET Void 1390: PUSHN 4 1391: MOV <cVct13 [ 139 , 63 , 51 ]> BP(1) 1392: DIV 255 BP(1) 1393: PUSH BP(1) 1394: CALLX 5 :CONSOLECOLOR 1 1395: POPN 2 1396: GET P1:BOX 0 BP(1) 1397: GET P1:BOX 1 BP(2) 1398: GET P1:BOX 2 BP(3) 1399: GET P1:BOX 3 BP(4) 1400: PUSH BP(4) 1401: PUSH BP(3) 1402: PUSH BP(2) 1403: PUSH BP(1) 1404: CALLX 6 :CONSOLEFILLEDRECT 4 1405: POPN 5 1406: RET Void 1407: PUSHN 3 1408: PUSH 0.1 1409: PUSH 0.5 1410: PUSH 0.5 1411: PUSH 0.5 1412: CALL Quad:1224 :CREATE_BOX 1413: POP BP(1) 1414: POPN 4 1415: MSET BP(1) m_43 P1:THIS 1416: PUSH 0.05 1417: PUSH 0.1 1418: PUSH 0.5 1419: PUSH 0.5 1420: CALL Quad:1224 :CREATE_BOX 1421: POP BP(1) 1422: POPN 4 1423: PUSH BP(1) 1424: CALL Quad:1231 :COPY_BOX 1425: POP BP(2) 1426: POPN 1 1427: MSET BP(2) m_44 P1:THIS 1428: PUSH BP(1) 1429: CALL Quad:1231 :COPY_BOX 1430: POP BP(2) 1431: POPN 1 1432: MSET BP(2) m_45 P1:THIS 1433: PUSH BP(1) 1434: CALL Quad:1231 :COPY_BOX 1435: POP BP(2) 1436: POPN 1 1437: MSET BP(2) m_46 P1:THIS 1438: MSET P2:H m_47 P1:THIS 1439: MSET True m_23 P1:THIS 1440: RET Void 1441: PUSHN 1 1442: MGET P1:THIS m_44 BP(1) 1443: PUSH BP(1) 1444: CALL Quad:1244 :IS_CONTAINED 1445: POP BP(1) 1446: POPN 1 1447: JNB BP(1) Quad:1451 1448: MGET G0:MOUSE m_2 BP(1) 1449: JNB BP(1) Quad:1451 1450: MSET False m_23 P1:THIS 1451: MGET P1:THIS m_45 BP(1) 1452: PUSH BP(1) 1453: CALL Quad:1244 :IS_CONTAINED 1454: POP BP(1) 1455: POPN 1 1456: JNB BP(1) Quad:1462 1457: MGET G0:MOUSE m_2 BP(1) 1458: JNB BP(1) Quad:1462 1459: MGET P1:THIS m_47 BP(1) 1460: MSET True m_23 BP(1) 1461: MSET BP(1) m_47 P1:THIS 1462: MGET P1:THIS m_46 BP(1) 1463: PUSH BP(1) 1464: CALL Quad:1244 :IS_CONTAINED 1465: POP BP(1) 1466: POPN 1 1467: JNB BP(1) Quad:1472 1468: MGET G0:MOUSE m_2 BP(1) 1469: JNB BP(1) Quad:1472 1470: CALL Quad:1022 :QUIT_GAME 1471: POPN 1 1472: RET Void 1473: PUSHN 1 1474: PUSH <cVct18 [ 0 , 1 , 1 , 1 ]> 1475: CALL Quad:1373 :DRAW_BACKGROUND 1476: POPN 2 1477: MGET P1:THIS m_47 BP(1) 1478: MGET BP(1) m_23 BP(1) 1479: JNB BP(1) Quad:1484 1480: MGET P1:THIS m_47 BP(1) 1481: CALLM BP(1) m_41 0 1482: POPN 1 1483: JMP Quad:1509 1484: MGET P1:THIS m_43 BP(1) 1485: PUSH 2 1486: PUSH BP(1) 1487: CALL Quad:1340 :DRAW_TITLE 1488: POPN 3 1489: MGET P1:THIS m_44 BP(1) 1490: PUSH 0 1491: PUSH BP(1) 1492: PUSH <cStr19 "PLAY"> 1493: CALL Quad:1351 :DRAW_TEXT 1494: POPN 4 1495: MGET P1:THIS m_45 BP(1) 1496: PUSH -3 1497: PUSH BP(1) 1498: PUSH <cStr20 "HELP"> 1499: CALL Quad:1351 :DRAW_TEXT 1500: POPN 4 1501: MGET P1:THIS m_46 BP(1) 1502: PUSH -6 1503: PUSH BP(1) 1504: PUSH <cStr21 "QUIT"> 1505: CALL Quad:1351 :DRAW_TEXT 1506: POPN 4 1507: CALLM P1:THIS m_48 0 1508: POPN 1 1509: CALLX 7 :CONSOLEFINISH 0 1510: POPN 1 1511: RET Void 1512: PUSHN 3 1513: PUSH 0.05 1514: PUSH 0.1 1515: PUSH 0.5 1516: PUSH 0.5 1517: CALL Quad:1224 :CREATE_BOX 1518: POP BP(1) 1519: POPN 4 1520: PUSH BP(1) 1521: CALL Quad:1231 :COPY_BOX 1522: POP BP(2) 1523: POPN 1 1524: MSET BP(2) m_49 P1:THIS 1525: PUSH BP(1) 1526: CALL Quad:1231 :COPY_BOX 1527: POP BP(2) 1528: POPN 1 1529: MSET BP(2) m_45 P1:THIS 1530: PUSH BP(1) 1531: CALL Quad:1231 :COPY_BOX 1532: POP BP(2) 1533: POPN 1 1534: MSET BP(2) m_50 P1:THIS 1535: MSET P2:S m_51 P1:THIS 1536: MSET P3:H m_47 P1:THIS 1537: MSET False m_23 P1:THIS 1538: RET Void 1539: PUSHN 1 1540: PUSH 27 1541: CALLX 33 :KEYPRESSED 1 1542: POP BP(1) 1543: POPN 1 1544: JNB BP(1) Quad:1551 1545: MGET P1:THIS m_23 BP(1) 1546: JB BP(1) Quad:1549 1547: MOV True BP(1) 1548: JMP Quad:1550 1549: MOV False BP(1) 1550: MSET BP(1) m_23 P1:THIS 1551: RET Void 1552: PUSHN 1 1553: MGET P1:THIS m_49 BP(1) 1554: PUSH BP(1) 1555: CALL Quad:1244 :IS_CONTAINED 1556: POP BP(1) 1557: POPN 1 1558: JNB BP(1) Quad:1562 1559: MGET G0:MOUSE m_2 BP(1) 1560: JNB BP(1) Quad:1562 1561: MSET False m_23 P1:THIS 1562: MGET P1:THIS m_45 BP(1) 1563: PUSH BP(1) 1564: CALL Quad:1244 :IS_CONTAINED 1565: POP BP(1) 1566: POPN 1 1567: JNB BP(1) Quad:1573 1568: MGET G0:MOUSE m_2 BP(1) 1569: JNB BP(1) Quad:1573 1570: MGET P1:THIS m_47 BP(1) 1571: MSET True m_23 BP(1) 1572: MSET BP(1) m_47 P1:THIS 1573: MGET P1:THIS m_50 BP(1) 1574: PUSH BP(1) 1575: CALL Quad:1244 :IS_CONTAINED 1576: POP BP(1) 1577: POPN 1 1578: JNB BP(1) Quad:1585 1579: MGET G0:MOUSE m_2 BP(1) 1580: JNB BP(1) Quad:1585 1581: MGET P1:THIS m_51 BP(1) 1582: PUSH BP(1) 1583: CALL Quad:1029 :EXIT_GAME 1584: POPN 2 1585: RET Void 1586: PUSHN 2 1587: MOV <cVct22 [ 0 , 0.85 , 0 , 0.7 ]> BP(1) 1588: DIV 0.35 G151:RESOLUTION BP(2) 1589: SUB 0.5 BP(2) BP(2) 1590: SET BP(2) 0 BP(1) 1591: DIV 0.7 G151:RESOLUTION BP(2) 1592: SET BP(2) 2 BP(1) 1593: PUSH BP(1) 1594: CALL Quad:1373 :DRAW_BACKGROUND 1595: POPN 2 1596: MGET P1:THIS m_47 BP(1) 1597: MGET BP(1) m_23 BP(1) 1598: JNB BP(1) Quad:1603 1599: MGET P1:THIS m_47 BP(1) 1600: CALLM BP(1) m_41 0 1601: POPN 1 1602: JMP Quad:1621 1603: MGET P1:THIS m_49 BP(1) 1604: PUSH 3 1605: PUSH BP(1) 1606: PUSH <cStr23 "CONTINUE"> 1607: CALL Quad:1351 :DRAW_TEXT 1608: POPN 4 1609: MGET P1:THIS m_45 BP(1) 1610: PUSH 0 1611: PUSH BP(1) 1612: PUSH <cStr20 "HELP"> 1613: CALL Quad:1351 :DRAW_TEXT 1614: POPN 4 1615: MGET P1:THIS m_50 BP(1) 1616: PUSH -3 1617: PUSH BP(1) 1618: PUSH <cStr24 "EXIT"> 1619: CALL Quad:1351 :DRAW_TEXT 1620: POPN 4 1621: CALLM P1:THIS m_48 0 1622: POPN 1 1623: CALLX 7 :CONSOLEFINISH 0 1624: POPN 1 1625: RET Void 1626: PUSHN 1 1627: MGET P1:THIS m_52 BP(1) 1628: PUSH BP(1) 1629: CALL Quad:1244 :IS_CONTAINED 1630: POP BP(1) 1631: POPN 1 1632: JNB BP(1) Quad:1636 1633: MGET G0:MOUSE m_2 BP(1) 1634: JNB BP(1) Quad:1636 1635: MSET False m_23 P1:THIS 1636: RET Void 1637: PUSHN 1 1638: PUSH 0.05 1639: PUSH 0.1 1640: PUSH 0.5 1641: PUSH 0.5 1642: CALL Quad:1224 :CREATE_BOX 1643: POP BP(1) 1644: POPN 4 1645: MSET BP(1) m_52 P1:THIS 1646: MSET False m_23 P1:THIS 1647: RET Void 1648: PUSHN 5 1649: MOV 20 BP(1) 1650: DIV 0.6 G151:RESOLUTION BP(2) 1651: PUSH 0.01 1652: PUSH BP(2) 1653: PUSH 0.5 1654: PUSH 0.5 1655: CALL Quad:1224 :CREATE_BOX 1656: POP BP(2) 1657: POPN 4 1658: ADD -2 BP(1) 1659: PUSH BP(1) 1660: PUSH BP(2) 1661: PUSH <cStr25 "ESC: pause the game"> 1662: CALL Quad:1362 :DRAW_COMMAND 1663: POPN 4 1664: ADD -2 BP(1) 1665: PUSH BP(1) 1666: PUSH BP(2) 1667: PUSH <cStr26 "SPACE: shoots a bullet"> 1668: CALL Quad:1362 :DRAW_COMMAND 1669: POPN 4 1670: ADD -2 BP(1) 1671: PUSH BP(1) 1672: PUSH BP(2) 1673: PUSH <cStr27 "UP ARROW: move on the player"> 1674: CALL Quad:1362 :DRAW_COMMAND 1675: POPN 4 1676: ADD -2 BP(1) 1677: PUSH BP(1) 1678: PUSH BP(2) 1679: PUSH <cStr28 "DOWN ARROW: move back the player"> 1680: CALL Quad:1362 :DRAW_COMMAND 1681: POPN 4 1682: ADD -2 BP(1) 1683: PUSH BP(1) 1684: PUSH BP(2) 1685: PUSH <cStr29 "LEFT ARROW: move left the player"> 1686: CALL Quad:1362 :DRAW_COMMAND 1687: POPN 4 1688: ADD -2 BP(1) 1689: PUSH BP(1) 1690: PUSH BP(2) 1691: PUSH <cStr30 "RIGHT ARROW: move right the player"> 1692: CALL Quad:1362 :DRAW_COMMAND 1693: POPN 4 1694: RET Void 1695: PUSHN 2 1696: MOV <cVct31 [ 0 , 0.8 , 0 , 0.5 ]> BP(1) 1697: DIV 0.3 G151:RESOLUTION BP(2) 1698: SUB 0.5 BP(2) BP(2) 1699: SET BP(2) 0 BP(1) 1700: DIV 0.6 G151:RESOLUTION BP(2) 1701: SET BP(2) 2 BP(1) 1702: PUSH BP(1) 1703: CALL Quad:1390 :DRAW_PLACEHOLDER 1704: POPN 2 1705: CALLM P1:THIS m_53 0 1706: POPN 1 1707: MGET P1:THIS m_52 BP(1) 1708: PUSH -5.5 1709: PUSH BP(1) 1710: PUSH <cStr32 "GO BACK"> 1711: CALL Quad:1351 :DRAW_TEXT 1712: POPN 4 1713: CALLM P1:THIS m_48 0 1714: POPN 1 1715: CALLX 7 :CONSOLEFINISH 0 1716: POPN 1 1717: RET Void 1718: PUSHN 8 1719: MUL 0.005 G151:RESOLUTION BP(1) 1720: MUL 0.005 P1:TO_DRAW_X BP(2) 1721: ADD 0.01 BP(2) BP(2) 1722: SUB P4:OFFSET_X BP(2) 1723: MUL 0.01 G151:RESOLUTION BP(3) 1724: ADD P3:HEIGHT BP(3) 1725: MUL BP(1) P2:TO_DRAW_Y BP(4) 1726: SUB BP(4) BP(3) 1727: ADD P5:OFFESET_Y BP(3) 1728: PUSH BP(1) 1729: PUSH 0.005 1730: PUSH BP(3) 1731: PUSH BP(2) 1732: CALLX 6 :CONSOLEFILLEDRECT 4 1733: POPN 5 1734: RET Void 1735: PUSHN 5 1736: MOV <cVct13 [ 139 , 63 , 51 ]> BP(1) 1737: DIV 255 BP(1) 1738: PUSH BP(1) 1739: CALLX 5 :CONSOLECOLOR 1 1740: POPN 2 1741: MOV 0 BP(1) 1742: JGEQ BP(1) P2:ROWS Quad:1759 1743: MOV 0 BP(2) 1744: JGEQ BP(2) P3:COLUMNS Quad:1757 1745: GET P1:MATRIX_LEVEL BP(1) BP(3) 1746: GET BP(3) BP(2) BP(3) 1747: JNEQ BP(3) 1 Quad:1755 1748: PUSH 0 1749: PUSH 0 1750: PUSH P4:HEIGHT 1751: PUSH BP(1) 1752: PUSH BP(2) 1753: CALL Quad:1718 :DRAW_RECT 1754: POPN 6 1755: INC BP(2) 1756: JMP Quad:1744 1757: INC BP(1) 1758: JMP Quad:1742 1759: RET Void 1760: PUSHN 4 1761: MOV <cVct14 [ 255 , 255 , 255 ]> BP(1) 1762: DIV 255 BP(1) 1763: PUSH BP(1) 1764: CALLX 5 :CONSOLECOLOR 1 1765: POPN 2 1766: MOV 0 BP(1) 1767: LEN P1:PLAYERS_POSITION BP(2) 1768: JGEQ BP(1) BP(2) Quad:1784 1769: GET P1:PLAYERS_POSITION BP(1) BP(2) 1770: GET BP(2) 0 BP(2) 1771: SUB 0.0025 BP(2) 1772: GET P1:PLAYERS_POSITION BP(1) BP(3) 1773: GET BP(3) 2 BP(3) 1774: ADD 0.0025 BP(3) 1775: PUSH 0.0075 1776: PUSH 0.0025 1777: PUSH P2:HEIGHT 1778: PUSH BP(3) 1779: PUSH BP(2) 1780: CALL Quad:1718 :DRAW_RECT 1781: POPN 6 1782: INC BP(1) 1783: JMP Quad:1767 1784: RET Void 1785: PUSHN 1 1786: MOV <cVct17 [ 244 , 225 , 174 ]> BP(1) 1787: DIV 255 BP(1) 1788: PUSH BP(1) 1789: CALLX 5 :CONSOLECOLOR 1 1790: POPN 2 1791: PUSH P4:H 1792: PUSH P3:W 1793: PUSH P2:Y 1794: PUSH P1:X 1795: CALLX 6 :CONSOLEFILLEDRECT 4 1796: POPN 5 1797: RET Void 1798: PUSHN 2 1799: MSET P2:ML m_54 P1:THIS 1800: MSET P3:PP m_55 P1:THIS 1801: MGET P1:THIS m_54 BP(1) 1802: LEN BP(1) BP(1) 1803: MSET BP(1) m_56 P1:THIS 1804: MGET P1:THIS m_54 BP(1) 1805: GET BP(1) 0 BP(1) 1806: LEN BP(1) BP(1) 1807: MSET BP(1) m_57 P1:THIS 1808: MGET P1:THIS m_57 BP(1) 1809: MUL 0.005 BP(1) 1810: MSET BP(1) m_58 P1:THIS 1811: MGET P1:THIS m_56 BP(1) 1812: MUL 0.005 BP(1) 1813: MUL G151:RESOLUTION BP(1) 1814: MSET BP(1) m_59 P1:THIS 1815: MSET 0.01 m_60 P1:THIS 1816: MUL 0.01 G151:RESOLUTION BP(1) 1817: MGET P1:THIS m_59 BP(2) 1818: ADD BP(2) BP(1) 1819: MSET BP(1) m_61 P1:THIS 1820: RET Void 1821: PUSHN 4 1822: MGET P1:THIS m_60 BP(1) 1823: MGET P1:THIS m_61 BP(2) 1824: MGET P1:THIS m_58 BP(3) 1825: MGET P1:THIS m_59 BP(4) 1826: PUSH BP(4) 1827: PUSH BP(3) 1828: PUSH BP(2) 1829: PUSH BP(1) 1830: CALL Quad:1785 :DRAW_GROUND 1831: POPN 5 1832: MGET P1:THIS m_54 BP(1) 1833: MGET P1:THIS m_56 BP(2) 1834: MGET P1:THIS m_57 BP(3) 1835: MGET P1:THIS m_59 BP(4) 1836: PUSH BP(4) 1837: PUSH BP(3) 1838: PUSH BP(2) 1839: PUSH BP(1) 1840: CALL Quad:1735 :DRAW_WALL 1841: POPN 5 1842: MGET P1:THIS m_55 BP(1) 1843: MGET P1:THIS m_59 BP(2) 1844: PUSH BP(2) 1845: PUSH BP(1) 1846: CALL Quad:1760 :DRAW_PLAYER 1847: POPN 3 1848: CALLX 7 :CONSOLEFINISH 0 1849: POPN 1 1850: RET Void 1851: PUSHN 2 1852: GET P1:BOX 0 BP(1) 1853: GET P1:BOX 2 BP(2) 1854: MUL 0.05 BP(2) 1855: ADD BP(2) BP(1) 1856: SET BP(1) 0 P1:BOX 1857: GET P1:BOX 1 BP(1) 1858: GET P1:BOX 3 BP(2) 1859: MUL 0.05 BP(2) 1860: SUB BP(2) BP(1) 1861: SET BP(1) 1 P1:BOX 1862: GET P1:BOX 2 BP(1) 1863: MUL 0.9 BP(1) 1864: SET BP(1) 2 P1:BOX 1865: GET P1:BOX 3 BP(1) 1866: MUL 0.9 BP(1) 1867: SET BP(1) 3 P1:BOX 1868: RET P1:BOX 1869: PUSHN 3 1870: PUSH P1:BOX 1871: CALL Quad:1851 :GET_INSIDE 1872: POP P1:BOX 1873: POPN 1 1874: GET P1:BOX 0 BP(1) 1875: GET P1:BOX 2 BP(2) 1876: DIV 2 BP(2) 1877: ADD BP(2) BP(1) 1878: SET BP(1) 0 P1:BOX 1879: GET P1:BOX 1 BP(1) 1880: GET P1:BOX 3 BP(2) 1881: DIV 2 BP(2) 1882: MUL P2:DISPLACEMENT 0.01 BP(3) 1883: SUB BP(3) BP(2) 1884: SUB BP(2) BP(1) 1885: SET BP(1) 1 P1:BOX 1886: SET 0.01 3 P1:BOX 1887: RET P1:BOX 1888: PUSHN 0 1889: PUSH 8 1890: PUSH P1:BOX 1891: CALL Quad:1869 :GET_INSIDE_TEXT 1892: POP P1:BOX 1893: POPN 2 1894: PUSH 10 1895: PUSH <cStr33 "PLAYER INFORMATIONS"> 1896: PUSH P1:BOX 1897: CALL Quad:1284 :DRAW_BOX 1898: POPN 4 1899: RET Void 1900: PUSHN 2 1901: PUSH 4 1902: PUSH P1:BOX 1903: CALL Quad:1869 :GET_INSIDE_TEXT 1904: POP P1:BOX 1905: POPN 2 1906: GET P2:PLAYER_POSITION 0 BP(1) 1907: STR BP(1) BP(1) 1908: ADD <cStr34 "GPS: "> BP(1) BP(1) 1909: ADD <cStr35 ","> BP(1) 1910: GET P2:PLAYER_POSITION 2 BP(2) 1911: STR BP(2) BP(2) 1912: ADD BP(2) BP(1) 1913: PUSH 10 1914: PUSH BP(1) 1915: PUSH P1:BOX 1916: CALL Quad:1284 :DRAW_BOX 1917: POPN 4 1918: RET Void 1919: PUSHN 1 1920: PUSH 0 1921: PUSH P1:BOX 1922: CALL Quad:1869 :GET_INSIDE_TEXT 1923: POP P1:BOX 1924: POPN 2 1925: STR P2:GUN_SELECTED BP(1) 1926: ADD <cStr36 "GUN: "> BP(1) BP(1) 1927: PUSH 10 1928: PUSH BP(1) 1929: PUSH P1:BOX 1930: CALL Quad:1284 :DRAW_BOX 1931: POPN 4 1932: RET Void 1933: PUSHN 1 1934: PUSH -4 1935: PUSH P1:BOX 1936: CALL Quad:1869 :GET_INSIDE_TEXT 1937: POP P1:BOX 1938: POPN 2 1939: STR P2:BULLETS_LEFT BP(1) 1940: ADD <cStr37 "BULLETS LEFT: "> BP(1) BP(1) 1941: PUSH 10 1942: PUSH BP(1) 1943: PUSH P1:BOX 1944: CALL Quad:1284 :DRAW_BOX 1945: POPN 4 1946: RET Void 1947: PUSHN 1 1948: PUSH -8 1949: PUSH P1:BOX 1950: CALL Quad:1869 :GET_INSIDE_TEXT 1951: POP P1:BOX 1952: POPN 2 1953: STR P2:LIFE_POINTS BP(1) 1954: ADD <cStr38 "LIFE: "> BP(1) BP(1) 1955: PUSH 10 1956: PUSH BP(1) 1957: PUSH P1:BOX 1958: CALL Quad:1284 :DRAW_BOX 1959: POPN 4 1960: RET Void 1961: PUSHN 4 1962: MOV <cVct17 [ 244 , 225 , 174 ]> BP(1) 1963: DIV 255 BP(1) 1964: PUSH BP(1) 1965: CALLX 5 :CONSOLECOLOR 1 1966: POPN 2 1967: GET P1:BOX 0 BP(1) 1968: GET P1:BOX 1 BP(2) 1969: GET P1:BOX 2 BP(3) 1970: GET P1:BOX 3 BP(4) 1971: PUSH BP(4) 1972: PUSH BP(3) 1973: PUSH BP(2) 1974: PUSH BP(1) 1975: CALLX 6 :CONSOLEFILLEDRECT 4 1976: POPN 5 1977: MOV <cVct13 [ 139 , 63 , 51 ]> BP(1) 1978: DIV 255 BP(1) 1979: PUSH BP(1) 1980: CALLX 5 :CONSOLECOLOR 1 1981: POPN 2 1982: PUSH P1:BOX 1983: CALL Quad:1851 :GET_INSIDE 1984: POP P1:BOX 1985: POPN 1 1986: GET P1:BOX 0 BP(1) 1987: GET P1:BOX 1 BP(2) 1988: GET P1:BOX 2 BP(3) 1989: GET P1:BOX 3 BP(4) 1990: PUSH BP(4) 1991: PUSH BP(3) 1992: PUSH BP(2) 1993: PUSH BP(1) 1994: CALLX 6 :CONSOLEFILLEDRECT 4 1995: POPN 5 1996: RET Void 1997: PUSHN 1 1998: MSET P2:PP m_62 P1:THIS 1999: MSET P3:GS m_63 P1:THIS 2000: MSET P4:BL m_64 P1:THIS 2001: MSET P5:LP m_65 P1:THIS 2002: MSET 0.84 m_66 P1:THIS 2003: MUL 0.16 G151:RESOLUTION BP(1) 2004: MSET BP(1) m_67 P1:THIS 2005: RET Void 2006: PUSHN 3 2007: MOV <cVct39 [ 0 , 0 , 0.15 , 0 ]> BP(1) 2008: MGET P1:THIS m_66 BP(2) 2009: SET BP(2) 0 BP(1) 2010: MGET P1:THIS m_67 BP(2) 2011: SET BP(2) 1 BP(1) 2012: MUL 0.15 G151:RESOLUTION BP(2) 2013: SET BP(2) 3 BP(1) 2014: PUSH BP(1) 2015: CALL Quad:1961 :DRAW_INFO_BOX 2016: POPN 2 2017: PUSH BP(1) 2018: CALL Quad:1888 :DRAW_PLAYER_TITLE 2019: POPN 2 2020: MGET P1:THIS m_62 BP(2) 2021: PUSH BP(2) 2022: PUSH BP(1) 2023: CALL Quad:1900 :DRAW_PLAYER_POSITION 2024: POPN 3 2025: MGET P1:THIS m_63 BP(2) 2026: PUSH BP(2) 2027: PUSH BP(1) 2028: CALL Quad:1919 :DRAW_GUN_SELECTED 2029: POPN 3 2030: MGET P1:THIS m_64 BP(2) 2031: PUSH BP(2) 2032: PUSH BP(1) 2033: CALL Quad:1933 :DRAW_BULLETS_LEFT 2034: POPN 3 2035: MGET P1:THIS m_65 BP(2) 2036: PUSH BP(2) 2037: PUSH BP(1) 2038: CALL Quad:1947 :DRAW_LIFE_POINTS 2039: POPN 3 2040: CALLX 7 :CONSOLEFINISH 0 2041: POPN 1 2042: RET Void 2043: PUSHN 2 2044: PUSH <cStr40 "swat_lower.aam"> 2045: CALLX 17 :CVMNEWMESH 1 2046: POP P2:MESH_PLAYER_LOWER 2047: POPN 1 2048: PUSH P4:COLOR 2049: CALLM P2:MESH_PLAYER_LOWER m_39 1 2050: POPN 2 2051: PUSH 1 2052: CALLM P2:MESH_PLAYER_LOWER m_68 1 2053: POP BP(1) 2054: POPN 1 2055: PUSH <cStr41 "swat_upper.aam"> 2056: CALLX 17 :CVMNEWMESH 1 2057: POP P1:MESH_PLAYER_UPPER 2058: POPN 1 2059: PUSH P4:COLOR 2060: CALLM P1:MESH_PLAYER_UPPER m_39 1 2061: POPN 2 2062: PUSH BP(1) 2063: CALLM P1:MESH_PLAYER_UPPER m_38 1 2064: POPN 2 2065: PUSH <cStr42 "rocketl.aam"> 2066: CALLX 17 :CVMNEWMESH 1 2067: POP P3:MESH_GUN 2068: POPN 1 2069: PUSH BP(1) 2070: CALLM P3:MESH_GUN m_38 1 2071: POPN 2 2072: RET Void 2073: PUSHN 0 2074: MSET 0 m_25 P1:THIS 2075: MSET 0 m_28 P1:THIS 2076: MSET 0 m_24 P1:THIS 2077: MSET 0 m_27 P1:THIS 2078: MSET 0 m_29 P1:THIS 2079: MSET 0 m_30 P1:THIS 2080: RET Void 2081: PUSHN 1 2082: MGET P1:THIS m_69 BP(1) 2083: MSET BP(1) m_24 P1:THIS 2084: MGET P1:THIS m_69 BP(1) 2085: DIV 0.07 BP(1) 2086: MUL 35 BP(1) 2087: SUB 90 BP(1) BP(1) 2088: MSET BP(1) m_31 P1:THIS 2089: MGET P1:THIS m_31 BP(1) 2090: MUL 0.0174533 BP(1) 2091: COS BP(1) BP(1) 2092: MUL 250 BP(1) 2093: MSET BP(1) m_25 P1:THIS 2094: MGET P1:THIS m_31 BP(1) 2095: MUL 0.0174533 BP(1) 2096: SIN BP(1) BP(1) 2097: MUL 250 BP(1) 2098: MSET BP(1) m_28 P1:THIS 2099: MSET True m_34 P1:THIS 2100: RET Void 2101: PUSHN 1 2102: MGET P1:THIS m_70 BP(1) 2103: CALLM BP(1) m_7 0 2104: POP BP(1) 2105: RET BP(1) 2106: PUSHN 4 2107: MGET P1:THIS m_25 BP(1) 2108: OUT <cStr4 "<ACCX:"> 2109: OUT BP(1) 2110: OUT <cStr5 "> "> 2111: OUT <cStr6 "\n"> 2112: MGET P1:THIS m_28 BP(1) 2113: OUT <cStr7 "<ACCY:"> 2114: OUT BP(1) 2115: OUT <cStr5 "> "> 2116: OUT <cStr6 "\n"> 2117: MGET P1:THIS m_29 BP(1) 2118: OUT <cStr8 "<DX:"> 2119: OUT BP(1) 2120: OUT <cStr5 "> "> 2121: OUT <cStr6 "\n"> 2122: MGET P1:THIS m_30 BP(1) 2123: OUT <cStr9 "<DY:"> 2124: OUT BP(1) 2125: OUT <cStr5 "> "> 2126: OUT <cStr6 "\n"> 2127: MGET P1:THIS m_24 BP(1) 2128: OUT <cStr10 "<SPEEDX:"> 2129: OUT BP(1) 2130: OUT <cStr5 "> "> 2131: OUT <cStr6 "\n"> 2132: MGET P1:THIS m_27 BP(1) 2133: OUT <cStr11 "<SPEEDY:"> 2134: OUT BP(1) 2135: OUT <cStr5 "> "> 2136: OUT <cStr6 "\n"> 2137: MGET P1:THIS m_24 BP(1) 2138: MGET P1:THIS m_25 BP(2) 2139: MGET P1:THIS m_26 BP(3) 2140: MUL BP(3) BP(2) 2141: ADD BP(2) BP(1) 2142: MSET BP(1) m_24 P1:THIS 2143: MGET P1:THIS m_27 BP(1) 2144: MGET P1:THIS m_28 BP(2) 2145: MGET P1:THIS m_26 BP(3) 2146: MUL BP(3) BP(2) 2147: ADD BP(2) BP(1) 2148: MSET BP(1) m_27 P1:THIS 2149: MGET P1:THIS m_26 BP(1) 2150: MGET P1:THIS m_24 BP(2) 2151: MUL BP(2) BP(1) 2152: MSET BP(1) m_29 P1:THIS 2153: MGET P1:THIS m_26 BP(1) 2154: MGET P1:THIS m_27 BP(2) 2155: MUL BP(2) BP(1) 2156: MSET BP(1) m_30 P1:THIS 2157: MGET P1:THIS m_30 BP(1) 2158: MGET P1:THIS m_29 BP(2) 2159: DIV BP(2) BP(1) 2160: ATAN BP(1) BP(1) 2161: MUL 0.0174533 BP(1) 2162: MSET BP(1) m_31 P1:THIS 2163: MGET P1:THIS m_31 BP(1) 2164: OUT <cStr43 "<ANGLE:"> 2165: OUT BP(1) 2166: OUT <cStr5 "> "> 2167: OUT <cStr6 "\n"> 2168: MGET P1:THIS m_32 BP(1) 2169: GET BP(1) 0 BP(2) 2170: MGET P1:THIS m_71 BP(3) 2171: GET BP(3) 0 BP(3) 2172: MGET P1:THIS m_29 BP(4) 2173: MUL BP(4) BP(3) 2174: ADD BP(3) BP(2) 2175: SET BP(2) 0 BP(1) 2176: MSET BP(1) m_32 P1:THIS 2177: MGET P1:THIS m_32 BP(1) 2178: GET BP(1) 1 BP(2) 2179: MGET P1:THIS m_30 BP(3) 2180: ADD BP(3) BP(2) 2181: SET BP(2) 1 BP(1) 2182: MSET BP(1) m_32 P1:THIS 2183: MGET P1:THIS m_32 BP(1) 2184: GET BP(1) 2 BP(2) 2185: MGET P1:THIS m_71 BP(3) 2186: GET BP(3) 2 BP(3) 2187: MGET P1:THIS m_29 BP(4) 2188: MUL BP(4) BP(3) 2189: ADD BP(3) BP(2) 2190: SET BP(2) 2 BP(1) 2191: MSET BP(1) m_32 P1:THIS 2192: MGET P1:THIS m_32 BP(1) 2193: GET BP(1) 1 BP(1) 2194: JGR BP(1) 0 Quad:2201 2195: MSET False m_34 P1:THIS 2196: MGET P1:THIS m_32 BP(1) 2197: SET 0 1 BP(1) 2198: MSET BP(1) m_32 P1:THIS 2199: CALLM P1:THIS m_72 0 2200: POPN 1 2201: MGET P1:THIS m_24 BP(1) 2202: ABS BP(1) BP(1) 2203: MUL -0.000131476 BP(1) 2204: MGET P1:THIS m_31 BP(2) 2205: COS BP(2) BP(2) 2206: MUL BP(2) BP(1) 2207: MSET BP(1) m_25 P1:THIS 2208: MSET -9.81 m_28 P1:THIS 2209: RET Void 2210: PUSHN 0 2211: RET Void 2212: PUSHN 3 2213: MGET P1:THIS m_73 BP(1) 2214: JLEQ BP(1) 0 Quad:2228 2215: MGET P1:THIS m_74 BP(1) 2216: MGET P1:THIS m_73 BP(2) 2217: DEC BP(2) 2218: GET BP(1) BP(2) BP(1) 2219: MGET P1:THIS m_32 BP(2) 2220: MGET P1:THIS m_71 BP(3) 2221: PUSH BP(3) 2222: PUSH BP(2) 2223: CALLM BP(1) m_75 2 2224: POPN 3 2225: MGET P1:THIS m_73 BP(1) 2226: DEC BP(1) 2227: MSET BP(1) m_73 P1:THIS 2228: RET Void 2229: PUSHN 7 2230: PUSH True 2231: PUSH <cStr44 "shoot.wav"> 2232: CALLX 20 :CVMVRAWAV 2 2233: POP BP(1) 2234: POPN 2 2235: MSET BP(1) m_76 P1:THIS 2236: MSET P4:P m_32 P1:THIS 2237: MSET 0 m_69 P1:THIS 2238: MSET 0 m_77 P1:THIS 2239: MSET 0 m_78 P1:THIS 2240: VNEW 3 BP(1) 2241: MGET P1:THIS m_77 BP(2) 2242: SIN BP(2) BP(2) 2243: SET BP(2) 0 BP(1) 2244: MGET P1:THIS m_77 BP(2) 2245: COS BP(2) BP(2) 2246: SET BP(2) 2 BP(1) 2247: MSET BP(1) m_79 P1:THIS 2248: MGET P1:THIS m_79 BP(1) 2249: MSET BP(1) m_71 P1:THIS 2250: MSET P2:I m_80 P1:THIS 2251: MSET P3:C m_36 P1:THIS 2252: MSET 500 m_73 P1:THIS 2253: MSET 0.0166667 m_26 P1:THIS 2254: MSET False m_34 P1:THIS 2255: MSET 0 m_35 P1:THIS 2256: MSET P3:C m_36 P1:THIS 2257: MSET 0 m_24 P1:THIS 2258: MSET 0 m_27 P1:THIS 2259: MSET 0 m_29 P1:THIS 2260: MSET 0 m_30 P1:THIS 2261: MGET P1:THIS m_81 BP(1) 2262: MGET P1:THIS m_82 BP(2) 2263: MGET P1:THIS m_83 BP(3) 2264: MGET P1:THIS m_36 BP(4) 2265: PUSH BP(4) 2266: PUSH BP(3) 2267: PUSH BP(2) 2268: PUSH BP(1) 2269: CALL Quad:2043 :INITPLAYERMESHES 2270: POPN 1 2271: POP BP(1) 2272: MSET BP(1) m_81 P1:THIS 2273: POP BP(2) 2274: MSET BP(2) m_82 P1:THIS 2275: POP BP(3) 2276: MSET BP(3) m_83 P1:THIS 2277: POPN 1 2278: MGET P1:THIS m_83 BP(1) 2279: PUSH BP(1) 2280: CALLX 18 :CVMOBJ 1 2281: POP BP(1) 2282: POPN 1 2283: MSET BP(1) m_84 P1:THIS 2284: MGET P1:THIS m_81 BP(1) 2285: PUSH BP(1) 2286: CALLX 18 :CVMOBJ 1 2287: POP BP(1) 2288: POPN 1 2289: MSET BP(1) m_85 P1:THIS 2290: MGET P1:THIS m_82 BP(1) 2291: PUSH BP(1) 2292: CALLX 18 :CVMOBJ 1 2293: POP BP(1) 2294: POPN 1 2295: MSET BP(1) m_86 P1:THIS 2296: CALLX 18 :CVMOBJ 0 2297: POP BP(1) 2298: MSET BP(1) m_70 P1:THIS 2299: MGET P1:THIS m_70 BP(1) 2300: MGET P1:THIS m_86 BP(2) 2301: PUSH BP(2) 2302: CALLM BP(1) m_87 1 2303: POPN 2 2304: MGET P1:THIS m_70 BP(1) 2305: MGET P1:THIS m_85 BP(2) 2306: PUSH BP(2) 2307: CALLM BP(1) m_87 1 2308: POPN 2 2309: MGET P1:THIS m_85 BP(1) 2310: MGET P1:THIS m_84 BP(2) 2311: PUSH BP(2) 2312: CALLM BP(1) m_87 1 2313: POPN 2 2314: MGET P1:THIS m_85 BP(1) 2315: PUSH 0 2316: PUSH 0 2317: PUSH 0 2318: CALLM BP(1) m_88 3 2319: POPN 4 2320: MGET P1:THIS m_70 BP(1) 2321: MGET P1:THIS m_32 BP(2) 2322: PUSH BP(2) 2323: CALLM BP(1) m_8 1 2324: POPN 2 2325: ANEW 500 BP(1) 2326: MSET BP(1) m_74 P1:THIS 2327: MOV 0 BP(1) 2328: MGET P1:THIS m_73 BP(2) 2329: JGEQ BP(1) BP(2) Quad:2345 2330: CALLX 1 :BULLET 0 2331: POP BP(2) 2332: MGET P1:THIS m_32 BP(3) 2333: MGET P1:THIS m_71 BP(4) 2334: MGET P1:THIS m_36 BP(5) 2335: PUSH BP(5) 2336: PUSH BP(4) 2337: PUSH BP(3) 2338: CALLM BP(2) m_89 3 2339: POPN 4 2340: MGET P1:THIS m_74 BP(3) 2341: SET BP(2) BP(1) BP(3) 2342: MSET BP(3) m_74 P1:THIS 2343: INC BP(1) 2344: JMP Quad:2328 2345: MSET 0 m_90 P1:THIS 2346: MSET 0 m_91 P1:THIS 2347: RET Void 2348: PUSHN 4 2349: MGET P1:THIS m_70 BP(1) 2350: MGET P1:THIS m_90 BP(2) 2351: ADD 16 BP(2) BP(2) 2352: PUSH BP(2) 2353: PUSH 4194304 2354: CALLM BP(1) m_41 2 2355: POPN 3 2356: MOV 0 BP(1) 2357: MGET P1:THIS m_74 BP(2) 2358: LEN BP(2) BP(3) 2359: JGEQ BP(1) BP(3) Quad:2365 2360: GET BP(2) BP(1) BP(3) 2361: CALLM BP(3) m_41 0 2362: POPN 1 2363: INC BP(1) 2364: JMP Quad:2358 2365: RET Void 2366: PUSHN 1 2367: PUSH 37 2368: CALLX 33 :KEYPRESSED 1 2369: POP BP(1) 2370: POPN 1 2371: JNB BP(1) Quad:2376 2372: MGET P1:THIS m_77 BP(1) 2373: ADD 0.01 BP(1) 2374: MSET BP(1) m_77 P1:THIS 2375: RET Void 2376: PUSH 39 2377: CALLX 33 :KEYPRESSED 1 2378: POP BP(1) 2379: POPN 1 2380: JNB BP(1) Quad:2384 2381: MGET P1:THIS m_77 BP(1) 2382: SUB 0.01 BP(1) 2383: MSET BP(1) m_77 P1:THIS 2384: RET Void 2385: PUSHN 13 2386: MGET P1:THIS m_81 BP(1) 2387: CALLM BP(1) m_92 0 2388: POP BP(1) 2389: MGET P1:THIS m_82 BP(2) 2390: CALLM BP(2) m_92 0 2391: POP BP(2) 2392: ANEW 8 BP(3) 2393: MGET P1:THIS m_32 BP(4) 2394: VNEW 3 BP(5) 2395: GET BP(1) 0 BP(6) 2396: SET BP(6) 0 BP(5) 2397: GET BP(2) 5 BP(6) 2398: SET BP(6) 2 BP(5) 2399: ADD BP(5) BP(4) 2400: SET BP(4) 0 BP(3) 2401: MGET P1:THIS m_32 BP(4) 2402: VNEW 3 BP(5) 2403: GET BP(2) 5 BP(6) 2404: SET BP(6) 2 BP(5) 2405: ADD BP(5) BP(4) 2406: SET BP(4) 1 BP(3) 2407: MGET P1:THIS m_32 BP(4) 2408: VNEW 3 BP(5) 2409: GET BP(1) 3 BP(6) 2410: SET BP(6) 0 BP(5) 2411: GET BP(2) 5 BP(6) 2412: SET BP(6) 2 BP(5) 2413: ADD BP(5) BP(4) 2414: SET BP(4) 2 BP(3) 2415: MGET P1:THIS m_32 BP(4) 2416: VNEW 3 BP(5) 2417: GET BP(1) 3 BP(6) 2418: SET BP(6) 0 BP(5) 2419: ADD BP(5) BP(4) 2420: SET BP(4) 3 BP(3) 2421: MGET P1:THIS m_32 BP(4) 2422: VNEW 3 BP(5) 2423: GET BP(1) 3 BP(6) 2424: SET BP(6) 0 BP(5) 2425: GET BP(2) 2 BP(6) 2426: SET BP(6) 2 BP(5) 2427: ADD BP(5) BP(4) 2428: SET BP(4) 4 BP(3) 2429: MGET P1:THIS m_32 BP(4) 2430: VNEW 3 BP(5) 2431: GET BP(2) 2 BP(6) 2432: SET BP(6) 2 BP(5) 2433: ADD BP(5) BP(4) 2434: SET BP(4) 5 BP(3) 2435: MGET P1:THIS m_32 BP(4) 2436: VNEW 3 BP(5) 2437: GET BP(1) 0 BP(6) 2438: SET BP(6) 0 BP(5) 2439: GET BP(2) 2 BP(6) 2440: SET BP(6) 2 BP(5) 2441: ADD BP(5) BP(4) 2442: SET BP(4) 6 BP(3) 2443: MGET P1:THIS m_32 BP(4) 2444: VNEW 3 BP(5) 2445: GET BP(1) 0 BP(6) 2446: SET BP(6) 0 BP(5) 2447: ADD BP(5) BP(4) 2448: SET BP(4) 7 BP(3) 2449: MOV 0 BP(4) 2450: JGEQ BP(4) 8 Quad:2464 2451: GET BP(3) BP(4) BP(5) 2452: MGET BP(5) m_0 BP(5) 2453: INT BP(5) BP(5) 2454: GET BP(3) BP(4) BP(6) 2455: MGET BP(6) m_13 BP(6) 2456: INT BP(6) BP(6) 2457: MGET G152:MY_WORLD m_93 BP(7) 2458: GET BP(7) BP(6) BP(7) 2459: GET BP(7) BP(5) BP(7) 2460: JNEQ BP(7) 1 Quad:2462 2461: RET True 2462: INC BP(4) 2463: JMP Quad:2450 2464: RET False 2465: PUSHN 0 2466: RET Void 2467: PUSHN 1 2468: MGET P1:THIS m_79 BP(1) 2469: GET BP(1) 0 BP(1) 2470: ASIN BP(1) BP(1) 2471: MSET BP(1) m_77 P1:THIS 2472: RET Void 2473: PUSHN 2 2474: PUSH <cStr45 "w"> 2475: CALLX 33 :KEYPRESSED 1 2476: POP BP(1) 2477: POPN 1 2478: JNB BP(1) Quad:2485 2479: MGET P1:THIS m_69 BP(1) 2480: JGEQ BP(1) 0.07 Quad:2507 2481: MGET P1:THIS m_69 BP(1) 2482: ADD 0.001 BP(1) 2483: MSET BP(1) m_69 P1:THIS 2484: JMP Quad:2507 2485: PUSH <cStr46 "s"> 2486: CALLX 33 :KEYPRESSED 1 2487: POP BP(1) 2488: POPN 1 2489: JNB BP(1) Quad:2496 2490: MGET P1:THIS m_69 BP(1) 2491: JLEQ BP(1) -0.035 Quad:2507 2492: MGET P1:THIS m_69 BP(1) 2493: SUB 0.002 BP(1) 2494: MSET BP(1) m_69 P1:THIS 2495: JMP Quad:2507 2496: MGET P1:THIS m_69 BP(1) 2497: JLEQ BP(1) 0 Quad:2502 2498: MGET P1:THIS m_69 BP(1) 2499: SUB 0.001 BP(1) 2500: MSET BP(1) m_69 P1:THIS 2501: JMP Quad:2507 2502: MGET P1:THIS m_69 BP(1) 2503: JGEQ BP(1) 0 Quad:2507 2504: MGET P1:THIS m_69 BP(1) 2505: ADD 0.001 BP(1) 2506: MSET BP(1) m_69 P1:THIS 2507: MGET P1:THIS m_69 BP(1) 2508: ABS BP(1) BP(1) 2509: JGEQ BP(1) 0.001 Quad:2511 2510: MSET 0 m_69 P1:THIS 2511: MGET P1:THIS m_69 BP(1) 2512: JLEQ BP(1) 0 Quad:2521 2513: MGET P1:THIS m_90 BP(1) 2514: MGET P1:THIS m_69 BP(2) 2515: ADD 0.95 BP(2) BP(2) 2516: MUL 0.35 BP(2) 2517: ADD BP(2) BP(1) 2518: MOD 32 BP(1) 2519: MSET BP(1) m_90 P1:THIS 2520: JMP Quad:2535 2521: MGET P1:THIS m_69 BP(1) 2522: JGEQ BP(1) 0 Quad:2535 2523: MGET P1:THIS m_90 BP(1) 2524: MGET P1:THIS m_69 BP(2) 2525: ADD 0.95 BP(2) BP(2) 2526: MUL 0.35 BP(2) 2527: SUB BP(2) BP(1) 2528: MOD 32 BP(1) 2529: MSET BP(1) m_90 P1:THIS 2530: MGET P1:THIS m_90 BP(1) 2531: JGR BP(1) 0 Quad:2535 2532: MGET P1:THIS m_90 BP(1) 2533: ADD 32 BP(1) 2534: MSET BP(1) m_90 P1:THIS 2535: MGET P1:THIS m_32 BP(1) 2536: MGET P1:THIS m_69 BP(2) 2537: MUL P2:MOVINGDIR BP(2) 2538: ADD BP(2) BP(1) 2539: MSET BP(1) m_32 P1:THIS 2540: RET Void 2541: PUSHN 19 2542: MOV 1 BP(1) 2543: VNEW 3 BP(2) 2544: MGET P1:THIS m_79 BP(3) 2545: GET BP(3) 0 BP(3) 2546: SET BP(3) 0 BP(2) 2547: MGET P1:THIS m_79 BP(3) 2548: GET BP(3) 2 BP(3) 2549: SET BP(3) 2 BP(2) 2550: MGET P1:THIS m_32 BP(3) 2551: MGET P1:THIS m_70 BP(4) 2552: CALLM BP(4) m_94 0 2553: POPN 1 2554: PUSH 16 2555: CALLX 33 :KEYPRESSED 1 2556: POP BP(4) 2557: POPN 1 2558: JNB BP(4) Quad:2562 2559: CALLM P1:THIS m_75 0 2560: POPN 1 2561: JMP Quad:2599 2562: PUSH <cStr47 "a"> 2563: CALLX 33 :KEYPRESSED 1 2564: POP BP(9) 2565: POPN 1 2566: JNB BP(9) Quad:2581 2567: VNEW 3 BP(9) 2568: MGET P1:THIS m_79 BP(10) 2569: GET BP(10) 2 BP(10) 2570: SET BP(10) 0 BP(9) 2571: MGET P1:THIS m_79 BP(10) 2572: GET BP(10) 0 BP(10) 2573: NEG BP(10) BP(10) 2574: SET BP(10) 2 BP(9) 2575: MGET P1:THIS m_32 BP(10) 2576: MUL 0.07 BP(9) 2577: MUL BP(1) BP(9) 2578: ADD BP(9) BP(10) 2579: MSET BP(10) m_32 P1:THIS 2580: JMP Quad:2599 2581: PUSH <cStr48 "d"> 2582: CALLX 33 :KEYPRESSED 1 2583: POP BP(9) 2584: POPN 1 2585: JNB BP(9) Quad:2599 2586: VNEW 3 BP(9) 2587: MGET P1:THIS m_79 BP(10) 2588: GET BP(10) 2 BP(10) 2589: NEG BP(10) BP(10) 2590: SET BP(10) 0 BP(9) 2591: MGET P1:THIS m_79 BP(10) 2592: GET BP(10) 0 BP(10) 2593: SET BP(10) 2 BP(9) 2594: MGET P1:THIS m_32 BP(10) 2595: MUL 0.07 BP(9) 2596: MUL BP(1) BP(9) 2597: ADD BP(9) BP(10) 2598: MSET BP(10) m_32 P1:THIS 2599: MGET P1:THIS m_34 BP(4) 2600: JB BP(4) Quad:2604 2601: PUSH BP(2) 2602: CALLM P1:THIS m_95 1 2603: POPN 2 2604: CALLM P1:THIS m_96 0 2605: POP BP(4) 2606: JNB BP(4) Quad:2609 2607: MSET BP(3) m_32 P1:THIS 2608: MSET 0 m_69 P1:THIS 2609: PUSH 32 2610: CALLX 33 :KEYPRESSED 1 2611: POP BP(4) 2612: POPN 1 2613: JNB BP(4) Quad:2619 2614: MGET P1:THIS m_34 BP(4) 2615: JB BP(4) Quad:2619 2616: MSET 3.14159 m_91 P1:THIS 2617: CALLM P1:THIS m_97 0 2618: POPN 1 2619: MGET P1:THIS m_34 BP(4) 2620: JNB BP(4) Quad:2623 2621: CALLM P1:THIS m_42 0 2622: POPN 1 2623: MGET P1:THIS m_32 BP(4) 2624: MGET BP(4) m_0 BP(4) 2625: INT BP(4) BP(4) 2626: MGET P1:THIS m_32 BP(5) 2627: MGET BP(5) m_13 BP(5) 2628: INT BP(5) BP(5) 2629: GET P2:MATRIX_LEVEL BP(5) BP(6) 2630: GET BP(6) BP(4) BP(6) 2631: JNEQ BP(6) 1 Quad:2633 2632: MSET BP(3) m_32 P1:THIS 2633: MGET P1:THIS m_70 BP(8) 2634: MGET P1:THIS m_32 BP(9) 2635: PUSH BP(9) 2636: CALLM BP(8) m_8 1 2637: POPN 2 2638: MOV 0 BP(7) 2639: MGET P1:THIS m_74 BP(6) 2640: LEN BP(6) BP(8) 2641: JGEQ BP(7) BP(8) Quad:2647 2642: GET BP(6) BP(7) BP(8) 2643: CALLM BP(8) m_98 0 2644: POPN 1 2645: INC BP(7) 2646: JMP Quad:2640 2647: RET Void 2648: PUSHN 1 2649: MSET P2:ML m_54 P1:THIS 2650: ANEW 0 BP(1) 2651: MSET BP(1) m_99 P1:THIS 2652: RET Void 2653: PUSHN 5 2654: MOV 0 BP(1) 2655: MGET P1:THIS m_99 BP(2) 2656: LEN BP(2) BP(3) 2657: JGEQ BP(1) BP(3) Quad:2665 2658: GET BP(2) BP(1) BP(3) 2659: MGET P1:THIS m_54 BP(4) 2660: PUSH BP(4) 2661: CALLM BP(3) m_98 1 2662: POPN 2 2663: INC BP(1) 2664: JMP Quad:2656 2665: RET Void 2666: PUSHN 3 2667: CALLX 37 :PLAYER 0 2668: POP BP(1) 2669: PUSH P4:POS 2670: PUSH P3:COLOR 2671: PUSH P2:ID 2672: CALLM BP(1) m_89 3 2673: POPN 4 2674: MGET P1:THIS m_99 BP(2) 2675: AADD BP(1) BP(2) 2676: RET Void 2677: PUSHN 11 2678: MGET P1:THIS m_99 BP(1) 2679: LEN BP(1) BP(1) 2680: ANEW BP(1) BP(2) 2681: MOV 0 BP(3) 2682: MOV 0 BP(4) 2683: MGET P1:THIS m_99 BP(5) 2684: LEN BP(5) BP(6) 2685: JGEQ BP(4) BP(6) Quad:2693 2686: GET BP(5) BP(4) BP(6) 2687: CALLM BP(6) m_100 0 2688: POP BP(7) 2689: SET BP(7) BP(3) BP(2) 2690: INC BP(3) 2691: INC BP(4) 2692: JMP Quad:2684 2693: RET BP(2) 2694: PUSHN 4 2695: MOV 0 BP(1) 2696: MGET P1:THIS m_99 BP(2) 2697: LEN BP(2) BP(3) 2698: JGEQ BP(1) BP(3) Quad:2704 2699: GET BP(2) BP(1) BP(3) 2700: CALLM BP(3) m_41 0 2701: POPN 1 2702: INC BP(1) 2703: JMP Quad:2697 2704: RET Void 2705: PUSHN 1 2706: PUSH 9 2707: CALLX 17 :CVMNEWMESH 1 2708: POP P1:MESH_FLOOR 2709: POPN 1 2710: PUSH P5:HEIGHT 2711: PUSH 1 2712: PUSH P4:WIDTH 2713: CALLM P1:MESH_FLOOR m_38 3 2714: POPN 4 2715: PUSH 0 2716: PUSH -1 2717: PUSH 0 2718: CALLM P1:MESH_FLOOR m_101 3 2719: POPN 4 2720: CALLX 12 :CVMMATERIAL 0 2721: POP P2:MATERIAL_FLOOR 2722: MOV <cVct49 [ 0 , 255 , 0 ]> BP(1) 2723: DIV 255 BP(1) 2724: MSET BP(1) m_102 P2:MATERIAL_FLOOR 2725: PUSH 5 2726: PUSH 2 2727: CALLM P2:MATERIAL_FLOOR m_103 2 2728: POPN 3 2729: PUSH 5 2730: PUSH 3 2731: CALLM P2:MATERIAL_FLOOR m_103 2 2732: POPN 3 2733: PUSH <cStr50 "marmo.png"> 2734: CALLX 19 :CVMTEXTURE 1 2735: POP P3:TEXTURE_FLOOR 2736: POPN 1 2737: PUSH P3:TEXTURE_FLOOR 2738: CALLM P2:MATERIAL_FLOOR m_104 1 2739: POPN 2 2740: PUSH P2:MATERIAL_FLOOR 2741: CALLM P1:MESH_FLOOR m_105 1 2742: POPN 2 2743: RET Void 2744: PUSHN 1 2745: PUSH 9 2746: CALLX 17 :CVMNEWMESH 1 2747: POP P1:MESH_WALL 2748: POPN 1 2749: MUL 3 P4:HEIGHT_SCALE BP(1) 2750: PUSH 1 2751: PUSH BP(1) 2752: PUSH 1 2753: CALLM P1:MESH_WALL m_38 3 2754: POPN 4 2755: CALLX 12 :CVMMATERIAL 0 2756: POP P2:MATERIAL_WALL 2757: MOV <cVct14 [ 255 , 255 , 255 ]> BP(1) 2758: DIV 255 BP(1) 2759: MSET BP(1) m_102 P2:MATERIAL_WALL 2760: PUSH 3 2761: PUSH 3 2762: CALLM P2:MATERIAL_WALL m_103 2 2763: POPN 3 2764: PUSH <cStr51 "mattoni04.png"> 2765: CALLX 19 :CVMTEXTURE 1 2766: POP P3:TEXTURE_WALL 2767: POPN 1 2768: PUSH P3:TEXTURE_WALL 2769: CALLM P2:MATERIAL_WALL m_104 1 2770: POPN 2 2771: PUSH P2:MATERIAL_WALL 2772: CALLM P1:MESH_WALL m_105 1 2773: POPN 2 2774: RET Void 2775: PUSHN 15 2776: ANEW 0 BP(1) 2777: MSET BP(1) m_106 P1:THIS 2778: PUSH <cStr52 "level.txt"> 2779: CALLX 34 :LOADFILE 1 2780: POP BP(1) 2781: POPN 1 2782: LEN BP(1) BP(2) 2783: DEC BP(2) 2784: GET BP(1) 0 BP(3) 2785: LEN BP(3) BP(3) 2786: MGET P1:THIS m_107 BP(4) 2787: MGET P1:THIS m_108 BP(5) 2788: MGET P1:THIS m_109 BP(6) 2789: PUSH BP(2) 2790: PUSH BP(3) 2791: PUSH BP(6) 2792: PUSH BP(5) 2793: PUSH BP(4) 2794: CALL Quad:2705 :CREATE_FLOOR 2795: POPN 1 2796: POP BP(4) 2797: MSET BP(4) m_107 P1:THIS 2798: POP BP(5) 2799: MSET BP(5) m_108 P1:THIS 2800: POP BP(6) 2801: MSET BP(6) m_109 P1:THIS 2802: POP BP(3) 2803: POP BP(2) 2804: ANEW 0 BP(4) 2805: MSET BP(4) m_110 P1:THIS 2806: ANEW BP(2) BP(4) 2807: MSET BP(4) m_93 P1:THIS 2808: MOV 0 BP(4) 2809: JGEQ BP(4) BP(2) Quad:2863 2810: MGET P1:THIS m_93 BP(6) 2811: ANEW BP(3) BP(7) 2812: SET BP(7) BP(4) BP(6) 2813: MSET BP(6) m_93 P1:THIS 2814: MOV 0 BP(5) 2815: JGEQ BP(5) BP(3) Quad:2861 2816: MGET P1:THIS m_93 BP(6) 2817: GET BP(6) BP(4) BP(7) 2818: GET BP(1) BP(4) BP(8) 2819: GET BP(8) BP(5) BP(8) 2820: VAL BP(8) BP(8) 2821: SET BP(8) BP(5) BP(7) 2822: SET BP(7) BP(4) BP(6) 2823: MSET BP(6) m_93 P1:THIS 2824: MGET P1:THIS m_93 BP(6) 2825: GET BP(6) BP(4) BP(6) 2826: GET BP(6) BP(5) BP(6) 2827: JLEQ BP(6) 0 Quad:2859 2828: MGET P1:THIS m_106 BP(6) 2829: MGET P1:THIS m_111 BP(7) 2830: MGET P1:THIS m_112 BP(8) 2831: MGET P1:THIS m_93 BP(9) 2832: GET BP(9) BP(4) BP(9) 2833: GET BP(9) BP(5) BP(9) 2834: PUSH BP(9) 2835: PUSH BP(8) 2836: PUSH BP(7) 2837: PUSH BP(6) 2838: CALL Quad:2744 :CREATE_WALL 2839: POPN 1 2840: POP BP(6) 2841: MSET BP(6) m_106 P1:THIS 2842: POP BP(7) 2843: MSET BP(7) m_111 P1:THIS 2844: POP BP(8) 2845: MSET BP(8) m_112 P1:THIS 2846: POPN 1 2847: MGET P1:THIS m_106 BP(6) 2848: PUSH BP(6) 2849: CALLX 18 :CVMOBJ 1 2850: POP BP(6) 2851: POPN 1 2852: PUSH BP(4) 2853: PUSH 0 2854: PUSH BP(5) 2855: CALLM BP(6) m_8 3 2856: POPN 4 2857: MGET P1:THIS m_110 BP(7) 2858: AADD BP(6) BP(7) 2859: INC BP(5) 2860: JMP Quad:2815 2861: INC BP(4) 2862: JMP Quad:2809 2863: RET Void 2864: PUSHN 4 2865: MGET P1:THIS m_107 BP(1) 2866: CALLM BP(1) m_41 0 2867: POPN 1 2868: MOV 0 BP(1) 2869: MGET P1:THIS m_110 BP(2) 2870: LEN BP(2) BP(3) 2871: JGEQ BP(1) BP(3) Quad:2877 2872: GET BP(2) BP(1) BP(3) 2873: CALLM BP(3) m_41 0 2874: POPN 1 2875: INC BP(1) 2876: JMP Quad:2870 2877: RET Void 2878: PUSHN 11 2879: CALLX 2 :CAMERAGETCURRENT 0 2880: POP BP(1) 2881: MOV 0.1 BP(2) 2882: MGET G0:MOUSE m_0 BP(3) 2883: MGET G0:MOUSE m_1 BP(4) 2884: PUSH 0.5 2885: PUSH 0.5 2886: CALLM G0:MOUSE m_113 2 2887: POPN 3 2888: PUSH 0.5 2889: PUSH 0.5 2890: CALLX 42 :SETCURSORPOS 2 2891: POPN 3 2892: MOD G149:WINDOW_W 2 BP(5) 2893: JEQ BP(5) 0 Quad:2895 2894: MOV 9 G171:OFFSET_W 2895: MOD G150:WINDOW_H 2 BP(5) 2896: JNEQ BP(5) 0 Quad:2898 2897: MOV 31 G172:OFFSET_H 2898: JEQ BP(3) 0 Quad:2906 2899: DIV G149:WINDOW_W 2 BP(5) 2900: SUB BP(3) BP(5) BP(5) 2901: ADD G171:OFFSET_W BP(5) 2902: PUSH BP(5) 2903: CALLX 23 :FLOOR 1 2904: POP BP(3) 2905: POPN 1 2906: JEQ BP(4) 0 Quad:2914 2907: DIV G150:WINDOW_H 2 BP(5) 2908: SUB BP(4) BP(5) BP(5) 2909: ADD G172:OFFSET_H BP(5) 2910: PUSH BP(5) 2911: CALLX 4 :CEIL 1 2912: POP BP(4) 2913: POPN 1 2914: ADD BP(3) G174:MESHROT_X_CUMULATIVE 2915: ADD BP(4) G173:MESHROT_Y_CUMULATIVE 2916: ABS G173:MESHROT_Y_CUMULATIVE BP(5) 2917: JLEQ BP(5) 90 Quad:2922 2918: SUB BP(4) G173:MESHROT_Y_CUMULATIVE 2919: MUL BP(4) BP(2) BP(5) 2920: SUB BP(5) BP(4) 2921: MOV 0 BP(4) 2922: MUL BP(3) BP(2) BP(5) 2923: PUSH 0 2924: PUSH 1 2925: PUSH 0 2926: PUSH BP(5) 2927: CALLM BP(1) m_4 4 2928: POPN 5 2929: MUL BP(4) BP(2) BP(5) 2930: PUSH 0 2931: PUSH 0 2932: PUSH 1 2933: PUSH BP(5) 2934: CALLM BP(1) m_11 4 2935: POPN 5 2936: MGET G153:MY_PLAYERS m_99 BP(5) 2937: GET BP(5) 0 BP(6) 2938: CALLM BP(1) m_114 0 2939: POP BP(7) 2940: MSET BP(7) m_79 BP(6) 2941: SET BP(6) 0 BP(5) 2942: MSET BP(5) m_99 G153:MY_PLAYERS 2943: MGET G153:MY_PLAYERS m_99 BP(5) 2944: GET BP(5) 0 BP(6) 2945: CALLM BP(1) m_114 0 2946: POP BP(7) 2947: MSET BP(7) m_71 BP(6) 2948: SET BP(6) 0 BP(5) 2949: MSET BP(5) m_99 G153:MY_PLAYERS 2950: RET Void 2951: PUSHN 3 2952: PUSH P2:Y 2953: PUSH P1:X 2954: CALLX 0 :ATAN2 2 2955: POP BP(1) 2956: POPN 2 2957: JGEQ BP(1) 0 Quad:2960 2958: ABS BP(1) BP(2) 2959: SUB 6.28319 BP(2) BP(1) 2960: RET BP(1) 2961: PUSHN 14 2962: MGET G153:MY_PLAYERS m_99 BP(1) 2963: GET BP(1) 0 BP(1) 2964: MGET BP(1) m_79 BP(1) 2965: GET BP(1) 0 BP(1) 2966: MUL BP(1) BP(1) 2967: MGET G153:MY_PLAYERS m_99 BP(2) 2968: GET BP(2) 0 BP(2) 2969: MGET BP(2) m_79 BP(2) 2970: GET BP(2) 2 BP(2) 2971: MUL BP(2) BP(2) 2972: ADD BP(2) BP(1) 2973: MOV 1 BP(1) 2974: MGET G153:MY_PLAYERS m_99 BP(2) 2975: GET BP(2) 0 BP(2) 2976: MGET BP(2) m_79 BP(2) 2977: GET BP(2) 1 BP(2) 2978: PUSH BP(2) 2979: PUSH BP(1) 2980: CALL Quad:2951 :ATAN2PI 2981: POP BP(1) 2982: POPN 2 2983: SUB 1.5708 BP(1) BP(1) 2984: MGET G153:MY_PLAYERS m_99 BP(2) 2985: GET BP(2) 0 BP(2) 2986: MGET BP(2) m_79 BP(2) 2987: GET BP(2) 0 BP(2) 2988: MGET G153:MY_PLAYERS m_99 BP(3) 2989: GET BP(3) 0 BP(3) 2990: MGET BP(3) m_79 BP(3) 2991: GET BP(3) 2 BP(3) 2992: PUSH BP(3) 2993: PUSH BP(2) 2994: CALL Quad:2951 :ATAN2PI 2995: POP BP(2) 2996: POPN 2 2997: MUL BP(1) 57.2958 BP(3) 2998: MUL BP(2) 57.2958 BP(4) 2999: VNEW 3 BP(5) 3000: SIN BP(1) BP(6) 3001: NEG BP(6) BP(6) 3002: SIN BP(2) BP(7) 3003: MUL BP(7) BP(6) 3004: SET BP(6) 0 BP(5) 3005: COS BP(1) BP(6) 3006: SET BP(6) 1 BP(5) 3007: SIN BP(1) BP(6) 3008: NEG BP(6) BP(6) 3009: COS BP(2) BP(7) 3010: MUL BP(7) BP(6) 3011: SET BP(6) 2 BP(5) 3012: MUL G175:RHO BP(5) 3013: MGET G153:MY_PLAYERS m_99 BP(6) 3014: GET BP(6) 0 BP(6) 3015: MGET BP(6) m_70 BP(6) 3016: PUSH 0 3017: PUSH 1 3018: PUSH 0 3019: PUSH BP(4) 3020: CALLM BP(6) m_3 4 3021: POPN 5 3022: MGET G153:MY_PLAYERS m_99 BP(6) 3023: GET BP(6) 0 BP(6) 3024: MGET BP(6) m_70 BP(6) 3025: NEG BP(3) BP(7) 3026: PUSH 0 3027: PUSH 0 3028: PUSH 1 3029: PUSH BP(7) 3030: CALLM BP(6) m_115 4 3031: POPN 5 3032: VNEW 3 BP(6) 3033: JB G163:IS_FIRST Quad:3050 3034: MOV <cVct53 [ 0 , 1 , 0 ]> BP(7) 3035: MGET G153:MY_PLAYERS m_99 BP(8) 3036: GET BP(8) 0 BP(8) 3037: MGET BP(8) m_79 BP(8) 3038: GET BP(8) 0 BP(8) 3039: NEG BP(8) BP(8) 3040: ADD BP(8) BP(8) 3041: SET BP(8) 0 BP(7) 3042: MGET G153:MY_PLAYERS m_99 BP(8) 3043: GET BP(8) 0 BP(8) 3044: MGET BP(8) m_79 BP(8) 3045: GET BP(8) 2 BP(8) 3046: NEG BP(8) BP(8) 3047: ADD BP(8) BP(8) 3048: SET BP(8) 2 BP(7) 3049: MOV BP(7) BP(6) 3050: CALLX 2 :CAMERAGETCURRENT 0 3051: POP BP(7) 3052: MGET G153:MY_PLAYERS m_99 BP(8) 3053: GET BP(8) 0 BP(8) 3054: MGET BP(8) m_32 BP(8) 3055: ADD BP(5) BP(8) 3056: ADD BP(6) BP(8) 3057: PUSH BP(8) 3058: CALLM BP(7) m_8 1 3059: POPN 2 3060: RET Void 3061: PUSHN 2 3062: CALLX 3 :CAMERAGETDIRECTION 0 3063: POP G161:CAMDIR 3064: CALLX 2 :CAMERAGETCURRENT 0 3065: POP BP(1) 3066: PUSH G160:CAMPOS 3067: CALLM BP(1) m_8 1 3068: POPN 2 3069: CALLX 2 :CAMERAGETCURRENT 0 3070: POP BP(1) 3071: NEG G161:CAMDIR BP(2) 3072: PUSH BP(2) 3073: CALLM BP(1) m_116 1 3074: POPN 2 3075: RET Void 3076: PUSHN 1 3077: PUSH 162 3078: CALLX 33 :KEYPRESSED 1 3079: POP BP(1) 3080: POPN 1 3081: JNB BP(1) Quad:3090 3082: JB G163:IS_FIRST Quad:3085 3083: MOV True BP(1) 3084: JMP Quad:3086 3085: MOV False BP(1) 3086: MOV BP(1) G163:IS_FIRST 3087: MOV True G162:SWITCHED_VIEW 3088: MOV 0 G173:MESHROT_Y_CUMULATIVE 3089: MOV 0 G174:MESHROT_X_CUMULATIVE 3090: CALL Quad:2961 :FIRSTPERSONVIEW 3091: POPN 1 3092: CALL Quad:2878 :CAMERAMOVEMOUSE 3093: POPN 1 3094: RET Void 3095: PUSHN 0 3096: PUSH <cStr54 "XVRResources.zip"> 3097: CALLX 22 :FILEDOWNLOAD 1 3098: POPN 2 3099: RET Void 3100: PUSHN 1 3101: CALLX 11 :CVMLIGHT 0 3102: POP G176:LIGHT0 3103: PUSH G177:POSL 3104: CALLM G176:LIGHT0 m_8 1 3105: POPN 2 3106: PUSH 1 3107: PUSH 1 3108: PUSH 1 3109: CALLM G176:LIGHT0 m_117 3 3110: POPN 4 3111: CALLM G176:LIGHT0 m_118 0 3112: POPN 1 3113: CALLX 21 :CVMWEBBROWSER 0 3114: POP G148:WINDOW 3115: CALL Quad:1007 :GET_RESOLUTION 3116: POP G151:RESOLUTION 3117: CALL Quad:3061 :INIT_CAMERA 3118: POPN 1 3119: CALLX 47 :WORLD 0 3120: POP G152:MY_WORLD 3121: CALLM G152:MY_WORLD m_89 0 3122: POPN 1 3123: CALLX 39 :PLAYER_MANAGER 0 3124: POP G153:MY_PLAYERS 3125: MGET G152:MY_WORLD m_93 BP(1) 3126: PUSH BP(1) 3127: CALLM G153:MY_PLAYERS m_89 1 3128: POPN 2 3129: VNEW 3 BP(1) 3130: PUSH <cVct55 [ 2 , 0 , 2 ]> 3131: PUSH BP(1) 3132: PUSH 0 3133: CALLM G153:MY_PLAYERS m_119 3 3134: POPN 4 3135: CALLX 35 :MAP 0 3136: POP G157:MY_MAP 3137: CALLX 38 :PLAYER_INFO 0 3138: POP G158:MY_PLAYER_INFO 3139: CALLX 32 :HELP_MENU 0 3140: POP G156:MY_HELP_MENU 3141: CALLM G156:MY_HELP_MENU m_89 0 3142: POPN 1 3143: CALLX 44 :STARTUP_MENU 0 3144: POP G154:MY_STARTUP_MENU 3145: PUSH G156:MY_HELP_MENU 3146: CALLM G154:MY_STARTUP_MENU m_89 1 3147: POPN 2 3148: CALLX 36 :PAUSE_MENU 0 3149: POP G155:MY_PAUSE_MENU 3150: PUSH G156:MY_HELP_MENU 3151: PUSH G154:MY_STARTUP_MENU 3152: CALLM G155:MY_PAUSE_MENU m_89 2 3153: POPN 3 3154: PUSH 60 3155: CALLX 43 :SETFRAMERATE 1 3156: POPN 2 3157: RET Void 3158: PUSHN 3 3159: CALLX 2 :CAMERAGETCURRENT 0 3160: POP BP(1) 3161: CALLM BP(1) m_7 0 3162: CALLM G176:LIGHT0 m_8 1 3163: POPN 2 3164: CALL Quad:1007 :GET_RESOLUTION 3165: POP G151:RESOLUTION 3166: MGET G155:MY_PAUSE_MENU m_23 BP(1) 3167: JB BP(1) Quad:3184 3168: CALLM G153:MY_PLAYERS m_98 0 3169: POPN 1 3170: CALLM G153:MY_PLAYERS m_120 0 3171: POP BP(1) 3172: MGET G153:MY_PLAYERS m_54 BP(2) 3173: PUSH BP(1) 3174: PUSH BP(2) 3175: CALLM G157:MY_MAP m_98 2 3176: POPN 3 3177: GET BP(1) 0 BP(2) 3178: PUSH 1000 3179: PUSH 0 3180: PUSH 0 3181: PUSH BP(2) 3182: CALLM G158:MY_PLAYER_INFO m_98 4 3183: POPN 5 3184: MGET G155:MY_PAUSE_MENU m_23 BP(2) 3185: JB BP(2) Quad:3190 3186: MGET G154:MY_STARTUP_MENU m_23 BP(2) 3187: JB BP(2) Quad:3190 3188: CALL Quad:3076 :UPDATE_CAMERA 3189: POPN 1 3190: MGET G154:MY_STARTUP_MENU m_23 BP(2) 3191: JB BP(2) Quad:3194 3192: CALLM G155:MY_PAUSE_MENU m_98 0 3193: POPN 1 3194: CALLX 40 :SCENEBEGIN 0 3195: POPN 1 3196: PUSH 100 3197: PUSH <cVct56 [ 0.5 , 0.5 , 0.5 ]> 3198: CALL Quad:3231 :DRAWGRID 3199: POPN 3 3200: MGET G154:MY_STARTUP_MENU m_23 BP(2) 3201: JNB BP(2) Quad:3205 3202: CALLM G154:MY_STARTUP_MENU m_41 0 3203: POPN 1 3204: JMP Quad:3218 3205: CALLM G152:MY_WORLD m_41 0 3206: POPN 1 3207: CALLM G153:MY_PLAYERS m_41 0 3208: POPN 1 3209: MGET G155:MY_PAUSE_MENU m_23 BP(2) 3210: JNB BP(2) Quad:3214 3211: CALLM G155:MY_PAUSE_MENU m_41 0 3212: POPN 1 3213: JMP Quad:3218 3214: CALLM G157:MY_MAP m_41 0 3215: POPN 1 3216: CALLM G158:MY_PLAYER_INFO m_41 0 3217: POPN 1 3218: CALLX 41 :SCENEEND 0 3219: POPN 1 3220: RET Void 3221: PUSHN 0 3222: RET Void 3223: PUSHN 0 3224: RET Void 3225: PUSHN 0 3226: RET Void 3227: PUSHN 0 3228: RET Void 3229: PUSHN 0 3230: RET Void 3231: PUSHN 8 3232: PUSH 69 3233: CALLX 30 :GLPUSHATTRIB 1 3234: POPN 2 3235: PUSH 1 3236: CALLX 28 :GLLINEWIDTH 1 3237: POPN 2 3238: PUSH 2896 3239: CALLX 26 :GLDISABLE 1 3240: POPN 2 3241: PUSH P1:COL 3242: CALLX 25 :GLCOLOR 1 3243: POPN 2 3244: DIV P2:SIZE 2 BP(1) 3245: NEG BP(1) BP(2) 3246: DIV P2:SIZE 10 BP(3) 3247: PUSH 1 3248: CALLX 24 :GLBEGIN 1 3249: POPN 2 3250: MOV BP(2) BP(4) 3251: JGR BP(4) BP(1) Quad:3274 3252: PUSH BP(1) 3253: PUSH 0 3254: PUSH BP(4) 3255: CALLX 31 :GLVERTEX 3 3256: POPN 4 3257: PUSH BP(2) 3258: PUSH 0 3259: PUSH BP(4) 3260: CALLX 31 :GLVERTEX 3 3261: POPN 4 3262: PUSH BP(4) 3263: PUSH 0 3264: PUSH BP(1) 3265: CALLX 31 :GLVERTEX 3 3266: POPN 4 3267: PUSH BP(4) 3268: PUSH 0 3269: PUSH BP(2) 3270: CALLX 31 :GLVERTEX 3 3271: POPN 4 3272: ADD BP(3) BP(4) 3273: JMP Quad:3251 3274: CALLX 27 :GLEND 0 3275: POPN 1 3276: CALLX 29 :GLPOPATTRIB 0 3277: POPN 1 3278: RET Void
libsrc/_DEVELOPMENT/stdlib/c/sccz80/strtoul_callee.asm
Frodevan/z88dk
640
27200
; unsigned long strtoul( const char * restrict nptr, char ** restrict endptr, int base) SECTION code_clib SECTION code_stdlib PUBLIC strtoul_callee EXTERN asm_strtoul strtoul_callee: IF __CPU_GBZ80__ pop af ;ret pop bc ;base pop de ;endptr pop hl ;nptr push af ELSE pop hl pop bc pop de ex (sp),hl ENDIF jp asm_strtoul ; SDCC bridge for Classic IF __CLASSIC PUBLIC _strtoul_callee defc _strtoul_callee = strtoul_callee ENDIF
LP/Model.agda
hbasold/Sandbox
0
7301
<reponame>hbasold/Sandbox open import Signature import Logic module Model (Σ Δ : Sig) (V : Set) (Φ : Logic.Program Σ Δ V) where open import Function open import Data.Empty renaming (⊥ to Ø) open import Data.Sum open import Data.Product renaming (Σ to ∐) open import Relation.Unary open import Relation.Binary.PropositionalEquality hiding ([_]) open import Logic Σ Δ V open import Terms Σ -- | I-ary relations over A Rel : Set → Set → Set₁ Rel I A = (I → A) → Set _⊆ᵣ_ : ∀{I A} → Rel I A → Rel I A → Set R₁ ⊆ᵣ R₂ = ∀{t} → R₁ t → R₂ t PredInterpret : Set₁ PredInterpret = (Q : ∥ Δ ∥) → Rel (ar Δ Q) (T∞ Ø) _⊑ᵢ_ : PredInterpret → PredInterpret → Set I₁ ⊑ᵢ I₂ = ∀ {Q} → I₁ Q ⊆ᵣ I₂ Q liftApp∞ : ∀ {V W} {I : Set} → Subst∞ V W → (I → T∞ V) → (I → T∞ W) liftApp∞ σ f i = app∞ σ (f i) _≡[_]_ : T∞ Ø → Subst∞ V Ø → T V → Set t ≡[ σ ] s = t ~ app∞ σ (χ s) {- _⊨[_]_ : PredInterpret → Subst∞ V Ø → Formula → Set I ⊨[ σ ] (inj₁ (Q , ts)) = liftApp∞ σ (χ ∘ ts) ∈ I Q I ⊨[ σ ] (inj₂ _) = Ø -} _⊨[_]_ : PredInterpret → Subst∞ V Ø → Formula → Set I ⊨[ σ ] (Q , ts) = liftApp∞ σ (χ ∘ ts) ∈ I Q ⟦_⟧ : dom Φ → PredInterpret → PredInterpret ⟦ C ⟧ I = F (get Φ C) where -- | Forward closure for inductive clauses is given by -- F(h ⊢μ Q'(t))(I)(Q) -- = {t[σ] | σ : V → Ø ∧ Q ≡ Q' ∧ ∀ P(s) ∈ h. s[σ] ∈ I(P)}. -- The backwards closure for coinductive clauses is, on the other hand, -- given by -- F(h ⊢ν P(s))(I)(Q) = {t[σ] | σ : V → Ø ∧ Q(t) ∈ h ∧ s ∈ I(Q)} F : Clause → PredInterpret F (h ⊢[ ind ] (Q' , pat)) Q ts = ∐ (Q' ≡ Q) (λ p → ∃ (λ σ → ∀ i → ts (subst _ p i) ≡[ σ ] pat i × (∀ j → I ⊨[ σ ] get h j))) F (h ⊢[ coind ] φ) Q ts = ∃ (λ j → ∐ (proj₁ (get h j) ≡ Q) (λ p → ∃ (λ σ → ∀ i → ts (subst _ p i) ≡[ σ ] proj₂ (get h j) i × I ⊨[ σ ] φ))) FormInterpret : PredInterpret → Formula → Pred (Subst∞ V Ø) _ FormInterpret I (Q , ts) σ = (λ i → app∞ σ (χ (ts i))) ∈ I Q B : (Formula → Pred (Subst∞ V Ø) _) → (Formula → Pred (Subst∞ V Ø) _) B D F = {!!} record ModelData : Set₁ where field preds : PredInterpret
ZORTON.reko/ZORTON_1F0F.asm
0xLiso/dePIXELator
0
81891
;;; Segment 1F0F (1F0F:0000) 1F0F:0000 00 03 00 10 00 14 00 C5 02 9D 02 FA 02 FE 02 ............... ;; fn1F0F_000F: 1F0F:000F ;; Called from: ;; 268D:0327 (in fn268D_0282) fn1F0F_000F proc enter 8h,0h mov ax,[bp+6h] mov [bp-4h],ax mov ax,2862h mov es,ax mov byte ptr es:[0000h],2h mov ax,28BAh mov es,ax mov word ptr es:[8586h],2h call far 23F8h:0004h mov ax,28BAh mov es,ax mov word ptr es:[9BE0h],0FFFFh mov word ptr [bp-2h],0h jmp 0059h l1F0F_0048: mov ax,28BAh mov bx,[bp-2h] mov es,ax mov byte ptr es:[bx+9BDAh],0h inc word ptr [bp-2h] l1F0F_0059: cmp word ptr [bp-2h],6h jl 0048h l1F0F_005F: cmp word ptr [bp+6h],0h jz 0068h l1F0F_0065: jmp 011Ch l1F0F_0068: mov ax,28BAh mov es,ax mov word ptr es:[0A520h],3h mov ax,28BAh mov es,ax mov byte ptr es:[0A17Dh],0h mov ax,28BAh mov es,ax mov eax,es:[3096h] mov dx,28BAh mov es,dx mov es:[0A17Eh],eax mov ax,28BAh mov es,ax mov byte ptr es:[0A182h],19h mov ax,28BAh mov dl,6h mov es,ax mov es:[3035h],dl mov al,dl mov dx,28BAh mov es,dx mov es:[3034h],al mov ax,28BAh mov es,ax mov word ptr es:[3036h],12h mov es,ax mov byte ptr es:[3038h],0h mov ax,28BAh mov es,ax mov byte ptr es:[303Dh],4h mov es,ax mov byte ptr es:[303Eh],6h mov es,ax mov word ptr es:[303Fh],0h mov ax,28BAh mov es,ax mov byte ptr es:[3046h],1h mov es,ax mov byte ptr es:[3047h],2h mov es,ax mov word ptr es:[3048h],1h mov ax,28BAh mov es,ax mov word ptr es:[3051h],28BAh mov word ptr es:[304Fh],3034h mov word ptr [bp-4h],0h jmp 023Ah l1F0F_011C: mov ax,28BAh mov es,ax mov word ptr es:[3051h],28BAh mov word ptr es:[304Fh],3034h mov ax,28BAh mov es,ax cmp word ptr es:[3036h],6h jl 014Eh l1F0F_013C: mov es,ax mov byte ptr es:[3034h],6h mov es,ax sub word ptr es:[3036h],6h jmp 016Ch l1F0F_014E: mov ax,28BAh mov es,ax mov al,es:[3036h] mov dx,28BAh mov es,dx mov es:[3034h],al mov ax,28BAh mov es,ax mov word ptr es:[3036h],0h l1F0F_016C: mov ax,28BAh mov es,ax test word ptr es:[0A520h],4h jz 01C5h l1F0F_017A: push 28BAh push 87ACh call far 23F8h:0055h add sp,4h mov ax,28BAh mov es,ax cmp word ptr es:[3048h],2h jl 01A7h l1F0F_0195: mov es,ax mov byte ptr es:[3046h],2h mov es,ax sub word ptr es:[3048h],2h jmp 01C5h l1F0F_01A7: mov ax,28BAh mov es,ax mov al,es:[3048h] mov dx,28BAh mov es,dx mov es:[3046h],al mov ax,28BAh mov es,ax mov word ptr es:[3048h],0h l1F0F_01C5: mov ax,28BAh mov es,ax test word ptr es:[0A520h],8h jz 021Eh l1F0F_01D3: push 28BAh push 87EEh call far 23F8h:0055h add sp,4h mov ax,28BAh mov es,ax cmp word ptr es:[303Fh],6h jl 0200h l1F0F_01EE: mov es,ax mov byte ptr es:[303Dh],6h mov es,ax sub word ptr es:[303Fh],6h jmp 021Eh l1F0F_0200: mov ax,28BAh mov es,ax mov al,es:[303Fh] mov dx,28BAh mov es,dx mov es:[303Dh],al mov ax,28BAh mov es,ax mov word ptr es:[303Fh],0h l1F0F_021E: mov ax,28BAh mov es,ax test word ptr es:[0A520h],3F00h jz 023Ah l1F0F_022C: push 28BAh push 8830h call far 23F8h:0055h add sp,4h l1F0F_023A: call far 226Dh:00F9h push 0h call far 226Dh:0656h pop cx call far 23F8h:00A0h call far 226Dh:057Fh jmp 043Ch l1F0F_0254: call far 2476h:000Ah mov ax,28BAh mov es,ax mov word ptr es:[8402h],0h call far 226Dh:00F9h cli call far 2425h:01E8h sti push 0h call far 226Dh:0656h pop cx call far 23F8h:00A0h call far 226Dh:057Fh mov ax,28BAh mov es,ax test word ptr es:[0A184h],1h jz 029Ch l1F0F_0291: mov ax,28BAh mov es,ax add word ptr es:[2E1Ah],15h l1F0F_029C: mov ax,28BAh mov es,ax cmp word ptr es:[2E1Ah],2E1Ah jbe 02BAh l1F0F_02AA: mov es,ax mov word ptr es:[2E1Ch],28BAh mov word ptr es:[2E1Ah],2D72h l1F0F_02BA: cmp word ptr [bp-4h],1Bh jle 0321h l1F0F_02C0: call far 23F8h:00A0h mov ax,28BAh mov es,ax mov byte ptr es:[3034h],0h mov es,ax mov word ptr es:[3036h],0h mov es,ax mov byte ptr es:[3038h],0h mov ax,28BAh mov es,ax mov byte ptr es:[303Dh],0h mov es,ax mov word ptr es:[303Fh],0h mov ax,28BAh mov es,ax mov byte ptr es:[3046h],0h mov es,ax mov word ptr es:[3048h],0h mov ax,28BAh mov es,ax mov word ptr es:[3051h],28BAh mov word ptr es:[304Fh],3034h call far 226Dh:00F9h l1F0F_0321: cmp word ptr [bp-4h],1Ch jle 0337h l1F0F_0327: mov ax,28BAh mov es,ax mov byte ptr es:[3034h],2h call far 226Dh:00F9h l1F0F_0337: call far 209Fh:02A7h mov ax,28BAh mov dl,[bp-4h] mov es,ax mov es:[0A17Dh],dl mov ax,[bp-4h] mov [8062h],ax mov bx,[bp-4h] imul bx,bx,0Ch mov eax,[bx+8070h] mov [8064h],eax mov bx,[bp-4h] shl bx,2h mov ax,[bx+7FECh] mov dx,[bx+7FEAh] mov [bp-6h],ax mov [bp-8h],dx mov ax,28BAh mov edx,[bp-8h] mov es,ax mov es:[3026h],edx l1F0F_0381: call far 2331h:0167h or ax,dx jnz 0381h l1F0F_038A: call far 2331h:0118h or ax,dx jnz 038Ah l1F0F_0393: cmp word ptr [bp-4h],15h jle 0412h l1F0F_0399: mov ax,28BAh mov es,ax cmp word ptr es:[0A18Ch],0FFh jz 0412h l1F0F_03A7: mov es,ax cmp word ptr es:[0A18Ch],8h jnz 03BBh l1F0F_03B1: push 1h call far 0CE0h:08FCh pop cx jmp 03C9h l1F0F_03BB: push 28BAh push 28B8h call far 1D10h:02AEh add sp,4h l1F0F_03C9: push 0h push 5h call far 2331h:00BAh add sp,6h mov dword ptr [bp-8h],0h dec word ptr [bp-4h] mov ax,28BAh mov dl,[bp-4h] mov es,ax mov es:[0A17Dh],dl mov ax,[bp-4h] mov [8062h],ax mov bx,[bp-4h] imul bx,bx,0Ch mov eax,[bx+8070h] mov [8064h],eax mov ax,28BAh mov es,ax mov dword ptr es:[3026h],0h l1F0F_0412: push dword ptr [bp-8h] nop push cs call 057Ah add sp,4h mov ax,28BAh mov es,ax mov al,es:[0A182h] cbw or ax,ax jz 0445h l1F0F_042C: mov ax,2862h mov es,ax cmp byte ptr es:[0000h],10h jz 0445h l1F0F_0439: inc word ptr [bp-4h] l1F0F_043C: cmp word ptr [bp-4h],1Eh jge 0445h l1F0F_0442: jmp 0254h l1F0F_0445: xor ax,ax leave retf 1F0F:0449 C8 08 00 00 C6 46 FF .....F. 1F0F:0450 00 C6 46 FD 05 C6 46 FE 00 EB 10 8A 46 FE 98 8B ..F...F.....F... 1F0F:0460 D8 8A 87 D0 81 00 46 FF FE 46 FE 80 7E FE 04 7C ......F..F..~..| 1F0F:0470 EA 80 7E FF 04 75 1A C6 46 FE 00 EB 0E 8A 46 FE ..~..u..F.....F. 1F0F:0480 98 8B D8 C6 87 D0 81 00 FE 46 FE 80 7E FE 04 7C .........F..~..| 1F0F:0490 EC 66 81 3E 64 80 80 00 00 00 75 37 B8 BA 28 8E .f.>d.....u7..(. 1F0F:04A0 C0 26 81 3E 8C A1 FF 00 75 29 B8 BA 28 8E C0 66 .&.>....u)..(..f 1F0F:04B0 26 F7 06 D0 83 01 00 00 00 74 0C C7 46 FA BA 28 &........t..F..( 1F0F:04C0 C7 46 F8 74 36 EB 41 C7 46 FA BA 28 C7 46 F8 01 .F.t6.A.F..(.F.. 1F0F:04D0 36 EB 35 9A 3F 08 00 08 BB 04 00 99 F7 FB 80 E2 6.5.?........... 1F0F:04E0 03 88 56 FD 8A 46 FD 98 8B D8 80 BF D0 81 00 75 ..V..F.........u 1F0F:04F0 E2 8A 46 FD 98 C1 E0 02 8B D8 8B 87 8C 7F 8B 97 ..F............. 1F0F:0500 8A 7F 89 46 FA 89 56 F8 B8 62 28 8E C0 26 C6 06 ...F..V..b(..&.. 1F0F:0510 00 00 02 EB 3E 66 FF 76 F8 C4 5E F8 26 FF 5F 1B ....>f.v..^.&._. 1F0F:0520 83 C4 04 89 56 FA 89 46 F8 8C D8 39 46 FA 75 07 ....V..F...9F.u. 1F0F:0530 81 7E F8 D2 A3 74 0E 8C D8 39 46 FA 75 15 81 7E .~...t...9F.u..~ 1F0F:0540 F8 F3 A3 75 0E 66 FF 76 F8 90 0E E8 A9 06 83 C4 ...u.f.v........ 1F0F:0550 04 EB 25 66 83 7E F8 00 74 0D B8 BA 28 8E C0 26 ..%f.~..t...(..& 1F0F:0560 80 3E 82 A1 00 75 AE 80 7E FD 04 7D 0B 8A 46 FD .>...u..~..}..F. 1F0F:0570 98 8B D8 C6 87 D0 81 01 C9 CB .......... ;; fn1F0F_057A: 1F0F:057A ;; Called from: ;; 1F0F:0417 (in fn1F0F_000F) fn1F0F_057A proc enter 6h,0h jmp 06ACh l1F0F_0581: les bx,[bp+6h] test word ptr es:[bx+19h],1h jz 05B4h l1F0F_058C: cmp dword ptr es:[bx+15h],0h jz 05A5h l1F0F_0594: mov eax,es:[bx+15h] mov dx,28BAh mov es,dx mov es:[3026h],eax jmp 05B4h l1F0F_05A5: mov ax,28BAh mov edx,[bp+6h] mov es,ax mov es:[3026h],edx l1F0F_05B4: mov ax,28BAh mov edx,[bp+6h] mov es,ax mov es:[0A179h],edx mov ax,2862h mov es,ax mov byte ptr es:[0000h],2h push dword ptr [bp+6h] les bx,[bp+6h] call dword ptr es:[bx+1Bh] add sp,4h mov [bp+8h],dx mov [bp+6h],ax mov ax,ds cmp [bp+8h],ax jnz 05F0h l1F0F_05E9: cmp word ptr [bp+6h],0A3D2h jz 0604h l1F0F_05F0: mov ax,ds cmp [bp+8h],ax jz 05FAh l1F0F_05F7: jmp 06ACh l1F0F_05FA: cmp word ptr [bp+6h],0A3F3h jz 0604h l1F0F_0601: jmp 06ACh l1F0F_0604: push dword ptr [bp+6h] nop push cs call 0BF7h add sp,4h mov ax,28BAh mov es,ax mov eax,es:[3026h] mov [bp+6h],eax cmp word ptr [bp+8h],28BAh jnz 068Dh l1F0F_0625: cmp word ptr [bp+6h],2B3Ah jnz 068Dh l1F0F_062C: call far 23F8h:00A0h mov ax,28BAh mov es,ax mov byte ptr es:[3034h],2h mov es,ax mov word ptr es:[3036h],0h mov es,ax mov byte ptr es:[3038h],0h mov ax,28BAh mov es,ax mov byte ptr es:[303Dh],0h mov es,ax mov word ptr es:[303Fh],0h mov ax,28BAh mov es,ax mov byte ptr es:[3046h],0h mov es,ax mov word ptr es:[3048h],0h mov ax,28BAh mov es,ax mov word ptr es:[3051h],28BAh mov word ptr es:[304Fh],3034h call far 226Dh:00F9h l1F0F_068D: mov bx,[8062h] imul bx,bx,0Ch mov eax,[bx+8070h] mov [8064h],eax mov ax,2862h mov es,ax cmp byte ptr es:[0000h],10h jnz 06ACh l1F0F_06AA: jmp 06C3h l1F0F_06AC: cmp dword ptr [bp+6h],0h jz 06C3h l1F0F_06B3: mov ax,28BAh mov es,ax cmp byte ptr es:[0A182h],0h jz 06C3h l1F0F_06C0: jmp 0581h l1F0F_06C3: mov ax,28BAh mov es,ax mov al,es:[0A182h] cbw or ax,ax jnz 06D4h l1F0F_06D1: jmp 077Eh l1F0F_06D4: inc word ptr [8062h] jmp 076Ch l1F0F_06DB: les bx,[bp-4h] mov al,es:[bx] mov ah,0h mov [bp-6h],ax mov cx,8h mov bx,780h l1F0F_06EC: mov ax,cs:[bx] cmp ax,[bp-6h] jz 06FBh l1F0F_06F4: add bx,2h loop 06ECh l1F0F_06F9: jmp 076Ch l1F0F_06FB: jmp word ptr cs:[bx+10h] 1F0F:06FF 66 f 1F0F:0700 68 25 00 58 00 66 68 25 00 40 00 66 68 46 00 14 h%.X.fh%.@.fhF.. 1F0F:0710 00 1E 68 D7 81 9A A3 00 31 0E 83 C4 10 0B C0 74 ..h.....1......t 1F0F:0720 4B B8 62 28 8E C0 26 C6 06 00 00 10 EB 50 9A 02 K.b(..&......P.. 1F0F:0730 00 C3 1C EB 37 68 BA 28 68 65 2A 9A AE 02 10 1D ....7h.(he*..... 1F0F:0740 83 C4 04 EB 39 9A A0 00 F8 23 EB 20 9A F9 00 6D ....9....#. ...m 1F0F:0750 22 EB 19 C4 5E FC 26 C4 5F 01 66 26 FF 37 9A 0F "...^.&._.f&.7.. 1F0F:0760 00 C1 1B 83 C4 04 EB 04 0E E8 DD FC ............ l1F0F_076C: call far 2331h:0167h mov [bp-2h],dx mov [bp-4h],ax or ax,dx jz 077Eh l1F0F_077B: jmp 06DBh l1F0F_077E: leave retf 1F0F:0780 03 00 04 00 05 00 14 00 15 00 16 00 17 00 E8 00 ................ 1F0F:0790 FF 06 7E 07 2E 07 53 07 4C 07 45 07 68 07 35 07 ..~...S.L.E.h.5. 1F0F:07A0 55 8B EC C4 5E 06 26 F7 47 19 01 00 74 28 66 26 U...^.&.G...t(f& 1F0F:07B0 83 7F 15 00 74 11 66 26 8B 47 15 BA BA 28 8E C2 ....t.f&.G...(.. 1F0F:07C0 66 26 A3 26 30 EB 0F B8 BA 28 66 8B 56 06 8E C0 f&.&0....(f.V... 1F0F:07D0 66 26 89 16 26 30 B8 BA 28 66 8B 56 06 8E C0 66 f&..&0..(f.V...f 1F0F:07E0 26 89 16 79 A1 FA 9A E8 01 25 24 66 6A 00 6A 01 &..y.....%$fj.j. 1F0F:07F0 66 6A 00 6A 01 6A 00 6A 00 6A 01 6A 00 9A 04 00 fj.j.j.j.j.j.... 1F0F:0800 53 23 83 C4 14 9A 86 02 25 24 FB 66 FF 76 06 9A S#......%$.f.v.. 1F0F:0810 AE 02 10 1D 83 C4 04 89 56 08 89 46 06 66 83 7E ........V..F.f.~ 1F0F:0820 06 00 75 03 E9 A4 00 C4 5E 06 26 81 7F 1D 0F 1F ..u.....^.&..... 1F0F:0830 74 03 E9 96 00 26 81 7F 1B A0 07 74 03 E9 8B 00 t....&.....t.... 1F0F:0840 8C D8 39 46 08 75 07 81 7E 06 D2 A3 74 7D 8C D8 ..9F.u..~...t}.. 1F0F:0850 39 46 08 75 07 81 7E 06 F3 A3 74 6F C4 5E 06 26 9F.u..~...to.^.& 1F0F:0860 80 7F 10 00 74 44 26 C4 5F 11 66 26 8B 07 66 89 ....tD&._.f&..f. 1F0F:0870 46 06 66 83 7E 06 00 74 52 C4 5E 06 26 81 7F 1D F.f.~..tR.^.&... 1F0F:0880 0F 1F 75 47 26 81 7F 1B A0 07 75 3F 8C D8 39 46 ..uG&.....u?..9F 1F0F:0890 08 75 07 81 7E 06 D2 A3 74 31 8C D8 39 46 08 75 .u..~...t1..9F.u 1F0F:08A0 13 81 7E 06 F3 A3 75 0C EB 21 66 C7 46 06 00 00 ..~...u..!f.F... 1F0F:08B0 00 00 EB 17 66 83 7E 06 00 74 10 B8 BA 28 8E C0 ....f.~..t...(.. 1F0F:08C0 26 80 3E 82 A1 00 74 03 E9 D8 FE FA 9A E8 01 25 &.>...t........% 1F0F:08D0 24 B8 BA 28 8E C0 66 26 C7 06 2C 30 00 00 00 00 $..(..f&..,0.... 1F0F:08E0 FB 8B 56 08 8B 46 06 5D CB C8 14 00 00 B8 62 28 ..V..F.]......b( 1F0F:08F0 8E C0 26 80 3E 00 00 10 75 03 E9 FB 01 C7 46 F4 ..&.>...u.....F. 1F0F:0900 00 00 EB 0F 8D 46 F6 8B 5E F4 03 D8 36 C6 07 00 .....F..^...6... 1F0F:0910 FF 46 F4 C4 5E 06 26 8A 47 10 98 3B 46 F4 7F E4 .F..^.&.G..;F... 1F0F:0920 B8 BA 28 8E C0 26 A0 82 A1 A2 14 A4 8E 46 08 26 ..(..&.......F.& 1F0F:0930 8B 47 1F 89 46 F2 26 8A 47 10 88 46 F1 26 F7 47 .G..F.&.G..F.&.G 1F0F:0940 19 40 00 74 03 FE 4E F1 C4 5E 06 26 F7 47 19 01 .@.t..N..^.&.G.. 1F0F:0950 00 74 28 66 26 83 7F 15 00 74 11 66 26 8B 47 15 .t(f&....t.f&.G. 1F0F:0960 BA BA 28 8E C2 66 26 A3 26 30 EB 0F B8 BA 28 66 ..(..f&.&0....(f 1F0F:0970 8B 56 06 8E C0 66 26 89 16 26 30 C6 46 F0 00 E9 .V...f&..&0.F... 1F0F:0980 39 01 9A 3F 08 00 08 50 8A 46 F1 98 8B D8 58 99 9..?...P.F....X. 1F0F:0990 F7 FB 89 56 F4 8A 46 F1 98 3B 46 F4 7E E4 8D 46 ...V..F..;F.~..F 1F0F:09A0 F6 8B 5E F4 03 D8 36 80 3F 00 75 D6 8D 46 F6 8B ..^...6.?.u..F.. 1F0F:09B0 5E F4 03 D8 36 C6 07 01 C4 5E 06 26 C4 5F 11 8B ^...6....^.&._.. 1F0F:09C0 46 F4 C1 E0 02 03 D8 26 8B 47 02 26 8B 17 89 46 F......&.G.&...F 1F0F:09D0 EE 89 56 EC 66 83 7E EC 00 74 74 50 52 C4 5E EC ..V.f.~..ttPR.^. 1F0F:09E0 26 FF 5F 1B 83 C4 04 89 56 EE 89 46 EC EB 60 8C &._.....V..F..`. 1F0F:09F0 D8 39 46 EE 75 07 81 7E EC D2 A3 74 0E 8C D8 39 .9F.u..~...t...9 1F0F:0A00 46 EE 75 1D 81 7E EC F3 A3 75 16 66 FF 76 EC 90 F.u..~...u.f.v.. 1F0F:0A10 0E E8 E3 01 83 C4 04 66 C7 46 EC 00 00 00 00 EB .......f.F...... 1F0F:0A20 14 66 FF 76 EC C4 5E EC 26 FF 5F 1B 83 C4 04 89 .f.v..^.&._..... 1F0F:0A30 56 EE 89 46 EC B8 62 28 8E C0 26 80 3E 00 00 10 V..F..b(..&.>... 1F0F:0A40 75 0D B8 BA 28 8E C0 26 C6 06 82 A1 00 EB 07 66 u...(..&.......f 1F0F:0A50 83 7E EC 00 75 99 B8 BA 28 8E C0 26 A0 82 A1 98 .~..u...(..&.... 1F0F:0A60 0B C0 75 07 33 D2 33 C0 E9 93 00 C4 5E 06 26 F7 ..u.3.3.....^.&. 1F0F:0A70 47 19 80 00 74 42 B8 BA 28 8E C0 26 A0 82 A1 3A G...tB..(..&...: 1F0F:0A80 06 14 A4 74 33 C6 46 F0 FF C7 46 F4 00 00 EB 0F ...t3.F...F..... 1F0F:0A90 8D 46 F6 8B 5E F4 03 D8 36 C6 07 00 FF 46 F4 C4 .F..^...6....F.. 1F0F:0AA0 5E 06 26 8A 47 10 98 3B 46 F4 7F E4 B8 BA 28 8E ^.&.G..;F.....(. 1F0F:0AB0 C0 26 A0 82 A1 A2 14 A4 FE 46 F0 8A 46 F0 98 3B .&.......F..F..; 1F0F:0AC0 46 F2 7D 03 E9 BB FE C4 5E 06 26 F7 47 19 40 00 F.}.....^.&.G.@. 1F0F:0AD0 74 1E 26 8A 47 10 98 48 C1 E0 02 26 C4 5F 11 03 t.&.G..H...&._.. 1F0F:0AE0 D8 26 8B 47 02 26 8B 17 89 46 08 89 56 06 EB 08 .&.G.&...F..V... 1F0F:0AF0 66 C7 46 06 00 00 00 00 8B 56 08 8B 46 06 C9 CB f.F......V..F... 1F0F:0B00 55 8B EC B8 BA 28 8E C0 26 A0 34 30 98 BA BA 28 U....(..&.40...( 1F0F:0B10 8E C2 26 01 06 36 30 B8 BA 28 8E C0 26 C6 06 34 ..&..60..(..&..4 1F0F:0B20 30 00 B8 BA 28 8E C0 26 C7 06 51 30 BA 28 26 C7 0...(..&..Q0.(&. 1F0F:0B30 06 4F 30 34 30 B8 BA 28 8E C0 26 C7 06 86 85 02 .O040..(..&..... 1F0F:0B40 00 FA 9A E8 01 25 24 66 6A 00 6A 01 66 6A 00 6A .....%$fj.j.fj.j 1F0F:0B50 01 6A 00 6A 00 6A 00 6A 00 9A 04 00 53 23 83 C4 .j.j.j.j....S#.. 1F0F:0B60 14 9A 86 02 25 24 FB 9A F9 00 6D 22 B8 BA 28 66 ....%$....m"..(f 1F0F:0B70 8B 56 06 8E C0 66 26 89 16 79 A1 66 FF 76 06 9A .V...f&..y.f.v.. 1F0F:0B80 AE 02 10 1D 83 C4 04 89 56 08 89 46 06 C4 5E 06 ........V..F..^. 1F0F:0B90 26 81 7F 1D 0F 1F 75 08 26 81 7F 1B A0 07 74 13 &.....u.&.....t. 1F0F:0BA0 C4 5E 06 26 81 7F 1D 0F 1F 75 44 26 81 7F 1B 00 .^.&.....uD&.... 1F0F:0BB0 0B 75 3C 8C D8 39 46 08 75 07 81 7E 06 D2 A3 74 .u<..9F.u..~...t 1F0F:0BC0 2E 8C D8 39 46 08 75 07 81 7E 06 F3 A3 74 20 C4 ...9F.u..~...t . 1F0F:0BD0 5E 06 26 80 7F 10 00 74 0E 26 C4 5F 11 66 26 8B ^.&....t.&._.f&. 1F0F:0BE0 07 66 89 46 06 EB 08 66 C7 46 06 00 00 00 00 8B .f.F...f.F...... 1F0F:0BF0 56 08 8B 46 06 5D CB V..F.]. ;; fn1F0F_0BF7: 1F0F:0BF7 ;; Called from: ;; 1F0F:0609 (in fn1F0F_057A) fn1F0F_0BF7 proc enter 2Ah,0h mov bx,[81D4h] shl bx,2h mov ax,[bx+0A390h] mov dx,[bx+0A38Eh] mov [bp-0Ah],ax mov [bp-0Ch],dx inc word ptr [81D4h] cmp word ptr [81D4h],10h jle 0C21h l1F0F_0C1B: mov word ptr [81D4h],0h l1F0F_0C21: mov ax,28BAh mov es,ax mov al,es:[309Eh] cbw or ax,ax jnz 0C57h l1F0F_0C2F: mov ax,2863h mov es,ax mov al,es:[0004h] mov [bp-0Dh],al cli call far 2425h:01E8h sti push 0FBh call far 226Dh:0656h pop cx cmp byte ptr [bp-0Dh],0h jz 0C51h l1F0F_0C50: cli l1F0F_0C51: call far 2425h:0286h sti l1F0F_0C57: mov ax,28BAh mov es,ax mov al,es:[0A182h] cbw or ax,ax jnz 0C76h l1F0F_0C65: push 28BAh push 3A0Ch call far 1D10h:02AEh add sp,4h jmp 1215h l1F0F_0C76: mov ax,ds cmp [bp+8h],ax jz 0C80h l1F0F_0C7D: jmp 1016h l1F0F_0C80: cmp word ptr [bp+6h],0A3D2h jz 0C8Ah l1F0F_0C87: jmp 1016h l1F0F_0C8A: call far 0800h:083Fh and ax,7h mov [bp-16h],ax cmp word ptr [7F88h],0h jz 0CA1h l1F0F_0C9C: mov word ptr [bp-16h],1h l1F0F_0CA1: mov ax,28BAh mov es,ax cmp byte ptr es:[30A1h],0h jz 0CB3h l1F0F_0CAE: mov word ptr [bp-16h],0h l1F0F_0CB3: mov bx,[bp-16h] dec bx cmp bx,5h jbe 0CBFh l1F0F_0CBC: jmp 1016h l1F0F_0CBF: shl bx,1h jmp word ptr cs:[bx+1237h] l1F0F_0CC6: mov ax,28BAh mov es,ax cmp dword ptr es:[0A17Eh],0h jnz 0CD7h l1F0F_0CD4: jmp 1016h l1F0F_0CD7: push 0h push ds push 81E0h call far 209Fh:08D2h add sp,6h cmp word ptr [7F88h],0h jnz 0CFDh l1F0F_0CEC: mov ax,28BAh mov es,ax mov dword ptr es:[0A17Eh],0h jmp 0D0Ch l1F0F_0CFD: mov ax,28BAh mov es,ax mov dword ptr es:[0A17Eh],1h l1F0F_0D0C: push ds push 81EDh push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40006h push 5h push ss lea ax,[bp-2Ah] push ax push 6E012Ch call far 2504h:094Dh add sp,0Eh l1F0F_0D38: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0D38h l1F0F_0D45: jmp 1016h l1F0F_0D48: mov ax,28BAh mov es,ax cmp word ptr es:[3036h],0h jnz 0D58h l1F0F_0D55: jmp 1016h l1F0F_0D58: mov ax,28BAh mov es,ax cmp word ptr es:[8586h],2h jz 0D68h l1F0F_0D65: jmp 1016h l1F0F_0D68: push 0h push ds push 81F9h call far 209Fh:08D2h add sp,6h mov ax,28BAh mov es,ax mov word ptr es:[3036h],0h call far 226Dh:00F9h push ds push 8206h push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40005h push 5h push ss lea ax,[bp-2Ah] push ax push 87013Ah call far 2504h:094Dh add sp,0Eh l1F0F_0DB3: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0DB3h l1F0F_0DC0: jmp 1016h l1F0F_0DC3: mov ax,28BAh mov es,ax test word ptr es:[0A520h],4h jnz 0DD4h l1F0F_0DD1: jmp 1016h l1F0F_0DD4: mov ax,28BAh mov es,ax cmp word ptr es:[8586h],4h jnz 0E4Ch l1F0F_0DE1: mov ax,28BAh mov es,ax cmp word ptr es:[3048h],0h jnz 0DF1h l1F0F_0DEE: jmp 1016h l1F0F_0DF1: mov ax,28BAh mov es,ax mov word ptr es:[3048h],0h call far 226Dh:00F9h push 0h push ds push 81F9h call far 209Fh:08D2h add sp,6h push ds push 8206h push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40005h push 5h push ss lea ax,[bp-2Ah] push ax push 87013Ah call far 2504h:094Dh add sp,0Eh l1F0F_0E3C: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0E3Ch l1F0F_0E49: jmp 1016h l1F0F_0E4C: mov ax,28BAh mov es,ax and word ptr es:[0A520h],0FBh push 28BAh push 87ACh call far 23F8h:01EBh add sp,4h push 0h push ds push 8211h call far 209Fh:08D2h add sp,6h push ds push 821Dh push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40004h push 5h push ss lea ax,[bp-2Ah] push ax push 290127h call far 2504h:094Dh add sp,0Eh l1F0F_0E9F: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0E9Fh l1F0F_0EAC: jmp 1016h l1F0F_0EAF: mov ax,28BAh mov es,ax test word ptr es:[0A520h],8h jnz 0EC0h l1F0F_0EBD: jmp 1016h l1F0F_0EC0: mov ax,28BAh mov es,ax cmp word ptr es:[8586h],8h jnz 0F38h l1F0F_0ECD: mov ax,28BAh mov es,ax cmp word ptr es:[303Fh],0h jnz 0EDDh l1F0F_0EDA: jmp 1016h l1F0F_0EDD: mov ax,28BAh mov es,ax mov word ptr es:[303Fh],0h call far 226Dh:00F9h push 0h push ds push 81F9h call far 209Fh:08D2h add sp,6h push ds push 8206h push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40005h push 5h push ss lea ax,[bp-2Ah] push ax push 87013Ah call far 2504h:094Dh add sp,0Eh l1F0F_0F28: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0F28h l1F0F_0F35: jmp 1016h l1F0F_0F38: mov ax,28BAh mov es,ax and word ptr es:[0A520h],0F7h push 28BAh push 87EEh call far 23F8h:01EBh add sp,4h push 0h push ds push 8227h call far 209Fh:08D2h add sp,6h push ds push 8234h push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40003h push 5h push ss lea ax,[bp-2Ah] push ax push 290127h call far 2504h:094Dh add sp,0Eh l1F0F_0F8B: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 0F8Bh l1F0F_0F98: jmp 1016h l1F0F_0F9A: mov ax,28BAh mov es,ax cmp word ptr es:[0A18Ch],0h jz 1016h l1F0F_0FA7: mov es,ax cmp word ptr es:[0A18Ch],0FFh jz 1016h l1F0F_0FB2: mov es,ax dec word ptr es:[0A18Ch] mov ax,es:[0A18Ch] or ax,ax jnz 0FCFh l1F0F_0FC1: push 28BAh push 8830h call far 23F8h:01EBh add sp,4h l1F0F_0FCF: push 0h push ds push 823Dh call far 209Fh:08D2h add sp,6h push ds push 8249h push ss lea ax,[bp-2Ah] push ax call far 0800h:3DE6h add sp,8h push 40004h push 5h push ss lea ax,[bp-2Ah] push ax push 290127h call far 2504h:094Dh add sp,0Eh l1F0F_1009: mov ax,28BAh mov es,ax cmp byte ptr es:[0A422h],1h jz 1009h l1F0F_1016: call far 226Dh:057Fh cli call far 2425h:01E8h push 0h push 1h push 0h push 1h push 0h push 0h push 1h push 0h call far 2353h:0004h add sp,14h call far 2425h:0286h sti mov ax,28BAh mov es,ax mov al,es:[3095h] cbw or ax,ax jnz 105Bh l1F0F_104F: push dword ptr [bp-0Ch] call far 1D10h:02AEh add sp,4h l1F0F_105B: cmp word ptr [7F88h],0h jz 1065h l1F0F_1062: jmp 1215h l1F0F_1065: cli call far 2425h:01E8h sti mov ax,28BAh mov es,ax push dword ptr es:[0AA80h] push 8Ch push 0E4000Ah push 0Ah call far 216Eh:03D8h add sp,0Eh push ss lea ax,[bp-8h] push ax push ds push 825Eh push ss lea ax,[bp-4h] push ax push ds push 8253h call far 263Fh:033Eh add sp,10h mov ax,28BAh mov es,ax push dword ptr es:[0AA80h] push dword ptr [bp-4h] push 3C0024h call far 216Eh:01DCh add sp,0Ch push dword ptr [bp-4h] call far 0800h:1C24h add sp,4h cli push 0h push 1h push 0h push 1h push 1h push 1h push 1h push 1h call far 2353h:0004h add sp,14h call far 2425h:0286h sti cmp word ptr [7F86h],0h jz 10FBh l1F0F_10F8: jmp 1215h l1F0F_10FB: mov ax,2862h mov es,ax or byte ptr es:[0000h],20h jmp 1205h l1F0F_1109: call far 2331h:0167h mov [bp-10h],dx mov [bp-12h],ax or ax,dx jnz 111Bh l1F0F_1118: jmp 11D6h l1F0F_111B: les bx,[bp-12h] mov al,es:[bx] mov ah,0h mov [bp-14h],ax mov cx,8h mov bx,1217h l1F0F_112C: mov ax,cs:[bx] cmp ax,[bp-14h] jz 113Ch l1F0F_1134: add bx,2h loop 112Ch l1F0F_1139: jmp 11CBh l1F0F_113C: jmp word ptr cs:[bx+10h] 1F0F:1140 EB 00 B8 62 28 8E C0 26 80 26 00 00 DF E9 C5 00 ...b(..&.&...... 1F0F:1150 9A 02 00 C3 1C EB 74 66 68 25 00 58 00 66 68 25 ......tfh%.X.fh% 1F0F:1160 00 40 00 66 68 46 00 14 00 1E 68 D7 81 9A A3 00 .@.fhF....h..... 1F0F:1170 31 0E 83 C4 10 0B C0 74 52 B8 62 28 8E C0 26 C6 1......tR.b(..&. 1F0F:1180 06 00 00 10 66 6A 00 C4 5E EE 26 8A 07 50 9A BA ....fj..^.&..P.. 1F0F:1190 00 31 23 83 C4 06 EB 7D 9A A0 00 F8 23 EB 2C 9A .1#....}....#.,. 1F0F:11A0 F9 00 6D 22 EB 25 C4 5E EE 26 C4 5F 01 66 26 FF ..m".%.^.&._.f&. 1F0F:11B0 37 9A 0F 00 C1 1B 83 C4 04 EB 10 C7 06 86 7F 01 7............... 1F0F:11C0 00 0E E8 84 F2 C7 06 86 7F 00 00 ........... l1F0F_11CB: mov ax,2862h mov es,ax or byte ptr es:[0000h],20h l1F0F_11D6: mov ax,28BAh mov es,ax cmp dword ptr es:[302Ch],0h jnz 1205h l1F0F_11E4: push 0h push 1h push 0h push 1h push 1h push 1h push 1h push 1h call far 2353h:0004h add sp,14h cli call far 2425h:0286h sti l1F0F_1205: mov ax,28BAh mov es,ax cmp byte ptr es:[0A182h],0h jz 1215h l1F0F_1212: jmp 1109h l1F0F_1215: leave retf 1F0F:1217 03 00 04 00 05 00 14 00 15 ......... 1F0F:1220 00 16 00 17 00 E8 00 57 11 42 11 50 11 A6 11 9F .......W.B.P.... 1F0F:1230 11 98 11 BB 11 42 11 .....B. l1F0F_1237 dw 0x0CC6 l1F0F_1239 dw 0x0D48 l1F0F_123B dw 0x0DC3 l1F0F_123D dw 0x1016 l1F0F_123F dw 0x0EAF l1F0F_1241 dw 0x0F9A 1F0F:1243 C8 06 00 00 C7 46 FA 01 00 C4 5E 06 66 .....F....^.f 1F0F:1250 26 8B 47 0C 66 89 46 FC 66 83 7E FC 00 75 06 B8 &.G.f.F.f.~..u.. 1F0F:1260 01 00 E9 B5 01 B8 BA 28 8E C0 26 81 3E 51 30 BA .......(..&.>Q0. 1F0F:1270 28 74 03 E9 E1 00 26 81 3E 4F 30 46 30 74 03 E9 (t....&.>O0F0t.. 1F0F:1280 D5 00 E9 DF 00 B8 BA 28 8E C0 26 F7 06 86 85 08 .......(..&..... 1F0F:1290 00 74 66 C4 5E FC 26 8B 47 04 05 FC FF BA BA 28 .tf.^.&.G......( 1F0F:12A0 8E C2 26 8B 16 24 A5 83 C2 0A 3B C2 7C 03 E9 97 ..&..$....;.|... 1F0F:12B0 00 8E 46 FE 26 8B 47 06 05 04 00 BA BA 28 8E C2 ..F.&.G......(.. 1F0F:12C0 26 8B 16 24 A5 83 C2 0A 3B C2 7E 7C B8 BA 28 8E &..$....;.~|..(. 1F0F:12D0 46 FE 26 8B 17 83 C2 FC 8E C0 26 39 16 26 A5 7E F.&.......&9.&.~ 1F0F:12E0 67 8E 46 FE 26 8B 47 02 05 04 00 BA BA 28 8E C2 g.F.&.G......(.. 1F0F:12F0 26 3B 06 26 A5 7E 51 EB 6B C4 5E FC B8 BA 28 06 &;.&.~Q.k.^...(. 1F0F:1300 8E C0 26 A1 24 A5 05 06 00 07 26 39 47 04 7D 38 ..&.$.....&9G.}8 1F0F:1310 8E 46 FE B8 BA 28 06 8E C0 26 A1 24 A5 05 06 00 .F...(...&.$.... 1F0F:1320 07 26 39 47 06 7E 21 B8 BA 28 8E C0 26 A1 26 A5 .&9G.~!..(..&.&. 1F0F:1330 8E 46 FE 26 3B 07 7E 10 26 8B 47 02 BA BA 28 8E .F.&;.~.&.G...(. 1F0F:1340 C2 26 3B 06 26 A5 7F 1C FF 46 FA C4 5E FC 66 26 .&;.&....F..^.f& 1F0F:1350 8B 47 08 66 89 46 FC 66 83 7E FC 00 74 03 E9 24 .G.f.F.f.~..t..$ 1F0F:1360 FF E9 B4 00 C4 5E FC 66 26 0F B7 47 0C BA BA 28 .....^.f&..G...( 1F0F:1370 8E C2 66 26 01 06 7E A1 C4 5E 06 26 81 7F 1D 0F ..f&..~..^.&.... 1F0F:1380 1F 75 08 26 81 7F 1B 1C 14 74 38 C4 5E 06 26 8A .u.&.....t8.^.&. 1F0F:1390 47 10 98 0B C0 75 03 E9 C5 FE 26 80 7F 10 02 7D G....u....&....} 1F0F:13A0 03 E9 BB FE C4 5E 06 26 F7 47 19 04 00 74 64 26 .....^.&.G...td& 1F0F:13B0 8A 47 10 98 3B 46 FA 7E 5A 8B 46 FA 40 EB 5B EB .G..;F.~Z.F.@.[. 1F0F:13C0 52 EB 50 B8 BA 28 8E C0 26 C4 1E 79 A1 26 C4 5F R.P..(..&..y.&._ 1F0F:13D0 11 8B 46 FA C1 E0 02 03 D8 26 8B 47 02 26 8B 17 ..F......&.G.&.. 1F0F:13E0 89 46 08 89 56 06 81 7E 08 BA 28 75 0C 81 7E 06 .F..V..~..(u..~. 1F0F:13F0 CC 2A 75 05 80 0E D6 81 02 81 7E 08 BA 28 75 0C .*u.......~..(u. 1F0F:1400 81 7E 06 AB 2A 75 05 80 0E D6 81 01 80 3E D6 81 .~..*u.......>.. 1F0F:1410 03 75 05 B8 02 00 EB 02 33 C0 C9 CB 55 8B EC C6 .u......3...U... 1F0F:1420 06 D6 81 00 FA 9A E8 01 25 24 66 6A 00 6A 01 66 ........%$fj.j.f 1F0F:1430 6A 00 6A 01 6A 00 6A 00 6A 01 6A 00 9A 04 00 53 j.j.j.j.j.j....S 1F0F:1440 23 83 C4 14 9A 86 02 25 24 FB 66 FF 76 06 9A AE #......%$.f.v... 1F0F:1450 02 10 1D 83 C4 04 89 56 08 89 46 06 66 83 7E 06 .......V..F.f.~. 1F0F:1460 00 74 17 B8 BA 28 8E C0 26 C4 1E 79 A1 26 C4 5F .t...(..&..y.&._ 1F0F:1470 11 26 8B 57 02 26 8B 07 EB 04 33 D2 33 C0 5D CB .&.W.&....3.3.].
programs/oeis/185/A185939.asm
karttu/loda
1
101962
<gh_stars>1-10 ; A185939: a(n) = 9*n^2 - 6*n + 2. ; 5,26,65,122,197,290,401,530,677,842,1025,1226,1445,1682,1937,2210,2501,2810,3137,3482,3845,4226,4625,5042,5477,5930,6401,6890,7397,7922,8465,9026,9605,10202,10817,11450,12101,12770,13457,14162,14885,15626,16385,17162,17957,18770,19601,20450,21317,22202,23105,24026,24965,25922,26897,27890,28901,29930,30977,32042,33125,34226,35345,36482,37637,38810,40001,41210,42437,43682,44945,46226,47525,48842,50177,51530,52901,54290,55697,57122,58565,60026,61505,63002,64517,66050,67601,69170,70757,72362,73985,75626,77285,78962,80657,82370,84101,85850,87617,89402,91205,93026,94865,96722,98597,100490,102401,104330,106277,108242,110225,112226,114245,116282,118337,120410,122501,124610,126737,128882,131045,133226,135425,137642,139877,142130,144401,146690,148997,151322,153665,156026,158405,160802,163217,165650,168101,170570,173057,175562,178085,180626,183185,185762,188357,190970,193601,196250,198917,201602,204305,207026,209765,212522,215297,218090,220901,223730,226577,229442,232325,235226,238145,241082,244037,247010,250001,253010,256037,259082,262145,265226,268325,271442,274577,277730,280901,284090,287297,290522,293765,297026,300305,303602,306917,310250,313601,316970,320357,323762,327185,330626,334085,337562,341057,344570,348101,351650,355217,358802,362405,366026,369665,373322,376997,380690,384401,388130,391877,395642,399425,403226,407045,410882,414737,418610,422501,426410,430337,434282,438245,442226,446225,450242,454277,458330,462401,466490,470597,474722,478865,483026,487205,491402,495617,499850,504101,508370,512657,516962,521285,525626,529985,534362,538757,543170,547601,552050,556517,561002 mul $0,3 add $0,2 pow $0,2 mov $1,$0 add $1,1
src/Categories/Category/Monoidal/Interchange.agda
TOTBWF/agda-categories
0
17126
<filename>src/Categories/Category/Monoidal/Interchange.agda {-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category; module Commutation) open import Categories.Category.Monoidal.Core using (Monoidal) -- The "four middle interchange" for monoidal categories. -- -- Aka the "interchange law" or "exchange law" (though those terms are -- more comonly used in the more general context of composition in -- 2-categories). module Categories.Category.Monoidal.Interchange {o ℓ e} {C : Category o ℓ e} where open import Level using (_⊔_) open import Data.Product using (_,_) import Categories.Category.Monoidal.Construction.Product as MonoidalProduct open import Categories.Category.Monoidal.Braided using (Braided) open import Categories.Category.Monoidal.Braided.Properties using (braiding-coherence; inv-Braided; inv-braiding-coherence) open import Categories.Category.Monoidal.Properties using (module Kelly's) import Categories.Category.Monoidal.Reasoning as MonoidalReasoning open import Categories.Category.Monoidal.Symmetric using (Symmetric) import Categories.Category.Monoidal.Utilities as MonoidalUtilities open import Categories.Category.Product using (_⁂_; assocˡ) open import Categories.Functor using (_∘F_) open import Categories.NaturalTransformation.NaturalIsomorphism using (_≃_; niHelper) open import Categories.Morphism C using (_≅_; module ≅) open import Categories.Morphism.IsoEquiv C using (module _≃_) open import Categories.Morphism.Reasoning C private module C = Category C open C open Commutation C private variable W W₁ W₂ X X₁ X₂ Y Y₁ Y₂ Z Z₁ Z₂ : Obj f g h i : X ⇒ Y -- An abstract definition of an interchange map with the minimal set -- of coherence laws required to make the tensor product ⊗ of C a -- monoidal functor. (See also Categories.Functor.Monoidal.Tensor.) record HasInterchange (M : Monoidal C) : Set (o ⊔ ℓ ⊔ e) where open Monoidal M open MonoidalUtilities.Shorthands M -- The "four middle interchange" for tensor products. field swapInner : ∀ {W X Y Z} → (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ≅ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) module swapInner {W X Y Z} = _≅_ (swapInner {W} {X} {Y} {Z}) private i⇒ = swapInner.from i⇐ = swapInner.to -- Naturality and coherence laws of the interchange. field natural : i⇒ ∘ (f ⊗₁ g) ⊗₁ (h ⊗₁ i) ≈ (f ⊗₁ h) ⊗₁ (g ⊗₁ i) ∘ i⇒ assoc : [ ((X₁ ⊗₀ X₂) ⊗₀ (Y₁ ⊗₀ Y₂)) ⊗₀ (Z₁ ⊗₀ Z₂) ⇒ (X₁ ⊗₀ (Y₁ ⊗₀ Z₁)) ⊗₀ (X₂ ⊗₀ (Y₂ ⊗₀ Z₂)) ]⟨ i⇒ ⊗₁ id ⇒⟨ ((X₁ ⊗₀ Y₁) ⊗₀ (X₂ ⊗₀ Y₂)) ⊗₀ (Z₁ ⊗₀ Z₂) ⟩ i⇒ ⇒⟨ ((X₁ ⊗₀ Y₁) ⊗₀ Z₁) ⊗₀ ((X₂ ⊗₀ Y₂) ⊗₀ Z₂) ⟩ α⇒ ⊗₁ α⇒ ≈ α⇒ ⇒⟨ (X₁ ⊗₀ X₂) ⊗₀ ((Y₁ ⊗₀ Y₂) ⊗₀ (Z₁ ⊗₀ Z₂)) ⟩ id ⊗₁ i⇒ ⇒⟨ (X₁ ⊗₀ X₂) ⊗₀ ((Y₁ ⊗₀ Z₁) ⊗₀ (Y₂ ⊗₀ Z₂)) ⟩ i⇒ ⟩ unitˡ : [ unit ⊗₀ (X ⊗₀ Y) ⇒ (X ⊗₀ Y) ]⟨ λ⇐ ⊗₁ id ⇒⟨ (unit ⊗₀ unit) ⊗₀ (X ⊗₀ Y) ⟩ i⇒ ⇒⟨ (unit ⊗₀ X) ⊗₀ (unit ⊗₀ Y) ⟩ λ⇒ ⊗₁ λ⇒ ≈ λ⇒ ⟩ unitʳ : [ (X ⊗₀ Y) ⊗₀ unit ⇒ (X ⊗₀ Y) ]⟨ id ⊗₁ λ⇐ ⇒⟨ (X ⊗₀ Y) ⊗₀ (unit ⊗₀ unit) ⟩ i⇒ ⇒⟨ (X ⊗₀ unit) ⊗₀ (Y ⊗₀ unit) ⟩ ρ⇒ ⊗₁ ρ⇒ ≈ ρ⇒ ⟩ -- The interchange is a natural isomorphism. naturalIso : ⊗ ∘F (⊗ ⁂ ⊗) ≃ ⊗ ∘F MonoidalProduct.⊗ M M naturalIso = niHelper (record { η = λ _ → i⇒ ; η⁻¹ = λ _ → i⇐ ; commute = λ _ → natural ; iso = λ _ → swapInner.iso }) -- Shorthands for composing and inverting isomorphisms. open ≅ using () renaming (refl to idᵢ; sym to _⁻¹) private infixr 9 _∘ᵢ_ _∘ᵢ_ = λ {X Y Z} f g → ≅.trans {X} {Y} {Z} g f -- Braided monoidal categories have an interchange map. module BraidedInterchange {M : Monoidal C} (B : Braided M) where open MonoidalReasoning M open MonoidalUtilities M open Braided B renaming (associator to α) open Shorthands -- Shorthands for braiding. private σ : X ⊗₀ Y ≅ Y ⊗₀ X σ = braiding.FX≅GX module σ {X Y} = _≅_ (σ {X} {Y}) σ⇒ = σ.from σ⇐ = σ.to -- The "four middle interchange" for braided tensor products. swapInner : (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ≅ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) swapInner = α ⁻¹ ∘ᵢ idᵢ ⊗ᵢ (α ∘ᵢ σ ⊗ᵢ idᵢ ∘ᵢ α ⁻¹) ∘ᵢ α module swapInner {W X Y Z} = _≅_ (swapInner {W} {X} {Y} {Z}) private i⇒ = swapInner.from i⇐ = swapInner.to -- The interchange is a natural isomorphism. swapInner-natural : i⇒ ∘ (f ⊗₁ g) ⊗₁ (h ⊗₁ i) ≈ (f ⊗₁ h) ⊗₁ (g ⊗₁ i) ∘ i⇒ swapInner-natural {f = f} {g = g} {h = h} {i = i} = begin (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ (f ⊗₁ g) ⊗₁ (h ⊗₁ i) ≈⟨ pullʳ (pullʳ assoc-commute-from) ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ f ⊗₁ g ⊗₁ (h ⊗₁ i) ∘ α⇒ ≈⟨ refl⟩∘⟨ extendʳ (parallel id-comm-sym (begin (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ g ⊗₁ (h ⊗₁ i) ≈⟨ pullʳ (pullʳ assoc-commute-to) ⟩ α⇒ ∘ σ⇒ ⊗₁ id ∘ (g ⊗₁ h) ⊗₁ i ∘ α⇐ ≈⟨ refl⟩∘⟨ extendʳ (parallel (braiding.⇒.commute _) id-comm-sym) ⟩ α⇒ ∘ (h ⊗₁ g) ⊗₁ i ∘ σ⇒ ⊗₁ id ∘ α⇐ ≈⟨ extendʳ assoc-commute-from ⟩ h ⊗₁ (g ⊗₁ i) ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐ ∎)) ⟩ α⇐ ∘ f ⊗₁ h ⊗₁ (g ⊗₁ i) ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ extendʳ assoc-commute-to ⟩ (f ⊗₁ h) ⊗₁ (g ⊗₁ i) ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ∎ swapInner-naturalIsomorphism : ⊗ ∘F (⊗ ⁂ ⊗) ≃ ⊗ ∘F MonoidalProduct.⊗ M M swapInner-naturalIsomorphism = niHelper (record { η = λ _ → i⇒ ; η⁻¹ = λ _ → i⇐ ; commute = λ _ → swapInner-natural ; iso = λ _ → swapInner.iso }) -- Another version of the interchange that associates differently. -- -- Why are there two versions and what's the difference? The domain -- (X₁ ⊗ X₂) ⊗₀ (Y₁ ⊗ Y₂) and codomain (X₁ ⊗ Y₁) ⊗₀ (X₁ ⊗ Y₂) of the -- interchange map are perfectly symmetric/balanced. But in order to -- apply the braiding to the middle X₂ and Y₁, we need to -- re-associate and that breaks the symmetry. We must first -- re-associate the whole expression in one direction and then the -- larger subterm in the other. This can be done in two ways, -- associate to the right first, then to the left, resulting in X₁ ⊗ -- ((Y₂ ⊗₀ X₁) ⊗ Y₂), or vice versa, resulting in (X₁ ⊗ (Y₂ ⊗₀ X₁)) -- ⊗ Y₂. The choice is arbitrary and results in two distinct -- interchange maps that behave the same way (as witnessed by -- swapInner-coherent below). -- -- Why define both? Because the proofs of some coherence laws become -- easier when the core of the expression is associated in one -- direction vs. the other. For example swapInner-unitˡ is easier to -- prove for the second definition, while swapInner-unitʳ is easier -- to prove for the first; swapInner-assoc uses both. swapInner′ : (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ≅ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) swapInner′ = α ∘ᵢ (α ⁻¹ ∘ᵢ idᵢ ⊗ᵢ σ ∘ᵢ α) ⊗ᵢ idᵢ ∘ᵢ α ⁻¹ module swapInner′ {W X Y Z} = _≅_ (swapInner′ {W} {X} {Y} {Z}) private j⇒ = swapInner′.from j⇐ = swapInner′.to -- Derived coherence laws. swapInner-coherent : [ (X₁ ⊗₀ X₂) ⊗₀ (Y₁ ⊗₀ Y₂) ⇒ (X₁ ⊗₀ Y₁) ⊗₀ (X₂ ⊗₀ Y₂) ]⟨ i⇒ ≈ j⇒ ⟩ swapInner-coherent = begin α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ α⇐ ∘ id ⊗₁ α⇒ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ α⇐ ∘ id ⊗₁ α⇒ ∘ id ⊗₁ (σ⇒ ⊗₁ id) ∘ id ⊗₁ α⇐ ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ conjugate-from α (idᵢ ⊗ᵢ α) (⟺ pentagon) ⟩ α⇐ ∘ id ⊗₁ α⇒ ∘ id ⊗₁ (σ⇒ ⊗₁ id) ∘ (α⇒ ∘ α⇒ ⊗₁ id) ∘ α⇐ ≈˘⟨ pullʳ (pullʳ (extendʳ (pushˡ assoc-commute-from))) ⟩ (α⇐ ∘ id ⊗₁ α⇒ ∘ α⇒ ∘ (id ⊗₁ σ⇒) ⊗₁ id) ∘ α⇒ ⊗₁ id ∘ α⇐ ≈⟨ pushʳ sym-assoc ⟩∘⟨refl ⟩ ((α⇐ ∘ id ⊗₁ α⇒ ∘ α⇒) ∘ (id ⊗₁ σ⇒) ⊗₁ id) ∘ α⇒ ⊗₁ id ∘ α⇐ ≈⟨ pushˡ (conjugate-from (α ⊗ᵢ idᵢ) α (assoc ○ pentagon)) ⟩∘⟨refl ⟩ (α⇒ ∘ α⇐ ⊗₁ id ∘ (id ⊗₁ σ⇒) ⊗₁ id) ∘ α⇒ ⊗₁ id ∘ α⇐ ≈˘⟨ pushʳ (pushʳ (pushˡ split₁ˡ)) ⟩ α⇒ ∘ α⇐ ⊗₁ id ∘ (id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈˘⟨ refl⟩∘⟨ pushˡ split₁ˡ ⟩ α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ∎ swapInner-assoc : [ ((X₁ ⊗₀ X₂) ⊗₀ (Y₁ ⊗₀ Y₂)) ⊗₀ (Z₁ ⊗₀ Z₂) ⇒ (X₁ ⊗₀ (Y₁ ⊗₀ Z₁)) ⊗₀ (X₂ ⊗₀ (Y₂ ⊗₀ Z₂)) ]⟨ i⇒ ⊗₁ id ⇒⟨ ((X₁ ⊗₀ Y₁) ⊗₀ (X₂ ⊗₀ Y₂)) ⊗₀ (Z₁ ⊗₀ Z₂) ⟩ i⇒ ⇒⟨ ((X₁ ⊗₀ Y₁) ⊗₀ Z₁) ⊗₀ ((X₂ ⊗₀ Y₂) ⊗₀ Z₂) ⟩ α⇒ ⊗₁ α⇒ ≈ α⇒ ⇒⟨ (X₁ ⊗₀ X₂) ⊗₀ ((Y₁ ⊗₀ Y₂) ⊗₀ (Z₁ ⊗₀ Z₂)) ⟩ id ⊗₁ i⇒ ⇒⟨ (X₁ ⊗₀ X₂) ⊗₀ ((Y₁ ⊗₀ Z₁) ⊗₀ (Y₂ ⊗₀ Z₂)) ⟩ i⇒ ⟩ swapInner-assoc = begin α⇒ ⊗₁ α⇒ ∘ i⇒ ∘ i⇒ ⊗₁ id ≈⟨ (begin α⇒ ⊗₁ α⇒ ≈⟨ serialize₂₁ ⟩ id ⊗₁ α⇒ ∘ α⇒ ⊗₁ id ≈⟨ refl⟩∘⟨ switch-fromtoˡ α (switch-fromtoˡ (idᵢ ⊗ᵢ α) pentagon) ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ α⇐ ∘ α⇒ ∘ α⇒ ≈˘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩⊗⟨ cancelˡ α.isoʳ ⟩∘⟨refl ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇐ ∘ α⇐) ∘ α⇒ ∘ α⇒ ≈˘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩⊗⟨ pullʳ inv-pentagon ⟩∘⟨refl ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ ((α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ α⇐) ∘ α⇒ ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ (id ⊗₁ α⇐) ∘ α⇒ ∘ α⇒ ≈˘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ extendʳ assoc-commute-from ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ (id ⊗₁ id) ⊗₁ α⇐ ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ ⊗.identity ⟩⊗⟨refl ⟩∘⟨refl ⟩ id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ id ⊗₁ α⇐ ∘ α⇒ ∎) ⟩∘⟨refl ⟩ (id ⊗₁ α⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ id ⊗₁ α⇐ ∘ α⇒) ∘ i⇒ ∘ i⇒ ⊗₁ id ≈˘⟨ pullˡ (pushˡ (⊗.identity ⟩⊗⟨refl ⟩∘⟨refl)) ⟩ ((id ⊗₁ id) ⊗₁ α⇒ ∘ α⇐) ∘ (id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ id ⊗₁ α⇐ ∘ α⇒) ∘ (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ i⇒ ⊗₁ id ≈⟨ ⟺ assoc-commute-to ⟩∘⟨ pullʳ (pullʳ (pushʳ (pushˡ (pushʳ (pushˡ split₂ˡ))))) ⟩ (α⇐ ∘ id ⊗₁ (id ⊗₁ α⇒)) ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ ((id ⊗₁ α⇐ ∘ α⇒) ∘ α⇐ ∘ id ⊗₁ α⇒) ∘ (id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ⊗₁ id ≈⟨ pullʳ (refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ elimˡ (_≅_.isoˡ (α ⁻¹ ∘ᵢ idᵢ ⊗ᵢ α))) ⟩ α⇐ ∘ id ⊗₁ (id ⊗₁ α⇒) ∘ id ⊗₁ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ (id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ⊗₁ id ≈⟨ refl⟩∘⟨ merge₂ sym-assoc ⟩∘⟨ pushʳ ((⟺ ⊗.identity ⟩⊗⟨refl) ⟩∘⟨refl ⟩∘⟨ split₁ˡ) ⟩ α⇐ ∘ id ⊗₁ ((id ⊗₁ α⇒ ∘ α⇒) ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ (α⇒ ∘ (id ⊗₁ id) ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ α⇐ ⊗₁ id ∘ (id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ⊗₁ id ≈⟨ refl⟩∘⟨ refl⟩⊗⟨ extendʳ (pushˡ (switch-fromtoʳ (α ⊗ᵢ idᵢ) (assoc ○ pentagon))) ⟩∘⟨ extendʳ assoc-commute-from ⟩∘⟨refl ⟩ α⇐ ∘ id ⊗₁ ((α⇒ ∘ α⇒) ∘ (α⇐ ⊗₁ id ∘ α⇐ ⊗₁ id) ∘ α⇐) ∘ (id ⊗₁ (id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐)) ∘ (α⇒ ∘ α⇒)) ∘ α⇐ ⊗₁ id ∘ (id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ⊗₁ id ≈˘⟨ refl⟩∘⟨ refl⟩⊗⟨ pushʳ (refl⟩∘⟨ split₁ˡ ⟩∘⟨refl) ⟩∘⟨ pushʳ (extendʳ (switch-fromtoʳ (α ⊗ᵢ idᵢ) (assoc ○ pentagon))) ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ id ⊗₁ (id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐)) ∘ id ⊗₁ α⇒ ∘ α⇒ ∘ (id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ⊗₁ id ≈⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ split₁ˡ ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ id ⊗₁ (id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐)) ∘ id ⊗₁ α⇒ ∘ α⇒ ∘ (id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐)) ⊗₁ id ∘ α⇒ ⊗₁ id ≈⟨ refl⟩∘⟨ merge₂ assoc²' ○ (refl⟩∘⟨ refl⟩∘⟨ assoc) ⟩∘⟨ refl⟩∘⟨ extendʳ assoc-commute-from ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐)) ∘ id ⊗₁ α⇒ ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id) ∘ α⇒ ∘ α⇒ ⊗₁ id ≈⟨ refl⟩∘⟨ merge₂ (assoc²' ○ (refl⟩∘⟨ refl⟩∘⟨ assoc²')) ⟩∘⟨ refl⟩∘⟨ switch-fromtoˡ (idᵢ ⊗ᵢ α) pentagon ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id) ∘ id ⊗₁ α⇐ ∘ α⇒ ∘ α⇒ ≈˘⟨ refl⟩∘⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ α⇒ ≈⟨ refl⟩∘⟨ merge₂ assoc²' ○ (refl⟩∘⟨ refl⟩∘⟨ (assoc²' ○ (refl⟩∘⟨ refl⟩∘⟨ assoc))) ⟩∘⟨ Equiv.refl ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩⊗⟨ pushʳ (begin α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ extendʳ (pushˡ split₂ˡ) ⟩ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id) ∘ (id ⊗₁ α⇐ ∘ α⇒) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ (extendʳ assoc-commute-to ○ (refl⟩∘⟨ sym-assoc)) ⟩ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ (id ⊗₁ σ⇒) ⊗₁ id ∘ (α⇐ ∘ (id ⊗₁ α⇐ ∘ α⇒)) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ refl⟩∘⟨ refl⟩∘⟨ refl⟩∘⟨ (sym-assoc ○ (conjugate-to α (α ⊗ᵢ idᵢ) (sym-assoc ○ inv-pentagon))) ⟩∘⟨refl ⟩ α⇒ ∘ (α⇐ ∘ α⇐) ⊗₁ id ∘ (id ⊗₁ σ⇒) ⊗₁ id ∘ (α⇒ ⊗₁ id ∘ α⇐) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈˘⟨ refl⟩∘⟨ split₁ Equiv.refl ⟩∘⟨ pushʳ (refl⟩∘⟨ refl⟩⊗⟨ ⊗.identity ⟩∘⟨refl) ⟩ α⇒ ∘ ((α⇐ ∘ α⇐) ∘ id ⊗₁ σ⇒) ⊗₁ id ∘ α⇒ ⊗₁ id ∘ α⇐ ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ (id ⊗₁ id) ∘ α⇐ ≈⟨ refl⟩∘⟨ merge₁ assoc² ⟩∘⟨ extendʳ assoc-commute-to ⟩ α⇒ ∘ (α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id) ⊗₁ id ∘ α⇐ ∘ α⇐ ≈˘⟨ refl⟩∘⟨ pushˡ split₁ˡ ⟩ α⇒ ∘ ((α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id) ⊗₁ id ∘ α⇐ ∘ α⇐ ≈˘⟨ refl⟩∘⟨ refl⟩∘⟨ (sym-assoc ○ inv-pentagon) ⟩ α⇒ ∘ ((α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id) ⊗₁ id ∘ α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇐ ≈⟨ refl⟩∘⟨ pullˡ (⟺ split₁ˡ ○ (assoc ⟩⊗⟨refl)) ⟩ α⇒ ∘ ((α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇐ ≈⟨ refl⟩∘⟨ (begin (α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ pushˡ (pushʳ sym-assoc) ⟩ (α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒ ∘ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ (refl⟩∘⟨ extendʳ (pushʳ split₁ˡ)) ⟩ (α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒) ∘ (α⇒ ∘ α⇒ ⊗₁ id) ∘ (σ⇒ ⊗₁ id ∘ α⇐) ⊗₁ id ∘ α⇐ ≈⟨ pushʳ (switch-fromtoˡ (idᵢ ⊗ᵢ α) pentagon ⟩∘⟨ pushˡ split₁ˡ) ⟩ ((α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒) ∘ (id ⊗₁ α⇐ ∘ α⇒ ∘ α⇒)) ∘ (σ⇒ ⊗₁ id) ⊗₁ id ∘ α⇐ ⊗₁ id ∘ α⇐ ≈⟨ pushˡ (sym-assoc ○ (pullˡ (pullʳ assoc ⟩∘⟨refl))) ⟩ ((α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ id ⊗₁ α⇐) ∘ α⇒) ∘ α⇒ ∘ (σ⇒ ⊗₁ id) ⊗₁ id ∘ α⇐ ⊗₁ id ∘ α⇐ ≈⟨ pullʳ (refl⟩∘⟨ extendʳ assoc-commute-from) ⟩ (α⇐ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ id ⊗₁ α⇐) ∘ α⇒ ∘ σ⇒ ⊗₁ (id ⊗₁ id) ∘ α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐ ≈⟨ (refl⟩∘⟨ refl⟩∘⟨ ⟺ split₂ˡ) ⟩∘⟨ refl⟩∘⟨ (refl⟩⊗⟨ ⊗.identity ⟩∘⟨ conjugate-from (idᵢ ⊗ᵢ (α ⁻¹)) (α ⁻¹) inv-pentagon) ⟩ (α⇐ ∘ α⇐ ∘ id ⊗₁ (σ⇒ ∘ α⇐)) ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈˘⟨ extendʳ (sym-assoc ○ inv-pentagon) ⟩∘⟨refl ⟩ (α⇐ ⊗₁ id ∘ (α⇐ ∘ id ⊗₁ α⇐) ∘ id ⊗₁ (σ⇒ ∘ α⇐)) ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈˘⟨ (refl⟩∘⟨ pushʳ split₂ˡ) ⟩∘⟨refl ⟩ (α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇐ ∘ σ⇒ ∘ α⇐)) ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈˘⟨ pushˡ ((refl⟩∘⟨ refl⟩∘⟨ refl⟩⊗⟨ (sym-assoc ○ hexagon₂ ○ assoc)) ⟩∘⟨refl) ⟩ ((α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ σ⇒)) ∘ α⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ pushˡ (pushʳ (pushʳ split₂ˡ)) ⟩∘⟨refl ⟩ ((α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ σ⇒ ⊗₁ id) ∘ id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ pushʳ (pushˡ split₂ˡ) ⟩∘⟨refl ⟩ (((α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ σ⇒ ⊗₁ id) ∘ id ⊗₁ α⇐) ∘ id ⊗₁ id ⊗₁ σ⇒ ∘ α⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ ((pushˡ (pushʳ assoc-commute-to) ⟩∘⟨ ⟺ assoc-commute-from) ○ (pullʳ sym-assoc)) ⟩∘⟨refl ⟩ ((α⇐ ⊗₁ id ∘ (id ⊗₁ σ⇒) ⊗₁ id) ∘ ((α⇐ ∘ id ⊗₁ α⇐) ∘ α⇒) ∘ (id ⊗₁ id) ⊗₁ σ⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ pullˡ (⟺ split₁ˡ ⟩∘⟨ conjugate-from α (idᵢ ⊗ᵢ α ∘ᵢ α) (⟺ (assoc ○ pentagon))) ⟩∘⟨refl ⟩ (((α⇐ ∘ id ⊗₁ σ⇒) ⊗₁ id ∘ α⇒ ⊗₁ id ∘ α⇐) ∘ (id ⊗₁ id) ⊗₁ σ⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ (pullˡ (⟺ split₁ˡ) ⟩∘⟨ ⊗.identity ⟩⊗⟨refl) ⟩∘⟨refl ⟩ ((((α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ id ⊗₁ σ⇒) ∘ σ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ extend² (⟺ serialize₂₁ ○ serialize₁₂) ⟩ ((((α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ σ⇒ ⊗₁ id) ∘ id ⊗₁ σ⇒ ∘ α⇐ ∘ id ⊗₁ α⇒ ≈˘⟨ pushʳ (refl⟩∘⟨ refl⟩⊗⟨ ⊗.identity) ⟩∘⟨ ⊗.identity ⟩⊗⟨refl ⟩∘⟨refl ⟩ (((α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒) ⊗₁ id ∘ α⇐ ∘ σ⇒ ⊗₁ id ⊗₁ id) ∘ (id ⊗₁ id) ⊗₁ σ⇒ ∘ α⇐ ∘ id ⊗₁ α⇒ ≈⟨ pushʳ assoc-commute-to ⟩∘⟨ extendʳ (⟺ assoc-commute-to) ⟩ ((((α⇐ ∘ id ⊗₁ σ⇒) ∘ α⇒) ⊗₁ id ∘ (σ⇒ ⊗₁ id) ⊗₁ id) ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ id ⊗₁ σ⇒ ∘ id ⊗₁ α⇒ ≈˘⟨ ((sym-assoc ○ sym-assoc) ⟩⊗⟨refl ○ split₁ˡ) ⟩∘⟨refl ⟩∘⟨ refl⟩∘⟨ split₂ˡ ⟩ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ⊗₁ id) ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ (id ⊗₁ σ⇒ ∘ α⇒) ≈˘⟨ extend² (sym-assoc ○ inv-pentagon) ⟩ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ⊗₁ id) ∘ α⇐ ⊗₁ id) ∘ (α⇐ ∘ id ⊗₁ α⇐) ∘ id ⊗₁ (id ⊗₁ σ⇒ ∘ α⇒) ≈˘⟨ split₁ˡ ⟩∘⟨ pushʳ split₂ˡ ⟩ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∎) ⟩⊗⟨refl ⟩∘⟨refl ⟩ α⇒ ∘ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒)) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇐ ≈⟨ (refl⟩∘⟨ pushˡ ((sym-assoc ⟩⊗⟨refl) ○ split₁ˡ)) ⟩ α⇒ ∘ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id ∘ α⇐) ⊗₁ id ∘ (id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒)) ⊗₁ id ∘ α⇐ ∘ id ⊗₁ α⇐ ≈⟨ (refl⟩∘⟨ split₁ˡ ⟩∘⟨ extendʳ (⟺ assoc-commute-to)) ○ pushʳ assoc ⟩ (α⇒ ∘ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id) ⊗₁ id) ∘ α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ id ⊗₁ α⇐ ≈⟨ pushˡ assoc-commute-from ⟩ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ (id ⊗₁ id) ∘ α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ id ⊗₁ α⇐ ≈˘⟨ refl⟩∘⟨ pullʳ (pullʳ (refl⟩∘⟨ split₂ˡ)) ⟩ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ (id ⊗₁ id) ∘ (α⇒ ∘ α⇐ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ≈˘⟨ pullʳ (pullˡ (conjugate-from (α ∘ᵢ α ⊗ᵢ idᵢ) α pentagon)) ⟩ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ (id ⊗₁ id) ∘ α⇐) ∘ id ⊗₁ α⇒ ∘ id ⊗₁ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ≈⟨ refl⟩⊗⟨ ⊗.identity ⟩∘⟨refl ⟩∘⟨ ⟺ split₂ˡ ⟩ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ id ⊗₁ (α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ≡⟨⟩ (((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐) ⊗₁ id ∘ α⇐) ∘ id ⊗₁ j⇒ ≈˘⟨ switch-fromtoʳ α (switch-fromtoˡ α (⟺ hexagon₁)) ⟩⊗⟨refl ⟩∘⟨refl ⟩∘⟨refl ⟩ (σ⇒ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ j⇒ ∎) ⟩∘⟨refl ⟩ α⇐ ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ j⇒) ∘ α⇒ ∘ α⇒ ≈⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ id ⊗₁ j⇒ ∘ α⇒ ∘ α⇒ ≈˘⟨ pullʳ (pullʳ (extendʳ assoc-commute-from)) ⟩ (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ (id ⊗₁ id) ⊗₁ j⇒ ∘ α⇒ ≡⟨⟩ i⇒ ∘ (id ⊗₁ id) ⊗₁ j⇒ ∘ α⇒ ≈⟨ refl⟩∘⟨ ⊗.identity ⟩⊗⟨ ⟺ swapInner-coherent ⟩∘⟨refl ⟩ i⇒ ∘ id ⊗₁ i⇒ ∘ α⇒ ∎ where inv-pentagon = λ {W X Y Z} → _≃_.to-≈ (pentagon-iso {W} {X} {Y} {Z}) swapInner-unitˡ : [ unit ⊗₀ (X ⊗₀ Y) ⇒ (X ⊗₀ Y) ]⟨ λ⇐ ⊗₁ id ⇒⟨ (unit ⊗₀ unit) ⊗₀ (X ⊗₀ Y) ⟩ i⇒ ⇒⟨ (unit ⊗₀ X) ⊗₀ (unit ⊗₀ Y) ⟩ λ⇒ ⊗₁ λ⇒ ≈ λ⇒ ⟩ swapInner-unitˡ = begin λ⇒ ⊗₁ λ⇒ ∘ i⇒ ∘ λ⇐ ⊗₁ id ≈⟨ refl⟩∘⟨ swapInner-coherent ⟩∘⟨ (Kelly₃′ ⟩⊗⟨refl) ⟩ λ⇒ ⊗₁ λ⇒ ∘ j⇒ ∘ ρ⇐ ⊗₁ id ≡⟨⟩ λ⇒ ⊗₁ λ⇒ ∘ (α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ ρ⇐ ⊗₁ id ≈⟨ pullˡ (pushˡ serialize₁₂) ⟩ (λ⇒ ⊗₁ id ∘ id ⊗₁ λ⇒ ∘ α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ ρ⇐ ⊗₁ id ≈⟨ (refl⟩∘⟨ (begin id ⊗₁ λ⇒ ∘ α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈⟨ pullˡ triangle ⟩ ρ⇒ ⊗₁ id ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈˘⟨ pushˡ split₁ˡ ⟩ (ρ⇒ ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈⟨ (pullˡ Kelly₂′ ⟩⊗⟨refl ⟩∘⟨refl) ⟩ (id ⊗₁ ρ⇒ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈˘⟨ pushˡ split₂ˡ ⟩⊗⟨refl ⟩∘⟨refl ⟩ (id ⊗₁ (ρ⇒ ∘ σ⇒) ∘ α⇒) ⊗₁ id ∘ α⇐ ≈⟨ (refl⟩⊗⟨ σ⁻¹-coherence ⟩∘⟨refl) ⟩⊗⟨refl ⟩∘⟨refl ⟩ (id ⊗₁ λ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐ ≈⟨ triangle ⟩⊗⟨refl ⟩∘⟨refl ⟩ (ρ⇒ ⊗₁ id) ⊗₁ id ∘ α⇐ ≈˘⟨ assoc-commute-to ⟩ α⇐ ∘ ρ⇒ ⊗₁ (id ⊗₁ id) ∎)) ⟩∘⟨refl ⟩ (λ⇒ ⊗₁ id ∘ α⇐ ∘ ρ⇒ ⊗₁ (id ⊗₁ id)) ∘ ρ⇐ ⊗₁ id ≈⟨ (sym-assoc ○ (Kelly₁′ ⟩∘⟨ refl⟩⊗⟨ ⊗.identity)) ⟩∘⟨refl ⟩ (λ⇒ ∘ ρ⇒ ⊗₁ id) ∘ ρ⇐ ⊗₁ id ≈⟨ cancelʳ (_≅_.isoʳ (unitorʳ ⊗ᵢ idᵢ)) ⟩ λ⇒ ∎ where Kelly₁′ = ⟺ (switch-fromtoʳ α (Kelly's.coherence₁ M)) Kelly₂′ = ⟺ (switch-fromtoʳ α (Kelly's.coherence₂ M)) Kelly₃′ = _≃_.to-≈ (Kelly's.coherence-iso₃ M) σ⁻¹-coherence = inv-braiding-coherence (inv-Braided B) swapInner-unitʳ : [ (X ⊗₀ Y) ⊗₀ unit ⇒ (X ⊗₀ Y) ]⟨ id ⊗₁ λ⇐ ⇒⟨ (X ⊗₀ Y) ⊗₀ (unit ⊗₀ unit) ⟩ i⇒ ⇒⟨ (X ⊗₀ unit) ⊗₀ (Y ⊗₀ unit) ⟩ ρ⇒ ⊗₁ ρ⇒ ≈ ρ⇒ ⟩ swapInner-unitʳ = begin ρ⇒ ⊗₁ ρ⇒ ∘ i⇒ ∘ id ⊗₁ λ⇐ ≡⟨⟩ ρ⇒ ⊗₁ ρ⇒ ∘ (α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ id ⊗₁ λ⇐ ≈⟨ pullˡ (pushˡ serialize₂₁) ⟩ (id ⊗₁ ρ⇒ ∘ ρ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒) ∘ id ⊗₁ λ⇐ ≈⟨ (refl⟩∘⟨ (begin ρ⇒ ⊗₁ id ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ pushˡ (switch-fromtoʳ α triangle) ⟩ id ⊗₁ λ⇒ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ pushˡ split₂ˡ ⟩ id ⊗₁ (λ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ refl⟩⊗⟨ pullˡ (Kelly's.coherence₁ M) ⟩∘⟨refl ⟩ id ⊗₁ (λ⇒ ⊗₁ id ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ refl⟩⊗⟨ pushˡ split₁ˡ ⟩∘⟨refl ⟩ id ⊗₁ ((λ⇒ ∘ σ⇒) ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ refl⟩⊗⟨ (braiding-coherence B ⟩⊗⟨refl ⟩∘⟨refl) ⟩∘⟨refl ⟩ id ⊗₁ (ρ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ refl⟩⊗⟨ switch-fromtoʳ α triangle ⟩∘⟨refl ⟩ id ⊗₁ (id ⊗₁ λ⇒) ∘ α⇒ ≈˘⟨ assoc-commute-from ⟩ α⇒ ∘ (id ⊗₁ id) ⊗₁ λ⇒ ∎)) ⟩∘⟨refl ⟩ (id ⊗₁ ρ⇒ ∘ α⇒ ∘ (id ⊗₁ id) ⊗₁ λ⇒) ∘ id ⊗₁ λ⇐ ≈⟨ (sym-assoc ○ (Kelly's.coherence₂ M ⟩∘⟨ ⊗.identity ⟩⊗⟨refl)) ⟩∘⟨refl ⟩ (ρ⇒ ∘ id ⊗₁ λ⇒) ∘ id ⊗₁ λ⇐ ≈⟨ cancelʳ (_≅_.isoʳ (idᵢ ⊗ᵢ unitorˡ)) ⟩ ρ⇒ ∎ swapInner-braiding : [ (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ⇒ (Y ⊗₀ Z) ⊗₀ (W ⊗₀ X) ]⟨ i⇒ ⇒⟨ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) ⟩ σ⇒ ⊗₁ σ⇒ ⇒⟨ (Y ⊗₀ W) ⊗₀ (Z ⊗₀ X) ⟩ i⇒ ≈ σ⇒ ⟩ swapInner-braiding = begin i⇒ ∘ σ⇒ ⊗₁ σ⇒ ∘ i⇒ ≡⟨⟩ i⇒ ∘ σ⇒ ⊗₁ σ⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ swapInner-coherent ⟩∘⟨ pushˡ serialize₁₂ ⟩ j⇒ ∘ σ⇒ ⊗₁ id ∘ id ⊗₁ σ⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ ((refl⟩∘⟨ refl⟩⊗⟨ ⊗.identity) ⟩∘⟨ ⊗.identity ⟩⊗⟨refl ⟩∘⟨refl) ○ assoc ⟩ ((α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ σ⇒ ⊗₁ (id ⊗₁ id)) ∘ (id ⊗₁ id) ⊗₁ σ⇒ ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ pullʳ (pullʳ assoc-commute-to) ⟩∘⟨ extendʳ (⟺ assoc-commute-to) ⟩ (α⇒ ∘ (α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ⊗₁ id ∘ (σ⇒ ⊗₁ id) ⊗₁ id ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ (id ⊗₁ σ⇒) ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ (refl⟩∘⟨ pushˡ split₁ˡ) ⟩∘⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ (α⇒ ∘ ((α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒) ∘ σ⇒ ⊗₁ id) ⊗₁ id ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ (id ⊗₁ σ⇒ ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ (refl⟩∘⟨ pullʳ (assoc ○ hexagon₁) ⟩⊗⟨refl ⟩∘⟨refl) ⟩∘⟨ refl⟩∘⟨ refl⟩⊗⟨ (⟺ assoc ○ (pullˡ (assoc ○ hexagon₁))) ⟩∘⟨refl ⟩ (α⇒ ∘ (α⇐ ∘ α⇒ ∘ σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ∘ α⇒) ∘ α⇐) ∘ α⇒ ≈⟨ (refl⟩∘⟨ cancelˡ α.isoˡ ⟩⊗⟨refl ⟩∘⟨refl) ⟩∘⟨ refl⟩∘⟨ refl⟩⊗⟨ pullʳ (cancelʳ α.isoʳ) ⟩∘⟨refl ⟩ (α⇒ ∘ (σ⇒ ∘ α⇒) ⊗₁ id ∘ α⇐) ∘ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒) ∘ α⇒ ≈⟨ extendʳ (pushʳ split₁ˡ) ⟩∘⟨ extendʳ (pushʳ split₂ˡ) ⟩ ((α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇒ ⊗₁ id ∘ α⇐) ∘ (α⇐ ∘ id ⊗₁ α⇒) ∘ id ⊗₁ σ⇒ ∘ α⇒ ≈˘⟨ extendʳ (pushʳ (pushʳ assoc)) ⟩ (α⇒ ∘ σ⇒ ⊗₁ id) ∘ (α⇒ ⊗₁ id ∘ (α⇐ ∘ α⇐) ∘ id ⊗₁ α⇒) ∘ id ⊗₁ σ⇒ ∘ α⇒ ≈˘⟨ refl⟩∘⟨ switch-tofromˡ (α ⊗ᵢ idᵢ) (switch-tofromʳ (idᵢ ⊗ᵢ α) inv-pentagon) ⟩∘⟨refl ⟩ (α⇒ ∘ σ⇒ ⊗₁ id) ∘ α⇐ ∘ id ⊗₁ σ⇒ ∘ α⇒ ≈⟨ pullʳ (sym-assoc ○ pullˡ hexagon₂) ⟩ α⇒ ∘ ((α⇐ ∘ σ⇒) ∘ α⇐) ∘ α⇒ ≈⟨ (refl⟩∘⟨ cancelʳ α.isoˡ) ⟩ α⇒ ∘ (α⇐ ∘ σ⇒) ≈⟨ cancelˡ α.isoʳ ⟩ σ⇒ ∎ where inv-pentagon = _≃_.to-≈ pentagon-iso -- Braided monoidal categories have an interchange. hasInterchange : HasInterchange M hasInterchange = record { swapInner = swapInner ; natural = swapInner-natural ; assoc = swapInner-assoc ; unitˡ = swapInner-unitˡ ; unitʳ = swapInner-unitʳ } open HasInterchange hasInterchange public using (naturalIso) -- Extra identities that hold only for symmetric monoidal categories. module SymmetricInterchange {M : Monoidal C} (S : Symmetric M) where open MonoidalReasoning M open MonoidalUtilities M open Symmetric S renaming (associator to α) open Shorthands open BraidedInterchange braided public private i⇒ = swapInner.from i⇐ = swapInner.to σ⇒ = λ {X Y} → braiding.⇒.η (X , Y) σ⇐ = λ {X Y} → braiding.⇐.η (X , Y) swapInner-commutative : [ (X₁ ⊗₀ X₂) ⊗₀ (Y₁ ⊗₀ Y₂) ⇒ (X₁ ⊗₀ X₂) ⊗₀ (Y₁ ⊗₀ Y₂) ]⟨ i⇒ ⇒⟨ (X₁ ⊗₀ Y₁) ⊗₀ (X₂ ⊗₀ Y₂) ⟩ i⇒ ≈ id ⟩ swapInner-commutative = begin i⇒ ∘ i⇒ ≈⟨ pullʳ (cancelInner α.isoʳ) ⟩ α⇐ ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ id ⊗₁ (α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈˘⟨ refl⟩∘⟨ pushˡ split₂ˡ ⟩ α⇐ ∘ id ⊗₁ ((α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ∘ σ⇒ ⊗₁ id ∘ α⇐) ∘ α⇒ ≈⟨ refl⟩∘⟨ refl⟩⊗⟨ (∘-resp-≈ʳ sym-assoc ○ α[σ⊗1]α⁻¹.isoʳ) ⟩∘⟨refl ⟩ α⇐ ∘ id ⊗₁ id ∘ α⇒ ≈⟨ refl⟩∘⟨ ⊗.identity ⟩∘⟨refl ⟩ α⇐ ∘ id ∘ α⇒ ≈⟨ ∘-resp-≈ʳ identityˡ ○ α.isoˡ ⟩ id ∎ where module α[σ⊗1]α⁻¹ = _≅_ (α ∘ᵢ braided-iso ⊗ᵢ idᵢ ∘ᵢ α ⁻¹) swapInner-iso : (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ≅ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) swapInner-iso = record { from = i⇒ ; to = i⇒ ; iso = record { isoˡ = swapInner-commutative ; isoʳ = swapInner-commutative } } swapInner-braiding′ : [ (W ⊗₀ X) ⊗₀ (Y ⊗₀ Z) ⇒ (Y ⊗₀ W) ⊗₀ (Z ⊗₀ X) ]⟨ i⇒ ⇒⟨ (W ⊗₀ Y) ⊗₀ (X ⊗₀ Z) ⟩ σ⇒ ⊗₁ σ⇒ ≈ σ⇒ ⇒⟨ (Y ⊗₀ Z) ⊗₀ (W ⊗₀ X) ⟩ i⇒ ⟩ swapInner-braiding′ = switch-fromtoˡ swapInner-iso swapInner-braiding
oeis/062/A062805.asm
neoneye/loda-programs
11
14941
; A062805: a(n) = Sum_{i=1..n} i*n^(n-i). ; 0,1,4,18,112,975,11196,160132,2739136,54481005,1234567900,31384283766,884241366768,27342891567355,920521275490012,33512287529147400,1311768467463790336,54933923640889550745,2450641333409472928572,116018436597364068498010,5809285318559556786703600,306735818465264082372509031,17032683224518889484639972604,992253644620871852872243299468,60509751690750130409788195365312,3854941057726237987582054403093125,256094574536617744129141650397448476,17710821275979319213909378737747111102 mov $2,$0 lpb $2 sub $2,1 add $3,1 mul $3,$0 sub $3,$2 lpe mov $0,$3
Document-Closers/Close-With-Saving.applescript
boisy/AppleScripts
116
2584
tell application "System Events" to set frontapp to name of first process whose frontmost is true tell application frontapp tell front document close saving yes end tell end tell
src/boot.asm
FranchuFranchu/fran-os
1
98178
; Declare constants for the multiboot header. MBALIGN equ 1 << 0 ; align loaded modules on page boundaries MEMINFO equ 1 << 1 ; provide memory map FLAGS equ MBALIGN | MEMINFO ; this is the Multiboot 'flag' field MAGIC equ 0x1BADB002 ; 'magic number' lets bootloader find the header CHECKSUM equ -(MAGIC + FLAGS) ; checksum of above, to prove we are multiboot ; Offset which boot.asm is built with KERNEL_VIRTUAL_BASE equ 0xC0000000 ; 3GB KERNEL_PAGE_NUMBER equ (KERNEL_VIRTUAL_BASE >> 22) ; Page directory index of kernel's 4MB PTE. ; Declare a multiboot header that marks the program as a kernel. These are magic ; values that are documented in the multiboot standard. The bootloader will ; search for this signature in the first 8 KiB of the kernel file, aligned at a ; 32-bit boundary. The signature is in its own section so the header can be ; forced to be within the first 8 KiB of the kernel file. section .multiboot align 4 dd MAGIC dd FLAGS dd CHECKSUM ; The multiboot standard does not define the value of the stack pointer register ; (esp) and it is up to the kernel to provide a stack. This allocates room for a ; small stack by creating a symbol at the bottom of it, then allocating 16384 ; bytes for it, and finally creating a symbol at the top. The stack grows ; downwards on x86. The stack is in its own section so it can be marked nobits, ; which means the kernel file is smaller because it does not contain an ; uninitialized stack. The stack on x86 must be 16-byte aligned according to the ; System V ABI standard and de-facto extensions. The compiler will assume the ; stack is properly aligned and failure to align the stack will result in ; undefined behavior. section .bss align 16 stack_bottom: resb 16384 ; 16 KiB stack_top: section .data align 4096 global page_directory page_directory: ; This page directory entry identity-maps the first 4MB of the 32-bit physical address space. ; All bits are clear except the following: ; bit 7: PS The kernel page is 4MB. ; bit 1: RW The kernel page is read/write. ; bit 0: P The kernel page is present. ; This entry must be here -- otherwise the kernel will crash immediately after paging is ; enabled because it can't fetch the next instruction! It's ok to unmap this page later. dd 0x00000083 times (KERNEL_PAGE_NUMBER - 1) dd 0 ; Pages before kernel space. ; Define three entries for a 16MiB kernel dd 0x00000083 dd 0x00400083 dd 0x00800083 dd 0x00C00083 dd 0x01000083 dd 0x01400083 times (1024 - KERNEL_PAGE_NUMBER - 1) dd 0 ; Pages after the kernel image. ; The linker script specifies _start as the entry point to the kernel and the ; bootloader will jump to this position once the kernel has been loaded. It ; doesn't make sense to return from this function as the bootloader is gone. ; Declare _start as a function symbol with the given symbol size. section .text gdt: gdt_null: dw 0 dw 0 db 0 db 0 db 0 db 0 gdt_code: .limit_0_15 dw 0xFFFF .base_0_15 dw 0 .base_16_23 db 0 .access db 10011010b .limit_and_flags db 11001111b .base_24_31 db 0 gdt_data: .limit_0_15 dw 0xFFFF .base_0_15 dw 0x0 .base_16_23 db 0x0 .access db 10010010b .limit_and_flags db 11001111b .base_24_31 db 0x0 %ifdef usergdt gdt_user_code: .limit_0_15 dw 0xFFFF .base_0_15 dw 0 .base_16_23 db 0 .access db 11111010b .limit_and_flags db 11001111b .base_24_31 db 0 gdt_user_data: .limit_0_15 dw 0xFFFF .base_0_15 dw 0x0 .base_16_23 db 0x0 .access db 11110010b .limit_and_flags db 11001111b .base_24_31 db 0x0 %endif gdt_end: gdt_desc: .size: dw gdt_end - gdt - 1 .offset: dd gdt-KERNEL_VIRTUAL_BASE ; IN = EAX: Page table address (4KiB aligned), EBX: Future location of PDT, AL: Flags %define kernel_paging_make_pde mov [ebx], eax ; IN = EAX: Physical address to map to (4KiB aligned) address, EBX: Future location of PDT, AL: Flags %define kernel_paging_make_pte mov [ebx], eax ; OUT = AL: Common page flags %define kernel_paging_set_default_page_flags mov al, 111b global kernel_multiboot_info_pointer kernel_multiboot_info_pointer dd 0 global _start:function (_start.end - _start) _start: ; The bootloader has loaded us into 32-bit protected mode on a x86 ; machine. Interrupts are disabled. Paging is disabled. The processor ; state is as defined in the multiboot standard. The kernel has full ; control of the CPU. The kernel can only make use of hardware features ; and any code it provides as part of itself. There's no printf ; function, unless the kernel provides its own <stdio.h> header and a ; printf implementation. There are no security restrictions, no ; safeguards, no debugging mechanisms, only what the kernel provides ; itself. It has absolute and complete power over the ; machine. ; This is a good place to initialize crucial processor state before the ; high-level kernel is entered. It's best to minimize the early ; environment where crucial features are offline. Note that the ; processor is not fully initialized yet: Features such as floating ; point instructions and instruction set extensions are not initialized ; yet. The GDT should be loaded here. Paging should be enabled here. ; C++ features such as global constructors and exceptions will require ; runtime support to work as well. mov dword [0xB8000], "s 1 " add ebx, KERNEL_VIRTUAL_BASE mov [kernel_multiboot_info_pointer - KERNEL_VIRTUAL_BASE], ebx mov esp, stack_top-KERNEL_VIRTUAL_BASE cli .kernel_gdt_setup: lgdt [gdt_desc-KERNEL_VIRTUAL_BASE] ;load GDT mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax jmp 0x08:.update_stack-KERNEL_VIRTUAL_BASE .update_stack: mov ax, 0x10 mov ss, ax ; To set up a stack, we set the esp register to point to the top of our ; stack (as it grows downwards on x86 systems). This is necessarily done ; in assembly as languages such as C cannot function without a stack. mov esp, stack_top-KERNEL_VIRTUAL_BASE mov dword [0xB8000], "s 2 " ; NOTE: Until paging is set up, the code must be position-independent and use physical ; addresses, not virtual ones! mov ecx, (page_directory - KERNEL_VIRTUAL_BASE) mov cr3, ecx ; Load Page Directory Base Register. mov ecx, cr4 or ecx, 0x00000010 ; Set PSE bit in CR4 to enable 4MB pages. mov cr4, ecx mov ecx, cr0 or ecx, 0x80000000 ; Set PG bit in CR0 to enable paging. mov cr0, ecx mov dword [0xB8000], "s 3 " ; Start fetching instructions in kernel space. ; Since eip at this point holds the physical address of this command (approximately 0x00100000) ; we need to do a long jump to the correct virtual address of StartInHigherHalf which is ; approximately 0xC0100000. lea ecx, [.on_higher_half] jmp ecx ; NOTE: Must be absolute jump! .on_higher_half: mov dword [page_directory], 0 invlpg [0] ; NOTE: From now on, paging should be enabled. The first 4MB of physical address space is ; mapped starting at KERNEL_VIRTUAL_BASE. Everything is linked to this address, so no more ; position-independent code or funny business with virtual-to-physical address translation ; should be necessary. We now have a higher-half kernel. mov esp, stack_top ; set up the stack push eax ; pass Multiboot magic number ; pass Multiboot info structure -- WARNING: This is a physical address and may not be ; in the first 4MB! push ebx mov dword [0xC00B8000], "s 4 " ; Enter the high-level kernel. The ABI requires the stack is 16-byte ; aligned at the time of the call instruction (which afterwards pushes ; the return pointer of size 4 bytes). The stack was originally 16-byte ; aligned above and we've since pushed a multiple of 16 bytes to the ; stack since (pushed 0 bytes so far) and the alignment is thus ; preserved and the call is well defined. ; note, that if you are building on Windows, C functions may have "_" prefix in assembly: _kernel_main extern kernel_main jmp kernel_main ; If the system has nothing more to do, put the computer into an ; infinite loop. To do that: ; 1) Disable interrupts with cli (clear interrupt enable in eflags). ; They are already disabled by the bootloader, so this is not needed. ; Mind that you might later enable interrupts and return from ; kernel_main (which is sort of nonsensical to do). ; 2) Wait for the next interrupt to arrive with hlt (halt instruction). ; Since they are disabled, this will lock up the computer. ; 3) Jump to the hlt instruction if it ever wakes up due to a ; non-maskable interrupt occurring or due to system management mode. cli .hang: hlt jmp .hang .end:
source/league/ucd/matreshka-internals-unicode-ucd-core_001f.ads
svn2github/matreshka
24
6315
<reponame>svn2github/matreshka<filename>source/league/ucd/matreshka-internals-unicode-ucd-core_001f.ads ------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, <NAME> <<EMAIL>> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_001F is pragma Preelaborate; Group_001F : aliased constant Core_Second_Stage := (16#08# .. 16#0F# => -- 1F08 .. 1F0F (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#16# .. 16#17# => -- 1F16 .. 1F17 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#18# .. 16#1D# => -- 1F18 .. 1F1D (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#1E# .. 16#1F# => -- 1F1E .. 1F1F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#28# .. 16#2F# => -- 1F28 .. 1F2F (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#38# .. 16#3F# => -- 1F38 .. 1F3F (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#46# .. 16#47# => -- 1F46 .. 1F47 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#48# .. 16#4D# => -- 1F48 .. 1F4D (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#4E# .. 16#4F# => -- 1F4E .. 1F4F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#58# => -- 1F58 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#59# => -- 1F59 (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5A# => -- 1F5A (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#5B# => -- 1F5B (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5C# => -- 1F5C (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#5D# => -- 1F5D (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#5E# => -- 1F5E (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#5F# => -- 1F5F (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#68# .. 16#6F# => -- 1F68 .. 1F6F (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#71# => -- 1F71 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#73# => -- 1F73 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#75# => -- 1F75 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#77# => -- 1F77 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#79# => -- 1F79 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7B# => -- 1F7B (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7D# => -- 1F7D (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#7E# .. 16#7F# => -- 1F7E .. 1F7F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#80# .. 16#87# => -- 1F80 .. 1F87 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#88# .. 16#8F# => -- 1F88 .. 1F8F (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#90# .. 16#97# => -- 1F90 .. 1F97 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#98# .. 16#9F# => -- 1F98 .. 1F9F (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A0# .. 16#A7# => -- 1FA0 .. 1FA7 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#A8# .. 16#AF# => -- 1FA8 .. 1FAF (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B2# .. 16#B4# => -- 1FB2 .. 1FB4 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B5# => -- 1FB5 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#B7# => -- 1FB7 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#B8# .. 16#BB# => -- 1FB8 .. 1FBB (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BC# => -- 1FBC (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BD# => -- 1FBD (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#BE# => -- 1FBE (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#BF# .. 16#C1# => -- 1FBF .. 1FC1 (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#C2# .. 16#C4# => -- 1FC2 .. 1FC4 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C5# => -- 1FC5 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#C7# => -- 1FC7 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#C8# .. 16#CB# => -- 1FC8 .. 1FCB (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#CC# => -- 1FCC (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#CD# .. 16#CF# => -- 1FCD .. 1FCF (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#D3# => -- 1FD3 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#D4# .. 16#D5# => -- 1FD4 .. 1FD5 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#D8# .. 16#DB# => -- 1FD8 .. 1FDB (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#DC# => -- 1FDC (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#DD# .. 16#DF# => -- 1FDD .. 1FDF (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#E3# => -- 1FE3 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#E8# .. 16#EC# => -- 1FE8 .. 1FEC (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#ED# .. 16#EF# => -- 1FED .. 1FEF (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#F0# .. 16#F1# => -- 1FF0 .. 1FF1 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#F2# .. 16#F4# => -- 1FF2 .. 1FF4 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F5# => -- 1FF5 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#F7# => -- 1FF7 (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#F8# .. 16#FB# => -- 1FF8 .. 1FFB (Uppercase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Uppercase | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#FC# => -- 1FFC (Titlecase_Letter, Neutral, Other, A_Letter, Upper, Alphabetic, (Alphabetic | Cased | Changes_When_Lowercased | Changes_When_Uppercased | Changes_When_Casefolded | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#FD# => -- 1FFD (Modifier_Symbol, Neutral, Other, Other, Other, Break_Before, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#FE# => -- 1FFE (Modifier_Symbol, Neutral, Other, Other, Other, Alphabetic, (Diacritic | Case_Ignorable | Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#FF# => -- 1FFF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), others => (Lowercase_Letter, Neutral, Other, A_Letter, Lower, Alphabetic, (Alphabetic | Cased | Changes_When_Uppercased | Changes_When_Titlecased | Changes_When_Casemapped | Grapheme_Base | ID_Continue | ID_Start | Lowercase | XID_Continue | XID_Start => True, others => False))); end Matreshka.Internals.Unicode.Ucd.Core_001F;
src/security-permissions.ads
Letractively/ada-security
0
8769
<gh_stars>0 ----------------------------------------------------------------------- -- security-permissions -- Definition of permissions -- Copyright (C) 2010, 2011, 2012 <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. ----------------------------------------------------------------------- -- == Permission == -- The <b>Security.Permissions</b> package defines the different permissions that can be -- checked by the access control manager. An application should declare each permission -- by instantiating the <tt>Definition</tt> package: -- -- package Perm_Create_Workspace is new Security.Permissions.Definition ("create-workspace"); -- -- This declares a permission that can be represented by "<tt>create-workspace</tt>" in -- configuration files. In Ada, the permission is used as follows: -- -- Perm_Create_Workspace.Permission -- package Security.Permissions is Invalid_Name : exception; type Permission_Index is new Natural; -- Get the permission index associated with the name. function Get_Permission_Index (Name : in String) return Permission_Index; -- The permission root class. -- Each permission is represented by a <b>Permission_Index</b> number to provide a fast -- and efficient permission check. type Permission (Id : Permission_Index) is tagged limited null record; generic Name : String; package Definition is function Permission return Permission_Index; pragma Inline_Always (Permission); end Definition; -- Add the permission name and allocate a unique permission index. procedure Add_Permission (Name : in String; Index : out Permission_Index); private -- Get the last permission index registered in the global permission map. function Get_Last_Permission_Index return Permission_Index; end Security.Permissions;
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0x48.log_21829_1041.asm
ljhsiun2/medusa
9
105562
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r9 push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x1e29f, %rsi lea addresses_WT_ht+0x16f66, %rdi nop nop sub $38350, %r9 mov $54, %rcx rep movsq xor $30686, %rdx lea addresses_WT_ht+0x13ee6, %rdi nop dec %rbp mov (%rdi), %rsi nop nop nop nop nop sub %rdi, %rdi lea addresses_WC_ht+0x52e6, %r9 nop nop nop nop nop xor $28332, %rdi mov (%r9), %rsi nop nop nop nop nop cmp $8090, %rdi lea addresses_A_ht+0x196e6, %rsi lea addresses_WC_ht+0x94e6, %rdi clflush (%rsi) clflush (%rdi) nop and $17387, %r10 mov $108, %rcx rep movsw cmp $24609, %r10 lea addresses_UC_ht+0x1d0e6, %rdx nop xor %r10, %r10 movw $0x6162, (%rdx) nop nop nop nop nop add $25462, %r10 lea addresses_UC_ht+0x13606, %rsi lea addresses_UC_ht+0xe6e6, %rdi nop nop nop nop sub $14861, %rbx mov $61, %rcx rep movsw nop nop nop nop nop xor %rcx, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r14 push %r15 push %rax push %rbx push %rdx push %rsi // Store lea addresses_US+0xa866, %rax sub %r14, %r14 movl $0x51525354, (%rax) inc %r14 // Load lea addresses_WT+0x1e2e6, %r14 nop nop nop nop nop and $4430, %rsi vmovups (%r14), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %rbx nop xor $63695, %r15 // Faulty Load mov $0x21b3c400000006e6, %r10 nop nop nop nop nop cmp $49160, %rbx mov (%r10), %rsi lea oracles, %r10 and $0xff, %rsi shlq $12, %rsi mov (%r10,%rsi,1), %rsi pop %rsi pop %rdx pop %rbx pop %rax pop %r15 pop %r14 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 9, 'size': 2, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
Transynther/x86/_processed/AVXALIGN/_zr_/i7-8650U_0xd2.log_10546_1805.asm
ljhsiun2/medusa
9
83627
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %r15 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_A_ht+0xd85e, %rsi lea addresses_WT_ht+0x1d2be, %rdi nop add %rax, %rax mov $28, %rcx rep movsb nop nop xor %r10, %r10 lea addresses_D_ht+0x151e, %rsi lea addresses_WC_ht+0x85de, %rdi nop nop nop nop xor $94, %r14 mov $82, %rcx rep movsw nop nop nop nop xor %rcx, %rcx lea addresses_D_ht+0x18bfe, %rcx clflush (%rcx) and $5246, %r15 mov $0x6162636465666768, %r10 movq %r10, %xmm7 vmovups %ymm7, (%rcx) nop nop nop and $49695, %rdi lea addresses_WT_ht+0x1665a, %r10 nop nop nop nop nop sub $24492, %rax movb (%r10), %cl nop nop nop add $40501, %r15 lea addresses_UC_ht+0xadde, %rsi lea addresses_UC_ht+0x5eae, %rdi xor %r9, %r9 mov $79, %rcx rep movsb nop inc %rcx lea addresses_A_ht+0x7f9e, %r15 cmp %r9, %r9 mov $0x6162636465666768, %rsi movq %rsi, %xmm7 vmovups %ymm7, (%r15) nop nop nop nop add %r14, %r14 lea addresses_WT_ht+0x27f6, %rcx nop sub %r15, %r15 movw $0x6162, (%rcx) nop nop nop nop nop sub $10076, %r10 lea addresses_A_ht+0xdde, %rsi lea addresses_A_ht+0x224e, %rdi clflush (%rdi) nop and %rax, %rax mov $16, %rcx rep movsq nop nop cmp $15036, %r14 lea addresses_WC_ht+0x189de, %r15 nop nop cmp $46048, %rsi movl $0x61626364, (%r15) nop nop sub $60663, %r9 lea addresses_WC_ht+0xa06e, %rdi nop nop nop nop nop add $39149, %rax movl $0x61626364, (%rdi) nop nop add %r15, %r15 lea addresses_WT_ht+0x19dde, %r14 clflush (%r14) nop and $64760, %rdi and $0xffffffffffffffc0, %r14 movaps (%r14), %xmm5 vpextrq $0, %xmm5, %r9 nop nop nop nop nop lfence lea addresses_normal_ht+0x1482a, %r14 add %rdi, %rdi mov $0x6162636465666768, %rcx movq %rcx, %xmm3 and $0xffffffffffffffc0, %r14 vmovaps %ymm3, (%r14) nop sub %r9, %r9 lea addresses_normal_ht+0x291f, %r15 nop cmp $58495, %r10 movw $0x6162, (%r15) nop nop add %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r15 pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r8 push %r9 push %rax push %rbx // Store lea addresses_A+0x1677e, %r12 nop nop nop nop xor $64159, %rbx movl $0x51525354, (%r12) nop nop nop sub %r13, %r13 // Store lea addresses_WT+0xb5de, %rax nop cmp %r11, %r11 mov $0x5152535455565758, %r13 movq %r13, %xmm6 vmovups %ymm6, (%rax) add %r12, %r12 // Faulty Load lea addresses_US+0x2dde, %r13 nop nop nop nop nop sub %rbx, %rbx movb (%r13), %al lea oracles, %rbx and $0xff, %rax shlq $12, %rax mov (%rbx,%rax,1), %rax pop %rbx pop %rax pop %r9 pop %r8 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'00': 10546} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
oeis/028/A028145.asm
neoneye/loda-programs
11
6651
<reponame>neoneye/loda-programs<gh_stars>10-100 ; A028145: Expansion of 1/((1-4x)(1-7x)(1-8x)(1-9x)). ; Submitted by <NAME> ; 1,28,497,7148,90993,1070076,11908849,127304716,1320106865,13369686044,132894679281,1301200322604,12584262543217,120472024886332,1143539682545393,10777265023323212,100956186031265649,940834862478389340,8729146807983980785,80681982692878968940,743281316092774779761,6827982887508684473468,62568577221291630819057,572114905177967638402188,5221462850590373786551153,47575724445834033782057116,432863894451454706920173809,3933387374396175300642525356,35702458266052768813862125425 mov $1,1 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 seq $0,20782 ; Expansion of 1/((1-7x)(1-8x)(1-9x)). sub $0,$1 mul $1,5 add $1,$0 lpe mov $0,$1
tp_01_08/include/isr.asm
mjFer/TDIII-UTN-FRBA-TPS-2014
2
12163
<reponame>mjFer/TDIII-UTN-FRBA-TPS-2014 ;*********************************************************** ; UTN-2014-Rutinas de Interrupcion ;*********************************************************** ;*********************************************************** ; Author : <NAME> ; Date : 23th May 2014 ;*********************************************************** [BITS 64] ;defines de teclado %define KEY_ESC 01h %define KEY_F5 0xbf %define KEY_F6 0xc0 %define KEY_F7 0xc1 %define KEY_F8 0xc2 %define KEY_CTL_PRESS 0x1D %define KEY_CTL_RELEASE 0x9D %define KEY_1_PRESS 0x02 %define KEY_2_PRESS 0x03 %define KEY_3_PRESS 0x04 ;http://sourceforge.net/p/nasm/mailman/nasm-users/thread/4DFE094A.9020105@computer.org/ %assign i 0 %rep 30 irsMSG_%+i: db "SALTO_EXCEPCION_N_" irsMSG2_%+i:db 0,0,0,0,0,0,0,0,0,0 int_%+i: push rdi push rax xchg bx,bx mov edi,irsMSG_%+i mov esi,10 ; esi (segundo argumento) char columna mov edx,6 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 mov edi,i ;valor de la excepcion mov esi,irsMSG2_%+i ;puntero a char call my_itoa ;llamo a mi super funcion itoa mov edi,irsMSG2_%+i mov esi,28 ; esi (segundo argumento) char columna mov edx,6 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 ;hago que imprima el numero mov al,20h out 20h,al pop rax pop rdi iretq %assign i i+1 %endrep ;----------------------------------------------------------- ; Handler de Interrupcion de teclado ; Recibe: Nada ; Devuelve: Nada ;------------------------------------------------------------ hlt_txt: db "HLT!!", 00h variable_ctl_pressed: dq 00h int9_keyboardHandler: push rax push rdi push rsi push rdx push rcx xor rax,rax ;asi limpio el rax que sino da todo mal in al,60h cmp al,KEY_ESC je KEY_ESC_PRESS cmp al,KEY_F5 je KEY_F5_PRESS cmp al,KEY_F6 je KEY_F6_PRESS cmp al,KEY_F7 je KEY_F7_PRESS cmp al,KEY_F8 je KEY_F8_PRESS cmp al,KEY_CTL_PRESS je KEY_CTL_PRESSED cmp al,KEY_CTL_RELEASE je KEY_CTL_RELEASED cmp al,KEY_1_PRESS je KEY_1_PRESSED cmp al,KEY_2_PRESS je KEY_2_PRESSED cmp al,KEY_3_PRESS je KEY_3_PRESSED term_int9: mov al,0x20 ;indico al PIC que atendi la interrupcion out 0x20,al pop rcx pop rdx pop rsi pop rdi pop rax iretq ;ojo que iret es de 16bit iretd es de 32 y iretq es de 64 KEY_CTL_PRESSED: mov rax,0x00000001 mov [variable_ctl_pressed],rax jmp term_int9 KEY_CTL_RELEASED: mov rax,0x00000000 mov [variable_ctl_pressed],rax jmp term_int9 KEY_1_PRESSED: xor rax,rax mov rax,[variable_ctl_pressed] cmp rax,00 je term_int9 call GENERAR_DOBLE_FAULT jmp term_int9 KEY_2_PRESSED: xor rax,rax mov rax,[variable_ctl_pressed] cmp rax,00 je term_int9 call GENERAR_GENERAL_PROTECTION jmp term_int9 KEY_3_PRESSED: xor rax,rax mov rax,[variable_ctl_pressed] cmp rax,00 je term_int9 call GENERAR_PAGE_FAULT jmp term_int9 KEY_ESC_PRESS: mov edi,hlt_txt mov esi,10 ; esi (segundo argumento) char columna mov edx,3 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 jmp term_int9 KEY_F5_PRESS: call toggle_F5_D0 jmp term_int9 KEY_F6_PRESS: call toggle_F6_D1 jmp term_int9 KEY_F7_PRESS: call toggle_F7_D2 jmp term_int9 KEY_F8_PRESS: call toggle_F8_D3 jmp term_int9 G_DF_txt: db "GENERANDO DOBLE FAULT!! ", 00h G_GP_txt: db "GENERANDO GENERAL PROTECTION:!!", 00h G_PG_txt: db "GENERANDO PAGE FAULT!! ", 00h GENERAR_DOBLE_FAULT: mov edi,G_DF_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,23 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 ;divido por cero para generar una excepcion de division por cero ;o si esta mal definida que genere una general protection mov rax,0x00000001 ;preguntar por que exploca y no explotaba mov rbx,0x00000000 div rbx ret GENERAR_GENERAL_PROTECTION: mov edi,G_GP_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,23 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 ;escribo en un bit reservado del cr4 mov rax,0x100000 mov cr4, rax ;xchg bx,bx ;divido por cero para generar una excepcion de division por cero ;o si esta mal definida que genere una general protection ;mov rax,0x00000000 preguntar por que exploca y no explotaba ;mov rbx,0x00000000 ;div rbx ;salto a una sona no ejecutable ;jmp G_DF_txt ;pruebo de escribir en una direccion superior al primer megabyte ;donde posicione las tablas de paginacion ;mov edi,0x100000 ;me posiciono en el primer megabyte ;mov word [edi],0xA0BA0; ;escribo basura XD ret GENERAR_PAGE_FAULT: mov edi,G_PG_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,23 ; edx (tercer argumento) char fila mov ecx,111b ; ECX (cuarto arguemto) char color call Print_64 ;trato de leer en una zona de memoria que no esta en pagina mov rax,[0x300000] ret %include "include/debug_registers.asm" ;----------------------------------------------------------- ; Handler de division por cero ; Recibe: Nada ; Devuelve: Nada ;----------------------------------------------------------- ex0_ceroHandler: xchg bx,bx ;trato de leer en una zona de memoria que no esta en pagina mov rax,[0x300000] iretq ;----------------------------------------------------------- ; Handler de Debug ; Recibe: Nada ; Devuelve: Nada ;----------------------------------------------------------- ex3_BPHandler: iretq ;----------------------------------------------------------- ; Handler de DoubleFault ; Recibe: Nada ; Devuelve: Nada ;----------------------------------------------------------- G_DFH_txt: db "ex8_DoubleFaultHandler!! ", 00h ex8_DoubleFaultHandler: pop rax mov edi,G_DFH_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,7 ; edx (tercer argumento) char fila mov ecx,100b ; ECX (cuarto arguemto) char color call Print_64 pop rax ;incremento el eip en 3 para que siga con laproxima instruccion add rax, 11b push rax iretq ;----------------------------------------------------------- ; Handler de General Protection ; Recibe: Nada ; Devuelve: Nada ;----------------------------------------------------------- G_GPH_txt: db "ex13_GeneralProtectionHandler!! ", 00h ex13_GeneralProtectionHandler: pop rbx mov edi,G_GPH_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,6 ; edx (tercer argumento) char fila mov ecx,100b ; ECX (cuarto arguemto) char color call Print_64 pop rax ;incremento el eip en 3 para qsue siga con laproxima instruccion add rax, 11b push rax iretq ;----------------------------------------------------------- ; Handler de PageFault ; Recibe: Nada ; Devuelve: Nada ;----------------------------------------------------------- G_PFH_txt: db "ex14_PageFaultProtectionHandler!! ", 00h ex14_PageFaultProtectionHandler: pop rbx mov edi,G_PFH_txt mov esi,5 ; esi (segundo argumento) char columna mov edx,8 ; edx (tercer argumento) char fila mov ecx,100b ; ECX (cuarto arguemto) char color call Print_64 pop rax ;incremento el eip en 9 para que siga con laproxima instruccion add rax, 1000b push rax iretq
mp2/mp2.asm
Candy-Crusher/ece220
0
96446
<filename>mp2/mp2.asm .ORIG x3000 ;This program translates a student’s daily ;schedule from a list to a two-dimensional ;matrix of pointers (memory addresses, in this ;case to names of events), then prints the ;schedule. ;First we initialize the content of new schedule to 0. ;Then we translate the old schedule to new schedule. ;Finally we print the new schedule. LD R6,EVENT_LIST AND R5,R5,#0 AND R1,R1,#0 AND R0,R0,#0 LD R2,START ;1.Initialize ;Register ;R5:temporery counter of 75 ;R2:temporery pointer of shedule to 0 initialize shedule ;R1:0 ADD R5,R5,#15 ADD R5,R5,R5 ADD R5,R5,R5 ADD R5,R5,#15 INITIALIZE STR R1,R2,#0 ADD R2,R2,#1 ADD R5,R5,#-1 BRp INITIALIZE ;2.Translating ;Register ;R6:event list pointer ;R5:present day filed content of event list ;R4:1/2/4/8/16 ;R3:counter of 5 ;R2:first address of string ;R1:shedule address calculator ;R0:temporery copy of time_n/temporery check if in the day ;/temporery as x3000/temporery check if conflict EACH_WORDS AND R4,R4,#0 ADD R4,R4,#1 AND R3,R3,#0 ADD R3,R3,#4 LDR R5,R6,#0 ADD R5,R5,#1 BRz CALL ADD R5,R5,#-1 ADD R6,R6,#1 ;R6 points at the first char ADD R2,R6,#0 ;R2 as the first address of words LDR R1,R6,#0 BRz DAY_FIELD ;check if the strings end ADD R6,R6,#1 BRnp #-4 DAY_FIELD ADD R6,R6,#1 ;R6 as the address of day field LDR R1,R6,#0 BRn WARNING1 ADD R1,R1,#-14 BRp WARNING1 ;check if in range 0-14 ADD R1,R1,#14 ADD R0,R1,#0 ;copy R1 to R0 ADD R1,R1,R1 ADD R1,R1,R1 ADD R1,R1,R0 ;R1=R1*5,R0 is free now ADD R1,R1,#4 ;R1=R1+day_n LD R0,START ADD R1,R1,R0 DAY_CHECK AND R0,R5,R4 ;R0 temporery check day BRz #3 ;if in the day,check time LDR R0,R1,#0 BRnp WARNING2 STR R2,R1,#0 ;store address of strings to shedule ADD R4,R4,R4 ;if in the day,check next day ADD R1,R1,#-1 ADD R3,R3,#-1 BRzp DAY_CHECK ADD R6,R6,#1 BRnzp EACH_WORDS CALL JSR PRINT_SCHEDULE END_MAIN HALT WARNING1 ADD R0,R2,#0 PUTS LEA R0,INVALID_SLOT PUTS BRnzp END_MAIN WARNING2 ADD R0,R2,#0 PUTS LEA R0,CONFLICTS PUTS BRnzp END_MAIN EVENT_LIST .FILL x4000 INVALID_SLOT .STRINGZ " has an invalid slot number.\n" CONFLICTS .STRINGZ " conflicts with an earlier event.\n" PRINT_SCHEDULE ST R0,STORE_0 ST R1,STORE_1 ST R2,STORE_2 ST R3,STORE_3 ST R4,STORE_4 ST R5,STORE_5 ST R6,STORE_6 ST R7,STORE_7 ;3.Printing ;First line ;Register ;R3:counter of 5 ;R2:date ;R1:Address of date ;R0:| LEA R1,NONE JSR PRINT_CENTERED LD R0,VER LEA R1,MON AND R3,R3,#0 ADD R3,R3,#4 FIRST_LINE OUT JSR PRINT_CENTERED ADD R1,R1,#1 LDR R2,R1,#0 BRnp #-3 ADD R1,R1,#1 ADD R3,R3,#-1 BRzp FIRST_LINE LD R0,LINE_FEED OUT ;Latter lines ;Register ;R6:counter of 14 ;R5:counter of 5 ;R4:shedule address counter ;R3:copy of temporery R1 ;R2:x3000 ;R1:things to print ;R0:|/line feed LD R4,START AND R3,R3,#0 AND R1,R1,#0 AND R6,R6,#0 ADD R6,R6,#15 EACH_LINE BRz DONE1 AND R5,R5,#0 ADD R5,R5,#4 LD R0,VER JSR PRINT_SLOT ADD R3,R1,#0 ;copy R1 to R3,as date_n EACH_DAY OUT LDR R1,R4,#0 ;R1 as address of first char to print BRnp #1 LEA R1,NONE JSR PRINT_CENTERED ADD R4,R4,#1 ADD R5,R5,#-1 BRzp EACH_DAY LD R0,LINE_FEED OUT ADD R1,R3,#0 ADD R1,R1,#1 ADD R6,R6,#-1 BRnzp EACH_LINE DONE1 ;load back LD R0,STORE_0 LD R1,STORE_1 LD R2,STORE_2 LD R3,STORE_3 LD R4,STORE_4 LD R5,STORE_5 LD R6,STORE_6 LD R7,STORE_7 RET STORE_0 .BLKW #1 STORE_1 .BLKW #1 STORE_2 .BLKW #1 STORE_3 .BLKW #1 STORE_4 .BLKW #1 STORE_5 .BLKW #1 STORE_6 .BLKW #1 STORE_7 .BLKW #1 NONE .FILL x00 MON .STRINGZ "MONDAY" TUE .STRINGZ "TUESDAY" WED .STRINGZ "WEDNESDAY" THU .STRINGZ "THURSDAY" FRI .STRINGZ "FRIDAY" VER .FILL x7C LINE_FEED .FILL x0A START .FILL x3800 ;PRINT_SLOT: ;A number from 0 to 14 is passed to this subroutine in R1. ;The subroutine prints the time corresponding to the specified slot.(R1+6) ;If R1=0, for example, your subroutine must print “0600” ;preceded by three spaces (ASCII x20) and followed by two trailing spaces. PRINT_SLOT ;store R0-R7 ST R0,STORE_REGISTER0 ST R1,STORE_REGISTER1 ST R2,STORE_REGISTER2 ST R3,STORE_REGISTER3 ST R4,STORE_REGISTER4 ST R5,STORE_REGISTER5 ST R6,STORE_REGISTER6 ST R7,STORE_REGISTER7 ;print preceded spaces LD R0,SPACE OUT OUT OUT ;print numbers ;test if R1<=3 ADD R2,R1,#-3 BRp FIRSTN_NOT_ZERO ;if R1<=3, first digit should be 0,print LD R0,ZERO OUT ;if R1<=3,second digit should be R1+6;print LD R2,START_TIME ADD R0,R1,R2 OUT BRnzp LATTER ;go to print followed zeros and spaces FIRSTN_NOT_ZERO ;test if R1=14 ADD R2,R1,#-14 BRn FIRSTN_1 ;if R1=14,the first digit should be 2,print LD R0,ZERO ADD R0,R0,#2 OUT ;if R1=14,the second digit should be 0,print LD R0,ZERO OUT BRnzp LATTER ;go to print followed zeros and spaces FIRSTN_1 ;if 3<=R1<14,the first digit should be 1 LD R0,ZERO ADD R0,R0,#1 OUT ;if 3<=R1<14,the second digit should be R1-4 LD R0,ZERO ADD R2,R1,#-4 ADD R0,R0,R2 OUT ;print followed zeros and spaces LATTER LD R0,ZERO OUT OUT LD R0,SPACE OUT OUT ;load back LD R0,STORE_REGISTER0 LD R1,STORE_REGISTER1 LD R2,STORE_REGISTER2 LD R3,STORE_REGISTER3 LD R4,STORE_REGISTER4 LD R5,STORE_REGISTER5 LD R6,STORE_REGISTER6 LD R7,STORE_REGISTER7 RET ;The second subroutine is PRINT_CENTERED. ;A string (the address of the first ASCII character ;in sequence terminated by an ASCII NUL, x00) is passed to your subroutine in R1. ;Your subroutine must print exactly nine characters. ;If the string is longer than nine characters, ;your subroutine must print the first nine characters. ;If the string is shorter than nine characters, ;your subroutine must print additional spaces ;around the string to bring the total length to nine characters. ;If the number of spaces needed is odd, ;the subroutine must use one more leading space than trailing space. PRINT_CENTERED ;store R0-R7 ST R0,STORE_REGISTER0 ST R1,STORE_REGISTER1 ST R2,STORE_REGISTER2 ST R3,STORE_REGISTER3 ST R4,STORE_REGISTER4 ST R5,STORE_REGISTER5 ST R6,STORE_REGISTER6 ST R7,STORE_REGISTER7 ;initialize AND R2,R2,#0 ADD R4,R1,#0;copy R1 to R4 ;count the length of the string COUNT_LENGTH LDR R3,R1,#0;load first character to R3 BRz COMPARE ; check if the string ends ADD R2,R2,#1;the length of the string is stored in R2 ADD R1,R1,#1 BRnzp COUNT_LENGTH ;go to check next character ;compare the length of the string with 9 COMPARE ADD R1,R4,#0;copy the address of the first character to R1 ADD R4,R2,#-9;R4 <- R2-9 BRzp NOT_SMALLER_THAN_9 SMALLER_TAHN_9 NOT R4,R4;R4 <- 9-R2-1 ADD R4,R4,#1;R4 <- 9-R2 AND R5,R5,#0 AND R3,R3,#0 ADD R3,R4,#0;R3 is 9-R2 CULCULATE_SPACE ADD R5,R5,#1;R5 as former spaces counter ADD R4,R4,#-2;R4/2 BRp CULCULATE_SPACE AND R6,R6,#0 ADD R6,R5,R6 ;print former spaces FORMER_SPACE BRz PRINT_STRING LD R0,SPACE OUT ADD R5,R5,#-1 BRnzp FORMER_SPACE ;print string PRINT_STRING ADD R2,R2,#0 BRz LATTER_SPACE1 LDR R0,R1,#0 OUT ADD R1,R1,#1 ADD R2,R2,#-1 BRnzp PRINT_STRING ;print latter spaces LATTER_SPACE1 NOT R6,R6;R6 was the number of former spaces ADD R6,R6,#1 ADD R5,R3,R6;R5 is 9-string length-former spaces length=latter spaces length LATTER_SPACE2 BRz DONE LD R0,SPACE OUT ADD R5,R5,#-1 BRnzp LATTER_SPACE2 NOT_SMALLER_THAN_9 AND R4,R4,#0 ADD R4,R4,#9;R4 as a counter of 9 ;print first 9 characters FIRST_9 BRz DONE LDR R0,R1,#0 ADD R1,R1,#1 OUT ADD R4,R4,#-1 BRnzp FIRST_9 DONE ;load back LD R0,STORE_REGISTER0 LD R1,STORE_REGISTER1 LD R2,STORE_REGISTER2 LD R3,STORE_REGISTER3 LD R4,STORE_REGISTER4 LD R5,STORE_REGISTER5 LD R6,STORE_REGISTER6 LD R7,STORE_REGISTER7 RET SPACE .FILL X20 START_TIME .FILL X36 ZERO .FILL X30 STORE_REGISTER0 .BLKW #1 STORE_REGISTER1 .BLKW #1 STORE_REGISTER2 .BLKW #1 STORE_REGISTER3 .BLKW #1 STORE_REGISTER4 .BLKW #1 STORE_REGISTER5 .BLKW #1 STORE_REGISTER6 .BLKW #1 STORE_REGISTER7 .BLKW #1 .END
tests/024_VARIABLES_-_integer_and_combination_variables__Also_UTF-8.asm
tpisto/pasm
103
1795
; name: VARIABLES - integer and combination variables. Also UTF-8 ; code: "998874c3b66d6d699900880074c3b66d6d699900000000000000880000000000000074c3b66d6d690000338889337700" tommi db 0x99, 0x88, 'tömmi' dw 0x99, 0x88, 'tömmi' dq 0x99, 0x88, 'tömmi' db 0x33, 0x88 dw 0x3389, 0x77
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/access_definition.ads
rose-compiler/rose
488
15965
<gh_stars>100-1000 package acess_definition is Hello : aliased String := "Hi, world."; Hello_Msg : constant access String := Hello'Access; end acess_definition;
programs/oeis/157/A157855.asm
neoneye/loda
22
22139
<filename>programs/oeis/157/A157855.asm ; A157855: 103680000n^2 - 46108800n + 5126401. ; 62697601,327628801,799920001,1479571201,2366582401,3460953601,4762684801,6271776001,7988227201,9912038401,12043209601,14381740801,16927632001,19680883201,22641494401,25809465601,29184796801,32767488001,36557539201,40554950401,44759721601,49171852801,53791344001,58618195201,63652406401,68893977601,74342908801,79999200001,85862851201,91933862401,98212233601,104697964801,111391056001,118291507201,125399318401,132714489601,140237020801,147966912001,155904163201,164048774401,172400745601,180960076801,189726768001,198700819201,207882230401,217271001601,226867132801,236670624001,246681475201,256899686401,267325257601,277958188801,288798480001,299846131201,311101142401,322563513601,334233244801,346110336001,358194787201,370486598401,382985769601,395692300801,408606192001,421727443201,435056054401,448592025601,462335356801,476286048001,490444099201,504809510401,519382281601,534162412801,549149904001,564344755201,579746966401,595356537601,611173468801,627197760001,643429411201,659868422401,676514793601,693368524801,710429616001,727698067201,745173878401,762857049601,780747580801,798845472001,817150723201,835663334401,854383305601,873310636801,892445328001,911787379201,931336790401,951093561601,971057692801,991229184001,1011608035201,1032194246401 seq $0,157853 ; 3600n^2 - 1601n + 178. sub $0,2177 mul $0,28800 add $0,62697601
ADA_RC_Car/src/main.adb
Intelligente-sanntidssystemer/Ada-prosjekt
0
20761
with NRF52_DK.IOs; use NRF52_DK.IOs; with SteeringControl; use SteeringControl; with NRF52_DK.Buttons; use NRF52_DK.Buttons; with NRF52_DK.Time; with car_priorities; procedure Main is begin loop null; end loop; end Main;
solutions/38 - Seek and Destroy 3/size-24_speed-39.asm
michaelgundlach/7billionhumans
45
170491
-- 7 Billion Humans (2053) -- -- 38: Seek and Destroy 3 -- -- Author: soerface -- Size: 24 -- Speed: 39 -- Speed Tests: 39, 39, 39 -- Success Rate: 48/50 mem2 = set nothing a: step n if c < mem2 or mem2 == nothing and c == datacube: mem2 = set c endif if n == wall: if mem2 == nothing: mem1 = nearest shredder step e b: c: if e == nothing: if se == nothing: pickup mem2 giveto mem1 endif jump c endif step e if c < mem2 or mem2 == nothing: mem2 = set c endif jump b endif mem3 = set n pickup mem2 step mem3 drop end else: jump a endif
source/environment/a-bitiva.ads
ytomino/drake
33
21802
<gh_stars>10-100 pragma License (Unrestricted); -- extended unit with Ada.Iterator_Interfaces; private with System; package Ada.Bind_Time_Variables is -- This is similar to Ada.Environment_Variables, -- but reads bind-time variables set by gnatbind -Vkey=val. pragma Preelaborate; function Value (Name : String) return String; function Value (Name : String; Default : String) return String; function Exists (Name : String) return Boolean; procedure Iterate ( Process : not null access procedure (Name, Value : String)); -- Iterators: type Cursor is private; pragma Preelaborable_Initialization (Cursor); function Has_Element (Position : Cursor) return Boolean; pragma Inline (Has_Element); function Name (Position : Cursor) return String; function Value (Position : Cursor) return String; package Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function Iterate return Iterator_Interfaces.Forward_Iterator'Class; private type Cursor is new System.Address; type Iterator is new Iterator_Interfaces.Forward_Iterator with null record; overriding function First (Object : Iterator) return Cursor; overriding function Next (Object : Iterator; Position : Cursor) return Cursor; end Ada.Bind_Time_Variables;
notif.scpt
DumplingYu/Connect
1
3451
on run argv set message to item 1 of argv tell application "System Events" set frontAppName to name of first application process whose frontmost is true end tell if frontAppName is not "Python" then display notification message with title "Connect" sound name "Glass" end if #return frontAppName end run
Drivers/HDD/rmATA.asm
jaredwhitney/os3
5
6739
rmATA.DMAread : ; HBA low = eax, HBA high = bx, length = edx, returns ecx = data buffer push eax push ebx push edx call rmATA.DMAread.storeVals call rmATA.DMAread.getSectorCount call rmATA.DMAread.allocateBuffer call rmATA.DMAread.readData mov ecx, [rmATA.DMAread.dataBuffer] pop edx pop ebx pop eax ret rmATA.DMAread.HBA_low : dd 0x0 rmATA.DMAread.HBA_high : dd 0x0 rmATA.DMAread.byteCount : dd 0x0 rmATA.DMAread.sectorCount : dd 0x0 rmATA.DMAread.dataBuffer : dd 0x0 rmATA.DMAreadToBuffer : ; HBA low = eax, HBA high = bx, length = edx push eax push ebx push edx call rmATA.DMAread.storeVals call rmATA.DMAread.getSectorCount call rmATA.DMAread.readData mov ecx, [rmATA.DMAread.dataBuffer] pop edx pop ebx pop eax rmATA.DMAread.storeVals : pusha mov [rmATA.DMAread.HBA_low], eax and ebx, 0xFFFF mov [rmATA.DMAread.HBA_high], ebx mov [rmATA.DMAread.byteCount], edx popa ret rmATA.DMAread.getSectorCount : pusha mov eax, [rmATA.DMAread.byteCount] mov ecx, 0x200 xor edx, edx idiv ecx add eax, 1 mov [rmATA.DMAread.sectorCount], eax popa ret rmATA.DMAread.allocateBuffer : pusha mov eax, 0x8 ; really need to keep track of these somehow... mov ebx, [rmATA.DMAread.sectorCount] call Guppy.malloc mov [rmATA.DMAread.dataBuffer], ebx popa ret rmATA.DMAread.readData : pusha mov dword [os_RealMode_functionPointer], rmATA.DMAread.loadFunc mov edx, [rmATA.DMAread.sectorCount] mov ebx, [rmATA.DMAread.dataBuffer] rmATA.DMAread.loop : call os.hopToRealMode mov eax, 0x7c00 mov ecx, 0x200 push edx pusha sadfasf : mov edx, [eax] mov [ebx], edx sub ecx, 4 add eax, 4 add ebx, 4 cmp ecx, 0x0 jg sadfasf popa pop edx add ebx, 0x200 mov ecx, [rmATA.DMAread.HBA_low] add ecx, 1 cmp ecx, 0x0 jne rmATA.DMAread.noRollover mov ecx, [rmATA.DMAread.HBA_high] add ecx, 1 mov [rmATA.DMAread.HBA_high], ecx mov ecx, 0x0 rmATA.DMAread.noRollover : mov [rmATA.DMAread.HBA_low], ecx sub edx, 1 cmp edx, 0 jg rmATA.DMAread.loop popa ret rmATA.DMAwrite : ; HBA low = eax, HBA high = bx, length = edx, buffer = ecx pusha call rmATA.DMAread.storeVals call rmATA.DMAread.getSectorCount call rmATA.DMAwrite.writeData popa ret rmATA.DMAwrite.writeData : ; UNTESTED pusha mov dword [os_RealMode_functionPointer], rmATA.DMAwrite.writeFunc mov edx, [rmATA.DMAread.sectorCount] mov eax, [rmATA.DMAread.dataBuffer] rmATA.DMAwrite.loop : mov ebx, 0x7c00 mov ecx, 0x200 push edx mov edx, 1 call Image.copyLinear pop edx call os.hopToRealMode add eax, 0x200 mov ecx, [rmATA.DMAread.HBA_low] add ecx, 1 cmp ecx, 0x0 jne rmATA.DMAwrite.noRollover mov ecx, [rmATA.DMAread.HBA_high] add ecx, 1 mov [rmATA.DMAread.HBA_high], ecx mov ecx, 0x0 rmATA.DMAwrite.noRollover : mov [rmATA.DMAread.HBA_low], ecx sub edx, 1 cmp edx, 0 jg rmATA.DMAwrite.loop popa ret [bits 16] rmATA.DMAread.loadFunc : mov eax, [rmATA.DMAread.HBA_low] mov bx, [rmATA.DMAread.HBA_high] call realMode.ATAload ret rmATA.DMAwrite.writeFunc : mov eax, [rmATA.DMAread.HBA_low] mov bx, [rmATA.DMAread.HBA_high] call realMode.ATAwrite ret [bits 32]
libsrc/_DEVELOPMENT/adt/wa_priority_queue/c/sccz80/wa_priority_queue_clear.asm
jpoikela/z88dk
640
93049
<filename>libsrc/_DEVELOPMENT/adt/wa_priority_queue/c/sccz80/wa_priority_queue_clear.asm<gh_stars>100-1000 ; void wa_priority_queue_clear(wa_priority_queue_t *q) SECTION code_clib SECTION code_adt_wa_priority_queue PUBLIC wa_priority_queue_clear EXTERN asm_wa_priority_queue_clear defc wa_priority_queue_clear = asm_wa_priority_queue_clear ; SDCC bridge for Classic IF __CLASSIC PUBLIC _wa_priority_queue_clear defc _wa_priority_queue_clear = wa_priority_queue_clear ENDIF
chrome/browser/ui/cocoa/applescript/examples/copy_html.applescript
zealoussnow/chromium
14,668
2537
<filename>chrome/browser/ui/cocoa/applescript/examples/copy_html.applescript -- Copyright (c) 2010 The Chromium Authors. All rights reserved. -- Use of this source code is governed by a BSD-style license that can be -- found in the LICENSE file. -- This script copies the HTML of a tab to a TextEdit document. tell application "Chromium" tell tab 1 of window 1 to view source repeat while (loading of tab 2 of window 1) end repeat tell tab 2 of window 1 to select all tell tab 2 of window 1 to copy selection end tell tell application "TextEdit" set text of document 1 to the clipboard end tell
oeis/120/A120730.asm
neoneye/loda-programs
11
14118
<gh_stars>10-100 ; A120730: Another version of Catalan triangle A009766. ; Submitted by <NAME> ; 1,0,1,0,1,1,0,0,2,1,0,0,2,3,1,0,0,0,5,4,1,0,0,0,5,9,5,1,0,0,0,0,14,14,6,1,0,0,0,0,14,28,20,7,1,0,0,0,0,0,42,48,27,8,1,0,0,0,0,0,42,90,75,35,9,1 lpb $0 add $1,1 sub $0,$1 mov $2,$1 sub $2,$0 lpe bin $1,$0 add $0,1 mul $2,$1 div $2,$0 trn $1,$2 mov $0,$1
Compilador/Ejemplos/Multiplicacion.asm
Jouna77/8086VCPU
0
102589
<filename>Compilador/Ejemplos/Multiplicacion.asm<gh_stars>0 MUL AX MUL BX MUL CX MUL DX MUL Ah MUL Al MUL Bh MUL Bl
third_party/virtualbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TrapSystemCallHandler.asm
Fimbure/icebox-1
521
241752
<reponame>Fimbure/icebox-1<filename>third_party/virtualbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TrapSystemCallHandler.asm ; $Id: bs3-mode-TrapSystemCallHandler.asm $ ;; @file ; BS3Kit - System call trap handler. ; ; ; Copyright (C) 2007-2017 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; ; you can redistribute it and/or modify it under the terms of the GNU ; General Public License (GPL) as published by the Free Software ; Foundation, in version 2 as it comes in the "COPYING" file of the ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. ; ; The contents of this file may alternatively be used under the terms ; of the Common Development and Distribution License Version 1.0 ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the ; VirtualBox OSE distribution, in which case the provisions of the ; CDDL are applicable instead of those of the GPL. ; ; You may elect to license modified versions of this file under the ; terms and conditions of either the GPL or the CDDL or both. ; ;********************************************************************************************************************************* ;* Header Files * ;********************************************************************************************************************************* %include "bs3kit-template-header.mac" ;********************************************************************************************************************************* ;* External Symbols * ;********************************************************************************************************************************* BS3_EXTERN_DATA16 g_bBs3CurrentMode %if TMPL_BITS != 64 BS3_EXTERN_DATA16 g_uBs3CpuDetected %endif %if TMPL_BITS == 16 BS3_EXTERN_DATA16 g_uBs3TrapEipHint %endif TMPL_BEGIN_TEXT BS3_EXTERN_CMN Bs3SelProtFar32ToFlat32 BS3_EXTERN_CMN Bs3RegCtxConvertToRingX BS3_EXTERN_CMN Bs3RegCtxRestore BS3_EXTERN_CMN Bs3Panic BS3_BEGIN_TEXT16 extern Bs3PrintStrN_c16_CX_Bytes_At_DS_SI TMPL_BEGIN_TEXT ;; ; System call handler. ; ; This is an assembly trap handler that is called in response to a system call ; request from 'user' code. The only fixed parameter is [ER]AX which contains ; the system call number. Other registers are assigned on a per system call ; basis, ditto for which registers are preserved and which are used to return ; stuff. Generally, though, we preserve all registers not used as return ; values or otherwise implicitly transformed by the call. ; ; Note! The 16-bit versions of this code must be careful with using extended ; registers as we wish this code to work on real 80286 (maybe even 8086) ; CPUs too! ; BS3_PROC_BEGIN_MODE Bs3TrapSystemCallHandler, BS3_PBC_NEAR ; Near because we'll probably only ever need this from CGROUP16. ; ; This prologue is kind of complicated because of 80286 and older CPUs ; as well as different requirements for 64-bit and the other modes. ; %define VAR_CALLER_BP [xBP] %if TMPL_BITS != 64 %define VAR_CALLER_DS [xBP - xCB] %endif %define VAR_CALLER_BX [xBP - sCB*1 - xCB] ; Note! the upper word is not clean on pre-386 (16-bit mode). %define VAR_CALLER_AX [xBP - sCB*2 - xCB] %define VAR_CALLER_CX [xBP - sCB*3 - xCB] %define VAR_CALLER_DX [xBP - sCB*4 - xCB] %define VAR_CALLER_SI [xBP - sCB*5 - xCB] %define VAR_CALLER_SI_HI [xBP - sCB*5 - xCB + 2] %define VAR_CALLER_DI [xBP - sCB*6 - xCB] %define VAR_CALLER_DI_HI [xBP - sCB*6 - xCB + 2] %if TMPL_BITS == 16 %define VAR_CALLER_EBP [xBP - sCB*7 - xCB] %define VAR_CALLER_ESP [xBP - sCB*8 - xCB] %define VAR_CALLER_EFLAGS [xBP - sCB*9 - xCB] %define VAR_CALLER_MODE [xBP - sCB*9 - xCB*2] %define BP_TOP_STACK_EXPR xBP - sCB*9 - xCB*2 %else %define VAR_CALLER_MODE [xBP - sCB*6 - xCB*2] %define BP_TOP_STACK_EXPR xBP - sCB*6 - xCB*2 %endif push xBP mov xBP, xSP %if TMPL_BITS == 64 push 0 mov [rsp+2], es mov [rsp], ds %else push ds %ifdef TMPL_CMN_R86 push BS3_SEL_DATA16 %else push RT_CONCAT(BS3_SEL_R0_DS,TMPL_BITS) %endif pop ds ; DS = BS3KIT_GRPNM_DATA16 or FLAT and we can safely access data %if TMPL_BITS == 16 && (TMPL_MODE == BS3_MODE_RM || TMPL_MODE == BS3_MODE_PE16) cmp byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80286 jbe .prologue_pre_80386 %endif %endif push sBX push sAX push sCX push sDX push sSI push sDI %if TMPL_BITS == 16 push ebp push esp pushfd %if TMPL_MODE == BS3_MODE_RM || TMPL_MODE == BS3_MODE_PE16 jmp .prologue_end .prologue_pre_80386: push bx ; dummy push bx xor bx, bx push bx ; dummy push ax push bx ; dummy push cx push bx ; dummy push dx push bx ; dummy push si push bx ; dummy push di sub sp, 0ch ; dummy %endif %endif .prologue_end: ; ; VAR_CALLER_MODE: Save the current mode (important for v8086 with 16-bit kernel). ; xor xBX, xBX mov bl, [BS3_DATA16_WRT(g_bBs3CurrentMode)] push xBX ; ; Dispatch the system call. ; cmp ax, BS3_SYSCALL_LAST ja .invalid_syscall %if TMPL_BITS == 16 mov bx, ax shl bx, 1 jmp word [cs:.aoffSyscallHandlers + bx] %else movzx ebx, ax mov ebx, [.aoffSyscallHandlers + ebx * 4] jmp xBX %endif .aoffSyscallHandlers: %ifdef TMPL_16BIT dw .invalid_syscall wrt CGROUP16 dw .print_chr wrt CGROUP16 dw .print_str wrt CGROUP16 dw .to_ringX wrt CGROUP16 dw .to_ringX wrt CGROUP16 dw .to_ringX wrt CGROUP16 dw .to_ringX wrt CGROUP16 dw .restore_ctx wrt CGROUP16 %else dd .invalid_syscall wrt FLAT dd .print_chr wrt FLAT dd .print_str wrt FLAT dd .to_ringX wrt FLAT dd .to_ringX wrt FLAT dd .to_ringX wrt FLAT dd .to_ringX wrt FLAT dd .restore_ctx wrt FLAT %endif ; ; Invalid system call. ; .invalid_syscall: int3 jmp .return ; ; Print char in the CL register. ; ; We use the vga bios teletype interrupt to do the writing, so we must ; be in some kind of real mode for this to work. 16-bit code segment ; requried for the mode switching code. ; BS3_BEGIN_TEXT16 BS3_SET_BITS TMPL_BITS .print_chr: %if TMPL_BITS != 64 push es mov di, ss ; Must save and restore SS for supporting 16/32 and 32/16 caller/kernel ring-0 combinations. %endif %ifndef TMPL_CMN_R86 ; Switch to real mode (20h param scratch area not required). extern TMPL_NM(Bs3SwitchToRM) call TMPL_NM(Bs3SwitchToRM) BS3_SET_BITS 16 %endif ; Print the character, turning '\n' into '\r\n'. cmp cl, 0ah ; \n je .print_chr_newline mov ah, 0eh mov al, cl mov bx, 0ff00h int 10h jmp .print_chr_done .print_chr_newline: mov ax, 0e0dh ; cmd + \r mov bx, 0ff00h int 10h mov ax, 0e0ah ; cmd + \n mov bx, 0ff00h int 10h .print_chr_done: %ifndef TMPL_CMN_R86 ; Switch back (20h param scratch area not required). extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) BS3_SET_BITS TMPL_BITS %endif %if TMPL_BITS != 64 mov ss, di pop es %endif jmp .return TMPL_BEGIN_TEXT ; ; Prints DX chars from the string pointed to by CX:xSI to the screen. ; ; We use the vga bios teletype interrupt to do the writing, so we must ; be in some kind of real mode for this to work. The string must be ; accessible from real mode too. ; .print_str: %if TMPL_BITS != 64 push es %endif ; Convert the incoming pointer to real mode (assuming caller checked ; that real mode can access it). call .convert_ptr_arg_to_real_mode_ax_si mov cx, VAR_CALLER_DX ; Switch to real mode (no 20h scratch required) %ifndef TMPL_CMN_R86 %if TMPL_BITS != 16 jmp .print_str_to_16bit BS3_BEGIN_TEXT16 .print_str_to_16bit: BS3_SET_BITS TMPL_BITS %endif extern TMPL_NM(Bs3SwitchToRM) call TMPL_NM(Bs3SwitchToRM) BS3_SET_BITS 16 %endif ; Call code in Bs3PrintStrN to do the work. mov ds, ax call Bs3PrintStrN_c16_CX_Bytes_At_DS_SI ; Switch back (20h param scratch area not required). %ifndef TMPL_CMN_R86 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) %if TMPL_BITS != 16 BS3_SET_BITS TMPL_BITS jmp .print_str_end TMPL_BEGIN_TEXT %endif .print_str_end: %endif %if TMPL_BITS != 64 pop es %endif jmp .return ; ; Switch the caller to ring-0, ring-1, ring-2 or ring-3. ; ; This implement this by saving the entire register context, calling ; a transformation function (C) and restoring the modified register ; context using a generic worker. ; .to_ringX: sub xSP, BS3REGCTX_size mov xBX, xSP ; xBP = BS3REGCTX pointer. call .save_context %if TMPL_BITS == 32 ; Convert xBP to flat pointer in 32-bit push ss push xBX call Bs3SelProtFar32ToFlat32 add sSP, 8 mov xBX, xAX %endif push xBX ; Save pointer for the final restore call. ; Convert the register context from whatever it is to ring-0. BONLY64 sub rsp, 10h mov ax, VAR_CALLER_AX sub ax, BS3_SYSCALL_TO_RING0 push xAX BONLY16 push ss push xBX BS3_CALL Bs3RegCtxConvertToRingX, 2 add xSP, sCB + xCB BS3_ONLY_64BIT(+ 10h) ; Restore the register context (does not return). pop xBX ; restore saved pointer. BONLY64 sub rsp, 18h BONLY16 push ss push xBX BS3_CALL Bs3RegCtxRestore, 1 jmp Bs3Panic ; ; Restore context pointed to by cx:xSI. ; .restore_ctx: call .convert_ptr_arg_to_cx_xSI BONLY64 sub rsp, 10h mov xDX, VAR_CALLER_DX push xDX BONLY16 push cx push xSI BS3_CALL Bs3RegCtxRestore, 2 jmp Bs3Panic ; ; Return. ; .return: pop xBX ; saved mode mov [BS3_DATA16_WRT(g_bBs3CurrentMode)], bl %if TMPL_BITS == 16 and bl, BS3_MODE_CODE_MASK cmp bl, BS3_MODE_CODE_V86 je .return_to_v8086_from_16bit_krnl cmp bl, BS3_MODE_CODE_32 je .return_to_32bit_from_16bit_krnl %if TMPL_MODE == BS3_MODE_RM || TMPL_MODE == BS3_MODE_PE16 cmp byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80286 jbe .return_pre_80386 %endif popfd pop esp pop ebp %endif pop sDI pop sSI pop sDX pop sCX pop sAX pop sBX %if TMPL_BITS != 64 pop ds leave iret %else mov es, [rsp+2] mov ds, [rsp] leave ; skips ds iretq %endif %if TMPL_BITS == 16 %if TMPL_MODE == BS3_MODE_RM || TMPL_MODE == BS3_MODE_PE16 ; Variant of the above for 80286 and older. .return_pre_80386: add sp, 0ch pop di pop bx ; dummy pop si pop bx ; dummy pop dx pop bx ; dummy pop cx pop bx ; dummy pop ax pop bx ; dummy pop bx ; pushed twice pop bx pop ds pop bp iret %endif .return_to_v8086_from_16bit_krnl: int3 jmp .return_to_v8086_from_16bit_krnl ; ; Returning to 32-bit code may require us to expand and seed the eip ; and esp addresses in the iret frame since these are truncated when ; using a 16-bit interrupt handler. ; ; Incoming stack: New stack diff cpl: ; bp + 0ah: [ss] ; bp + 08h: [sp] bx + 38h: [ss] New stack same cpl: ; bp + 06h: flags ; bp + 04h: cs bx + 34h: [esp] bx + 30h: eflags ; bp + 02h: ip ; -------------- bx + 30h: eflags bx + 2ch: cs ; bp + 00h: bp ; bp - 02h: ds bx + 2ch: cs bx + 28h: eip ; ------------- ; bp - 06h: ebx bx + 28h: eip bx + 26h: bp ; -------------- bx + 24h: ds ; bp - 0ah: eax bx + 26h: bp ; bx + 24h: ds bx + 20h: ebx ; bp - 0eh: ecx ; bx + 20h: ebx bx + 1ch: eax ; bp - 12h: edx ; bx + 1ch: eax bx + 18h: ecx ; bp - 16h: esi ; bx + 18h: ecx bx + 14h: edx ; bp - 1ah: edi ; bx + 14h: edx bx + 10h: esi ; bp - 1eh: esp ; bx + 10h: esi bx + 0ch: edi ; bp - 22h: ebp ; bx + 0ch: edi bx + 08h: esp ; bp - 26h: eflags ; bx + 08h: esp bx + 04h: ebp ; ; bx + 04h: ebp bx + 00h: eflags ; ; bx + 00h: eflags ; ; ; If we're returning to the same CPL, we're still using the stack of ; the 32-bit caller. The high ESP word does not need restoring. ; ; If we're returning to a lower CPL, there on a 16-bit ring-0 stack, ; however, the high ESP word is still that of the caller. ; .return_to_32bit_from_16bit_krnl: mov ax, cs and al, 3 mov ah, 3 and ah, [xBP + xCB*2] ; The iret frame doubles in size, so allocate more stack. cmp al, ah je .return_to_32bit_from_16bit_krnl_same_cpl_sub_sp sub sp, 2*2 .return_to_32bit_from_16bit_krnl_same_cpl_sub_sp: sub sp, 3*2 mov bx, sp ; Copy the saved registers. xor di, di .return_to_32bit_from_16bit_krnl_copy_loop: mov ecx, [bp + di - 26h] mov [ss:bx + di], ecx add di, 4 cmp di, 28h jb .return_to_32bit_from_16bit_krnl_copy_loop ; Convert the 16-bit iret frame to a 32-bit iret frame. mov ecx, [BS3_DATA16_WRT(g_uBs3TrapEipHint)] mov cx, [bp + 02h] ; ip mov [ss:bx + 28h], ecx mov ecx, 0f00d0000h mov cx, [bp + 04h] ; cs mov [ss:bx + 2ch], ecx mov ecx, [ss:bx] ; caller eflags mov cx, [bp + 06h] ; flags mov [ss:bx + 30h], ecx cmp al, ah jz .return_to_32bit_from_16bit_krnl_do_return mov ecx, [ss:bx + 08h] ; caller esp mov cx, [bp + 08h] ; sp mov [ss:bx + 34h], ecx mov ecx, 0f00d0000h mov cx, [bp + 0ah] ; ss mov [ss:bx + 38h], ecx .return_to_32bit_from_16bit_krnl_do_return: popfd pop ecx ; esp - only the high bits! mov cx, sp mov esp, ecx pop ebp lea bp, [bx + 26h] pop edi pop esi pop edx pop ecx pop eax pop ebx pop ds leave iretd %endif ; 16-bit ; ; Internal function. ss:xBX = Pointer to register frame (BS3REGCTX). ; @uses xAX ; .save_context: %if TMPL_BITS == 16 cmp byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80386 jae .save_context_full ; ; 80286 or earlier. ; ; Clear the state area first. push di xor di, di .save_context_16_clear_loop: mov word [ss:bx + di], 0 mov word [ss:bx + di + 2], 0 mov word [ss:bx + di + 4], 0 mov word [ss:bx + di + 6], 0 add di, 8 cmp di, BS3REGCTX_size jb .save_context_16_clear_loop pop di ; Do the 8086/80186/80286 state saving. mov ax, VAR_CALLER_AX mov [ss:bx + BS3REGCTX.rax], ax mov cx, VAR_CALLER_CX mov [ss:bx + BS3REGCTX.rcx], ax mov ax, VAR_CALLER_DX mov [ss:bx + BS3REGCTX.rdx], ax mov ax, VAR_CALLER_BX mov [ss:bx + BS3REGCTX.rbx], ax mov [ss:bx + BS3REGCTX.rsi], si mov [ss:bx + BS3REGCTX.rdi], di mov ax, VAR_CALLER_BP mov [ss:bx + BS3REGCTX.rbp], ax mov ax, VAR_CALLER_DS mov [ss:bx + BS3REGCTX.ds], ax mov [ss:bx + BS3REGCTX.es], es mov ax, [xBP + xCB] mov [ss:bx + BS3REGCTX.rip], ax mov ax, [xBP + xCB*2] mov [ss:bx + BS3REGCTX.cs], ax and al, X86_SEL_RPL mov [ss:bx + BS3REGCTX.bCpl], al cmp al, 0 je .save_context_16_same mov ax, [xBP + xCB*4] mov [ss:bx + BS3REGCTX.rsp], ax mov ax, [xBP + xCB*5] mov [ss:bx + BS3REGCTX.ss], ax jmp .save_context_16_done_stack .save_context_16_same: mov ax, bp add ax, xCB * (1 + 3) mov [ss:bx + BS3REGCTX.rsp], ax mov ax, ss mov [ss:bx + BS3REGCTX.ss], ax .save_context_16_done_stack: mov ax, [xBP + xCB*3] mov [ss:bx + BS3REGCTX.rflags], ax mov al, VAR_CALLER_MODE mov [ss:bx + BS3REGCTX.bMode], al cmp byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80286 jne .save_context_16_return smsw [ss:bx + BS3REGCTX.cr0] str [ss:bx + BS3REGCTX.tr] sldt [ss:bx + BS3REGCTX.ldtr] .save_context_16_return: or byte [ss:bx + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_AMD64 | BS3REG_CTX_F_NO_CR4 ret %endif ; TMPL_BITS == 16 ; ; 80386 or later. ; .save_context_full: ; Clear the state area. push xDI xor xDI, xDI AssertCompileSizeAlignment(BS3REGCTX, 16) .save_context_full_clear_loop: %if TMPL_BITS != 64 mov dword [ss:xBX + xDI], 0 mov dword [ss:xBX + xDI + 4], 0 add xDI, 8 %else mov qword [xBX + xDI], 0 mov qword [xBX + xDI + 8], 0 add xDI, 10h %endif cmp xDI, BS3REGCTX_size jb .save_context_full_clear_loop pop xDI ; Do the 386+ state saving. %if TMPL_BITS == 16 ; save the high word of registered pushed on the stack. mov ecx, VAR_CALLER_AX mov [ss:bx + BS3REGCTX.rax], ecx mov ecx, VAR_CALLER_CX mov [ss:bx + BS3REGCTX.rcx], ecx mov ecx, VAR_CALLER_DX mov [ss:bx + BS3REGCTX.rdx], ecx mov ecx, VAR_CALLER_BX mov [ss:bx + BS3REGCTX.rbx], ecx mov ecx, VAR_CALLER_EBP mov [ss:bx + BS3REGCTX.rbp], ecx mov ecx, VAR_CALLER_ESP mov [ss:bx + BS3REGCTX.rsp], ecx mov ecx, VAR_CALLER_SI mov [ss:bx + BS3REGCTX.rsi], ecx mov ecx, VAR_CALLER_DI mov [ss:bx + BS3REGCTX.rdi], ecx mov ecx, VAR_CALLER_EFLAGS mov [ss:bx + BS3REGCTX.rflags], ecx ; Seed high EIP word if 32-bit CS. lar ecx, [bp + 4] jnz .save_context_full_done_16bit_high_word test ecx, X86LAR_F_D jz .save_context_full_done_16bit_high_word mov ecx, [BS3_DATA16_WRT(g_uBs3TrapEipHint)] mov [ss:bx + BS3REGCTX.rip], ecx .save_context_full_done_16bit_high_word: %endif ; 16-bit mov xAX, VAR_CALLER_AX mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rax], xAX mov xCX, VAR_CALLER_CX mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rcx], xCX mov xAX, VAR_CALLER_DX mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rdx], xAX mov xAX, VAR_CALLER_BX mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rbx], xAX mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rsi], sSI mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rdi], sDI mov xAX, VAR_CALLER_BP mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rbp], xAX %if TMPL_BITS != 64 mov ax, VAR_CALLER_DS mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ds], ax %else mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ds], ds %endif mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.es], es mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.fs], fs mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.gs], gs mov xAX, [xBP + xCB] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rip], xAX mov ax, [xBP + xCB*2] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.cs], ax %if TMPL_MODE != BS3_MODE_RM and al, X86_SEL_RPL mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.bCpl], al cmp al, 0 je .save_context_full_same mov xAX, [xBP + xCB*4] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rsp], xAX mov ax, [xBP + xCB*5] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ss], ax jmp .save_context_full_done_stack %else mov byte [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.bCpl], 0 %endif .save_context_full_same: mov xAX, xBP add xAX, xCB * (1 + 3) mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rsp], xAX mov ax, ss mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ss], ax .save_context_full_done_stack: mov xAX, [xBP + xCB*3] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rflags], xAX mov al, VAR_CALLER_MODE mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.bMode], al %if TMPL_BITS == 64 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r8], r8 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r9], r9 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r10], r10 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r11], r11 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r12], r12 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r13], r13 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r14], r14 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.r15], r15 %endif str [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.tr] sldt [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ldtr] mov sAX, cr0 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.cr0], sAX mov sAX, cr2 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.cr2], sAX mov sAX, cr3 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.cr3], sAX %if TMPL_BITS != 64 test byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], (BS3CPU_F_CPUID >> 8) jnz .have_cr4 or byte [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR4 jmp .done_cr4 .have_cr4: %endif mov sAX, cr4 mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.cr4], sAX %if TMPL_BITS != 64 .done_cr4: or byte [ss:xBX + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_AMD64 ; Deal with extended v8086 frame. %if TMPL_BITS == 32 test dword [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rflags], X86_EFL_VM jz .save_context_full_return %else test byte VAR_CALLER_MODE, BS3_MODE_CODE_V86 jz .save_context_full_return mov dword [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rflags], X86_EFL_VM %endif mov xAX, [xBP + xCB*4] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.rsp], xAX mov ax, [xBP + xCB*5] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ss], ax mov ax, [xBP + xCB*6] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.es], ax mov ax, [xBP + xCB*7] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.ds], ax mov ax, [xBP + xCB*8] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.fs], ax mov ax, [xBP + xCB*9] mov [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.gs], ax mov byte [BS3_NOT_64BIT(ss:) xBX + BS3REGCTX.bCpl], 3 jmp .save_context_full_return %endif ; !64-bit .save_context_full_return: ret %if TMPL_BITS == 16 CPU 286 %endif ; ; Internal function for converting a syscall pointer parameter (cx:xSI) ; to a pointer we can use here in this context. ; ; Returns the result in cx:xSI. ; @uses xAX, xCX, xDX ; .convert_ptr_arg_to_cx_xSI: call .convert_ptr_arg_to_flat %if TMPL_BITS == 16 ; Convert to tiled address. mov si, ax ; offset. shl dx, X86_SEL_SHIFT add dx, BS3_SEL_TILED mov cx, dx %else ; Just supply a flat selector. mov xSI, xAX mov cx, ds %endif ret ; ; Internal function for converting a syscall pointer parameter (caller CX:xSI) ; to a real mode pointer. ; ; Returns the result in AX:SI. ; @uses xAX, xCX, xDX ; .convert_ptr_arg_to_real_mode_ax_si: call .convert_ptr_arg_to_flat mov si, ax %if TMPL_BITS == 16 mov ax, dx %else shr eax, 16 %endif shl ax, 12 ret ; ; Internal function for the above that wraps the Bs3SelProtFar32ToFlat32 call. ; ; @returns eax (32-bit, 64-bit), dx+ax (16-bit). ; @uses eax, ecx, edx ; .convert_ptr_arg_to_flat: %if TMPL_BITS == 16 ; Convert to (32-bit) flat address first. test byte VAR_CALLER_MODE, BS3_MODE_CODE_V86 jz .convert_ptr_arg_to_flat_prot_16 mov ax, VAR_CALLER_CX mov dx, ax shl ax, 4 shr dx, 12 add ax, VAR_CALLER_SI adc dx, 0 ret .convert_ptr_arg_to_flat_prot_16: push es push bx push word VAR_CALLER_CX ; selector xor ax, ax test byte VAR_CALLER_MODE, BS3_MODE_CODE_16 jnz .caller_is_16_bit mov ax, VAR_CALLER_SI_HI .caller_is_16_bit: push ax ; offset high push word VAR_CALLER_SI ; offset low call Bs3SelProtFar32ToFlat32 add sp, 2*3 pop bx pop es ret %else ; 32 or 64 bit test byte VAR_CALLER_MODE, BS3_MODE_CODE_V86 jz .convert_ptr_arg_to_cx_xSI_prot ; Convert real mode address to flat address and return it. movzx eax, word VAR_CALLER_CX shl eax, 4 movzx edx, word VAR_CALLER_SI add eax, edx ret ; Convert to (32-bit) flat address. .convert_ptr_arg_to_cx_xSI_prot: %if TMPL_BITS == 64 push r11 push r10 push r9 push r8 sub rsp, 10h %endif movzx ecx, word VAR_CALLER_CX push xCX mov eax, VAR_CALLER_SI test byte VAR_CALLER_MODE, BS3_MODE_CODE_16 jz .no_masking_offset and eax, 0ffffh .no_masking_offset: push xAX BS3_CALL Bs3SelProtFar32ToFlat32,2 add xSP, xCB*2 BS3_ONLY_64BIT(+ 10h) %if TMPL_BITS == 64 pop r8 pop r9 pop r10 pop r11 %endif %endif ret BS3_PROC_END_MODE Bs3TrapSystemCallHandler
Assembler/RACFCMDS.asm
MinionSas/Mainframe
0
4675
RACFCMDS TITLE 'RACFCMDS - IRREVX01 EXIT ROUTINE' *********************************************************************** *********************************************************************** *** *** *** MODULE - RACFCMDS *** *** *** *** An IRREVX01 command exit routine *** *** *** *** This exit is invoked with most RACF commands. The only *** *** commands which don't use this exit are BLKUPD, RVARY, *** *** RACDCERT, RACMAP, RACLINK, RACPRIV. *** *** *** *** For all other commands, only specific users will be *** *** allowed to enter those commands. *** *** *** *** Users with SPECIAL attribute are allowed to issue all *** *** RACF commands. Users with AUDITOR attribute will be *** *** allowed to enter READ only commands. All other users *** *** are not allowed to issue any RACF commands. *** *** *** *** REQUIREMENTS: *** *** 1. The exit routine must be added to the IRREVX01 exit *** *** point via OS/390(MVS) Dynamic Exit Services. For *** *** the routine to take effect at IPL time, have an *** *** entry in the PROGxx member of SYS1.PARMLIB, as *** *** pointed to by PROG= in the IEASYSxx member of *** *** SYS1.PARMLIB. See OS/390(MVS) Initialization and *** *** Tuning Reference for details. *** *** *** *** EXAMPLE: *** *** In the PROGxx member: *** *** EXIT ADD *** *** EXITNAME(IRREVX01) *** *** MODNAME(RACFCMDS) *** *** STATE(ACTIVE) *** *** Or from the console: *** *** SETPROG EXIT,ADD,EXITNAME=IRREVX01,MODNAME=RACFCMDS *** *** *** *** RETURN CODES: *** *** 0 - If user is allowed. *** *** 8 - If user is rejected. *** *** *** *********************************************************************** *********************************************************************** EJECT SPACE 2 *********************************************************************** *********************************************************************** *** *** *** MAPPING MACROS MACRO LIBRARY *** *** -------------- ------------- *** *** IRREVXP SYS1.MODGEN *** *** IHAACEE SYS1.MACLIB *** *** IHASDWA SYS1.MACLIB *** *** *** *** LOAD MODULE NAME SYSTEM LIBRARY *** *** ---------------- -------------- *** *** RACFCMDS (RENT,REFR) LINKLIB concatenation *** *** AMODE(31) RMODE(ANY) *** *** *** *********************************************************************** *********************************************************************** EJECT RACFCMDS CSECT , an IRREVX01 exit routine RACFCMDS AMODE 31 RACFCMDS RMODE ANY RACFCMDS CSECT SAVE (14,12),,RACFCMDS-&SYSDATE-&SYSTIME LR R12,R15 program addressability USING RACFCMDS,R12 set base register LR R10,R1 save parameter address USING EVXPL,R10 base parameter map USING ACEE,R3 temporarily R3 bases ACEE SR R7,R7 initialize return code register * * check if ACEE addr available(i.e. not from RACF parameter library) * L R3,EVXACEE load ACEE address LTR R3,R3 Do we have an ACEE? BNZ PRECHCK yes - continue checking B RETURN quick return * * * check if this is a pre-exit invocation * PRECHCK L R4,EVXFLAGS TM 0(R4),EVXPRE pre-exit ? BNO RETURN No - post-processing, then exit * * * check for SPECIAL , PRIVILEGED, and AUDITOR attributes * SPECCHCK TM ACEEFLG1,ACEESPEC Is this a special user? BO RETURN yes - no more checking done TM ACEEFLG1,ACEEPRIV Privileged? BO RETURN yes - no more checking done * * Get user's ID and verify if it's in user table * XR R8,R8 LA R8,AUTHNAME AUTHLOOP CLI 0(R8),X'FF' END OF AUTHNAME TABLE? BE AUDITCHK YES, GET OUT CLC 0(8,R8),ACEEUSRI IS THIS USER IN THE TABLE BE RETURN YES, GO DO THE REST LA R8,8(,R8) INCREMENT TO NEXT ENTRY B AUTHLOOP LOOP UNTIL DONE * * Check for auditor * AUDITCHK TM ACEEFLG1,ACEEAUDT Auditor? BO COMMCHCK yes - check the command used TM ACEEFLG1,ACEEROA Read-Only Auditor? BO COMMCHCK yes - check the command used B BADRC no - user not allowed * * * if the command specified is one of the following, do nothing * * LISTDSD, LISTGRP, LISTUSER, RLIST, SEARCH * COMMCHCK L R5,EVXCALLR TM 0(R5),EVXSETRO Is this SETROPTS? BO RETURN yes - no more checking, exit TM 0(R5),EVXPERMI Is this PERMIT? BO BADRC yes - exit with bad RC TM 0(R5),EVXLISTD Is this LISTDSD? BO RETURN yes - no more checking, exit TM 0(R5),EVXLISTG Is this LISTGRP? BO RETURN yes - no more checking, exit TM 0(R5),EVXLISTU Is this LISTUSER? BO RETURN yes - no more checking, exit TM 0(R5),EVXRLIST Is this RLIST? BO RETURN yes - no more checking, exit TM 0(R5),EVXSEARC Is this SEARCH? BO RETURN yes - no more checking, exit * * * Bad return code 8. User cannot issue the command. * BADRC L R6,EVXMSSG load address of additional text MVC MSGINFO+5(8),ACEEUSRI get user id MVC 0(MSGINFOL,R6),MSGINFO copy the text in LA R7,8 * * * return back * RETURN EQU * WTO 'IRREXV01 Exit has been entered.',ROUTCDE=(11) LR R15,R7 copy return code RETURN (14,12),T,RC=(15) EJECT * * * List of special users who can issue commands * AUTHNAME DS 0CL8 DC CL8'USERID1 ' DC CL8'USERID2 ' AUTHNEND DC 8XL1'FF' * * Output message information * MSGINFO DC C'User is not allowed to issue the command.' MSGINFOL EQU *-MSGINFO LTORG * * * equates * R0 EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R4 EQU 4 R5 EQU 5 R6 EQU 6 R7 EQU 7 R8 EQU 8 R9 EQU 9 R10 EQU 10 R11 EQU 11 R12 EQU 12 R13 EQU 13 R14 EQU 14 R15 EQU 15 * * * mappings * IRREVXP EJECT IHAACEE EJECT ICHRUTKN EJECT IHASDWA END RACFCMDS
programs/oeis/084/A084009.asm
karttu/loda
1
97233
<reponame>karttu/loda ; A084009: a(n) = n^2 concatenated with reverse(n^2) divided by 11. ; 0,1,4,9,151,232,333,454,586,738,9091,11011,13131,15451,17881,20502,23332,26362,29493,32833,36364,40104,44044,48175,52425,56866,61516,66357,71317,76468,81819,87379,931291,990891,1051501,1114111,1178811 pow $0,2 cal $0,71271 ; Duplicate of A066492. mov $1,$0
modules/taskman/tm_head.nasm
r-tty/radios
0
1657
<gh_stars>0 ;------------------------------------------------------------------------------- ; tm_head.nasm - module header. ;------------------------------------------------------------------------------- module $taskman %include "module.ah" exportdata ModuleInfo section .data ModuleInfo: instance tModInfoTag field(Signature, DD RBM_SIGNATURE) field(ModVersion, DD 1) field(ModType, DB MODTYPE_KERNEL) field(Flags, DB 0) field(OStype, DW 1) field(OSversion, DD 0) field(Base, DD -1) field(Entry, DD -1) iend