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 |
|---|---|---|---|---|
libsrc/target/bit90/input/in_Inkey.asm | Frodevan/z88dk | 640 | 94077 | <gh_stars>100-1000
; uint in_Inkey(void)
; 06.2018 suborb
; Read current state of keyboard
SECTION code_clib
PUBLIC in_Inkey
PUBLIC _in_Inkey
EXTERN in_keytranstbl
EXTERN CLIB_KEYBOARD_ADDRESS
; exit : carry set and HL = 0 for no keys registered
; else HL = ASCII character code
; uses : AF,BC,DE,HL
;
; TRS80/EACA2000 uses memory mapped keyboard ports
.in_Inkey
._in_Inkey
ld de,0
ld b,8 ;modifiers are on last row...
inc hl
loop:
ld a,8
sub b
rlca
rlca
rlca
rlca
out ($e0),a
in a,($c0)
cpl
and a
jr nz,gotkey
ld a,e
add 8
ld e,a
djnz loop
nokey:
ld hl,0
scf
ret
gotkey:
; a = key pressed
; e = offset
ld c,8
hitkey_loop:
rrca
jr c,doneinc
inc e
dec c
jr nz,hitkey_loop
doneinc:
; Check for shift and control
ld a,@01110000 ;Select modifier row
out ($e0),a
in a,($c0)
ld bc, 64 * 2
bit 5,a ;Control
jr z, got_modifier
ld bc, 64
bit 0,a
jr z,got_modifier
ld bc,0
got_modifier:
ld hl,in_keytranstbl
add hl,bc
add hl,de
ld a,(hl)
cp 255
jr z, nokey
ld l,a
ld h,0
and a
ret
|
oeis/017/A017087.asm | neoneye/loda-programs | 11 | 245117 | <reponame>neoneye/loda-programs
; A017087: a(n) = (8*n + 1)^11.
; 1,31381059609,34271896307633,2384185791015625,50542106513726817,550329031716248441,3909821048582988049,20635899893042801193,87507831740087890625,313726685568359708377,984770902183611232881,2775173073766990340489,7153014030880804126753,17103393581163134765625,38358611506121121577937,81402749386839761113321,164621598066108688876929,319099584516184696444313,595728015903604931640625,1075488420943298174695497,1884016215314563749249761,3211838877954855105157369,5342025170319974613513873
mul $0,8
add $0,1
pow $0,11
|
programs/oeis/082/A082845.asm | karttu/loda | 1 | 94813 | ; A082845: Partial sums of A082844.
; 2,5,7,10,12,14,17,19,22,24,26,29,31,34,36,39,41,43,46,48,51,53,55,58,60,63,65,68,70,72,75,77,80,82,84,87,89,92,94,96,99,101,104,106,109,111,113,116,118,121,123,125,128,130,133,135,138,140,142,145,147,150,152
add $0,2
mul $0,70
div $0,29
mov $1,$0
sub $1,2
|
src/test/resources/data/potests/test23.asm | cpcitor/mdlz80optimizer | 36 | 87529 | ; Test case: making sure pre-processor parses code correctly (this case didn't work in an early version)
IFDEF symbol
ld b,1
ld c,2
ELSE
ld b,3
ld c,4
ENDIF
ld (symbol),bc
end:
jp end
symbol:
dw 0
|
data/pokemon/base_stats/monferno.asm | AtmaBuster/pokeplat-gen2 | 6 | 8137 | <filename>data/pokemon/base_stats/monferno.asm
db 0 ; species ID placeholder
db 64, 78, 52, 81, 78, 52
; hp atk def spd sat sdf
db FIRE, FIGHTING ; type
db 45 ; catch rate
db 142 ; base exp
db NO_ITEM, NO_ITEM ; items
db GENDER_F12_5 ; gender ratio
db 20 ; step cycles to hatch
INCBIN "gfx/pokemon/monferno/front.dimensions"
db GROWTH_MEDIUM_SLOW ; growth rate
dn EGG_GROUND, EGG_HUMANSHAPE ; egg groups
db 70 ; happiness
; tm/hm learnset
tmhm FOCUS_PUNCH, TOXIC, BULK_UP, HIDDEN_POWER, SUNNY_DAY, TAUNT, PROTECT, FRUSTRATION, IRON_TAIL, RETURN, DIG, BRICK_BREAK, DOUBLE_TEAM, FLAMETHROWER, FIRE_BLAST, ROCK_TOMB, AERIAL_ACE, TORMENT, FACADE, SECRET_POWER, REST, ATTRACT, OVERHEAT, FOCUS_BLAST, FLING, ENDURE, WILL_O_WISP, SHADOW_CLAW, SWORDS_DANCE, STEALTH_ROCK, CAPTIVATE, ROCK_SLIDE, SLEEP_TALK, NATURAL_GIFT, POISON_JAB, GRASS_KNOT, SWAGGER, U_TURN, SUBSTITUTE, CUT, STRENGTH, ROCK_SMASH, ROCK_CLIMB, ENDEAVOR, FIRE_PUNCH, GUNK_SHOT, HEAT_WAVE, HELPING_HAND, MUD_SLAP, ROLLOUT, SNORE, SWIFT, THUNDERPUNCH, VACUUM_WAVE
; end
|
src/svd/sam_svd-nvmctrl.ads | Fabien-Chouteau/samd51-hal | 1 | 6460 | <reponame>Fabien-Chouteau/samd51-hal<gh_stars>1-10
pragma Style_Checks (Off);
-- This spec has been automatically generated from ATSAMD51G19A.svd
pragma Restrictions (No_Elaboration_Code);
with HAL;
with System;
package SAM_SVD.NVMCTRL is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Write Mode
type CTRLA_WMODESelect is
(-- Manual Write
MAN,
-- Automatic Double Word Write
ADW,
-- Automatic Quad Word
AQW,
-- Automatic Page Write
AP)
with Size => 2;
for CTRLA_WMODESelect use
(MAN => 0,
ADW => 1,
AQW => 2,
AP => 3);
-- Power Reduction Mode during Sleep
type CTRLA_PRMSelect is
(-- NVM block enters low-power mode when entering standby mode. NVM block
-- enters low-power mode when SPRM command is issued. NVM block exits
-- low-power mode upon first access.
SEMIAUTO,
-- NVM block enters low-power mode when entering standby mode. NVM block
-- enters low-power mode when SPRM command is issued. NVM block exits
-- low-power mode when system is not in standby mode.
FULLAUTO,
-- NVM block does not enter low-power mode when entering standby mode. NVM
-- block enters low-power mode when SPRM command is issued. NVM block exits
-- low-power mode upon first access.
MANUAL)
with Size => 2;
for CTRLA_PRMSelect use
(SEMIAUTO => 0,
FULLAUTO => 1,
MANUAL => 3);
subtype NVMCTRL_CTRLA_RWS_Field is HAL.UInt4;
-- NVMCTRL_CTRLA_AHBNS array
type NVMCTRL_CTRLA_AHBNS_Field_Array is array (0 .. 1) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for NVMCTRL_CTRLA_AHBNS
type NVMCTRL_CTRLA_AHBNS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- AHBNS as a value
Val : HAL.UInt2;
when True =>
-- AHBNS as an array
Arr : NVMCTRL_CTRLA_AHBNS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for NVMCTRL_CTRLA_AHBNS_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- NVMCTRL_CTRLA_CACHEDIS array
type NVMCTRL_CTRLA_CACHEDIS_Field_Array is array (0 .. 1) of Boolean
with Component_Size => 1, Size => 2;
-- Type definition for NVMCTRL_CTRLA_CACHEDIS
type NVMCTRL_CTRLA_CACHEDIS_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- CACHEDIS as a value
Val : HAL.UInt2;
when True =>
-- CACHEDIS as an array
Arr : NVMCTRL_CTRLA_CACHEDIS_Field_Array;
end case;
end record
with Unchecked_Union, Size => 2;
for NVMCTRL_CTRLA_CACHEDIS_Field use record
Val at 0 range 0 .. 1;
Arr at 0 range 0 .. 1;
end record;
-- Control A
type NVMCTRL_CTRLA_Register is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- Auto Wait State Enable
AUTOWS : Boolean := True;
-- Suspend Enable
SUSPEN : Boolean := False;
-- Write Mode
WMODE : CTRLA_WMODESelect := SAM_SVD.NVMCTRL.MAN;
-- Power Reduction Mode during Sleep
PRM : CTRLA_PRMSelect := SAM_SVD.NVMCTRL.SEMIAUTO;
-- NVM Read Wait States
RWS : NVMCTRL_CTRLA_RWS_Field := 16#0#;
-- Force AHB0 access to NONSEQ, burst transfers are continuously
-- rearbitrated
AHBNS : NVMCTRL_CTRLA_AHBNS_Field :=
(As_Array => False, Val => 16#0#);
-- AHB0 Cache Disable
CACHEDIS : NVMCTRL_CTRLA_CACHEDIS_Field :=
(As_Array => False, Val => 16#0#);
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_CTRLA_Register use record
Reserved_0_1 at 0 range 0 .. 1;
AUTOWS at 0 range 2 .. 2;
SUSPEN at 0 range 3 .. 3;
WMODE at 0 range 4 .. 5;
PRM at 0 range 6 .. 7;
RWS at 0 range 8 .. 11;
AHBNS at 0 range 12 .. 13;
CACHEDIS at 0 range 14 .. 15;
end record;
-- Command
type CTRLB_CMDSelect is
(-- Erase Page - Only supported in the USER and AUX pages.
EP,
-- Erase Block - Erases the block addressed by the ADDR register, not
-- supported in the user page
EB,
-- Write Page - Writes the contents of the page buffer to the page addressed
-- by the ADDR register, not supported in the user page
WP,
-- Write Quad Word - Writes a 128-bit word at the location addressed by the
-- ADDR register.
WQW,
-- Software Reset - Power-Cycle the NVM memory and replay the device automatic
-- calibration procedure and resets the module configuration registers
SWRST,
-- Lock Region - Locks the region containing the address location in the ADDR
-- register.
LR,
-- Unlock Region - Unlocks the region containing the address location in the
-- ADDR register.
UR,
-- Sets the power reduction mode.
SPRM,
-- Clears the power reduction mode.
CPRM,
-- Page Buffer Clear - Clears the page buffer.
PBC,
-- Set Security Bit
SSB,
-- Bank swap and system reset, if SMEE is used also reallocate SMEE data into
-- the opposite BANK
BKSWRST,
-- Chip Erase Lock - DSU.CE command is not available
CELCK,
-- Chip Erase Unlock - DSU.CE command is available
CEULCK,
-- Sets STATUS.BPDIS, Boot loader protection is discarded until CBPDIS is
-- issued or next start-up sequence
SBPDIS,
-- Clears STATUS.BPDIS, Boot loader protection is not discarded
CBPDIS,
-- Activate SmartEEPROM Sector 0, deactivate Sector 1
ASEES0,
-- Activate SmartEEPROM Sector 1, deactivate Sector 0
ASEES1,
-- Starts SmartEEPROM sector reallocation algorithm
SEERALOC,
-- Flush SMEE data when in buffered mode
SEEFLUSH,
-- Lock access to SmartEEPROM data from any mean
LSEE,
-- Unlock access to SmartEEPROM data
USEE,
-- Lock access to the SmartEEPROM Register Address Space (above 64KB)
LSEER,
-- Unlock access to the SmartEEPROM Register Address Space (above 64KB)
USEER)
with Size => 7;
for CTRLB_CMDSelect use
(EP => 0,
EB => 1,
WP => 3,
WQW => 4,
SWRST => 16,
LR => 17,
UR => 18,
SPRM => 19,
CPRM => 20,
PBC => 21,
SSB => 22,
BKSWRST => 23,
CELCK => 24,
CEULCK => 25,
SBPDIS => 26,
CBPDIS => 27,
ASEES0 => 48,
ASEES1 => 49,
SEERALOC => 50,
SEEFLUSH => 51,
LSEE => 52,
USEE => 53,
LSEER => 54,
USEER => 55);
-- Command Execution
type CTRLB_CMDEXSelect is
(-- Reset value for the field
CTRLB_CMDEXSelect_Reset,
-- Execution Key
KEY)
with Size => 8;
for CTRLB_CMDEXSelect use
(CTRLB_CMDEXSelect_Reset => 0,
KEY => 165);
-- Control B
type NVMCTRL_CTRLB_Register is record
-- Write-only. Command
CMD : CTRLB_CMDSelect := SAM_SVD.NVMCTRL.EP;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Write-only. Command Execution
CMDEX : CTRLB_CMDEXSelect := CTRLB_CMDEXSelect_Reset;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_CTRLB_Register use record
CMD at 0 range 0 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
CMDEX at 0 range 8 .. 15;
end record;
subtype NVMCTRL_PARAM_NVMP_Field is HAL.UInt16;
-- Page Size
type PARAM_PSZSelect is
(-- 8 bytes
Val_8,
-- 16 bytes
Val_16,
-- 32 bytes
Val_32,
-- 64 bytes
Val_64,
-- 128 bytes
Val_128,
-- 256 bytes
Val_256,
-- 512 bytes
Val_512,
-- 1024 bytes
Val_1024)
with Size => 3;
for PARAM_PSZSelect use
(Val_8 => 0,
Val_16 => 1,
Val_32 => 2,
Val_64 => 3,
Val_128 => 4,
Val_256 => 5,
Val_512 => 6,
Val_1024 => 7);
-- SmartEEPROM Supported
type PARAM_SEESelect is
(-- 0 bytes
Val_0,
-- 16384 bytes
Val_1,
-- 32768 bytes
Val_2,
-- 49152 bytes
Val_3,
-- 65536 bytes
Val_4,
-- 81920 bytes
Val_5,
-- 98304 bytes
Val_6,
-- 114688 bytes
Val_7,
-- 131072 bytes
Val_8,
-- 147456 bytes
Val_9,
-- 163840 bytes
A)
with Size => 1;
for PARAM_SEESelect use
(Val_0 => 0,
Val_1 => 1,
Val_2 => 2,
Val_3 => 3,
Val_4 => 4,
Val_5 => 5,
Val_6 => 6,
Val_7 => 7,
Val_8 => 8,
Val_9 => 9,
A => 10);
-- NVM Parameter
type NVMCTRL_PARAM_Register is record
-- Read-only. NVM Pages
NVMP : NVMCTRL_PARAM_NVMP_Field;
-- Read-only. Page Size
PSZ : PARAM_PSZSelect;
-- unspecified
Reserved_19_30 : HAL.UInt12;
-- Read-only. SmartEEPROM Supported
SEE : PARAM_SEESelect;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVMCTRL_PARAM_Register use record
NVMP at 0 range 0 .. 15;
PSZ at 0 range 16 .. 18;
Reserved_19_30 at 0 range 19 .. 30;
SEE at 0 range 31 .. 31;
end record;
-- Interrupt Enable Clear
type NVMCTRL_INTENCLR_Register is record
-- Command Done Interrupt Clear
DONE : Boolean := False;
-- Address Error
ADDRE : Boolean := False;
-- Programming Error Interrupt Clear
PROGE : Boolean := False;
-- Lock Error Interrupt Clear
LOCKE : Boolean := False;
-- ECC Single Error Interrupt Clear
ECCSE : Boolean := False;
-- ECC Dual Error Interrupt Clear
ECCDE : Boolean := False;
-- NVM Error Interrupt Clear
NVME : Boolean := False;
-- Suspended Write Or Erase Interrupt Clear
SUSP : Boolean := False;
-- Active SEES Full Interrupt Clear
SEESFULL : Boolean := False;
-- Active SEES Overflow Interrupt Clear
SEESOVF : Boolean := False;
-- SEE Write Completed Interrupt Clear
SEEWRC : Boolean := False;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_INTENCLR_Register use record
DONE at 0 range 0 .. 0;
ADDRE at 0 range 1 .. 1;
PROGE at 0 range 2 .. 2;
LOCKE at 0 range 3 .. 3;
ECCSE at 0 range 4 .. 4;
ECCDE at 0 range 5 .. 5;
NVME at 0 range 6 .. 6;
SUSP at 0 range 7 .. 7;
SEESFULL at 0 range 8 .. 8;
SEESOVF at 0 range 9 .. 9;
SEEWRC at 0 range 10 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
end record;
-- Interrupt Enable Set
type NVMCTRL_INTENSET_Register is record
-- Command Done Interrupt Enable
DONE : Boolean := False;
-- Address Error Interrupt Enable
ADDRE : Boolean := False;
-- Programming Error Interrupt Enable
PROGE : Boolean := False;
-- Lock Error Interrupt Enable
LOCKE : Boolean := False;
-- ECC Single Error Interrupt Enable
ECCSE : Boolean := False;
-- ECC Dual Error Interrupt Enable
ECCDE : Boolean := False;
-- NVM Error Interrupt Enable
NVME : Boolean := False;
-- Suspended Write Or Erase Interrupt Enable
SUSP : Boolean := False;
-- Active SEES Full Interrupt Enable
SEESFULL : Boolean := False;
-- Active SEES Overflow Interrupt Enable
SEESOVF : Boolean := False;
-- SEE Write Completed Interrupt Enable
SEEWRC : Boolean := False;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_INTENSET_Register use record
DONE at 0 range 0 .. 0;
ADDRE at 0 range 1 .. 1;
PROGE at 0 range 2 .. 2;
LOCKE at 0 range 3 .. 3;
ECCSE at 0 range 4 .. 4;
ECCDE at 0 range 5 .. 5;
NVME at 0 range 6 .. 6;
SUSP at 0 range 7 .. 7;
SEESFULL at 0 range 8 .. 8;
SEESOVF at 0 range 9 .. 9;
SEEWRC at 0 range 10 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
end record;
-- Interrupt Flag Status and Clear
type NVMCTRL_INTFLAG_Register is record
-- Command Done
DONE : Boolean := False;
-- Address Error
ADDRE : Boolean := False;
-- Programming Error
PROGE : Boolean := False;
-- Lock Error
LOCKE : Boolean := False;
-- ECC Single Error
ECCSE : Boolean := False;
-- ECC Dual Error
ECCDE : Boolean := False;
-- NVM Error
NVME : Boolean := False;
-- Suspended Write Or Erase Operation
SUSP : Boolean := False;
-- Active SEES Full
SEESFULL : Boolean := False;
-- Active SEES Overflow
SEESOVF : Boolean := False;
-- SEE Write Completed
SEEWRC : Boolean := False;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_INTFLAG_Register use record
DONE at 0 range 0 .. 0;
ADDRE at 0 range 1 .. 1;
PROGE at 0 range 2 .. 2;
LOCKE at 0 range 3 .. 3;
ECCSE at 0 range 4 .. 4;
ECCDE at 0 range 5 .. 5;
NVME at 0 range 6 .. 6;
SUSP at 0 range 7 .. 7;
SEESFULL at 0 range 8 .. 8;
SEESOVF at 0 range 9 .. 9;
SEEWRC at 0 range 10 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
end record;
-- Boot Loader Protection Size
type STATUS_BOOTPROTSelect is
(-- 120 kbytes
Val_120,
-- 112 kbytes
Val_112,
-- 104 kbytes
Val_104,
-- 96 kbytes
Val_96,
-- 88 kbytes
Val_88,
-- 80 kbytes
Val_80,
-- 72 kbytes
Val_72,
-- 64 kbytes
Val_64,
-- 56 kbytes
Val_56,
-- 48 kbytes
Val_48,
-- 40 kbytes
Val_40,
-- 32 kbytes
Val_32,
-- 24 kbytes
Val_24,
-- 16 kbytes
Val_16,
-- 8 kbytes
Val_8,
-- 0 kbytes
Val_0)
with Size => 4;
for STATUS_BOOTPROTSelect use
(Val_120 => 0,
Val_112 => 1,
Val_104 => 2,
Val_96 => 3,
Val_88 => 4,
Val_80 => 5,
Val_72 => 6,
Val_64 => 7,
Val_56 => 8,
Val_48 => 9,
Val_40 => 10,
Val_32 => 11,
Val_24 => 12,
Val_16 => 13,
Val_8 => 14,
Val_0 => 15);
-- Status
type NVMCTRL_STATUS_Register is record
-- Read-only. Ready to accept a command
READY : Boolean;
-- Read-only. Power Reduction Mode
PRM : Boolean;
-- Read-only. NVM Page Buffer Active Loading
LOAD : Boolean;
-- Read-only. NVM Write Or Erase Operation Is Suspended
SUSP : Boolean;
-- Read-only. BANKA First
AFIRST : Boolean;
-- Read-only. Boot Loader Protection Disable
BPDIS : Boolean;
-- unspecified
Reserved_6_7 : HAL.UInt2;
-- Read-only. Boot Loader Protection Size
BOOTPROT : STATUS_BOOTPROTSelect;
-- unspecified
Reserved_12_15 : HAL.UInt4;
end record
with Volatile_Full_Access, Object_Size => 16,
Bit_Order => System.Low_Order_First;
for NVMCTRL_STATUS_Register use record
READY at 0 range 0 .. 0;
PRM at 0 range 1 .. 1;
LOAD at 0 range 2 .. 2;
SUSP at 0 range 3 .. 3;
AFIRST at 0 range 4 .. 4;
BPDIS at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
BOOTPROT at 0 range 8 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
end record;
subtype NVMCTRL_ADDR_ADDR_Field is HAL.UInt24;
-- Address
type NVMCTRL_ADDR_Register is record
-- NVM Address
ADDR : NVMCTRL_ADDR_ADDR_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVMCTRL_ADDR_Register use record
ADDR at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- Page Buffer Load Data x
-- Page Buffer Load Data x
type NVMCTRL_PBLDATA_Registers is array (0 .. 1) of HAL.UInt32;
subtype NVMCTRL_ECCERR_ADDR_Field is HAL.UInt24;
-- Low Double-Word Error Type
type ECCERR_TYPELSelect is
(-- No Error Detected Since Last Read
None,
-- At Least One Single Error Detected Since last Read
Single,
-- At Least One Dual Error Detected Since Last Read
Dual)
with Size => 2;
for ECCERR_TYPELSelect use
(None => 0,
Single => 1,
Dual => 2);
-- High Double-Word Error Type
type ECCERR_TYPEHSelect is
(-- No Error Detected Since Last Read
None,
-- At Least One Single Error Detected Since last Read
Single,
-- At Least One Dual Error Detected Since Last Read
Dual)
with Size => 2;
for ECCERR_TYPEHSelect use
(None => 0,
Single => 1,
Dual => 2);
-- ECC Error Status Register
type NVMCTRL_ECCERR_Register is record
-- Read-only. Error Address
ADDR : NVMCTRL_ECCERR_ADDR_Field;
-- unspecified
Reserved_24_27 : HAL.UInt4;
-- Read-only. Low Double-Word Error Type
TYPEL : ECCERR_TYPELSelect;
-- Read-only. High Double-Word Error Type
TYPEH : ECCERR_TYPEHSelect;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVMCTRL_ECCERR_Register use record
ADDR at 0 range 0 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
TYPEL at 0 range 28 .. 29;
TYPEH at 0 range 30 .. 31;
end record;
-- Debug Control
type NVMCTRL_DBGCTRL_Register is record
-- Debugger ECC Read Disable
ECCDIS : Boolean := False;
-- Debugger ECC Error Tracking Mode
ECCELOG : Boolean := False;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for NVMCTRL_DBGCTRL_Register use record
ECCDIS at 0 range 0 .. 0;
ECCELOG at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
end record;
-- Write Mode
type SEECFG_WMODESelect is
(-- A NVM write command is issued after each write in the pagebuffer
UNBUFFERED,
-- A NVM write command is issued when a write to a new page is requested
BUFFERED)
with Size => 1;
for SEECFG_WMODESelect use
(UNBUFFERED => 0,
BUFFERED => 1);
-- SmartEEPROM Configuration Register
type NVMCTRL_SEECFG_Register is record
-- Write Mode
WMODE : SEECFG_WMODESelect := SAM_SVD.NVMCTRL.UNBUFFERED;
-- Automatic Page Reallocation Disable
APRDIS : Boolean := False;
-- unspecified
Reserved_2_7 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 8,
Bit_Order => System.Low_Order_First;
for NVMCTRL_SEECFG_Register use record
WMODE at 0 range 0 .. 0;
APRDIS at 0 range 1 .. 1;
Reserved_2_7 at 0 range 2 .. 7;
end record;
subtype NVMCTRL_SEESTAT_SBLK_Field is HAL.UInt4;
subtype NVMCTRL_SEESTAT_PSZ_Field is HAL.UInt3;
-- SmartEEPROM Status Register
type NVMCTRL_SEESTAT_Register is record
-- Read-only. Active SmartEEPROM Sector
ASEES : Boolean;
-- Read-only. Page Buffer Loaded
LOAD : Boolean;
-- Read-only. Busy
BUSY : Boolean;
-- Read-only. SmartEEPROM Write Access Is Locked
LOCK : Boolean;
-- Read-only. SmartEEPROM Write Access To Register Address Space Is
-- Locked
RLOCK : Boolean;
-- unspecified
Reserved_5_7 : HAL.UInt3;
-- Read-only. Blocks Number In a Sector
SBLK : NVMCTRL_SEESTAT_SBLK_Field;
-- unspecified
Reserved_12_15 : HAL.UInt4;
-- Read-only. SmartEEPROM Page Size
PSZ : NVMCTRL_SEESTAT_PSZ_Field;
-- unspecified
Reserved_19_31 : HAL.UInt13;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for NVMCTRL_SEESTAT_Register use record
ASEES at 0 range 0 .. 0;
LOAD at 0 range 1 .. 1;
BUSY at 0 range 2 .. 2;
LOCK at 0 range 3 .. 3;
RLOCK at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
SBLK at 0 range 8 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
PSZ at 0 range 16 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Non-Volatile Memory Controller
type NVMCTRL_Peripheral is record
-- Control A
CTRLA : aliased NVMCTRL_CTRLA_Register;
-- Control B
CTRLB : aliased NVMCTRL_CTRLB_Register;
-- NVM Parameter
PARAM : aliased NVMCTRL_PARAM_Register;
-- Interrupt Enable Clear
INTENCLR : aliased NVMCTRL_INTENCLR_Register;
-- Interrupt Enable Set
INTENSET : aliased NVMCTRL_INTENSET_Register;
-- Interrupt Flag Status and Clear
INTFLAG : aliased NVMCTRL_INTFLAG_Register;
-- Status
STATUS : aliased NVMCTRL_STATUS_Register;
-- Address
ADDR : aliased NVMCTRL_ADDR_Register;
-- Lock Section
RUNLOCK : aliased HAL.UInt32;
-- Page Buffer Load Data x
PBLDATA : aliased NVMCTRL_PBLDATA_Registers;
-- ECC Error Status Register
ECCERR : aliased NVMCTRL_ECCERR_Register;
-- Debug Control
DBGCTRL : aliased NVMCTRL_DBGCTRL_Register;
-- SmartEEPROM Configuration Register
SEECFG : aliased NVMCTRL_SEECFG_Register;
-- SmartEEPROM Status Register
SEESTAT : aliased NVMCTRL_SEESTAT_Register;
end record
with Volatile;
for NVMCTRL_Peripheral use record
CTRLA at 16#0# range 0 .. 15;
CTRLB at 16#4# range 0 .. 15;
PARAM at 16#8# range 0 .. 31;
INTENCLR at 16#C# range 0 .. 15;
INTENSET at 16#E# range 0 .. 15;
INTFLAG at 16#10# range 0 .. 15;
STATUS at 16#12# range 0 .. 15;
ADDR at 16#14# range 0 .. 31;
RUNLOCK at 16#18# range 0 .. 31;
PBLDATA at 16#1C# range 0 .. 63;
ECCERR at 16#24# range 0 .. 31;
DBGCTRL at 16#28# range 0 .. 7;
SEECFG at 16#2A# range 0 .. 7;
SEESTAT at 16#2C# range 0 .. 31;
end record;
-- Non-Volatile Memory Controller
NVMCTRL_Periph : aliased NVMCTRL_Peripheral
with Import, Address => NVMCTRL_Base;
end SAM_SVD.NVMCTRL;
|
other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/runed2.asm | prismotizm/gigaleak | 0 | 12050 | <filename>other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/risc.lzh/risc/join/runed2.asm
Name: runed2.asm
Type: file
Size: 19055
Last-Modified: '1992-11-18T01:42:32Z'
SHA-1: D8069438A5423D5A97FD3E594E505B155D12855F
Description: null
|
oeis/122/A122877.asm | neoneye/loda-programs | 11 | 92215 | <reponame>neoneye/loda-programs
; A122877: Expansion of (1-2*x-3*x^2-(1-x)*sqrt(1-2*x-7*x^2))/(8*x^3).
; Submitted by <NAME>
; 0,1,2,7,20,65,206,679,2248,7569,25690,88055,303964,1056497,3693158,12977655,45813008,162400609,577843890,2063053991,7388487460,26535797729,95552015614,344897769991,1247685613272,4522871712625,16426878290186,59768340842007,217827134881132,795117720008465,2906617219479190,10640039006762711,38999844337446944,143124847368129473,525860499059737954,1934205355061894215,7121744523669997620,26248174849848156289,96832148459206210862,357542866726277637223,1321315414053471298280,4886947990932744376913
mov $14,$0
mov $15,2
lpb $15
mov $0,$14
sub $0,1
mov $10,$0
mov $11,0
mov $12,2
sub $15,1
lpb $12
mov $0,$10
mov $7,0
sub $12,1
add $0,$12
sub $0,1
mov $6,$0
mov $8,2
lpb $8
mov $0,$6
mov $2,0
mov $5,0
sub $8,1
add $0,$8
add $0,1
mov $1,1
mov $3,$0
mov $4,1
lpb $3
mul $1,$3
sub $3,1
mul $1,$3
add $5,$4
div $1,$5
add $2,$1
sub $3,1
add $4,1
lpe
mov $0,$2
mov $9,$8
mul $9,$2
add $7,$9
lpe
min $6,1
mul $6,$0
mov $0,$7
sub $0,$6
mov $13,$12
mul $13,$0
add $11,$13
lpe
lpe
mov $0,$11
div $0,2
|
oeis/020/A020131.asm | neoneye/loda-programs | 11 | 82178 | ; A020131: Ceiling of GAMMA(n+3/4)/GAMMA(3/4).
; Submitted by <NAME>
; 1,1,2,4,14,65,370,2496,19339,169215,1649844,17735823,208395916,2657047924,36534408954,538882532061,8487399879955,142163947989233,2523410076808877,47313938940166439,934450294068287158
max $0,1
mov $1,1
mov $3,1
lpb $0
mul $1,3
mov $2,$0
sub $0,1
mul $2,12
sub $2,3
mul $1,$2
mul $3,36
lpe
div $1,$3
mov $0,$1
add $0,1
|
test/Succeed/Issue2240.agda | cruhland/agda | 1,989 | 4801 | <reponame>cruhland/agda
module _ where
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
postulate
A : Set
module _ (X : Set) where
macro
give : Name → Term → TC ⊤
give x goal = unify (def x []) goal
B : Set
B = give A
|
Library/Mailbox/Outbox/outboxC.asm | steakknife/pcgeos | 504 | 162243 | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Geoworks 1994 -- All Rights Reserved
PROJECT: Clavin
MODULE: Outbox
FILE: outboxC.asm
AUTHOR: <NAME>, Nov 22, 1994
ROUTINES:
Name Description
---- -----------
MAILBOXSETCANCELACTION
REVISION HISTORY:
Name Date Description
---- ---- -----------
CL 11/22/94 Initial revision
DESCRIPTION:
C Interface
$Id: outboxC.asm,v 1.1 97/04/05 01:21:22 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetGeosConvention
C_Mailbox segment resource
COMMENT @----------------------------------------------------------------------
C FUNCTION: MailboxSetCancelAction
C DECLARATION: void (optr destination, Message messageToSend)
KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
CHL 11/94 Initial version
------------------------------------------------------------------------------@
MAILBOXSETCANCELACTION proc far destination:optr,
messageToSend:word
uses si
.enter
movdw bxsi, destination
mov ax, messageToSend
call MailboxSetCancelAction
.leave
ret
MAILBOXSETCANCELACTION endp
C_Mailbox ends
SetDefaultConvention
|
libsrc/_DEVELOPMENT/stdio/z80/__stdio_file_deallocate.asm | jpoikela/z88dk | 640 | 246957 |
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_stdio
PUBLIC __stdio_file_deallocate
EXTERN __stdio_closed_file_list, asm_p_forward_list_alt_push_front
__stdio_file_deallocate:
; push FILE onto front of closed list
;
; This function undoes __stdio_file_allocate where a
; previously retrieved FILE* must be returned due
; to failed open. The returned FILE* is placed back
; onto the front of the closed list to maintain an
; LRU ordering.
;
; When a FILE is closed, the returned FILE* should
; be appended to the back of the closed list. This
; is done by fclose which is the only place where
; FILEs are closed.
;
; enter : de = FILE *
;
; uses : bc, de
push af
push hl
dec de
dec de ; de = & FILE.link
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $04
EXTERN __stdio_lock_file_list
push de
call __stdio_lock_file_list
pop de
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ld bc,__stdio_closed_file_list
call asm_p_forward_list_alt_push_front
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_MULTITHREAD & $04
EXTERN __stdio_unlock_file_list
call __stdio_unlock_file_list
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
pop hl
pop af
ret
|
src/z80asm/dev/z80asm_lib/adc_hl_bc.asm | jg1uaa/z88dk | 2 | 12491 | ; Substitute for the z80 adc hl,bc instruction
; CPU Min T Max T
; 8080 47 52
; 8085 48 51
; gbz80 36 44
; r2k 4 4
; z180 10 10
; z80 15 15
; z80n 15 15
SECTION code_crt0_sccz80
PUBLIC __z80asm__adc_hl_bc
__z80asm__adc_hl_bc:
jr nc, carry0
inc hl
carry0:
add hl, bc
ret
|
libsrc/gfx/wide/w_clga_callee.asm | ahjelm/z88dk | 640 | 89810 | <filename>libsrc/gfx/wide/w_clga_callee.asm
;Usage: clga(int tlx, int tly, int tlx2, int tly2)
IF !__CPU_INTEL__
SECTION code_graphics
PUBLIC clga_callee
PUBLIC _clga_callee
PUBLIC asm_clga
EXTERN w_respixel
EXTERN w_area
EXTERN swapgfxbk
EXTERN __graphics_end
INCLUDE "graphics/grafix.inc"
.clga_callee
._clga_callee
pop af
pop de
pop hl
exx ; w_plotpixel and swapgfxbk must not use the alternate registers, no problem with w_line_r
pop de
pop hl
push af ; ret addr
exx
.asm_clga
push ix
IF NEED_swapgfxbk = 1
call swapgfxbk
ENDIF
ld ix,w_respixel
call w_area
IF NEED_swapgfxbk
jp __graphics_end
ELSE
IF !__CPU_INTEL__ & !__CPU_GBZ80__
pop ix
ENDIF
ret
ENDIF
ENDIF
|
src/Categories/Pseudofunctor/Instance/EnrichedUnderlying.agda | MirceaS/agda-categories | 0 | 7648 | <gh_stars>0
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category using () renaming (Category to Setoid-Category)
open import Categories.Category.Monoidal using (Monoidal)
module Categories.Pseudofunctor.Instance.EnrichedUnderlying
{o ℓ e} {V : Setoid-Category o ℓ e} (M : Monoidal V) (v : Level) where
-- The "forgetful" functor from V-enriched categories to their
-- underlying Setoid-categories.
open import Data.Product as Prod using (_,_)
open import Categories.Bicategory.Instance.Cats
open import Categories.Bicategory.Instance.EnrichedCats M
open import Categories.Enriched.Category M
open import Categories.Enriched.Functor M
open import Categories.Enriched.NaturalTransformation M
import Categories.Morphism.Reasoning as MorphismReasoning
open import Categories.NaturalTransformation using (ntHelper)
open import Categories.NaturalTransformation.NaturalIsomorphism using (niHelper)
open import Categories.Pseudofunctor using (Pseudofunctor)
private
module V = Setoid-Category V
module UnderlyingReasoning {c} (C : Category c) where
open Underlying C public hiding (id)
open HomReasoning public
open MorphismReasoning (Underlying C) public
open NaturalTransformation using (_[_])
-- Aliases used to shorten some proof expressions
module UF = UnderlyingFunctor
infixr 14 _$₀_ _$₁_
_$₀_ = UF.F₀
_$₁_ = UF.F₁
-- The "forgetful" pseudofunctor mapping a V-enriched category to its
-- underlying Setoid-category.
--
-- Note that all the equational reasoning happens in the underlying
-- (ordinary) categories!
EnrichedUnderlying : Pseudofunctor (EnrichedCats v) (Cats v ℓ e)
EnrichedUnderlying = record
{ P₀ = Underlying
; P₁ = record
{ F₀ = UnderlyingFunctor
; F₁ = UnderlyingNT
; identity = V.Equiv.refl
; homomorphism = V.Equiv.refl
; F-resp-≈ = λ eq → eq
}
; P-identity = λ {C} →
let module C = Underlying C
open UnderlyingReasoning C
in niHelper record
{ η = λ _ → ntHelper record
{ η = λ _ → C.id
; commute = λ f → begin
C.id ∘ f ≈⟨ identityˡ ⟩
f ≈˘⟨ identityʳ ○ V.identityˡ ⟩
(V.id V.∘ f) ∘ C.id ∎
}
; η⁻¹ = λ _ → ntHelper record
{ η = λ _ → C.id
; commute = λ f → begin
C.id ∘ (V.id V.∘ f) ≈⟨ identityˡ ○ V.identityˡ ⟩
f ≈˘⟨ identityʳ ⟩
f ∘ C.id ∎
}
; commute = λ _ → V.Equiv.refl
; iso = λ _ → record { isoˡ = C.identityˡ ; isoʳ = C.identityʳ }
}
; P-homomorphism = λ {C D E} →
let module C = Underlying C
module D = Underlying D
module E = Underlying E
open UnderlyingReasoning E
in niHelper record
{ η = λ{ (F , G) → ntHelper record
{ η = λ _ → E.id
; commute = λ f → begin
E.id ∘ F $₁ G $₁ f ≈⟨ id-comm-sym ⟩
F $₁ G $₁ f ∘ E.id ≈˘⟨ V.assoc ⟩∘⟨refl ⟩
(F ∘F G) $₁ f ∘ E.id ∎
} }
; η⁻¹ = λ{ (F , G) → ntHelper record
{ η = λ _ → E.id
; commute = λ f → begin
E.id ∘ (F ∘F G) $₁ f ≈⟨ id-comm-sym ⟩
(F ∘F G) $₁ f ∘ E.id ≈⟨ V.assoc ⟩∘⟨refl ⟩
F $₁ G $₁ f ∘ E.id ∎
} }
; commute = λ _ → id-comm-sym
; iso = λ _ → record { isoˡ = E.identityˡ ; isoʳ = E.identityʳ }
}
; unitaryˡ = λ {_ D} →
let module D = Underlying D
open UnderlyingReasoning D
in begin
D.id ∘ D.id ∘ (V.id V.∘ D.id) ∘ D.id ≈⟨ identityˡ ○ identityˡ ⟩
(V.id V.∘ D.id) ∘ D.id ≈⟨ identityʳ ○ V.identityˡ ⟩
D.id ∎
; unitaryʳ = λ {C D F X} →
let module C = Underlying C
module D = Underlying D
open UnderlyingReasoning D
in begin
D.id ∘ D.id ∘ F $₁ C.id ∘ D.id ≈⟨ identityˡ ○ identityˡ ○ identityʳ ⟩
F $₁ C.id ≈⟨ UF.identity F ⟩
D.id ∎
; assoc = λ {_ B C D F G H X} →
let module B = Underlying B
module C = Underlying C
module D = Underlying D
open UnderlyingReasoning D
in ∘-resp-≈ʳ (begin
D.id ∘ (H ∘F G) $₁ B.id ∘ D.id ≈⟨ refl⟩∘⟨ V.assoc ⟩∘⟨refl ⟩
D.id ∘ H $₁ G $₁ B.id ∘ D.id ≈⟨ refl⟩∘⟨ UF.F-resp-≈ H
(UF.identity G) ⟩∘⟨refl ⟩
D.id ∘ H $₁ C.id ∘ D.id ≈⟨ id-comm-sym ⟩
(H $₁ C.id ∘ D.id) ∘ D.id ∎)
}
|
src/dds-request_reply-replier-typed_replier_generic-passive_replier_generic.adb | persan/dds-requestreply | 0 | 6226 | pragma Ada_2012;
package body DDS.Request_Reply.Replier.Typed_Replier_Generic.Passive_Replier_Generic is
-------------------------
-- On_Request_Avalible --
-------------------------
procedure On_Request_Avalible
(Self : not null access Ref;
Replier : not null access Typed_Replier_Generic.Ref'Class)
is
begin
for I of Replier.Take_Request loop
if I.Sample_Info.Valid_Data then
Self.all.Listner.Compute_And_Reply (Typed_Replier_Generic.Ref_Access(Replier), I.Data.all, Get_Sample_Identity (I.Sample_Info.all));
end if;
end loop;
end On_Request_Avalible;
end DDS.Request_Reply.Replier.Typed_Replier_Generic.Passive_Replier_Generic;
|
source/asis/asis-gela-implicit.adb | faelys/gela-asis | 4 | 12198 | <reponame>faelys/gela-asis
------------------------------------------------------------------------------
-- G E L A A S I S --
-- ASIS implementation for Gela project, a portable Ada compiler --
-- http://gela.ada-ru.org --
-- - - - - - - - - - - - - - - - --
-- Read copyright and license at the end of this file --
------------------------------------------------------------------------------
-- $Revision: 209 $ $Date: 2013-11-30 21:03:24 +0200 (Сб., 30 нояб. 2013) $:
with XASIS.Utils;
with XASIS.Types;
with Asis.Gela.Classes;
with Asis.Declarations;
with Asis.Gela.Lists;
with Asis.Gela.Elements;
with Asis.Gela.Elements.Decl;
with Asis.Gela.Elements.Expr;
with Asis.Gela.Element_Utils;
with Asis.Gela.Elements.Def_Names;
with Asis.Gela.Elements.Defs.Types;
package body Asis.Gela.Implicit is
package S renames Standard;
procedure Process_Standard (Unit : Asis.Compilation_Unit);
procedure Find_Declaration
(Unit : in Asis.Compilation_Unit;
Result : out Asis.Declaration;
Name : in Program_Text);
procedure Init_Implicit
(Element : in out Elements.Base_Element_Node'Class;
Parent : in Asis.Element);
function Is_Root (Decl : Asis.Declaration) return S.Boolean;
procedure Make_Operation
(Point : in out Visibility.Point;
Decl : Asis.Declaration;
Name : Wide_String;
Args : Positive := 2;
Result : Asis.Declaration := Asis.Nil_Element;
Right : Asis.Declaration := Asis.Nil_Element;
Left : Asis.Declaration := Asis.Nil_Element;
Dispatch : Boolean := False);
function Need_Logical (Tipe, Was : Classes.Type_Info) return S.Boolean;
function Need_Ordering (Tipe, Was : Classes.Type_Info) return S.Boolean;
procedure Hide_Implementation_Defined
(Decl : in Asis.Declaration);
procedure Hide_Implementation_Defined
(Unit : in Asis.Compilation_Unit;
Name : in Program_Text);
procedure Make_Operations
(Tipe : in Classes.Type_Info;
Decl : in Asis.Declaration;
Point : in out Visibility.Point;
Was : in Classes.Type_Info);
The_System_Address : Asis.Declaration;
The_System_Bit_Order : Asis.Declaration;
The_Task_Id : Asis.Declaration;
The_Exception_Id : Asis.Declaration;
The_Exception_Occurrence : Asis.Declaration;
The_Root_Storage_Pool : Asis.Declaration;
The_Tag : Asis.Declaration;
The_Root_Stream_Type : Asis.Declaration;
The_Universal_Integer : Asis.Declaration;
The_Universal_Real : Asis.Declaration;
The_Universal_Fixed : Asis.Declaration;
The_Universal_Access : Asis.Declaration;
The_Root_Integer : Asis.Declaration;
The_Root_Real : Asis.Declaration;
The_String : Asis.Declaration;
The_Wide_String : Asis.Declaration;
The_Wide_Wide_String : Asis.Declaration;
The_Float : Asis.Declaration;
The_Boolean : Asis.Declaration;
The_Duration : Asis.Declaration;
The_Integer : Asis.Declaration;
The_Natural : Asis.Declaration;
The_Wide_Character : Asis.Declaration;
The_Wide_Wide_Character : Asis.Declaration;
The_Character : Asis.Declaration;
----------------------
-- Create_Root_Type --
----------------------
procedure Create_Root_Type
(Unit : in Asis.Compilation_Unit;
Kind : in Root_Type_Kinds;
Result : out Asis.Declaration;
Before : in Program_Text)
is
use Asis.Gela.Elements.Decl;
use Asis.Gela.Elements.Defs.Types;
The_Unit : constant Asis.Declaration :=
Unit_Declaration (Unit.all);
Root_Definition : constant Root_Type_Ptr := new Root_Type_Node;
Root_Declaration : constant Ordinary_Type_Declaration_Ptr :=
new Ordinary_Type_Declaration_Node;
begin
Result := Element (Root_Declaration);
Init_Implicit (Root_Declaration.all, The_Unit);
Set_Type_Declaration_View (Root_Declaration.all,
Element (Root_Definition));
Set_Declaration_Origin (Root_Declaration.all,
An_Implicit_Predefined_Declaration);
Init_Implicit (Root_Definition.all, Result);
Set_Root_Type_Kind (Root_Definition.all, Kind);
Element_Utils.Add_To_Visible (The_Unit, Result, Before);
end Create_Root_Type;
----------------------
-- Find_Declaration --
----------------------
procedure Find_Declaration
(Unit : in Asis.Compilation_Unit;
Result : out Asis.Declaration;
Name : in Program_Text)
is
use Asis.Declarations;
The_Unit : constant Asis.Declaration := Unit_Declaration (Unit.all);
Items : constant Asis.Declarative_Item_List :=
Visible_Part_Declarative_Items (The_Unit);
begin
for I in Items'Range loop
if Element_Kind (Items (I).all) = A_Declaration
and then XASIS.Utils.Has_Defining_Name (Items (I), Name)
then
Result := Items (I);
return;
end if;
end loop;
end Find_Declaration;
------------------
-- Hide_Element --
------------------
procedure Hide_Element (Item : Asis.Expression) is
use Asis.Gela.Elements;
begin
if Assigned (Item) then
Set_Is_Part_Of_Implicit (Base_Element_Node (Item.all), True);
end if;
end Hide_Element;
---------------------------------
-- Hide_Implementation_Defined --
---------------------------------
procedure Hide_Implementation_Defined (Decl : Asis.Declaration) is
Exp : Asis.Expression;
Def : Asis.Definition;
begin
case Declaration_Kind (Decl.all) is
when An_Ordinary_Type_Declaration
| A_Subtype_Declaration=>
Def := Type_Declaration_View (Decl.all);
case Definition_Kind (Def.all) is
when A_Subtype_Indication =>
Def := Subtype_Constraint (Def.all);
Hide_Element (Lower_Bound (Def.all));
Hide_Element (Upper_Bound (Def.all));
when A_Type_Definition =>
case Type_Definition_Kind (Def.all) is
when An_Enumeration_Type_Definition =>
declare
List : constant Asis.Declaration_List :=
Enumeration_Literal_Declarations (Def.all);
begin
for J in List'Range loop
Hide_Element (List (J));
end loop;
end;
when A_Signed_Integer_Type_Definition =>
Def := Integer_Constraint (Def.all);
Exp := Lower_Bound (Def.all);
if Expression_Kind (Exp.all) /= An_Integer_Literal then
Hide_Element (Exp);
end if;
Exp := Upper_Bound (Def.all);
if Expression_Kind (Exp.all) /= An_Integer_Literal then
Hide_Element (Exp);
end if;
when A_Modular_Type_Definition =>
Hide_Element (Mod_Static_Expression (Def.all));
when A_Floating_Point_Definition =>
Hide_Element (Digits_Expression (Def.all));
Def := Real_Range_Constraint (Def.all);
if Assigned (Def) then
Hide_Element (Lower_Bound (Def.all));
Hide_Element (Upper_Bound (Def.all));
end if;
when An_Ordinary_Fixed_Point_Definition =>
Hide_Element (Delta_Expression (Def.all));
Def := Real_Range_Constraint (Def.all);
if Assigned (Def) then
Hide_Element (Lower_Bound (Def.all));
Hide_Element (Upper_Bound (Def.all));
end if;
when A_Decimal_Fixed_Point_Definition =>
Hide_Element (Digits_Expression (Def.all));
Hide_Element (Delta_Expression (Def.all));
Def := Real_Range_Constraint (Def.all);
if Assigned (Def) then
Hide_Element (Lower_Bound (Def.all));
Hide_Element (Upper_Bound (Def.all));
end if;
when others =>
raise Internal_Error;
end case;
when others =>
raise Internal_Error;
end case;
when A_Constant_Declaration
| An_Integer_Number_Declaration
| A_Real_Number_Declaration =>
Hide_Element (Initialization_Expression (Decl.all));
when others =>
raise Internal_Error;
end case;
end Hide_Implementation_Defined;
---------------------------------
-- Hide_Implementation_Defined --
---------------------------------
procedure Hide_Implementation_Defined
(Unit : in Asis.Compilation_Unit;
Name : in Program_Text)
is
Decl : Asis.Declaration;
begin
Find_Declaration (Unit, Decl, Name);
Hide_Implementation_Defined (Decl);
end Hide_Implementation_Defined;
-------------
-- Is_Root --
-------------
function Is_Root (Decl : Asis.Declaration) return S.Boolean is
Def : constant Asis.Definition := Type_Declaration_View (Decl.all);
begin
return Type_Definition_Kind (Def.all) = Asis.A_Root_Type_Definition;
end Is_Root;
-----------------------------
-- Make_Not_Equal_Operator --
-----------------------------
procedure Make_Not_Equal_Operator
(Equal : Asis.Declaration;
Point : in out Visibility.Point)
is
use Asis.Gela.Classes;
use Asis.Declarations;
Dispatch : Boolean := False;
Left_Info : Type_Info;
Right_Info : Type_Info;
List : constant Asis.Parameter_Specification_List :=
Parameter_Profile (Equal);
begin
Left_Info := Type_Of_Declaration (List (1), Equal);
if List'Length = 2 then
Right_Info := Type_Of_Declaration (List (2), Equal);
else
Right_Info := Left_Info;
end if;
if Declaration_Kind (Equal.all)
in A_Procedure_Declaration .. A_Function_Declaration
then
Dispatch := Is_Dispatching_Operation (Equal.all);
end if;
Make_Operation
(Point => Point,
Decl => Equal,
Name => """/=""",
Result => The_Boolean,
Right => Get_Declaration (Right_Info),
Left => Get_Declaration (Left_Info),
Dispatch => Dispatch);
end Make_Not_Equal_Operator;
--------------------
-- Make_Operation --
--------------------
procedure Make_Operation
(Point : in out Visibility.Point;
Decl : Asis.Declaration;
Name : Wide_String;
Args : Positive := 2;
Result : Asis.Declaration := Asis.Nil_Element;
Right : Asis.Declaration := Asis.Nil_Element;
Left : Asis.Declaration := Asis.Nil_Element;
Dispatch : Boolean := False)
is
use Asis.Gela.Lists;
use XASIS.Utils;
use Asis.Gela.Elements;
use Asis.Gela.Element_Utils;
use Asis.Gela.Elements.Decl;
use Asis.Gela.Elements.Defs;
use Asis.Gela.Elements.Expr;
use Asis.Gela.Elements.Def_Names;
D_Name : constant Asis.Element_List := Names (Decl.all);
Img : constant Asis.Program_Text := Declaration_Direct_Name (Decl);
Def : Asis.Element;
Func : constant Function_Declaration_Ptr :=
new Function_Declaration_Node;
Ident : Identifier_Ptr;
Mark : Subtype_Indication_Ptr;
Param : Parameter_Specification_Ptr;
P_Name : Defining_Identifier_Ptr;
F_Name : constant Defining_Operator_Symbol_Ptr :=
new Defining_Operator_Symbol_Node;
Items : Primary_Defining_Name_Lists.List :=
new Primary_Defining_Name_Lists.List_Node;
Params : constant Primary_Parameter_Lists.List :=
new Primary_Parameter_Lists.List_Node;
Overriden : Boolean;
Decl_Is_Type : Boolean := True;
begin
case Declaration_Kind (Decl.all) is
when An_Ordinary_Type_Declaration
| A_Task_Type_Declaration
| A_Protected_Type_Declaration
| A_Private_Type_Declaration
| A_Private_Extension_Declaration
| A_Subtype_Declaration
| A_Formal_Type_Declaration =>
Def := Type_Declaration_View (Decl.all);
Decl_Is_Type := True;
Set_Corresponding_Type (Func.all, Def);
when A_Function_Declaration =>
Decl_Is_Type := False;
Set_Corresponding_Equality_Operator (Func.all, Decl);
Set_Corresponding_Equality_Operator
(Function_Declaration_Node (Decl.all), Asis.Element (Func));
when A_Function_Renaming_Declaration =>
Set_Corresponding_Equality_Operator (Func.all, Decl);
Set_Corresponding_Equality_Operator
(Function_Renaming_Declaration_Node (Decl.all),
Asis.Element (Func));
Decl_Is_Type := False;
when A_Formal_Function_Declaration =>
Decl_Is_Type := False;
when others =>
raise Internal_Error;
end case;
Init_Implicit (Func.all, Decl);
Set_Declaration_Origin (Func.all, An_Implicit_Predefined_Declaration);
Init_Implicit (F_Name.all, Asis.Element (Func));
Set_Defining_Name_Image (F_Name.all, Name);
Elements.Def_Names.Set_Operator_Kind (F_Name.all,
Operator_Kind (Name, Args = 2));
Primary_Defining_Name_Lists.Add (Items.all, Asis.Element (F_Name));
Set_Names (Func.all, Asis.Element (Items));
for I in 1 .. Args loop
Param := new Parameter_Specification_Node;
Init_Implicit (Param.all, Asis.Element (Func));
Set_Trait_Kind (Param.all, An_Ordinary_Trait);
Set_Declaration_Origin (Param.all,
An_Implicit_Predefined_Declaration);
P_Name := new Defining_Identifier_Node;
Init_Implicit (P_Name.all, Asis.Element (Param));
if I = Args then
Set_Defining_Name_Image (P_Name.all, "Right");
else
Set_Defining_Name_Image (P_Name.all, "Left");
end if;
Items := new Primary_Defining_Name_Lists.List_Node;
Primary_Defining_Name_Lists.Add (Items.all, Asis.Element (P_Name));
Set_Names (Param.all, Asis.Element (Items));
Set_Mode_Kind (Param.all, A_Default_In_Mode);
Mark := new Subtype_Indication_Node;
Init_Implicit (Mark.all, Asis.Element (Param));
Ident := new Identifier_Node;
Init_Implicit (Ident.all, Asis.Element (Mark));
if I = Args and then Assigned (Right) then
declare
Right_Img : constant Asis.Program_Text :=
Declaration_Direct_Name (Right);
R_Name : constant Asis.Element_List := Names (Right.all);
begin
Set_Name_Image (Ident.all, Right_Img);
if R_Name'Length > 0 then
Add_Defining_Name (Asis.Element (Ident), R_Name (1));
end if;
Set_Name_Declaration (Asis.Element (Ident), Right);
end;
elsif I /= Args and then Assigned (Left) then
declare
Left_Img : constant Asis.Program_Text :=
Declaration_Direct_Name (Left);
L_Name : constant Asis.Element_List := Names (Left.all);
begin
Set_Name_Image (Ident.all, Left_Img);
if L_Name'Length > 0 then
Add_Defining_Name (Asis.Element (Ident), L_Name (1));
end if;
Set_Name_Declaration (Asis.Element (Ident), Left);
end;
else
Set_Name_Image (Ident.all, Img);
if D_Name'Length > 0 then
Add_Defining_Name (Asis.Element (Ident), D_Name (1));
end if;
Set_Name_Declaration (Asis.Element (Ident), Decl);
end if;
Set_Subtype_Mark (Mark.all, Asis.Element (Ident));
Set_Object_Declaration_Subtype (Param.all, Asis.Element (Mark));
Primary_Parameter_Lists.Add (Params.all, Asis.Element (Param));
end loop;
Set_Parameter_Profile (Func.all, Asis.Element (Params));
Set_Is_Dispatching_Operation (Func.all, Dispatch);
Mark := new Subtype_Indication_Node;
Init_Implicit (Mark.all, Asis.Element (Func));
Ident := new Identifier_Node;
Init_Implicit (Ident.all, Asis.Element (Mark));
if not Assigned (Result) then
Set_Name_Image (Ident.all, Img);
if D_Name'Length > 0 then
Add_Defining_Name (Asis.Element (Ident), D_Name (1));
end if;
Set_Name_Declaration (Asis.Element (Ident), Decl);
else
declare
Result_Img : constant Asis.Program_Text :=
Declaration_Direct_Name (Result);
R_Name : constant Asis.Element_List := Names (Result.all);
begin
Set_Name_Image (Ident.all, Result_Img);
if R_Name'Length > 0 then
Add_Defining_Name (Asis.Element (Ident), R_Name (1));
end if;
Set_Name_Declaration (Asis.Element (Ident), Result);
end;
end if;
Set_Subtype_Mark (Mark.all, Asis.Element (Ident));
Set_Result_Subtype (Func.all, Asis.Element (Mark));
Visibility.New_Implicit_Declaration
(Asis.Element (Func), Point, Decl, Overriden);
if not Overriden and then Decl_Is_Type then
Element_Utils.Add_Type_Operator (Def, Asis.Element (Func));
end if;
end Make_Operation;
---------------------
-- Make_Operations --
---------------------
procedure Make_Operations
(Decl : in Asis.Declaration;
Point : in out Visibility.Point)
is
Tipe : constant Classes.Type_Info :=
Classes.Type_From_Declaration (Decl, Decl);
begin
Make_Operations (Tipe, Decl, Point, Classes.Not_A_Type);
end Make_Operations;
---------------------
-- Make_Operations --
---------------------
procedure Make_Operations
(Tipe : in Classes.Type_Info;
Was : in Classes.Type_Info;
Point : in out Visibility.Point)
is
Decl : Asis.Declaration := Classes.Get_Declaration (Tipe);
begin
Make_Operations (Tipe, Decl, Point, Was);
end Make_Operations;
---------------------
-- Make_Operations --
---------------------
procedure Make_Operations
(Tipe : in Classes.Type_Info;
Decl : in Asis.Declaration;
Point : in out Visibility.Point;
Was : in Classes.Type_Info)
is
use Asis.Gela.Classes;
Comp : Asis.Declaration;
begin
if Is_Universal (Tipe) then
if Is_Fixed_Point (Tipe) then
Make_Operation (Point, Decl, """*""");
Make_Operation (Point, Decl, """/""");
elsif Is_Access (Tipe) then
Make_Operation (Point, Decl, """=""", Result => The_Boolean);
Make_Operation (Point, Decl, """/=""", Result => The_Boolean);
end if;
return;
end if;
if Need_Logical (Tipe, Was) then
Make_Operation (Point, Decl, """and""");
Make_Operation (Point, Decl, """or""");
Make_Operation (Point, Decl, """xor""");
Make_Operation (Point, Decl, """not""", 1);
end if;
if not Is_Limited (Tipe) and Is_Limited (Was) then
Make_Operation (Point, Decl, """=""", Result => The_Boolean,
Dispatch => Is_Tagged (Tipe));
Make_Operation (Point, Decl, """/=""", Result => The_Boolean,
Dispatch => Is_Tagged (Tipe));
end if;
if Need_Ordering (Tipe, Was) then
Make_Operation (Point, Decl, """<""", Result => The_Boolean);
Make_Operation (Point, Decl, """<=""", Result => The_Boolean);
Make_Operation (Point, Decl, """>""", Result => The_Boolean);
Make_Operation (Point, Decl, """>=""", Result => The_Boolean);
end if;
if Is_Numeric (Tipe) and not Is_Numeric (Was) then
Make_Operation (Point, Decl, """+""");
Make_Operation (Point, Decl, """-""");
Make_Operation (Point, Decl, """+""", 1);
Make_Operation (Point, Decl, """-""", 1);
Make_Operation (Point, Decl, """abs""", 1);
end if;
if Is_Array (Tipe, 1) then
Comp := Get_Declaration (Get_Array_Element_Type (Tipe));
if not Is_Limited (Tipe) and Is_Limited (Was) then
Make_Operation (Point, Decl, """&""");
Make_Operation (Point, Decl, """&""", Right => Comp);
Make_Operation (Point, Decl, """&""", Left => Comp);
Make_Operation (Point, Decl, """&""", Right => Comp, Left => Comp);
end if;
end if;
if Is_Integer (Tipe) and not Is_Integer (Was) then
Make_Operation (Point, Decl, """*""");
Make_Operation (Point, Decl, """/""");
Make_Operation (Point, Decl, """mod""");
Make_Operation (Point, Decl, """rem""");
Make_Operation (Point, Decl, """**""", Right => The_Natural);
elsif Is_Float_Point (Tipe) and not Is_Float_Point (Was) then
Make_Operation (Point, Decl, """*""");
Make_Operation (Point, Decl, """/""");
Make_Operation (Point, Decl, """**""", Right => The_Integer);
if Is_Root (Decl) then
Make_Operation (Point, Decl, """*""", Right => The_Root_Integer);
Make_Operation (Point, Decl, """*""", Left => The_Root_Integer);
Make_Operation (Point, Decl, """/""", Right => The_Root_Integer);
end if;
elsif Is_Fixed_Point (Tipe) and not Is_Fixed_Point (Was) then
Make_Operation (Point, Decl, """*""", Right => The_Integer);
Make_Operation (Point, Decl, """*""", Left => The_Integer);
Make_Operation (Point, Decl, """/""", Right => The_Integer);
end if;
end Make_Operations;
------------------
-- Need_Logical --
------------------
function Need_Logical (Tipe, Was : Classes.Type_Info) return S.Boolean is
use Asis.Gela.Classes;
begin
if Is_Boolean (Tipe) and not Is_Boolean (Was) then
return True;
elsif Is_Modular_Integer (Tipe) and not Is_Modular_Integer (Was) then
return True;
elsif Is_Boolean_Array (Tipe) and not Is_Boolean_Array (Was) then
return True;
end if;
return False;
end Need_Logical;
-------------------
-- Need_Ordering --
-------------------
function Need_Ordering (Tipe, Was : Classes.Type_Info) return S.Boolean is
use Asis.Gela.Classes;
begin
if Is_Scalar (Tipe) and not Is_Scalar (Was) then
return True;
elsif Is_Discrete_Array (Tipe) and not Is_Discrete_Array (Was) then
return True;
end if;
return False;
end Need_Ordering;
-------------------
-- Init_Implicit --
-------------------
procedure Init_Implicit
(Element : in out Elements.Base_Element_Node'Class;
Parent : in Asis.Element)
is
use Asis.Gela.Elements;
The_Unit : constant Asis.Compilation_Unit :=
Enclosing_Compilation_Unit (Parent.all);
begin
Set_Enclosing_Element (Element, Parent);
Set_Is_Part_Of_Implicit (Element, True);
Set_Start_Position (Element, (1, 1));
Set_End_Position (Element, (0, 0));
Set_Enclosing_Compilation_Unit (Element, The_Unit);
end Init_Implicit;
----------------------
-- Process_Standard --
----------------------
procedure Process_Standard (Unit : Asis.Compilation_Unit) is
begin
Find_Declaration (Unit, The_String, "String");
Find_Declaration (Unit, The_Wide_String, "Wide_String");
Find_Declaration (Unit, The_Wide_Wide_String, "Wide_Wide_String");
Find_Declaration (Unit, The_Boolean, "Boolean");
Find_Declaration (Unit, The_Integer, "Integer");
Find_Declaration (Unit, The_Natural, "Natural");
Find_Declaration (Unit, The_Duration, "Duration");
Find_Declaration (Unit, The_Float, "Float");
Find_Declaration (Unit, The_Character, "Character");
Find_Declaration (Unit, The_Wide_Character, "Wide_Character");
Find_Declaration (Unit, The_Wide_Wide_Character, "Wide_Wide_Character");
Create_Root_Type (Unit, A_Universal_Integer_Definition,
The_Universal_Integer, "Integer");
Create_Root_Type (Unit, A_Root_Integer_Definition,
The_Root_Integer, "Integer");
Create_Root_Type (Unit, A_Universal_Real_Definition,
The_Universal_Real, "Float");
Create_Root_Type (Unit, A_Universal_Fixed_Definition,
The_Universal_Fixed, "Float");
Create_Root_Type (Unit, A_Root_Real_Definition,
The_Root_Real, "Float");
Create_Root_Type (Unit, A_Universal_Access_Definition,
The_Universal_Access, "Character");
Hide_Implementation_Defined (The_Character);
Hide_Implementation_Defined (The_Wide_Character);
Hide_Implementation_Defined (The_Wide_Wide_Character);
Hide_Implementation_Defined (The_Integer);
Hide_Implementation_Defined (The_Float);
Hide_Implementation_Defined (The_Duration);
XASIS.Types.Initialize
(Universal_Integer => The_Universal_Integer,
Universal_Real => The_Universal_Real,
Universal_Fixed => The_Universal_Fixed,
Universal_Access => The_Universal_Access,
Root_Integer => The_Root_Integer,
Root_Real => The_Root_Real,
String => The_String,
Wide_String => The_Wide_String,
Wide_Wide_String => The_Wide_Wide_String,
Float => The_Float,
Boolean => The_Boolean,
Duration => The_Duration,
Integer => The_Integer,
Natural => The_Natural,
Wide_Wide_Character => The_Wide_Wide_Character,
Wide_Character => The_Wide_Character,
Character => The_Character);
end Process_Standard;
------------------
-- Process_Unit --
------------------
procedure Process_Unit (Unit : Asis.Compilation_Unit) is
use XASIS.Utils;
Name : constant Wide_String := Unit_Full_Name (Unit.all);
begin
if Are_Equal_Identifiers (Name, "Standard") then
Process_Standard (Unit);
elsif Are_Equal_Identifiers (Name, "System") then
Find_Declaration (Unit, The_System_Address, "Address");
Find_Declaration (Unit, The_System_Bit_Order, "Bit_Order");
XASIS.Types.Initialize
(System_Address => The_System_Address,
System_Bit_Order => The_System_Bit_Order);
Hide_Implementation_Defined (Unit, "System_Name");
Hide_Implementation_Defined (Unit, "Min_Int");
Hide_Implementation_Defined (Unit, "Max_Int");
Hide_Implementation_Defined (Unit, "Max_Binary_Modulus");
Hide_Implementation_Defined (Unit, "Max_Nonbinary_Modulus");
Hide_Implementation_Defined (Unit, "Max_Base_Digits");
Hide_Implementation_Defined (Unit, "Max_Digits");
Hide_Implementation_Defined (Unit, "Max_Mantissa");
Hide_Implementation_Defined (Unit, "Fine_Delta");
Hide_Implementation_Defined (Unit, "Tick");
Hide_Implementation_Defined (Unit, "Storage_Unit");
Hide_Implementation_Defined (Unit, "Word_Size");
Hide_Implementation_Defined (Unit, "Memory_Size");
Hide_Implementation_Defined (Unit, "Default_Bit_Order");
Hide_Implementation_Defined (Unit, "Any_Priority");
Hide_Implementation_Defined (Unit, "Priority");
elsif Are_Equal_Identifiers (Name, "System.Storage_Pools") then
Find_Declaration (Unit, The_Root_Storage_Pool, "Root_Storage_Pool");
XASIS.Types.Initialize
(Root_Storage_Pool => The_Root_Storage_Pool);
elsif Are_Equal_Identifiers (Name, "System.RPC") then
Hide_Implementation_Defined (Unit, "Partition_Id");
elsif Are_Equal_Identifiers (Name, "System.Storage_Elements") then
Hide_Implementation_Defined (Unit, "Storage_Offset");
Hide_Implementation_Defined (Unit, "Storage_Element");
Hide_Implementation_Defined (Unit, "Integer_Address");
elsif Are_Equal_Identifiers (Name, "Interfaces.C") then
Hide_Implementation_Defined (Unit, "CHAR_BIT");
Hide_Implementation_Defined (Unit, "SCHAR_MIN");
Hide_Implementation_Defined (Unit, "SCHAR_MAX");
Hide_Implementation_Defined (Unit, "UCHAR_MAX");
Hide_Implementation_Defined (Unit, "int");
Hide_Implementation_Defined (Unit, "short");
Hide_Implementation_Defined (Unit, "long");
Hide_Implementation_Defined (Unit, "unsigned");
Hide_Implementation_Defined (Unit, "unsigned_short");
Hide_Implementation_Defined (Unit, "unsigned_long");
Hide_Implementation_Defined (Unit, "ptrdiff_t");
Hide_Implementation_Defined (Unit, "size_t");
Hide_Implementation_Defined (Unit, "C_float");
Hide_Implementation_Defined (Unit, "double");
Hide_Implementation_Defined (Unit, "long_double");
Hide_Implementation_Defined (Unit, "char");
Hide_Implementation_Defined (Unit, "nul");
Hide_Implementation_Defined (Unit, "wchar_t");
Hide_Implementation_Defined (Unit, "wide_nul");
Hide_Implementation_Defined (Unit, "char16_t");
Hide_Implementation_Defined (Unit, "char16_nul");
Hide_Implementation_Defined (Unit, "char32_t");
Hide_Implementation_Defined (Unit, "char32_nul");
elsif Are_Equal_Identifiers (Name, "Ada.Command_Line") then
Hide_Implementation_Defined (Unit, "Exit_Status");
elsif Are_Equal_Identifiers (Name, "Ada.Containers") then
Hide_Implementation_Defined (Unit, "Hash_Type");
Hide_Implementation_Defined (Unit, "Count_Type");
elsif Are_Equal_Identifiers (Name, "Ada.Decimal") then
Hide_Implementation_Defined (Unit, "Max_Scale");
Hide_Implementation_Defined (Unit, "Min_Scale");
Hide_Implementation_Defined (Unit, "Max_Decimal_Digits");
elsif Are_Equal_Identifiers (Name, "Ada.Direct_IO")
or else Are_Equal_Identifiers (Name, "Ada.Streams.Stream_IO")
then
Hide_Implementation_Defined (Unit, "Count");
elsif Are_Equal_Identifiers (Name, "Ada.Directories") then
Hide_Implementation_Defined (Unit, "File_Size");
elsif Are_Equal_Identifiers (Name, "Ada.Dispatching.Round_Robin") then
Hide_Implementation_Defined (Unit, "Default_Quantum");
elsif Are_Equal_Identifiers (Name, "Ada.Execution_Time") then
-- TODO: Make it A_Real_Number_Declaration
Hide_Implementation_Defined (Unit, "CPU_Time_Unit");
elsif Are_Equal_Identifiers (Name, "Ada.Execution_Time.Timers") then
Hide_Implementation_Defined (Unit, "Min_Handler_Ceiling");
elsif Are_Equal_Identifiers (Name, "Ada.Execution_Time.Group_Budgets")
then
Hide_Implementation_Defined (Unit, "Min_Handler_Ceiling");
elsif Are_Equal_Identifiers (Name, "Ada.Interrupts") then
Hide_Implementation_Defined (Unit, "Interrupt_ID");
elsif Are_Equal_Identifiers (Name, "Ada.Real_Time") then
-- TODO: Make it A_Real_Number_Declaration
Hide_Implementation_Defined (Unit, "Time_Unit");
Hide_Implementation_Defined (Unit, "Seconds_Count");
elsif Are_Equal_Identifiers (Name, "Ada.Text_IO")
or else Are_Equal_Identifiers (Name, "Ada.Wide_Text_IO")
or else Are_Equal_Identifiers (Name, "Ada.Wide_Wide_Text_IO")
then
Hide_Implementation_Defined (Unit, "Count");
Hide_Implementation_Defined (Unit, "Field");
elsif Are_Equal_Identifiers (Name, "Ada.Numerics.Discrete_Random")
or else Are_Equal_Identifiers (Name, "Ada.Numerics.Float_Random")
then
Hide_Implementation_Defined (Unit, "Max_Image_Width");
elsif Are_Equal_Identifiers (Name, "Ada.Storage_IO") then
Hide_Implementation_Defined (Unit, "Buffer_Size");
elsif Are_Equal_Identifiers (Name, "Ada.Streams") then
Hide_Implementation_Defined (Unit, "Stream_Element");
Hide_Implementation_Defined (Unit, "Stream_Element_Offset");
Find_Declaration (Unit, The_Root_Stream_Type, "Root_Stream_Type");
XASIS.Types.Initialize_Root_Stream (The_Root_Stream_Type);
elsif Are_Equal_Identifiers (Name, "Ada.Exceptions") then
Find_Declaration (Unit, The_Exception_Id, "Exception_Id");
Find_Declaration
(Unit, The_Exception_Occurrence, "Exception_Occurrence");
XASIS.Types.Initialize_Exception
(The_Exception_Id, The_Exception_Occurrence);
elsif Are_Equal_Identifiers (Name, "Ada.Task_Identification") then
Find_Declaration (Unit, The_Task_Id, "Task_Id");
XASIS.Types.Initialize_Task_Id (The_Task_Id);
elsif Are_Equal_Identifiers (Name, "Ada.Tags") then
Find_Declaration (Unit, The_Tag, "Tag");
XASIS.Types.Initialize_Tag (The_Tag);
end if;
end Process_Unit;
end Asis.Gela.Implicit;
------------------------------------------------------------------------------
-- Copyright (c) 2006-2013, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * Neither the name of the Maxim Reznik, IE nor the names of its
-- contributors may be used to endorse or promote products derived from
-- this software without specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
|
components/src/motion/lis3dsh/lis3dsh.adb | rocher/Ada_Drivers_Library | 192 | 22748 | <gh_stars>100-1000
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics 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. --
-- --
-- --
-- This file is based on: --
-- --
-- @file lis3dsh.c --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief This file provides a set of functions needed to manage the --
-- LIS3DSH MEMS Accelerometer. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
with Ada.Unchecked_Conversion;
with System;
with Interfaces; use Interfaces;
package body LIS3DSH is
Full_Scale_Selection_Mask : constant UInt8 := 2#0011_1000#;
-- bits 3..5 of CTRL5
Data_Rate_Selection_Mask : constant UInt8 := 2#0111_0000#;
-- bits 4..6 of CTRL4
procedure Loc_IO_Write
(This : in out Three_Axis_Accelerometer;
Value : UInt8;
WriteAddr : Register_Address)
with Inline_Always;
procedure Loc_IO_Read
(This : Three_Axis_Accelerometer;
Value : out UInt8;
ReadAddr : Register_Address)
with Inline_Always;
------------------
-- Loc_IO_Write --
------------------
procedure Loc_IO_Write
(This : in out Three_Axis_Accelerometer;
Value : UInt8;
WriteAddr : Register_Address)
is
begin
IO_Write (Three_Axis_Accelerometer'Class (This),
Value,
WriteAddr);
end Loc_IO_Write;
-----------------
-- Loc_IO_Read --
-----------------
procedure Loc_IO_Read
(This : Three_Axis_Accelerometer;
Value : out UInt8;
ReadAddr : Register_Address)
is
begin
IO_Read (Three_Axis_Accelerometer'Class (This),
Value,
ReadAddr);
end Loc_IO_Read;
----------------
-- Configured --
----------------
function Configured (This : Three_Axis_Accelerometer) return Boolean is
(This.Device_Configured);
-----------------------
-- Get_Accelerations --
-----------------------
procedure Get_Accelerations
(This : Three_Axis_Accelerometer;
Axes : out Axes_Accelerations)
is
Buffer : array (0 .. 5) of UInt8 with Alignment => 2, Size => 48;
Scaled : Float;
type Integer16_Pointer is access all Integer_16
with Storage_Size => 0;
function As_Pointer is new Ada.Unchecked_Conversion
(Source => System.Address, Target => Integer16_Pointer);
-- So that we can treat the address of a UInt8 as a pointer to a two-UInt8
-- sequence representing a signed Integer_16 quantity
begin
This.Loc_IO_Read (Buffer (0), OUT_X_L);
This.Loc_IO_Read (Buffer (1), OUT_X_H);
This.Loc_IO_Read (Buffer (2), OUT_Y_L);
This.Loc_IO_Read (Buffer (3), OUT_Y_H);
This.Loc_IO_Read (Buffer (4), OUT_Z_L);
This.Loc_IO_Read (Buffer (5), OUT_Z_H);
Get_X : declare
Raw : Integer_16 renames As_Pointer (Buffer (0)'Address).all;
begin
Scaled := Float (Raw) * This.Sensitivity;
Axes.X := Axis_Acceleration (Scaled);
end Get_X;
Get_Y : declare
Raw : Integer_16 renames As_Pointer (Buffer (2)'Address).all;
begin
Scaled := Float (Raw) * This.Sensitivity;
Axes.Y := Axis_Acceleration (Scaled);
end Get_Y;
Get_Z : declare
Raw : Integer_16 renames As_Pointer (Buffer (4)'Address).all;
begin
Scaled := Float (Raw) * This.Sensitivity;
Axes.Z := Axis_Acceleration (Scaled);
end Get_Z;
end Get_Accelerations;
---------------
-- Configure --
---------------
procedure Configure
(This : in out Three_Axis_Accelerometer;
Output_DataRate : Data_Rate_Power_Mode_Selection;
Axes_Enable : Direction_XYZ_Selection;
SPI_Wire : SPI_Serial_Interface_Mode_Selection;
Self_Test : Self_Test_Selection;
Full_Scale : Full_Scale_Selection;
Filter_BW : Anti_Aliasing_Filter_Bandwidth)
is
Temp : UInt16;
Value : UInt8;
begin
Temp := Output_DataRate'Enum_Rep or
Axes_Enable'Enum_Rep or
SPI_Wire'Enum_Rep or
Self_Test'Enum_Rep or
Full_Scale'Enum_Rep or
Filter_BW'Enum_Rep;
Value := UInt8 (Temp); -- the low UInt8 of the half-word
This.Loc_IO_Write (Value, CTRL_REG4);
Value := UInt8 (Shift_Right (Temp, 8)); -- the high UInt8
This.Loc_IO_Write (Value, CTRL_REG5);
case Full_Scale is
when Fullscale_2g =>
This.Sensitivity := Sensitivity_0_06mg;
when Fullscale_4g =>
This.Sensitivity := Sensitivity_0_12mg;
when Fullscale_6g =>
This.Sensitivity := Sensitivity_0_18mg;
when Fullscale_8g =>
This.Sensitivity := Sensitivity_0_24mg;
when Fullscale_16g =>
This.Sensitivity := Sensitivity_0_73mg;
end case;
This.Device_Configured := True;
end Configure;
---------------
-- Device_Id --
---------------
function Device_Id (This : Three_Axis_Accelerometer) return UInt8 is
Response : UInt8;
begin
This.Loc_IO_Read (Response, WHO_AM_I);
return Response;
end Device_Id;
------------
-- Reboot --
------------
procedure Reboot (This : in out Three_Axis_Accelerometer) is
Value : UInt8;
Force_Reboot : constant UInt8 := 2#1000_0000#;
begin
This.Loc_IO_Read (Value, CTRL_REG6);
Value := Value or Force_Reboot;
This.Loc_IO_Write (Value, CTRL_REG6);
end Reboot;
--------------------------
-- Configure_Interrupts --
--------------------------
procedure Configure_Interrupts
(This : in out Three_Axis_Accelerometer;
Interrupt_Request : Interrupt_Request_Selection;
Interrupt_Selection_Enable : Interrupt_Selection_Enablers;
Interrupt_Signal : Interrupt_Signal_Active_Selection;
State_Machine1_Enable : Boolean;
State_Machine1_Interrupt : State_Machine_Routed_Interrupt;
State_Machine2_Enable : Boolean;
State_Machine2_Interrupt : State_Machine_Routed_Interrupt)
is
CTRL : UInt8;
begin
CTRL := Interrupt_Selection_Enable'Enum_Rep or
Interrupt_Request'Enum_Rep or
Interrupt_Signal'Enum_Rep;
This.Loc_IO_Write (CTRL, CTRL_REG3);
-- configure State Machine 1
CTRL := State_Machine1_Enable'Enum_Rep or
State_Machine1_Interrupt'Enum_Rep;
This.Loc_IO_Write (CTRL, CTRL_REG1);
-- configure State Machine 2
CTRL := State_Machine2_Enable'Enum_Rep or
State_Machine2_Interrupt'Enum_Rep;
This.Loc_IO_Write (CTRL, CTRL_REG2);
end Configure_Interrupts;
-------------------------------
-- Configure_Click_Interrupt --
-------------------------------
procedure Configure_Click_Interrupt
(This : in out Three_Axis_Accelerometer)
is
begin
Configure_Interrupts
(This,
Interrupt_Request => Interrupt_Request_Latched,
Interrupt_Selection_Enable => Interrupt_2_Enable,
Interrupt_Signal => Interrupt_Signal_High,
State_Machine1_Enable => False,
State_Machine1_Interrupt => SM_INT1, -- Ignored
State_Machine2_Enable => True,
State_Machine2_Interrupt => SM_INT1);
-- configure state machines
This.Loc_IO_Write (3, TIM2_1_L);
This.Loc_IO_Write (16#C8#, TIM1_1_L);
This.Loc_IO_Write (16#45#, THRS2_1);
This.Loc_IO_Write (16#FC#, MASK1_A);
This.Loc_IO_Write (16#A1#, SETT1);
This.Loc_IO_Write (16#1#, PR1);
This.Loc_IO_Write (16#1#, SETT2);
-- configure State Machine 2 to detect single click
This.Loc_IO_Write (16#1#, ST2_1);
This.Loc_IO_Write (16#6#, ST2_2);
This.Loc_IO_Write (16#28#, ST2_3);
This.Loc_IO_Write (16#11#, ST2_4);
end Configure_Click_Interrupt;
-------------------
-- Set_Low_Power --
-------------------
procedure Set_Low_Power
(This : in out Three_Axis_Accelerometer;
Mode : Data_Rate_Power_Mode_Selection)
is
Value : UInt8;
begin
This.Loc_IO_Read (Value, CTRL_REG4);
Value := Value and (not Data_Rate_Selection_Mask); -- clear bits
Value := Value or Mode'Enum_Rep;
This.Loc_IO_Write (Value, CTRL_REG4);
end Set_Low_Power;
-------------------
-- Set_Data_Rate --
-------------------
procedure Set_Data_Rate
(This : in out Three_Axis_Accelerometer;
DataRate : Data_Rate_Power_Mode_Selection)
is
Value : UInt8;
begin
This.Loc_IO_Read (Value, CTRL_REG4);
Value := Value and (not Data_Rate_Selection_Mask); -- clear bits
Value := Value or DataRate'Enum_Rep;
This.Loc_IO_Write (Value, CTRL_REG4);
end Set_Data_Rate;
--------------------
-- Set_Full_Scale --
--------------------
procedure Set_Full_Scale
(This : in out Three_Axis_Accelerometer;
Scale : Full_Scale_Selection)
is
Value : UInt8;
begin
This.Loc_IO_Read (Value, CTRL_REG5);
Value := Value and (not Full_Scale_Selection_Mask); -- clear bits
Value := Value or Scale'Enum_Rep;
This.Loc_IO_Write (Value, CTRL_REG5);
end Set_Full_Scale;
-------------------
-- As_Full_Scale --
-------------------
function As_Full_Scale is new Ada.Unchecked_Conversion
(Source => UInt8, Target => Full_Scale_Selection);
--------------------------
-- Selected_Sensitivity --
--------------------------
function Selected_Sensitivity (This : Three_Axis_Accelerometer)
return Float
is
CTRL5 : UInt8;
begin
This.Loc_IO_Read (CTRL5, CTRL_REG5);
case As_Full_Scale (CTRL5 and Full_Scale_Selection_Mask) is
when Fullscale_2g =>
return Sensitivity_0_06mg;
when Fullscale_4g =>
return Sensitivity_0_12mg;
when Fullscale_6g =>
return Sensitivity_0_18mg;
when Fullscale_8g =>
return Sensitivity_0_24mg;
when Fullscale_16g =>
return Sensitivity_0_73mg;
end case;
end Selected_Sensitivity;
-----------------
-- Temperature --
-----------------
function Temperature (This : Three_Axis_Accelerometer) return UInt8 is
Result : UInt8;
begin
This.Loc_IO_Read (Result, Out_T);
return Result;
end Temperature;
end LIS3DSH;
|
src/main/native/compression/isa-l-master/crc/crc32_iscsi_01.asm | swepnadoss/GKL | 0 | 13921 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2015 Intel Corporation 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 Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction
%include "reg_sizes.asm"
default rel
%define CONCAT(a,b,c) a %+ b %+ c
; Define threshold where buffers are considered "small" and routed to more
; efficient "by-1" code. This "by-1" code only handles up to 255 bytes, so
; SMALL_SIZE can be no larger than 256.
%define SMALL_SIZE 200
%if (SMALL_SIZE > 256)
%error SMALL_ SIZE must be <= 256
% error ; needed because '%error' actually generates only a warning
%endif
;;; unsigned int crc32_iscsi_01(unsigned char * buffer, int len, unsigned int crc_init);
;;;
;;; *buf = rcx
;;; len = rdx
;;; crc_init = r8
mk_global crc32_iscsi_01, function
crc32_iscsi_01:
%ifidn __OUTPUT_FORMAT__, elf64
%define bufp rdi
%define bufp_dw edi
%define bufp_w di
%define bufp_b dil
%define bufptmp rcx
%define block_0 rcx
%define block_1 rdx
%define block_2 r11
%define len rsi
%define len_dw esi
%define len_w si
%define len_b sil
%define crc_init_arg rdx
%else
%define bufp rcx
%define bufp_dw ecx
%define bufp_w cx
%define bufp_b cl
%define bufptmp rdi
%define block_0 rdi
%define block_1 rsi
%define block_2 r11
%define len rdx
%define len_dw edx
%define len_w dx
%define len_b dl
%endif
%define tmp rbx
%define crc_init r8
%define crc_init_dw r8d
%define crc1 r9
%define crc2 r10
push rbx
push rdi
push rsi
;; Move crc_init for Linux to a different reg
%ifidn __OUTPUT_FORMAT__, elf64
mov crc_init, crc_init_arg
%endif
;; If len is less than 8 we need to jump to special code to avoid
;; reading beyond the end of the buffer
cmp len, 8
jb less_than_8
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 1) ALIGN: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
mov bufptmp, bufp ;; rdi = *buf
neg bufp
and bufp, 7 ;; calculate the unalignment amount of
;; the address
je proc_block ;; Skip if aligned
;;;; Calculate CRC of unaligned bytes of the buffer (if any) ;;;
mov tmp, [bufptmp] ;; load a quadword from the buffer
add bufptmp, bufp ;; align buffer pointer for quadword
;; processing
sub len, bufp ;; update buffer length
align_loop:
crc32 crc_init_dw, bl ;; compute crc32 of 1-byte
shr tmp, 8 ;; get next byte
dec bufp
jne align_loop
proc_block:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 2) PROCESS BLOCKS: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; compute num of bytes to be processed
mov tmp, len ;; save num bytes in tmp
cmp len, 128*24
jae full_block
continue_block:
cmp len, SMALL_SIZE
jb small
;; len < 128*24
mov rax, 2731 ;; 2731 = ceil(2^16 / 24)
mul len_dw
shr rax, 16
;; eax contains floor(bytes / 24) = num 24-byte chunks to do
;; process rax 24-byte chunks (128 >= rax >= 0)
;; compute end address of each block
;; rdi -> block 0 (base addr + RAX * 8)
;; rsi -> block 1 (base addr + RAX * 16)
;; r11 -> block 2 (base addr + RAX * 24)
lea block_0, [bufptmp + rax * 8]
lea block_1, [block_0 + rax * 8]
lea block_2, [block_1 + rax * 8]
xor crc1,crc1
xor crc2,crc2
;; branch into array
lea bufp, [jump_table]
movzx len, word [bufp + rax * 2] ;; len is offset from crc_array
lea bufp, [bufp + len + crc_array - jump_table]
jmp bufp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 2a) PROCESS FULL BLOCKS: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
full_block:
mov rax, 128
lea block_1, [block_0 + 128*8*2]
lea block_2, [block_0 + 128*8*3]
add block_0, 128*8*1
xor crc1,crc1
xor crc2,crc2
; ;; branch into array
; jmp CONCAT(crc_,128,)
; Fall thruogh into top of crc array (crc_128)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 3) CRC Array: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
crc_array:
cmp len, 128*24*2
jbe non_prefetch
%assign i 128
%rep 128-1
CONCAT(_crc_,i,:)
crc32 crc_init, qword [block_0 - i*8]
crc32 crc1, qword [block_1 - i*8]
crc32 crc2, qword [block_2 - i*8]
%if i > 128*8 / 32 ; prefetch next 3KB data
prefetchnta [block_2 + 128*32 - i*32]
%endif
%assign i (i-1)
%endrep
jmp next_
non_prefetch:
%assign i 128
%rep 128-1
CONCAT(crc_,i,:)
crc32 crc_init, qword [block_0 - i*8]
crc32 crc1, qword [block_1 - i*8]
crc32 crc2, qword [block_2 - i*8]
%assign i (i-1)
%endrep
next_:
CONCAT(crc_,i,:)
crc32 crc_init, qword [block_0 - i*8]
crc32 crc1, qword [block_1 - i*8]
; SKIP ;crc32 crc2, [block_2 - i*8] ; Don't do this one yet
mov block_0, block_2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 4) Combine three results: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
lea bufp, [K_table - 16] ; first entry is for idx 1
shl rax, 3 ; rax *= 8
sub tmp, rax ; tmp -= rax*8
shl rax, 1
sub tmp, rax ; tmp -= rax*16 (total tmp -= rax*24)
add bufp, rax
movdqa xmm0, [bufp] ; 2 consts: K1:K2
movq xmm1, crc_init ; CRC for block 1
pclmulqdq xmm1, xmm0, 0x00 ; Multiply by K2
movq xmm2, crc1 ; CRC for block 2
pclmulqdq xmm2, xmm0, 0x10 ; Multiply by K1
pxor xmm1, xmm2
movq rax, xmm1
xor rax, [block_2 - i*8]
mov crc_init, crc2
crc32 crc_init, rax
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 5) Check for end: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CONCAT(crc_,0,:)
mov len, tmp
cmp tmp, 128*24
jae full_block
cmp tmp, 24
jae continue_block
fewer_than_24:
;; now fewer than 24 bytes remain
cmp tmp, 16
jae do_16
cmp tmp, 8
jae do_8
;; 0 <= tmp <= 7
shl ebx, 29 ; size now in bits 31:29
jz do_return
check_4:
mov bufp, [bufptmp]
shl ebx, 1 ; shift out into carry MSB (orig size & 4)
jnc check_2
crc32 crc_init_dw, bufp_dw
jz do_return
shr bufp, 32 ; shift data down by 4 bytes
check_2:
shl ebx, 1 ; shift out into carry MSB (orig size & 2)
jnc check_1
crc32 crc_init_dw, bufp_w
jz do_return
shr bufp, 16 ; shift data down by 2 bytes
check_1:
crc32 crc_init_dw, bufp_b
do_return:
mov rax, crc_init
pop rsi
pop rdi
pop rbx
ret
do_8:
crc32 crc_init, qword [bufptmp]
add bufptmp, 8
shl ebx, 29 ; size (0...7) in bits 31:29
jnz check_4
mov rax, crc_init
pop rsi
pop rdi
pop rbx
ret
do_16:
crc32 crc_init, qword [bufptmp]
crc32 crc_init, qword [bufptmp+8]
add bufptmp, 16
shl ebx, 29 ; size (0...7) in bits 31:29
jnz check_4
mov rax, crc_init
pop rsi
pop rdi
pop rbx
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Handle the case of fewer than 8 bytes, unaligned. In this case
;; we can't read 8 bytes, as this might go beyond the end of the buffer
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
less_than_8:
test len,4
jz less_than_4
crc32 crc_init_dw, dword[bufp]
add bufp,4
less_than_4:
test len,2
jz less_than_2
crc32 crc_init_dw, word[bufp]
add bufp,2
less_than_2:
test len,1
jz do_return
crc32 crc_init_dw, byte[bufp]
mov rax, crc_init
pop rsi
pop rdi
pop rbx
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;4) LESS THAN 256-bytes REMAIN AT THIS POINT (8-bits of len are full)
small:
mov rax, crc_init
bit8:
shl len_b, 1 ;; shift-out MSB (bit-7)
jnc bit7 ;; jump to bit-6 if bit-7 == 0
%assign i 0
%rep 16
crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
%assign i (i+8)
%endrep
je do_return2 ;; return if remaining data is zero
add bufptmp, 128 ;; buf +=64; (next 64 bytes)
bit7:
shl len_b, 1 ;; shift-out MSB (bit-7)
jnc bit6 ;; jump to bit-6 if bit-7 == 0
%assign i 0
%rep 8
crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
%assign i (i+8)
%endrep
je do_return2 ;; return if remaining data is zero
add bufptmp, 64 ;; buf +=64; (next 64 bytes)
bit6:
shl len_b, 1 ;; shift-out MSB (bit-6)
jnc bit5 ;; jump to bit-5 if bit-6 == 0
%assign i 0
%rep 4
crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
%assign i (i+8)
%endrep
je do_return2 ;; return if remaining data is zero
add bufptmp, 32 ;; buf +=32; (next 32 bytes)
bit5:
shl len_b, 1 ;; shift-out MSB (bit-5)
jnc bit4 ;; jump to bit-4 if bit-5 == 0
%assign i 0
%rep 2
crc32 rax, qword [bufptmp+i] ;; compute crc32 of 8-byte data
%assign i (i+8)
%endrep
je do_return2 ;; return if remaining data is zero
add bufptmp, 16 ;; buf +=16; (next 16 bytes)
bit4:
shl len_b, 1 ;; shift-out MSB (bit-4)
jnc bit3 ;; jump to bit-3 if bit-4 == 0
crc32 rax, qword [bufptmp] ;; compute crc32 of 8-byte data
je do_return2 ;; return if remaining data is zero
add bufptmp, 8 ;; buf +=8; (next 8 bytes)
bit3:
mov rbx, qword [bufptmp] ;; load a 8-bytes from the buffer:
shl len_b, 1 ;; shift-out MSB (bit-3)
jnc bit2 ;; jump to bit-2 if bit-3 == 0
crc32 eax, ebx ;; compute crc32 of 4-byte data
je do_return2 ;; return if remaining data is zero
shr rbx, 32 ;; get next 3 bytes
bit2:
shl len_b, 1 ;; shift-out MSB (bit-2)
jnc bit1 ;; jump to bit-1 if bit-2 == 0
crc32 eax, bx ;; compute crc32 of 2-byte data
je do_return2 ;; return if remaining data is zero
shr rbx, 16 ;; next byte
bit1:
test len_b,len_b
je do_return2
crc32 eax, bl ;; compute crc32 of 1-byte data
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
do_return2:
pop rsi
pop rdi
pop rbx
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; jump table ;; Table is 129 entries x 2 bytes each
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
align 4
jump_table:
%assign i 0
%rep 129
dw CONCAT(crc_,i,) - crc_array
%assign i (i+1)
%endrep
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; PCLMULQDQ tables
;; Table is 128 entries x 2 quad words each
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
section .data
align 64
K_table:
dq 0x14cd00bd6, 0x105ec76f0
dq 0x0ba4fc28e, 0x14cd00bd6
dq 0x1d82c63da, 0x0f20c0dfe
dq 0x09e4addf8, 0x0ba4fc28e
dq 0x039d3b296, 0x1384aa63a
dq 0x102f9b8a2, 0x1d82c63da
dq 0x14237f5e6, 0x01c291d04
dq 0x00d3b6092, 0x09e4addf8
dq 0x0c96cfdc0, 0x0740eef02
dq 0x18266e456, 0x039d3b296
dq 0x0daece73e, 0x0083a6eec
dq 0x0ab7aff2a, 0x102f9b8a2
dq 0x1248ea574, 0x1c1733996
dq 0x083348832, 0x14237f5e6
dq 0x12c743124, 0x02ad91c30
dq 0x0b9e02b86, 0x00d3b6092
dq 0x018b33a4e, 0x06992cea2
dq 0x1b331e26a, 0x0c96cfdc0
dq 0x17d35ba46, 0x07e908048
dq 0x1bf2e8b8a, 0x18266e456
dq 0x1a3e0968a, 0x11ed1f9d8
dq 0x0ce7f39f4, 0x0daece73e
dq 0x061d82e56, 0x0f1d0f55e
dq 0x0d270f1a2, 0x0ab7aff2a
dq 0x1c3f5f66c, 0x0a87ab8a8
dq 0x12ed0daac, 0x1248ea574
dq 0x065863b64, 0x08462d800
dq 0x11eef4f8e, 0x083348832
dq 0x1ee54f54c, 0x071d111a8
dq 0x0b3e32c28, 0x12c743124
dq 0x0064f7f26, 0x0ffd852c6
dq 0x0dd7e3b0c, 0x0b9e02b86
dq 0x0f285651c, 0x0dcb17aa4
dq 0x010746f3c, 0x018b33a4e
dq 0x1c24afea4, 0x0f37c5aee
dq 0x0271d9844, 0x1b331e26a
dq 0x08e766a0c, 0x06051d5a2
dq 0x093a5f730, 0x17d35ba46
dq 0x06cb08e5c, 0x11d5ca20e
dq 0x06b749fb2, 0x1bf2e8b8a
dq 0x1167f94f2, 0x021f3d99c
dq 0x0cec3662e, 0x1a3e0968a
dq 0x19329634a, 0x08f158014
dq 0x0e6fc4e6a, 0x0ce7f39f4
dq 0x08227bb8a, 0x1a5e82106
dq 0x0b0cd4768, 0x061d82e56
dq 0x13c2b89c4, 0x188815ab2
dq 0x0d7a4825c, 0x0d270f1a2
dq 0x10f5ff2ba, 0x105405f3e
dq 0x00167d312, 0x1c3f5f66c
dq 0x0f6076544, 0x0e9adf796
dq 0x026f6a60a, 0x12ed0daac
dq 0x1a2adb74e, 0x096638b34
dq 0x19d34af3a, 0x065863b64
dq 0x049c3cc9c, 0x1e50585a0
dq 0x068bce87a, 0x11eef4f8e
dq 0x1524fa6c6, 0x19f1c69dc
dq 0x16cba8aca, 0x1ee54f54c
dq 0x042d98888, 0x12913343e
dq 0x1329d9f7e, 0x0b3e32c28
dq 0x1b1c69528, 0x088f25a3a
dq 0x02178513a, 0x0064f7f26
dq 0x0e0ac139e, 0x04e36f0b0
dq 0x0170076fa, 0x0dd7e3b0c
dq 0x141a1a2e2, 0x0bd6f81f8
dq 0x16ad828b4, 0x0f285651c
dq 0x041d17b64, 0x19425cbba
dq 0x1fae1cc66, 0x010746f3c
dq 0x1a75b4b00, 0x18db37e8a
dq 0x0f872e54c, 0x1c24afea4
dq 0x01e41e9fc, 0x04c144932
dq 0x086d8e4d2, 0x0271d9844
dq 0x160f7af7a, 0x052148f02
dq 0x05bb8f1bc, 0x08e766a0c
dq 0x0a90fd27a, 0x0a3c6f37a
dq 0x0b3af077a, 0x093a5f730
dq 0x04984d782, 0x1d22c238e
dq 0x0ca6ef3ac, 0x06cb08e5c
dq 0x0234e0b26, 0x063ded06a
dq 0x1d88abd4a, 0x06b749fb2
dq 0x04597456a, 0x04d56973c
dq 0x0e9e28eb4, 0x1167f94f2
dq 0x07b3ff57a, 0x19385bf2e
dq 0x0c9c8b782, 0x0cec3662e
dq 0x13a9cba9e, 0x0e417f38a
dq 0x093e106a4, 0x19329634a
dq 0x167001a9c, 0x14e727980
dq 0x1ddffc5d4, 0x0e6fc4e6a
dq 0x00df04680, 0x0d104b8fc
dq 0x02342001e, 0x08227bb8a
dq 0x00a2a8d7e, 0x05b397730
dq 0x168763fa6, 0x0b0cd4768
dq 0x1ed5a407a, 0x0e78eb416
dq 0x0d2c3ed1a, 0x13c2b89c4
dq 0x0995a5724, 0x1641378f0
dq 0x19b1afbc4, 0x0d7a4825c
dq 0x109ffedc0, 0x08d96551c
dq 0x0f2271e60, 0x10f5ff2ba
dq 0x00b0bf8ca, 0x00bf80dd2
dq 0x123888b7a, 0x00167d312
dq 0x1e888f7dc, 0x18dcddd1c
dq 0x002ee03b2, 0x0f6076544
dq 0x183e8d8fe, 0x06a45d2b2
dq 0x133d7a042, 0x026f6a60a
dq 0x116b0f50c, 0x1dd3e10e8
dq 0x05fabe670, 0x1a2adb74e
dq 0x130004488, 0x0de87806c
dq 0x000bcf5f6, 0x19d34af3a
dq 0x18f0c7078, 0x014338754
dq 0x017f27698, 0x049c3cc9c
dq 0x058ca5f00, 0x15e3e77ee
dq 0x1af900c24, 0x068bce87a
dq 0x0b5cfca28, 0x0dd07448e
dq 0x0ded288f8, 0x1524fa6c6
dq 0x059f229bc, 0x1d8048348
dq 0x06d390dec, 0x16cba8aca
dq 0x037170390, 0x0a3e3e02c
dq 0x06353c1cc, 0x042d98888
dq 0x0c4584f5c, 0x0d73c7bea
dq 0x1f16a3418, 0x1329d9f7e
dq 0x0531377e2, 0x185137662
dq 0x1d8d9ca7c, 0x1b1c69528
dq 0x0b25b29f2, 0x18a08b5bc
dq 0x19fb2a8b0, 0x02178513a
dq 0x1a08fe6ac, 0x1da758ae0
dq 0x045cddf4e, 0x0e0ac139e
dq 0x1a91647f2, 0x169cf9eb0
dq 0x1a0f717c4, 0x0170076fa
;;; func core, ver, snum
slversion crc32_iscsi_01, 01, 04, 0015
|
extension-spark-sql/src/main/antlr4/listart/parser/MySqlBase.g4 | listart/bd0homework | 0 | 6276 | grammar MySqlBase;
@parser::members {
/**
* When false, INTERSECT is given the greater precedence over the other set
* operations (UNION, EXCEPT and MINUS) as per the SQL standard.
*/
public boolean legacy_setops_precedence_enbled = false;
/**
* When false, a literal with an exponent would be converted into
* double type rather than decimal type.
*/
public boolean legacy_exponent_literal_as_decimal_enabled = false;
/**
* When true, the behavior of keywords follows ANSI SQL standard.
*/
public boolean SQL_standard_keyword_behavior = false;
}
@lexer::members {
/**
* Verify whether current token is a valid decimal token (which contains dot).
* Returns true if the character that follows the token is not a digit or letter or underscore.
*
* For example:
* For char stream "2.3", "2." is not a valid decimal token, because it is followed by digit '3'.
* For char stream "2.3_", "2.3" is not a valid decimal token, because it is followed by '_'.
* For char stream "2.3W", "2.3" is not a valid decimal token, because it is followed by 'W'.
* For char stream "12.0D 34.E2+0.12 " 12.0D is a valid decimal token because it is followed
* by a space. 34.E2 is a valid decimal token because it is followed by symbol '+'
* which is not a digit or letter or underscore.
*/
public boolean isValidDecimal() {
int nextChar = _input.LA(1);
if (nextChar >= 'A' && nextChar <= 'Z' || nextChar >= '0' && nextChar <= '9' ||
nextChar == '_') {
return false;
} else {
return true;
}
}
/**
* This method will be called when we see '/*' and try to match it as a bracketed comment.
* If the next character is '+', it should be parsed as hint later, and we cannot match
* it as a bracketed comment.
*
* Returns true if the next character is '+'.
*/
public boolean isHint() {
int nextChar = _input.LA(1);
if (nextChar == '+') {
return true;
} else {
return false;
}
}
}
singleStatement
: statement EOF
;
statement
: SHOW VERSION #showVersion
| .*? #passThrough
;
ansiNonReserved
: SHOW | VERSION
;
nonReserved
: SHOW | VERSION
;
// NOTE: If you add a new token in the list below, you should update the list of keywords
// and reserved tag in `docs/sql-ref-ansi-compliance.md#sql-keywords`.
//============================
// Start of the keywords list
//============================
//--SPARK-KEYWORD-LIST-START
SHOW: 'SHOW';
VERSION: 'VERSION';
//--SPARK-KEYWORD-LIST-END
//============================
// End of the keywords list
//============================
WS
: [ \r\n\t]+ -> channel(HIDDEN)
;
// Catch-all for anything we can't recognize.
// We use this to be able to ignore and recover all the text
// when splitting statements with DelimiterLexer
UNRECOGNIZED
: .
;
|
cat.asm | tzulang/os2 | 0 | 161048 |
_cat: file format elf32-i386
Disassembly of section .text:
00000000 <cat>:
char buf[512];
void
cat(int fd)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 28 sub $0x28,%esp
int n;
while((n = read(fd, buf, sizeof(buf))) > 0)
6: eb 1b jmp 23 <cat+0x23>
write(1, buf, n);
8: 8b 45 f4 mov -0xc(%ebp),%eax
b: 89 44 24 08 mov %eax,0x8(%esp)
f: c7 44 24 04 00 16 00 movl $0x1600,0x4(%esp)
16: 00
17: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1e: e8 82 03 00 00 call 3a5 <write>
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0)
23: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
2a: 00
2b: c7 44 24 04 00 16 00 movl $0x1600,0x4(%esp)
32: 00
33: 8b 45 08 mov 0x8(%ebp),%eax
36: 89 04 24 mov %eax,(%esp)
39: e8 5f 03 00 00 call 39d <read>
3e: 89 45 f4 mov %eax,-0xc(%ebp)
41: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
45: 7f c1 jg 8 <cat+0x8>
write(1, buf, n);
if(n < 0){
47: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
4b: 79 19 jns 66 <cat+0x66>
printf(1, "cat: read error\n");
4d: c7 44 24 04 e7 10 00 movl $0x10e7,0x4(%esp)
54: 00
55: c7 04 24 01 00 00 00 movl $0x1,(%esp)
5c: e8 ec 04 00 00 call 54d <printf>
exit();
61: e8 1f 03 00 00 call 385 <exit>
}
}
66: c9 leave
67: c3 ret
00000068 <main>:
int
main(int argc, char *argv[])
{
68: 55 push %ebp
69: 89 e5 mov %esp,%ebp
6b: 83 e4 f0 and $0xfffffff0,%esp
6e: 83 ec 20 sub $0x20,%esp
int fd, i;
if(argc <= 1){
71: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
75: 7f 11 jg 88 <main+0x20>
cat(0);
77: c7 04 24 00 00 00 00 movl $0x0,(%esp)
7e: e8 7d ff ff ff call 0 <cat>
exit();
83: e8 fd 02 00 00 call 385 <exit>
}
for(i = 1; i < argc; i++){
88: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
8f: 00
90: eb 79 jmp 10b <main+0xa3>
if((fd = open(argv[i], 0)) < 0){
92: 8b 44 24 1c mov 0x1c(%esp),%eax
96: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
9d: 8b 45 0c mov 0xc(%ebp),%eax
a0: 01 d0 add %edx,%eax
a2: 8b 00 mov (%eax),%eax
a4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
ab: 00
ac: 89 04 24 mov %eax,(%esp)
af: e8 11 03 00 00 call 3c5 <open>
b4: 89 44 24 18 mov %eax,0x18(%esp)
b8: 83 7c 24 18 00 cmpl $0x0,0x18(%esp)
bd: 79 2f jns ee <main+0x86>
printf(1, "cat: cannot open %s\n", argv[i]);
bf: 8b 44 24 1c mov 0x1c(%esp),%eax
c3: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
ca: 8b 45 0c mov 0xc(%ebp),%eax
cd: 01 d0 add %edx,%eax
cf: 8b 00 mov (%eax),%eax
d1: 89 44 24 08 mov %eax,0x8(%esp)
d5: c7 44 24 04 f8 10 00 movl $0x10f8,0x4(%esp)
dc: 00
dd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
e4: e8 64 04 00 00 call 54d <printf>
exit();
e9: e8 97 02 00 00 call 385 <exit>
}
cat(fd);
ee: 8b 44 24 18 mov 0x18(%esp),%eax
f2: 89 04 24 mov %eax,(%esp)
f5: e8 06 ff ff ff call 0 <cat>
close(fd);
fa: 8b 44 24 18 mov 0x18(%esp),%eax
fe: 89 04 24 mov %eax,(%esp)
101: e8 a7 02 00 00 call 3ad <close>
if(argc <= 1){
cat(0);
exit();
}
for(i = 1; i < argc; i++){
106: 83 44 24 1c 01 addl $0x1,0x1c(%esp)
10b: 8b 44 24 1c mov 0x1c(%esp),%eax
10f: 3b 45 08 cmp 0x8(%ebp),%eax
112: 0f 8c 7a ff ff ff jl 92 <main+0x2a>
exit();
}
cat(fd);
close(fd);
}
exit();
118: e8 68 02 00 00 call 385 <exit>
0000011d <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
11d: 55 push %ebp
11e: 89 e5 mov %esp,%ebp
120: 57 push %edi
121: 53 push %ebx
asm volatile("cld; rep stosb" :
122: 8b 4d 08 mov 0x8(%ebp),%ecx
125: 8b 55 10 mov 0x10(%ebp),%edx
128: 8b 45 0c mov 0xc(%ebp),%eax
12b: 89 cb mov %ecx,%ebx
12d: 89 df mov %ebx,%edi
12f: 89 d1 mov %edx,%ecx
131: fc cld
132: f3 aa rep stos %al,%es:(%edi)
134: 89 ca mov %ecx,%edx
136: 89 fb mov %edi,%ebx
138: 89 5d 08 mov %ebx,0x8(%ebp)
13b: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
13e: 5b pop %ebx
13f: 5f pop %edi
140: 5d pop %ebp
141: c3 ret
00000142 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
142: 55 push %ebp
143: 89 e5 mov %esp,%ebp
145: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
148: 8b 45 08 mov 0x8(%ebp),%eax
14b: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
14e: 90 nop
14f: 8b 45 08 mov 0x8(%ebp),%eax
152: 8d 50 01 lea 0x1(%eax),%edx
155: 89 55 08 mov %edx,0x8(%ebp)
158: 8b 55 0c mov 0xc(%ebp),%edx
15b: 8d 4a 01 lea 0x1(%edx),%ecx
15e: 89 4d 0c mov %ecx,0xc(%ebp)
161: 0f b6 12 movzbl (%edx),%edx
164: 88 10 mov %dl,(%eax)
166: 0f b6 00 movzbl (%eax),%eax
169: 84 c0 test %al,%al
16b: 75 e2 jne 14f <strcpy+0xd>
;
return os;
16d: 8b 45 fc mov -0x4(%ebp),%eax
}
170: c9 leave
171: c3 ret
00000172 <strcmp>:
int
strcmp(const char *p, const char *q)
{
172: 55 push %ebp
173: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
175: eb 08 jmp 17f <strcmp+0xd>
p++, q++;
177: 83 45 08 01 addl $0x1,0x8(%ebp)
17b: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
17f: 8b 45 08 mov 0x8(%ebp),%eax
182: 0f b6 00 movzbl (%eax),%eax
185: 84 c0 test %al,%al
187: 74 10 je 199 <strcmp+0x27>
189: 8b 45 08 mov 0x8(%ebp),%eax
18c: 0f b6 10 movzbl (%eax),%edx
18f: 8b 45 0c mov 0xc(%ebp),%eax
192: 0f b6 00 movzbl (%eax),%eax
195: 38 c2 cmp %al,%dl
197: 74 de je 177 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
199: 8b 45 08 mov 0x8(%ebp),%eax
19c: 0f b6 00 movzbl (%eax),%eax
19f: 0f b6 d0 movzbl %al,%edx
1a2: 8b 45 0c mov 0xc(%ebp),%eax
1a5: 0f b6 00 movzbl (%eax),%eax
1a8: 0f b6 c0 movzbl %al,%eax
1ab: 29 c2 sub %eax,%edx
1ad: 89 d0 mov %edx,%eax
}
1af: 5d pop %ebp
1b0: c3 ret
000001b1 <strlen>:
uint
strlen(char *s)
{
1b1: 55 push %ebp
1b2: 89 e5 mov %esp,%ebp
1b4: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
1b7: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
1be: eb 04 jmp 1c4 <strlen+0x13>
1c0: 83 45 fc 01 addl $0x1,-0x4(%ebp)
1c4: 8b 55 fc mov -0x4(%ebp),%edx
1c7: 8b 45 08 mov 0x8(%ebp),%eax
1ca: 01 d0 add %edx,%eax
1cc: 0f b6 00 movzbl (%eax),%eax
1cf: 84 c0 test %al,%al
1d1: 75 ed jne 1c0 <strlen+0xf>
;
return n;
1d3: 8b 45 fc mov -0x4(%ebp),%eax
}
1d6: c9 leave
1d7: c3 ret
000001d8 <memset>:
void*
memset(void *dst, int c, uint n)
{
1d8: 55 push %ebp
1d9: 89 e5 mov %esp,%ebp
1db: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
1de: 8b 45 10 mov 0x10(%ebp),%eax
1e1: 89 44 24 08 mov %eax,0x8(%esp)
1e5: 8b 45 0c mov 0xc(%ebp),%eax
1e8: 89 44 24 04 mov %eax,0x4(%esp)
1ec: 8b 45 08 mov 0x8(%ebp),%eax
1ef: 89 04 24 mov %eax,(%esp)
1f2: e8 26 ff ff ff call 11d <stosb>
return dst;
1f7: 8b 45 08 mov 0x8(%ebp),%eax
}
1fa: c9 leave
1fb: c3 ret
000001fc <strchr>:
char*
strchr(const char *s, char c)
{
1fc: 55 push %ebp
1fd: 89 e5 mov %esp,%ebp
1ff: 83 ec 04 sub $0x4,%esp
202: 8b 45 0c mov 0xc(%ebp),%eax
205: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
208: eb 14 jmp 21e <strchr+0x22>
if(*s == c)
20a: 8b 45 08 mov 0x8(%ebp),%eax
20d: 0f b6 00 movzbl (%eax),%eax
210: 3a 45 fc cmp -0x4(%ebp),%al
213: 75 05 jne 21a <strchr+0x1e>
return (char*)s;
215: 8b 45 08 mov 0x8(%ebp),%eax
218: eb 13 jmp 22d <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
21a: 83 45 08 01 addl $0x1,0x8(%ebp)
21e: 8b 45 08 mov 0x8(%ebp),%eax
221: 0f b6 00 movzbl (%eax),%eax
224: 84 c0 test %al,%al
226: 75 e2 jne 20a <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
228: b8 00 00 00 00 mov $0x0,%eax
}
22d: c9 leave
22e: c3 ret
0000022f <gets>:
char*
gets(char *buf, int max)
{
22f: 55 push %ebp
230: 89 e5 mov %esp,%ebp
232: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
235: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
23c: eb 4c jmp 28a <gets+0x5b>
cc = read(0, &c, 1);
23e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
245: 00
246: 8d 45 ef lea -0x11(%ebp),%eax
249: 89 44 24 04 mov %eax,0x4(%esp)
24d: c7 04 24 00 00 00 00 movl $0x0,(%esp)
254: e8 44 01 00 00 call 39d <read>
259: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
25c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
260: 7f 02 jg 264 <gets+0x35>
break;
262: eb 31 jmp 295 <gets+0x66>
buf[i++] = c;
264: 8b 45 f4 mov -0xc(%ebp),%eax
267: 8d 50 01 lea 0x1(%eax),%edx
26a: 89 55 f4 mov %edx,-0xc(%ebp)
26d: 89 c2 mov %eax,%edx
26f: 8b 45 08 mov 0x8(%ebp),%eax
272: 01 c2 add %eax,%edx
274: 0f b6 45 ef movzbl -0x11(%ebp),%eax
278: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
27a: 0f b6 45 ef movzbl -0x11(%ebp),%eax
27e: 3c 0a cmp $0xa,%al
280: 74 13 je 295 <gets+0x66>
282: 0f b6 45 ef movzbl -0x11(%ebp),%eax
286: 3c 0d cmp $0xd,%al
288: 74 0b je 295 <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
28a: 8b 45 f4 mov -0xc(%ebp),%eax
28d: 83 c0 01 add $0x1,%eax
290: 3b 45 0c cmp 0xc(%ebp),%eax
293: 7c a9 jl 23e <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
295: 8b 55 f4 mov -0xc(%ebp),%edx
298: 8b 45 08 mov 0x8(%ebp),%eax
29b: 01 d0 add %edx,%eax
29d: c6 00 00 movb $0x0,(%eax)
return buf;
2a0: 8b 45 08 mov 0x8(%ebp),%eax
}
2a3: c9 leave
2a4: c3 ret
000002a5 <stat>:
int
stat(char *n, struct stat *st)
{
2a5: 55 push %ebp
2a6: 89 e5 mov %esp,%ebp
2a8: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
2ab: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
2b2: 00
2b3: 8b 45 08 mov 0x8(%ebp),%eax
2b6: 89 04 24 mov %eax,(%esp)
2b9: e8 07 01 00 00 call 3c5 <open>
2be: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
2c1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2c5: 79 07 jns 2ce <stat+0x29>
return -1;
2c7: b8 ff ff ff ff mov $0xffffffff,%eax
2cc: eb 23 jmp 2f1 <stat+0x4c>
r = fstat(fd, st);
2ce: 8b 45 0c mov 0xc(%ebp),%eax
2d1: 89 44 24 04 mov %eax,0x4(%esp)
2d5: 8b 45 f4 mov -0xc(%ebp),%eax
2d8: 89 04 24 mov %eax,(%esp)
2db: e8 fd 00 00 00 call 3dd <fstat>
2e0: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
2e3: 8b 45 f4 mov -0xc(%ebp),%eax
2e6: 89 04 24 mov %eax,(%esp)
2e9: e8 bf 00 00 00 call 3ad <close>
return r;
2ee: 8b 45 f0 mov -0x10(%ebp),%eax
}
2f1: c9 leave
2f2: c3 ret
000002f3 <atoi>:
int
atoi(const char *s)
{
2f3: 55 push %ebp
2f4: 89 e5 mov %esp,%ebp
2f6: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
2f9: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
300: eb 25 jmp 327 <atoi+0x34>
n = n*10 + *s++ - '0';
302: 8b 55 fc mov -0x4(%ebp),%edx
305: 89 d0 mov %edx,%eax
307: c1 e0 02 shl $0x2,%eax
30a: 01 d0 add %edx,%eax
30c: 01 c0 add %eax,%eax
30e: 89 c1 mov %eax,%ecx
310: 8b 45 08 mov 0x8(%ebp),%eax
313: 8d 50 01 lea 0x1(%eax),%edx
316: 89 55 08 mov %edx,0x8(%ebp)
319: 0f b6 00 movzbl (%eax),%eax
31c: 0f be c0 movsbl %al,%eax
31f: 01 c8 add %ecx,%eax
321: 83 e8 30 sub $0x30,%eax
324: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
327: 8b 45 08 mov 0x8(%ebp),%eax
32a: 0f b6 00 movzbl (%eax),%eax
32d: 3c 2f cmp $0x2f,%al
32f: 7e 0a jle 33b <atoi+0x48>
331: 8b 45 08 mov 0x8(%ebp),%eax
334: 0f b6 00 movzbl (%eax),%eax
337: 3c 39 cmp $0x39,%al
339: 7e c7 jle 302 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
33b: 8b 45 fc mov -0x4(%ebp),%eax
}
33e: c9 leave
33f: c3 ret
00000340 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
340: 55 push %ebp
341: 89 e5 mov %esp,%ebp
343: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
346: 8b 45 08 mov 0x8(%ebp),%eax
349: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
34c: 8b 45 0c mov 0xc(%ebp),%eax
34f: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
352: eb 17 jmp 36b <memmove+0x2b>
*dst++ = *src++;
354: 8b 45 fc mov -0x4(%ebp),%eax
357: 8d 50 01 lea 0x1(%eax),%edx
35a: 89 55 fc mov %edx,-0x4(%ebp)
35d: 8b 55 f8 mov -0x8(%ebp),%edx
360: 8d 4a 01 lea 0x1(%edx),%ecx
363: 89 4d f8 mov %ecx,-0x8(%ebp)
366: 0f b6 12 movzbl (%edx),%edx
369: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
36b: 8b 45 10 mov 0x10(%ebp),%eax
36e: 8d 50 ff lea -0x1(%eax),%edx
371: 89 55 10 mov %edx,0x10(%ebp)
374: 85 c0 test %eax,%eax
376: 7f dc jg 354 <memmove+0x14>
*dst++ = *src++;
return vdst;
378: 8b 45 08 mov 0x8(%ebp),%eax
}
37b: c9 leave
37c: c3 ret
0000037d <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
37d: b8 01 00 00 00 mov $0x1,%eax
382: cd 40 int $0x40
384: c3 ret
00000385 <exit>:
SYSCALL(exit)
385: b8 02 00 00 00 mov $0x2,%eax
38a: cd 40 int $0x40
38c: c3 ret
0000038d <wait>:
SYSCALL(wait)
38d: b8 03 00 00 00 mov $0x3,%eax
392: cd 40 int $0x40
394: c3 ret
00000395 <pipe>:
SYSCALL(pipe)
395: b8 04 00 00 00 mov $0x4,%eax
39a: cd 40 int $0x40
39c: c3 ret
0000039d <read>:
SYSCALL(read)
39d: b8 05 00 00 00 mov $0x5,%eax
3a2: cd 40 int $0x40
3a4: c3 ret
000003a5 <write>:
SYSCALL(write)
3a5: b8 10 00 00 00 mov $0x10,%eax
3aa: cd 40 int $0x40
3ac: c3 ret
000003ad <close>:
SYSCALL(close)
3ad: b8 15 00 00 00 mov $0x15,%eax
3b2: cd 40 int $0x40
3b4: c3 ret
000003b5 <kill>:
SYSCALL(kill)
3b5: b8 06 00 00 00 mov $0x6,%eax
3ba: cd 40 int $0x40
3bc: c3 ret
000003bd <exec>:
SYSCALL(exec)
3bd: b8 07 00 00 00 mov $0x7,%eax
3c2: cd 40 int $0x40
3c4: c3 ret
000003c5 <open>:
SYSCALL(open)
3c5: b8 0f 00 00 00 mov $0xf,%eax
3ca: cd 40 int $0x40
3cc: c3 ret
000003cd <mknod>:
SYSCALL(mknod)
3cd: b8 11 00 00 00 mov $0x11,%eax
3d2: cd 40 int $0x40
3d4: c3 ret
000003d5 <unlink>:
SYSCALL(unlink)
3d5: b8 12 00 00 00 mov $0x12,%eax
3da: cd 40 int $0x40
3dc: c3 ret
000003dd <fstat>:
SYSCALL(fstat)
3dd: b8 08 00 00 00 mov $0x8,%eax
3e2: cd 40 int $0x40
3e4: c3 ret
000003e5 <link>:
SYSCALL(link)
3e5: b8 13 00 00 00 mov $0x13,%eax
3ea: cd 40 int $0x40
3ec: c3 ret
000003ed <mkdir>:
SYSCALL(mkdir)
3ed: b8 14 00 00 00 mov $0x14,%eax
3f2: cd 40 int $0x40
3f4: c3 ret
000003f5 <chdir>:
SYSCALL(chdir)
3f5: b8 09 00 00 00 mov $0x9,%eax
3fa: cd 40 int $0x40
3fc: c3 ret
000003fd <dup>:
SYSCALL(dup)
3fd: b8 0a 00 00 00 mov $0xa,%eax
402: cd 40 int $0x40
404: c3 ret
00000405 <getpid>:
SYSCALL(getpid)
405: b8 0b 00 00 00 mov $0xb,%eax
40a: cd 40 int $0x40
40c: c3 ret
0000040d <sbrk>:
SYSCALL(sbrk)
40d: b8 0c 00 00 00 mov $0xc,%eax
412: cd 40 int $0x40
414: c3 ret
00000415 <sleep>:
SYSCALL(sleep)
415: b8 0d 00 00 00 mov $0xd,%eax
41a: cd 40 int $0x40
41c: c3 ret
0000041d <uptime>:
SYSCALL(uptime)
41d: b8 0e 00 00 00 mov $0xe,%eax
422: cd 40 int $0x40
424: c3 ret
00000425 <kthread_create>:
SYSCALL(kthread_create)
425: b8 16 00 00 00 mov $0x16,%eax
42a: cd 40 int $0x40
42c: c3 ret
0000042d <kthread_id>:
SYSCALL(kthread_id)
42d: b8 17 00 00 00 mov $0x17,%eax
432: cd 40 int $0x40
434: c3 ret
00000435 <kthread_exit>:
SYSCALL(kthread_exit)
435: b8 18 00 00 00 mov $0x18,%eax
43a: cd 40 int $0x40
43c: c3 ret
0000043d <kthread_join>:
SYSCALL(kthread_join)
43d: b8 19 00 00 00 mov $0x19,%eax
442: cd 40 int $0x40
444: c3 ret
00000445 <kthread_mutex_alloc>:
SYSCALL(kthread_mutex_alloc)
445: b8 1a 00 00 00 mov $0x1a,%eax
44a: cd 40 int $0x40
44c: c3 ret
0000044d <kthread_mutex_dealloc>:
SYSCALL(kthread_mutex_dealloc)
44d: b8 1b 00 00 00 mov $0x1b,%eax
452: cd 40 int $0x40
454: c3 ret
00000455 <kthread_mutex_lock>:
SYSCALL(kthread_mutex_lock)
455: b8 1c 00 00 00 mov $0x1c,%eax
45a: cd 40 int $0x40
45c: c3 ret
0000045d <kthread_mutex_unlock>:
SYSCALL(kthread_mutex_unlock)
45d: b8 1d 00 00 00 mov $0x1d,%eax
462: cd 40 int $0x40
464: c3 ret
00000465 <kthread_mutex_yieldlock>:
465: b8 1e 00 00 00 mov $0x1e,%eax
46a: cd 40 int $0x40
46c: c3 ret
0000046d <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
46d: 55 push %ebp
46e: 89 e5 mov %esp,%ebp
470: 83 ec 18 sub $0x18,%esp
473: 8b 45 0c mov 0xc(%ebp),%eax
476: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
479: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
480: 00
481: 8d 45 f4 lea -0xc(%ebp),%eax
484: 89 44 24 04 mov %eax,0x4(%esp)
488: 8b 45 08 mov 0x8(%ebp),%eax
48b: 89 04 24 mov %eax,(%esp)
48e: e8 12 ff ff ff call 3a5 <write>
}
493: c9 leave
494: c3 ret
00000495 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
495: 55 push %ebp
496: 89 e5 mov %esp,%ebp
498: 56 push %esi
499: 53 push %ebx
49a: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
49d: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
4a4: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
4a8: 74 17 je 4c1 <printint+0x2c>
4aa: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
4ae: 79 11 jns 4c1 <printint+0x2c>
neg = 1;
4b0: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
4b7: 8b 45 0c mov 0xc(%ebp),%eax
4ba: f7 d8 neg %eax
4bc: 89 45 ec mov %eax,-0x14(%ebp)
4bf: eb 06 jmp 4c7 <printint+0x32>
} else {
x = xx;
4c1: 8b 45 0c mov 0xc(%ebp),%eax
4c4: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
4c7: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
4ce: 8b 4d f4 mov -0xc(%ebp),%ecx
4d1: 8d 41 01 lea 0x1(%ecx),%eax
4d4: 89 45 f4 mov %eax,-0xc(%ebp)
4d7: 8b 5d 10 mov 0x10(%ebp),%ebx
4da: 8b 45 ec mov -0x14(%ebp),%eax
4dd: ba 00 00 00 00 mov $0x0,%edx
4e2: f7 f3 div %ebx
4e4: 89 d0 mov %edx,%eax
4e6: 0f b6 80 b8 15 00 00 movzbl 0x15b8(%eax),%eax
4ed: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
4f1: 8b 75 10 mov 0x10(%ebp),%esi
4f4: 8b 45 ec mov -0x14(%ebp),%eax
4f7: ba 00 00 00 00 mov $0x0,%edx
4fc: f7 f6 div %esi
4fe: 89 45 ec mov %eax,-0x14(%ebp)
501: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
505: 75 c7 jne 4ce <printint+0x39>
if(neg)
507: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
50b: 74 10 je 51d <printint+0x88>
buf[i++] = '-';
50d: 8b 45 f4 mov -0xc(%ebp),%eax
510: 8d 50 01 lea 0x1(%eax),%edx
513: 89 55 f4 mov %edx,-0xc(%ebp)
516: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
51b: eb 1f jmp 53c <printint+0xa7>
51d: eb 1d jmp 53c <printint+0xa7>
putc(fd, buf[i]);
51f: 8d 55 dc lea -0x24(%ebp),%edx
522: 8b 45 f4 mov -0xc(%ebp),%eax
525: 01 d0 add %edx,%eax
527: 0f b6 00 movzbl (%eax),%eax
52a: 0f be c0 movsbl %al,%eax
52d: 89 44 24 04 mov %eax,0x4(%esp)
531: 8b 45 08 mov 0x8(%ebp),%eax
534: 89 04 24 mov %eax,(%esp)
537: e8 31 ff ff ff call 46d <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
53c: 83 6d f4 01 subl $0x1,-0xc(%ebp)
540: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
544: 79 d9 jns 51f <printint+0x8a>
putc(fd, buf[i]);
}
546: 83 c4 30 add $0x30,%esp
549: 5b pop %ebx
54a: 5e pop %esi
54b: 5d pop %ebp
54c: c3 ret
0000054d <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
54d: 55 push %ebp
54e: 89 e5 mov %esp,%ebp
550: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
553: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
55a: 8d 45 0c lea 0xc(%ebp),%eax
55d: 83 c0 04 add $0x4,%eax
560: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
563: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
56a: e9 7c 01 00 00 jmp 6eb <printf+0x19e>
c = fmt[i] & 0xff;
56f: 8b 55 0c mov 0xc(%ebp),%edx
572: 8b 45 f0 mov -0x10(%ebp),%eax
575: 01 d0 add %edx,%eax
577: 0f b6 00 movzbl (%eax),%eax
57a: 0f be c0 movsbl %al,%eax
57d: 25 ff 00 00 00 and $0xff,%eax
582: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
585: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
589: 75 2c jne 5b7 <printf+0x6a>
if(c == '%'){
58b: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
58f: 75 0c jne 59d <printf+0x50>
state = '%';
591: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
598: e9 4a 01 00 00 jmp 6e7 <printf+0x19a>
} else {
putc(fd, c);
59d: 8b 45 e4 mov -0x1c(%ebp),%eax
5a0: 0f be c0 movsbl %al,%eax
5a3: 89 44 24 04 mov %eax,0x4(%esp)
5a7: 8b 45 08 mov 0x8(%ebp),%eax
5aa: 89 04 24 mov %eax,(%esp)
5ad: e8 bb fe ff ff call 46d <putc>
5b2: e9 30 01 00 00 jmp 6e7 <printf+0x19a>
}
} else if(state == '%'){
5b7: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
5bb: 0f 85 26 01 00 00 jne 6e7 <printf+0x19a>
if(c == 'd'){
5c1: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
5c5: 75 2d jne 5f4 <printf+0xa7>
printint(fd, *ap, 10, 1);
5c7: 8b 45 e8 mov -0x18(%ebp),%eax
5ca: 8b 00 mov (%eax),%eax
5cc: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
5d3: 00
5d4: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
5db: 00
5dc: 89 44 24 04 mov %eax,0x4(%esp)
5e0: 8b 45 08 mov 0x8(%ebp),%eax
5e3: 89 04 24 mov %eax,(%esp)
5e6: e8 aa fe ff ff call 495 <printint>
ap++;
5eb: 83 45 e8 04 addl $0x4,-0x18(%ebp)
5ef: e9 ec 00 00 00 jmp 6e0 <printf+0x193>
} else if(c == 'x' || c == 'p'){
5f4: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
5f8: 74 06 je 600 <printf+0xb3>
5fa: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
5fe: 75 2d jne 62d <printf+0xe0>
printint(fd, *ap, 16, 0);
600: 8b 45 e8 mov -0x18(%ebp),%eax
603: 8b 00 mov (%eax),%eax
605: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
60c: 00
60d: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
614: 00
615: 89 44 24 04 mov %eax,0x4(%esp)
619: 8b 45 08 mov 0x8(%ebp),%eax
61c: 89 04 24 mov %eax,(%esp)
61f: e8 71 fe ff ff call 495 <printint>
ap++;
624: 83 45 e8 04 addl $0x4,-0x18(%ebp)
628: e9 b3 00 00 00 jmp 6e0 <printf+0x193>
} else if(c == 's'){
62d: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
631: 75 45 jne 678 <printf+0x12b>
s = (char*)*ap;
633: 8b 45 e8 mov -0x18(%ebp),%eax
636: 8b 00 mov (%eax),%eax
638: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
63b: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
63f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
643: 75 09 jne 64e <printf+0x101>
s = "(null)";
645: c7 45 f4 0d 11 00 00 movl $0x110d,-0xc(%ebp)
while(*s != 0){
64c: eb 1e jmp 66c <printf+0x11f>
64e: eb 1c jmp 66c <printf+0x11f>
putc(fd, *s);
650: 8b 45 f4 mov -0xc(%ebp),%eax
653: 0f b6 00 movzbl (%eax),%eax
656: 0f be c0 movsbl %al,%eax
659: 89 44 24 04 mov %eax,0x4(%esp)
65d: 8b 45 08 mov 0x8(%ebp),%eax
660: 89 04 24 mov %eax,(%esp)
663: e8 05 fe ff ff call 46d <putc>
s++;
668: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
66c: 8b 45 f4 mov -0xc(%ebp),%eax
66f: 0f b6 00 movzbl (%eax),%eax
672: 84 c0 test %al,%al
674: 75 da jne 650 <printf+0x103>
676: eb 68 jmp 6e0 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
678: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
67c: 75 1d jne 69b <printf+0x14e>
putc(fd, *ap);
67e: 8b 45 e8 mov -0x18(%ebp),%eax
681: 8b 00 mov (%eax),%eax
683: 0f be c0 movsbl %al,%eax
686: 89 44 24 04 mov %eax,0x4(%esp)
68a: 8b 45 08 mov 0x8(%ebp),%eax
68d: 89 04 24 mov %eax,(%esp)
690: e8 d8 fd ff ff call 46d <putc>
ap++;
695: 83 45 e8 04 addl $0x4,-0x18(%ebp)
699: eb 45 jmp 6e0 <printf+0x193>
} else if(c == '%'){
69b: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
69f: 75 17 jne 6b8 <printf+0x16b>
putc(fd, c);
6a1: 8b 45 e4 mov -0x1c(%ebp),%eax
6a4: 0f be c0 movsbl %al,%eax
6a7: 89 44 24 04 mov %eax,0x4(%esp)
6ab: 8b 45 08 mov 0x8(%ebp),%eax
6ae: 89 04 24 mov %eax,(%esp)
6b1: e8 b7 fd ff ff call 46d <putc>
6b6: eb 28 jmp 6e0 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
6b8: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
6bf: 00
6c0: 8b 45 08 mov 0x8(%ebp),%eax
6c3: 89 04 24 mov %eax,(%esp)
6c6: e8 a2 fd ff ff call 46d <putc>
putc(fd, c);
6cb: 8b 45 e4 mov -0x1c(%ebp),%eax
6ce: 0f be c0 movsbl %al,%eax
6d1: 89 44 24 04 mov %eax,0x4(%esp)
6d5: 8b 45 08 mov 0x8(%ebp),%eax
6d8: 89 04 24 mov %eax,(%esp)
6db: e8 8d fd ff ff call 46d <putc>
}
state = 0;
6e0: 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++){
6e7: 83 45 f0 01 addl $0x1,-0x10(%ebp)
6eb: 8b 55 0c mov 0xc(%ebp),%edx
6ee: 8b 45 f0 mov -0x10(%ebp),%eax
6f1: 01 d0 add %edx,%eax
6f3: 0f b6 00 movzbl (%eax),%eax
6f6: 84 c0 test %al,%al
6f8: 0f 85 71 fe ff ff jne 56f <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
6fe: c9 leave
6ff: c3 ret
00000700 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
700: 55 push %ebp
701: 89 e5 mov %esp,%ebp
703: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
706: 8b 45 08 mov 0x8(%ebp),%eax
709: 83 e8 08 sub $0x8,%eax
70c: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
70f: a1 e8 15 00 00 mov 0x15e8,%eax
714: 89 45 fc mov %eax,-0x4(%ebp)
717: eb 24 jmp 73d <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
719: 8b 45 fc mov -0x4(%ebp),%eax
71c: 8b 00 mov (%eax),%eax
71e: 3b 45 fc cmp -0x4(%ebp),%eax
721: 77 12 ja 735 <free+0x35>
723: 8b 45 f8 mov -0x8(%ebp),%eax
726: 3b 45 fc cmp -0x4(%ebp),%eax
729: 77 24 ja 74f <free+0x4f>
72b: 8b 45 fc mov -0x4(%ebp),%eax
72e: 8b 00 mov (%eax),%eax
730: 3b 45 f8 cmp -0x8(%ebp),%eax
733: 77 1a ja 74f <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)
735: 8b 45 fc mov -0x4(%ebp),%eax
738: 8b 00 mov (%eax),%eax
73a: 89 45 fc mov %eax,-0x4(%ebp)
73d: 8b 45 f8 mov -0x8(%ebp),%eax
740: 3b 45 fc cmp -0x4(%ebp),%eax
743: 76 d4 jbe 719 <free+0x19>
745: 8b 45 fc mov -0x4(%ebp),%eax
748: 8b 00 mov (%eax),%eax
74a: 3b 45 f8 cmp -0x8(%ebp),%eax
74d: 76 ca jbe 719 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
74f: 8b 45 f8 mov -0x8(%ebp),%eax
752: 8b 40 04 mov 0x4(%eax),%eax
755: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
75c: 8b 45 f8 mov -0x8(%ebp),%eax
75f: 01 c2 add %eax,%edx
761: 8b 45 fc mov -0x4(%ebp),%eax
764: 8b 00 mov (%eax),%eax
766: 39 c2 cmp %eax,%edx
768: 75 24 jne 78e <free+0x8e>
bp->s.size += p->s.ptr->s.size;
76a: 8b 45 f8 mov -0x8(%ebp),%eax
76d: 8b 50 04 mov 0x4(%eax),%edx
770: 8b 45 fc mov -0x4(%ebp),%eax
773: 8b 00 mov (%eax),%eax
775: 8b 40 04 mov 0x4(%eax),%eax
778: 01 c2 add %eax,%edx
77a: 8b 45 f8 mov -0x8(%ebp),%eax
77d: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
780: 8b 45 fc mov -0x4(%ebp),%eax
783: 8b 00 mov (%eax),%eax
785: 8b 10 mov (%eax),%edx
787: 8b 45 f8 mov -0x8(%ebp),%eax
78a: 89 10 mov %edx,(%eax)
78c: eb 0a jmp 798 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
78e: 8b 45 fc mov -0x4(%ebp),%eax
791: 8b 10 mov (%eax),%edx
793: 8b 45 f8 mov -0x8(%ebp),%eax
796: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
798: 8b 45 fc mov -0x4(%ebp),%eax
79b: 8b 40 04 mov 0x4(%eax),%eax
79e: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
7a5: 8b 45 fc mov -0x4(%ebp),%eax
7a8: 01 d0 add %edx,%eax
7aa: 3b 45 f8 cmp -0x8(%ebp),%eax
7ad: 75 20 jne 7cf <free+0xcf>
p->s.size += bp->s.size;
7af: 8b 45 fc mov -0x4(%ebp),%eax
7b2: 8b 50 04 mov 0x4(%eax),%edx
7b5: 8b 45 f8 mov -0x8(%ebp),%eax
7b8: 8b 40 04 mov 0x4(%eax),%eax
7bb: 01 c2 add %eax,%edx
7bd: 8b 45 fc mov -0x4(%ebp),%eax
7c0: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
7c3: 8b 45 f8 mov -0x8(%ebp),%eax
7c6: 8b 10 mov (%eax),%edx
7c8: 8b 45 fc mov -0x4(%ebp),%eax
7cb: 89 10 mov %edx,(%eax)
7cd: eb 08 jmp 7d7 <free+0xd7>
} else
p->s.ptr = bp;
7cf: 8b 45 fc mov -0x4(%ebp),%eax
7d2: 8b 55 f8 mov -0x8(%ebp),%edx
7d5: 89 10 mov %edx,(%eax)
freep = p;
7d7: 8b 45 fc mov -0x4(%ebp),%eax
7da: a3 e8 15 00 00 mov %eax,0x15e8
}
7df: c9 leave
7e0: c3 ret
000007e1 <morecore>:
static Header*
morecore(uint nu)
{
7e1: 55 push %ebp
7e2: 89 e5 mov %esp,%ebp
7e4: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
7e7: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
7ee: 77 07 ja 7f7 <morecore+0x16>
nu = 4096;
7f0: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
7f7: 8b 45 08 mov 0x8(%ebp),%eax
7fa: c1 e0 03 shl $0x3,%eax
7fd: 89 04 24 mov %eax,(%esp)
800: e8 08 fc ff ff call 40d <sbrk>
805: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
808: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
80c: 75 07 jne 815 <morecore+0x34>
return 0;
80e: b8 00 00 00 00 mov $0x0,%eax
813: eb 22 jmp 837 <morecore+0x56>
hp = (Header*)p;
815: 8b 45 f4 mov -0xc(%ebp),%eax
818: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
81b: 8b 45 f0 mov -0x10(%ebp),%eax
81e: 8b 55 08 mov 0x8(%ebp),%edx
821: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
824: 8b 45 f0 mov -0x10(%ebp),%eax
827: 83 c0 08 add $0x8,%eax
82a: 89 04 24 mov %eax,(%esp)
82d: e8 ce fe ff ff call 700 <free>
return freep;
832: a1 e8 15 00 00 mov 0x15e8,%eax
}
837: c9 leave
838: c3 ret
00000839 <malloc>:
void*
malloc(uint nbytes)
{
839: 55 push %ebp
83a: 89 e5 mov %esp,%ebp
83c: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
83f: 8b 45 08 mov 0x8(%ebp),%eax
842: 83 c0 07 add $0x7,%eax
845: c1 e8 03 shr $0x3,%eax
848: 83 c0 01 add $0x1,%eax
84b: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
84e: a1 e8 15 00 00 mov 0x15e8,%eax
853: 89 45 f0 mov %eax,-0x10(%ebp)
856: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
85a: 75 23 jne 87f <malloc+0x46>
base.s.ptr = freep = prevp = &base;
85c: c7 45 f0 e0 15 00 00 movl $0x15e0,-0x10(%ebp)
863: 8b 45 f0 mov -0x10(%ebp),%eax
866: a3 e8 15 00 00 mov %eax,0x15e8
86b: a1 e8 15 00 00 mov 0x15e8,%eax
870: a3 e0 15 00 00 mov %eax,0x15e0
base.s.size = 0;
875: c7 05 e4 15 00 00 00 movl $0x0,0x15e4
87c: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
87f: 8b 45 f0 mov -0x10(%ebp),%eax
882: 8b 00 mov (%eax),%eax
884: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
887: 8b 45 f4 mov -0xc(%ebp),%eax
88a: 8b 40 04 mov 0x4(%eax),%eax
88d: 3b 45 ec cmp -0x14(%ebp),%eax
890: 72 4d jb 8df <malloc+0xa6>
if(p->s.size == nunits)
892: 8b 45 f4 mov -0xc(%ebp),%eax
895: 8b 40 04 mov 0x4(%eax),%eax
898: 3b 45 ec cmp -0x14(%ebp),%eax
89b: 75 0c jne 8a9 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
89d: 8b 45 f4 mov -0xc(%ebp),%eax
8a0: 8b 10 mov (%eax),%edx
8a2: 8b 45 f0 mov -0x10(%ebp),%eax
8a5: 89 10 mov %edx,(%eax)
8a7: eb 26 jmp 8cf <malloc+0x96>
else {
p->s.size -= nunits;
8a9: 8b 45 f4 mov -0xc(%ebp),%eax
8ac: 8b 40 04 mov 0x4(%eax),%eax
8af: 2b 45 ec sub -0x14(%ebp),%eax
8b2: 89 c2 mov %eax,%edx
8b4: 8b 45 f4 mov -0xc(%ebp),%eax
8b7: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
8ba: 8b 45 f4 mov -0xc(%ebp),%eax
8bd: 8b 40 04 mov 0x4(%eax),%eax
8c0: c1 e0 03 shl $0x3,%eax
8c3: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
8c6: 8b 45 f4 mov -0xc(%ebp),%eax
8c9: 8b 55 ec mov -0x14(%ebp),%edx
8cc: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
8cf: 8b 45 f0 mov -0x10(%ebp),%eax
8d2: a3 e8 15 00 00 mov %eax,0x15e8
return (void*)(p + 1);
8d7: 8b 45 f4 mov -0xc(%ebp),%eax
8da: 83 c0 08 add $0x8,%eax
8dd: eb 38 jmp 917 <malloc+0xde>
}
if(p == freep)
8df: a1 e8 15 00 00 mov 0x15e8,%eax
8e4: 39 45 f4 cmp %eax,-0xc(%ebp)
8e7: 75 1b jne 904 <malloc+0xcb>
if((p = morecore(nunits)) == 0)
8e9: 8b 45 ec mov -0x14(%ebp),%eax
8ec: 89 04 24 mov %eax,(%esp)
8ef: e8 ed fe ff ff call 7e1 <morecore>
8f4: 89 45 f4 mov %eax,-0xc(%ebp)
8f7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8fb: 75 07 jne 904 <malloc+0xcb>
return 0;
8fd: b8 00 00 00 00 mov $0x0,%eax
902: eb 13 jmp 917 <malloc+0xde>
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){
904: 8b 45 f4 mov -0xc(%ebp),%eax
907: 89 45 f0 mov %eax,-0x10(%ebp)
90a: 8b 45 f4 mov -0xc(%ebp),%eax
90d: 8b 00 mov (%eax),%eax
90f: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
912: e9 70 ff ff ff jmp 887 <malloc+0x4e>
}
917: c9 leave
918: c3 ret
00000919 <mesa_slots_monitor_alloc>:
#include "user.h"
mesa_slots_monitor_t* mesa_slots_monitor_alloc(){
919: 55 push %ebp
91a: 89 e5 mov %esp,%ebp
91c: 83 ec 28 sub $0x28,%esp
int mutex= kthread_mutex_alloc() ;
91f: e8 21 fb ff ff call 445 <kthread_mutex_alloc>
924: 89 45 f4 mov %eax,-0xc(%ebp)
if( mutex < 0){
927: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
92b: 79 0a jns 937 <mesa_slots_monitor_alloc+0x1e>
return 0;
92d: b8 00 00 00 00 mov $0x0,%eax
932: e9 8b 00 00 00 jmp 9c2 <mesa_slots_monitor_alloc+0xa9>
}
struct mesa_cond * empty = mesa_cond_alloc();
937: e8 44 06 00 00 call f80 <mesa_cond_alloc>
93c: 89 45 f0 mov %eax,-0x10(%ebp)
if (empty == 0){
93f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
943: 75 12 jne 957 <mesa_slots_monitor_alloc+0x3e>
kthread_mutex_dealloc(mutex);
945: 8b 45 f4 mov -0xc(%ebp),%eax
948: 89 04 24 mov %eax,(%esp)
94b: e8 fd fa ff ff call 44d <kthread_mutex_dealloc>
return 0;
950: b8 00 00 00 00 mov $0x0,%eax
955: eb 6b jmp 9c2 <mesa_slots_monitor_alloc+0xa9>
}
struct mesa_cond * full = mesa_cond_alloc();
957: e8 24 06 00 00 call f80 <mesa_cond_alloc>
95c: 89 45 ec mov %eax,-0x14(%ebp)
if (full == 0){
95f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
963: 75 1d jne 982 <mesa_slots_monitor_alloc+0x69>
kthread_mutex_dealloc(mutex);
965: 8b 45 f4 mov -0xc(%ebp),%eax
968: 89 04 24 mov %eax,(%esp)
96b: e8 dd fa ff ff call 44d <kthread_mutex_dealloc>
mesa_cond_dealloc(empty);
970: 8b 45 f0 mov -0x10(%ebp),%eax
973: 89 04 24 mov %eax,(%esp)
976: e8 46 06 00 00 call fc1 <mesa_cond_dealloc>
return 0;
97b: b8 00 00 00 00 mov $0x0,%eax
980: eb 40 jmp 9c2 <mesa_slots_monitor_alloc+0xa9>
}
mesa_slots_monitor_t * monitor= malloc (sizeof (mesa_slots_monitor_t));
982: c7 04 24 14 00 00 00 movl $0x14,(%esp)
989: e8 ab fe ff ff call 839 <malloc>
98e: 89 45 e8 mov %eax,-0x18(%ebp)
monitor->empty= empty;
991: 8b 45 e8 mov -0x18(%ebp),%eax
994: 8b 55 f0 mov -0x10(%ebp),%edx
997: 89 50 04 mov %edx,0x4(%eax)
monitor->full= full;
99a: 8b 45 e8 mov -0x18(%ebp),%eax
99d: 8b 55 ec mov -0x14(%ebp),%edx
9a0: 89 50 08 mov %edx,0x8(%eax)
monitor->Monitormutex= mutex;
9a3: 8b 45 e8 mov -0x18(%ebp),%eax
9a6: 8b 55 f4 mov -0xc(%ebp),%edx
9a9: 89 10 mov %edx,(%eax)
monitor->slots=0;
9ab: 8b 45 e8 mov -0x18(%ebp),%eax
9ae: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
monitor->active=1;
9b5: 8b 45 e8 mov -0x18(%ebp),%eax
9b8: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
return monitor;
9bf: 8b 45 e8 mov -0x18(%ebp),%eax
}
9c2: c9 leave
9c3: c3 ret
000009c4 <mesa_slots_monitor_dealloc>:
int mesa_slots_monitor_dealloc(mesa_slots_monitor_t* monitor){
9c4: 55 push %ebp
9c5: 89 e5 mov %esp,%ebp
9c7: 83 ec 18 sub $0x18,%esp
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
9ca: 8b 45 08 mov 0x8(%ebp),%eax
9cd: 8b 00 mov (%eax),%eax
9cf: 89 04 24 mov %eax,(%esp)
9d2: e8 76 fa ff ff call 44d <kthread_mutex_dealloc>
9d7: 85 c0 test %eax,%eax
9d9: 78 2e js a09 <mesa_slots_monitor_dealloc+0x45>
mesa_cond_alloc(monitor->empty)<0 ||
9db: 8b 45 08 mov 0x8(%ebp),%eax
9de: 8b 40 04 mov 0x4(%eax),%eax
9e1: 89 04 24 mov %eax,(%esp)
9e4: e8 97 05 00 00 call f80 <mesa_cond_alloc>
mesa_cond_alloc(monitor->full)<0
9e9: 8b 45 08 mov 0x8(%ebp),%eax
9ec: 8b 40 08 mov 0x8(%eax),%eax
9ef: 89 04 24 mov %eax,(%esp)
9f2: e8 89 05 00 00 call f80 <mesa_cond_alloc>
){
return -1;
}
free(monitor);
9f7: 8b 45 08 mov 0x8(%ebp),%eax
9fa: 89 04 24 mov %eax,(%esp)
9fd: e8 fe fc ff ff call 700 <free>
return 0;
a02: b8 00 00 00 00 mov $0x0,%eax
a07: eb 05 jmp a0e <mesa_slots_monitor_dealloc+0x4a>
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
mesa_cond_alloc(monitor->empty)<0 ||
mesa_cond_alloc(monitor->full)<0
){
return -1;
a09: b8 ff ff ff ff mov $0xffffffff,%eax
}
free(monitor);
return 0;
}
a0e: c9 leave
a0f: c3 ret
00000a10 <mesa_slots_monitor_addslots>:
int mesa_slots_monitor_addslots(mesa_slots_monitor_t* monitor,int n){
a10: 55 push %ebp
a11: 89 e5 mov %esp,%ebp
a13: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
a16: 8b 45 08 mov 0x8(%ebp),%eax
a19: 8b 40 10 mov 0x10(%eax),%eax
a1c: 85 c0 test %eax,%eax
a1e: 75 0a jne a2a <mesa_slots_monitor_addslots+0x1a>
return -1;
a20: b8 ff ff ff ff mov $0xffffffff,%eax
a25: e9 81 00 00 00 jmp aab <mesa_slots_monitor_addslots+0x9b>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
a2a: 8b 45 08 mov 0x8(%ebp),%eax
a2d: 8b 00 mov (%eax),%eax
a2f: 89 04 24 mov %eax,(%esp)
a32: e8 1e fa ff ff call 455 <kthread_mutex_lock>
a37: 83 f8 ff cmp $0xffffffff,%eax
a3a: 7d 07 jge a43 <mesa_slots_monitor_addslots+0x33>
return -1;
a3c: b8 ff ff ff ff mov $0xffffffff,%eax
a41: eb 68 jmp aab <mesa_slots_monitor_addslots+0x9b>
while ( monitor->active && monitor->slots > 0 )
a43: eb 17 jmp a5c <mesa_slots_monitor_addslots+0x4c>
{
//printf(1,"grader is sleeping %d\n ", monitor->active);
mesa_cond_wait( monitor->full, monitor->Monitormutex) ;
a45: 8b 45 08 mov 0x8(%ebp),%eax
a48: 8b 10 mov (%eax),%edx
a4a: 8b 45 08 mov 0x8(%ebp),%eax
a4d: 8b 40 08 mov 0x8(%eax),%eax
a50: 89 54 24 04 mov %edx,0x4(%esp)
a54: 89 04 24 mov %eax,(%esp)
a57: e8 af 05 00 00 call 100b <mesa_cond_wait>
return -1;
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
return -1;
while ( monitor->active && monitor->slots > 0 )
a5c: 8b 45 08 mov 0x8(%ebp),%eax
a5f: 8b 40 10 mov 0x10(%eax),%eax
a62: 85 c0 test %eax,%eax
a64: 74 0a je a70 <mesa_slots_monitor_addslots+0x60>
a66: 8b 45 08 mov 0x8(%ebp),%eax
a69: 8b 40 0c mov 0xc(%eax),%eax
a6c: 85 c0 test %eax,%eax
a6e: 7f d5 jg a45 <mesa_slots_monitor_addslots+0x35>
//printf(1,"grader is sleeping %d\n ", monitor->active);
mesa_cond_wait( monitor->full, monitor->Monitormutex) ;
}
if ( monitor->active)
a70: 8b 45 08 mov 0x8(%ebp),%eax
a73: 8b 40 10 mov 0x10(%eax),%eax
a76: 85 c0 test %eax,%eax
a78: 74 11 je a8b <mesa_slots_monitor_addslots+0x7b>
monitor->slots+= n;
a7a: 8b 45 08 mov 0x8(%ebp),%eax
a7d: 8b 50 0c mov 0xc(%eax),%edx
a80: 8b 45 0c mov 0xc(%ebp),%eax
a83: 01 c2 add %eax,%edx
a85: 8b 45 08 mov 0x8(%ebp),%eax
a88: 89 50 0c mov %edx,0xc(%eax)
mesa_cond_signal(monitor->empty);
a8b: 8b 45 08 mov 0x8(%ebp),%eax
a8e: 8b 40 04 mov 0x4(%eax),%eax
a91: 89 04 24 mov %eax,(%esp)
a94: e8 dc 05 00 00 call 1075 <mesa_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
a99: 8b 45 08 mov 0x8(%ebp),%eax
a9c: 8b 00 mov (%eax),%eax
a9e: 89 04 24 mov %eax,(%esp)
aa1: e8 b7 f9 ff ff call 45d <kthread_mutex_unlock>
return 1;
aa6: b8 01 00 00 00 mov $0x1,%eax
}
aab: c9 leave
aac: c3 ret
00000aad <mesa_slots_monitor_takeslot>:
int mesa_slots_monitor_takeslot(mesa_slots_monitor_t* monitor){
aad: 55 push %ebp
aae: 89 e5 mov %esp,%ebp
ab0: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
ab3: 8b 45 08 mov 0x8(%ebp),%eax
ab6: 8b 40 10 mov 0x10(%eax),%eax
ab9: 85 c0 test %eax,%eax
abb: 75 07 jne ac4 <mesa_slots_monitor_takeslot+0x17>
return -1;
abd: b8 ff ff ff ff mov $0xffffffff,%eax
ac2: eb 7f jmp b43 <mesa_slots_monitor_takeslot+0x96>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
ac4: 8b 45 08 mov 0x8(%ebp),%eax
ac7: 8b 00 mov (%eax),%eax
ac9: 89 04 24 mov %eax,(%esp)
acc: e8 84 f9 ff ff call 455 <kthread_mutex_lock>
ad1: 83 f8 ff cmp $0xffffffff,%eax
ad4: 7d 07 jge add <mesa_slots_monitor_takeslot+0x30>
return -1;
ad6: b8 ff ff ff ff mov $0xffffffff,%eax
adb: eb 66 jmp b43 <mesa_slots_monitor_takeslot+0x96>
while ( monitor->active && monitor->slots == 0 )
add: eb 17 jmp af6 <mesa_slots_monitor_takeslot+0x49>
mesa_cond_wait( monitor->empty, monitor->Monitormutex);
adf: 8b 45 08 mov 0x8(%ebp),%eax
ae2: 8b 10 mov (%eax),%edx
ae4: 8b 45 08 mov 0x8(%ebp),%eax
ae7: 8b 40 04 mov 0x4(%eax),%eax
aea: 89 54 24 04 mov %edx,0x4(%esp)
aee: 89 04 24 mov %eax,(%esp)
af1: e8 15 05 00 00 call 100b <mesa_cond_wait>
return -1;
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
return -1;
while ( monitor->active && monitor->slots == 0 )
af6: 8b 45 08 mov 0x8(%ebp),%eax
af9: 8b 40 10 mov 0x10(%eax),%eax
afc: 85 c0 test %eax,%eax
afe: 74 0a je b0a <mesa_slots_monitor_takeslot+0x5d>
b00: 8b 45 08 mov 0x8(%ebp),%eax
b03: 8b 40 0c mov 0xc(%eax),%eax
b06: 85 c0 test %eax,%eax
b08: 74 d5 je adf <mesa_slots_monitor_takeslot+0x32>
mesa_cond_wait( monitor->empty, monitor->Monitormutex);
if ( monitor->active)
b0a: 8b 45 08 mov 0x8(%ebp),%eax
b0d: 8b 40 10 mov 0x10(%eax),%eax
b10: 85 c0 test %eax,%eax
b12: 74 0f je b23 <mesa_slots_monitor_takeslot+0x76>
monitor->slots--;
b14: 8b 45 08 mov 0x8(%ebp),%eax
b17: 8b 40 0c mov 0xc(%eax),%eax
b1a: 8d 50 ff lea -0x1(%eax),%edx
b1d: 8b 45 08 mov 0x8(%ebp),%eax
b20: 89 50 0c mov %edx,0xc(%eax)
mesa_cond_signal(monitor->full);
b23: 8b 45 08 mov 0x8(%ebp),%eax
b26: 8b 40 08 mov 0x8(%eax),%eax
b29: 89 04 24 mov %eax,(%esp)
b2c: e8 44 05 00 00 call 1075 <mesa_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
b31: 8b 45 08 mov 0x8(%ebp),%eax
b34: 8b 00 mov (%eax),%eax
b36: 89 04 24 mov %eax,(%esp)
b39: e8 1f f9 ff ff call 45d <kthread_mutex_unlock>
return 1;
b3e: b8 01 00 00 00 mov $0x1,%eax
}
b43: c9 leave
b44: c3 ret
00000b45 <mesa_slots_monitor_stopadding>:
int mesa_slots_monitor_stopadding(mesa_slots_monitor_t* monitor){
b45: 55 push %ebp
b46: 89 e5 mov %esp,%ebp
b48: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
b4b: 8b 45 08 mov 0x8(%ebp),%eax
b4e: 8b 40 10 mov 0x10(%eax),%eax
b51: 85 c0 test %eax,%eax
b53: 75 07 jne b5c <mesa_slots_monitor_stopadding+0x17>
return -1;
b55: b8 ff ff ff ff mov $0xffffffff,%eax
b5a: eb 35 jmp b91 <mesa_slots_monitor_stopadding+0x4c>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
b5c: 8b 45 08 mov 0x8(%ebp),%eax
b5f: 8b 00 mov (%eax),%eax
b61: 89 04 24 mov %eax,(%esp)
b64: e8 ec f8 ff ff call 455 <kthread_mutex_lock>
b69: 83 f8 ff cmp $0xffffffff,%eax
b6c: 7d 07 jge b75 <mesa_slots_monitor_stopadding+0x30>
return -1;
b6e: b8 ff ff ff ff mov $0xffffffff,%eax
b73: eb 1c jmp b91 <mesa_slots_monitor_stopadding+0x4c>
monitor->active = 0;
b75: 8b 45 08 mov 0x8(%ebp),%eax
b78: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
kthread_mutex_unlock( monitor->Monitormutex );
b7f: 8b 45 08 mov 0x8(%ebp),%eax
b82: 8b 00 mov (%eax),%eax
b84: 89 04 24 mov %eax,(%esp)
b87: e8 d1 f8 ff ff call 45d <kthread_mutex_unlock>
return 0;
b8c: b8 00 00 00 00 mov $0x0,%eax
}
b91: c9 leave
b92: c3 ret
00000b93 <hoare_slots_monitor_alloc>:
#include "stat.h"
#include "user.h"
hoare_slots_monitor_t* hoare_slots_monitor_alloc(){
b93: 55 push %ebp
b94: 89 e5 mov %esp,%ebp
b96: 83 ec 28 sub $0x28,%esp
int mutex= kthread_mutex_alloc() ;
b99: e8 a7 f8 ff ff call 445 <kthread_mutex_alloc>
b9e: 89 45 f4 mov %eax,-0xc(%ebp)
if( mutex < 0)
ba1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
ba5: 79 0a jns bb1 <hoare_slots_monitor_alloc+0x1e>
return 0;
ba7: b8 00 00 00 00 mov $0x0,%eax
bac: e9 8b 00 00 00 jmp c3c <hoare_slots_monitor_alloc+0xa9>
struct hoare_cond * empty = hoare_cond_alloc();
bb1: e8 68 02 00 00 call e1e <hoare_cond_alloc>
bb6: 89 45 f0 mov %eax,-0x10(%ebp)
if (empty == 0){
bb9: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
bbd: 75 12 jne bd1 <hoare_slots_monitor_alloc+0x3e>
kthread_mutex_dealloc(mutex);
bbf: 8b 45 f4 mov -0xc(%ebp),%eax
bc2: 89 04 24 mov %eax,(%esp)
bc5: e8 83 f8 ff ff call 44d <kthread_mutex_dealloc>
return 0;
bca: b8 00 00 00 00 mov $0x0,%eax
bcf: eb 6b jmp c3c <hoare_slots_monitor_alloc+0xa9>
}
hoare_cond_t * full = hoare_cond_alloc();
bd1: e8 48 02 00 00 call e1e <hoare_cond_alloc>
bd6: 89 45 ec mov %eax,-0x14(%ebp)
if (full == 0)
bd9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
bdd: 75 1d jne bfc <hoare_slots_monitor_alloc+0x69>
{
kthread_mutex_dealloc(mutex);
bdf: 8b 45 f4 mov -0xc(%ebp),%eax
be2: 89 04 24 mov %eax,(%esp)
be5: e8 63 f8 ff ff call 44d <kthread_mutex_dealloc>
hoare_cond_dealloc(empty);
bea: 8b 45 f0 mov -0x10(%ebp),%eax
bed: 89 04 24 mov %eax,(%esp)
bf0: e8 6a 02 00 00 call e5f <hoare_cond_dealloc>
return 0;
bf5: b8 00 00 00 00 mov $0x0,%eax
bfa: eb 40 jmp c3c <hoare_slots_monitor_alloc+0xa9>
}
hoare_slots_monitor_t * monitor= malloc (sizeof (hoare_slots_monitor_t));
bfc: c7 04 24 14 00 00 00 movl $0x14,(%esp)
c03: e8 31 fc ff ff call 839 <malloc>
c08: 89 45 e8 mov %eax,-0x18(%ebp)
monitor->empty= empty;
c0b: 8b 45 e8 mov -0x18(%ebp),%eax
c0e: 8b 55 f0 mov -0x10(%ebp),%edx
c11: 89 50 04 mov %edx,0x4(%eax)
monitor->full= full;
c14: 8b 45 e8 mov -0x18(%ebp),%eax
c17: 8b 55 ec mov -0x14(%ebp),%edx
c1a: 89 50 08 mov %edx,0x8(%eax)
monitor->Monitormutex= mutex;
c1d: 8b 45 e8 mov -0x18(%ebp),%eax
c20: 8b 55 f4 mov -0xc(%ebp),%edx
c23: 89 10 mov %edx,(%eax)
monitor->slots=0;
c25: 8b 45 e8 mov -0x18(%ebp),%eax
c28: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax)
monitor->active=1;
c2f: 8b 45 e8 mov -0x18(%ebp),%eax
c32: c7 40 10 01 00 00 00 movl $0x1,0x10(%eax)
return monitor;
c39: 8b 45 e8 mov -0x18(%ebp),%eax
}
c3c: c9 leave
c3d: c3 ret
00000c3e <hoare_slots_monitor_dealloc>:
int hoare_slots_monitor_dealloc(hoare_slots_monitor_t* monitor){
c3e: 55 push %ebp
c3f: 89 e5 mov %esp,%ebp
c41: 83 ec 18 sub $0x18,%esp
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
c44: 8b 45 08 mov 0x8(%ebp),%eax
c47: 8b 00 mov (%eax),%eax
c49: 89 04 24 mov %eax,(%esp)
c4c: e8 fc f7 ff ff call 44d <kthread_mutex_dealloc>
c51: 85 c0 test %eax,%eax
c53: 78 2e js c83 <hoare_slots_monitor_dealloc+0x45>
hoare_cond_alloc(monitor->empty)<0 ||
c55: 8b 45 08 mov 0x8(%ebp),%eax
c58: 8b 40 04 mov 0x4(%eax),%eax
c5b: 89 04 24 mov %eax,(%esp)
c5e: e8 bb 01 00 00 call e1e <hoare_cond_alloc>
hoare_cond_alloc(monitor->full)<0
c63: 8b 45 08 mov 0x8(%ebp),%eax
c66: 8b 40 08 mov 0x8(%eax),%eax
c69: 89 04 24 mov %eax,(%esp)
c6c: e8 ad 01 00 00 call e1e <hoare_cond_alloc>
){
return -1;
}
free(monitor);
c71: 8b 45 08 mov 0x8(%ebp),%eax
c74: 89 04 24 mov %eax,(%esp)
c77: e8 84 fa ff ff call 700 <free>
return 0;
c7c: b8 00 00 00 00 mov $0x0,%eax
c81: eb 05 jmp c88 <hoare_slots_monitor_dealloc+0x4a>
if( kthread_mutex_dealloc(monitor->Monitormutex) < 0 ||
hoare_cond_alloc(monitor->empty)<0 ||
hoare_cond_alloc(monitor->full)<0
){
return -1;
c83: b8 ff ff ff ff mov $0xffffffff,%eax
}
free(monitor);
return 0;
}
c88: c9 leave
c89: c3 ret
00000c8a <hoare_slots_monitor_addslots>:
int hoare_slots_monitor_addslots(hoare_slots_monitor_t* monitor,int n){
c8a: 55 push %ebp
c8b: 89 e5 mov %esp,%ebp
c8d: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
c90: 8b 45 08 mov 0x8(%ebp),%eax
c93: 8b 40 10 mov 0x10(%eax),%eax
c96: 85 c0 test %eax,%eax
c98: 75 0a jne ca4 <hoare_slots_monitor_addslots+0x1a>
return -1;
c9a: b8 ff ff ff ff mov $0xffffffff,%eax
c9f: e9 88 00 00 00 jmp d2c <hoare_slots_monitor_addslots+0xa2>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
ca4: 8b 45 08 mov 0x8(%ebp),%eax
ca7: 8b 00 mov (%eax),%eax
ca9: 89 04 24 mov %eax,(%esp)
cac: e8 a4 f7 ff ff call 455 <kthread_mutex_lock>
cb1: 83 f8 ff cmp $0xffffffff,%eax
cb4: 7d 07 jge cbd <hoare_slots_monitor_addslots+0x33>
return -1;
cb6: b8 ff ff ff ff mov $0xffffffff,%eax
cbb: eb 6f jmp d2c <hoare_slots_monitor_addslots+0xa2>
if ( monitor->active && monitor->slots > 0 )
cbd: 8b 45 08 mov 0x8(%ebp),%eax
cc0: 8b 40 10 mov 0x10(%eax),%eax
cc3: 85 c0 test %eax,%eax
cc5: 74 21 je ce8 <hoare_slots_monitor_addslots+0x5e>
cc7: 8b 45 08 mov 0x8(%ebp),%eax
cca: 8b 40 0c mov 0xc(%eax),%eax
ccd: 85 c0 test %eax,%eax
ccf: 7e 17 jle ce8 <hoare_slots_monitor_addslots+0x5e>
hoare_cond_wait( monitor->full, monitor->Monitormutex);
cd1: 8b 45 08 mov 0x8(%ebp),%eax
cd4: 8b 10 mov (%eax),%edx
cd6: 8b 45 08 mov 0x8(%ebp),%eax
cd9: 8b 40 08 mov 0x8(%eax),%eax
cdc: 89 54 24 04 mov %edx,0x4(%esp)
ce0: 89 04 24 mov %eax,(%esp)
ce3: e8 c1 01 00 00 call ea9 <hoare_cond_wait>
if ( monitor->active)
ce8: 8b 45 08 mov 0x8(%ebp),%eax
ceb: 8b 40 10 mov 0x10(%eax),%eax
cee: 85 c0 test %eax,%eax
cf0: 74 11 je d03 <hoare_slots_monitor_addslots+0x79>
monitor->slots+= n;
cf2: 8b 45 08 mov 0x8(%ebp),%eax
cf5: 8b 50 0c mov 0xc(%eax),%edx
cf8: 8b 45 0c mov 0xc(%ebp),%eax
cfb: 01 c2 add %eax,%edx
cfd: 8b 45 08 mov 0x8(%ebp),%eax
d00: 89 50 0c mov %edx,0xc(%eax)
hoare_cond_signal(monitor->empty, monitor->Monitormutex );
d03: 8b 45 08 mov 0x8(%ebp),%eax
d06: 8b 10 mov (%eax),%edx
d08: 8b 45 08 mov 0x8(%ebp),%eax
d0b: 8b 40 04 mov 0x4(%eax),%eax
d0e: 89 54 24 04 mov %edx,0x4(%esp)
d12: 89 04 24 mov %eax,(%esp)
d15: e8 e6 01 00 00 call f00 <hoare_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
d1a: 8b 45 08 mov 0x8(%ebp),%eax
d1d: 8b 00 mov (%eax),%eax
d1f: 89 04 24 mov %eax,(%esp)
d22: e8 36 f7 ff ff call 45d <kthread_mutex_unlock>
return 1;
d27: b8 01 00 00 00 mov $0x1,%eax
}
d2c: c9 leave
d2d: c3 ret
00000d2e <hoare_slots_monitor_takeslot>:
int hoare_slots_monitor_takeslot(hoare_slots_monitor_t* monitor){
d2e: 55 push %ebp
d2f: 89 e5 mov %esp,%ebp
d31: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
d34: 8b 45 08 mov 0x8(%ebp),%eax
d37: 8b 40 10 mov 0x10(%eax),%eax
d3a: 85 c0 test %eax,%eax
d3c: 75 0a jne d48 <hoare_slots_monitor_takeslot+0x1a>
return -1;
d3e: b8 ff ff ff ff mov $0xffffffff,%eax
d43: e9 86 00 00 00 jmp dce <hoare_slots_monitor_takeslot+0xa0>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
d48: 8b 45 08 mov 0x8(%ebp),%eax
d4b: 8b 00 mov (%eax),%eax
d4d: 89 04 24 mov %eax,(%esp)
d50: e8 00 f7 ff ff call 455 <kthread_mutex_lock>
d55: 83 f8 ff cmp $0xffffffff,%eax
d58: 7d 07 jge d61 <hoare_slots_monitor_takeslot+0x33>
return -1;
d5a: b8 ff ff ff ff mov $0xffffffff,%eax
d5f: eb 6d jmp dce <hoare_slots_monitor_takeslot+0xa0>
if ( monitor->active && monitor->slots == 0 )
d61: 8b 45 08 mov 0x8(%ebp),%eax
d64: 8b 40 10 mov 0x10(%eax),%eax
d67: 85 c0 test %eax,%eax
d69: 74 21 je d8c <hoare_slots_monitor_takeslot+0x5e>
d6b: 8b 45 08 mov 0x8(%ebp),%eax
d6e: 8b 40 0c mov 0xc(%eax),%eax
d71: 85 c0 test %eax,%eax
d73: 75 17 jne d8c <hoare_slots_monitor_takeslot+0x5e>
hoare_cond_wait( monitor->empty, monitor->Monitormutex);
d75: 8b 45 08 mov 0x8(%ebp),%eax
d78: 8b 10 mov (%eax),%edx
d7a: 8b 45 08 mov 0x8(%ebp),%eax
d7d: 8b 40 04 mov 0x4(%eax),%eax
d80: 89 54 24 04 mov %edx,0x4(%esp)
d84: 89 04 24 mov %eax,(%esp)
d87: e8 1d 01 00 00 call ea9 <hoare_cond_wait>
if ( monitor->active)
d8c: 8b 45 08 mov 0x8(%ebp),%eax
d8f: 8b 40 10 mov 0x10(%eax),%eax
d92: 85 c0 test %eax,%eax
d94: 74 0f je da5 <hoare_slots_monitor_takeslot+0x77>
monitor->slots--;
d96: 8b 45 08 mov 0x8(%ebp),%eax
d99: 8b 40 0c mov 0xc(%eax),%eax
d9c: 8d 50 ff lea -0x1(%eax),%edx
d9f: 8b 45 08 mov 0x8(%ebp),%eax
da2: 89 50 0c mov %edx,0xc(%eax)
hoare_cond_signal(monitor->full, monitor->Monitormutex );
da5: 8b 45 08 mov 0x8(%ebp),%eax
da8: 8b 10 mov (%eax),%edx
daa: 8b 45 08 mov 0x8(%ebp),%eax
dad: 8b 40 08 mov 0x8(%eax),%eax
db0: 89 54 24 04 mov %edx,0x4(%esp)
db4: 89 04 24 mov %eax,(%esp)
db7: e8 44 01 00 00 call f00 <hoare_cond_signal>
kthread_mutex_unlock( monitor->Monitormutex );
dbc: 8b 45 08 mov 0x8(%ebp),%eax
dbf: 8b 00 mov (%eax),%eax
dc1: 89 04 24 mov %eax,(%esp)
dc4: e8 94 f6 ff ff call 45d <kthread_mutex_unlock>
return 1;
dc9: b8 01 00 00 00 mov $0x1,%eax
}
dce: c9 leave
dcf: c3 ret
00000dd0 <hoare_slots_monitor_stopadding>:
int hoare_slots_monitor_stopadding(hoare_slots_monitor_t* monitor){
dd0: 55 push %ebp
dd1: 89 e5 mov %esp,%ebp
dd3: 83 ec 18 sub $0x18,%esp
if (!monitor->active)
dd6: 8b 45 08 mov 0x8(%ebp),%eax
dd9: 8b 40 10 mov 0x10(%eax),%eax
ddc: 85 c0 test %eax,%eax
dde: 75 07 jne de7 <hoare_slots_monitor_stopadding+0x17>
return -1;
de0: b8 ff ff ff ff mov $0xffffffff,%eax
de5: eb 35 jmp e1c <hoare_slots_monitor_stopadding+0x4c>
if (kthread_mutex_lock( monitor->Monitormutex)< -1)
de7: 8b 45 08 mov 0x8(%ebp),%eax
dea: 8b 00 mov (%eax),%eax
dec: 89 04 24 mov %eax,(%esp)
def: e8 61 f6 ff ff call 455 <kthread_mutex_lock>
df4: 83 f8 ff cmp $0xffffffff,%eax
df7: 7d 07 jge e00 <hoare_slots_monitor_stopadding+0x30>
return -1;
df9: b8 ff ff ff ff mov $0xffffffff,%eax
dfe: eb 1c jmp e1c <hoare_slots_monitor_stopadding+0x4c>
monitor->active = 0;
e00: 8b 45 08 mov 0x8(%ebp),%eax
e03: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax)
kthread_mutex_unlock( monitor->Monitormutex );
e0a: 8b 45 08 mov 0x8(%ebp),%eax
e0d: 8b 00 mov (%eax),%eax
e0f: 89 04 24 mov %eax,(%esp)
e12: e8 46 f6 ff ff call 45d <kthread_mutex_unlock>
return 0;
e17: b8 00 00 00 00 mov $0x0,%eax
}
e1c: c9 leave
e1d: c3 ret
00000e1e <hoare_cond_alloc>:
#include "types.h"
#include "stat.h"
#include "user.h"
hoare_cond_t* hoare_cond_alloc(){
e1e: 55 push %ebp
e1f: 89 e5 mov %esp,%ebp
e21: 83 ec 28 sub $0x28,%esp
int cvMutex= kthread_mutex_alloc();
e24: e8 1c f6 ff ff call 445 <kthread_mutex_alloc>
e29: 89 45 f4 mov %eax,-0xc(%ebp)
if (cvMutex<0)
e2c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
e30: 79 07 jns e39 <hoare_cond_alloc+0x1b>
return 0;
e32: b8 00 00 00 00 mov $0x0,%eax
e37: eb 24 jmp e5d <hoare_cond_alloc+0x3f>
hoare_cond_t *hcond = malloc( sizeof (hoare_cond_t)) ;
e39: c7 04 24 08 00 00 00 movl $0x8,(%esp)
e40: e8 f4 f9 ff ff call 839 <malloc>
e45: 89 45 f0 mov %eax,-0x10(%ebp)
hcond->mutexCV=cvMutex;
e48: 8b 45 f0 mov -0x10(%ebp),%eax
e4b: 8b 55 f4 mov -0xc(%ebp),%edx
e4e: 89 10 mov %edx,(%eax)
hcond->waitinCount=0;
e50: 8b 45 f0 mov -0x10(%ebp),%eax
e53: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return hcond;
e5a: 8b 45 f0 mov -0x10(%ebp),%eax
}
e5d: c9 leave
e5e: c3 ret
00000e5f <hoare_cond_dealloc>:
int hoare_cond_dealloc(hoare_cond_t* hCond){
e5f: 55 push %ebp
e60: 89 e5 mov %esp,%ebp
e62: 83 ec 18 sub $0x18,%esp
if (!hCond ){
e65: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
e69: 75 07 jne e72 <hoare_cond_dealloc+0x13>
return -1;
e6b: b8 ff ff ff ff mov $0xffffffff,%eax
e70: eb 35 jmp ea7 <hoare_cond_dealloc+0x48>
}
kthread_mutex_unlock(hCond->mutexCV);
e72: 8b 45 08 mov 0x8(%ebp),%eax
e75: 8b 00 mov (%eax),%eax
e77: 89 04 24 mov %eax,(%esp)
e7a: e8 de f5 ff ff call 45d <kthread_mutex_unlock>
if( kthread_mutex_dealloc(hCond->mutexCV) <0)
e7f: 8b 45 08 mov 0x8(%ebp),%eax
e82: 8b 00 mov (%eax),%eax
e84: 89 04 24 mov %eax,(%esp)
e87: e8 c1 f5 ff ff call 44d <kthread_mutex_dealloc>
e8c: 85 c0 test %eax,%eax
e8e: 79 07 jns e97 <hoare_cond_dealloc+0x38>
return -1;
e90: b8 ff ff ff ff mov $0xffffffff,%eax
e95: eb 10 jmp ea7 <hoare_cond_dealloc+0x48>
free (hCond);
e97: 8b 45 08 mov 0x8(%ebp),%eax
e9a: 89 04 24 mov %eax,(%esp)
e9d: e8 5e f8 ff ff call 700 <free>
return 0;
ea2: b8 00 00 00 00 mov $0x0,%eax
}
ea7: c9 leave
ea8: c3 ret
00000ea9 <hoare_cond_wait>:
int hoare_cond_wait(hoare_cond_t* hCond, int mutex_id){
ea9: 55 push %ebp
eaa: 89 e5 mov %esp,%ebp
eac: 83 ec 18 sub $0x18,%esp
if (!hCond){
eaf: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
eb3: 75 07 jne ebc <hoare_cond_wait+0x13>
return -1;
eb5: b8 ff ff ff ff mov $0xffffffff,%eax
eba: eb 42 jmp efe <hoare_cond_wait+0x55>
}
hCond->waitinCount++;
ebc: 8b 45 08 mov 0x8(%ebp),%eax
ebf: 8b 40 04 mov 0x4(%eax),%eax
ec2: 8d 50 01 lea 0x1(%eax),%edx
ec5: 8b 45 08 mov 0x8(%ebp),%eax
ec8: 89 50 04 mov %edx,0x4(%eax)
if ( kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0)
ecb: 8b 45 08 mov 0x8(%ebp),%eax
ece: 8b 00 mov (%eax),%eax
ed0: 89 44 24 04 mov %eax,0x4(%esp)
ed4: 8b 45 0c mov 0xc(%ebp),%eax
ed7: 89 04 24 mov %eax,(%esp)
eda: e8 86 f5 ff ff call 465 <kthread_mutex_yieldlock>
edf: 85 c0 test %eax,%eax
ee1: 79 16 jns ef9 <hoare_cond_wait+0x50>
{
hCond->waitinCount--;
ee3: 8b 45 08 mov 0x8(%ebp),%eax
ee6: 8b 40 04 mov 0x4(%eax),%eax
ee9: 8d 50 ff lea -0x1(%eax),%edx
eec: 8b 45 08 mov 0x8(%ebp),%eax
eef: 89 50 04 mov %edx,0x4(%eax)
return -1;
ef2: b8 ff ff ff ff mov $0xffffffff,%eax
ef7: eb 05 jmp efe <hoare_cond_wait+0x55>
}
return 0;
ef9: b8 00 00 00 00 mov $0x0,%eax
}
efe: c9 leave
eff: c3 ret
00000f00 <hoare_cond_signal>:
int hoare_cond_signal(hoare_cond_t* hCond, int mutex_id)
{
f00: 55 push %ebp
f01: 89 e5 mov %esp,%ebp
f03: 83 ec 18 sub $0x18,%esp
if (!hCond){
f06: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
f0a: 75 07 jne f13 <hoare_cond_signal+0x13>
return -1;
f0c: b8 ff ff ff ff mov $0xffffffff,%eax
f11: eb 6b jmp f7e <hoare_cond_signal+0x7e>
}
if ( hCond->waitinCount >0){
f13: 8b 45 08 mov 0x8(%ebp),%eax
f16: 8b 40 04 mov 0x4(%eax),%eax
f19: 85 c0 test %eax,%eax
f1b: 7e 3d jle f5a <hoare_cond_signal+0x5a>
hCond->waitinCount--;
f1d: 8b 45 08 mov 0x8(%ebp),%eax
f20: 8b 40 04 mov 0x4(%eax),%eax
f23: 8d 50 ff lea -0x1(%eax),%edx
f26: 8b 45 08 mov 0x8(%ebp),%eax
f29: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0){
f2c: 8b 45 08 mov 0x8(%ebp),%eax
f2f: 8b 00 mov (%eax),%eax
f31: 89 44 24 04 mov %eax,0x4(%esp)
f35: 8b 45 0c mov 0xc(%ebp),%eax
f38: 89 04 24 mov %eax,(%esp)
f3b: e8 25 f5 ff ff call 465 <kthread_mutex_yieldlock>
f40: 85 c0 test %eax,%eax
f42: 79 16 jns f5a <hoare_cond_signal+0x5a>
hCond->waitinCount++;
f44: 8b 45 08 mov 0x8(%ebp),%eax
f47: 8b 40 04 mov 0x4(%eax),%eax
f4a: 8d 50 01 lea 0x1(%eax),%edx
f4d: 8b 45 08 mov 0x8(%ebp),%eax
f50: 89 50 04 mov %edx,0x4(%eax)
return -1;
f53: b8 ff ff ff ff mov $0xffffffff,%eax
f58: eb 24 jmp f7e <hoare_cond_signal+0x7e>
}
}
if (kthread_mutex_yieldlock(mutex_id, hCond->mutexCV)<0){
f5a: 8b 45 08 mov 0x8(%ebp),%eax
f5d: 8b 00 mov (%eax),%eax
f5f: 89 44 24 04 mov %eax,0x4(%esp)
f63: 8b 45 0c mov 0xc(%ebp),%eax
f66: 89 04 24 mov %eax,(%esp)
f69: e8 f7 f4 ff ff call 465 <kthread_mutex_yieldlock>
f6e: 85 c0 test %eax,%eax
f70: 79 07 jns f79 <hoare_cond_signal+0x79>
return -1;
f72: b8 ff ff ff ff mov $0xffffffff,%eax
f77: eb 05 jmp f7e <hoare_cond_signal+0x7e>
}
return 0;
f79: b8 00 00 00 00 mov $0x0,%eax
}
f7e: c9 leave
f7f: c3 ret
00000f80 <mesa_cond_alloc>:
#include "mesa_cond.h"
#include "types.h"
#include "stat.h"
#include "user.h"
mesa_cond_t* mesa_cond_alloc(){
f80: 55 push %ebp
f81: 89 e5 mov %esp,%ebp
f83: 83 ec 28 sub $0x28,%esp
int cvMutex= kthread_mutex_alloc();
f86: e8 ba f4 ff ff call 445 <kthread_mutex_alloc>
f8b: 89 45 f4 mov %eax,-0xc(%ebp)
if (cvMutex<0)
f8e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
f92: 79 07 jns f9b <mesa_cond_alloc+0x1b>
return 0;
f94: b8 00 00 00 00 mov $0x0,%eax
f99: eb 24 jmp fbf <mesa_cond_alloc+0x3f>
mesa_cond_t *mcond = malloc( sizeof (mesa_cond_t)) ;
f9b: c7 04 24 08 00 00 00 movl $0x8,(%esp)
fa2: e8 92 f8 ff ff call 839 <malloc>
fa7: 89 45 f0 mov %eax,-0x10(%ebp)
mcond->mutexCV=cvMutex;
faa: 8b 45 f0 mov -0x10(%ebp),%eax
fad: 8b 55 f4 mov -0xc(%ebp),%edx
fb0: 89 10 mov %edx,(%eax)
mcond->waitinCount=0;
fb2: 8b 45 f0 mov -0x10(%ebp),%eax
fb5: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
return mcond;
fbc: 8b 45 f0 mov -0x10(%ebp),%eax
}
fbf: c9 leave
fc0: c3 ret
00000fc1 <mesa_cond_dealloc>:
int mesa_cond_dealloc(mesa_cond_t* mCond){
fc1: 55 push %ebp
fc2: 89 e5 mov %esp,%ebp
fc4: 83 ec 18 sub $0x18,%esp
if (!mCond ){
fc7: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
fcb: 75 07 jne fd4 <mesa_cond_dealloc+0x13>
return -1;
fcd: b8 ff ff ff ff mov $0xffffffff,%eax
fd2: eb 35 jmp 1009 <mesa_cond_dealloc+0x48>
}
kthread_mutex_unlock(mCond->mutexCV);
fd4: 8b 45 08 mov 0x8(%ebp),%eax
fd7: 8b 00 mov (%eax),%eax
fd9: 89 04 24 mov %eax,(%esp)
fdc: e8 7c f4 ff ff call 45d <kthread_mutex_unlock>
if( kthread_mutex_dealloc(mCond->mutexCV) <0)
fe1: 8b 45 08 mov 0x8(%ebp),%eax
fe4: 8b 00 mov (%eax),%eax
fe6: 89 04 24 mov %eax,(%esp)
fe9: e8 5f f4 ff ff call 44d <kthread_mutex_dealloc>
fee: 85 c0 test %eax,%eax
ff0: 79 07 jns ff9 <mesa_cond_dealloc+0x38>
return -1;
ff2: b8 ff ff ff ff mov $0xffffffff,%eax
ff7: eb 10 jmp 1009 <mesa_cond_dealloc+0x48>
free (mCond);
ff9: 8b 45 08 mov 0x8(%ebp),%eax
ffc: 89 04 24 mov %eax,(%esp)
fff: e8 fc f6 ff ff call 700 <free>
return 0;
1004: b8 00 00 00 00 mov $0x0,%eax
}
1009: c9 leave
100a: c3 ret
0000100b <mesa_cond_wait>:
int mesa_cond_wait(mesa_cond_t* mCond,int mutex_id){
100b: 55 push %ebp
100c: 89 e5 mov %esp,%ebp
100e: 83 ec 18 sub $0x18,%esp
if (!mCond){
1011: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
1015: 75 07 jne 101e <mesa_cond_wait+0x13>
return -1;
1017: b8 ff ff ff ff mov $0xffffffff,%eax
101c: eb 55 jmp 1073 <mesa_cond_wait+0x68>
}
mCond->waitinCount++;
101e: 8b 45 08 mov 0x8(%ebp),%eax
1021: 8b 40 04 mov 0x4(%eax),%eax
1024: 8d 50 01 lea 0x1(%eax),%edx
1027: 8b 45 08 mov 0x8(%ebp),%eax
102a: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_unlock(mutex_id)<0 &&
102d: 8b 45 0c mov 0xc(%ebp),%eax
1030: 89 04 24 mov %eax,(%esp)
1033: e8 25 f4 ff ff call 45d <kthread_mutex_unlock>
1038: 85 c0 test %eax,%eax
103a: 79 27 jns 1063 <mesa_cond_wait+0x58>
kthread_mutex_lock(mCond->mutexCV)<0)
103c: 8b 45 08 mov 0x8(%ebp),%eax
103f: 8b 00 mov (%eax),%eax
1041: 89 04 24 mov %eax,(%esp)
1044: e8 0c f4 ff ff call 455 <kthread_mutex_lock>
if (!mCond){
return -1;
}
mCond->waitinCount++;
if (kthread_mutex_unlock(mutex_id)<0 &&
1049: 85 c0 test %eax,%eax
104b: 79 16 jns 1063 <mesa_cond_wait+0x58>
kthread_mutex_lock(mCond->mutexCV)<0)
{
mCond->waitinCount--;
104d: 8b 45 08 mov 0x8(%ebp),%eax
1050: 8b 40 04 mov 0x4(%eax),%eax
1053: 8d 50 ff lea -0x1(%eax),%edx
1056: 8b 45 08 mov 0x8(%ebp),%eax
1059: 89 50 04 mov %edx,0x4(%eax)
return -1;
105c: b8 ff ff ff ff mov $0xffffffff,%eax
1061: eb 10 jmp 1073 <mesa_cond_wait+0x68>
}
kthread_mutex_lock(mutex_id);
1063: 8b 45 0c mov 0xc(%ebp),%eax
1066: 89 04 24 mov %eax,(%esp)
1069: e8 e7 f3 ff ff call 455 <kthread_mutex_lock>
return 0;
106e: b8 00 00 00 00 mov $0x0,%eax
}
1073: c9 leave
1074: c3 ret
00001075 <mesa_cond_signal>:
int mesa_cond_signal(mesa_cond_t* mCond){
1075: 55 push %ebp
1076: 89 e5 mov %esp,%ebp
1078: 83 ec 18 sub $0x18,%esp
if (!mCond){
107b: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
107f: 75 07 jne 1088 <mesa_cond_signal+0x13>
return -1;
1081: b8 ff ff ff ff mov $0xffffffff,%eax
1086: eb 5d jmp 10e5 <mesa_cond_signal+0x70>
}
if (mCond->waitinCount>0){
1088: 8b 45 08 mov 0x8(%ebp),%eax
108b: 8b 40 04 mov 0x4(%eax),%eax
108e: 85 c0 test %eax,%eax
1090: 7e 36 jle 10c8 <mesa_cond_signal+0x53>
mCond->waitinCount --;
1092: 8b 45 08 mov 0x8(%ebp),%eax
1095: 8b 40 04 mov 0x4(%eax),%eax
1098: 8d 50 ff lea -0x1(%eax),%edx
109b: 8b 45 08 mov 0x8(%ebp),%eax
109e: 89 50 04 mov %edx,0x4(%eax)
if (kthread_mutex_unlock(mCond->mutexCV)>=0){
10a1: 8b 45 08 mov 0x8(%ebp),%eax
10a4: 8b 00 mov (%eax),%eax
10a6: 89 04 24 mov %eax,(%esp)
10a9: e8 af f3 ff ff call 45d <kthread_mutex_unlock>
10ae: 85 c0 test %eax,%eax
10b0: 78 16 js 10c8 <mesa_cond_signal+0x53>
mCond->waitinCount ++;
10b2: 8b 45 08 mov 0x8(%ebp),%eax
10b5: 8b 40 04 mov 0x4(%eax),%eax
10b8: 8d 50 01 lea 0x1(%eax),%edx
10bb: 8b 45 08 mov 0x8(%ebp),%eax
10be: 89 50 04 mov %edx,0x4(%eax)
return -1;
10c1: b8 ff ff ff ff mov $0xffffffff,%eax
10c6: eb 1d jmp 10e5 <mesa_cond_signal+0x70>
}
}
if (kthread_mutex_unlock(mCond->mutexCV)<0){
10c8: 8b 45 08 mov 0x8(%ebp),%eax
10cb: 8b 00 mov (%eax),%eax
10cd: 89 04 24 mov %eax,(%esp)
10d0: e8 88 f3 ff ff call 45d <kthread_mutex_unlock>
10d5: 85 c0 test %eax,%eax
10d7: 79 07 jns 10e0 <mesa_cond_signal+0x6b>
return -1;
10d9: b8 ff ff ff ff mov $0xffffffff,%eax
10de: eb 05 jmp 10e5 <mesa_cond_signal+0x70>
}
return 0;
10e0: b8 00 00 00 00 mov $0x0,%eax
}
10e5: c9 leave
10e6: c3 ret
|
JXA/main.scpt | leo-fengchao/Open-Safari-Chrome-tab-on-Chrome-Safair-JXA-Automation | 4 | 2135 | var chrome = Application('Google Chrome');
var safari = Application('Safari');
var systemEvents = Application('System Events');
const frontmost_app_name = Application('System Events').applicationProcesses.where({ frontmost: true }).name()[0];
if (frontmost_app_name == 'Safari') {
var safari_current_tab_url = safari.windows[0].currentTab.url();
closeSafariTab();
chrome.activate();
if (chrome.windows.length == 0) {
chrome.Window().make();
}
var tab = chrome.Tab({
url: safari_current_tab_url
});
chrome.windows[0].tabs.push(tab);
} else if (frontmost_app_name == 'Google Chrome'){
var chrome_current_tab_url = chrome.windows[0].activeTab.url();
closeChromeTab();
safari.activate();
if (safari.windows.length <= 1) {
safari.Document().make();
}
var tab = safari.Tab({
url: chrome_current_tab_url
});
tabCount = safari.windows[0].tabs.push(tab) - 1;
safari.windows[0].currentTab = safari.windows[0].tabs[tabCount];
} else{
}
function closeSafariTab(){
var safariProcess = systemEvents.processes.byName('Safari');
var safariFileMenu = safariProcess.menuBars[0].menuBarItems.byName('文件');
var safariCloseMenu = safariFileMenu.menus[0].menuItems.byName('关闭标签页');
var safariCloseWindowMenu = safariFileMenu.menus[0].menuItems.byName('关闭窗口');
if (safariCloseMenu.enabled()) {
safariCloseMenu.click();
}else {
safariCloseWindowMenu.click();
}
}
function closeChromeTab(){
var chromeProcess = systemEvents.processes.byName('Google Chrome');
var chromeFileMenu = chromeProcess.menuBars[0].menuBarItems.byName('文件');
var chromeCloseMenu = chromeFileMenu.menus[0].menuItems.byName('关闭标签页');
chromeCloseMenu.click();
}
|
practica6/Ejercicio3P6.asm | ramseslopez/Arqui | 0 | 82335 | <filename>practica6/Ejercicio3P6.asm
.data
numA: .asciiz "Inserte numero a \n"
numB: .asciiz "Inserte numero b \n"
.text
li $v0, 4
la $a0, numA
syscall
li $v0, 5
syscall #Solicitud del num A
add $t0, $v0, 0 #move
li $v0, 4
la $a0, numB
syscall
li $v0, 5
syscall #Solicitud del num B
add $t1, $v0, 0 #move
add $k0, $k0, 0
add $k1, $k1, 0
x2:
subu $s1, $t0, $t1 #Resta t0 con t1
add $k0, $k0, 1 #Contador de iteraciones
ciclo:
move $t0, $s1 #Resta hasta que el resultado sea <= 0
bge $s1, 0, x2
res:
add $v1, $s1, $t1 #Suma el ultimo resultado de la resta con t1
mul $v0, $zero, 0 #limpiar v0
sub $k0, $k0, 1 #restar uno al contador
add $v0, $v0, $k0 #Guarda el cociente (# de iteraciones)
|
test/lib-interaction/EqReasoning.agda | shlevy/agda | 1,989 | 15138 | open import Data.Nat.Base
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
test : 0 ≡ 0
test = begin
0 ≡⟨ {!!} ⟩
0
∎
-- WAS: Goal is garbled:
--
-- ?0 : (.Relation.Binary.Setoid.preorder (setoid ℕ)
-- .Relation.Binary.Preorder.∼ 0)
-- 0
-- EXPECTED: Nice goal:
--
-- ?0 : 0 ≡ 0
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1491.asm | ljhsiun2/medusa | 9 | 92014 | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x8d80, %r12
nop
nop
nop
nop
nop
add $40793, %r8
movb (%r12), %bl
nop
add $24184, %rbx
lea addresses_normal_ht+0x3820, %rbp
nop
nop
nop
nop
cmp %r12, %r12
mov $0x6162636465666768, %r13
movq %r13, (%rbp)
nop
nop
nop
nop
dec %rdi
lea addresses_WC_ht+0x134c0, %rbx
nop
nop
nop
nop
and $15555, %rcx
movb $0x61, (%rbx)
nop
nop
nop
nop
add %r13, %r13
lea addresses_UC_ht+0x5c00, %rdi
mfence
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
movups %xmm7, (%rdi)
nop
nop
add %rcx, %rcx
lea addresses_normal_ht+0x1bb8e, %rbp
nop
nop
nop
nop
xor $19286, %rdi
movb $0x61, (%rbp)
nop
add $64812, %rbx
lea addresses_WT_ht+0x4a4b, %rdi
nop
nop
nop
nop
inc %r13
mov $0x6162636465666768, %r8
movq %r8, (%rdi)
nop
dec %r12
lea addresses_UC_ht+0x17a80, %rsi
lea addresses_WC_ht+0x11380, %rdi
nop
nop
nop
sub %r8, %r8
mov $85, %rcx
rep movsb
sub %r13, %r13
lea addresses_A_ht+0x1a148, %rbx
sub %rbp, %rbp
vmovups (%rbx), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r13
nop
nop
nop
nop
sub %rbp, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rcx
push %rdx
// Faulty Load
lea addresses_RW+0x13380, %r11
clflush (%r11)
nop
nop
nop
nop
sub %r15, %r15
mov (%r11), %r9
lea oracles, %r11
and $0xff, %r9
shlq $12, %r9
mov (%r11,%r9,1), %r9
pop %rdx
pop %rcx
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_RW', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': True, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'src': {'same': False, 'congruent': 3, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
test/asm/fbld.asm | nigelperks/BasicAssembler | 0 | 162646 | ; BCD 8087 instruction format
IDEAL
SEGMENT SEG1
ASSUME CS:SEG1, DS:SEG1, ES:SEG1, SS:SEG1
ORG 100H
start:
FBLD [TBYTE num]
FBLD [TBYTE SI]
FBLD [TBYTE BX]
FBLD [TBYTE BP+DI+40h]
num DT 0
ENDS SEG1
END start
|
non_regression/switch_x64_linux_3.att.s.asm | LRGH/plasmasm | 1 | 19890 | <reponame>LRGH/plasmasm<gh_stars>1-10
.file "compileX.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC01:
.section .text.unlikely,"ax",@progbits
.LCOLDB1:
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "lg()"
.LC1:
.string "unfinished string"
.LC7:
.string "compilecast, type unknown %ld"
.LC9:
.string "if"
.LC10:
.string "_void_if"
.LC11:
.string "my"
.LC12:
.string "local"
.LC13:
.string "global"
.LC14:
.string "O"
.LC15:
.string "o"
.LC16:
.string "wrong number of arguments"
.LC17:
.string "O(_^_)"
.LC18:
.string "_^s"
.LC20:
.string "unknown function"
.LC21:
.string "too few arguments"
.LC22:
.string "missing mandatory argument"
.LC23:
.string "unexpected ';'"
.LC25:
.string "_eval_mnemonic"
.LC26:
.string "expected character: '&'"
.LC27:
.string "missing variable name"
.LC28:
.string "Str"
.LC31:
.string "PPproto %d in compilefunc"
.LC32:
.string "too many arguments"
.LC39:
.string "optimizenode"
.LC40:
.string "unexpected character '&'"
# ----------------------
.section .text.unlikely,"ax",@progbits
.LCOLDB2:
.LCOLDE2:
.LCOLDB5:
.LCOLDE5:
.LCOLDB8:
.LCOLDE8:
.LCOLDB33:
.LCOLDE33:
.LCOLDB38:
.LCOLDE38:
.LCOLDB41:
.LCOLDE41:
.LCOLDB43:
.LCOLDE43:
# ----------------------
.text
.LHOTB2:
# ----------------------
.p2align 4,,15
# ----------------------
.globl strntoGENexp
.type strntoGENexp, @function
strntoGENexp:
.cfi_startproc
pushq %r14
pushq %r13
movq %rdi, %r13
pushq %r12
pushq %rbp
movq %rsi, %r12
movq avma@GOTPCREL(%rip), %rbp
pushq %rbx
leaq 6(%rsi), %rbx
shrq $3, %rbx
movq (%rbp), %rax
addq $1, %rbx
leaq 0(,%rbx,8), %rdx
movq %rax, %r14
subq %rdx, %r14
movq bot@GOTPCREL(%rip), %rdx
subq (%rdx), %rax
shrq $3, %rax
cmpq %rax, %rbx
jbe .L2
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L2:
movq $-72057594037927936, %rax
movq %r14, (%rbp)
testq %rax, %rbx
je .L3
leaq .LC0(%rip), %rsi
movl $15, %edi
xorl %eax, %eax
call pari_err@PLT
.L3:
movq $3026418949592973312, %rax
leaq 8(%r14), %rbp
addq %r13, %r12
orq %rax, %rbx
movq %rbx, (%r14)
leaq 1(%r13), %rbx
.L4:
cmpq %r12, %rbx
jbe .L25
jmp .L12
.p2align 4,,10
.p2align 3
.L30:
cmpb $116, %dl
je .L7
cmpb $101, %dl
je .L27
movb %dl, (%rbp)
cmpb $0, 1(%rbx)
je .L28
.p2align 4,,10
.p2align 3
.L9:
addq $2, %rbx
addq $1, %rbp
.L25:
movzbl (%rbx), %eax
cmpb $92, %al
jne .L29
movzbl 1(%rbx), %edx
cmpb $110, %dl
jne .L30
movb $10, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L27:
movb $27, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L7:
movb $9, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L29:
cmpb $34, %al
je .L31
movb %al, (%rbp)
addq $1, %rbx
addq $1, %rbp
jmp .L4
.p2align 4,,10
.p2align 3
.L28:
leaq .LC1(%rip), %rdi
movq %r13, %rsi
call compile_err@PLT
jmp .L9
.p2align 4,,10
.p2align 3
.L31:
cmpb $34, 1(%rbx)
je .L32
.L12:
movb $0, (%rbp)
movq %r14, %rax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
ret
.L32:
addq $2, %rbx
jmp .L4
.LHOTE2:
.LHOTB5:
.cfi_endproc
.size strntoGENexp, .-strntoGENexp
# ----------------------
.section .rodata.str1.8,"aMS",@progbits,1
.align 8
.LC3:
.string "function has incomplete prototype"
.align 8
.LC4:
.string "function prototype is not supported"
.align 8
.LC6:
.string "this should be a small integer"
.align 8
.LC19:
.string "expected character: ',' or ')' instead of"
.align 8
.LC24:
.string "missing flag in string function signature"
.align 8
.LC29:
.string "Unknown prototype code `%c' for `%.*s'"
.align 8
.LC30:
.string "Unknown prototype code `%c*' for `%.*s'"
.align 8
.LC34:
.string "too many parameters for closure `%s'"
.align 8
.LC35:
.string "Unknown prototype code `D%c' for `%s'"
.align 8
.LC36:
.string "Unknown prototype code `D...,%c,' for `%s'"
.align 8
.LC37:
.string "Unknown prototype code `%c*' for `%s'"
.align 8
.LC42:
.string "expected character: '=' instead of"
# ----------------------
.text
.p2align 4,,15
# ----------------------
.globl parseproto
.type parseproto, @function
parseproto:
.cfi_startproc
pushq %r12
pushq %rbp
movq %rsi, %r12
pushq %rbx
movq (%rdi), %rbx
movq %rdi, %rbp
movzbl (%rbx), %eax
cmpb $68, %al
je .L35
jle .L97
cmpb $102, %al
je .L40
jg .L41
cmpb $80, %al
je .L40
cmpb $86, %al
jne .L34
cmpb $61, 1(%rbx)
je .L98
movb $86, (%rsi)
jmp .L96
.p2align 4,,10
.p2align 3
.L97:
cmpb $10, %al
je .L56
jle .L99
cmpb $38, %al
jne .L100
addq $1, %rbx
movb $42, (%rsi)
movl $1, %eax
movq %rbx, (%rdi)
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L41:
cmpb $112, %al
je .L40
cmpb $115, %al
jne .L34
cmpb $42, 1(%rbx)
je .L101
.L34:
movb %al, (%r12)
.L96:
addq $1, %rbx
movl $1, %eax
movq %rbx, (%rbp)
.L37:
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L100:
cmpb $67, %al
jne .L34
.L40:
addq $1, %rbx
movb %al, (%r12)
movl $5, %eax
movq %rbx, (%rbp)
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L35:
movzbl 1(%rbx), %ecx
cmpb $80, %cl
je .L45
jg .L46
cmpb $69, %cl
je .L45
jg .L47
testb %cl, %cl
jne .L102
leaq .LC3(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
movzbl 1(%rbx), %ecx
.L45:
addq $2, %rbx
movb %cl, (%r12)
movl $2, %eax
movq %rbx, (%rbp)
jmp .L37
.p2align 4,,10
.p2align 3
.L99:
testb %al, %al
jne .L34
.L56:
popq %rbx
xorl %eax, %eax
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L101:
addq $2, %rbx
movb $115, (%rsi)
movl $4, %eax
movq %rbx, (%rdi)
jmp .L37
.p2align 4,,10
.p2align 3
.L102:
cmpb $38, %cl
je .L45
.L44:
xorl %ecx, %ecx
jmp .L51
.p2align 4,,10
.p2align 3
.L103:
cmpq $1, %rcx
jg .L52
.L51:
cmpb $44, %al
sete %al
addq $1, %rbx
movzbl %al, %eax
addq %rax, %rcx
movzbl (%rbx), %eax
testb %al, %al
jne .L103
cmpq $1, %rcx
jg .L52
leaq .LC3(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
.L52:
movzbl -2(%rbx), %eax
movb %al, (%r12)
movq %rbx, (%rbp)
movl $3, %eax
jmp .L37
.p2align 4,,10
.p2align 3
.L46:
cmpb $110, %cl
je .L45
jg .L49
leal -86(%rcx), %esi
cmpb $1, %sil
ja .L44
jmp .L45
.p2align 4,,10
.p2align 3
.L98:
cmpb $71, 2(%rbx)
je .L54
leaq .LC4(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
.L54:
movb $61, (%r12)
addq $2, %rbx
jmp .L96
.p2align 4,,10
.p2align 3
.L47:
cmpb $71, %cl
je .L45
cmpb $73, %cl
jne .L44
jmp .L45
.p2align 4,,10
.p2align 3
.L49:
leal -114(%rcx), %esi
cmpb $1, %sil
ja .L44
jmp .L45
.LHOTE5:
.LHOTB8:
.cfi_endproc
.size parseproto, .-parseproto
# ----------------------
.p2align 4,,15
# ----------------------
.globl compilecast_loc
.type compilecast_loc, @function
compilecast_loc:
.cfi_startproc
cmpl %esi, %edi
je .L104
cmpl $1, %esi
je .L107
jle .L116
cmpl $3, %esi
je .L110
cmpl $4, %esi
jne .L106
cmpl $1, %edi
je .L117
testl %edi, %edi
je .L118
.L104:
rep; ret
.p2align 4,,10
.p2align 3
.L116:
testl %esi, %esi
jne .L106
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L106:
movl %esi, %edx
leaq .LC7(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
jmp pari_err@PLT
.p2align 4,,10
.p2align 3
.L110:
cmpl $4, %edi
je .L119
movq %rdx, %rdi
jmp compile_varerr@PLT
.p2align 4,,10
.p2align 3
.L107:
cmpl $4, %edi
je .L120
testl %edi, %edi
jne .L113
xorl %esi, %esi
movb $65, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L113:
leaq .LC6(%rip), %rdi
movq %rdx, %rsi
jmp compile_err@PLT
.p2align 4,,10
.p2align 3
.L118:
xorl %esi, %esi
movb $66, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L119:
movl $-1, %esi
movb $75, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L117:
xorl %esi, %esi
movb $72, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L120:
movl $-1, %esi
movb $73, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.LHOTE8:
.LHOTB33:
.cfi_endproc
.size compilecast_loc, .-compilecast_loc
# ----------------------
.p2align 4,,15
# ----------------------
.globl compilefunc
.type compilefunc, @function
compilefunc:
.cfi_startproc
pushq %r15
pushq %r14
leaq (%rsi,%rsi,2), %rax
pushq %r13
pushq %r12
pushq %rbp
pushq %rbx
salq $4, %rax
movq $72057594037927935, %rbp
subq $456, %rsp
movq %rcx, 88(%rsp)
movq avma@GOTPCREL(%rip), %rcx
movq %rax, 16(%rsp)
movq %rdi, 56(%rsp)
movq %rsi, 40(%rsp)
movl $11, %esi
movl %edx, 104(%rsp)
movq (%rcx), %rcx
movq %rcx, 64(%rsp)
movq pari_tree@GOTPCREL(%rip), %rcx
addq (%rcx), %rax
movq 16(%rax), %r13
movq 8(%rax), %r12
xorl %eax, %eax
movq %r13, %rdi
call listtogen@PLT
movslq %eax, %rbx
movl $3, %esi
xorl %eax, %eax
movq %rbx, %rdi
movq %rbx, 24(%rsp)
call first_safe_arg@PLT
cltq
movl $1, %esi
movq %rbx, %rdi
movq %rax, 72(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
andq (%rbx), %rbp
cltq
cmpq $39, %r12
movq %rax, 80(%rsp)
leaq -1(%rbp), %rax
movq %rax, 8(%rsp)
jle .L122
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%r12,%r12,2), %rdx
salq $4, %rdx
movq (%rax), %rax
movq 24(%rax,%rdx), %r14
addq 16(%rsp), %rax
cmpl $4, (%rax)
je .L341
.L129:
leaq .LC9(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L132
movl 104(%rsp), %eax
testl %eax, %eax
jne .L132
leaq .LC10(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
.L131:
movq 56(%rsp), %rcx
cmpq $0, 16(%rcx)
movq 32(%rcx), %rax
movq %rax, 232(%rsp)
je .L342
.L166:
movq s_opcode@GOTPCREL(%rip), %rax
leaq 224(%rsp), %rcx
leaq 220(%rsp), %rdx
movq 8(%rax), %rax
movq %rax, 136(%rsp)
movq 56(%rsp), %rax
movq 56(%rax), %rsi
leaq 232(%rsp), %rax
movq %rax, 32(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call get_ret_type@PLT
movq 232(%rsp), %rbp
movl %eax, 108(%rsp)
cmpb $0, (%rbp)
je .L272
leaq (%r12,%r12,2), %rax
movq $0, 144(%rsp)
movq $0, 96(%rsp)
movq $0, 152(%rsp)
movl $1, %ebx
movq %r14, 112(%rsp)
salq $4, %rax
movq %rax, 120(%rsp)
leaq 219(%rsp), %rax
movq %rax, 48(%rsp)
movq 8(%rsp), %rax
addq $1, %rax
movq %rax, 128(%rsp)
leaq 240(%rsp), %rax
movq %rax, 160(%rsp)
.p2align 4,,10
.p2align 3
.L168:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
movq 48(%rsp), %rsi
movq 32(%rsp), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rdx
call parseproto@PLT
testl %eax, %eax
je .L343
cmpq 8(%rsp), %rbx
jg .L169
movq 24(%rsp), %rcx
movq (%rcx,%rbx,8), %rdx
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
addq (%rcx), %rdx
cmpl $10, (%rdx)
je .L170
leal -2(%rax), %edx
cmpl $1, %edx
jbe .L171
.L170:
cmpl $5, %eax
ja .L249
leaq .L259(%rip), %rdx
movl %eax, %ecx
movslq (%rdx,%rcx,4), %rcx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L132:
leaq .LC11(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L133
movq avma@GOTPCREL(%rip), %rax
movq $72057594037927935, %rdx
andq (%rbx), %rdx
movq (%rax), %rax
leaq 0(,%rdx,8), %rcx
movq %rax, %r12
subq %rcx, %r12
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
ja .L344
.L134:
movq avma@GOTPCREL(%rip), %rax
movq %r12, (%rax)
movq $-72057594037927937, %rax
andq (%rbx), %rax
cmpq $0, 8(%rsp)
movq %rax, (%r12)
je .L335
jle .L137
movl $1, %r13d
jmp .L139
.p2align 4,,10
.p2align 3
.L138:
xorl %eax, %eax
call getvar@PLT
cltq
xorl %edi, %edi
movl $1, %esi
movq %rax, (%r12,%r13,8)
xorl %eax, %eax
addq $1, %r13
call var_push@PLT
cmpq %rbp, %r13
je .L345
.L139:
movq (%rbx,%r13,8), %rdi
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rdi,%rdi,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L138
movq 8(%rax), %rdi
jmp .L138
.p2align 4,,10
.p2align 3
.L122:
cmpq $2, 8(%rsp)
je .L346
cmpq $1, 8(%rsp)
je .L347
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
addq (%rcx), %rax
movq 24(%rax), %r14
jmp .L329
.p2align 4,,10
.p2align 3
.L299:
addq $1, %r14
.L329:
cmpb $41, (%r14)
je .L299
cmpl $4, (%rax)
jne .L129
.L341:
movq avma@GOTPCREL(%rip), %rax
movq (%rax), %rbx
movq bot@GOTPCREL(%rip), %rax
movq %rbx, %rcx
subq (%rax), %rcx
leaq -24(%rbx), %rbp
movq %rbp, 24(%rsp)
cmpq $23, %rcx
jbe .L348
.L130:
movq avma@GOTPCREL(%rip), %rax
movq %r12, -16(%rbx)
movq %r13, -8(%rbx)
movq $2, 8(%rsp)
movq $2, 80(%rsp)
movq $2, 72(%rsp)
movq %rbp, (%rax)
movq $3170534137668829187, %rax
movq %rax, -24(%rbx)
jmp .L131
.p2align 4,,10
.p2align 3
.L133:
leaq .LC12(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L147
movq avma@GOTPCREL(%rip), %rax
movq $72057594037927935, %rdx
andq (%rbx), %rdx
movq (%rax), %rax
leaq 0(,%rdx,8), %rcx
movq %rax, %rsi
subq %rcx, %rsi
movq bot@GOTPCREL(%rip), %rcx
movq %rsi, 16(%rsp)
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L148
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L148:
movq 16(%rsp), %rcx
movq avma@GOTPCREL(%rip), %rsi
movq $-72057594037927937, %rax
movl $1, %r12d
movq %rcx, (%rsi)
andq (%rbx), %rax
cmpq $0, 8(%rsp)
movq %rax, (%rcx)
jle .L152
movq %rbp, 8(%rsp)
movq %rcx, %r15
movq %r12, %rbp
jmp .L297
.p2align 4,,10
.p2align 3
.L150:
movq %r12, %rdi
xorl %eax, %eax
call getvar@PLT
movslq %eax, %r13
movq %r12, %rdx
movl %r14d, %edi
movq %r13, (%r15,%rbp,8)
movq %r13, %rsi
xorl %eax, %eax
call op_push@PLT
xorl %esi, %esi
xorl %eax, %eax
movq %r13, %rdi
call var_push@PLT
addq $1, %rbp
cmpq 8(%rsp), %rbp
je .L152
.L297:
movq (%rbx,%rbp,8), %r12
movq pari_tree@GOTPCREL(%rip), %rcx
movl $113, %r14d
leaq (%r12,%r12,2), %r13
salq $4, %r13
movq %r13, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L150
movq 16(%rax), %rdi
xorl %eax, %eax
call is_node_zero@PLT
testl %eax, %eax
je .L349
.L151:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq 8(%rax,%r13), %r12
jmp .L150
.p2align 4,,10
.p2align 3
.L218:
movzbl 219(%rsp), %eax
cmpb $80, %al
je .L228
jle .L350
cmpb $102, %al
je .L222
cmpb $112, %al
jne .L189
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $78, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.p2align 4,,10
.p2align 3
.L237:
movzbl 219(%rsp), %eax
cmpb $115, %al
jne .L320
movq 128(%rsp), %r14
movq avma@GOTPCREL(%rip), %rax
subq %rbx, %r14
movq (%rax), %rax
leaq 1(%r14), %rbp
leaq 0(,%rbp,8), %rdx
movq %rax, %r12
subq %rdx, %r12
movq bot@GOTPCREL(%rip), %rdx
subq (%rdx), %rax
shrq $3, %rax
cmpq %rax, %rbp
jbe .L240
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L240:
movq avma@GOTPCREL(%rip), %rax
movq %r12, (%rax)
movq $-72057594037927936, %rax
testq %rax, %rbp
je .L241
leaq .LC0(%rip), %rsi
movl $15, %edi
xorl %eax, %eax
call pari_err@PLT
.L241:
movq $2449958197289549824, %rax
orq %rax, %rbp
testq %r14, %r14
movq %rbp, (%r12)
jle .L242
movq 24(%rsp), %rax
xorl %r13d, %r13d
movl $1, %ebp
movq $72057594037927935, %r15
leaq (%rax,%rbx,8), %rbx
.p2align 4,,10
.p2align 3
.L243:
movq -8(%rbx,%rbp,8), %rdi
xorl %eax, %eax
movl $19, %esi
call cattovec@PLT
cltq
movq %r15, %rcx
movq %rax, (%r12,%rbp,8)
andq (%rax), %rcx
addq $1, %rbp
cmpq %rbp, %r14
leaq -1(%r13,%rcx), %r13
jge .L243
movq 112(%rsp), %rdx
leaq 1(%r13), %rsi
movl $80, %edi
xorl %eax, %eax
movl $1, %ebp
movl $1, %ebx
movq $72057594037927935, %r13
call op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L265:
movq (%r12,%rbp,8), %rax
movq %r13, %rdx
movl $1, %r15d
andq (%rax), %rdx
cmpq $1, %rdx
jle .L248
.p2align 4,,10
.p2align 3
.L296:
movq (%rax,%r15,8), %rdi
movl $1, %edx
movl $4, %esi
call compilenode@PLT
movq (%r12,%rbp,8), %rax
movq %rbx, %rsi
movl $83, %edi
addq $1, %rbx
movq (%rax,%r15,8), %rdx
xorl %eax, %eax
addq $1, %r15
call op_push@PLT
movq (%r12,%rbp,8), %rax
movq %r13, %rdx
andq (%rax), %rdx
cmpq %r15, %rdx
jg .L296
.L248:
addq $1, %rbp
cmpq %rbp, %r14
jge .L265
.L246:
movq 112(%rsp), %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push_loc@PLT
movq 128(%rsp), %rbx
jmp .L189
.p2align 4,,10
.p2align 3
.L231:
movzbl 219(%rsp), %esi
addq $1, %rbx
leal -71(%rsi), %eax
cmpb $44, %al
ja .L225
leaq .L234(%rip), %rdx
movzbl %al, %eax
movslq (%rdx,%rax,4), %rax
addq %rax, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L224:
movzbl 219(%rsp), %esi
addq $1, %rbx
leal -38(%rsi), %eax
cmpb $77, %al
ja .L225
leaq .L227(%rip), %rdx
movzbl %al, %eax
movslq (%rdx,%rax,4), %rax
addq %rax, %rdx
jmp *%rdx
.L152:
movq 16(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
call checkdups@PLT
.L335:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
call compilecast@PLT
.L336:
movq avma@GOTPCREL(%rip), %rax
movq 64(%rsp), %rcx
movq %rcx, (%rax)
.L121:
addq $456, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L249:
leaq .LC31(%rip), %rsi
movl %eax, %edx
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
.p2align 4,,10
.p2align 3
.L189:
movq 232(%rsp), %rbp
jmp .L168
.L172:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
leaq .LC21(%rip), %rdi
addq (%rcx), %rax
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
.L171:
movzbl 219(%rsp), %r14d
leal -69(%r14), %eax
testb $-5, %al
je .L173
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rcx
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
movl (%rax), %edx
movq 8(%rax), %rsi
cmpq $10, %rdx
je .L351
testq %rdx, %rdx
jne .L173
leaq (%rsi,%rsi,2), %rax
leaq .LC23(%rip), %rdi
salq $4, %rax
movq 24(%rcx,%rax), %rsi
addq 32(%rcx,%rax), %rsi
call compile_err@PLT
movzbl 219(%rsp), %r14d
.p2align 4,,10
.p2align 3
.L173:
leal -38(%r14), %eax
cmpb $77, %al
ja .L175
movzbl %al, %edx
leaq .L177(%rip), %rax
movslq (%rax,%rdx,4), %rdx
addq %rdx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L169:
cmpl $5, %eax
ja .L249
leaq .L260(%rip), %rcx
movl %eax, %edx
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L343:
cmpq 8(%rsp), %rbx
movq 112(%rsp), %r14
jle .L352
.L251:
movq 56(%rsp), %rsi
movl 108(%rsp), %edi
xorl %eax, %eax
movq %r14, %rdx
call op_push_loc@PLT
testb $2, 224(%rsp)
je .L252
testb $2, 88(%rsp)
je .L353
.L252:
movl 220(%rsp), %esi
cmpl $4, %esi
je .L354
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %eax, %eax
call compilecast@PLT
cmpq $0, 96(%rsp)
je .L336
.L258:
movq 96(%rsp), %rsi
movq %r14, %rdx
movl $89, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L336
.p2align 4,,10
.p2align 3
.L272:
movl $1, %ebx
cmpq 8(%rsp), %rbx
movq $0, 96(%rsp)
jg .L251
.L352:
movq 24(%rsp), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq .LC32(%rip), %rdi
movq (%rax,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
movq 24(%rax), %rsi
call compile_err@PLT
jmp .L251
.L320:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rsi
movsbl %al, %edx
movl $5, %edi
xorl %eax, %eax
addq (%rcx), %rsi
movq 32(%rsi), %rcx
movq 24(%rsi), %r8
leaq .LC30(%rip), %rsi
call pari_err@PLT
jmp .L189
.L147:
leaq .LC13(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L153
cmpq $0, 8(%rsp)
movl $1, %r14d
jg .L298
jmp .L335
.p2align 4,,10
.p2align 3
.L155:
movq %r12, %rdi
xorl %eax, %eax
call getvar@PLT
movq %r12, %rdx
movslq %eax, %rsi
movl $102, %edi
xorl %eax, %eax
call op_push@PLT
movq %r12, %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push@PLT
.L156:
addq $1, %r14
cmpq %rbp, %r14
je .L335
.L298:
movq (%rbx,%r14,8), %r12
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r12,%r12,2), %r13
salq $4, %r13
movq %r13, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L155
movq 16(%rax), %rdi
xorl %edx, %edx
movl $4, %esi
call compilenode@PLT
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq 8(%rax,%r13), %r12
xorl %eax, %eax
movq %r12, %rdi
call getvar@PLT
movq %r12, %rdx
movslq %eax, %rsi
movl $103, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L156
.L346:
movq pari_tree@GOTPCREL(%rip), %rax
movq 8(%rbx), %rdx
movq (%rax), %rax
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
movq 24(%rax,%rdx), %rcx
addq 32(%rax,%rdx), %rcx
addq 16(%rsp), %rax
movq %rcx, %r14
jmp .L329
.L350:
cmpb $67, %al
jne .L189
xorl %eax, %eax
call pack_localvars@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq 40(%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L344:
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L134
.L348:
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L130
.L236:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
movq %rbp, %rsi
movq 232(%rsp), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rdx
xorl %eax, %eax
call str_defproto@PLT
movq 40(%rsp), %rdx
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L235:
leaq 1(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L233:
leaq 1(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $69, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L228:
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L230:
movq 40(%rsp), %rdx
movl $-1, %esi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L229:
movq 144(%rsp), %rax
movq $-1, 288(%rsp,%rax,8)
addq $1, %rax
movq %rax, 144(%rsp)
jmp .L189
.L226:
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L353:
movq %r14, %rdx
xorl %esi, %esi
movl $76, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L252
.L225:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rax
movsbl %sil, %edx
addq (%rcx), %rax
movq 32(%rax), %rcx
.L332:
movq 24(%rax), %r8
leaq .LC29(%rip), %rsi
movl $5, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L189
.L345:
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
call checkdups@PLT
movq 8(%rsp), %rsi
movq %r14, %rdx
movl $100, %edi
xorl %eax, %eax
movl $1, %r13d
call op_push_loc@PLT
movq %r12, %rdi
xorl %eax, %eax
call frame_push@PLT
movq %rbx, %rcx
movq s_lvar@GOTPCREL(%rip), %r15
movq localvars@GOTPCREL(%rip), %r14
movq 8(%rsp), %rbx
jmp .L144
.p2align 4,,10
.p2align 3
.L142:
movq %r13, %rax
movq (%r12,%r13,8), %rdx
addq $1, %r13
subq %rbx, %rax
addq 8(%r15), %rax
salq $4, %rax
addq (%r14), %rax
cmpq %rbp, %r13
movq %rdx, -8(%rax)
je .L335
.L144:
movq (%rcx,%r13,8), %r8
movq pari_tree@GOTPCREL(%rip), %rdi
leaq (%r8,%r8,2), %rsi
salq $4, %rsi
movq %rsi, %rax
addq (%rdi), %rax
cmpl $4, (%rax)
jne .L142
movq 16(%rax), %rdi
xorl %eax, %eax
movq %rcx, 24(%rsp)
movq %rsi, 16(%rsp)
movq %r8, 8(%rsp)
call is_node_zero@PLT
testl %eax, %eax
movq 16(%rsp), %rsi
movq 24(%rsp), %rcx
jne .L142
movq pari_tree@GOTPCREL(%rip), %rax
movl $2, %edx
movq %rcx, 16(%rsp)
movq (%rax), %rax
movq 16(%rax,%rsi), %rdi
movl $4, %esi
call compilenode@PLT
movq 8(%rsp), %r8
movq %r13, %rsi
movl $107, %edi
subq %rbp, %rsi
xorl %eax, %eax
movq %r8, %rdx
call op_push@PLT
movq 16(%rsp), %rcx
jmp .L142
.L354:
cmpq $0, 96(%rsp)
jne .L254
movq 136(%rsp), %rax
movq s_opcode@GOTPCREL(%rip), %rcx
subq $-128, %rax
cmpq %rax, 8(%rcx)
jg .L355
.L255:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %eax, %eax
call compilecast@PLT
jmp .L336
.L347:
movq pari_tree@GOTPCREL(%rip), %rax
movq 8(%rbx), %rdx
movq (%rax), %rax
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
movq 24(%rax,%rdx), %r14
addq 16(%rsp), %rax
jmp .L329
.L222:
movq 40(%rsp), %rdx
leaq foo.20737(%rip), %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L254:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
movl $4, %esi
xorl %eax, %eax
call compilecast@PLT
jmp .L258
.L349:
movq pari_tree@GOTPCREL(%rip), %rax
movl $2, %edx
movl $4, %esi
movb $112, %r14b
movq (%rax), %rax
movq 16(%rax,%r13), %rdi
call compilenode@PLT
jmp .L151
.L187:
movq 24(%rsp), %rax
leaq 1(%rbx), %r12
movl $19, %esi
movq $72057594037927935, %rbp
movq (%rax,%rbx,8), %rbx
xorl %eax, %eax
movq %rbx, %rdi
call cattovec@PLT
movslq %eax, %r14
andq (%r14), %rbp
leaq -1(%rbp), %rcx
cmpq $1, %rcx
je .L356
xorl %eax, %eax
movq %rbx, %rdx
movq %rbp, %rsi
movl $80, %edi
movq %rcx, 168(%rsp)
movl $1, %r13d
call op_push@PLT
movq 168(%rsp), %rcx
testq %rcx, %rcx
jle .L217
.p2align 4,,10
.p2align 3
.L295:
movq (%r14,%r13,8), %rdi
movl $1, %edx
movl $4, %esi
call compilenode@PLT
movq %r13, %rsi
xorl %eax, %eax
movq %rbx, %rdx
movl $83, %edi
addq $1, %r13
call op_push@PLT
cmpq %rbp, %r13
jne .L295
.L217:
movq %rbx, %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push@PLT
leaq .LC28(%rip), %rdi
call is_entry@PLT
movq %rbx, %rdx
movq %rax, %rsi
movl $95, %edi
xorl %eax, %eax
call op_push@PLT
.L333:
movq %rbx, %rdx
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
movq %r12, %rbx
call op_push@PLT
jmp .L189
.L176:
movq 24(%rsp), %rax
cmpb $38, %r14b
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rdi
je .L357
.L196:
xorl %eax, %eax
call detag@PLT
movslq %eax, %rbx
xorl %eax, %eax
movq %rbx, %rdi
call getlvalue@PLT
movslq %eax, %r12
xorl %eax, %eax
movq %r12, %rdi
call getmvar@PLT
movslq %eax, %rsi
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%rbx,%rbx,2), %rdx
salq $4, %rdx
addq (%rax), %rdx
cmpl $16, (%rdx)
movq 40(%rsp), %rdx
je .L358
testq %rsi, %rsi
je .L201
movl $108, %edi
xorl %eax, %eax
call op_push@PLT
.L202:
movq %rbx, %rdi
xorl %eax, %eax
call compilelvalue@PLT
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $88, %edi
xorl %eax, %eax
call op_push@PLT
.L200:
addq $1, 96(%rsp)
movq %rbp, %rbx
jmp .L189
.L178:
movq 24(%rsp), %rax
leaq 1(%rbx), %r12
movq 144(%rsp), %rcx
movl $4, %esi
movq (%rax,%rbx,8), %rax
movq pari_tree@GOTPCREL(%rip), %rbx
leaq 1(%rcx), %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rbx), %rax
movq %r12, %rbx
movq 8(%rax), %rdx
movq 16(%rax), %rdi
movq %rdx, 288(%rsp,%rcx,8)
movl $2, %edx
call compilenode@PLT
movq %rbp, 144(%rsp)
jmp .L189
.L179:
leaq 1(%rbx), %rax
movq 160(%rsp), %rdi
movq %rax, 184(%rsp)
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %rax
movq %rax, 168(%rsp)
movq %rax, %rbx
xorl %eax, %eax
cmpb $73, %r14b
setne %al
sall $2, %eax
movl %eax, 200(%rsp)
xorl %eax, %eax
call getcodepos@PLT
cmpq $0, 144(%rsp)
jne .L204
leaq (%rbx,%rbx,2), %rax
salq $4, %rax
movq %rax, 176(%rsp)
movq %rax, %rcx
.L205:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
cmpl $10, (%rax,%rcx)
je .L359
movl 200(%rsp), %esi
movq 168(%rsp), %rdi
xorl %edx, %edx
cmpb $73, %r14b
setne %dl
call compilenode@PLT
.L213:
movq 160(%rsp), %rdi
xorl %eax, %eax
call getclosure@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq 168(%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push@PLT
movq 184(%rsp), %rbx
jmp .L189
.L180:
xorl %edx, %edx
cmpq 80(%rsp), %rbx
jl .L188
xorl %edx, %edx
cmpq 72(%rsp), %rbx
setl %dl
leaq 2(%rdx,%rdx), %rdx
.L188:
movq 24(%rsp), %rax
movl $4, %esi
movq (%rax,%rbx,8), %rdi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L181:
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %r13
.L192:
xorl %edx, %edx
movl $1, %esi
movq %r13, %rdi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L182:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rdx
movq 24(%rsp), %rax
leaq (%rax,%rbx,8), %rbp
movq (%rbp), %r13
leaq (%r13,%r13,2), %r12
salq $4, %r12
addq %rdx, %r12
movl (%r12), %ecx
cmpl $14, %ecx
je .L192
cmpq $0, 152(%rsp)
je .L360
.L193:
movq 152(%rsp), %rdi
movl $10, %esi
movl %ecx, 200(%rsp)
movq %rdx, 168(%rsp)
call strchr@PLT
testq %rax, %rax
movq %rax, %r14
movq 168(%rsp), %rdx
movl 200(%rsp), %ecx
je .L361
.L194:
leaq 1(%r14), %rax
cmpl $13, %ecx
movq %rax, 152(%rsp)
jne .L195
cmpq $0, 8(%r12)
je .L362
.L195:
xorl %edx, %edx
movq %r13, %rdi
movl $4, %esi
call compilenode@PLT
movq 40(%rsp), %r14
movq 152(%rsp), %rsi
movl $65, %edi
xorl %eax, %eax
addq $1, %rbx
movq %r14, %rdx
call op_push@PLT
leaq .LC25(%rip), %rdi
call is_entry@PLT
movq %r14, %rdx
movq %rax, %rsi
movl $96, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L183:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rbx
xorl %eax, %eax
movq %rbx, %rdi
call getvar@PLT
movq 144(%rsp), %rax
movq %rbx, 288(%rsp,%rax,8)
addq $1, %rax
movq %rbp, %rbx
movq %rax, 144(%rsp)
jmp .L189
.L184:
movq 24(%rsp), %rax
leaq (%rax,%rbx,8), %rbp
xorl %eax, %eax
movq (%rbp), %rdi
call getlvalue@PLT
movslq %eax, %r12
xorl %eax, %eax
movq %r12, %rdi
call getmvar@PLT
movslq %eax, %rsi
movq 40(%rsp), %rdx
testq %rsi, %rsi
je .L190
movl $121, %edi
xorl %eax, %eax
call op_push@PLT
.L191:
movq (%rbp), %rdi
movl $2, %edx
movl $4, %esi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L185:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
xorl %edx, %edx
movl $3, %esi
movq (%rax,%rbx,8), %rdi
movq %rbp, %rbx
call compilenode@PLT
jmp .L189
.L186:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rdi
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%rdi,%rdi,2), %rdx
movq (%rax), %rcx
salq $4, %rdx
addq %rcx, %rdx
cmpl $16, (%rdx)
je .L363
movl $2, %edx
movl $4, %esi
call compilenode@PLT
movq 40(%rsp), %rdx
.L334:
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
call op_push@PLT
movq %rbp, %rbx
jmp .L189
.L355:
movq 136(%rsp), %rdi
movq %r14, %rcx
xorl %edx, %edx
movb $118, %sil
xorl %eax, %eax
call op_insert_loc@PLT
xorl %esi, %esi
movq %r14, %rdx
movl $119, %edi
xorl %eax, %eax
call op_push_loc@PLT
movl 220(%rsp), %esi
jmp .L255
.L175:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rax
movsbl %r14b, %edx
addq (%rcx), %rax
movq 32(%rax), %rcx
jmp .L332
.L153:
leaq .LC14(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
jne .L162
movq compatible@GOTPCREL(%rip), %rax
cmpq $3, (%rax)
je .L364
.L161:
cmpq $33, %r12
je .L365
cmpq $37, %r12
je .L366
cmpq $2, 8(%rsp)
jne .L165
cmpq $18, %r12
jne .L165
movq 16(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
movq $2, 8(%rsp)
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $14, (%rax)
jne .L131
leaq .LC18(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
jmp .L131
.p2align 4,,10
.p2align 3
.L342:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
leaq .LC20(%rip), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rsi
call compile_err@PLT
jmp .L166
.L351:
movq 24(%rax), %rsi
leaq .LC22(%rip), %rdi
call compile_err@PLT
movzbl 219(%rsp), %r14d
jmp .L173
.L364:
leaq .LC15(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L161
.L162:
cmpq $1, 8(%rsp)
je .L160
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
leaq .LC16(%rip), %rdi
addq (%rcx), %rax
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
.L160:
leaq .LC17(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
movq 8(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $18, (%rax)
jne .L131
cmpq $18, 8(%rax)
jne .L131
movq 16(%rax), %rdi
movl $11, %esi
xorl %eax, %eax
call listtogen@PLT
cltq
movl $3, %esi
movq %rax, %rbx
movq %rax, 24(%rsp)
movq $72057594037927935, %rax
andq (%rbx), %rax
movq %rbx, %rdi
subq $1, %rax
movq %rax, 8(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
cltq
movl $1, %esi
movq %rbx, %rdi
movq %rax, 72(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
cltq
movq %rax, 80(%rsp)
jmp .L131
.p2align 4,,10
.p2align 3
.L242:
movq 112(%rsp), %rdx
movl $1, %esi
movl $80, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L246
.L190:
movq %r12, %rsi
movl $120, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L191
.L137:
movq %r12, %rsi
movq %rbx, %rdi
xorl %eax, %eax
call checkdups@PLT
movq 8(%rsp), %rsi
movq %r14, %rdx
movl $100, %edi
xorl %eax, %eax
call op_push_loc@PLT
movq %r12, %rdi
xorl %eax, %eax
call frame_push@PLT
jmp .L335
.L201:
movq %r12, %rsi
movl $104, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L202
.L165:
cmpq $19, %r12
jne .L131
movq 8(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq .LC19(%rip), %rdi
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
movq 32(%rax), %rsi
addq 24(%rax), %rsi
call compile_err@PLT
jmp .L131
.L359:
movl 200(%rsp), %edx
movq 168(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
call compilecast@PLT
jmp .L213
.L204:
movq 144(%rsp), %rax
movq bot@GOTPCREL(%rip), %rcx
leaq 1(%rax), %rdx
movq avma@GOTPCREL(%rip), %rax
leaq 0(,%rdx,8), %rbx
movq (%rax), %rax
movq %rax, %rbp
subq (%rcx), %rax
subq %rbx, %rbp
shrq $3, %rax
cmpq %rax, %rdx
jbe .L206
movl $14, %edi
xorl %eax, %eax
movq %rdx, 176(%rsp)
call pari_err@PLT
movq 176(%rsp), %rdx
.L206:
movq avma@GOTPCREL(%rip), %rax
movq %rbp, (%rax)
movq $-72057594037927936, %rax
testq %rax, %rdx
jne .L367
movq avma@GOTPCREL(%rip), %rax
movq $3170534137668829184, %r12
orq %rdx, %r12
movq %r12, (%rbp)
movq (%rax), %rax
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rbx
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L331
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L331:
movq avma@GOTPCREL(%rip), %rax
movq %rbx, (%rax)
.L261:
movq 168(%rsp), %rax
movq %r12, (%rbx)
xorl %r13d, %r13d
leaq 288(%rsp), %r12
movq 144(%rsp), %r15
movb %r14b, 207(%rsp)
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq %rax, 192(%rsp)
movq %rax, 176(%rsp)
jmp .L211
.p2align 4,,10
.p2align 3
.L210:
movq %r14, %rdi
xorl %eax, %eax
call getvar@PLT
movslq %eax, %rdi
movl $1, %esi
xorl %eax, %eax
movq %rdi, 8(%rbp,%r13,8)
movq %r14, 8(%rbx,%r13,8)
addq $1, %r13
call var_push@PLT
cmpq %r13, %r15
jle .L368
.L211:
movq (%r12,%r13,8), %r14
testq %r14, %r14
jns .L210
movq pari_tree@GOTPCREL(%rip), %rax
movq 192(%rsp), %rcx
leaq .LC27(%rip), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rsi
subq $1, %rsi
call compile_err@PLT
jmp .L210
.L368:
movq %rbp, %rsi
movq %rbx, %rdi
xorl %eax, %eax
movzbl 207(%rsp), %r14d
call checkdups@PLT
movq %rbp, %rdi
xorl %eax, %eax
call frame_push@PLT
movq 176(%rsp), %rcx
jmp .L205
.L356:
movq 8(%r14), %rdi
movl $2, %edx
movl $4, %esi
call compilenode@PLT
jmp .L333
.L363:
movq 8(%rdx), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
movq 32(%rax), %rsi
movq 24(%rax), %rdi
call strntoGENstr@PLT
movq %rax, %rdi
xorl %eax, %eax
call data_push@PLT
movq 40(%rsp), %rbx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push@PLT
movq %rbx, %rdx
jmp .L334
.L358:
testq %rsi, %rsi
je .L199
movl $109, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L200
.L357:
leaq (%rdi,%rdi,2), %rbx
movq pari_tree@GOTPCREL(%rip), %rcx
salq $4, %rbx
movq %rbx, %rax
addq (%rcx), %rax
cmpl $12, (%rax)
je .L197
movq 24(%rax), %rsi
leaq .LC26(%rip), %rdi
call compile_err@PLT
movq pari_tree@GOTPCREL(%rip), %rcx
movq %rbx, %rax
addq (%rcx), %rax
.L197:
movq 8(%rax), %rdi
jmp .L196
.L360:
movq 56(%rsp), %rax
movq 32(%rax), %rax
movq %rax, 152(%rsp)
jmp .L193
.L362:
movq 32(%r12), %rsi
movq 24(%r12), %rdi
addq $1, %rbx
call strntoGENexp@PLT
movq 152(%rsp), %rsi
movq %rax, %rdi
call eval_mnemonic@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L366:
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r13,%r13,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $9, (%rax)
jne .L131
movq avma@GOTPCREL(%rip), %rax
movq 64(%rsp), %rcx
movl $82, %edx
movl 104(%rsp), %esi
movq %r13, %rdi
movq %rcx, (%rax)
xorl %eax, %eax
call compilevec@PLT
jmp .L121
.p2align 4,,10
.p2align 3
.L365:
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r13,%r13,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $14, (%rax)
jne .L131
movq 8(%rax), %rsi
movq avma@GOTPCREL(%rip), %rcx
movq %r13, %rdi
movq 64(%rsp), %rbx
movl 104(%rsp), %edx
xorl %eax, %eax
negq %rsi
movq %rbx, (%rcx)
call compilesmall@PLT
jmp .L121
.p2align 4,,10
.p2align 3
.L367:
leaq .LC0(%rip), %rsi
xorl %eax, %eax
movl $15, %edi
movq %rdx, 176(%rsp)
movq $3170534137668829184, %r12
call pari_err@PLT
movq 176(%rsp), %rdx
movq avma@GOTPCREL(%rip), %rax
orq %rdx, %r12
movq %r12, (%rbp)
movq (%rax), %rax
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rbx
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L330
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L330:
movq avma@GOTPCREL(%rip), %rax
leaq .LC0(%rip), %rsi
movl $15, %edi
movq %rbx, (%rax)
xorl %eax, %eax
call pari_err@PLT
jmp .L261
.L199:
movq %r12, %rsi
movl $105, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L200
.L361:
movq 16(%rsp), %rax
leaq .LC24(%rip), %rdi
movq 24(%rdx,%rax), %rsi
call compile_err@PLT
movq (%rbp), %r13
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%r13,%r13,2), %r12
salq $4, %r12
addq (%rax), %r12
movl (%r12), %ecx
jmp .L194
.LHOTE33:
.LHOTB38:
.cfi_endproc
.size compilefunc, .-compilefunc
# ----------------------
.section .rodata
.align 4
.L259:
.long .L249-.L259
.long .L171-.L259
.long .L224-.L259
.long .L231-.L259
.long .L237-.L259
.long .L218-.L259
.align 4
.L234:
.long .L233-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L235-.L234
.long .L235-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L236-.L234
.long .L236-.L234
.align 4
.L227:
.long .L226-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L228-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L229-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L230-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L226-.L227
.long .L226-.L227
.align 4
.L177:
.long .L176-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L176-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L178-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L179-.L177
.long .L175-.L177
.long .L180-.L177
.long .L175-.L177
.long .L179-.L177
.long .L175-.L177
.long .L175-.L177
.long .L181-.L177
.long .L182-.L177
.long .L175-.L177
.long .L175-.L177
.long .L181-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L183-.L177
.long .L184-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L185-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L186-.L177
.long .L187-.L177
.align 4
.L260:
.long .L249-.L260
.long .L172-.L260
.long .L224-.L260
.long .L231-.L260
.long .L237-.L260
.long .L218-.L260
.align 4
.L395:
.long .L420-.L395
.long .L394-.L395
.long .L396-.L395
.long .L397-.L395
.long .L398-.L395
.long .L399-.L395
.align 4
.L410:
.long .L409-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L411-.L410
.long .L411-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L412-.L410
.long .L412-.L410
.align 4
.L405:
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L406-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L407-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L399-.L405
.align 4
.L400:
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L401-.L400
.long .L401-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L407-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L403-.L400
.long .L403-.L400
.align 4
.L454:
.long .L453-.L454
.long .L452-.L454
.long .L452-.L454
.long .L452-.L454
.long .L455-.L454
.long .L456-.L454
.long .L452-.L454
.long .L452-.L454
.long .L457-.L454
.long .L458-.L454
.long .L459-.L454
.long .L452-.L454
.long .L460-.L454
.long .L459-.L454
.long .L459-.L454
.long .L461-.L454
.long .L459-.L454
.long .L462-.L454
.long .L463-.L454
.long .L464-.L454
.align 4
.L504:
.long .L501-.L504
.long .L478-.L504
.long .L494-.L504
.long .L494-.L504
.long .L496-.L504
.long .L530-.L504
.align 4
.L483:
.long .L482-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L482-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L484-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L485-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L485-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L487-.L483
.long .L488-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L487-.L483
.long .L489-.L483
.align 4
.L506:
.long .L501-.L506
.long .L479-.L506
.long .L494-.L506
.long .L494-.L506
.long .L496-.L506
.long .L473-.L506
# ----------------------
.text
.p2align 4,,15
# ----------------------
.globl genclosure
.type genclosure, @function
genclosure:
.cfi_startproc
pushq %r15
pushq %r14
xorl %r14d, %r14d
pushq %r13
pushq %r12
xorl %r12d, %r12d
pushq %rbp
pushq %rbx
xorl %ebp, %ebp
xorl %ebx, %ebx
subq $152, %rsp
movq 32(%rdi), %rax
movq %rdi, 16(%rsp)
movq %rdx, 8(%rsp)
leaq 68(%rsp), %rdx
movl %ecx, 24(%rsp)
leaq 88(%rsp), %rcx
movq %rsi, (%rsp)
movq %rax, 72(%rsp)
movq 56(%rdi), %rax
leaq 72(%rsp), %rdi
leaq 67(%rsp), %r13
leaq 80(%rsp), %r15
movq %rax, 32(%rsp)
movq %rax, %rsi
xorl %eax, %eax
call get_ret_type@PLT
movl %eax, 44(%rsp)
movq 72(%rsp), %rax
movq %rax, 80(%rsp)
.p2align 4,,10
.p2align 3
.L370:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L442
cmpl $5, %eax
je .L416
testq %r12, %r12
jne .L420
movzbl 67(%rsp), %ecx
cmpb $86, %cl
je .L370
addq %rbx, %rbx
addq %rbp, %rbp
addq $1, %r14
cmpl $1, %eax
je .L373
cmpl $2, %eax
jne .L370
subl $38, %ecx
cmpb $35, %cl
ja .L370
movl $1, %eax
movq %rbp, %rdx
salq %cl, %rax
movq $36507222017, %rcx
orq $1, %rdx
testq %rcx, %rax
cmovne %rdx, %rbp
jmp .L370
.p2align 4,,10
.p2align 3
.L416:
movl $1, %r12d
jmp .L370
.p2align 4,,10
.p2align 3
.L373:
orq $1, %rbx
jmp .L370
.p2align 4,,10
.p2align 3
.L420:
xorl %eax, %eax
.L372:
addq $152, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L442:
movl 24(%rsp), %eax
testl %eax, %eax
je .L376
testq %rbx, %rbx
jne .L376
movq 16(%rsp), %rax
testb $1, 9(%rax)
je .L376
movq gen_0@GOTPCREL(%rip), %rax
movq (%rax), %rax
jmp .L372
.p2align 4,,10
.p2align 3
.L376:
leaq 96(%rsp), %rax
movq %rax, 56(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call getcodepos@PLT
cmpq %r14, 8(%rsp)
movq dbgstart@GOTPCREL(%rip), %rax
movq (%rsp), %rsi
movq %rsi, (%rax)
jg .L443
cmpq $0, 8(%rsp)
jle .L382
.L378:
movl $1, %r12d
movq %r14, 24(%rsp)
movq %rbx, 48(%rsp)
movq (%rsp), %r14
movq %r12, %rbx
movq 8(%rsp), %r12
.p2align 4,,10
.p2align 3
.L381:
xorl %edi, %edi
xorl %eax, %eax
addq $1, %rbx
call data_push@PLT
movq %r14, %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push_loc@PLT
cmpq %rbx, %r12
jge .L381
movq 24(%rsp), %r14
movq 48(%rsp), %rbx
.L382:
testq %rbx, %rbx
jne .L444
.L380:
testq %rbp, %rbp
jne .L445
.L383:
movq 72(%rsp), %rax
movq %rax, 80(%rsp)
.p2align 4,,10
.p2align 3
.L384:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L446
cmpl $5, %eax
jne .L384
movzbl 67(%rsp), %eax
cmpb $80, %al
je .L387
jle .L447
cmpb $102, %al
je .L390
cmpb $112, %al
jne .L384
movq (%rsp), %rdx
xorl %esi, %esi
movl $78, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L447:
cmpb $67, %al
jne .L384
xorl %eax, %eax
call pack_localvars@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq (%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L390:
movq (%rsp), %rdx
leaq foo.20841(%rip), %rsi
movl $65, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L387:
movq (%rsp), %rdx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L446:
movq 32(%rsp), %rax
movq 72(%rsp), %rbx
leaq .L395(%rip), %rbp
leaq .L400(%rip), %r12
movq %r14, 24(%rsp)
negq %rax
movq %rbx, 80(%rsp)
movq %rax, %r14
.L393:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L448
cmpl $5, %eax
ja .L420
movl %eax, %eax
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L398:
movsbl 67(%rsp), %edx
cmpb $115, %dl
je .L420
movq 16(%rsp), %rax
leaq .LC37(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
.L399:
movq 80(%rsp), %rbx
addq $1, %r14
jmp .L393
.p2align 4,,10
.p2align 3
.L397:
movsbl 67(%rsp), %edx
leal -71(%rdx), %eax
cmpb $44, %al
ja .L408
leaq .L410(%rip), %rsi
movzbl %al, %eax
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L396:
movsbl 67(%rsp), %edx
leal -38(%rdx), %eax
cmpb $77, %al
ja .L404
leaq .L405(%rip), %rbx
movzbl %al, %eax
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L394:
movzbl 67(%rsp), %eax
subl $38, %eax
cmpb $77, %al
ja .L399
movzbl %al, %eax
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L443:
movq 16(%rsp), %rax
leaq .LC34(%rip), %rsi
movl $5, %edi
movq (%rax), %rdx
xorl %eax, %eax
call pari_err@PLT
jmp .L378
.p2align 4,,10
.p2align 3
.L407:
movq (%rsp), %rdx
movq %r14, %rsi
movl $75, %edi
xorl %eax, %eax
addq $1, %r14
call op_push_loc@PLT
movq 80(%rsp), %rbx
jmp .L393
.L406:
movq (%rsp), %rbx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
.L440:
movq %rbx, %rdx
movq %r14, %rsi
movl $117, %edi
xorl %eax, %eax
addq $1, %r14
call op_push_loc@PLT
movq 80(%rsp), %rbx
jmp .L393
.L412:
movq (%rsp), %rdx
movq 80(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
call str_defproto@PLT
movq (%rsp), %rbx
movq %r14, %rsi
movl $116, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
movq %rbx, %rdx
movq %r14, %rsi
movl $74, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L411:
leaq 1(%rbx), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq (%rsp), %rbx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
jmp .L440
.L409:
leaq 1(%rbx), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq (%rsp), %rbx
movq %rax, %rsi
movl $69, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
movq %rbx, %rdx
movq %r14, %rsi
movl $116, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L403:
movq (%rsp), %rdx
movq %r14, %rsi
movl $74, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L401:
movq (%rsp), %rdx
movq %r14, %rsi
movl $73, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L408:
movq 16(%rsp), %rax
leaq .LC36(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
jmp .L399
.L404:
movq 16(%rsp), %rax
leaq .LC35(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
jmp .L399
.p2align 4,,10
.p2align 3
.L445:
movq (%rsp), %rdx
movq %rbp, %rsi
movl $115, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L383
.p2align 4,,10
.p2align 3
.L444:
movq (%rsp), %rdx
movq %rbx, %rsi
movl $114, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L380
.L448:
movq (%rsp), %rdx
movq 16(%rsp), %rsi
movl 44(%rsp), %edi
movq 24(%rsp), %r14
call op_push_loc@PLT
cmpq $2, 88(%rsp)
je .L449
.L415:
movq (%rsp), %rdx
movl 68(%rsp), %edi
movl $4, %esi
call compilecast_loc@PLT
movq 16(%rsp), %rax
movq (%rax), %rdi
call strtoGENstr@PLT
movq %r14, %rsi
subq 8(%rsp), %rsi
movq 56(%rsp), %rdi
movq %rax, %rcx
xorl %edx, %edx
xorl %eax, %eax
call getfunction@PLT
cltq
jmp .L372
.L449:
movq (%rsp), %rdx
xorl %esi, %esi
movl $76, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L415
.LHOTE38:
.LHOTB41:
.cfi_endproc
.size genclosure, .-genclosure
# ----------------------
.p2align 4,,15
# ----------------------
.globl optimizenode
.type optimizenode, @function
optimizenode:
.cfi_startproc
testq %rdi, %rdi
pushq %r14
pushq %r13
pushq %r12
pushq %rbp
pushq %rbx
movq %rdi, %rbx
js .L469
.L451:
movq pari_tree@GOTPCREL(%rip), %r12
leaq (%rbx,%rbx,2), %rbp
salq $4, %rbp
movq (%r12), %rcx
leaq (%rcx,%rbp), %rax
cmpl $19, (%rax)
movq 8(%rax), %r13
movq 16(%rax), %r14
ja .L452
movl (%rax), %esi
leaq .L454(%rip), %rdx
movslq (%rdx,%rsi,4), %rsi
addq %rsi, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L463:
movq %rbx, %rdi
xorl %eax, %eax
call getfunc@PLT
movslq %eax, %rdi
movq 8(%rdi), %rax
andl $253, %eax
cmpq $100, %rax
jne .L470
.L462:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizecall@PLT
.p2align 4,,10
.p2align 3
.L464:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
movq $3, 40(%rax,%rbp)
.L450:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
ret
.p2align 4,,10
.p2align 3
.L453:
leaq (%r13,%r13,2), %rbx
salq $4, %rbx
cmpl $10, (%rcx,%rbx)
je .L465
movq %r13, %rdi
call optimizenode@PLT
.L465:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
leaq (%r14,%r14,2), %rdx
salq $4, %rdx
movq 40(%rax,%rdx), %rdx
andq 40(%rax,%rbx), %rdx
movq %rdx, 40(%rax,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L455:
movq %r13, %rdi
call optimizenode@PLT
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
movq $0, 40(%rax,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L456:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizefacteurmat@PLT
.p2align 4,,10
.p2align 3
.L457:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizemat@PLT
.p2align 4,,10
.p2align 3
.L458:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizevec@PLT
.p2align 4,,10
.p2align 3
.L459:
movq $3, 40(%rax)
jmp .L450
.p2align 4,,10
.p2align 3
.L460:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
movq 24(%rax), %rsi
leaq .LC40(%rip), %rdi
jmp compile_err@PLT
.p2align 4,,10
.p2align 3
.L461:
movq %r13, %rdi
call optimizenode@PLT
movq (%r12), %rdx
leaq (%r13,%r13,2), %rax
salq $4, %rax
movq 40(%rdx,%rax), %rax
movq %rax, 40(%rdx,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L452:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
leaq .LC39(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
jmp pari_err@PLT
.p2align 4,,10
.p2align 3
.L469:
leaq .LC39(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L451
.p2align 4,,10
.p2align 3
.L470:
movq %rbx, %rsi
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizefunc@PLT
.LHOTE41:
.LHOTB43:
.cfi_endproc
.size optimizenode, .-optimizenode
# ----------------------
.p2align 4,,15
# ----------------------
.globl optimizefunc
.type optimizefunc, @function
optimizefunc:
.cfi_startproc
pushq %r15
pushq %r14
pushq %r13
pushq %r12
leaq (%rsi,%rsi,2), %r13
pushq %rbp
pushq %rbx
movl $11, %esi
salq $4, %r13
subq $104, %rsp
movq avma@GOTPCREL(%rip), %rax
movq pari_tree@GOTPCREL(%rip), %r12
movq 32(%rdi), %rdx
movq (%rax), %rax
movq %rdx, 80(%rsp)
movq %rax, 40(%rsp)
movq %r13, %rax
addq (%r12), %rax
movq 8(%rax), %rbx
movq 16(%rax), %rax
movq %rax, %rdi
xorl %eax, %eax
call listtogen@PLT
cmpq $0, 80(%rsp)
cltq
movq %rax, 32(%rsp)
movq (%rax), %rbp
je .L507
leaq 80(%rsp), %rax
leaq 88(%rsp), %rcx
leaq 76(%rsp), %rdx
movl $2, %esi
movq %rax, 16(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call get_ret_type@PLT
movq 80(%rsp), %rax
testq %rax, %rax
je .L509
cmpb $0, (%rax)
je .L509
movq $72057594037927935, %rax
movq (%r12), %rcx
andq %rax, %rbp
leaq -1(%rbp), %rax
movq %rbp, 48(%rsp)
movl $1, %ebp
movq %rax, 8(%rsp)
leaq (%rbx,%rbx,2), %rax
movl $3, %ebx
salq $4, %rax
movq %rax, 56(%rsp)
leaq 75(%rsp), %rax
movq %rax, 24(%rsp)
.p2align 4,,10
.p2align 3
.L473:
movq 24(%rcx,%r13), %rdx
movq 24(%rsp), %rsi
movq 16(%rsp), %rdi
call parseproto@PLT
testl %eax, %eax
je .L503
cmpq 8(%rsp), %rbp
jg .L474
movq 32(%rsp), %rsi
movq (%r12), %rcx
leaq (%rsi,%rbp,8), %r14
movq (%r14), %rdx
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
addq %rcx, %rdx
cmpl $10, (%rdx)
je .L475
leal -2(%rax), %edx
cmpl $1, %edx
jbe .L529
cmpl $4, %eax
je .L496
cmpl $5, %eax
je .L473
cmpl $1, %eax
je .L529
.L501:
leaq .LC31(%rip), %rsi
movl %eax, %edx
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
.L530:
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L509:
movl $3, %ebx
.L472:
movq 32(%rsp), %rdi
xorl %eax, %eax
call vec_optimize@PLT
.L503:
movq avma@GOTPCREL(%rip), %rax
movq 40(%rsp), %rcx
movq %rcx, (%rax)
movq (%r12), %rax
movq %rbx, 40(%rax,%r13)
addq $104, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L474:
cmpl $5, %eax
ja .L501
leaq .L504(%rip), %rcx
movl %eax, %edx
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L496:
movsbl 75(%rsp), %edx
cmpb $115, %dl
jne .L525
movq 48(%rsp), %r14
movq 32(%rsp), %rax
subq %rbp, %r14
leaq (%rax,%rbp,8), %r15
movl $1, %ebp
testq %r14, %r14
jle .L531
.p2align 4,,10
.p2align 3
.L518:
movq -8(%r15,%rbp,8), %rdi
movl $19, %esi
xorl %eax, %eax
addq $1, %rbp
call cattovec@PLT
movl %eax, %edi
xorl %eax, %eax
call vec_optimize@PLT
cltq
andq %rax, %rbx
cmpq %rbp, %r14
jge .L518
.L531:
movq (%r12), %rcx
movq 48(%rsp), %rbp
jmp .L473
.p2align 4,,10
.p2align 3
.L494:
cmpq 8(%rsp), %rbp
jg .L530
movq 32(%rsp), %rax
leaq 1(%rbp), %r14
movq (%rax,%rbp,8), %rdi
movq %r14, %rbp
call optimizenode@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L478:
movq %r13, %rax
addq (%r12), %rax
leaq .LC21(%rip), %rdi
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
movq 32(%rsp), %rax
leaq (%rax,%rbp,8), %r14
movq (%r14), %rax
leaq (%rax,%rax,2), %rdx
salq $4, %rdx
addq (%r12), %rdx
cmpl $10, (%rdx)
jne .L529
.L479:
movzbl 75(%rsp), %esi
leal -69(%rsi), %eax
testb $-5, %al
je .L480
movq 24(%rdx), %rsi
leaq .LC22(%rip), %rdi
call compile_err@PLT
.p2align 4,,10
.p2align 3
.L529:
movzbl 75(%rsp), %esi
.L480:
leal -38(%rsi), %eax
cmpb $77, %al
ja .L481
leaq .L483(%rip), %rcx
movzbl %al, %eax
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L475:
cmpl $5, %eax
ja .L501
leaq .L506(%rip), %rdi
movl %eax, %esi
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmp *%rsi
.p2align 4,,10
.p2align 3
.L507:
xorl %ebx, %ebx
jmp .L472
.p2align 4,,10
.p2align 3
.L525:
movq 56(%rsp), %rax
addq (%r12), %rax
leaq .LC30(%rip), %rsi
movl $5, %edi
movq 32(%rax), %rcx
movq 24(%rax), %r8
xorl %eax, %eax
call pari_err@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L489:
movq (%r14), %rdi
movl $19, %esi
xorl %eax, %eax
addq $1, %rbp
call cattovec@PLT
movl %eax, %edi
xorl %eax, %eax
call vec_optimize@PLT
cltq
movq (%r12), %rcx
andq %rax, %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L488:
movq (%r14), %rdi
addq $1, %rbp
xorl %ebx, %ebx
call optimizenode@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L487:
movq (%r14), %rax
movq (%r12), %rcx
addq $1, %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq $3, 40(%rcx,%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L486:
movq (%r14), %rdi
addq $1, %rbp
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
andq 40(%rcx,%rax), %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L485:
movq (%r14), %rdi
addq $1, %rbp
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
andq 40(%rax), %rbx
movq $3, 40(%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L484:
movq (%r14), %rax
addq $1, %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%r12), %rax
cmpl $4, (%rax)
movq 16(%rax), %r14
je .L493
movq 32(%rax), %rsi
addq 24(%rax), %rsi
leaq .LC42(%rip), %rdi
call compile_err@PLT
.L493:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rcx
leaq (%r14,%r14,2), %rax
salq $4, %rax
andq 40(%rcx,%rax), %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L482:
cmpb $38, %sil
movq (%r14), %rdi
je .L532
.L491:
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
addq $1, %rbp
xorl %ebx, %ebx
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq $3, 40(%rcx,%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L481:
movq 56(%rsp), %rax
addq (%r12), %rax
movsbl %sil, %edx
leaq .LC29(%rip), %rsi
movl $5, %edi
movq 32(%rax), %rcx
movq 24(%rax), %r8
xorl %eax, %eax
call pari_err@PLT
movq (%r12), %rcx
jmp .L473
.L532:
leaq (%rdi,%rdi,2), %rbx
salq $4, %rbx
movq %rbx, %rax
addq (%r12), %rax
cmpl $12, (%rax)
je .L492
movq 24(%rax), %rsi
leaq .LC26(%rip), %rdi
call compile_err@PLT
movq %rbx, %rax
addq (%r12), %rax
.L492:
movq 8(%rax), %rdi
jmp .L491
.LHOTE43:
.cfi_endproc
.size optimizefunc, .-optimizefunc
# ----------------------
.local foo.20841
.comm foo.20841,8,8
# ----------------------
.local foo.20737
.comm foo.20737,8,8
# ----------------------
.comm frames,8,8
# ----------------------
.comm dbgstart,8,8
# ----------------------
.comm dbginfo,8,8
# ----------------------
.comm localvars,8,8
# ----------------------
.comm offset,8,8
# ----------------------
.comm data,8,8
# ----------------------
.comm operand,8,8
# ----------------------
.comm opcode,8,8
# ----------------------
.comm s_frame,32,32
# ----------------------
.comm s_dbginfo,32,32
# ----------------------
.comm s_lvar,32,32
# ----------------------
.comm s_data,32,32
# ----------------------
.comm s_operand,32,32
# ----------------------
.comm s_opcode,32,32
# ----------------------
.ident "GCC: (Debian 4.9.2-10) 4.9.2"
.section .note.GNU-stack,"",@progbits
|
libsrc/_DEVELOPMENT/compress/aplib/8080/asm_aplib_depack.asm | ahjelm/z88dk | 640 | 21638 | <filename>libsrc/_DEVELOPMENT/compress/aplib/8080/asm_aplib_depack.asm
; aPACK/aPLib decompressor
; Intel 8080 version by <NAME>, 2018-2020
; GBZ80 adaptation by <NAME>, 2020
; No self-modifying code
; Based on z80 version by dwedit/utopian/Metalbrain
;
; Taken from: https://github.com/untoxa/UnaPACK.GBZ80
;
; And reconverted back to 8080 compatible
SECTION code_clib
SECTION code_compress_aplib
PUBLIC asm_aplib_depack
; enter : hl = void *src
; de = void *dst
;
; uses : af, bc, de,
asm_aplib_depack:
; The routine expects:
; de = source
; bc = dest
ld b,d
ld c,l
IF __CPU_GBZ80__
push hl
pop de
ELSE
ex de,hl
ENDIF
LD A,0x80
LD (BITS),A
APBRANCH1:
LD A,(DE)
INC DE
APLOOP0:
LD (BC),A
INC BC
LD A,-1
APLOOP:
LD (DECR),A
CALL AP_GETBIT
JR NC,APBRANCH1
ADD A,A
CALL Z,AP_GETBIT3
JR NC,APBRANCH2
ADD A,A
CALL Z,AP_GETBIT3
JR NC,APBRANCH3
LD L,A
LD H,0x10
APGET4BITS:
ADD A,A
JR NZ,APGET4BITS1
LD A,(DE)
INC DE
LD L,A
ADC A,A
APGET4BITS1:
ADD HL,HL
JR NC,APGET4BITS
LD (BITS),A
XOR A
OR H
JR Z,APLOOP0
LD A,C
SUB H
LD L,A
LD A,B
SBC A,0
LD H,A
LD A,(HL)
JR APLOOP0
APBRANCH3:
LD (BITS),A
LD H,0
LD A,(DE)
RRA
LD L,A
RRA
ADC A,A
RET Z
INC DE
LD A,2
ADC A,H
PUSH DE
LD E, A
IF __CPU_GBZ80__
LD A,L
LD (OFFSET), A
LD A,H
LD (OFFSET+1), A
ELSE
ld (OFFSET),hl
ENDIF
LD D,H
JR AP_FINISHUP
APBRANCH2:
CALL AP_GETGAMMA
DEC E
LD A,(DECR)
ADD A,E
JR Z,AP_R0_GAMMA
DEC A
LD D,A
LD E,(HL)
PUSH HL
LD H,D
LD L,E
POP DE
INC DE
IF __CPU_GBZ80__
LD A,L
LD (OFFSET), A
LD A,H
LD (OFFSET+1), A
ELSE
ld (OFFSET),hl
ENDIF
PUSH HL
CALL AP_GETGAMMA_
PUSH DE
LD A,L
LD D,H
IF !__CPU_GBZ80__
ld hl,2
add hl,sp
ELSE
LD HL,sp+2
ENDIF
LD E,(HL)
LD (HL+),A
LD A,(HL)
LD (HL),D
LD H,A
LD L,E
POP DE
LD A,H
CP +(32000/256)
JR NC,APSKIP1
CP 5
JR C,APSKIP2
INC DE
APSKIP2:
LD A,0x7F
SUB L
LD A,0
SBC A,H
JR C,APSKIP3
APSKIP1:
INC DE
INC DE
APSKIP3:
AP_FINISHUP:
LD A,C
SUB L
LD L,A
LD A,B
SBC A,H
LD H,A
AP_FINISHUP2:
LDIR:
LD A,(HL)
LD (BC),A
INC HL
INC BC
DEC DE
LD A,D
OR E
JR NZ,LDIR
POP DE
JP APLOOP
AP_R0_GAMMA:
PUSH HL
LD H,D
LD L,E
POP DE
CALL AP_GETGAMMA_
PUSH HL
IF __CPU_GBZ80__
LD HL,OFFSET
LD A,(HL+)
LD H,(HL)
LD L,A
ELSE
ld hl,(OFFSET)
ENDIF
JR AP_FINISHUP
AP_GETBIT:
LD A,(BITS)
AP_GETBIT2:
ADD A,A
LD (BITS),A
RET NZ
AP_GETBIT3:
LD A,(DE)
INC DE
ADC A,A
AP_GETBIT4:
LD (BITS),A
RET
AP_GETGAMMA_:
LD A,(BITS)
AP_GETGAMMA:
LD HL,1
AP_GETGAMMALOOP:
ADD HL,HL
ADD A,A
CALL Z,AP_GETBIT3
JR NC,AP_GETGAMMALOOP1
INC L
AP_GETGAMMALOOP1:
ADD A,A
CALL Z,AP_GETBIT3
JR C,AP_GETGAMMALOOP
PUSH HL
LD H,D
LD L,E
POP DE
JR AP_GETBIT4
SECTION bss_clib
SECTION bss_compress_aplib
OFFSET:
defw 2
BITS:
defb 1
DECR:
defb 1
|
oncrpc/xdr.g4 | augustand/grammars-v4 | 0 | 4968 | grammar xdr;
// parser rules
declaration:
typeSpecifier IDENTIFIER
| typeSpecifier IDENTIFIER '[' value ']'
| typeSpecifier IDENTIFIER '<' value? '>'
| 'opaque' IDENTIFIER '[' value ']'
| 'opaque' IDENTIFIER '<' value? '>'
| 'string' IDENTIFIER '<' value? '>'
| typeSpecifier '*' IDENTIFIER
| 'void'
;
value: constant | IDENTIFIER;
constant: DECIMAL | HEXADECIMAL | OCTAL;
typeSpecifier:
'unsigned'? 'int'
| 'unsigned'? 'hyper'
| 'float'
| 'double'
| 'quadruple'
| 'bool'
| enumTypeSpec
| structTypeSpec
| unionTypeSpec
| IDENTIFIER
;
enumTypeSpec: 'enum' enumBody;
enumBody: '{' (IDENTIFIER '=' value) (',' IDENTIFIER '=' value)* '}';
structTypeSpec: 'struct' structBody;
structBody: '{' (declaration ';') (declaration ';')* '}';
unionTypeSpec: 'union' unionBody;
unionBody: 'switch' '(' declaration ')' '{'
caseSpec
caseSpec*
('default' ':' declaration ';')?
'}';
caseSpec: ('case' value ':') ('case' value ':')* declaration ';';
constantDef: 'const' IDENTIFIER '=' constant ';';
typeDef:
'typedef' declaration ';'
| 'enum' IDENTIFIER enumBody ';'
| 'struct' IDENTIFIER structBody ';'
| 'union' IDENTIFIER unionBody ';'
;
definition: typeDef | constantDef;
xdrSpecification: definition+; //this is the top level rule for xdr (rfc 4506)
// lexer rules
COMMENT : '/*' .*? '*/' -> skip;
OCTAL : '0' [1-7] ([0-7])*;
DECIMAL : ('-')? ([0-9])+;
HEXADECIMAL : '0x' ([a-fA-F0-9])+;
IDENTIFIER : [a-zA-Z] ([a-zA-Z0-9_])*;
WS : [ \t\r\n]+ -> skip; |
test/data/ASM-360/CP67_macros.asm | jfitz/code-stat | 0 | 245005 | <filename>test/data/ASM-360/CP67_macros.asm
FILE: $EXECSWT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01787000
$EXECSWT 01788000
$INEX EQU X'01' INEXECUTION 01789000
$DUMP EQU X'02' DUMP ON PROG INT. 01790000
$NONX EQU X'04' NON-EXECUTABLE 01791000
$LOAD EQU X'08' IN LOADER 01792000
$JTERM EQU X'10' DURING JOB TERMINATION 01793000
$BAT EQU X'20' BATCH MONITOR IS RUNNING 01794000
$EOS EQU X'40' END OF INPUT STREAM 01795000
MEND 01796000
FILE: ADT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00773000
ADT 00774000
* 00775000
* ACTIVE DISK TABLE BLOCK 00776000
* 00777000
ADTSECT DSECT 00778000
* 00779000
* NEEDED FOR READ-ONLY DISKS AND READ-WRITE DISKS 00780000
* 00781000
ADTID DS CL6 DISK-IDENTIFIER (LABEL) 00782000
ADTFLG3 DS 1X -RESERVED FOR FUTURE USE- 00783000
ADTFTYP DS 1X FILETYPE FLAG-BYTE 00784000
ADTPTR DS 1A POINTER TO NEXT ADT BLOCK IN CHAIN 00785000
ADTDTA DS 1A DEVICE TABLE ADDRESS IN NUCON 00786000
ADTFDA DS 1A FILE DIRECTORY (PSTAT) ADDRESS 00787000
ADTMFDN DS 1F (1) NUMBER DBL-WORDS IN MFD 00788000
ADTMFDA DS 1A (2) MASTER FILE DIRECTORY ADDRESS 00789000
ADTHBCT DS 1F FST HYPERBLOCK COUNT 00790000
ADTFSTC DS 1F NUMBER OF FST 40-BYTE ENTRIES (FILES) 00791000
ADTCHBA DS 1A (1) POINTER TO CURRENT FST HYPERBLOCK 00792000
ADTCFST DS 1F (2) DISPLACEMENT OF CURRENT FST ENTRY 00793000
ADT1ST DS 1F (1) DISP. OF 1ST WORD IN BIT-MASK WITH 'HOLE' 00794000
ADTNUM DS 1F (2) NUMBER OF RECORDS (NUMTRKS) 00795000
ADTUSED DS 1F (3) NUMBER OF RECORDS IN USE (QTUSEDP) 00796000
ADTLEFT DS 1F (4) NUMBER OF RECORDS LEFT (QTLEFTP) 00797000
ADTLAST DS 1F (5) DISP. OF LAST NONZERO BYTE IN BIT-MASK 00798000
ADTCYL DS 1F (6) NUMBER OF CYLINDERS ON DISK (NUMCYLP) 00799000
ADTM DS 1C MODE LETTER (P,T,S,A,B,C, ETC.) 00800000
ADTMX DS 1C EXTENSION-OF-MODE LETTER (P,T,S, ETC.) 00801000
ADTFLG1 DS 1X FIRST FLAG-BYTE 00802000
ADTFLG2 DS 1X SECOND FLAG BYTE 00803000
* 00804000
ADT2ND DS 0D 00805000
* 00806000
* NEEDED JUST FOR READ-WRITE DISKS 00807000
* 00808000
ADTMSK DS 1A 800-BYTE (PQMSK) BIT-MASK ADDRESS 00809000
ADTQQM DS 1A 200-BYTE (PQQMSK) BIT-MASK ADDRESS 00810000
ADTPQM1 DS 1F (1) PQMSIZ = NO. BYTES IN PQMSK > 215 00811000
ADTPQM2 DS 1F (2) PQMNUM = NO. 800 BYTE-REC FOR PQMSK 00812000
ADTPQM3 DS 1F (3) R0NUM = NO. DBL-WORDS IN PQMSK 00813000
ADTLHBA DS 1A (1) POINTER TO LAST FST HYPER-BLOCK 00814000
ADTLFST DS 1F (2) DISP. OF LAST FST IN LAST HYPER-BLOCK 00815000
ADTNACW DS 1H NUMBER OF ACTIVE WRITE FILES - HALFWORD 00816000
ADTRES DS 1H RESERVE-COUNT (RESRVCNT) - HALFWORD 00817000
* 00818000
ADTLBM EQU ADT2ND-ADTSECT LENGTH OF MINIMUM ADT BLOCK (BYTES) 00819000
ADTLDM EQU ADTLBM/8 LENGTH OF MINIMUM ADT BLOCK IN DBL-WORDS 00820000
* 00821000
ADTLB EQU *-ADTSECT LENGTH OF FULL ADT BLOCK (BYTES) 00822000
ADTLD EQU (ADTLB+7)/8 LENGTH OF FULL ADT BLOCK IN DBL-WORDS 00823000
* 00824000
* FIRST FLAG-BYTE (ADTFLG1) DEFINITIONS 00825000
* 00826000
ADTFSF EQU X'80' ADT BLOCK IN FREE STORAGE 00827000
FILE: ADT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
ADTFRO EQU X'40' READ-ONLY DISK (ATTACHED & READY) 00828000
ADTFRW EQU X'20' READ-WRITE DISK (ATTACHED & READY) 00829000
ADTFFSTF EQU X'10' 1ST FST HYPERBLOCK IS IN FREE STORAGE 00830000
ADTFFSTV EQU X'08' FST HYPERBLOCKS ARE OF VARYING LENGTH 00831000
ADTFQQF EQU X'04' 200-BYTE QQMSK IS IN FREE STORAGE 00832000
ADTROX EQU X'02' THIS DISK HAS READ-ONLY EXTENSION(S) 00833000
ADTFMIN EQU X'01' ADT BLOCK IS MINIMUM SIZE 00834000
* 00835000
* SECOND FLAG-BYTE (ADTFLG2) DEFINITIONS 00836000
* 00837000
ADTFMFD EQU X'80' MFD IS IN CORE 00838000
ADTFALNM EQU X'40' ALL FILENAMES ARE IN CORE 00839000
ADTFALTY EQU X'20' ALL FILETYPES ARE IN CORE 00840000
ADTFMDRO EQU X'10' MODES 1-6 ARE IN CORE 00841000
ADTFALMD EQU ADTFMDRO+X'08' ALL MODES (0-6) ARE IN CORE 00842000
ADTFALUF EQU ADTFMFD+ADTFALNM+ADTFALTY+ADTFALMD ALL UFD IS IN CORE 00843000
ADTWMSG EQU X'04' READ-ONLY WARNING MESSAGE HAS BEEN GIVEN BY WRBUF 00844000
* 00845000
* OTHER PARAMETERS 00846000
* 00847000
ADTRL EQU 800 LOGICAL RECORD LENGTH 00848000
ADTML EQU 5 MAXIMUM BIT MASK LENGTH - IN RECORDS 00849000
* 00850000
* NUCON DEVICE TABLE OFFSETS 00851000
* 00852000
DTAD EQU 0 DEVICE NUMBER 00853000
DTADT EQU 3 DEVICE TYPE BYTE 00854000
DTAS EQU 4 SYMBOLIC DEVICE NAME 00855000
MEND 00856000
FILE: AFT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00000010
AFT 00000020
* 00000030
* ACTIVE FILE TABLE BLOCK 00000040
* 00000050
AFTSECT DSECT 00000060
AFTCLD DS H DISK ADDRESS OF CURRENT CHAIN LINk - 0 00000070
AFTCLN DS H NUMBER OF CURRENT CHAIN LINK - 2 00000080
AFTCLA DS F CORE ADDRESS OF CHAIN LINK BUFFER - 4 00000090
AFTDBD DS H DISK ADDRESS OF CURRENT DATA BLOCK - 8 00000100
AFTDBN DS H NUMBER OF CURRENT DATA BLOCK - 10 00000110
AFTDBA DS F CORE ADDRESS OF CURRENT DATA BLOCK - 12 00000120
AFTCLB DS XL80 CHAIN LINK BUFFER FROM 1ST CHAIN LINK - 16 00000130
AFTFLG DS X FLAG BYTE - 96 00000140
AFTPFST DS 3X POINTER TO (STATIC) FST-ENTRY - 97 00000150
AFTIN DS H CURRENT ITEM NUMBER - 100 00000160
AFTID DS H DISPLACEMENT OF CURRENT ITEM IN DATA BLK - 102 00000170
AFTFCLA DS F CORE ADDRESS OF FIRST CHAIN LINK 00000180
AFTFCLX DS H DISK ADDRESS OF SWAPPED FCL 00000190
AFTCLDX DS H DISK ADDRESS OF SWAPPED CHAIN LINK 00000200
AFTFLG2 DS X SECOND FLAG-BYTE 00000210
DS 3X ***UNUSED*** 00000220
* 00000230
* FLAG BYTE (AFTFLG) DEFINITIONS 00000240
* 00000250
AFTUSED EQU X'80' ACTIVE FILE TABLE BLOCK IN USE 00000260
*** EQU X'40' 00000270
AFTICF EQU X'20' FIRST CHAIN LINK IN CORE FLAG 00000280
AFTFBA EQU X'10' FULL BUFFER ASSIGNED 00000290
AFTDBF EQU X'08' DATA BLOCK IN CORE FLAG 00000300
AFTWRT EQU X'04' ACTIVE WRITE 00000310
AFTRD EQU X'02' ACTIVE READ 00000320
* 00000330
AFTFULD EQU X'01' FULL-DISK SPECIAL CASE 00000340
* 00000350
* SECOND FLAG-BYTE (AFTFLG2) DEFINITIONS 00000360
* 00000370
AFTNEW EQU X'80' BRAND NEW FILE 00000380
AFTOLDCL EQU X'40' CURRENT CHAIN LINK EXISTED PREVIOUSLY 00000390
AFTCLX EQU X'20' ALTERNATE CHAIN-LINK ASSIGNED/IMPLIED 00000400
* 00000410
* COPY OF FST BLOCK IMBEDDED IN AFT BLOCK 00000420
* 00000430
AFTFST DS 0D - 104 00000440
AFTN DS D FILE NAME 00000450
AFTT DS D FILE TYPE 00000460
AFTD DS F DATE/TIME LAST WRITTEN 00000470
AFTWP DS H WRITE POINTER (ITEM NO.) 00000480
AFTRP DS H READ POINTER (ITEM NO.) 00000490
AFTM DS H FILE MODE 00000500
AFTIC DS H ITEM COUNT 00000510
AFTFCL DS H FIRST CHAIN LINK 00000520
AFTFV DS C FIXED(F)/VARIABLE(V) FLAG 00000530
AFTFB DS X FST FLAG BYTE 00000540
AFTIL DS F (MAXIMUM) ITEM LENGTH 00000550
FILE: AFT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
AFTDBC DS H 800-BYTE DATA BLOCK COUNT 00000560
AFTYR DS H YEAR 00000570
AFTADT DS F POINTER TO ACTIVE DISK TABLE - 144 00000580
AFTPTR DS F POINTER TO NEXT AFT BLOCK IN CHAIN - 148 00000590
* 00000600
AFTFSF EQU X'40' BIT IN AFTPTR INDICATES IN FREE STORAGE 00000610
* 00000620
DS 0D END OF DSECT 00000630
AFTLB EQU *-AFTSECT LENGTH OF AFT BLOCK IN BYTES 00000640
AFTLD EQU AFTLB/8 LENGTH OF AFT BLOCK IN DOUBLE WORDS 00000650
MEND 00000660
FILE: BCLOSE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01780000
&LABEL BCLOSE &CCLST 01781000
&LABEL LA 1,&CCLST 01782000
L 15,=V(SYSCTL) 01783000
BALR 14,15 01784000
DC AL4(*+4) 01785000
MEND 01786000
FILE: BRETURN ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01766000
&LABEL BRETURN &SAVE,&ERR 01767000
&LABEL SR 15,15 01768000
IC 15,&ERR 01769000
LTR 15,15 01770000
BZ L&SYSNDX 01771000
L 14,&SAVE+56 01772000
MVC &SAVE+56(4),0(14) 01773000
LM 0,14,&SAVE 01774000
BR 14 01775000
L&SYSNDX LM 0,14,&SAVE 01776000
BC 15,4(14) 01777000
SPACE 1 01778000
MEND 01779000
FILE: CALLING ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01473000
&LABEL CALLING &ROUTE 01474000
&LABEL L 15,=V(&ROUTE) 01475000
BALR 14,15 01476000
MEND 01477000
FILE: CKEOF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01357000
&LABEL CKEOF &ERROR 01358000
&LABEL CH 15,=H'12' 01359000
BNE &ERROR 01360000
MEND 01361000
FILE: CMLST ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01729000
&LABEL CMLST &A,&B,&C,&D,&E 01730000
&LABEL DS 0D 01731000
DC CL8'&A ' 01732000
DC CL8'&B ' 01733000
AIF (N'&C EQ 0).SEQ2 01734000
DC CL8'&C ' 01735000
AIF (N'&D EQ 0).SEQ2 01736000
DC CL8'&D ' 01737000
AIF (N'&E EQ 0).SEQ2 01738000
DC CL8'&E ' 01739000
.SEQ2 DC XL8'FFFFFFFFFFFFFFFF' 01740000
SPACE 1 01741000
MEND 01742000
FILE: CMS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01712000
&LABEL CMS &LIST,&COM,&ERROR= 01713000
&LABEL LA 1,&LIST 01714000
AIF (N'&COM EQ 0).SEQ1 01715000
MVC 0(8,1),=CL8'&COM ' 01716000
.SEQ1 ANOP 01717000
AIF ('&COM' EQ 'PRESTORE' OR '&COM' EQ 'LIST').SEQ2 01718000
SVC X'CA' 01719000
AGO .SEQ3 01720000
.SEQ2 L 15,=V(&COM) 01721000
BALR 14,15 01722000
.SEQ3 AIF (N'&ERROR EQ 0).SEQ4 01723000
DC AL4(&ERROR) 01724000
AGO .SEQ5 01725000
.SEQ4 DC AL4(*+4) 01726000
.SEQ5 SPACE 1 01727000
MEND 01728000
FILE: CMSAVE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01162000
CMSAVE 01163000
* 01164000
* SUPERVISOR INTERRUPT HANDLER BLOCK STORAGE DISPLACEMENTS 01165000
* 01166000
BASE EQU 0 IMAGE OF SVCINT BLOCK SAVEAREA 01167000
JSIND EQU 0 OVERRIDE INDICATOR: X'0,1,2,3' 01168000
OSFLAG EQU 1 SVC TYPE: X'00'=CMS, X'01'=OS 01169000
CHWORD EQU 2 --- NOT USED --- 01170000
CALLER EQU 4 A(CALLER SVC INSTRUCTION) 01171000
CALLEE EQU 8 CL8' CALLEE ' 01172000
OLDPSW EQU 16 D' SVC OLD PSW ' 01173000
NRMRET EQU 24 A( NORMAL RETURN ) 01174000
ERRET EQU 28 A( ERROR RETUEN ) 01175000
GPRS EQU 32 GENERAL REGISTERS AT ENTRY TO SVC. 01176000
GPR0 EQU 32 01177000
GPR1 EQU 36 R1 01178000
GPR2 EQU 40 R2 01179000
GPR3 EQU 44 R3 01180000
GPR4 EQU 48 R4 01181000
GPR5 EQU 52 R5 01182000
GPR6 EQU 56 R6 01183000
GPR7 EQU 60 R7 01184000
GPR8 EQU 64 R8 01185000
GPR9 EQU 68 R9 01186000
GPR10 EQU 72 R10 01187000
GPR11 EQU 76 R11 01188000
GPR12 EQU 80 R12 01189000
GPR13 EQU 84 R13 01190000
GPR14 EQU 88 R14 01191000
GPR15 EQU 92 R15 01192000
FPRS EQU 96 FLOATING-POINT REGISTERS AT ENTRY TO SVC 01193000
FPR0 EQU 96 FR0 01194000
FPR2 EQU 104 FR2 01195000
FPR4 EQU 112 FR4 01196000
FPR6 EQU 120 FR6 01197000
* 01198000
NGPRS EQU 128 REGS UPON RETURN; SCRATCH AREA 01199000
NGPR0 EQU 128 01200000
NGPR1 EQU 132 01201000
NGPR2 EQU 136 01202000
NGPR3 EQU 140 01203000
NGPR4 EQU 144 01204000
NGPR5 EQU 148 01205000
NGPR6 EQU 152 01206000
NGPR7 EQU 156 01207000
NGPR8 EQU 160 01208000
NGPR9 EQU 164 01209000
NGPR10 EQU 168 01210000
NGPR11 EQU 172 01211000
NGPR12 EQU 176 01212000
NGPR13 EQU 180 01213000
NGPR14 EQU 184 01214000
NGPR15 EQU 188 01215000
NFPRS EQU 192 01216000
FILE: CMSAVE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
NFPR0 EQU 192 01217000
NFPR2 EQU 200 01218000
NFPR4 EQU 208 01219000
NFPR6 EQU 216 01220000
MEND 01221000
FILE: CMSCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00001000
CMSCB 00002000
*** PTF 'CMSCB A28946CA' HAS BEEN APPLIED 00003000
*** PTF 'CMSCB A41336CA' HAS BEEN APPLIED
* 00004000
* FCB HEADER CONTROL WORDS 00005000
* 00006000
FCBHEAD DSECT 00007000
FCBFIRST DC A(0) A(FIRST FCB IN CHAIN) 00008000
FCBNUM DC H'0' NUMBER OF FCB BLOCKS CHAIN 00009000
DC H'0' -NOT USED- 00010000
* 00011000
* SIMULATED OS CONTROL BLOCKS 00012000
* 00013000
FCBSECT DSECT 00014000
FCBINIT DS 0X INTERESTING TIDBITS 00015000
FCBOPCB EQU X'08' OPEN ACQUIRED THIS CMS BLOCK 00016000
FCBPERM EQU X'04' PERMANENT CONTROL BLOCK 00017000
FCBBATCH EQU X'02' SPECIAL BATCH DATA SET 00018000
FCBNEXT DS A AL3(NEXT CMSCB) 00019000
FCBPROC DS A A(SPECIAL PROCESSING ROUTINE) 00020000
FCBDD DS CL8 DATA DEFINITION NAME 00021000
FCBOP DS CL8 CMS OPERATION 00022000
IHAJFCB DS 0D *** JOB FILE CONTROL BLOCK *** 00023000
JFCBDSNM DS 0X 44 BYTES, DATA SET NAME 00024000
FCBTAPID DS 0X TAPE IDENTIFICATION 00025000
FCBDSNAM DS CL8 DATA SET NAME 00026000
FCBDSTYP DS CL8 DATA SET TYPE 00027000
FCBPRPU EQU FCBDSTYP+4 PRINTER/PUNCH COMMAND LIST 00028000
FCBDSMD DS CL2 DATA SET MODE 00029000
FCBITEM DS H ITEM IDENTIFICATION NUMBER 00030000
FCBBUFF DS F A(INPUT-OUTPUT BUFFER) 00031000
FCBBYTE DS F DATA COUNT 00032000
FCBFORM DS CL2 FILE FORMAT: FIXED/VARIABLE RECORDS 00033000
FCBCOUT DS H RECORDS PER CMS PHYSICAL BLOCK 00034000
FCBREAD DS F N'BYTES ACTUALLY READ 00035000
FCBDEV DS X DEVICE TYPE CODE 00036000
FCBDUM EQU 0 DUMMY DEVICE 00037000
FCBPTR EQU 4 PRINTER 00038000
FCBRDR EQU 8 READER 00039000
FCBCON EQU 12 CONSOLE TERMINAL 00040000
FCBTAP EQU 16 TAPE 00041000
FCBDSK EQU 20 DISK 00042000
FCBPCH EQU 24 PUNCH 00043000
FCBCRT EQU 28 CRT 00044000
FCBMODE DS X MODE: 1,2,3,4,5 00045000
FCBXTENT DS H NUMBER OF ITEMS IN EXTENT 00046000
FCBRECL DS H DCB LRECL AT OPEN TIME 00047000
IOBIOFLG DS X IO FLAG.. IOBIN OR IOBOUT
DS X ---NOT USED--- 00048000
DS F ---NOT USED--- 00049000
DS F ---NOT USED--- 00050000
DS F ---NOT USED--- 00051000
DS F ---NOT USED--- 00052000
FCBR13 DS F SAVEAREA VECTOR R13 00053000
FILE: CMSCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
FCBKEYS DS A A(DDS IN'CORE KEY TABLE) 00054000
FCBPDS DS A A(PDS IN-CORE DIRECTORY) 00055000
JFCBMASK DS 8X VARIOUS MASK BITS 00056000
JFCBCRDT DS 3C DATA SET CREATION DATE (YDD) 00057000
JFCBXPDT DS 3C DATA SET EXPIRATION DATE (YDD) 00058000
JFCBIND1 DS X INDICATOR ONE 00059000
JFCBIND2 DS X INDICATOR TWO 00060000
JFCBUFNO DS X NUMBER OF BUFFERS 00061000
JFCBFTEK DS 0X BUFFERING TECHNIQUE 00062000
JFCBFALN DS X BUFFER ALIGNMENT 00063000
JFCBUFL DS H BUFFER LENGTH 00064000
JFCEROPT DS X ERROR OPTION 00065000
JFCKEYLE DS X KEYLENGTH 00066000
DS X ---NOT USED--- 00067000
JFCLIMCT DS 3X BDAM SEARCH LIMIT 00068000
FCBDSORG DS 0X DATA SET ORGANIZATION 00069000
JFCDSORG DS 2X 00070000
FCBRECFM DS 0X RECORD FORMAT 00071000
JFCRECFM DS X 00072000
JFCOPTCD DS X OPTION CODES 00073000
FCBBLKSZ DS 0H BLOCK SIZE 00074000
JFCBLKSI DS H 00075000
FCBLRECL DS 0H LOGICAL RECORD LENGTH 00076000
JFCLRECL DS H 00077000
FCBIOSW DS X I/O OPERATION INDICATOR 00078000
FCBIORD EQU X'01' READ/GET 00079000
FCBIOWR EQU X'02' WRITE/PUT 00080000
FCBCLOSE EQU X'80' DURING "CLOSE" 00081000
FCBCLEAV EQU X'40' DISP=LEAVE DURING CLOSE 00082000
FCBPVMB EQU X'04' PUT-MOVE-VAR-BLK 00083000
FCBCASE EQU X'08' ON=LOWER CASE CONSOLE I/O 00084000
DS 1X ---NOT USED--- 00085000
DEBLNGTH DS 0X L'DEB IN DBLW WORDS 00086000
DS F ---NOT USED--- 00087000
IHADEB DS 0D *** DATA EXTENT BLOCK *** 00088000
DEBTCBAD DS A A(MOVE-MODE USER BUFFER) 00089000
DS F ---NOT USED--- 00090000
DEBOFLGS DS 4X DATA SET STAUS FLAGS 00091000
DEBOPATB DS 4X OPEN/CLOSE OPTION BYTE 00092000
IOBFLG DS 0X (START OF IOB PREFIX FOR NORMAL SCH) 00093000
IOBBFLG EQU 0 DISPLACEMENT OF IOB FLAG IN IOB
IOBOUT EQU X'40' "WRITE,PUT" IN PROGRESS 00094000
IOBIN EQU X'20' "READ,GET" IN PROGRESS 00095000
IOBNXTAD DS A A(NEXT BUFFER TO BE USED) 00096000
IOBECB DS F ECB FOR QSAM NORMAL SCHEDULING 00097000
IHAIOB DS 0F *** INPUT/OUTPUT BLOCK *** 00098000
DEBDEBID DS 0X DEB IDENTIFICATION 00099000
DEBDCBAD DS A A(DATA CONTROL BLOCK) 00100000
IOBECBCC DS 0X ECB COMPLETION CODE 00101000
IOBBECBC EQU 12 DISPLACEMENT OF ECB CODE IN IOB
IOBBECBP EQU 12 DISPLACEMENT OF ECB PTR IN IOB
IOBECBPT DS A A(EVENT CONTROL BLOCK) 00102000
IOBFLAG3 DS 0X I/O ERROR FLAG 00103000
IOBBCSW EQU 16 DISPLACEMENT OF CSW IN IOB
IOBCSW DS 8X LAST CCW STORED(I.E., RESIDUAL COUNT) 00104000
FILE: CMSCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
IOBSTART DS A X'ID-NEXT BUFFER',AL3(INITIAL BUFFER) 00105000
IOBDCBPT DS A A(DATA CONTROL BLOCK) 00106000
IOBEND DS 0X END-OF-INPUT/OUTPUT BLOCK 00107000
FCBEND DS 0D END-OF FCB,JFCB,DEB,IOB BLOCKS 00108000
FCBENSIZ EQU (*-FCBSECT)/8 SIZE OF FCB ENTRY, DOUBLEWORDS 00109000
SPACE 3 00110000
ORG FCBDSTYP+4 00111000
FCBIOOUT DS CL8 SPECIAL I/O COMMAND LIST 00112000
FCBIOBUF DS A A(DATA BUFFER) 00113000
FCBCONCR DS C CONSOLE COLOR CODE 00114000
FCBCONMS DS X CONSOLE MISCELLANEOUS INFO 00115000
FCBIOCNT DS H L'DATA BUFFER 00116000
SPACE 3 00117000
* 00118000
* DATA EVENT CONTROL BLOCK 00119000
* 00120000
IHADECB DSECT 00121000
DECSDECB DS F EVENT CONTROL BLOCK 00122000
DECTYPE DS H TYPE OF I/O REQUEST 00123000
DECBRD EQU X'80' READ SF 00124000
DECBWR EQU X'20' WRITE SF 00125000
DECLNGTH DS H LENGTH OF KEY & DATA 00126000
DECDCBAD DS A V(DATA CONTROL BLOCK) 00127000
DECAREA DS A V(KEY & DATA, BUFFER) 00128000
DECIOBPT DS A V(IOB) 00129000
* BDAM EXTENSION 00130000
DECKYADR DS A V(KEY) 00131000
DECRECPT DS A V(BLOCK REFERENCE FIELD) 00132000
SPACE 3 00133000
* 00134000
* SOME FREQUENTLY USED EQUATES 00135000
* 00136000
DDNAM EQU FCBDSTYP FILETYPE = DATA SET NAME 00137000
BLK EQU X'10' RECFM=BLOCKED RECORDS 00138000
BS EQU X'20' MACRF=BSAM 00139000
DA EQU X'20' DSORG=DIRECT ACCESS 00140000
FXD EQU X'80' RECFM=FIXED LENGTH RECORDS 00141000
IS EQU X'80' DSORG=INDEXED SEQUENTIAL 00142000
LOC EQU X'08' MACRF=LOCATE MODE 00143000
MOV EQU X'10' MACRF=MOVE MODE 00144000
PS EQU X'40' DSORG=PHYSICAL SEQUENTIAL 00145000
PO EQU X'02' DSORG=PARTIONED ORGANIZATION 00146000
PREVIOUS EQU X'80' OFLGS=PREVIOUS I/O OPERATION 00147000
QS EQU X'40' MACRF=QSAM 00148000
UND EQU X'C0' RECFM=UNDEFIN FORMAT RECORDS 00149000
VAR EQU X'40' RECFM=VARIABLE LENGTH RECORDS 00150000
MEND 00151000
FILE: CMSREG ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01222000
CMSREG 01223000
* 01224000
*SYMBOLIC NAMES FOR REGISTERS. 01225000
* 01226000
* GENERAL REGISTERS. 01227000
R0 EQU 0 01228000
R1 EQU 1 01229000
R2 EQU 2 01230000
R3 EQU 3 01231000
R4 EQU 4 01232000
R5 EQU 5 01233000
R6 EQU 6 01234000
R7 EQU 7 01235000
R8 EQU 8 01236000
R9 EQU 9 01237000
R10 EQU 10 01238000
R11 EQU 11 01239000
R12 EQU 12 01240000
R13 EQU 13 01241000
R14 EQU 14 01242000
R15 EQU 15 01243000
SPACE 1 01244000
* FLOATING POINT REGISTERS. 01245000
FR0 EQU 0 01246000
FR2 EQU 2 01247000
FR4 EQU 4 01248000
FR6 EQU 6 01249000
MEND 01250000
FILE: CMSTYPE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01152000
&LABEL CMSTYPE &MESSAGE,&COLOR=B 01153000
&LABEL DS 0H
CNOP 0,4 01156000
BAL 1,SVC&SYSNDX
TYP&SYSNDX DC CL8'TYPLIN' 01157000
DC A(MES&SYSNDX),C'&COLOR',AL3(L'MES&SYSNDX) 01158000
MES&SYSNDX DC C&MESSAGE 01159000
SVC&SYSNDX SVC X'CA' 01160000
MEND 01161000
FILE: CMSYSREF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00400010
CMSYSREF &OPTION 00400020
AIF (N'&OPTION NE 0).CSECT 00400030
* 00400040
* GENERALIZED EQUATES FOR HARD-CORE QUANTITIES 00400050
* 00400060
INSTAL EQU X'D0' INSTALLATION HEADING 00400070
VERIDENT EQU X'B0' VERSION IDENTIFICATION 00400080
DATEREAL EQU X'98' DATE: MM/DD/YY 00400090
TIMEREAL EQU X'A0' TIME: HH.MM.SS 00400100
CPSAVE EQU X'84' CP "SAVESYS" HOOKS 00400110
COMMVECT EQU X'10' V(COMMUNICATION VECTOR TABLE) 00400120
VSYSREF EQU X'14' V(CMS SYSTEM REFERENCE TABLE) 00400130
COMMNAME EQU X'90' TERMINAL-ENTERED COMMAND NAME 00400140
PSWEXTO EQU X'18' EXTERNAL OLD PSW 00400150
PSWEXTN EQU X'58' EXTERNAL NEW PSW 00400160
PSWSVCO EQU X'20' SUPERVISOR OLD PSW 00400170
PSWSVCN EQU X'60' SUPERVISOR NEW PSW 00400180
PSWPRGO EQU X'28' PROGRAM OLD PSW 00400190
PSWPRGN EQU X'68' PROGRAM NEW PSW 00400200
PSWMACO EQU X'30' MACHINE OLD PSW 00400210
PSWMACN EQU X'70' MACHINE NEW PSW 00400220
PSWIOTO EQU X'38' IN-/OUT-PUT OLD PSW 00400230
PSWIOTN EQU X'78' IN-/OUT-PUT NEW PSW 00400240
CSW EQU X'40' CHANNEL STATUS WORD 00400250
NAMESYS EQU X'F8' NAME OF IPLED SYSTEM 00400260
* STATUS BITS: 00400270
* -CSW + 4 00400280
ATTN EQU X'80' ATTENTION 00400290
STMD EQU X'40' STATUS MODIFIER 00400300
CUE EQU X'20' CONTROL UNIT END 00400310
BUSY EQU X'10' BUSY 00400320
CHE EQU X'08' CHANNEL END 00400330
DVE EQU X'04' DEVICE END 00400340
UNCK EQU X'02' UNIT CHECK 00400350
UNEX EQU X'01' UNIT EXCEPTION 00400360
* -CSW + 5 00400370
PCI EQU X'80' PROGRAM-CONTROLLED INTERRUPTION 00400380
ICL EQU X'40' INCORRECT LENGTH 00400390
PGCK EQU X'20' PROGRAM CHECK 00400400
PTCK EQU X'10' PROTECTION CHECK 00400410
CHDK EQU X'08' CHANNEL DATA CHECK 00400420
CHCK EQU X'04' CHANNEL CONTROL CHECK 00400430
INCK EQU X'02' INTERFACE CONTROL CHECK 00400440
CNCK EQU X'01' CHAINING CHECK 00400450
CAW EQU X'48' CHANNEL ADDRESS WORD 00400460
TIMER EQU X'50' TIMER 00400470
* 00400480
* DISPLACEMENTS WITHIN "NUCONSCT" 00400490
* 00400500
DCMSAREA EQU X'1C' 00400510
DCONSOLE EQU X'300' 00400520
DCORESIZ EQU X'4' 00400530
DERRINF EQU X'1C' 00400540
DHIMAIN EQU X'DC' 00400550
FILE: CMSYSREF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
DIPLDEV EQU X'E0' 00400560
DLDADDR EQU X'CC' 00400570
DLDRTBL EQU X'14' 00400580
DLOCCNT EQU X'C8' 00400590
DLOWEXT EQU X'D8' 00400600
DLSTADR EQU X'C4'
DLSTSVC EQU X'0' 00400610
DNRMINF EQU X'1C' 00400620
DPDISK EQU X'318' 00400630
DPSW EQU X'D0' 00400640
DSDISK EQU X'30C' 00400650
DSTADDR EQU X'10' 00400660
DSYSDEV EQU X'E2' 00400670
DTBLNG EQU X'18' 00400680
DTDISK EQU X'324' 00400690
DUSFL EQU X'8' 00400700
* 00400710
* DISPLACEMENT WITHIN "SYSREF" --- COMMUNICATION VECTOR REGION 00400720
* 00400730
DADTLKP EQU 156 00400740
DADTLKW EQU 192 00400750
DADTP EQU 40 00400760
DADTS EQU 76 00400770
DADTT EQU 64 00400780
DBTYPLIN EQU 80 00400790
DBUFFER EQU 4 00400800
DCMSOP EQU 8 00400810
DCMSRET EQU 172 00400820
DCOMBUF EQU 188 00400830
DDEVTAB EQU 12 00400840
DDIOSECT EQU 132 00400850
DDMPEXEC EQU 124 00400860
DDMPLIST EQU 100 00400870
DEXEC EQU 180 00400880
DEXISECT EQU 200 00400890
DFCBTAB EQU 240 00400900
DFREDBUF EQU 84 00400910
DFREE EQU 104 00400920
DFRET EQU 108 00400930
DFSTLKP EQU 16 00400940
DFSTLKW EQU 28 00400950
DFVS EQU 0 00400960
DGETCLK EQU 20 00400970
DGFLST EQU 24 00400980
DIADT EQU 36 00400990
DIOERRSP EQU 48 00401000
DIONTABL EQU 232 00401010
DLNKLST EQU 92 00401020
DMACLIBL EQU 144 00401030
DMACSECT EQU 148 00401040
DNOTRKST EQU 176 00401050
DNUMTRKS EQU 120 00401060
DOPSECT EQU 8 00401070
DOSRET EQU 168 00401080
DOSVECT EQU 100 00401090
FILE: CMSYSREF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
DOSTABLE EQU 136 00401100
DPIE EQU 32 00401110
DPRTCLK EQU 44 00401120
DRDTK EQU 52 00401130
DSCAN EQU 56 00401140
DSCBPTR EQU 212 00401150
DSETCLK EQU 112 00401160
DSSTAT EQU 60 00401170
DSTART EQU 184 00401180
DSTATEXT EQU 164 00401190
DSTRINIT EQU 96 00401200
DSVCSECT EQU 152 00401210
DSWITCH EQU 68 00401220
DSYSCTL EQU 236 00401230
DTABEND EQU 72 00401240
DTBL2311 EQU 204 00401250
DTBL2314 EQU 208 00401260
DTXTLIBS EQU 116 00401270
DUPUFD EQU 160 00401280
DUSABRV EQU 196 00401290
DUSER1 EQU 216 00401300
DUSER2 EQU 220 00401310
DUSER3 EQU 224 00401320
DUSER4 EQU 228 00401330
DUSVCTBL EQU 140 00401340
DWRTK EQU 88 00401350
* 00401360
MEXIT 00401370
.CSECT ANOP 00401380
* 00401390
* SYSTEM COMMUNICATION VECTOR REGION 00401400
* 00401410
SYSREF DS 0F TABLE OF EXTERNAL REFERENCES 00401420
* NOTATION: ** = NOT USED, RESERVED -- = DYNAMICALLY SET 00401430
* 00401440
DC V(FVS) . 0 00401450
DC V(BUFFER) . 4 00401460
DC V(CMSOP) . 8 00401470
DC V(DEVTAB) . 12 00401480
DC V(FSTLKP) . 16 00401490
DC V(GETCLK) . 20 00401500
DC A(GFLST) . 24 00401510
DC V(FSTLKW) . 28 00401520
DC V(PIE) . 32 00401530
DC V(IADT) . 36 00401540
DC V(ADTP) . 40 00401550
DC V(PRTCLK) . 44 00401560
DC V(IOERRSUP) . 48 00401570
DC V(RDTK) . 52 00401580
DC V(SCAN) . 56 00401590
DC A(0) SSTAT -- 00401600
DC V(ADTT) . 64 00401610
DC V(SWITCH) . 68 00401620
DC V(TABEND) . 72 00401630
DC V(ADTS) . 76 00401640
FILE: CMSYSREF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 004
DC V(BTYPLIN) . 80 00401650
DC V(FREEDBUF) . 84 00401660
DC V(WRTK) . 88 00401670
DC V(LNKLST) . 92 00401680
DC V(STRINIT) . 96 00401690
DC V(DUMPLIST) . 100 00401700
DC V(FREE) . 104 00401710
DC V(FRET) . 108 00401720
DC V(SETCLK) . 112 00401730
DC V(TXTLIBS) . 116 00401740
DC V(NUMTRKS) . 120 00401750
DC V(DMPEXEC) . 124 00401760
DC V(FEIBM) . 128 00401770
DC V(DIOSECT) . 132 00401780
DC V(OSTABLE) . 136 00401790
DC V(USVCTBL) . 140 00401800
DC V(MACLIBL) . 144 00401810
DC V(MACSECT) . 148 00401820
DC V(SVCSECT) . 152 00401830
DC V(ADTLKP) . 156 00401840
DC V(UPUFD) . 160 00401850
DC A(0) SSTATEXT -- 00401860
DC V(OSRET) . 168 00401870
DC V(CMSRET) . 172 00401880
DC V(NOTRKST) . 176 00401890
DC V(EXEC) . 180 00401900
DC V(START) . 184 00401910
DC V(COMBUF) . 188 00401920
DC V(ADTLKW) . 192 00401930
DC V(USABRV) . 196 00401940
DC V(EXISECT) . 200 00401950
DC V(TBL2311) . 204 00401960
DC V(TBL2314) . 208 00401970
DC V(SCBPTR) . 212 00401980
DC A(3) USER1 ** 00401990
DC A(3) USER2 ** 00402000
DC A(3) USER3 ** 00402010
DC A(3) USER4 ** 00402020
DC V(IONTABL) . 232 00402030
DC V(SYSCTL) . 236 00402040
DC V(FCBTAB) . 240 00402050
* 00402060
MEND 00402070
FILE: DEVTABEX ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO DEV00010
DEVTABEX &PREFIX=,&ADDINFO=NO DEV00020
* DATED: 6 JUNE 1971 DEV00030
*** PTF 'DEVTABEX AM3636CA' HAS BEEN APPLIED *** DEV00040
&PREFIX.EXTD DSECT DEV00050
DS 0F DEV00060
DS CL2 LOAD DEV EXT TABLE ADDRESS DEV00070
DS CL4 LOAD INST DEV00080
DS CL2 BR INST DEV00090
&PREFIX.ENT DS 0C DEV00100
&PREFIX.PSW DS CL8 PSW OF ERROR OPERATION DEV00110
&PREFIX.CSW DS CL8 CSW AT ERROR TIME DEV00120
&PREFIX.ERBY DS CL1 ERROR STATUS DEV00130
* C'Y' = I/O ERROR DEV00140
* C'N' = NO I/O ERROR DEV00150
* C'R' = RETRY IOERR INTERNAL- DEV00160
* I/O OPERATION DEV00170
* C'E' = END OF FILE DEV00180
* C'U' = INTERVEN REQ DURING DEV00190
* C'I' = INCOR LEN DEV00200
* ERROR RECOVERY DEV00210
&PREFIX.STAT DS CL1 STATUS FIELD DEV00220
* EQU'S DEV00230
* X'80' = SENSE OPERATION DEV00240
* X'40' = CE ONLY DEV00250
* X'20' = DE ONLY DEV00260
* X'10' = IGNORE INTERRUPTS DEV00270
* X'08' = WAIT SATISFIED DEV00280
* X'04' = CLOSIO ON DEV00290
* X'02' = READ 2-N TIMES DEV00300
* X'01' = RESERVED FOR FUTURE USE DEV00310
&PREFIX.ERR DS XL2 NUMBER OF LATEST- DEV00320
* I/O ERROR DEV00330
* NOTE: SEE IODEFTAB MACRO IN IOERR FOR MATCHING NUMBER IN DEV00340
* ABOVE FEILD TO AN ERROR ENTRY. ALSO, THE FOLLOWING DEV00350
* NUMBERS HAVE SPECIAL MEANINGS: DEV00360
* X'AF00' = SIO OR DIAG BUSY CONDITION DEV00370
* X'CF00' = INVALID CALLING LIST FROM I/O ROUTINT TO IOERR DEV00380
&PREFIX.CT0 DS H GENERAL COUNTER0 DEV00390
&PREFIX.CT DS H GENERAL COUNTER DEV00400
&PREFIX.RT DS F INTERRUPT RT ADDRESS DEV00410
&PREFIX.DT DS F DEV TAB ADDRESS DEV00420
AIF ('&ADDINFO' EQ 'NO').NOMORE DEV00430
DS 0D ALIGN ON D-WORD DEV00440
&PREFIX.CCW DS CL8 DEV00450
&PREFIX.NOP DS CL8 DEV00460
&PREFIX.WAIT DS CL8 DEV00470
&PREFIX.SYMD DS CL4 DEV00480
&PREFIX.ZERO DS F DEV00490
&PREFIX.FLD DS F DEV00500
&PREFIX.WA DS CL80 CARD IMAGE DEV00510
.NOMORE ANOP DEV00520
MEND DEV00530
FILE: DIOSCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01071000
DIOSCT &CSECT 01072000
AIF (N'&CSECT NE 0).SEQ2 01073000
DIODSECT DSECT 01074000
.SEQ2 ANOP 01075000
IOOLD DC 1D'0' IO-OLD-PSW (FROM INTERRUPT ROUTINE) 01076000
DIOCSW DC 1D'0' CSW (FROM INTERRUPT ROUTINE) 01077000
* 01078000
* WAIT CALLING SEQUENCE 01079000
* 01080000
DS 0F 01081000
PWAIT DC CL8'WAIT' 01082000
DC C'DSK-' FILLED IN TO CORRECT SYMBOLIC DISK NO. 01083000
DC F'0' 01084000
DC F'0' 01085000
* 01086000
QQDSK1 DC F'0' 1ST TWO BYTES ALWAYS = 0 01087000
QQDSK2 EQU QQDSK1+2 HALFWORD COPY OF 16TH TRACK DISK-ADDRESS 01088000
* 01089000
* CCW CHAIN 01090000
* 01091000
CCW1 CCW X'07',SEEKADR,CC,6 = SEEK 01092000
CCW2 CCW X'31',SEEKADR+2,CC,5 = SEARCH 01093000
CCW3 CCW X'08',*-8,0,1 = TIC BACK TO SEARCH 01094000
RWCCW CCW X'00',*-*,CC+SILI,*-* = READ OR WRITE DATA 01095000
CCWNOP CCW X'03',0,SILI,1 = NO-OP FOR CE & DE TOGETHER 01096000
* 01097000
SEEKADR DC XL7'00' SEEK/SEARCH INFO (1ST 3 BYTES ARE 0) 01098000
* 01099000
IOCOMM DC X'00' SET TO READ (06) OR WRITE (05) 01100000
* 01101000
SENCCW CCW X'04',SENSB,SILI,6 = SENSE COMMAND (USED IF ERROR) 01102000
* 01103000
CC EQU X'40' COMMAND-CHAIN 01104000
SILI EQU X'20' ... 01105000
* 01106000
* I/O INFO 01107000
* 01108000
LASTCYL DC F'0' BECOMES 'LAST CYLINDER-NUMBER USED' 01109000
LASTHED DC F'0' BECOMES 'LAST HEAD-NUMBER USED' 01110000
* 01111000
DEVTYP DC X'00' UNIT-TYPE = 01 (2311), 08 (2314) 01112000
* 01113000
DIOFLAG DC X'00' RDTK/WRTK FLAG: 01114000
* 01115000
DIAGNG EQU X'80' DIAGNOSE I/O INOPERATIVE 01116000
* 01117000
TOOBIG EQU X'04' BYTE-COUNT > 800, TOO BIG FOR DIAGNOSE IO 01118000
WRTKF EQU X'02' WRITING FIRST CHAIN LINK 01119000
QQTRK EQU X'01' HANDLING FIRST CHAIN LINK 01120000
* 01121000
DIAGNUM EQU 24 **** NUMBER ASSIGNED BY 'CP' FOR DIAGNOSE I/O **** 01122000
* 01123000
SENSB DC XL6'00' SENSE-INFORMATION 01124000
* 01125000
FILE: DIOSCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
* MISCELLANEOUS STORAGE... 01126000
* 01127000
DOUBLE DC 1D'0' (FOR 'CVD' USE) 01128000
* 01129000
* KEEP THE FOLLOWING THREE IN ORDER... 01130000
XRSAVE DS 15F REGISTERS 0-14 SAVED HERE FOR RDTK-WRTK 01131000
DC AL3(0) FIRST 3 BYTES OF R15 ERROR-CODE 01132000
ERRCODE DC AL1(*-*) ERROR-CODE (IN R15 AT EXIT) 01133000
* 01134000
* KEEP THE FOLLOWING TWO IN ORDER.. 01135000
FREER0 DC F'0' NO. DBL-WORDS OF FREE STORAGE (IF ANY) 01136000
DIOFREE DC F'0' ADD. OF FREE STORAGE FOR BUFFER OR CCW'S 01137000
* 01138000
R1SAVE DC F'0' ACTIVE-DISK-TABLE POINTER SAVED HERE 01139000
R2SAVE DC A(0) A(DEVICE TABLE EXTENTION) 01140000
SAVECC DC F'0' SIO CONDITION CODE 01141000
DKIONORM DC XL2'0C00' NORMAL COMPLETION STATUS ("CE+DE") 01142000
DKIODE DC XL2'0400' DEVICE END 01143000
* DEBUG CCW'S 01144000
DKSFP CCW X'1F',DKFPKEY,X'60',1 SET FILE MASK 01145000
DKTIC CCW X'08',*,0,1 TIC TO SYSTEM 01146000
DKFPKEY DC B'10000000' WRITE KEY DATA 01147000
DKNORM EQU C'N' SUCCESSFUL DASD I/O 01148000
DKERROR EQU C'Y' UNSUCCESSFUL DASD I/O 01149000
* 01150000
MEND 01151000
FILE: DJCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01743000
DJCB 01744000
DJCB DSECT JOB CONTROL LIMITS DSECT 01745000
DS 0D 01746000
JBUFF DS F ADDRESS OF SYSIN BUFFER 01747000
JREC DS F ADDRESS OF NEXT SYSIN LOGICAL 01748000
JNREC DS H SYSIN BLOCKING FACTOR 01749000
JRECNO DS H NO OF THE NEXT LOGICAL REC IN BLOCK 01750000
JBUFSIZ DS F SIZE OF SYSIN BUFFER 01751000
JWBUFF DS F ADDRESS OF SYSOUT BUFFER 01752000
JWREC DS F ADDRESS OF NEXT SYSOUT LOGICAL REC 01753000
JNWREC DS H BLOCKING FACTR OF SYSOUT 01754000
JWRECN DS H NO OF NEXT RECORD IN SYSOUT BUFFER 01755000
JWBUFSIZ DS F SIZE OF SYSOUT BUFFER 01756000
TIMINIT DS F INITIAL VALUE OF TIMER 01757000
JWLIM DS H NUMBER OF LINES PERMITTED 01758000
TIMLIM DS H NUMBER OF TIMER INTERRUPTS PERMITTED 01759000
JPFT07 DS H NUMBER OF PUNCH CARDS PERMITTED 01760000
JSCLIM DS H NUMBER OF SC4020 FRAMES PERMITTED 01761000
JWTOT DS H NUMBER LINES WRITTEN THIS JOB 01762000
TIMTOT DS H NUMBER TIMER INTERRUPTS THIS JOB 01763000
JSCTOT DS H NUMBER OF SC4020 FRAMES THIS JOB 01764000
MEND 01765000
FILE: DTAPE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01478000
DTAPE 01479000
DTAPE DSECT 01480000
DS 0D 01481000
TPLST DS 8C 01482000
TPOPTN DS 8C 01483000
TPUNIT DS 4C 01484000
TPMSK DS 1X 01485000
TPBUFA DS 3X 01486000
TPBUFL DS 1F 01487000
TPBYTR DS 1F 01488000
* 01489000
TPSAVE DS 5F 01490000
* 01491000
TPUTBL DS 16C 01492000
* 01493000
TPTBL DS 8C 01494000
* 01495000
TPMTBL DS 4X 01496000
* 01497000
TPIOSW DS 4X 01498000
MEND 01499000
FILE: EIOPL ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP06920
EIOPL ERP06930
EIOPL DSECT ERP06940
EIOBEG DS 0F ERP06950
EIOTYPE DC CL4' ' SIO OR CIO ERROR ERP06960
EIODEVN DS CL4 DEV NAME ERP06970
EIODEV1 DS CL4 ADDITIONAL DEV NAMES ERP06980
EIODEV2 DS CL4 FOR ASYNCHRONOUS DEV ERP06990
EIODEV3 DS CL4 ERP07000
EIOCSW DS CL8 ERROR CSW ERP07010
EIOCAW DS CL4 ADDRESS OF ERR OP ERP07020
EIOSEEK DS CL7 SEEK FIELD ERP07030
EIODVTYP DS XL1 DEVICE TYPE CODE ERP07040
EIODEVA DS CL2 DEV ADDRESS IN HEX ERP07050
EIOCC DS CL1 STATUS OF ERROR RECOVERY ERP07060
EIOSIOCC DS CL1 SIO OR DIAG CONDITION CODE ERP07070
EIOUSER DS CL2 VALUES: ERP07080
* C'S ' = SYSTEM I/O ROUTINE ERP07090
* C'U ' = USER I/O ERP07100
* C'ER' = IOERR ERP07110
EIODIAG DS CL2 DIAG RETURN CD FROM CP ERP07120
EIODTEXT DS F DEV TAB EXT ADDRESS ERP07130
EIOMESAD DS F MESSAGE ADDRESS ERP07140
EIOMESLN DS F MESSAGE LENGTH ERP07150
EIOREGS DS 16F CALLER'S SAVE AREA ERP07160
MEND ERP07170
FILE: ERASE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01396000
&LABEL ERASE &FCB 01397000
&LABEL LA 1,&FCB 01398000
MVC 0(8,1),=CL8'ERASE' 01399000
SVC X'CA' 01400000
DC AL4(*+4) 01401000
MEND 01402000
FILE: ERPERRQ ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP07940
ERPERRQ ERP07950
ERPERRQ DSECT ERP07960
DS 0F ERP07970
ERPDEVN DS CL4 DEV NAME ERP07980
ERPCSW DS CL8 ERROR CSW ERP07990
ERPCAW DS CL4 ADDRESS OF ERROR OP ERP08000
ERPSEEK DS XL7 SEEK FIELD ERP08010
ERPDVTYP DS XL1 DEVICE TYPE CODE ERP08020
ERPDEVA DS CL2 DEV ADDRESS IN HEX ERP08030
ERPEC DS CL1 INTERMEDIATE STATUS OF ERP ERP08040
* X'00' = SUCCESSFUL RETRY ERP08050
* X'08' = INTERNAL DEV NOT ATT ERP08060
* X'0E' = INTERNAL 'INTERVEN REQ' ERP08070
* X'EF' = NO RETRY POSSIBLE ERP08080
* X'FF' = RETRY FAILED ERP08090
DS CL1 FILLER ERP08100
ERPSS DS CL2 STATUS OF SENSE ERP08110
ERPSEN DS CL6 SENSE INFO ERP08120
DS 0H ERP08130
ERPC1 DS CL2 COUNTER 1 ERP08140
ERPC2 DS CL2 COUNTER 2 ERP08150
ERPTC DS CL2 TOTAL COUNTER ERP08160
ERPCSWFD DS XL8 ENTRY SEARCH CSW ERP08170
ERPSENFD DS XL6 ENTRY SEARCH SENSE ERP08180
ERPWKFLD DS CL8 WORK AREA ERP08190
* USES ERP08200
* HOME ADDRESS INFO: CCHH ERP08210
ERPERRSV DS F SAVE AREA FOR ERROR ENTRY ERP08220
ERPSTEND DS 0C END OF ERP ST ERP08230
MEND ERP08240
FILE: ERPTRWT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP00010
ERPTRWT ERP00020
* DATED: 6 JUNE 1971 ERP00030
*** PTF 'ERPTRWT AM3636CA' HAS BEEN APPLIED *** ERP00040
ERPTRWT DSECT ERP00050
ERPBEGFD DS 0D ERP00060
ERPTYPE DS XL1 SIO OR DIAG OR CIO ERROR ERP00070
ERPSIOTY DS XL1 TYPE OF START OR DIAG ERROR ERP00080
ERPTRACE DS XL1 ROUTINE TRACE BYTE ERP00090
ERPSI DS XL1 LOAD TRACE + SPECIAL INFO ERP00100
* 2 WORK AREAS FOR ERP00110
* ALL INTERNAL I/O OPERATIONS ERP00120
* FOLLOW: ERP00130
ERPADSEN DS F ADDRESS OF SENSE ERP00140
ERPSENIN DS CL6 SEN INPUT AR ERP00150
DS CL2 FILLER ERP00160
ERPFPOP DS CL8 SSM CCW ERP00170
ERPSENOP DS CL8 CCW FOR SENSE ERP00180
ERPNOP DS CL8 NOP CCW ERP00190
ERPFPOQ DS CL8 INTERNAL IO AREA ERP00200
ERPSENOQ DS CL8 ERP00210
ERPNOPQ DS CL8 ERP00220
ERPFLIST DS 0F PLIST FOR LOADING ERP00230
ERPFOP DS CL8 RT CALLED ERP00240
ERPFNAME DS CL8 FILENAME ERP00250
ERPFTYPE DS CL8 FILETYPE ERP00260
ERPFMODE DS CL2 FILE MODE ERP00270
ERPFITEM DS H FILE ITEM ERP00280
ERPFBUFF DS F I/O AREA ERP00290
ERPFCT DS F DATA COUNT ERP00300
ERPFFORM DS CL2 FILE FORMAT: FIXED/VARIABLE ERP00310
ERPFBKCT DS H RECORDS PER BLOCK ERP00320
ERPFRD DS F READ DATA COUNT ERP00330
ERPADDWT DS CL4 ADDRESS OF WAIT ERP00340
ERPWT DS CL8 WAIT PARM LIST ERP00350
ERPWTDEV DS CL4 DEV NAME ERP00360
ERPWTDTE DS F FENSE1 (ADDRESS OF DEV EXT) ERP00370
ERPWTID DS F INT DEV ERP00380
ERPDEV1 DS F ADDITIONAL DEV NAMES ERP00390
ERPDEV2 DS F FOR ASYNCHRONOUS DEV ERP00400
ERPDEV3 DS F OR SIO BUSY CONDITION ERP00410
ERPDEV4 DS F ERP00420
ERPDEV5 DS F ERP00430
ERPFF2 DS F FENSE2 (ADDRESS OF DEV EXT) ERP00440
ERPWTID2 DS F INT DEV(2) ERP00450
ERPLDHDT DS F TABLE RT'S SAVE AREA ERP00460
ERPLDKT DS F TABLE RT'S CORE ERP00470
ERPLDHDR DS F RECOVERY RT'S SAVE AREA ERP00480
ERPLDKR DS F RECOVERY RT'S CORE ERP00490
ERPRTSV DS F STD INT RT ADDRESS ERP00500
ERPRTSV1 DS F CON INT RT ADDRESS ERP00510
ERPRTS2 DS F SYS INT RT ADDRESS ERP00520
ERPRTSV3 DS F RETURN ADDRESS SAVE ERP00530
ERPRTSV4 DS F REC RT'S MESSAGE AREA ERP00540
ERPRTSW3 DS F BASE REG SAVE ERP00550
FILE: ERPTRWT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
ERPRTSX3 DS F NESTED RETURN ADDRESS SAVE ERP00560
ERPRTSY3 DS F NESTED BASE REG SAVE ERP00570
ERPRTSX4 DS F N N RET ADDRESS ERP00580
ERPRTSY4 DS F N N BASE REG SAVE ERP00590
ERPRTSL1 DS F N,N RET ADDRESS ERP00600
ERPRTSL2 DS F N,N,N RET ADDRESS ERP00610
ERPRTSL3 DS F N,N,N,N RET ADDRESS ERP00620
ERPFILL1 DS F RESERVED ERP00630
* IOERRREC + IOERRMES- ERP00640
* WORK AREA ERP00650
DS 0D D-WORD ALIGN ERP00660
MESTABWK DS CL24 AREA FOR CONVERTING HEX TO ERP00670
* PRINTABLE CHARS AND BINARY ERP00680
* TO DECIMAL ERP00690
* THREE F-AREAS USED FOR BXLE- ERP00700
* SEARCH LOOP ERP00710
LOOPCON1 DS F ERP00720
LOOPCON2 DS F ERP00730
LOOPCON3 DS F ERP00740
HDDVNM DS XL1 HOLD AREA FOR ERP00750
* DEVICE NAME POINTER ERP00760
RCSUP DS XL1 SUPERIOR RET CODE ERP00770
ERPDSEN1 DS XL6 SENSE WORK AREA 1 ERP00780
ERPDSEN2 DS XL6 SENSE WORK AREA 2 ERP00790
ERPEQC DS F ERROR QUEUE COUNT ERP00800
MEND ERP00810
FILE: EXISCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00743000
EXISCT &OPTION 00744000
AIF (N'&OPTION NE 0).SEQ2 00745000
EXISECT DSECT 00746000
.SEQ2 ANOP 00747000
* 00748000
* STORAGE FOR TIMER INTERRUPT ... 00749000
* 00750000
EXSAVE DS 16F _________ SAVED REGISTERS 00751000
TYPLIST DC CL8'TYPE' ___ P-LIST TO TYPE BLIP-CHAR'S 00752000
TIMCCW DC A(TIMCHAR) 00753000
DC C'B',AL3(1) 00754000
TIMCHAR DC X'FF',XL7'00' BLIP-CHARACTER(S) 00755000
SCAW DC XL12'00' ____ SAVED CSW-CAW 00756000
TIMINIT DC A(2000000/13) VALUE TO SET TIMER = 2 SECONDS 00757000
* 00758000
* STORAGE FOR EXTERNAL (OTHER THAN TIMER) INTERRUPT ... 00759000
* 00760000
EXSAVE1 DS 16F _________ SAVED REGISTERS 00761000
EXTPSW DC X'81000000' _ FILLED-IN PSW ... 00762000
DC A(*-*) 00763000
SAVEXT DS F ______ TRANSFER-ADDRESS FOR EXT. INT. 00764000
DC V(IDEBUG) __ ADDRESS IN DEBUG FOR EXT. INT.
* 00765000
* STORAGE FOR EXTERNAL INTERRUPT SET UP BY "TRAP" ... 00766000
* 00767000
EXTRET DS D ___________ SAVED EXT-OLD-PSW 00768000
JR0 DC F'13' _______ 13 DBL-WORDS FOR FPRS & USER-SAVE-AREA 00769000
JR1 DC A(*-*) ______ ADDRESS OF FREE STORAGE 00770000
* 00771000
MEND 00772000
FILE: FCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01328000
&LABEL FCB &NAME,&AREA 01329000
&LABEL DS 0D 01330000
DC CL8' ' 01331000
DC CL8'&NAME(1) ' 01332000
DC CL8'&NAME(2) ' 01333000
DC CL2'P5' 01334000
DC H'0' 01335000
DC A(&AREA) 01336000
DC F'80' 01337000
DC CL2'F' 01338000
DC H'1' 01339000
DC F'0' 01340000
S&LABEL DC CL8'STATE' 01341000
DC CL8'&NAME(1) ' 01342000
DC CL8'&NAME(2) ' 01343000
DC CL2'P5' 01344000
DC H'0' 01345000
DC F'0' 01346000
MEND 01347000
FILE: FINIS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01298000
&LABEL FINIS &FCB 01299000
&LABEL LA 1,&FCB 01300000
MVC 0(8,1),=CL8'FINIS' 01301000
SVC X'CA' 01302000
DC AL4(*+4) 01303000
MEND 01304000
FILE: FREESCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01893000
FREESCT &OPTION 01894000
AIF (N'&OPTION NE 0).CSECT 01895000
FREDSECT DSECT 01896000
.CSECT ANOP 01897000
* 01898000
* SYSTEM "FREE/FRET" STORAGE MANAGEMENT WORK AREA 01899000
* 01900000
FREELIST DC D'0' . A(START OF FREE LIST CHAIN) 01901000
FREENUM DC H'0' . N'BLOCKS IN FREE LIST 01902000
DC X'00' . ---NOT USED--- 01903000
FSW DC X'00' . SWITCH BITS 01904000
* REGISTER AREAE 01905000
JSAVE20 DC 16F'0' . FREE: R2-R0. FRET: R2-R1 01906000
JSAVE14 EQU JSAVE20+48 . R14: A(RETURN) 01907000
JSAVE15 EQU JSAVE20+52 . A(FREE,FRET) 01908000
JSAVE0 EQU JSAVE20+56 . R0: N'DBLE WORDS OF STORAGE 01909000
JSAVE1 EQU JSAVE20+60 . R1: A(FRET STORAGE) 01910000
* FREE/FRET VECTORS 01911000
FREELOWR DC F'262136' . A(LOWEST POINT ACQUIRED) 01912000
FREEUPPR DC F'0' . A(HIGHEST POINT ACQUIRED) 01913000
AFREE DC A(FREE) . V(FREE) 01914000
AFRET DC A(FRET) . V(FRET) 01915000
MEND 01916000
FILE: FREEST ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01562000
FREEST 01563000
*********************************************************************** 01564000
* 01565000
* STORAGE ADDRESSED VIA REGISTER 13 01566000
* 01567000
*********************************************************************** 01568000
SPACE 2 01569000
FREEST DSECT 01570000
SPACE 2 01571000
GPRSAV DS 3F REGISTERS 9-12 01572000
LOCSAV DS F 01573000
RETT DS F 01574000
LOCCT DS F (LOCCNT) NEXT LOAD ADDRESS 01575000
BRAD DS F (STADDR) EXECUTION ADDRESS 01576000
TBLREF DS F (LDRTBL) TOP OF LOADER TABLE 01577000
CONS DS X SWITCHES 01578000
SWS DS X SWITCHES 01579000
TBLCT DS H 01580000
MVC1 DS 3H MVC WD(1),0(3) 01581000
MVC2 DS 3H MVC 0(1,3),WD 01582000
WD DS F 01583000
PLIST DS F PARAMETER LIST POINTER (UPDATED) 01584000
RETREG DS F RETURN ADDRESS 01585000
SPEC DS 200F 10 CARD INPUT BUFFER 01586000
ESIDTB DS 256H 256 ESD ENTRIES/OBJECT DECK 01587000
APSV DS 16F 01588000
TEMPST DS F 01589000
TMPLOC DS 2F 01590000
RDBUF DS 2F 01591000
FNAME DS 2F FILE NAME 01592000
FTYPE DS 2F FILE TYPE 01593000
FMODE DS H FILE MODE 01594000
RITEM DS H NUMBER OF ITEMS 01595000
RADD DS F BUFFER ADDRESS 01596000
RLENG DS F BUFFER SIZE 01597000
RFIX DS H FIXED/VARIABLE FLAG BYTE 01598000
RNUM DS H NUMBER OF ITEMS 01599000
NUMBYTE DS F NUMBER OF BYTES ACTUALLY READ 01600000
CRDPTR DS F 01601000
FINIS DS 7F 01602000
FLAGS DS F LIBRARY SWITCHES, ETC. 01603000
TYPLIN DS 2F TYPLIN PARAMETER LIST 01604000
TYPEAD DS 2F TYPLIN BUFFER ADDRESS 01605000
DSKLIN DS 7F 01606000
DSKAD DS 13X 01607000
HEXCON DS 14X 01608000
PACK EQU HEXCON 01609000
UNPACK EQU HEXCON+5 01610000
OUTPUT DS X 01611000
OUTBUF DS 100X 01612000
PRCNT DS H ADDRESS OF NEXT PRV "LOAD ADDRESS" 01613000
SAV2 DS 2F 01614000
XEQPTR DS F 01615000
ENTNAME DS CL8 'ENTRY' CONTROL CARD NAME 01616000
FILE: FREEST ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
ENTADR DS F 'ENTRY' POINT LOADER TABLE ENTRY 01617000
MEMBOUND DS F 01618000
PLISTSAV DS 64D 01619000
TXTLIBSV DS 64X 01620000
ENDFREE DS 0D 01621000
SPACE 2 01622000
NEED EQU (ENDFREE-FREEST)/8 01623000
MEND 01624000
FILE: FSENTR ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01872000
&LABEL FSENTR &RGSV 01873000
USING *,R15 01874000
&LABEL L R15,AFVS -- A(FVS) INTO R15 01875000
USING FVSECT,R15 01876000
STM R0,R14,&RGSV -- SAVE R0 THRU 14 01877000
DROP R15 01878000
LR R13,R15 -- REFERENCE 'FVS' INFO 01879000
USING FVSECT,R13 01880000
BALR R12,0 -- OUR OWN ADDRESSABILITY 01881000
USING *,R12 01882000
MEND 01883000
FILE: FST ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01516000
&LABEL FST &NAME,&TYPE,&MASK 01517000
&LABEL DS 0D ALIGNMNENT 01518000
DC CL8'&NAME' FILE NAME 01519000
DC CL8'&TYPE' FILE TYPE 01520000
AIF (N'&MASK EQ 0).SEQ4 01521000
DC X'&MASK' MASK 01522000
AGO .SEQ3 01523000
.SEQ4 DC X'00' IGNORED 01524000
.SEQ3 AIF ('&TYPE' NE '*').SEQ1 01525000
DC VL3(&NAME) LOCATION 01526000
AGO .SEQ2 01527000
.SEQ1 DC AL3(0) IGNORED 01528000
.SEQ2 DC 2H'1' WRITE/READ POINTERS 01529000
DC CL2'SY' MODE --- SYSTEM 01530000
DC H'0' NO. OF ITEMS 01531000
DC H'0' ADDRESS OF 1ST CHAIN LINK 01532000
DC CL1'F' CHARACTERISTIC 01533000
DC X'00' FLAGS 01534000
DC F'80' ITEM LENGTH 01535000
DC H'0' NO. OF 1/4 TRACKS 01536000
DC H'0' NOT USED 01537000
MEND 01538000
FILE: FSTB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00857000
FSTB 00858000
* 00859000
* FILE STATUS TABLE (FILE DIRECTORY) BLOCK 00860000
* 00861000
FSTSECT DSECT 00862000
FSTN DS 1D FILE NAME - 0 00863000
FSTT DS 1D FILE TYPE - 8 00864000
FSTD DS 1F DATE/TIME LAST WRITTEN - 16 00865000
FSTWP DS 1H WRITE POINTER (ITEM NO.) - 20 00866000
FSTRP DS 1H READ POINTER (ITEM NO.) - 22 00867000
FSTM DS 1H FILE MODE - 24 00868000
FSTIC DS 1H ITEM COUNT - 26 00869000
FSTFCL DS 1H FIRST CHAIN LINK - 28 00870000
FSTFV DS 1C FIXED(F)/VARIABLE(V) FLAG - 30 00871000
FSTFB DS 1C FLAG BYTE (IF USED) - 31 00872000
FSTIL DS 1F (MAXIMUM) ITEM LENGTH - 32 00873000
FSTDBC DS 1H 800-BYTE DATA BLOCK COUNT - 36 00874000
FSTYR DS 1H YEAR - 38 00875000
FSTL EQU *-FSTSECT 00876000
* 00877000
* "FSTFB" FLAG-BYTE DEFINITIONS 00878000
* 00879000
* (APPLICABLE ONLY TO "STATEFST" COPY OF FST-ENTRY 00880000
* AFTER SUCCESSFUL "STATE" OR "STATEW" CALL.) 00881000
* 00882000
FSTFRO EQU X'00' READ-ONLY DISK 00883000
FSTFROX EQU X'40' READ-ONLY EXTENSION OF READ-ONLY DISK 00884000
FSTFRW EQU X'80' READ-WRITE DISK 00885000
FSTFRWX EQU X'C0' READ-ONLY EXTENSION OF READ-WRITE DISK 00886000
* 00887000
FSTFACT EQU X'07' FILE "ACTIVE" - ONE OF THE FOLLOWING: 00888000
FSTFAR EQU X'04' FILE ACTIVE FOR READING 00889000
FSTFAW EQU X'02' FILE ACTIVE FOR WRITING 00890000
FSTFAP EQU X'01' FILE ACTIVE FROM A "POINT" 00891000
* 00892000
* 00893000
* FST HYPER-BLOCK PARAMETERS 00894000
* 00895000
FSTFWDP EQU 800 FORWARD POINTER (TO NEXT HYPERBLOCK IN CORE) 00896000
FSTBKWD EQU 804 BACKWARD POINTER (TO PREVIOUS HYPERBLOCK IN CORE) 00897000
* 00898000
MEND 00899000
FILE: FVS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00900000
FVS &CSECT 00901000
AIF (N'&CSECT NE 0).SEQ2 00902000
FVSECT DSECT 00903000
.SEQ2 ANOP 00904000
DISK$SEG DS 15F (1) FOR FSTLKP, FSTLKW, ACTLKP, TRKLKP, QQTRK 00905000
REGSAV3 DS 15F (2) FOR RDBUF, WRBUF, FINIS, STATE, POINT 00906000
RWFSTRG DS 18F (3) REMAINING STORAGE FOR RDBUF, WRBUF, FINIS 00907000
* 00908000
ADTFVS DC 2F'0' ADTLKP 00909000
* 00910000
* SAVE-AREA FOR LOWEST-LEVEL ROUTINES: 00911000
* E.G. READMFD, RELUFD, UPDISK, TYPSRCH, ADTLKW 00912000
REGSAV0 DS 15F -- (1) SAVED R0-R15 00913000
DC AL3(00) -- (2) FIRST 3 BYTES OF RETURN-CODE 00914000
ERRCOD0 DC AL1(*-*) -- (3) ERROR-CODE GOES HERE 00915000
* 00916000
TRKLSAVE EQU REGSAV0 FOR TRKLKP/X ONLY WHEN CALLED BY QQTRK/X 00917000
* 00918000
* SAVE-AREA FOR NEXT-TO-LOWEST LEVEL ROUTINES: 00919000
* E.G. READFST, ERASE, ALTER, INTSVC-LOADMOD 00920000
REGSAV1 DS 15F -- (1) 00921000
DC AL3(00) -- (2) 00922000
ERRCOD1 DC AL1(*-*) -- (3) 00923000
* 00924000
AACTLKP DC V(ACTLKP) 00925000
AACTNXT DC V(ACTNXT) 00926000
AACTFREE DC V(ACTFREE) 00927000
AACTFRET DC V(ACTFRET) 00928000
AADTLKP DC V(ADTLKP) 00929000
AADTNXT DC V(ADTNXT) 00930000
AFSTLKP DC V(FSTLKP) 00931000
AFSTLKW DC V(FSTLKW) 00932000
ARDTK DC V(RDTK) 00933000
AWRTK DC V(WRTK) 00934000
ATRKLKP DC V(TRKLKP) 00935000
ATRKLKPX DC V(TRKLKPX) 00936000
AQQTRK DC V(QQTRK) 00937000
AQQTRKX DC V(QQTRKX) 00938000
AADTLKW DC V(ADTLKW) 00939000
AERASE DC V(ERASE) 00940000
ATYPSRCH DC V(TYPSRCH) 00941000
AUPDISK DC V(UPDISK) 00942000
AKILLEX DC V(KILLEX) 00943000
ATFINIS DC V(TFINIS) 00944000
ARDBUF DC V(RDBUF) 00945000
AWRBUF DC V(WRBUF) 00946000
AFINIS DC V(FINIS) 00947000
ASTATE DC V(STATE) 00948000
ASTATEW DC V(STATEW) 00949000
APOINT DC V(POINT) 00950000
F65535 DC F'65535' = X'0000FFFF' 00951000
* 00952000
F4 DC F'4' 00953000
H4 EQU F4+2 00954000
FILE: FVS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
SPACE 2 00955000
AFREE DC V(FREE) -- (1) 00956000
F100 DC F'100' -- (2) 00957000
* 00958000
AFRET DC V(FRET) (INTO R15) 00959000
JSR0 DC F'0' R0 AND ... 00960000
JSR1 DC F'0' R1 SAVED HERE FOR FRET CALLS. 00961000
* 00962000
* PARAMETER-LIST TO READ/WRITE MFD... 00963000
RWMFD DC A(*-*) -- CORE-ADDRESS 00964000
F800 DC F'800' -- 800 BYTES 00965000
DC A(H4) 00966000
FVSDSKA DC A(*-*) -- ADD. OF ACTIVE-DISK-TABLE 00967000
* 00968000
DSKLST DS 0F ALL-PURPOSE RDTK/WRTK P-LIST... 00969000
DSKLOC DC A(*-*) CORE LOC. OF ITEM 00970000
RWCNT DC A(*-*) BYTE-COUNT (USUALLY 800) 00971000
DSKADR DC A(*-*) DISK ADDRESS OF ITEM 00972000
ADTADD DC A(*-*) ADDRESS OF CORRECT ACTIVE-DISK-TABLE 00973000
* 00974000
FINISLST DC CL8'FINIS' P-LIST TO CLOSE ALL FILES 00975000
DC CL8'*' 00976000
DC CL8'*' 00977000
DC CL2'*' 00978000
* 00979000
DS 0H HALFWORD CONSTANTS ... 00980000
FFF DC X'FFFF' MEANS NO SIGNIFICANT DATA PAST 215TH BYTE 00981000
FFE DC X'FFFE' 1968-ERA MFD STILL SUPPORTED ON INPUT ONLY 00982000
FFD DC X'FFFD' NEWEST SIGNAL FOR FULL 2314 HANDLING 00983000
* 00984000
* 'SIGNAL' = SCRATCH HALFWORD USED BY READMFD OR ERASE... 00985000
SIGNAL DC H'0' = 0000, X'FFFF', X'FFFE', OR X'FFFD' 00986000
SWTCH EQU SIGNAL+1 00, FF, FE, OR FD 00987000
* 00988000
UFDBUSY DC X'00' NONZERO MEANS 'UFD IS BUSY BEING UPDATED' 00989000
KXFLAG DC X'00' NONZERO MEANS 'KX' DESIRED ASAP. 00990000
EXTFLAG DC X'00' NONZERO MEANS EXTERNAL INTERRUPT WANTED. 00991000
FLGSAVE DC X'00' FOR SCRATCH USE (E.G. BY RELUFD) 00992000
* 00993000
* FLAG BITS FOR 'UFDBUSY' FLAG... 00994000
WRBIT EQU X'80' WRBUF 00995000
UPBIT EQU X'40' UPDISK - READMFD 00996000
FNBIT EQU X'20' FINIS 00997000
ERBIT EQU X'10' ERASE - ALTER - READFST 00998000
DIOBIT EQU X'08' RDTK/WRTK 00999000
* 01000000
FVSFLAG DC X'00' (FOR GENERAL USE - AS NEEDED) 01001000
* 01002000
* MISCELLANEOUS STORAGE USED BY ERASE (OR ALTER) .... 01003000
ERSFLAG DC X'00' FLAG FOR USE BY ERASE OR ALTER 01004000
* 01005000
FVSERAS0 DC F'0' (1) - R0 TO/FROM FSTLKW (FOR ERASE) 01006000
FVSERAS1 DC F'0' (2) - R1 TO ACTLKP OR FSTLKW (FOR ERASE) 01007000
FVSERAS2 DC F'0' (3) ADDRESS OF FREE STORAGE USED BY ERASE 01008000
SPACE 1 01009000
FILE: FVS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
* 01010000
* FILE STATUS TABLE (FST) COPY FROM "STATE" 01011000
* 01012000
STATEFST DS 0D FULL FST OF 'STATED' FILE 01013000
FVSFSTN DC D'0' FILENAME -0 01014000
FVSFSTT DC D'0' FILETYPE -8 01015000
FVSFSTDT DC 2H'0' DATE/TIME LAST WRITTEN -16,18 01016000
FVSFSTWP DC H'0' WRITE POINTER (ITEM ID) -20 01017000
FVSFSTRP DC H'0' READ POINTER (ITEM ID) -22 01018000
FVSFSTM DC H'0' FILEMODE -24 01019000
FVSFSTIC DC H'0' N'ITEMS IN FILE -26 01020000
FVSFSTCL DC H'0' DA(FIRST CHAIN LINK) -28 01021000
FVSFSTFV DC C' ' FIXED(F) / VARIABLE(V) INDICATOR -30 01022000
FVSFSTFB DC X'00' FLAG BYTE -31 01023000
FVSFSTIL DC F'0' L'ITEMS -32 01024000
FVSFSTDB DC H'0' N'DATA BLOCKS -36 01025000
FVSFSTYR DC 2C' ' YEAR LAST WRITTEN -38 01026000
* 01027000
FVSFSTAD DC A(0) A(ADT FOR THIS FILE) 01028000
STATER0 EQU FVSFSTAD 01029000
FVSFSTAC DC A(0) A(REAL FST ENTRY FOR THIS FILE) 01030000
STATER1 EQU FVSFSTAC 01031000
* 01032000
MEND 01033000
FILE: GETCC ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01417000
&LABEL GETCC &SYSCB,&ERROR= 01418000
&LABEL LA 1,&SYSCB 01419000
L 15,=V(SYSCTL) 01420000
MVC 8(8,1),=CL8'GETCC' 01421000
BALR 14,15 01422000
AIF (N'&ERROR EQ 0).SEQ2 01423000
DC AL4(&ERROR) 01424000
AGO .SEQ3 01425000
.SEQ2 DC AL4(*+4) 01426000
.SEQ3 SPACE 1 01427000
MEND 01428000
FILE: GOTO ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03440
GOTO &WHERE ERP03450
B &WHERE ERP03460
MEND ERP03470
FILE: IF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03260
IF &COND=,&GORT=,&GOREG= ERP03270
AIF (T'&GORT EQ 'O').REG ERP03280
BC &COND,&GORT ERP03290
MEXIT ERP03300
.REG ANOP ERP03310
BCR &COND,&GOREG ERP03320
MEND ERP03330
FILE: IFC ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03390
IFC &FLD=,&COMP=,&CONDC=,&GOCRT=,&GOCREG= ERP03400
CLI &FLD,&COMP ERP03410
IF COND=&CONDC,GORT=&GOCRT,GOREG=&GOCREG ERP03420
MEND ERP03430
FILE: IFT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03340
IFT &FLD=,&COMP=,&CONDT=,&GOTRT=,&GOTREG= ERP03350
TM &FLD,&COMP ERP03360
IF COND=&CONDT,GORT=&GOTRT,GOREG=&GOTREG ERP03370
MEND ERP03380
FILE: IO ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00100010
IO &OPTION 00100020
AIF (N'&OPTION NE 0).SEQ2 00100030
OPSECT DSECT 00100040
.SEQ2 ANOP 00100050
* 00100060
* COMMANDER-IN-CHIEF OF ALL I/O OPERATION LISTS 00100070
* 00100080
PLIST DS 0D 00100090
CMSOP DS CL8 I/O OPERATION COMMAND WORD 00100100
FILENAME DS CL8 FILE NAME 00100110
FILETYPE DS CL8 FILE TYPE 00100120
FILEMODE DS CL2 FILE MODE 00100130
FILEITEM DS H ITEM IDENTIFICATION NUMBER 00100140
FILEBUFF DS F INPUT-OUTPUT BUFFER 00100150
FILEBYTE DS F DATA COUNT 00100160
FILEFORM DS CL2 FILE FORMAT: FIXED/VARIABLE RECORDS 00100170
FILECOUT DS H RECORDS PER BLOCK 00100180
FILEREAD DS F READ DATA COUNT 00100190
POINTERS EQU FILEITEM 00100200
AFST EQU FILEBUFF 00100210
* 00100220
IOAREA EQU FILEBUFF BUFFER AREA LOCATION 00100230
IOLENGTH EQU FILEBYTE BUFFER LENGTH 00100240
* 00100250
* IMMEDIATE REGISTER SAVE ARE 00100260
* 00100270
* 00100280
SAVER14 DC F'0' TEMP R14 SAVE 00100290
SAVER15 DC F'0' TEMP R15 SAVE 00100300
SAVER0 DC F'0' TEMP R0 SAVE 00100310
SAVER1 DC F'0' TEMP R1 SAVE 00100320
* 00100330
FCBIO DC A(0) A (LAST FCB USED DURING AN I/O OPER) 00100340
CMSNAME DC CL8'FILE ' "DEFAULT FILENAME"
DC F'0' ---NOT USED--- 00100360
* 00100370
* CONSOLE PARAMETER LISTS 00100380
* 00100390
DS 0F 00100400
* READ CONSOLE 00100410
CONREAD DC CL8'WAITRD' TERMINAL READ 00100420
CONRDBUF DC A(INPBUF) INPUT BUFFER 00100430
CONRDCOD DC C'U' TRANSLATE CODE 00100440
DC X'00' 00100450
CONRDCNT DC AL2(*-*) DATA BYTE COUNT 00100460
NUMCH DC F'0' N'BYTES SCANNED 00100470
INPBUF DC 132C' ' INPUT BUFFER 00100480
* CONSOLE WAIT LIST 00100490
WAITLIST DS 0F 00100500
DC CL8'CONWAIT' 00100510
* WRITE CONSOLE 00100520
CONWRITE DS 0F 00100530
DC CL8'TYPLIN' 00100540
CONWRBUF DC A(*-*) LOCATION OF MESSAGE TEXT 00100550
FILE: IO ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
CONWRCOD DC C'B' COLOR CODE 00100560
DC X'00' 00100570
CONWRCNT DC AL2(*-*) LENGTH OF MESSAGE TEXT 00100580
* 00100590
* READER PARAMETER LIST 00100600
* 00100610
DS 0F 00100620
READLST DC CL8'CARDRD' 00100630
RDBUFF DC A(0) BUFFER ADDRESS 00100640
RDCCW DC H'0' CCW BYTE COUNT TR 00100650
RDCOUNT DC H'0' BYTES ACTUALLY READ TR 00100660
* 00100670
* CARD PUNCH PARAMETER LIST 00100680
* 00100690
PUNCHLST DS 0F 00100700
DC CL8'CARDPH' 00100710
PUNBUFF DC A(0) PUNCH BUFFER ADDRESS 00100720
PUNCOUNT DC A(0) PUNCH CCW COUT 00100730
* 00100740
* PRINTER PARAMETER LIST 00100750
* 00100760
PRINTLST DS 0F 00100770
DC CL8'PRINTR' 00100780
PRBUF DC A(0) PRINTER BUFFER ADDRESS 00100790
PRCNT DC A(0) PRINT DATA COUNT 00100800
* 00100810
* TAPE PARAMETER LIST 00100820
* 00100830
TAPELIST DS 0F 00100840
DC CL8'TAPEIO' 00100850
TAPEOPER DC CL8' ' TAPE OPERATION COMMAND 00100860
TAPEDEV DC CL4'TAP2' TAPE SYMBOLIC DEVICE 00100870
TAPEMASK DC X'93' SET MODE 00100880
TAPEBUFF DC AL3(0) BUFFER LOCATION 00100890
TAPESIZE DC F'0' 00100900
TAPECOUT DC F'0' TAPE COUNTER 00100910
* 00100920
* CLOSE OUT DEVICE DEPENDENT DATA SET ON UNIT RECORD EQUIPMENT 00100930
* 00100940
CLOSIO DS 0F 00100950
DC CL8'CLOSIO' OPERATION 00100960
CLOSIODV DC CL8' ' DEVICE TYPE 00100970
DC 4X'FF' 00100980
* 00100990
* CMS BATCH MONITOR INPUT-OUTPUT PARAMETER LIST 00101000
* 00101010
RDSYS DS 0D 00101020
DC CL8'SYSCTL' 00101030
DC CL8'READ ' 00101040
DC A(0) 00101050
DC F'0' 00101060
SPACE 00101070
* 00101080
WRSYS DS 0D 00101090
DC CL8'SYSCTL' 00101100
FILE: IO ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
DC CL8'WRITE ' 00101110
DC A(0) 00101120
DC F'0' 00101130
* 00101140
* 00101150
* STORAGE FOR EXEC BOOTSTRAP: 00101160
EXLEVEL DC F'0' EXEC "LEVEL" 00101170
EXF1 DC F'1' (FOLLOWS EXLEVEL) 00101180
EXNUM DC F'0' NUMBER DBL-WORDS FREE STORAGE 00101190
EXADD DC F'0' ADDRESS OF "EXECTOR" CORE-IMAGE 00101200
* 00101210
* 00101220
* STORAGE FOR OVERNUC BOOTSTRAP: 00101230
OVERNUM DC F'0' NUMBER DBL-WORDS FREE STORAGE 00101240
OVERADD DC F'0' ADDRESS OF "OVERRIDE" CORE-IMAGE 00101250
* 00101260
MEND 00101270
FILE: IOGENE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO IOG00010
IOGENE &TYPE=(XL1,XL2,XL1,CL1,CL1,AL2,XL1,PL2,XL1,XL1,XL1, -IOG00020
XL1,FL1,XL1,XL1,XL1),&VALUE= IOG00030
LCLA &N,&LPCT IOG00040
LCLC &BRACK1,&DC,&BRACK2 IOG00050
* DATED: 6 JUNE 1971 IOG00060
*** PTF 'IOGENE AM3636CA' HAS BEEN APPLIED *** IOG00070
&LPCT SETA N'&TYPE+&LPCT IOG00080
&N SETA 1+&N IOG00090
&DC SETC 'DC' IOG00100
.LP ANOP IOG00110
AIF ('&TYPE(&N)'(1,1) EQ 'A').PAR IOG00120
&BRACK1 SETC '''' IOG00130
&BRACK2 SETC '''' IOG00140
.DCST ANOP IOG00150
&DC &TYPE(&N)&BRACK1&VALUE(&N)&BRACK2 IOG00160
AIF (&N EQ &LPCT).DONE IOG00170
&N SETA &N+1 IOG00180
AGO .LP IOG00190
.PAR ANOP IOG00200
&BRACK1 SETC '(' IOG00210
&BRACK2 SETC ')' IOG00220
AGO .DCST IOG00230
.DONE ANOP IOG00240
DC XL1'00' IOG00250
DC 9XL2'0000' ERROR CT1-9 IOG00260
MEND IOG00270
FILE: IOGENRT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP08310
IOGENRT &RTTYPE ERP08320
&RTTYPE START 0 ERP08330
* EXTRN'S ERP08340
EXTRN SYSREF ERP08350
* EXTRN IOERRSUP,FREE,FRET REFERENCED BY SYSREF ERP08360
* ENTRY'S ERP08370
* NONE ERP08380
* REGISTER USAGE ERP08390
* DEFINED IN IOERR ERP08400
* AND SUBDEFINED IN DKRT- ERP08410
* PROCEDURES ERP08420
EJECT ERP08430
* DSECT'S ERP08440
CMSREG ERP08450
EJECT ERP08460
DIODSCT DSECT ERP08470
DIOSCT NODS ERP08480
EJECT ERP08490
ADT ERP08500
EJECT ERP08510
MESDKRCD ERP08520
EJECT ERP08530
DEVTABEX PREFIX=GRN1 ERP08540
EJECT ERP08550
EIOPL ERP08560
EJECT ERP08570
ERPTRWT ERP08580
EJECT ERP08590
ERPERRQ ERP08600
EJECT ERP08610
MESIN1 ERP08620
EJECT ERP08630
CMSYSREF ERP08640
EJECT ERP08650
&RTTYPE CSECT ERP08660
* USING STATEMENTS ERP08670
* DEFINED IN TABLE OR MACRO ERP08680
* GLOBAL EQU'S ERP08690
*SYMBOL EQU VALUE MEANING ERP08700
* CAW EQU X'48' CAW LOCATION ERP08710
DVNOTATT EQU X'3F' DEVICE NOT OPER=NOT ATT ERP08720
ERRINERR EQU C'E' REQ FOR IOERR FROM IOERR ERP08730
EJECT ERP08740
IOGENTAB TABTYPE=&RTTYPE ERP08750
MEND ERP08760
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO IOG00010
IOGENTAB &TABTYPE= IOG00020
LCLC &T1052,&T1403,&T2540P,&T2540R IOG00030
LCLC &O1403 IOG00040
LCLC &T2400,&T2404,&T2402,&T2403 IOG00050
* DATED: 6 JUNE 1971 IOG00060
*** PTF 'IOGENTAB AM3636CA' HAS BEEN APPLIED *** IOG00070
.* SOURCE FOR TABLES (IONUTAB + IOFRTAB) AND MACRO (IOMACTAB) IOG00080
&T1052 SETC '1052' IOG00090
&T1403 SETC '1403' IOG00100
&T2540P SETC '2540P' IOG00110
&T2540R SETC '2540R' IOG00120
&O1403 SETC '1403' IOG00130
&T2400 SETC '2400' IOG00140
&T2404 SETC '2404' IOG00150
&T2402 SETC '2404' IOG00160
&T2403 SETC '2403' IOG00170
AIF ('&TABTYPE'(3,3) NE 'MAC').NODSCT IOG00180
IOMACTAB DSECT IOG00190
.NODSCT ANOP IOG00200
AIF ('&TABTYPE' EQ 'IONUTAB').RETYPE IOG00210
AGO .CONT1 IOG00220
.RETYPE ANOP IOG00230
&T1052 SETC '2311' IOG00240
&T1403 SETC '2311' IOG00250
&T2540P SETC '2311' IOG00260
&T2540R SETC '2311' IOG00270
&O1403 SETC '2311' IOG00280
&T2400 SETC '2311' IOG00290
&T2404 SETC '2311' IOG00300
&T2402 SETC '2311' IOG00310
&T2403 SETC '2311' IOG00320
.CONT1 ANOP IOG00330
DS 0D IOG00340
ERPTABLE EQU * IOG00350
* IOG00360
* TABLES FOR ERROR RECOVERY IOG00370
* THE FOUR TYPES OF TABLES ARE: IOG00380
* DEVICE TYPE TABLE IOG00390
* DEVICE RECOVERY TABLE: IOG00400
* 1.ERROR ENTRIES IOG00410
* 2.ERROR RECOVERY PROCEDURES IOG00420
* DEVICE OPERATION CODE TABLE IOG00430
* DEVICE MESSAGE TABLE IOG00440
EJECT IOG00450
* DEVICE TYPE TABLE IOG00460
* CHARACTERISTICS IOG00470
ADDTYPDL DC CL4'****' START OF TABLE DELIMITER IOG00480
ADDTYPNO DC AL2((TYPTB2-TYPTB1)/(TYPDT2-TYPDT1)) NO. IOG00490
* OF ENTRIES IOG00500
ADDTYPDT DC AL2(TYPDT2-TYPDT1) SIZE OF EACH ENTRY IOG00510
ADDTYPTB DC AL2(TYPTB2-TYPTB1) SIZE OF TABLE IOG00520
ADDTYPSN DC AL2(0) UNUSED IOG00530
* IOG00540
* ENTRIES IOG00550
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
* DEVICE TYPE CODE XL1 IOG00560
* RECOVERY TABLE LOCATION AL3 IOG00570
* DEVICE NAME CODE XL1 IOG00580
* OPERATION TABLE LOCATION AL3 IOG00590
* IOG00600
TYPTABST EQU * START OF TYPE TABLE IOG00610
TYPTB1 EQU * CALCULATION (CAL) LOCATION IOG00620
TYPDT1 EQU * CAL LOC IOG00630
TYP1052 DC XL1'00' IOG00640
DC AL3(TAB&T1052-ERPTABLE) IOG00650
DC FL1'01' IOG00660
DC AL3(OP1052-ERPTABLE) IOG00670
TYPDT2 EQU * CAL LOC IOG00680
TYP1403 DC XL1'30' IOG00690
DC AL3(TAB&T1403-ERPTABLE) IOG00700
DC XL1'02' IOG00710
DC AL3(OP&O1403-ERPTABLE) IOG00720
TYP2540P DC XL1'34' IOG00730
DC AL3(TAB&T2540P-ERPTABLE) IOG00740
DC XL1'03' IOG00750
DC AL3(OP2540P-ERPTABLE) IOG00760
TYP2540R DC XL1'3C' IOG00770
DC AL3(TAB&T2540R-ERPTABLE) IOG00780
DC XL1'04' IOG00790
DC AL3(OP2540R-ERPTABLE) IOG00800
TYP2311 DC XL1'01' IOG00810
DC AL3(TAB2311-ERPTABLE) IOG00820
DC XL1'05' IOG00830
DC AL3(OP2311-ERPTABLE) IOG00840
TYP2314 DC XL1'08' IOG00850
DC AL3(TAB2314-ERPTABLE) IOG00860
DC XL1'06' IOG00870
DC AL3(OP2314-ERPTABLE) IOG00880
TYP2400 DC XL1'C0' IOG00890
DC AL3(TAB&T2400-ERPTABLE) IOG00900
DC XL1'07' IOG00910
DC AL3(OP2400-ERPTABLE) IOG00920
TYP2404 DC XL1'C0' IOG00930
DC AL3(TAB&T2404-ERPTABLE) IOG00940
DC XL1'08' IOG00950
DC AL3(OP2404-ERPTABLE) IOG00960
TYP2402 DC XL1'C0' IOG00970
DC AL3(TAB&T2402-ERPTABLE) IOG00980
DC XL1'09' IOG00990
DC AL3(OP2402-ERPTABLE) IOG01000
TYP2403 DC XL1'C0' IOG01010
DC AL3(TAB&T2403-ERPTABLE) IOG01020
DC XL1'0A' IOG01030
DC AL3(OP2403-ERPTABLE) IOG01040
TYPTABEN EQU * IOG01050
TYPTIMER DC XL1'2C' IOG01060
DC AL3(TABTIMER-ERPTABLE) IOG01070
DC XL1'0B' IOG01080
DC AL3(OPTIMER-ERPTABLE) IOG01090
* TYPNONE NON-EXISTENT DEVICE TYPE IOG01100
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
* PROCESSED IN IOERRREC IOG01110
TYPTB2 EQU * IOG01120
EJECT IOG01130
* EQUS ARE INCLUDED FOR FUTURE IOG01140
* IMPLEMENTATIONS AND FOR IOG01150
* INSURING CLEAN ASSEMBLY IOG01160
* OF TABLES OR MACRO IOG01170
* IOG01180
* IOG01190
*SYMBOL EQU VALUE MEANING IOG01200
TAB1052 EQU * CONSOLE RECOVERY TABLE IOG01210
OP1052 EQU * CONSOLE OPERATION CODE TAB IOG01220
TAB2540P EQU * PUNCH RECOVERY TABLE IOG01230
OP2540P EQU * PUNCH OPERATION CODE TAB IOG01240
TAB2540R EQU * READER RE1OVERY TABLE IOG01250
OP2540R EQU * READER OPERATION CODE TABLE IOG01260
OP2311 EQU * 2311 OPERATION CODE TABLE IOG01270
OP2314 EQU * 2314 OPERATION CODE TABLE IOG01280
TAB2400 EQU * 2400 TAPE RECOVERY TABLE IOG01290
OP2400 EQU * 2400 OPERATION CODE TABLE IOG01300
TAB2404 EQU TAB2400 IOG01310
OP2404 EQU OP2400 IOG01320
TAB2402 EQU TAB2400 IOG01330
OP2402 EQU OP2400 IOG01340
TAB2403 EQU TAB2400 IOG01350
OP2403 EQU OP2400 IOG01360
TABTIMER EQU * TIMER RECOVERY TABLE IOG01370
* IS NONEXISTENT IOG01380
OPTIMER EQU * TIMER OPERATION CODE TABLE IOG01390
* IS NONEXISTENT IOG01400
* IOG01410
* IOG01420
* TWO MESSAGE TABLES ARE IOG01430
* INCLUDED HERE IN ORDER TO IOG01440
* USE SAME DSECT FOR BOTH DSK-RES IOG01450
* AND IN-CORE OF REC TABLES IOG01460
* IOG01470
* IOG01480
DS 0F IOG01490
* MESSAGE TYPE TABLE IOG01500
* CHARACTERISTICS IOG01510
* ADDINFOL DC CL4'****' IOG01520
* ADDINFON DC AL2((INFOT2-INFOT1)/(INFOD2-INFOD1)) NO OF ENTRIES IOG01530
* ADDINFOD DC AL2(INFOD2-INFOD1) SIZE OF AN ENTRY IOG01540
* ADDINFOT DC AL2(INFOT2-INFOT1) SIZE OF TABLE IOG01550
* ADDINFOS DC AL2(0) NO SENSE INFO IOG01560
* ENTRIES IOG01570
MESINFO EQU * IOG01580
INFOT1 EQU * CAL LOC IOG01590
INFOD1 EQU * IOG01600
* DC X'01' IOG01610
* DC CL25'ERROR RECOVERY FAILED' IOG01620
* INFOD2 DC X'02' IOG01630
* DC CL25'I/O OPERATION FAILED' IOG01640
* DC X'03' IOG01650
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 004
* DC CL25'INTERVENTION REQUIRED' IOG01660
* DC X'04' IOG01670
* DC CL25'RETYPE MESSAGE' IOG01680
* DC X'05' IOG01690
* DC CL25'DEVICE NOT LOGGED IN' IOG01700
* DC X'06' IOG01710
* DC CL25'NON-EXISTENT DEVICE' IOG01720
* DC X'07' IOG01730
* DC CL25'NON-EXISTENT I/O ERROR' IOG01740
MESINFOE EQU * IOG01750
* DC XL1'08' IOG01760
* DC CL25'DASD FILE PROT ERROR' IOG01770
INFOT2 EQU * IOG01780
* IOG01790
* IOG01800
* DETAIL MESSAGE TYPE TABLE IOG01810
* CHARACTERISTICS IOG01820
DS 0F IOG01830
ADDDNFOL DC CL4'****' IOG01840
ADDDNFON DC AL2((DNFOT2-DNFOT1)/(DNFOD2-DNFOD1)) IOG01850
ADDDNFOD DC AL2(DNFOD2-DNFOD1) IOG01860
ADDDNFOT DC AL2(DNFOT2-DNFOT1) IOG01870
ADDDNFOS DC AL2(0) IOG01880
MESDNFO EQU * IOG01890
DNFOT1 EQU * CAL LOC IOG01900
DNFOD1 EQU * IOG01910
DC XL1'01' IOG01920
DC CL15'CHAN CNT CHECK' IOG01930
DNFOD2 EQU * IOG01940
DC XL1'02' IOG01950
DC CL15'INTF CNT CHECK' IOG01960
DC XL1'03' IOG01970
DC CL15'CHAN DATA CHECK' IOG01980
DC XL1'04' IOG01990
DC CL15'SHLD NOT OCCUR' IOG02000
DC XL1'05' IOG02010
DC CL15'UNIT CHECK' IOG02020
DC XL1'06' IOG02030
DC CL15'EQUIPMENT CHECK' IOG02040
DC XL1'07' IOG02050
DC CL15'INTERV REQ' IOG02060
DC XL1'08' IOG02070
DC CL15'BUSOUT CHECK' IOG02080
DC XL1'09' IOG02090
DC CL15'DATA CHECK' IOG02100
DC XL1'0A' IOG02110
DC CL15'COMMAND REJECT' IOG02120
DC XL1'0B' IOG02130
DC CL15'UNCOMM OPER SEQ' IOG02140
DC XL1'0C' IOG02150
DC CL15'PROGRAM CHECK' IOG02160
DC XL1'0D' IOG02170
DC CL15'PROTECTION CHK' IOG02180
DC XL1'0E' IOG02190
DC CL15'UNIT EXCEPTION' IOG02200
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 005
DC XL1'0F' IOG02210
DC CL15'INCORR LENGTH' IOG02220
DC XL1'10' IOG02230
DC CL15'ADDRESS MARKER' IOG02240
DC XL1'11' IOG02250
DC CL15'OVERRUN' IOG02260
DC XL1'12' IOG02270
DC CL15'SEEK CHECK' IOG02280
DC XL1'13' IOG02290
DC CL15'DATA CHK COUNT' IOG02300
DC XL1'14' IOG02310
DC CL15'FILE PROTECTION' IOG02320
DC XL1'15' IOG02330
DC CL15'UNDETR ERROR' IOG02340
DC XL1'16' IOG02350
DC CL15'ERROR IN REC' IOG02360
DC XL1'17' IOG02370
DC CL15'NRF-MADDMK' IOG02380
DC XL1'18' IOG02390
DC CL15'INVALID SEEK' IOG02400
DC XL1'19' IOG02410
DC CL15'UNKOWN DEVICE' IOG02420
DC XL1'1A' IOG02430
DC CL15'DEVICE NOT OPER' IOG02440
DC XL1'1B' IOG02450
DC CL15'NO RECORD FOUND' IOG02460
DC XL1'1C' IOG02470
DC CL15'TRACK COND CHECK' IOG02480
DC XL1'1D' IOG02490
DC CL15'TRACK OVERRUN' IOG02500
DC XL1'1E' IOG02510
DC CL15'CYLINDER END' IOG02520
DC XL1'1F' IOG02530
DC CL15'CHAINNING CHECK' IOG02540
DC XL1'20' IOG02550
DC CL15'DEV NOT LOGGED ' IOG02560
DC XL1'21' IOG02570
DC CL15'CONSOLE RETYPE' IOG02580
DC XL1'22' IOG02590
DC CL15'DSK DIAG FAILED' IOG02600
DC XL1'23' IOG02610
DC CL15'UNKNOWN DEVICE' IOG02620
MESDNFOE EQU * IOG02630
DC XL1'24' IOG02640
DC CL15'STOR PARITY ERR' IOG02650
DNFOT2 EQU * IOG02660
DS 0F IOG02670
* DEVICE NOT OPERATIONAL IOG02680
* RETURN CODE TABLES IOG02690
ADDDKRCL DC CL4'****' TAB SEP IOG02700
ADDDKRCN DC AL2((DKRCT2-DKRCT1)/(DKRCD2-DKRCD1)) NO OF ENTRIES IOG02710
ADDDKRCD DC AL2(DKRCD2-DKRCD1) SIZE OF AN ENTRY IOG02720
ADDDKRCT DC AL2(DKRCT2-DKRCT1) SIZE OF TABLE IOG02730
ADDDKRCS DC AL2(0) SPECIAL INFO IOG02740
MESDKRC EQU * IOG02750
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 006
DKRCT1 EQU * CAL LOC IOG02760
DKRCD1 EQU * IOG02770
DC X'00' 1052 IOG02780
DC X'FF' IOG02790
DKRCD2 EQU * IOG02800
DC XL1'30' 1403 IOG02810
DC X'04' IOG02820
DC XL1'34' 2540P IOG02830
DC X'04' IOG02840
DC XL1'3C' 2540R IOG02850
DC X'04' IOG02860
DC XL1'01' 2311 IOG02870
DC XL1'03' TREATED AS SIO ERROR IOG02880
DC XL1'08' 2314 IOG02890
DC XL1'03' TREATED AS SIO ERROR IOG02900
DC XL1'C0' ALL TAPES IOG02910
DC X'05' IOG02920
MESDKRCE EQU * IOG02930
DC XL1'2C' TIMER IOG02940
DC X'FF' IOG02950
DKRCT2 EQU * CAL LOC IOG02960
* IOG02970
* IOG02980
* USING STATEMENTS FOR IOG02990
* CLEAN TABLES OR IOG03000
* MACRO ASSEMBLY IOG03010
USING GRN1EXTD,R6 IOG03020
* USING MESDKRCD,R13 INIT IN DKRT0 RT IOG03030
USING EIOPL,R4 IOG03040
USING ERPTRWT,R5 IOG03050
USING ERPERRQ,R7 IOG03060
USING MESIN1,R12 IOG03070
* USING DIODSCT,R8 INIT IN DKRTPRG1 RT IOG03080
* USING DIODSCT,R8 INIT IN DK-I/O SUBROUTINES IOG03090
* USING ADTSECT,R1 INIT IN DKRTPRG1 RT IOG03100
EJECT IOG03110
* DEVICE RECOVERY TABLES IOG03120
* CHARACTERISTICS: IOG03130
* TABLE DEPENDENT 00 IOG03140
* ENTRIES: IOG03150
* PRIORITY XL1 IOG03160
* STATUS XL2 IOG03170
* OPTIONS XL1 IOG03180
* NOTE: DIAGNOSE ERROR RECOVERY OPTIONS ARE INCLUDED,BUT ARE IOG03190
* IGNORED IN VERSION 3.1 IOG03200
* X'80'=DIAG REC IOG03210
* X'40'=DIAG PROC IOG03220
* X'20'=MESSAGE IOG03230
* X'10'=MES CHK IOG03240
* MESSAGE CODE CL1 IOG03250
* R=RESULT IOG03260
* A=ACTION IOG03270
* I=INFORMATION IOG03280
* RECOVERY ACTION GRP HEADING IOG03290
* 1.TYPE CL1 IOG03300
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 007
* C=COMPLEX IOG03310
* S=SIMPLE IOG03320
* I=INTERVENTION IOG03330
* N=NONE IOG03340
* 2.RECOVERY- AL2 IOG03350
* PROCEDURE ADDRESS IOG03360
* 3.OPERATOR MESSAGE XL1 IOG03370
* MESSAGE NUMBER PL2 IOG03380
* MESSAGE CODE PT XL1 IOG03390
* OPERATION TYPE PT XL1 IOG03400
* ERROR POINTER XL1 IOG03410
* USER RETURN CODE XL1 IOG03420
* CCW ADD= CSW + FLD FL1 IOG03430
* DISPL OF SENSE XL1 IOG03440
* SENSE DATA XL1 IOG03450
* DET MES PTR XL1 IOG03460
* STATISTICS 9XL2 IOG03470
EJECT IOG03480
DS 0D IOG03490
* DASD DEVICE RECOVERY TABLE IOG03500
TAB2311 EQU * IOG03510
TAB2314 EQU * IOG03520
* CHARACTERISTICS IOG03530
ADDT18L DC CL4'****' IOG03540
ADDT18N DC AL2((T18T2-T18T1)/(T18D2-T18D1)) IOG03550
ADDT18D DC AL2(T18D2-T18D1) SIZE OF AN ENTRY IOG03560
ADDT18T DC AL2(T18T2-T18T1) SIZE OF TABLE IOG03570
ADDT18S DC AL2(6) NO. OF SENSE BYTES IOG03580
* ENTRIES IOG03590
T18T1 EQU * CAL LOC IOG03600
T18D1 EQU * CAL LOC IOG03610
* CHANNEL CONTROL CHECK IOG03620
IOGENE VALUE=(01,0004,20,R,N,DKRT1-ERPTABLE,D5,999,02,06,02, -IOG03630
02,+8,00,00,01) IOG03640
T18D2 EQU * IOG03650
* INTERFACE CONTROL CHECK IOG03660
IOGENE VALUE=(02,0002,20,R,N,DKRT1-ERPTABLE,D5,998,02,06,02, -IOG03670
02,-8,00,00,02) IOG03680
* CHANNEL DATA CHECK IOG03690
IOGENE VALUE=(03,0008,20,R,S,DKRT3-ERPTABLE,01,997,02,06,02, -IOG03700
02,-8,00,00,03) IOG03710
* UNIT CHECK IOG03720
* IOG03730
* EQUIPMENT CHECK IOG03740
IOGENE VALUE=(04,0200,20,R,S,DKRT3-ERPTABLE,02,799,02,06,02, -IOG03750
02,-8,00,10,06) IOG03760
* NO RECORD FOUND IOG03770
IOGENE VALUE=(05,0200,20,R,C,DKRT7-ERPTABLE,D5,794,02,06,02, -IOG03780
02,-8,01,08,17) IOG03790
* SEEK CHECK IOG03800
IOGENE VALUE=(06,0200,A0,R,C,DKRT10-ERPTABLE,D5,793,02,06,02, -IOG03810
02,-8,00,01,12) IOG03820
* INTERVENTION REQUIRED IOG03830
ERPINTVE EQU * INTERVENTION LOCATION IOG03840
IOGENE VALUE=(07,0200,E0,A,I,DKRT1-ERPTABLE,D5,797,03,06,01, -IOG03850
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 008
AF,-8,00,40,07) IOG03860
* BUS OUT CHECK IOG03870
IOGENE VALUE=(08,0200,20,R,S,DKRT3-ERPTABLE,04,796,02,06,02, -IOG03880
02,-8,00,20,08) IOG03890
* DATA CHECK IOG03900
IOGENE VALUE=(09,0200,20,R,C,DKRT11-ERPTABLE,D5,795,02,06,02, _IOG03910
02,-8,00,08,09) IOG03920
* OVERRUN IOG03930
IOGENE VALUE=(0A,0200,20,R,C,DKRT4-ERPTABLE,D5,792,02,06,02, -IOG03940
02,-8,00,04,11) IOG03950
* MISSING ADDRESS MARKER IOG03960
IOGENE VALUE=(0B,0200,20,R,C,DKRT4-ERPTABLE,D5,791,02,06,02, -IOG03970
02,-8,01,02,17) IOG03980
* COMMAND REJECT IOG03990
IOGENE VALUE=(0C,0200,20,R,N,DKRT1CMR-ERPTABLE,D5,699,02,06, -IOG04000
01,03,-8,00,80,0A) IOG04010
* TRACK CONDITION CHECK IOG04020
IOGENE VALUE=(0D,0200,20,R,S,DKRT6-ERPTABLE,D5,790,02,06,02, -IOG04030
02,-8,00,02,1C) IOG04040
* TRACK OVERRUN IOG04050
IOGENE VALUE=(0E,0200,20,R,N,DKRT1-ERPTABLE,D5,789,02,06,02, -IOG04060
02,-8,01,40,1D) IOG04070
* END OF CYLINDER IOG04080
IOGENE VALUE=(0F,0200,20,R,N,DKRT1-ERPTABLE,D5,788,02,06,02, -IOG04090
02,-8,01,20,1E) IOG04100
* FILE PROTECT IOG04110
IOGENE VALUE=(10,0200,E0,R,N,DKRT1FP-ERPTABLE,D5,787,08, -IOG04120
06,02,03,-8,01,04,14) IOG04130
* CHAINNING CHECK IOG04140
IOGENE VALUE=(11,0001,20,R,C,DKRT10-ERPTABLE,D5,996,02,06,02, -IOG04150
02,-8,00,00,1F) IOG04160
* PROGRAM CHECK IOG04170
IOGENE VALUE=(12,0020,F0,R,N,DKRT1PRG-ERPTABLE,D5,698,02,06, -IOG04180
01,03,-8,00,00,0C) IOG04190
* PROTECTION CHECK IOG04200
IOGENE VALUE=(13,0010,20,R,N,DKRT1-ERPTABLE,D5,697,02,06,01, -IOG04210
03,-8,00,00,0D) IOG04220
* UNIT EXCEPTION IOG04230
IOGENE VALUE=(14,0100,20,R,N,DKRT1-ERPTABLE,D5,786,02,06,02, -IOG04240
02,-8,00,00,0E) IOG04250
* INCORRECT LENGTH IOG04260
IOGENE VALUE=(15,0040,20,R,N,DKRT1-ERPTABLE,D5,696,02,06,01, -IOG04270
02,-8,00,00,0F) IOG04280
* PCI INTERRUPT IOG04290
* PROCESSED IN INTER HANDLING RT IOG04300
* PRESENTLY NOT IMPLEMENTED IOG04310
* IOG04320
* IOG04330
* INTERNAL ERRORS IOG04340
* AND IOG04350
* MESSAGE TYPE ERRORS IOG04360
* AND IOG04370
* DIAGNOSE INST FOR DASD I/O IOG04380
* IOG04390
* REC RT LOAD FAILED:ERR IN IOERR IOG04400
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 009
IOGENE VALUE=(16,0200,20,I,N,DKRT0-ERPTABLE,D5,497,01,06,03, -IOG04410
9F,0,00,1F,16) IOG04420
* TABLE RT LOAD FAILED IOG04430
IOGENE VALUE=(17,0200,20,I,N,DKRT0-ERPTABLE,D5,498,01,06,03, -IOG04440
9F,0,00,2F,16) IOG04450
* DEVICE NOT OPERATIONAL IOG04460
IOGENE VALUE=(18,0200,E0,I,N,DKRT0-ERPTABLE,D5,499,06,06,01, -IOG04470
03,+0,00,3F,1A) IOG04480
* SENSE OPERATION FAILED IOG04490
IOGENE VALUE=(19,0200,20,I,N,DKRT0-ERPTABLE,D5,496,01,06,04, -IOG04500
9F,-8,00,4F,16) IOG04510
* DEVICE NOT LOGGED IN (DASD) IOG04520
IOGENE VALUE=(1A,0200,E0,I,N,DKRT0-ERPTABLE,D5,494,05,06,01, -IOG04530
01,+0,00,5F,20) IOG04540
* CONSOLE RETYPE IOG04550
IOGENE VALUE=(1B,0200,20,I,N,DKRT0-ERPTABLE,D5,493,04,01,02, -IOG04560
FF,-8,00,7F,21) VALID CONSOLE EQUIP CK IOG04570
* DIAGNOSE TYPE I/O IOG04580
IOGENE VALUE=(1C,0200,E0,I,N,DKRT1DIA-ERPTABLE,D5,492,02,07, -IOG04590
05,02,+0,00,6F,22) IOG04600
* NO MATCH ENTRY FOR IOG04610
* NON-EXISTENT ERROR IOG04620
ERPERRE EQU * INVALID IO ERR LOC IOG04630
IOGENE VALUE=(1D,0200,20,R,N,DKRT0-ERPTABLE,D5,490,07, -IOG04640
06,06,DF,+0,00,DF,15) IOG04650
TAB2311E EQU * IOG04660
TAB2314E EQU * IOG04670
* NO MATCH ENTRY FOR IOG04680
* NON-EXISTENT DEVICE TYPE IOG04690
ERPTYPL EQU * INVALID DEV TYPE LOC IOG04700
IOGENE VALUE=(1E,0200,20,R,N,DKRT0-ERPTABLE,D5,491,06,06, -IOG04710
06,8F,+0,00,8F,23) IOG04720
T18T2 EQU * CAL LOC IOG04730
EJECT IOG04740
* DASD RECOVERY PROCEDURES IOG04750
* EXTRN(S) IOG04760
* ENTRY(S) IOG04770
* REGISTER USAGE IOG04780
* SYMBOL EQU REG MEANING IOG04790
* R1 EQU 1 ADT DSECT REG IOG04800
* R2 EQU 2 BASE REG IOG04810
* R8 EQU 8 I/O REG + DIOSECT DSECT IOG04820
* R14 EQU 14 WORK REG1 + BALR1 IOG04830
* R15 EQU 15 WORK REG2 + BALR2 IOG04840
* ALL OTHER REGS AS DEFINED IN IOERR IOG04850
EJECT IOG04860
* IOG04870
DS 0H INSURE INST ALIGN IOG04880
DKRT0 EQU * RETRY 0 TIMES IOG04890
* FOR INTERNAL IOERR ERRORS IOG04900
USING *,R15 IOG04910
ST R14,ERPRTSX3 SAVE RETURN IOG04920
ST R2,ERPRTSY3 SAVE BASE IOG04930
L R2,DKRTBASE INIT BASE IOG04940
DROP R15 IOG04950
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 010
USING ERPTABLE,R2 IOG04960
* IOG04970
MVI EIOCC,X'EF' NO RETRY POSSIBLE IOG04980
MVI ERPEC,X'EF' IOG04990
* IOG05000
* CHECK FOR DEV IOG05010
* NOT OPER = NOT ATTACHED IOG05020
CLI MESISEN2,DVNOTATT IOG05030
BE DKRT01 YES,GO INSERT NOT OPER RET CD IOG05040
* IOG05050
DKRT00 L R2,ERPRTSY3 RESTORE REGS IOG05060
L R14,ERPRTSX3 IOG05070
BR R14 RETURN IOG05080
* IOG05090
DKRT01 EQU * IOG05100
LOCATE PARMS=(MESDKRC,ADDDKRCD,MESDKRCE), -IOG05110
DISP=(MESDKRC,MESDKRC),COMP=ERPDVTYP IOG05120
USING MESDKRCD,R13 IOG05130
MVC RCSUP,MESDKRCV MOVE NOT-OPER RET CD IOG05140
CLI EIOUSER,ERRINERR REQ BY IOERR? IOG05150
BNE DKRT00 NO,ENTER EXIT IOG05160
MVI RCSUP,X'08' DEVICE NOT OPER IOG05170
B DKRT00 ENTER EXIST IOG05180
* IOG05190
* IOG05200
* IOG05210
DKRT1 EQU * RETRY 0 TIMES IOG05220
* LEGITIMATE DASD ERROR IOG05230
USING *,R15 IOG05240
ST R14,ERPRTSX3 SAVE REGS IOG05250
ST R2,ERPRTSY3 IOG05260
L R2,DKRTBASE INIT BASE IOG05270
DROP R15 IOG05280
USING ERPTABLE,R2 IOG05290
* IOG05300
MVI EIOCC,X'EF' NO RETRY POSSIBLE IOG05310
MVI ERPEC,X'EF' IOG05320
* IOG05330
L R2,ERPRTSY3 RESTORE REGS IOG05340
L R14,ERPRTSX3 IOG05350
BR R14 RETURN IOG05360
* IOG05370
* IOG05380
DKRT1PRG EQU * PROG CHECK RT IOG05390
USING *,R15 IOG05400
ST R14,ERPRTSX3 SAVE REGS IOG05410
ST R2,ERPRTSY3 IOG05420
L R2,DKRTBASE INIT BASE IOG05430
DROP R15 IOG05440
USING ERPTABLE,R2 IOG05450
* IOG05460
L R8,ADDSYSRF LOCATE DIOSECT IOG05470
L R8,DDIOSECT(R8) IOG05480
USING DIODSCT,R8 IOG05490
CLI IOCOMM,DKWRITE WRITE OPER IOG05500
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 011
BE DKRT1PG1 YES,CHECK WRT ON READ-0NLY IOG05510
CLI IOCOMM,DKWRITE2 INVALID WRITE OPERATION IOG05520
BE DKRT1FQ YES,INDICATE FILE-PROT ERR IOG05530
CLI IOCOMM,DKWRITE3 INVALID WRITE OPERATION IOG05540
BNE DKRT1PR2 NO,PERM ERROR IOG05550
B DKRT1FQ YES,INDICATE FILE-PROT ERROR IOG05560
DKRT1PG1 EQU * IOG05570
MVI RCSUP,X'06' WRT ON READ-ONLY IOG05580
L R1,R1SAVE IOG05590
USING ADTSECT,R1 IOG05600
* CHECK ADT RD/WRT FLAG IOG05610
TM ADTFLG1,ADTFRW FLAG SET IOG05620
BZ DKRT1PR2 NO IOG05630
NI ADTFLG1,255-ADTFRW YES,CLEAR+SET TO RD-ONLY IOG05640
OI ADTFLG1,ADTFRO IOG05650
DROP R1,R8 IOG05660
DKRT1PR2 EQU * IOG05670
MVI EIOCC,X'EF' NO RETRY POSSIBLE IOG05680
MVI ERPEC,X'EF' IOG05690
L R2,ERPRTSY3 RESTORE REGS IOG05700
L R14,ERPRTSX3 IOG05710
BR R14 RETURN IOG05720
* IOG05730
* IOG05740
DKRT1FP EQU * FILE PROTECT ERROR IOG05750
USING *,R15 IOG05760
ST R14,ERPRTSX3 SAVE REGS IOG05770
ST R2,ERPRTSY3 IOG05780
L R2,DKRTBASE INIT BASE IOG05790
DROP R15 IOG05800
USING ERPTABLE,R2 IOG05810
* IOG05820
* IOG05830
DKRT1FQ EQU * IOG05840
MVI ERPEC,X'EF' NO RETRY POSSIBLE IOG05850
MVI EIOCC,X'EF' IOG05860
LA R1,DUMPLIST DUMP CORE VIA CP FUNC IOG05870
SVC X'CA' IOG05880
DC AL4(DKRT1FQ1) ENSURE ERROR PROCESSING- IOG05890
* ERROR EX. BARE MACHINE IOG05900
* MACHINE SIZE? IOG05910
DKRT1FQ1 EQU * ERROR + NORMAL CONTINUE IOG05920
MEASURE DKCTWORK,MESICTFP,DKONE FP CT = FP+1 IOG05930
* IOG05940
* IOG05950
* NOTE:PRESENTLY CMS TREATS A FILE PROTECT ERROR AS A IOG05960
* REQUEST FOR A CORE DUMP. IOG05970
* NORMAL PROCESSING THEN CONTINUES. IOG05980
* IOG05990
* IOG06000
L R2,ERPRTSY3 RESTORE REGS IOG06010
L R14,ERPRTSX3 IOG06020
BR R14 RETURN IOG06030
* IOG06040
* IOG06050
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 012
* IOG06060
DKRT1DIA EQU * DIAGNOSE CALL ERROR IOG06070
DKRT1CMR EQU * COMMAND REJECT ERROR IOG06080
USING *,R15 IOG06090
ST R14,ERPRTSX3 SAVE REGS IOG06100
ST R2,ERPRTSY3 IOG06110
L R2,DKRTBASE INIT BASE IOG06120
DROP R15 IOG06130
USING ERPTABLE,R2 IOG06140
* IOG06150
CLI EIODIAG+1,DIANOR1W INVALID READ/WRITE OPER IOG06160
BE DKRT1FQ YES,INDICATE FILE-PROT ERROR IOG06170
TM ERPSEN+1,DKFILPRT FILE-PROT ERROR IOG06180
BO DKRT1FQ YES,INDICATE FILE-PROT ERROR IOG06190
* IOG06200
MVI EIOCC,X'EF' NO RETRY POSSIBLE IOG06210
MVI ERPEC,X'EF' IOG06220
* IOG06230
L R2,ERPRTSY3 RESTORE REGS IOG06240
L R14,ERPRTSX3 IOG06250
BR R14 RETURN IOG06260
* IOG06270
* IOG06280
DKRT3 EQU * RETRY 1 TIME IOG06290
USING *,R15 IOG06300
ST R14,ERPRTSX3 SAVE REGS IOG06310
ST R2,ERPRTSY3 IOG06320
L R2,DKRTBASE INIT BASE IOG06330
DROP R15 IOG06340
USING ERPTABLE,R2 IOG06350
* IOG06360
CLI EIOUSER,ERRINERR REQ FROM IOERR? IOG06370
BE DKRT300 YES,BYPASS ERROR REC IOG06380
SR R14,R14 CLEAR R14 IOG06390
STH R14,ERPC1 CLEAR COUNTER 1 IOG06400
DKRT30 EQU * IOG06410
RTCALLER ENTRY=DKUSERIO IOG06420
CLI GRN1ERBY,C'N' RETRY SUCCESSFUL IOG06430
BE DKRT31 YES IOG06440
CLI GRN1ERBY,IMEDSTOP FATAL ERROR? IOG06450
BE DKRT32 YES,BYPASS POSSIBLE 2 MES IOG06460
LH R14,ERPC1 IOG06470
AH R14,HWONE CT = CT + 1 IOG06480
STH R14,ERPC1 SAVE CT IOG06490
CH R14,HWTEN OVER TEN RETRIES IOG06500
BL DKRT30 NO,CONT REC IOG06510
DKRT300 EQU * IOG06520
MVI ERPEC,X'FF' NO,INDICATE PERM ERR IOG06530
MVI EIOCC,X'FF' IOG06540
B DKRT32 IOG06550
DKRT31 EQU * IOG06560
MVI ERPEC,X'00' INDICATE SUC RETRY IOG06570
MVI EIOCC,X'00' IOG06580
DKRT32 EQU * IOG06590
L R2,ERPRTSY3 RESTORE REGS IOG06600
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 013
L R14,ERPRTSX3 IOG06610
BR R14 RETURN IOG06620
* IOG06630
* IOG06640
DKRT4 EQU * RETRY 10 TIMES IOG06650
USING *,R15 IOG06660
ST R14,ERPRTSX3 SAVE REGS IOG06670
ST R2,ERPRTSY3 IOG06680
L R2,DKRTBASE INIT BASE IOG06690
DROP R15 IOG06700
USING ERPTABLE,R2 IOG06710
* IOG06720
CLI EIOUSER,ERRINERR REQ FROM IOERR? IOG06730
BE DKRT415 YES,BYPASS REC IOG06740
DKRT40 EQU * IOG06750
SR R14,R14 IOG06760
STH R14,ERPC1 CLEAR COUNTER IOG06770
DKRT41 EQU * IOG06780
RTCALLER ENTRY=DKUSERIO RETRY REQUESTED OPER IOG06790
CLI GRN1ERBY,C'N' RETRY SUCCESSFUL IOG06800
BE DKRT42 YES IOG06810
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG06820
BE DKRT43 YES,BYPASS POSSIBLE 2 MES IOG06830
LH R14,ERPC1 NO,INCREMENT COUNTER IOG06840
AH R14,HWONE IOG06850
STH R14,ERPC1 IOG06860
CH R14,HWTEN IOG06870
BL DKRT41 RETRY IF LESS THAN 10 IOG06880
DKRT415 EQU * IOG06890
MVI ERPEC,X'FF' PERMANENT ERR IOG06900
MVI EIOCC,X'FF' IOG06910
B DKRT43 IOG06920
DKRT42 EQU * IOG06930
MVI ERPEC,X'00' INDICATE SUCC RETRY IOG06940
MVI EIOCC,X'00' IOG06950
DKRT43 EQU * IOG06960
L R2,ERPRTSY3 RESTORE REGS IOG06970
L R14,ERPRTSX3 IOG06980
BR R14 RETURN IOG06990
* IOG07000
* IOG07010
DKRT6 EQU * TRACK CONDITION CHECK IOG07020
* CMS DOESN'T SUPPORT ALTERNATE IOG07030
* TRACKS;THUS ITS ASSOCIATED ERROR IOG07040
* RECOVERY PROCEDURE IS ALSO IOG07050
* NOT SUPPORTED IOG07060
* IOG07070
USING *,R15 IOG07080
ST R14,ERPRTSX3 SAVE REGS IOG07090
ST R2,ERPRTSY3 IOG07100
L R2,DKRTBASE IOG07110
DROP R15 IOG07120
USING ERPTABLE,R2 IOG07130
* IOG07140
MVI ERPEC,X'EF' IOG07150
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 014
MVI EIOCC,X'EF' NO RETRY POSSIBLE IOG07160
* IOG07170
L R2,ERPRTSY3 RESTORE REGS IOG07180
L R14,ERPRTSX3 IOG07190
BR R14 RETURN IOG07200
* IOG07210
* IOG07220
DKRT7 EQU * NO RECORD FOUND IOG07230
USING *,R15 IOG07240
ST R14,ERPRTSX3 SAVE REGS IOG07250
ST R2,ERPRTSY3 IOG07260
L R2,DKRTBASE INIT BASE IOG07270
DROP R15 IOG07280
USING ERPTABLE,R2 IOG07290
* IOG07300
CLI EIOUSER,ERRINERR REQ FROM IOERR? IOG07310
BE DKRT71 YES,BYPASS ERR REC IOG07320
TM ERPSEN+1,ADMARKER MISSING ADDRESS MARKER IOG07330
BO DKRT7RT8 MARKER PRESENT IOG07340
* MARKER NOT PRESENT IOG07350
DKRT7RT9 EQU * IOG07360
RTCALLER ENTRY=DKRDHOME RD HOME ADDRESS IOG07370
CLI GRN1ERBY,C'Y' NOT SUCC RD HOME ADDRESS IOG07380
BE DKRT71 YES,PERM ERROR IOG07390
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07400
BE DKRT73 YES,BYPASS POSS 2 MES IOG07410
CLC ERPWKFLD(4),ERPSEEK+2 CORRECT(CCHH) CYL+TRACK IOG07420
BE DKRT71 YES,PERM ERROR IOG07430
DKRT7RT5 EQU * IOG07440
RTCALLER ENTRY=DKRECAL RECALIBRATE IOG07450
CLI GRN1ERBY,C'Y' NOT SUCC RECAL IOG07460
BE DKRT71 YES,PERM ERROR IOG07470
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07480
BE DKRT73 BYPASS POSS 2 MES IOG07490
RTCALLER ENTRY=DKSEEK SEEK ORIGINAL ADDRESS IOG07500
CLI GRN1ERBY,C'Y' NOT SUCC SEEK OPERATION IOG07510
BE DKRT71 YES,PERM ERROR IOG07520
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07530
BE DKRT73 BYPASS POSS 2 MES IOG07540
B DKRT40 RETRY REQUESTED OPERATION TEN IOG07550
* TIMES BY DKRT4 IOG07560
* IOG07570
DKRT7RT8 EQU * IOG07580
SR R14,R14 CLEAR RETRY COUNTER IOG07590
STH R14,ERPC1 IOG07600
DKRT70 EQU * IOG07610
RTCALLER ENTRY=DKRECAL RECALIBRATE IOG07620
CLI GRN1ERBY,C'Y' NOT SUCC RECAL OPERATION IOG07630
BE DKRT71 YES,PERM ERROR IOG07640
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07650
BE DKRT73 YES,BYPASS POSS 2 MES IOG07660
RTCALLER ENTRY=DKSEEK SEEK ORIGINAL ADDRESS IOG07670
CLI GRN1ERBY,C'Y' NOT SUCC SEEK OPERATION IOG07680
BE DKRT71 YES,PERM ERROR IOG07690
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07700
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 015
BE DKRT73 YES,BYPASS POSS 2 MES IOG07710
RTCALLER ENTRY=DKUSERIO RETRY REQUESTED I/O IOG07720
CLI GRN1ERBY,C'N' SUCCESSFUL RETRY IOG07730
BE DKRT72 YES IOG07740
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG07750
BE DKRT73 YES,BYPASS POSS 2 MES IOG07760
LH R14,ERPC1 NO,INCREMENT COUNTER IOG07770
AH R14,HWONE IOG07780
STH R14,ERPC1 IOG07790
CH R14,HWTEN IOG07800
BL DKRT70 RETRY IF LESS THAN TEN ATTEMPTS IOG07810
DKRT71 EQU * PERMANENT ERROR IOG07820
MVI ERPEC,X'FF' INDICATE PERM ERROR IOG07830
MVI EIOCC,X'FF' IOG07840
B DKRT73 IOG07850
DKRT72 EQU * SUCCESSFUL I/O RECOVERY IOG07860
MVI ERPEC,X'00' INDICATE SUCC RECOVERY IOG07870
MVI EIOCC,X'00' IOG07880
DKRT73 EQU * IOG07890
L R2,ERPRTSY3 RESTORE REGS IOG07900
L R14,ERPRTSX3 IOG07910
BR R14 RETURN IOG07920
* IOG07930
* IOG07940
DKRT10 EQU * SEEK CHECK IOG07950
USING *,R15 IOG07960
ST R14,ERPRTSX3 SAVE REGS IOG07970
ST R2,ERPRTSY3 IOG07980
L R2,DKRTBASE INIT BASE IOG07990
DROP R15 IOG08000
USING ERPTABLE,R2 IOG08010
* IOG08020
TM ERPSEN,COMMDREJ COMMAND REJECT? IOG08030
BO DKRT101 YES,PERMANT ERROR IOG08040
CLI EIOUSER,ERRINERR REQ FROM IOERR IOG08050
BE DKRT102 YES,BYPASS REC IOG08060
B DKRT7RT5 NO,PERFORM REC-RT5 IN REC-RT7 IOG08070
* NOTE: NEXT INSTRUCTIONS WILL BE USED WHEN CP-DIAGNOSE RETRY IS IOG08080
* IMPLEMENTED.PRESENTLY,CMS PERFORMS DIAGNOSE ERROR RECOVERY. IOG08090
* TM MESICASE,DIAREC DIAG RECOVERY IOG08100
* BZ DKRT7RT5 NO,PERFORM REC-RT5 IN REC-RT7 IOG08110
* TM MESICASE,DIAPROC DIAG PROCEDURE ALLOWED IOG08120
* BO DKRT7RT5 YES,PERFORM RECOVERY PROCEDURE 5 IOG08130
* IN PROCEDURE 7 IOG08140
* B DKRT102 PERM ERR,BUT BYPASS SUP RET CD IOG08150
DKRT101 EQU * IOG08160
MVI RCSUP,X'05' SENSE BYTE X'81' ERROR RETURN IOG08170
DKRT102 EQU * IOG08180
MVI EIOCC,X'FF' INDICATE PERMANENT ERROR IOG08190
MVI ERPEC,X'FF' IOG08200
* IOG08210
L R2,ERPRTSY3 RESTORE REGS IOG08220
L R14,ERPRTSX3 IOG08230
BR R14 RETURN IOG08240
* IOG08250
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 016
* IOG08260
* IOG08270
DKRT11 EQU * DATA CHECK IOG08280
USING *,R15 IOG08290
ST R14,ERPRTSX3 SAVE REGS IOG08300
ST R2,ERPRTSY3 IOG08310
L R2,DKRTBASE INIT BASE IOG08320
DROP R15 IOG08330
USING ERPTABLE,R2 IOG08340
* IOG08350
CLI EIOUSER,ERRINERR REQ BY IOERR IOG08360
BE DKRT1145 YES,BYPASS ERR REC IOG08370
SR R14,R14 CLEAR COUNTER IOG08380
STH R14,ERPC1 IOG08390
DKRT112 EQU * IOG08400
CLC ERPC1,HW256 256TH RETRY IOG08410
BH DKRT114 YES,PERMANENT ERROR IOG08420
RTCALLER ENTRY=DKUSERIO RETRY REQUSETED IO IOG08430
CLI GRN1ERBY,C'N' SUCCESSFUL IO IOG08440
BE DKRT115 YES IOG08450
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRY FOR IOERR IOG08460
BE DKRT116 YES,BYPASS POSS 2 MES IOG08470
LH R14,ERPC1 NO IOG08480
AH R14,HWONE INCREMENT COUNTER IOG08490
STH R14,ERPC1 IOG08500
TM ERPC1+1,X'0F' 16TH RETRY? IOG08510
BZ DKRT113 YES,RECALIBRATE+SEEK IOG08520
B DKRT112 NO,RETRY AGAIN IOG08530
DKRT113 EQU * IOG08540
RTCALLER ENTRY=DKRECAL RECALIBRATE IOG08550
CLI GRN1ERBY,C'N' SUCC RECAL OPERATION IOG08560
BNE DKRT114 NO,PERM ERROR IOG08570
RTCALLER ENTRY=DKSEEK SEEK ORIGINAL CYL IOG08580
CLI GRN1ERBY,C'N' SUCC SEEK OPERATION IOG08590
BE DKRT112 YES,CONTINUE REC PROCEDURE IOG08600
DKRT114 EQU * IOG08610
CLI GRN1ERBY,IMEDSTOP FATAL ERR IN RETRTY FOR IOERR IOG08620
BE DKRT116 YES,BYPASS POSS 2 MES IOG08630
DKRT1145 EQU * IOG08640
MVI ERPEC,X'FF' INDICATE PERMANENT ERROR IOG08650
MVI EIOCC,X'FF' IOG08660
B DKRT116 IOG08670
DKRT115 EQU * IOG08680
MVI EIOCC,X'00' INDICATE SUCCESSFUL RETRY IOG08690
MVI ERPEC,X'00' IOG08700
DKRT116 EQU * IOG08710
L R2,ERPRTSY3 RESTORE REGS IOG08720
L R14,ERPRTSX3 IOG08730
BR R14 RETURN IOG08740
* IOG08750
* DASD SUBROUTINES IOG08760
* IOG08770
DKUSERIO EQU * PERFORM USER REQUESTED IO IOG08780
ST R14,ERPRTSL1 SAVE RET ADDRESS IOG08790
DKUSER0 EQU * IOG08800
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 017
MVC ERPADSEN,ERPCAW MOVE USES'S CAW TO WORK AREA IOG08810
XC CSW(8),CSW CLEAR CSW IOG08820
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPCAW RETRY IOG08830
BC 8,DKUSER3 SUCESSFUL START? IOG08840
RTCALLER ENTRY=DKSIOER IOG08850
DKUSER1 EQU * IOG08860
CLI GRN1ERBY,ERRRETRY REC RETRY OK? IOG08870
BE DKUSER0 YES,RETRY IOG08880
DKUSER2 EQU * IOG08890
L R14,ERPRTSL1 RESTORE RET LOC IOG08900
BR R14 RET TO CALLER IOG08910
DKUSER3 EQU * IOG08920
MVC ERPWTDEV,ERPDEVN INIT WAIT LIST IOG08930
RTCALLER PARM=ERPWT,ENTRY=ERPADDWT WAIT FOR IO COMPLETION IOG08940
CLI GRN1ERBY,X'D5' ANY IO ERRORS? IOG08950
BC 8,DKUSER2 NO,RETURN TO CALLER WITH IOG08960
* RET CODE SET BY ERPINTD IOG08970
RTCALLER ENTRY=DKCIOER YES,AT LEAST 1 ERROR IOG08980
B DKUSER1 ENTER EXIT IOG08990
* IOG09000
* IOG09010
* IOG09020
DKRDHOME EQU * READ HOME ADDRESS IOG09030
ST R14,ERPRTSL1 SAVE RET ADDRESS IOG09040
SR R14,R14 CLEAR R14 IOG09050
STH R14,ERPC2 CLEAR COUNTER 2 IOG09060
DKRD0 EQU * IOG09070
MVC ERPFPOP(8),DKFPOPER MOVE SSM OPER IOG09080
MVC ERPSENOP(16),DKRDHA INIT HOME OPERATION IOG09090
LA R14,ERPSENIN IOG09100
ST R14,ERPSENOP IOG09110
LA R14,ERPFPOP IOG09120
ST R14,ERPADSEN IOG09130
MVC ERPSENOP(1),DKRDHA REINIT OP CODE IOG09140
DKRD00 EQU * IOG09150
CLC ERPC2,HWTEN OVER TEN RETRIES? IOG09160
BNH DKRD000 NO IOG09170
MVI GRN1ERBY,C'Y' YES,INDICATE ERROR IOG09180
B DKRD11 ENTER RET LOGIC IOG09190
DKRD000 EQU * IOG09200
XC CSW(8),CSW IOG09210
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPADSEN IOG09220
BC 8,DKRD3 SUCCESSFUL START? IOG09230
RTCALLER ENTRY=DKSIOER IOG09240
DKRD1 EQU * IOG09250
CLI GRN1ERBY,ERRRETRY REC RETRY OK? IOG09260
BE DKRD00 YES,RETRY IOG09270
LH R14,ERPC2 IOG09280
AH R14,HWONE CT = CT + 1 IOG09290
STH R14,ERPC2 SAVE CT IOG09300
B DKRD00 CHECK CT'S VALUE IOG09310
DKRD11 EQU * ERROR ENTRY PT IOG09320
MEASURE DKCTWORK,MESICTHF,DKONE RD-HM=RD-HM+1 IOG09330
DKRD2 EQU * IOG09340
L R14,ERPRTSL1 RESTORE RET LOC IOG09350
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 018
BR R14 RETURN TO CALLER IOG09360
DKRD3 EQU * IOG09370
MVC ERPWTDEV,ERPDEVN INIT WAIT LIST IOG09380
RTCALLER PARM=ERPWT,ENTRY=ERPADDWT WAIT FOR IO COMPLETION IOG09390
MVC ERPWKFLD(4),ERPSENIN+1 MOVE HOME ADDRESS TO IOG09400
* ERROR QUEUE,EXCLUDING FLAG IOG09410
CLI GRN1ERBY,X'D5' ANY IO ERRORS IOG09420
BC 8,DKRD2 NO,RETURN TO CALLER WITH IOG09430
* RET CODE SET BY ERPINTD IOG09440
RTCALLER ENTRY=DKCIOER YES,AT LEAST 1 ERROR IOG09450
B DKRD1 ENTER CHECK ROUTINE IOG09460
* IOG09470
* IOG09480
DKRECAL EQU * RECALIBRATE IOG09490
ST R14,ERPRTSL1 SAVE RET LOC IOG09500
SR R14,R14 CLEAR R14 IOG09510
STH R14,ERPC2 CLEAR COUNTER 2 IOG09520
DKRE0 EQU * IOG09530
MVC ERPFPOP(8),DKFPOPER INIT SSM OPER IOG09540
MVC ERPSENOP(16),DKRECL INIT RECAL OPER IN FREE STOR IOG09550
* LA R14,ERPSENIN IOG09560
* ST R14,ERPSENOP IOG09570
LA R14,ERPFPOP IOG09580
ST R14,ERPADSEN IOG09590
* MVC ERPSENOP(1),DKRECL REINIT RECAL OP IOG09600
DKRE00 EQU * IOG09610
CLC ERPC2,HWTEN OVER TEN RETRIES IOG09620
BNH DKRE000 NO IOG09630
MVI GRN1ERBY,C'Y' YES,INDICATE ERROR IOG09640
B DKRE11 ENTER RET LOGIC IOG09650
DKRE000 EQU * IOG09660
XC CSW(8),CSW CLEAR CSW IOG09670
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPADSEN IOG09680
BC 8,DKRE3 SUCESSFUL START? IOG09690
RTCALLER ENTRY=DKSIOER IOG09700
DKRE1 EQU * IOG09710
CLI GRN1ERBY,ERRRETRY REC RETRY OK? IOG09720
BE DKRE00 YES,RETRY IOG09730
LH R14,ERPC2 IOG09740
AH R14,HWONE CT = CT + 1 IOG09750
STH R14,ERPC2 SAVE CT IOG09760
B DKRE00 CHECK CT'S VQLUE IOG09770
DKRE11 EQU * ERROR ENTRY POINT IOG09780
MEASURE DKCTWORK,MESICTRF,DKONE RF=RF+1 IOG09790
DKRE2 EQU * IOG09800
L R14,ERPRTSL1 RESTORE RET LOC IOG09810
BR R14 RETURN TO CALLER IOG09820
DKRE3 EQU * IOG09830
MVC ERPWTDEV,ERPDEVN INIT WAIT LIST IOG09840
RTCALLER PARM=ERPWT,ENTRY=ERPADDWT WAIT FOR IO COMPLETION IOG09850
CLI GRN1ERBY,X'D5' ANY IOERRORS IOG09860
BC 8,DKRE2 NO, RETURN TO CALLER WITH IOG09870
* RET CODE SET BY ERPINTD IOG09880
RTCALLER ENTRY=DKCIOER YES,AT LEAST 1 ERROR IOG09890
B DKRE1 ENTER CHECK ROUTINE IOG09900
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 019
* IOG09910
* IOG09920
DKSEEK EQU * SEEK OPERATION IOG09930
* TEMP FIX IOG09940
* IOG09950
MVI GRN1ERBY,C'N' DUMMY- IOG09960
BR R14 OPERATION IOG09970
* IOG09980
* IOG09990
ST R14,ERPRTSL1 SAVE RET LOC IOG10000
MVC ERPFPOP(8),DKFPOPER INIT SSM OPER IOG10010
MVC ERPSENOP(16),DKSK INIT SEEK IN FREE STOR IOG10020
LA R14,ERPSEEK IOG10030
ST R14,ERPSENOP IOG10040
LA R14,ERPFPOP IOG10050
ST R14,ERPADSEN IOG10060
MVC ERPSENOP(1),DKSK REINIT SEEK OPER CODE IOG10070
DKSK0 EQU * RETRY POINT IOG10080
XC CSW(8),CSW CLEAR CSW IOG10090
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPADSEN IOG10100
BC 8,DKSEEK3 SUCCESSFUL START? IOG10110
RTCALLER ENTRY=DKSIOER IOG10120
DKSK1 EQU * IOG10130
CLI GRN1ERBY,ERRRETRY REC RETRY OK? IOG10140
BE DKSK0 YES,RETRY IOG10150
MEASURE DKCTWORK,MESICTSF,DKONE SEEK FAIL=SF+1 IOG10160
DKSK2 EQU * IOG10170
L R14,ERPRTSL1 RESTORE RET LOC IOG10180
BR R14 RETURN TO CALLER IOG10190
DKSEEK3 EQU * IOG10200
MVC ERPWTDEV,ERPDEVN INIT WAIT LIST IOG10210
RTCALLER PARM=ERPWT,ENTRY=ERPADDWT WAIT FOR IO COMPLETION IOG10220
CLI GRN1ERBY,X'D5' ANY IO ERRORS IOG10230
BC 8,DKSK2 NO, RETURN TO CALLER WITH IOG10240
* RETURN CODE SET BY ERPINTD IOG10250
RTCALLER ENTRY=DKCIOER YES,AT LEAST 1 ERROR IOG10260
B DKSK1 ENTER CHECK ROUTINE IOG10270
* IOG10280
* IOG10290
* IOG10300
* IOG10310
* NOTE:ERROR IN IOERR INITIATES ANOTHER CALL TO IOERR. IOG10320
* REG USAGE AND USING IOG10330
DROP R4 IOG10340
USING EIOPL,R1 INIT NEW EIOPL DSCET REG IOG10350
* USING GRN1EXTD,R6 INIT IN ENTRY IOG10360
USING DIODSCT,R8 IOG10370
* IOG10380
DKSIOER EQU * IOG10390
ST R14,ERPRTSL2 SAVE RET LOC IOG10400
L R8,ADDSYSRF IOG10410
L R8,DDIOSECT(R8) LOCATE DIOSECT IOG10420
* BALR R14,R0 R14 CONTAINS CC FROM ENTRY IOG10430
ST R14,SAVECC SIO CC TO DIOSECT IOG10440
* L R6,R2SAVE INIT BY IOERRSUP IOG10450
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 020
BAL R14,BUILDPAR CREATE PARM LIST IOG10460
MVC EIOTYPE,DKESIO TYPE TO LIST IOG10470
MVC EIOSIOCC,SAVECC CC TO LIST IOG10480
MVC EIOCSW,CSW CSW TO LIST IOG10490
* (FOR SYSTEM INTEGRITY) IOG10500
MVI GRN1ERBY,DKERROR IOG10510
MVC GRN1CSW,CSW FLDS TO DEV EXT TAB IOG10520
MVC DIOCSW(8),CSW CSW TO DIOSECT IOG10530
MVC GRN1PSW,DKEPSW1 IOG10540
MEASURE DKCTWORK,MESICTBF,DKONE IOG10550
* IOG10560
B PROCENT IOG10570
* IOG10580
* IOG10590
DKCIOER EQU * IOG10600
ST R14,ERPRTSL2 SAVE RET LOC IOG10610
L R8,ADDSYSRF IOG10620
L R8,DDIOSECT(R8) LOCATE DIOSECT IOG10630
BAL R14,BUILDPAR CREATE PARM LIST IOG10640
MVC EIOTYPE,DKECIO TYPE TO LIST IOG10650
MVC EIOCSW,GRN1CSW IOG10660
MEASURE DKCTWORK,MESICTEF,DKONE IOG10670
* IOG10680
PROCENT EQU * IOG10690
L R15,ADDSYSRF IOG10700
L R15,DIOERRSP(R15) LOCATE IOERRSUP IOG10710
BALR R14,R15 ENTER IOERRSUP IOG10720
* IOG10730
ESIORET EQU * IOG10740
ECIORET EQU * IOG10750
CLI EIOCC,URETRY DEVICE AVAILABLE IOG10760
BE ESIOREP YES,ALLOW RETRY IOG10770
CLI EIOCC,NOERRMES DEVICE NOT AVAILABLE IOG10780
BE EFATAL2 YES IOG10790
CLI EIOCC,ENOTATT DEVICE NOT ATTACHED IOG10800
BE EFATAL1 YES IOG10810
ENOKERR EQU * IOG10820
* ALL OTHERS ERRORS IOG10830
MVI GRN1ERBY,C'Y' IO ERR IN IOERR IOG10840
EGENRET EQU * IOG10850
BAL R14,STORREL RELEASE FREE STORAGE IOG10860
L R14,ERPRTSL2 RESTORE RET LOC IOG10870
BR R14 RETURN TO CALLER IOG10880
ESIOREP EQU * IOG10890
MVI GRN1ERBY,ERRRETRY RETRY ALLOWED IOG10900
B EGENRET ENTER EXIT IOG10910
EFATAL1 EQU * IOG10920
MVI EIOCC-EIOBEG(R4),X'03' SET EXPECTED RET CODE IOG10930
MVI RCSUP,X'03' IOG10940
MVI ERPEC,X'00' DUMMY SUCCESS STATUS TO - IOG10950
* PREVENT DOUBLE MESSAGE IOG10960
B EFATAL12 COMBINED RET LOGIC IOG10970
EFATAL2 EQU * IOG10980
MVC EIOCC-EIOBEG(1,R4),MESIRET SET RET CODE IOG10990
MVC RCSUP,MESIRET IOG11000
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 021
MVI ERPEC,X'00' DUMMY SUCCESS STATUS TO- IOG11010
* PREVENT DOUBLE MESSAGE IOG11020
EFATAL12 EQU * IOG11030
MVI GRN1ERBY,IMEDSTOP SET STATUS TO FATAL ERR IOG11040
B EGENRET ENTER EXIT IOG11050
* IOG11060
BUILDPAR EQU * IOG11070
ST R14,ERPRTSL3 SAVE RET LOC IOG11080
L R0,EIOPLLEN IOG11090
L R15,ADDSYSRF SETUP CORE-REQ FOR LIST IOG11100
L R15,DFREE(R15) IOG11110
BALR R14,R15 ENTER FREE IOG11120
MVI EIOBEG,X'00' CLEAR LIST AREA IOG11130
MVC EIOBEG+1(EIOREGS+1-EIOBEG),EIOBEG IOG11140
* USE FLDS IN ORIGINAL LIST- IOG11150
* ADDRESSED BY R4 IOG11160
MVC EIODEVA,EIODEVA-EIOBEG(R4) IOG11170
MVC EIOCAW,ERPADSEN DEBUG STRING HAS BEEN- IOG11180
* LINKED IOG11190
MVC EIOUSER,EDKSYS USER = C'ER' IOG11200
ST R6,EIODTEXT DEV EXT TO LIST IOG11210
MVC EIOSEEK,ERPSEEK IOG11220
MVC EIODEVN,EIODEVN-EIOBEG(R4) IOG11230
MVC EIODVTYP,EIODVTYP-EIOBEG(R4) IOG11240
L R14,ERPRTSL3 RESTORE RET LOC IOG11250
BR R14 RETURN TO CALLER IOG11260
* IOG11270
STORREL EQU * IOG11280
ST R14,ERPRTSL3 SAVE RET LOC IOG11290
* CHECK FOR NO MESSAGE- IOG11300
* PRINTED DUE TO CONSOLE ERROR IOG11310
SR R15,R15 CLEAR R15 IOG11320
C R15,EIOMESLN NO MESSAGE PRESENT? IOG11330
BE STORREL2 YES,BYPASS MES-CORE RELEASE IOG11340
* AN UNTYPED MESSAGE IS PRESENT IOG11350
ST R1,DOUBLE SAVE REG1 IOG11360
L R0,EIOMESLN CAL MES KORE IOG11370
SR R1,R1 IOG11380
LA R1,32 IOG11390
AR R0,R1 MES CORE IOG11400
S R1,FP64 REG1=-32 IOG11410
A R1,EIOMESAD CAL OF MES LOC IOG11420
L R15,ADDSYSRF IOG11430
L R15,DFRET(R15) IOG11440
BALR R14,R15 ENTER FRET IOG11450
L R1,DOUBLE RESTORE R1 IOG11460
STORREL2 EQU * IOG11470
* RELEASE EIOPL IOG11480
L R0,EIOPLLEN R0 = D-WORDS TO RET TO FREE IOG11490
* R1 = AREA TO RETURN IOG11500
L R15,ADDSYSRF IOG11510
L R15,DFRET(R15) IOG11520
BALR R14,R15 ENTER FRET IOG11530
L R14,ERPRTSL3 RESTORE RET LOC IOG11540
BR R14 RETURN TO CALLER IOG11550
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 022
* REG CLEANUP IOG11560
DROP R1 IOG11570
USING EIOPL,R4 RESTORE EIOPL DSECT TO R4 IOG11580
EJECT IOG11590
* DKRT'S CONSTANTS,EQUS,ADDRESSES IOG11600
* CONSTANTS IOG11610
HWONE DC H'1' INCREMENT BY 1 IOG11620
DKCTWORK DC H'0' STAT WORK AREA IOG11630
DKONE DC H'1' STAT INCRE BY ONE IOG11640
HWTEN DC H'30' TEN CONSTANT IOG11650
HW16 DC H'16' 16 CONSTANT IOG11660
HW256 DC H'256' 256 IOG11670
FP64 DC F'64' DECREMENT 64 IOG11680
EIOPLLEN DC F'16' D-WORDS FOR IOERR CALLING LIST IOG11690
* IOG11700
DS 0D IOG11710
DUMPLIST DC CL8'CPFUNCTN' IOG11720
DC CL8'NOMSG' IOG11730
DC C'DUMP 00-FFFFFF G0-15 PSW' IOG11740
* TREAT AS MAX MACHINE-SIZE IOG11750
DC X'FF' FENSE. IOG11760
* IOG11770
DKESIO DC CL4'SIOE' IOG11780
EDKSYS DC CL2'ER' IOERR RQE STATUS IOG11790
DKECIO DC CL4'CIOE' IOG11800
DKEPSW1 DC XL1'00' IOG11810
DC CL4'SIOE' IOG11820
DC AL3(ERPTABLE) IOG11830
* IOG11840
DKRDHA CCW X'1A',DKRDHA,X'60',5 CCW TO READ HOME ADDRESS IOG11850
CCW X'03',0,X'20',1 NOP CCW IOG11860
DKRECL CCW X'13',0,X'60',1 CCW TO RECALIBRATE IOG11870
CCW X'03',0,X'20',1 NOP CCW IOG11880
DKSK CCW X'07',DKSK,X'60',6 CCW TO SEEK ORIGINAL CYL+TRACK IOG11890
CCW X'03',0,X'20',1 NOP CCW IOG11900
DKFPOPER CCW X'1F',DKFPKY,X'60',1 CCW TO SSM IOG11910
DKSEN CCW X'04',DKSEN,X'60',6 CCW TO SENSE IOG11920
CCW X'03',0,X'20',1 NOP CCW IOG11930
* IOG11940
DKFPKY DC B'10000000' NO WRITE CT-KEY-DATA(NOR+SPEC) IOG11950
* IOG11960
* EQU'S IOG11970
*SYMBOL EQU VALUE MEANING IOG11980
ADMARKER EQU X'02' MISSING ADDRESS MARKER CONDITION IOG11990
COMMDREJ EQU X'80' COMMAND REJECT CONDITION IOG12000
DKWRITE EQU X'05' WRITE OPERATION CONDITION IOG12010
URETRY EQU X'AF' DEVICE AVAILABLE IOG12020
NOERRMES EQU X'BF' DEVICE NOT AVAILABLE IOG12030
ENOTATT EQU X'08' DEVICE NOT ATTACHED- IOG12040
* IOERR INTERNAL CODE IOG12050
IMEDSTOP EQU C'F' FATAL ERROR(DEVICE NOT- IOG12060
* AVAILABLE) IN RETRY FOR IOERR IOG12070
ERRRETRY EQU C'R' ERROR RETRY ALLOWED IOG12080
DKWRITE2 EQU X'1D' INVALID WRT CT-KEY-DATA OPER IOG12090
DKWRITE3 EQU X'01' INVALID SPEC WRT CT-KEY-DATA IOG12100
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 023
DIAREC EQU X'80' DIAG REC OK IOG12110
DIAPROC EQU X'40' DIAG PROC OK IOG12120
DKFILPRT EQU X'04' FILE-PROT ERROR IOG12130
DIANOR1W EQU X'05' CCW NEITHER RD(06) OR WRT(05) IOG12140
* IOG12150
* ADDRESSES IOG12160
* ADDIOERS DC A(IOERRSUP) ENTRY PT OF IOERR IOG12170
* ADDFREE3 DC A(FREE) FREE RT IOG12180
* ADDFRET3 DC A(FRET) FRET RT IOG12190
DKRTBASE DC A(ERPTABLE) BASE VALUE FOR REC PROCEDURES IOG12200
ADDSYSRF DC A(SYSREF) SYSREF ADDRESS FOR IOG12210
* LOCATING DIOSECT IOG12220
* AND IOG12230
* ALL SYSTEM ROUTINE ADDRESSES IOG12240
EJECT IOG12250
AIF ('&TABTYPE' EQ 'IOFRTAB').CONT2 IOG12260
AIF ('&TABTYPE' EQ 'IOMACTAB').CONT3 IOG12270
.* MNOTE 1,'IONUTAB EXPANSION' IOG12280
AGO .BYPASS IOG12290
.CONT2 ANOP IOG12300
.* MNOTE 1,'IOFRTAB EXPANSION' IOG12310
AGO .CONT4 IOG12320
.CONT3 ANOP IOG12330
.* MNOTE 1,'IOMACTAB EXPANSION' IOG12340
.CONT4 ANOP IOG12350
* 1403 PRINTER RECOVERY TABLE IOG12360
DS 0D ALIGN TAB IOG12370
TAB1403 EQU * IOG12380
* CHARACTERISTICS IOG12390
ADDT48L DC CL4'****' TAB SEPERATOR IOG12400
ADDT48N DC AL2((T48TB2-T48TB1)/(T48DT2-T48DT1)) NO OF ENTRIES IOG12410
ADDT48D DC AL2(T48DT2-T48DT1) SIZE OF AN ENTRY IOG12420
ADDT48T DC AL2(T48TB2-T48TB1) SIZE OF TABLE IOG12430
ADDT48S DC AL2(L'T48SN) NO OF SENSE INFO IOG12440
* ENTRIES IOG12450
T48TB1 EQU * CALCULATION (CAL) LOCATION (LOC) IOG12460
T48DT1 EQU * CAL LOC IOG12470
DC XL1'01' IOG12480
DC XL2'0004' CHANNEL CONTROL CHECK IOG12490
DC XL1'20' IOG12500
DC CL1'R' IOG12510
DC CL1'N' IOG12520
DC AL2(PRNNRT2-ERPTABLE) DO NOT RETRY IOG12530
DC XL1'D5' IOG12540
DC PL2'999' IOG12550
DC XL1'02' IOG12560
DC XL1'06' IOG12570
DC XL1'02' IOG12580
DC XL1'05' IOG12590
DC FL1'+8' IOG12600
DC XL1'00' IOG12610
T48SN DC XL1'00' IOG12620
DC XL1'01' IOG12630
DC XL1'00' IOG12640
DC 9XL2'0000' IOG12650
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 024
T48DT2 EQU * IOG12660
DC XL1'02' IOG12670
DC XL2'0002' INTERFACE CONTROL CHECK IOG12680
DC XL1'20' IOG12690
DC CL1'R' IOG12700
DC CL1'N' IOG12710
DC AL2(PRNNRT2-ERPTABLE) DO NOT RETRY IOG12720
DC XL1'D5' IOG12730
DC PL2'998' IOG12740
DC XL1'02' IOG12750
DC XL1'06' IOG12760
DC XL1'02' IOG12770
DC XL1'05' IOG12780
DC FL1'-8' IOG12790
DC XL1'00' IOG12800
DC XL1'00' IOG12810
DC XL1'02' IOG12820
DC XL1'00' IOG12830
DC 9XL2'0000' IOG12840
DC XL1'03' IOG12850
DC XL2'0008' CHANNEL DATA CHECK IOG12860
DC XL1'20' IOG12870
DC CL1'R' IOG12880
DC CL1'N' IOG12890
DC AL2(PRNNRT2-ERPTABLE) IOG12900
DC XL1'01' IOG12910
DC PL2'997' IOG12920
DC XL1'02' IOG12930
DC XL1'06' IOG12940
DC XL1'02' IOG12950
DC XL1'05' IOG12960
DC FL1'-8' IOG12970
DC XL1'00' IOG12980
DC XL1'00' IOG12990
DC XL1'03' IOG13000
DC XL1'00' IOG13010
DC 9XL2'0000' IOG13020
DC XL1'04' IOG13030
DC XL2'8000' SHOULD NOT OCCUR IOG13040
DC XL1'20' IOG13050
DC CL1'R' IOG13060
DC CL1'N' IOG13070
DC AL2(PRNNRT2-ERPTABLE) IOG13080
DC XL1'D5' IOG13090
DC PL2'899' IOG13100
DC XL1'02' IOG13110
DC XL1'06' IOG13120
DC XL1'02' IOG13130
DC XL1'05' IOG13140
DC FL1'-8' IOG13150
DC XL1'00' IOG13160
DC XL1'00' IOG13170
DC XL1'04' IOG13180
DC XL1'00' IOG13190
DC 9XL2'0000' IOG13200
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 025
DC XL1'04' IOG13210
DC XL2'4000' SHOULD NOT OCCUR IOG13220
DC XL1'20' IOG13230
DC CL1'R' IOG13240
DC CL1'N' IOG13250
DC AL2(PRNNRT2-ERPTABLE) IOG13260
DC XL1'D5' IOG13270
DC PL2'899' IOG13280
DC XL1'02' IOG13290
DC XL1'06' IOG13300
DC XL1'02' IOG13310
DC XL1'05' IOG13320
DC FL1'-8' IOG13330
DC XL1'00' IOG13340
DC XL1'00' IOG13350
DC XL1'04' IOG13360
DC XL1'00' IOG13370
DC 9XL2'0000' IOG13380
DC XL1'04' IOG13390
DC XL2'2000' SHOULD NOT OCCUR IOG13400
DC XL1'20' IOG13410
DC CL1'R' IOG13420
DC CL1'N' IOG13430
DC AL2(PRNNRT2-ERPTABLE) IOG13440
DC XL1'D5' IOG13450
DC PL2'899' IOG13460
DC XL1'02' IOG13470
DC XL1'06' IOG13480
DC XL1'02' IOG13490
DC XL1'05' IOG13500
DC FL1'-8' IOG13510
DC XL1'00' IOG13520
DC XL1'00' IOG13530
DC XL1'04' IOG13540
DC XL1'00' IOG13550
DC 9XL2'0000' IOG13560
DC XL1'04' IOG13570
DC XL2'0001' SHOULD NOT OCCUR IOG13580
DC XL1'20' IOG13590
DC CL1'R' IOG13600
DC CL1'N' IOG13610
DC AL2(PRNNRT2-ERPTABLE) IOG13620
DC XL1'D5' IOG13630
DC PL2'899' IOG13640
DC XL1'02' IOG13650
DC XL1'06' IOG13660
DC XL1'02' IOG13670
DC XL1'05' IOG13680
DC FL1'-8' IOG13690
DC XL1'00' IOG13700
DC XL1'00' IOG13710
DC XL1'04' IOG13720
DC XL1'00' IOG13730
DC 9XL2'0000' IOG13740
* X'05' = ASSUME UNIVERSAL CHAR IOG13750
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 026
DC XL1'06' IOG13760
DC XL2'0200' SHOULD NOT OCCUR - UNUSUAL COMMAND SEQ IOG13770
DC XL1'20' IOG13780
DC CL1'R' IOG13790
DC CL1'N' IOG13800
DC AL2(PRNNRT2-ERPTABLE) IOG13810
DC XL1'D5' IOG13820
DC PL2'899' IOG13830
DC XL1'02' IOG13840
DC XL1'06' IOG13850
DC XL1'02' IOG13860
DC XL1'01' IOG13870
DC FL1'-8' IOG13880
DC XL1'00' IOG13890
DC XL1'02' IOG13900
DC XL1'04' IOG13910
DC XL1'00' IOG13920
DC 9XL2'0000' IOG13930
DC XL1'07' IOG13940
DC XL2'0200' EQUIPMENT CHECK IOG13950
DC XL1'20' IOG13960
DC CL1'R' IOG13970
DC CL1'N' IOG13980
DC AL2(PRNNRT2-ERPTABLE) IOG13990
DC XL1'02' IOG14000
DC PL2'799' IOG14010
DC XL1'02' IOG14020
DC XL1'06' IOG14030
DC XL1'02' IOG14040
DC XL1'01' IOG14050
DC FL1'-8' IOG14060
DC XL1'00' IOG14070
DC XL1'10' IOG14080
DC XL1'06' IOG14090
DC XL1'00' IOG14100
DC 9XL2'0000' IOG14110
DC XL1'08' IOG14120
DC XL2'0200' UNIT CHECK IOG14130
DC XL1'20' CODE GEN. STOR. PARITY ERROR IOG14140
DC CL1'R' IOG14150
DC CL1'N' IOG14160
DC AL2(PRNNRT2-ERPTABLE) IOG14170
DC XL1'03' IOG14180
DC PL2'798' IOG14190
DC XL1'02' IOG14200
DC XL1'06' IOG14210
DC XL1'02' IOG14220
DC XL1'01' IOG14230
DC FL1'-8' IOG14240
DC XL1'00' IOG14250
DC XL1'04' IOG14260
DC XL1'24' IOG14270
DC XL1'00' IOG14280
DC 9XL2'0000' IOG14290
DC XL1'09' IOG14300
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 027
DC XL2'0200' UNIT CHECK IOG14310
DC XL1'20' INTERVENTION REQUIRED IOG14320
DC CL1'A' IOG14330
DC CL1'I' IOG14340
DC AL2(PRNNRT2-ERPTABLE) IOG14350
DC XL1'D5' IOG14360
DC PL2'797' IOG14370
DC XL1'03' IOG14380
DC XL1'06' IOG14390
DC XL1'01' IOG14400
DC XL1'AF' IOG14410
DC FL1'-8' IOG14420
DC XL1'00' IOG14430
DC XL1'40' IOG14440
DC XL1'07' IOG14450
DC XL1'00' IOG14460
DC 9XL2'0000' IOG14470
DC XL1'0A' IOG14480
DC XL2'0200' UNIT CHECK IOG14490
DC XL1'20' BUS OUT CHECK IOG14500
* BOTH COMMAND AND DATA IOG14510
DC CL1'R' IOG14520
DC CL1'S' IOG14530
DC AL2(PRNNRT1-ERPTABLE) IOG14540
DC X'04' IOG14550
DC PL2'796' IOG14560
DC XL1'02' IOG14570
DC XL1'06' IOG14580
DC XL1'02' IOG14590
DC XL1'01' IOG14600
DC FL1'-8' IOG14610
DC XL1'00' IOG14620
DC XL1'20' IOG14630
DC XL1'08' IOG14640
DC XL1'00' IOG14650
DC 9XL2'0000' IOG14660
* CHANNEL 9 STATE = CHECKED FOR IN SENSE RT IOG14670
DC X'0D' IOG14680
DC XL2'0200' UNIT CHECK IOG14690
DC XL1'20' COMMAND REJECT IOG14700
DC CL1'R' IOG14710
DC CL1'N' IOG14720
DC AL2(PRNNRT2-ERPTABLE) IOG14730
DC XL1'D5' IOG14740
DC PL2'699' IOG14750
DC XL1'02' IOG14760
DC XL1'06' IOG14770
DC XL1'05' IOG14780
DC XL1'05' IOG14790
DC FL1'-8' IOG14800
DC XL1'00' IOG14810
DC XL1'80' IOG14820
DC XL1'0A' IOG14830
DC XL1'00' IOG14840
DC 9XL2'0000' IOG14850
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 028
DC XL1'0E' IOG14860
DC XL2'0200' UNIT CHECK IOG14870
DC XL1'20' DATA CHECK IOG14880
DC CL1'R' IOG14890
DC CL1'N' IOG14900
DC AL2(PRNNRT2-ERPTABLE) IOG14910
DC X'D5' IOG14920
DC PL2'795' IOG14930
DC XL1'02' IOG14940
DC XL1'06' IOG14950
DC XL1'02' IOG14960
DC XL1'05' IOG14970
DC FL1'-8' IOG14980
DC XL1'00' IOG14990
DC XL1'08' IOG15000
DC XL1'09' IOG15010
DC XL1'00' IOG15020
DC 9XL2'0000' IOG15030
* PROGRAM CHECK IOG15040
IOGENE VALUE=(0F,0020,20,R,N,PRNNRT2-ERPTABLE,D5,698,02,06, -IOG15050
01,05,-8,00,00,0C) IOG15060
* PROTECTION CHECK IOG15070
IOGENE VALUE=(10,0010,20,R,N,PRNNRT2-ERPTABLE,D5,697,02,06, -IOG15080
01,05,-8,00,00,0D) IOG15090
* UNIT EXCEPTION IOG15100
* CHECKED FOR IN IOG15110
* PRINTER'S INTERRUPT IOG15120
* PROCESSING RT (INTPRNN) IOG15130
* INCORRECT LENGTH IOG15140
IOGENE VALUE=(11,0040,20,R,N,PRNNRT2-ERPTABLE,D5,696,02,06, -IOG15150
01,05,-8,00,00,0F) IOG15160
* NO MATCH ENTRY FOR IOG15170
* NON-EXISTENT DEVICE TYPE IOG15180
IOGENE VALUE=(12,0200,20,R,N,PRNNRT2-ERPTABLE,D5,491,06,06, -IOG15190
06,8F,+0,00,8F,23) IOG15200
TAB1403E EQU * IOG15210
* NO MATCH ENTRY FOR IOG15220
* NON-EXISTENT IO ERROR IOG15230
IOGENE VALUE=(13,0200,20,R,N,PRNNRT2-ERPTABLE,D5,490,07,06, -IOG15240
06,DF,+0,00,DF,15) IOG15250
* PCI INTERRUPT IOG15260
* CHECKED FOR IN IOG15270
* PRINTER'S INTERRUPT IOG15280
* PROCESSING RT (INTPRNN) IOG15290
* PRESENTLY NOT IMPLEMENTED IOG15300
T48TB2 EQU * CAL LOC IOG15310
EJECT IOG15320
* PRNN RECOVERY PROCEDURES IOG15330
* IOG15340
DS 0H INSURE INST ALIGN IOG15350
PRNNRT1 EQU * RETRY = 1 TIME IOG15360
USING *,R15 IOG15370
ST R14,ERPRTSX3 SAVE RETURN IOG15380
ST R2,ERPRTSY3 SAVE BASE REG IOG15390
DROP R15 IOG15400
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 029
USING PRNNRT1,R2 IOG15410
LR R2,R15 INIT BASE REG IOG15420
* IOG15430
CLI EIOTYPE,C'C' COMPLETION ERR IOG15440
BE PRNN1ERR YES,THEN DATA BUS OUT CHECK IOG15450
* RETRY FOR COMMAND BUS OUT CHECK IOG15460
PRNNRU1 EQU * IOG15470
XC CSW(8),CSW CLEAR CSW IOG15480
****** IOG15490
LH R8,ERPDEVA IOG15500
PRNNRU2 EQU * IOG15510
TIO 0(R8) IOG15520
BC 12,PRNNRU3 AVAIL+CSW-STORED IOG15530
BC 1,PRNN1ERR NOT OPERATIONAL IOG15540
B PRNNRU2 CLEAR BUSY IOG15550
****** IOG15560
PRNNRU3 EQU * IOG15570
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPCAW RETRY IOG15580
BC 8,PRNN1OK GOOD START IO IOG15590
* NO IMMEDIATE CSW-STORED BECAUSE- IOG15600
* NOP-CCW ADDED IOG15610
RTCALLER ENTRY=PRNSIOER ANALYZE ERR IOG15620
CLI GRN1ERBY,C'N' PERM ERROR? IOG15630
BE PRNNRU1 NO,RETRY IOG15640
* IOG15650
PRNN1ERR MVI ERPEC,X'FF' IOERR FAILED = PERMANENT ERROR IOG15660
MVI EIOCC,X'FF' IOG15670
PRNN1RET EQU * IOG15680
L R2,ERPRTSY3 RESTORE CALLER'S BASE REG IOG15690
L R14,ERPRTSX3 AND RETURN ADDRESS IOG15700
BR R14 IOG15710
* IOG15720
PRNN1OK EQU * IOG15730
MVC ERPWTDEV,ERPDEVN BUILD WAIT LIST IOG15740
L R15,ERPADDWT IOG15750
LA R1,ERPWT IOG15760
BALR R14,R15 IOG15770
* UPON RETURN FROM WAIT IOG15780
* CHECK FOR ERROR IOG15790
CLI GRN1ERBY,C'N' AN I/O ERROR ON RETURN? IOG15800
BE PRNN2OK NO I/O ERROR ON RETRY IOG15810
RTCALLER ENTRY=PRNCIOER IOG15820
CLI GRN1ERBY,C'Y' PERM ERROR IOG15830
BE PRNN1ERR IOG15840
PRNN2OK EQU * IOG15850
MVI ERPEC,X'00' ENSURE NON-ERROR RETURN CODE IOG15860
MVI EIOCC,X'00' RETRY OK IOG15870
B PRNN1RET IOG15880
* IOG15890
* IOG15900
PRNNRT2 EQU * NO-RETRY ROUTINE IOG15910
USING *,R15 IOG15920
ST R14,ERPRTSX3 IOG15930
ST R2,ERPRTSY3 IOG15940
DROP R15 IOG15950
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 030
USING PRNNRT2,R2 IOG15960
LR R2,R15 IOG15970
* IOG15980
MVI ERPEC,X'EF' NO RETRY POSSIBLE IOG15990
MVI EIOCC,X'EF' IOG16000
PRNN2RET EQU * IOG16010
L R2,ERPRTSY3 IOG16020
L R14,ERPRTSX3 IOG16030
BR R14 RETURN IOG16040
* IOG16050
* IOG16060
PRNSIOER EQU * IOG16070
PRNCIOER EQU * IOG16080
ST R14,ERPRTSL1 SAVE RET LOC IOG16090
TM CSW+4,X'01' UNIT EXCEPTION IOG16100
BO PRNNSEN1 YES IOG16110
TM CSW+4,X'02' UNIT CHECK IOG16120
BO PRNNSEN2 YES IOG16130
B PRNNSEN3 NONE,PERM ERROR IOG16140
PRNNSEN2 EQU * IOG16150
* INIT SENSE OPERATION IOG16160
MVC ERPSENOQ(16),PTSEN MOVE SENSE OPER IOG16170
LA R14,ERPSENIN INIT INPUT AREA ADDRESS IOG16180
ST R14,ERPSENOQ ST INPUT AREA IN CCW IOG16190
LA R14,ERPSENOQ INIT ADDRESS OF FIRST CCW IOG16200
ST R14,ERPADSEN CCW ADDRESS TO HD AREA IOG16210
MVC ERPSENOQ(1),PTSEN REINIT SENSE OP CODE IOG16220
XC CSW,CSW CLEAR CSW IOG16230
STARTIO DEVADD=ERPDEVA,IOREG=R8,PROGADD=ERPADSEN IOG16240
BC 8,PRNNSEO2 SUCESSFUL START? IOG16250
B PRNNSEN3 NO IOG16260
PRNNSEO2 EQU * YES IOG16270
MVC ERPWTDEV,ERPDEVN IOG16280
L R15,ERPADDWT IOG16290
LA R1,ERPWT IOG16300
BALR R14,R15 WAIT FOR SENSE COMPLETION IOG16310
CLI GRN1ERBY,C'Y' IOG16320
BE PRNNSEN3 IOG16330
TM ERPSENIN,X'40' INTERVEN REQ? IOG16340
BZ PRNNSEP2 NO IOG16350
MVI GRN1ERBY,C'U' YES. IOG16360
MVI ERPEC,X'0E' INDICATE INTERVEN REQ IOG16370
MVI EIOCC,X'0E' IOG16380
L R2,ERPRTSY3 RESTORE REGS IOG16390
L R14,ERPRTSX3 IOG16400
BR R14 RETURN IOG16410
PRNNSEP2 EQU * IOG16420
TM ERPSEN,X'01' CHANNEL 9 SENSED IOG16430
BZ PRNNSEN3 NO,PERM ERROR IOG16440
PRNNSEN1 EQU * IOG16450
MVI GRN1ERBY,C'N' INDICATE NO ERROR IOG16460
PRNNRET EQU * IOG16470
L R14,ERPRTSL1 RESTORE RET LOC IOG16480
BR R14 RET TO CALLER IOG16490
PRNNSEN3 EQU * IOG16500
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 031
MVI GRN1ERBY,C'Y' INDICATE PERM ERROR IOG16510
B PRNNRET ENTER EXIT IOG16520
* PRNN'S CONSTANTS,EQUS,ADDRESSES IOG16530
* CONSTANTS IOG16540
PTSEN CCW X'04',PTSEN,X'60',1 IOG16550
CCW X'03',0,X'20',1 IOG16560
* EQUS IOG16570
* NONE IOG16580
* ADDRESSES IOG16590
* NONE IOG16600
EJECT IOG16610
* DEVICE OPERATION CODE TABLE IOG16620
* CHARACTERISTICS: IOG16630
* TABLE DEPENDENT 00 IOG16640
* ENTRIES: IOG16650
* OPERATION CODE XL1 IOG16660
* OPERATIONAL POINTER XL1 IOG16670
EJECT IOG16680
* 1403 PRINTER OPERATION CODE IOG16690
* CHARACTERISTICS IOG16700
DS 0F IOG16710
ADDOP48L DC CL4'****' IOG16720
ADDOP48N DC AL2((OP48T2-OP48T1)/(OP48D2-OP48D1)) NO OF ENTRIES IOG16730
ADDOP48D DC AL2(OP48D2-OP48D1) SIZE OF AN ENTRY IOG16740
ADDOP48T DC AL2(OP48T2-OP48T1) SIZE OF TABLE IOG16750
ASSOP48S DC AL2(0) NO SENSE INFO IOG16760
* ENTRIES IOG16770
OP48D1 EQU * IOG16780
OP48T1 EQU * IOG16790
OP1403 EQU * IOG16800
DC XL1'01' IOG16810
DC XL1'02' IOG16820
OP48D2 DC X'09' IOG16830
DC X'02' IOG16840
DC X'11' IOG16850
DC X'02' IOG16860
DC X'19' IOG16870
DC X'02' IOG16880
DC X'04' IOG16890
DC X'04' IOG16900
DC X'0B' IOG16910
DC X'05' IOG16920
DC X'13' IOG16930
DC X'05' IOG16940
DC X'1B' IOG16950
DC X'05' IOG16960
DC CL1'T' IOG16970
DC CL1'M' IOG16980
DC X'81' IOG16990
DC X'02' IOG17000
OP1403E EQU * IOG17010
DC X'83' IOG17020
DC X'05' IOG17030
OP48T2 EQU * IOG17040
EJECT IOG17050
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 032
* DEVICE MESSAGE TABLE IOG17060
* CHARACTERISTICS: IOG17070
* TABLE DEPENDENT 00 IOG17080
* ENTRIES: IOG17090
* MESSAGE IDENTIFER XL1 IOG17100
* MESSAGE CLNN IOG17110
* MESSAGE NUMBER PL2 IOG17120
* MESSAGE TYPE CL1 IOG17130
EJECT IOG17140
* OPERATOR MESSAGE TABLE IOG17150
* NO DSECT(NOT USED) IOG17160
* CHARACTERISTICS IOG17170
DS 0F IOG17180
ADDOPERL DC CL4'****' IOG17190
ADDOPERN DC AL2((OPERT2-OPERT1)/(OPERD2-OPERD1)) NO OF ENTRIES IOG17200
ADDOPERD DC AL2(OPERD2-OPERD1) SIZE OF AN ENTRY IOG17210
ADDOPERT DC AL2(OPERT2-OPERT1) SIZE OF TABLE IOG17220
ADDOPERS DC AL2(0) NO SENSE INFO IOG17230
* ENTRIES IOG17240
MESOPER EQU * IOG17250
OPERT1 EQU * CAL LOC IOG17260
OPERD1 EQU * CAL LOC IOG17270
DC X'01' IOG17280
DC CL25'HARDWARE ERROR-CHANNEL' IOG17290
DC PL2'599' IOG17300
OPERD2 DC X'02' IOG17310
DC CL25'HARDWARE ERROR-DEVICE' IOG17320
DC PL2'598' IOG17330
DC X'03' IOG17340
DC CL25'HARDWARE ERROR-DEVICE' IOG17350
DC PL2'597' IOG17360
MESOPERE DC X'04' IOG17370
DC CL25'HARDWARE ERROR-INTERFACE' IOG17380
DC PL2'596' IOG17390
OPERT2 EQU * IOG17400
EJECT IOG17410
* OPERATION TYPE MESSAGE TABLE IOG17420
* CHARACTERISTICS IOG17430
DS 0F IOG17440
ADDOPL DC CL4'****' IOG17450
ADDOPN DC AL2((OPT2-OPT1)/(OPD2-OPD1)) NO OF ENTRIES IOG17460
ADDOPD DC AL2(OPD2-OPD1) SIZE OF AN ENTRY IOG17470
ADDOPT DC AL2(OPT2-OPT1) SIZE OF TABLE IOG17480
ADDOPS DC AL2(0) NO SENSE INFO IOG17490
* ENTRIES IOG17500
MESOP EQU * IOG17510
OPT1 EQU * CAL LOC IOG17520
OPD1 EQU * CAL LOC IOG17530
DC X'01' IOG17540
DC CL15'READ' IOG17550
OPD2 DC X'02' IOG17560
DC CL15'WRITE' IOG17570
DC X'03' IOG17580
DC CL15'SETTING STATUS' IOG17590
DC X'04' IOG17600
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 033
DC CL15'ACQUIRING STATUS' IOG17610
DC X'05' IOG17620
DC CL15'POSITIONNING' IOG17630
DC X'06' IOG17640
DC CL15'UNIDENTIFIED' IOG17650
MESOPEND EQU * IOG17660
DC XL1'07' IOG17670
DC CL15'DASD DIAG I/O' IOG17680
OPT2 EQU * CAL LOC IOG17690
EJECT IOG17700
* ERROR TYPE TABLE IOG17710
* CHARACTERISTICS IOG17720
DS 0F IOG17730
ADDSTL DC CL4'****' IOG17740
ADDSTN DC AL2((STT2-STT1)/(STD2-STD1)) IOG17750
ADDSTD DC AL2(STD2-STD1) IOG17760
ADDSTT DC AL2(STT2-STT1) IOG17770
ADDSTS DC AL2(0) NO SENSE INFO IOG17780
* ENTRIES IOG17790
MESST EQU * IOG17800
STT1 EQU * IOG17810
STD1 EQU * IOG17820
DC X'01' IOG17830
DC CL20'USER ERROR' IOG17840
STD2 DC X'02' IOG17850
DC CL20'HARDWARE ERROR' IOG17860
DC X'03' IOG17870
DC CL20'ERP LOAD FAILED' IOG17880
DC X'04' IOG17890
DC CL20'ERP SENSE FAILED' IOG17900
DC X'05' IOG17910
DC CL20'SYSTEM ERROR' IOG17920
MESSTE EQU * IOG17930
DC X'06' IOG17940
DC CL20'ERP LOOKUP FAILED' IOG17950
STT2 EQU * CAL LOC IOG17960
EJECT IOG17970
* DEVICE TYPE TRANSLATION TABLE IOG17980
* CHARACTERISTICS IOG17990
DS 0F IOG18000
ADDDVNML DC CL4'****' IOG18010
ADDDVNMN DC AL2((DVNMT2-DVNMT1)/(DVNMD2-DVNMD1)) IOG18020
ADDDVNMD DC AL2(DVNMD2-DVNMD1) IOG18030
ADDDVNMT DC AL2(DVNMT2-DVNMT1) IOG18040
ADDDVNMS DC AL2(0) IOG18050
* ENTRIES IOG18060
MESDVNM EQU * IOG18070
DVNMT1 EQU * CAL LOC IOG18080
DVNMD1 EQU * CAL LOC IOG18090
DC X'01' IOG18100
DC CL8'CONSOLE' IOG18110
DVNMD2 DC X'02' IOG18120
DC CL8'PRINTER' IOG18130
DC X'03' IOG18140
DC CL8'PUNCH' IOG18150
FILE: IOGENTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 034
DC X'04' IOG18160
DC CL8'READER' IOG18170
DC X'05' IOG18180
DC CL8'DSK-2311' IOG18190
DC X'06' IOG18200
DC CL8'DSK-2314' IOG18210
DC X'07' IOG18220
DC CL8'TAPE-00' IOG18230
DC X'08' IOG18240
DC CL8'TAPE-04' IOG18250
DC X'09' IOG18260
DC CL8'TAPE-03' IOG18270
MESDVNME EQU * IOG18280
DC X'0A' IOG18290
DC CL8'TIMER' IOG18300
DVNMT2 EQU * CAL LOC IOG18310
EJECT IOG18320
.BYPASS ANOP IOG18330
* DROP ALL REGS USED BY MACRO IOG18340
* TO ENSURE PROPER ASSEMBLY IOG18350
* OF CSECT IOG18360
DROP R2,R4,R5,R6,R7,R8,R12,R13 IOG18370
MEND IOG18380
FILE: MESOPD ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP04970
MESOPD ERP04980
MESOPD DSECT ERP04990
MESOPI DS XL1 ERP05000
MESOPV DS CL15 OPERATION TYPE EX: READ ERP05010
MEND ERP05020
FILE: MESOUTD ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO MES00010
MESOUTD MES00020
* DATED: 6 JUNE 1971 MES00030
*** PTF 'MESOUTD AM3636CA' HAS BEEN APPLIED *** MES00040
MESOUTD DSECT MES00050
* MESIO1 DS 0D I/O PROG1 FOR ERROR MESSAGE MES00060
* MESWT1 DS CL8 MES00070
* MESWT2 DS CL8 MES00080
* MESWT3 DS CL8 MES00090
* MESWT4 DS CL8 MES00100
MESIO2 DS 0D I/O PROG2 FOR ERROR MESSAGE MES00110
MESLIST DS CL8 TYPLIN FUNC MES00120
DS AL1 TERMINAL NO. MES00130
MESLISTA DS AL3 ADDRESS OF OUTPUT MES00140
DS CL1 NOT USED MES00150
DS AL3 MESSAGE LENGTH MES00160
MESLISTE EQU * MES00170
DS 2CL8 FILLER TO EQUAL PROG1 LENGTH MES00180
* MES00190
MES1 DS 0CL80 MESSAGE 1 MES00200
MES1ERP DS CL5 IOERR: PROGRAM ISSUING MESSAGE MES00210
FILL1 DS CL1 MES00220
MES1TYPE DS CL1 I OR R OR A MES00230
FILL2 DS CL1 MES00240
MES1NUM DS CL4 NUMBER OF ERROR MESSAGE MES00250
FILL2A DS CL1 MES00260
MES1INFO EQU * R OR A OR I GEN INFO MES00270
MES1DNFO DS CL15 R OR A OR I DET INFO MES00280
FILL3 DS CL1 MES00290
MES1ADDH DS CL8 ADDRESS: MES00300
FILL6 DS CL1 MES00310
MES1ADD DS CL3 HEX ADDRESS: EXAMPLE 192 MES00320
FILL7 DS CL1 MES00330
MES1DEVH DS CL7 DEVICE: MES00340
FILL4 DS CL1 MES00350
MES1DEV DS CL8 DEVICE TYPE: EXAMPLE: PRINTER MES00360
FILL5 DS CL1 MES00370
MES1NAMH DS CL5 NAME: MES00380
FILL8 DS CL1 MES00390
MES1NAME DS CL4 DEVICE NAME EXAMPLE PRN1 MES00400
FILL8A DS CL11 MES00410
* MES00420
ORG MES1+80 MES00430
MES2 DS 0CL80 MESSAGE 2 MES00440
MES2OP DS CL15 TYPE OF OPERATION--LISTED BELOW MES00450
* READ MES00460
* WRITE MES00470
* SETTING STATUS MES00480
* SEEKING STATUS MES00490
* POSITIONING MES00500
* NOT IDENTIFIED MES00510
FILL9 DS CL1 MES00520
MES2OPH DS CL9 OPERATION MES00530
FILL10 DS CL1 MES00540
MES2LOCH DS CL9 LOCATION: MES00550
FILE: MESOUTD ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
FILL11 DS CL1 MES00560
MES2LOC DS CL8 ADDRESS OF I/O OPERATION MES00570
FILL12 DS CL1 MES00580
MES2STH DS CL7 STATUS: MES00590
FILL12A DS CL1 MES00600
MES2ERR DS CL20 TYPE OF ERROR--LISTED BELOW MES00610
* USER ERROR MES00620
* HARDWARE ERROR MES00630
* IOERR LOAD FAILURE MES00640
* IOERR SENSE FAILURE MES00650
* SYSTEM ERROR MES00660
* I/O ERROR IN IOERR MES00670
FILL13 DS CL1 MES00680
* MES00690
ORG MES2+80 MES00700
MES3 DS 0CL80 MESSAGE3 MES00710
MES3DSHD DS CL23 REQUESTED DISK POSITION MES00720
FILL14 DS CL1 MES00730
MES3CYLH DS CL9 CYLINDER: MES00740
FILL15 DS CL1 MES00750
MES3CYL DS CL3 CYLINDER NUMBER: EXAMPLE 005 MES00760
FILL16 DS CL1 MES00770
MES3TKH DS CL6 TRACK MES00780
FILL17 DS CL1 MES00790
MES3TK DS CL2 TRACK NO. EXAMPLE 02 MES00800
FILL18 DS CL1 MES00810
MES3RECH DS CL7 RECORD: MES00820
FILL19 DS CL1 MES00830
MES3REC DS CL2 RECORD NO: EXAMPLE 05 MES00840
FILL20 DS CL1 MES00850
MES3OR DS CL2 OR MES00860
FILL21 DS CL1 MES00870
MES3IDH DS CL3 ID: MES00880
FILL21A DS CL1 MES00890
MES3ID DS CL14 SEEK ARGUMENT & RECORD NO. MES00900
* MES00910
ORG MES3+80 MES00920
MES4 DS 0CL80 MESSAGE 4 MES00930
MES4CCWH DS CL4 CCW: MES00940
FILL22 DS CL1 MES00950
MES4CCW DS CL16 CCW OF ERROR OPERATION MES00960
FILL23 DS CL1 MES00970
MES4CAWH DS CL4 CAW: MES00980
FILL24 DS CL1 MES00990
MES4CAW DS CL8 ADDRESS OF FIRST CCW IN I/O PROGRAM MES01000
FILL25 DS CL1 MES01010
MES4CSWH DS CL4 CSW: MES01020
FILL26 DS CL1 MES01030
MES4CSW DS CL16 CSW OF ERROR OPERATION MES01040
FILL27 DS CL1 MES01050
MES4SENH DS CL6 SENSE: MES01060
FILL28 DS CL1 MES01070
MES4SEN DS CL12 SENSE INFO MES01080
FILL29 DS CL1 MES01090
ORG MES4+80 MES01100
FILE: MESOUTD ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 003
MESEND EQU * MES01110
MEND MES01120
FILE: MESTBVAL ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP05350
MESTBVAL ERP05360
MESTBVAL DSECT ERP05370
* TABLE CHARACTERISTICS ERP05380
MESSEP DS CL4 REC TABLE SEPARATORS ERP05390
MESENTNO DS AL2 NO OF ENTRIES ERP05400
MESENTSZ DS AL2 SIZE OF EACH ENTRY ERP05410
MESTABSZ DS AL2 SIZE OF TABLE ERP05420
MESSNSZ DS AL2 NO. OF SENSE BYTES ERP05430
MESRCBEG EQU * REC TABLE START ERP05440
MEND ERP05450
FILE: NUCON ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00286000
NUCON &OPTION 00287000
AIF (N'&OPTION NE 0).SEQ2 00288000
NUCONSCT DSECT 00289000
.SEQ2 ANOP 00290000
* 00291000
* CMS SYSTEM CONTROL WORDS 00292000
* 00293000
LSTSVC DC A(0) _____________ V(SAVE AREA LAST SVC) 00294000
SPACE 00295000
CORESIZ DC F'262144' ________ CORE SIZE 00296000
SPACE 00297000
USFL DC A(*-*) ___________ V(START USER STORAGE) 00298000
SPACE 00299000
SWITCH DS 0F _______________ LANGUAGE PROCESSOR INDICATORS 00300000
* 00301000
SWFORT DC X'00' ____________ FORTRAN INDICATORS ... 00302000
FORTCOMP EQU X'80' ____________ COMPILER IN PROGREES 00303000
FORTEXEC EQU X'08' ____________ EXECUTING FORTRAN OBJECT CODE 00304000
* 00305000
SWASM DC X'00' ____________ ASSEMBLY INDICATORS ... 00306000
ASMCOMP EQU X'80' ____________ ASSEMBLER IN PROGRESS 00307000
BLDLSWT EQU X'10' ____________ BYPASS MACLIB DICTIONARY SEARCH 00308000
DYLD EQU X'08' ____________ DYNAMIC LOADING IN PROGRESS 00309000
DYLIBO EQU X'04' ____________ OMIT DYNAMIC LIBRARY SCAN 00310000
DYLIBNOW EQU X'02' ____________ DYNAMIC SCAN LIBRARIES 00311000
MNSD EQU X'01' ____________ MAIN SEGMENT DEFINITION FOUND 00312000
* 00313000
SWPLI DC X'00' ____________ PL/I INDICATORS ... 00314000
PLICOMP EQU X'80' ____________ COMPILER IN PROGRESS 00315000
PLIEXEC EQU X'08' ____________ EXECUTING PL/I OBJECT CODE 00316000
* 00317000
SWCOB DC X'00' ____________ COBOL INDICATORS 00318000
SPACE 00319000
STADDR DC F'0' _____________ ADDRESS TO START USER EXECUTION 00320000
LDRTBL DC X'02' ____________ NO. PAGES RESERVED FOR LOADER TABLES 00321000
DC AL3(X'40000') ____ V (HIGHEST LOADER TABLE ENTRY) 00322000
TBLNG DC H'0' _____________ H'?' 00323000
TBENT DC H'0' _____________ N'ENTRIES IN LOADER TABLE 00324000
SPACE 00325000
CMSAREA DC 18F'00' __________ TEMPORARY CMS SAVE AREA 00326000
SPACE 00327000
LNKLST DS 0F _______________ OS LINKAGE CHAINS 00328000
CHNPTR DC F'0' _____________ V(LAST LINKAGE BLOCK) 00329000
LSTBEG DC A(0) _____________ A(ENTRY POINT OF LAST MODULE) 00330000
SPACE 00331000
DEVEXT DC F'0' _____________ DEVICE TABLE EXTENSION 00332000
SPACE 00333000
GFLST DS 0F _______________ USER STORAGE POINTERS 00334000
FSTFRE DC F'0' _____________ A(START OF USER FREE STORAGE) 00335000
LENFRE DC F'0' _____________ L'ORIGINAL USER STORAGE AREA 00336000
FRELST DC F'0' _____________ A(FIRST BLOCK OF FREE STORAGE) 00337000
SPACE 00338000
OSAREA DC 18F'00' __________ STANDARD OS-TYPE AREA 00339000
SPACE 00340000
FILE: NUCON ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
LSTADR DC A(X'3F000') ______ (LAST PAGE IN CORE)
SPACE 00342000
LOCCNT DC A(0) _____________ LOCATION COUNTER 00343000
LDADDR DC A(0) _____________ V(RETURN FROM LOAD/EXECUTE) 00344000
PSW DC D'0' _____________ USER'S "STARTING" PSW 00345000
SPACE 00346000
LOWEXT DC A(X'3E000') ______ V(PRESENT LIMIT OF "EXTEND") 00347000
HIMAIN DC A(*-*) ___________ V(PRESENT BOUNDARY OF "STORAGE") 00348000
SPACE 00349000
IPLDEV DC H'0' ____________ CMS "IPL-DEVICE" (0000 IF "IPL CMS") 00350000
SYSDEV DC H'0' ____________ "SYSTEM-DISK DEVICE NUMBER FOR SYSGEN" 00351000
SPACE 00352000
MISCFLAG DS 0F _______________ SOME SPARE PARTS 00353000
* 00354000
SYSFLAG DC X'00' ____________ CMS SYSTEM-FLAG: 00355000
BARECPU EQU X'80' ____________ BARE S/360-MODEL 65 00356000
BATCHMON EQU X'40' ____________ CMS BATCH MONITOR EXECUTING 00357000
RDYMSG EQU X'20' ____________ CONCISE "READY" MESSAGE 00358000
KLOVR EQU X'10' ____________ "KO" COMMAND INVOKED 00359000
INEXEC EQU X'08' ____________ "EXEC" NOW RUNNING 00360000
NOIMPEX EQU X'04' ____________ OMIT "IMPLIED EXEC" (FROM TERMINAL) 00361000
RELPG EQU X'02' ____________ "RELEASE" UNNEEDED PAGES. 00362000
MRELPG EQU X'01' ____________ PERMIT "RELEASE PAGE" LOGIC
* 00363000
SYSFLAG1 DC X'00' ____________ 2ND CMS SYSTEM-FLAG: 00364000
ERPSTAT EQU X'80' ____________ "ERROR RECOVERY PROCEDURE" ACTIVE 00365000
NOUPD EQU X'40' ____________ "NO UPDATE OF DIRECTORY" 00366000
NODATIM EQU X'10' ____________ "NO CHANGE OF DATE & TIME" 00368000
* 00369000
IOTYPE DC X'DD' ____________ OS ACCESS METHOD IDENT 00370000
* C=CLOSE(20) 00371000
* E=NOTE 00372000
* G=GET 00373000
* I=POINT J=OPENJ(22) 00374000
* K=CHECK 00375000
* L="CONDITIONAL STORAGE REQUESTS"(4,5,10) 00376000
* M=WTOR(35) N=WTO(35) 00377000
* O=OPEN(19) P=PUT 00378000
* R=READ 00379000
* T=TCLOSE(23) 00380000
* 00381000
EXECSWT DC X'00' ____________ BATCH MONITOR INDICATORS 00382000
$EOS EQU X'40' ____________ END-OF-INPUT STREAM 00383000
$BAT EQU X'20' ____________ BATCH MONITOR IN PROGRESS 00384000
$JTERM EQU X'10' ____________ JOB BEING TERMINATED 00385000
$LOAD EQU X'08' ____________ LOADING EXECUTABLE CODE 00386000
$NONX EQU X'04' ____________ ERRORS. SUPPRESS EXECUTION 00387000
$DUMP EQU X'02' ____________ DUMPING... 00388000
$INEX EQU X'01' ____________ IN EXECUTION 00389000
SPACE 00390000
VIRTIME DC F'0' _____________ ELAPSED VIRTUAL TIME (TU) 00391000
CPUTIME DC F'0' _____________ ELAPSED REAL CPU TIME (TU) 00392000
MEND 00393000
FILE: PRGSCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO PRG00010
PRGSCT &OPTION PRG00020
AIF (N'&OPTION NE 0).CSECT PRG00030
PRGSCT DSECT PRG00040
.CSECT ANOP PRG00050
* PRG00060
* STOREAGE FOR PROGRAM INTERRUPT ROUTINE ("INTPROG") PRG00070
* PRG00080
DEBPSW DC F'0',V(BDEBUG) . POINT TO DEBUG PRG00090
* PRG00100
PIE DS 0D . ***PROGRAM INTERRUPT ELEMENT*** PRG00110
PICADDR DC F'0' . PICA ADDRESS FROM RECENT "SPIE" PRG00120
OPSW DC 2F'0' . OLD PSW AFTER PROGRAM INT. PRG00130
DC 5F'0' . REGS: R14,R15,R0,R1,R2 PRG00140
* ***END PROGRAM INTERRUPT ELEMENT*** PRG00150
TEMPOLD DC 8X'00' . WORK AREA PRG00160
TEMPNEW DC 8X'00' PRG00170
R13AREA DC F'0' . SAVED R13 PRG00180
PSAVE DC 16F'0' . REGS SAVED AT INT TIME PRG00190
* PRG00200
MEND PRG00210
FILE: RDBUF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01305000
&LABEL RDBUF &FCB,&AREA=,&ERROR= 01306000
&LABEL LA 1,&FCB 01307000
MVC 0(8,1),=CL8'RDBUF' 01308000
AIF (N'&AREA EQ 0).SEQ1 01309000
MVC 28(4,1),=A(&AREA) 01310000
.SEQ1 SVC X'CA' 01311000
AIF (N'&ERROR EQ 0).SEQ2 01312000
DC AL4(&ERROR) 01313000
AGO .SEQ3 01314000
.SEQ2 DC AL4(*+4) 01315000
.SEQ3 MEND 01316000
FILE: RDSYS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01449000
&LABEL RDSYS &SYSCB,&ERROR= 01450000
&LABEL LA 1,&SYSCB 01451000
MVC 8(8,1),=CL8'READ' 01452000
L 15,=V(SYSCTL) 01453000
BALR 14,15 01454000
AIF (N'&ERROR EQ 0).SEQ2 01455000
DC AL4(&ERROR) 01456000
AGO .SEQ3 01457000
.SEQ2 DC AL4(*+4) 01458000
.SEQ3 SPACE 1 01459000
MEND 01460000
FILE: RDTYP ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01362000
&LABEL RDTYP &AREA,&LNG 01363000
&LABEL LA 1,R&SYSNDX 01364000
SVC X'CA' 01365000
DC AL4(*+4) 01366000
B S&SYSNDX 01367000
R&SYSNDX DS 0D 01368000
DC CL8'WAITRD' 01369000
DC AL1(1) 01370000
DC AL3(&AREA) 01371000
DC C'U' 01372000
&LNG DC AL3(0) 01373000
S&SYSNDX DS 0H 01374000
MEND 01375000
FILE: REGS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01682000
REGS 01683000
LCLA &SETA1 01684000
&SETA1 SETA 0 01685000
.SEQ1 ANOP 01686000
R&SETA1 EQU &SETA1 01687000
&SETA1 SETA &SETA1+1 01688000
AIF (&SETA1 LE 15).SEQ1 01689000
MEND 01690000
FILE: RET ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03480
RET ® ERP03490
BCR ALL,® ERP03500
MEND ERP03510
FILE: RETL ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01510000
&LABEL RETL 01511000
&LABEL L 13,SAVEAREA 01512000
LM 14,12,12(13) 01513000
BR 14 01514000
MEND 01515000
FILE: RTCALLER ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03520
RTCALLER &PARM=,&ENTRY=*,&RETREG=R14,&GOREG=R15 ERP03530
LCLC &SVC ERP03540
LCLC &ADD ERP03550
&SVC SETC 'SVC' ERP03560
&ADD SETC 'ADD' ERP03570
AIF (T'&PARM EQ 'O').NTEST ERP03580
LA 1,&PARM ERP03590
.NTEST ANOP ERP03600
AIF ('&ENTRY' EQ '&SVC').ISSUESV ERP03610
AIF ('&ENTRY'(1,3) EQ '&ADD').LDINST ERP03620
AIF (K'&ENTRY LT 6).LDAINST ERP03630
AIF ('&ENTRY'(4,3) EQ '&ADD').LDINST ERP03640
.LDAINST ANOP ERP03650
LA &GOREG,&ENTRY ERP03660
AGO .COMBR ERP03670
.LDINST ANOP ERP03680
L &GOREG,&ENTRY ERP03690
.COMBR ANOP ERP03700
BALR &RETREG,&GOREG ERP03710
MEXIT ERP03720
.ISSUESV ANOP ERP03730
SVC X'CA' ERP03740
MEND ERP03750
FILE: SAVEL ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01500000
SAVEL 01501000
USING *,15 01502000
STM 14,12,12(13) 01503000
ST 13,SAVEAREA 01504000
LA 13,SAVEAREA 01505000
BAL 12,*+76 01506000
SAVEAREA DC 18F'0' 01507000
DROP 15 01508000
MEND 01509000
FILE: SCAN ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01691000
&LABEL SCAN &CCBUF,&ERROR= 01692000
&LABEL L 15,ASCAN 01693000
LA 1,&CCBUF-4 01694000
BALR 14,15 01695000
AIF (N'&ERROR EQ 0).SEQ2 01696000
LTR 15,15 01697000
BNZ &ERROR 01698000
.SEQ2 SPACE 1 01699000
MEND 01700000
FILE: SETUP ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01388000
&LABEL SETUP &FCB 01389000
&LABEL L 1,S&FCB+28 01390000
MVC &FCB+8(16),S&FCB+8 01391000
MVC &FCB+24(2),24(1) 01392000
MVC &FCB+32(4),32(1) 01393000
MVC &FCB+36(2),30(1) 01394000
MEND 01395000
FILE: STARTIO ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP08250
STARTIO &DEVADD=,&IOREG=,&PROGADD= ERP08260
LH &IOREG,&DEVADD LOAD DEV ADDRESS ERP08270
MVC CAW(4),&PROGADD ADDRESS OF IO PROGRAM TO CAW ERP08280
SIO 0(&IOREG) SIO INST ERP08290
MEND ERP08300
FILE: STATE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01348000
&LABEL STATE &SFCB,&ERR 01349000
&LABEL LA 1,&SFCB 01350000
SVC X'CA' 01351000
AIF (N'&ERR EQ 0).DEF 01352000
DC AL4(&ERR) 01353000
AGO .END 01354000
.DEF DC AL4(*+4) 01355000
.END MEND 01356000
FILE: STATUS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP03760
&NAME STATUS &FLD=,&CHNG= ERP03770
LCLC &OF ERP03780
&OF SETC 'OF' ERP03790
AIF (K'&CHNG LT 8).TURNACT ERP03800
AIF ('&CHNG'(7,2) EQ '&OF').TURNOFF ERP03810
.TURNACT ANOP ERP03820
&NAME OI &FLD,&CHNG ERP03830
MEXIT ERP03840
.TURNOFF ANOP ERP03850
&NAME XI &FLD,&CHNG ERP03860
MEND ERP03870
FILE: SVCQ ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00738000
&LABEL SVCQ 00739000
&LABEL L 15,=V(INTSVC) 00740000
BALR 15,15 00741000
MEND 00742000
FILE: SVCSCT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 00683000
SVCSCT &CSECT 00684000
AIF (N'&CSECT NE 0).SEQ2 00685000
SVCDSECT DSECT 00686000
.SEQ2 ANOP 00687000
* 00688000
USVCTBL DS 0F __________ A 'HANDLE' FOR THE FOLLOWING ... 00689000
* 00690000
* KEEP NEXT FOUR IN ORDER .... 00691000
JNUMB DC F'0' ________ NO. OF DBL-WORDS IN SVC-NUMBER TABLE 00692000
JFIRST DC A(*-*) ______ ADDRESS OF FIRST ITEM (IF ANY) IN TABLE 00693000
JF4 DC F'4' ________ (FOR BXLE) 00694000
JLAST DC A(*-*) ______ ADDRESS OF LAST ITEM IN TABLE 00695000
* 00696000
* FOR SVC-NUMBER (OTHER THAN 202) HANDLING ... 00697000
* (NOTE - 'CLILOOP+1' IS FILLED-IN TO SPECIFIED SVC-NUMBER) 00698000
* 00699000
CLILOOP CLI 0(5),*-* ____ DOES SVC-NUMBER (FILLED-IN) MATCH TABLE? 00700000
BCR 8,8 _________ 'BE' IF YES, EXIT VIA R8. 00701000
BXLE 5,6,0(15) ___ CONTINUE SEARCH AT "CLILOOP" 00702000
BR 14 __________ EXIT VIA R14 IF NOT FOUND. 00703000
* 00704000
INDEX DC F'0' ________ INDEXES "STACK" (=0, 4, 8, 12, ETC.) 00705000
* 00706000
* KEEP NEXT FOUR IN ORDER .... 00707000
NRMOVR DC 1F'0' _______ NORMAL-OVERRIDE (NOT WANTED IF = 0) 00708000
ERROVR DC 1F'0' _______ ERROR-OVERRIDE (NOT WANTED IF = 0) 00709000
JSAVOV DC 1F'0' _______ 'NRMOVR' SAVED HERE 00710000
DC 1F'0' _______ 'ERROVR' SAVED HERE 00711000
* 00712000
NRMSAV DC 28D'0' ______ NORMAL STANDARD INFORMATION 00713000
* 00714000
STACK DC A(BLK1) _____ "STACK" OF SVC-LEVELS (1ST LEVEL) 00715000
DC A(BLK1+28*08) (2ND LEVEL) 00716000
DC A(BLK1+28*16) (3RD LEVEL) 00717000
DC A(BLK1+28*24) (4TH LEVEL) 00718000
DC 16F'0' ____ UP TO 16 ADDITIONAL LEVELS FROM FREE STORAGE 00719000
* 00720000
* KEEP NEXT FIVE IN ORDER ..... 00721000
DS 0F 00722000
MODLIST DC CL8'LOADMOD ' ROUTINE NAME 00723000
DUMCOM DC CL8' ' MODULE 'FILENAME' FILLED IN HERE 00724000
SSMON DC X'FF' _______ 'FENCE' AND ALLOWS ALL INTERRUPTS. 00725000
ZERO3 DC AL3(0) ______ THREE-BYTE ZERO 00726000
* 00727000
TRANSRT DC CL8' ' HOLDS FILENAME OF TRANSIENT ROUTINE 00728000
TRANMSK DC AL1(X'FF') 00729000
ADTRANS DC VL3(TRANSAR) 00730000
TEMP02 DC D'0' ________ (FOR 'CVD' & OTHER SCRATCH-USE) 00731000
ADOVRSUB DC F'0' ________ ADDRESS OF OVERRIDE SUBROUTINE 00732000
ADOVRRID DC F'0' ________ ADDRESS OF MAIN OVERRIDE PROGRAM 00733000
* 00734000
BLK1 DC 112D'0' _____ FIRST FOUR 28-DBL-WORD SAVE-AREAS 00735000
* 00736000
MEND 00737000
FILE: SYSCB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01461000
&LABEL SYSCB &COM,&AREA 01462000
&LABEL DS 0D 01463000
DC CL8'SYSCTL' 01464000
DC CL8'&COM ' 01465000
AIF (N'&AREA EQ 0).SEQ2 01466000
DC A(&AREA) 01467000
AGO .SEQ3 01468000
.SEQ2 DC A(0) 01469000
.SEQ3 DC F'0' 01470000
SPACE 1 01471000
MEND 01472000
FILE: SYSDVTAB ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO ERP05150
SYSDVTAB ERP05160
SYSDVTAB DSECT ERP05170
* SYSTEM DEVICE TABLE ERP05180
SYSDVST EQU * ERP05190
DEVADDD DS CL2 DEVICE ADDRESS ERP05200
DEVFLGD DS CL1 IO FLAG ERP05210
DEVUNITD DS CL1 UNIT TYPE ERP05220
DEVNAMED DS CL4 DEVICE NAME ERP05230
DVINTRTD DS CL4 DEVICE INTERRUPT RT ERP05240
MEND ERP05250
FILE: SYSOUT ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01797000
&LABEL SYSOUT &MESS 01798000
&LABEL DS 0H 01799000
CNOP 0,4 01800000
L 15,=V(IBCOM#) 01801000
BAL 14,4(15) 01802000
DC F'6' 01803000
DC A(M&SYSNDX) 01804000
BAL 14,16(15) 01805000
BAL 14,60(15) 01806000
DC XL2'0229' 01807000
B O&SYSNDX 01808000
M&SYSNDX DC X'02' 01809000
DC X'1A' 01810000
DC AL1(L'N&SYSNDX) 01811000
N&SYSNDX DC C&MESS 01812000
DC X'22' 01813000
O&SYSNDX DS 0H 01814000
MEND 01815000
FILE: TSTPA ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01701000
&LABEL TSTPA &PNO,&VALUE 01702000
LCLA &SETA 01703000
&SETA SETA &PNO*8 01704000
AIF ('&VALUE' EQ 'FF').SEQ2 01705000
&LABEL CLC &SETA.(8,1),=CL8&VALUE 01706000
AGO .SEQ3 01707000
.SEQ2 ANOP 01708000
&LABEL CLC &SETA.(8,1),=8X'FF' 01709000
.SEQ3 SPACE 1 01710000
MEND 01711000
FILE: TYPE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01625000
&LABEL TYPE &MSG,&LNG 01626000
GBLC &NUM 01627000
LCLA &SETA1,&SETA2,&SETA3 01628000
&NUM SETC '&SYSNDX' 01629000
&LABEL DS 0H 01630000
AIF ('&MSG'(1,1) NE '''').SEQ1 01631000
&SETA1 SETA 2 01632000
&SETA2 SETA K'&MSG-2 01633000
.BACK AIF (&SETA1 GT &SETA2).END 01634000
AIF ('&MSG'(&SETA1,2) EQ '''''').EQ 01635000
&SETA1 SETA &SETA1+1 01636000
AGO .BACK 01637000
.EQ ANOP 01638000
&SETA3 SETA &SETA3+1 01639000
&SETA1 SETA &SETA1+2 01640000
AGO .BACK 01641000
.END ANOP 01642000
&SETA1 SETA K'&MSG-2-&SETA3 01643000
GEN 01644000
DC AL3(*+7) 01645000
DC C'B' 01646000
DC AL3(&SETA1) 01647000
DC CL&SETA1.&MSG 01648000
AGO .SEQ2 01649000
.SEQ1 AIF ('&MSG'(1,1) NE '(').SEQ1A 01650000
ST &MSG(1),T&SYSNDX+8 01651000
MVI T&SYSNDX+8,X'01' 01652000
.SEQ1A AIF ('&LNG'(1,1) NE '(').SEQ3 01653000
STH &LNG(1),T&SYSNDX+14 01654000
.SEQ7 ANOP 01655000
GEN 01656000
AIF ('&MSG'(1,1) NE '(').SEQ2A 01657000
DC AL3(0) 01658000
AGO .SEQ3A 01659000
.SEQ2A ANOP 01660000
DC AL3(&MSG) 01661000
.SEQ3A ANOP 01662000
DC C'B' 01663000
DC AL3(0) 01664000
AGO .SEQ2 01665000
.SEQ3 AIF (T'&LNG EQ 'U' OR T'&LNG EQ 'N').SEQ4 01666000
AIF (T'&LNG EQ 'H').SEQ6 01667000
MVC T&SYSNDX+14(2),&LNG+2 01668000
AGO .SEQ7 01669000
.SEQ6 ANOP 01670000
MVC T&SYSNDX+14(2),&LNG 01671000
AGO .SEQ7 01672000
.SEQ4 ANOP 01673000
GEN 01674000
DC AL3(&MSG) 01675000
DC C'B' 01676000
DC AL3(&LNG) 01677000
.SEQ2 ANOP 01678000
U&SYSNDX DS 0H 01679000
FILE: TYPE ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 002
SPACE 1 01680000
MEND 01681000
FILE: TYPIN ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01403000
&LABEL TYPIN &AREA,&LNG,&ED=U 01404000
&LABEL LA 1,T&SYSNDX ADDRESS OF P-LIST 01405000
SVC 202 ISSUE CMS SVC 01406000
DC AL4(*+4) IGNORE RARE ERROR. 01407000
B U&SYSNDX BRANCH AROUND P-LIST 01408000
T&SYSNDX DS 0D DOUBLE WORD ALIGNMENT 01409000
DC CL8'WAITRD' ROUTINE TO READ A LINE 01410000
DC AL1(1) CONSOLE ADDRESS 01411000
DC AL3(&AREA) 130-CHARACTER BUFFER 01412000
DC CL1'&ED' S,T,U,V, OR X. 01413000
&LNG DC AL3(0) NUMBER OF CHARACTERS READ. 01414000
U&SYSNDX EQU * 01415000
MEND 01416000
FILE: WRBUF ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01376000
&LABEL WRBUF &FCB,&AREA=,&ERROR= 01377000
&LABEL LA 1,&FCB 01378000
MVC 0(8,1),=CL8'WRBUF' 01379000
AIF (N'&AREA EQ 0).SEQ1 01380000
MVC 28(4,1),=A(&AREA) 01381000
.SEQ1 SVC X'CA' 01382000
AIF (N'&ERROR EQ 0).SEQ2 01383000
DC AL4(&ERROR) 01384000
AGO .SEQ3 01385000
.SEQ2 DC AL4(*+4) 01386000
.SEQ3 MEND 01387000
FILE: WRSYS ASP360 W1 CONVERSATIONAL MONITOR SYSTEM PAGE 001
MACRO 01429000
&LABEL WRSYS &CCCB,&L,&ERROR= 01430000
&LABEL LA 1,&CCCB 01431000
MVC 8(8,1),=CL8'WRITE' 01432000
AIF (N'&L EQ 0).SEQ1 01433000
AIF ('&L'(1,1) EQ '(').SEQ5 01434000
MVC 20(4,1),=F'&L' 01435000
AGO .SEQA1 01436000
.SEQ5 ST &L(1),20(1) 01437000
AGO .SEQA1 01438000
.SEQ1 MVC 20(4,1),=F'80' 01439000
.SEQA1 ANOP 01440000
L 15,=V(SYSCTL) 01441000
BALR 14,15 01442000
AIF (N'&ERROR EQ 0).SEQ2 01443000
DC AL4(&ERROR) 01444000
AGO .SEQ3 01445000
.SEQ2 DC AL4(*+4) 01446000
.SEQ3 SPACE 1 01447000
MEND 01448000 |
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/tfren.adb | best08618/asylo | 7 | 6627 | -- { dg-do run }
-- { dg-options "-gnatws" }
procedure Tfren is
type R;
type Ar is access all R;
type R is record F1: Integer; F2: Ar; end record;
for R use record
F1 at 1 range 0..31;
F2 at 5 range 0..63;
end record;
procedure Foo (RR1, RR2: Ar);
procedure Foo (RR1, RR2 : Ar) is
begin
if RR2.all.F1 /= 55 then raise program_error; end if;
end;
R3: aliased R := (55, Null);
R2: aliased R := (44, R3'Access);
R1: aliased R := (22, R2'Access);
P: Ar := R1'Access;
X: Ar renames P.all.F2;
Y: Ar renames X.all.F2;
begin
P := R2'Access;
R1.F2 := R1'Access;
Foo (X, Y);
Y.F1 := -111;
if Y.F1 /= -111 then raise Constraint_Error; end if;
end Tfren;
|
Data/Tuple/Equivalence.agda | Lolirofle/stuff-in-agda | 6 | 5305 | <reponame>Lolirofle/stuff-in-agda<gh_stars>1-10
module Data.Tuple.Equivalence where
import Lvl
open import Data using (Unit ; <>)
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Logic.Propositional
open import Structure.Setoid
open import Structure.Function
open import Structure.Operator
open import Structure.Relator.Equivalence
open import Structure.Relator.Properties
open import Type
private variable ℓₒ ℓₒ₁ ℓₒ₂ ℓₒ₃ ℓₒ₄ ℓₑ ℓₑ₁ ℓₑ₂ ℓₑ₃ ℓₑ₄ : Lvl.Level
module _ {A : Type{ℓₒ₁}} ⦃ _ : Equiv{ℓₑ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ _ : Equiv{ℓₑ₂}(B) ⦄ where
instance
Tuple-equiv : Equiv(A ⨯ B)
_≡_ ⦃ Tuple-equiv ⦄ (x₁ , y₁) (x₂ , y₂) = (x₁ ≡ x₂) ∧ (y₁ ≡ y₂)
Equiv-equivalence ⦃ Tuple-equiv ⦄ = intro where
instance
[≡]-reflexivity : Reflexivity(_≡_ ⦃ Tuple-equiv ⦄)
Reflexivity.proof([≡]-reflexivity) = [∧]-intro (reflexivity(_≡_)) (reflexivity(_≡_))
instance
[≡]-symmetry : Symmetry(_≡_ ⦃ Tuple-equiv ⦄)
Symmetry.proof([≡]-symmetry) ([∧]-intro l r) = [∧]-intro (symmetry(_≡_) l) (symmetry(_≡_) r)
instance
[≡]-transitivity : Transitivity(_≡_ ⦃ Tuple-equiv ⦄)
Transitivity.proof([≡]-transitivity) ([∧]-intro l1 r1) ([∧]-intro l2 r2) = [∧]-intro (transitivity(_≡_) l1 l2) (transitivity(_≡_) r1 r2)
instance
left-function : Function(Tuple.left)
Function.congruence left-function = Tuple.left
instance
right-function : Function(Tuple.right)
Function.congruence right-function = Tuple.right
instance
[,]-function : BinaryOperator(_,_)
BinaryOperator.congruence [,]-function a b = (a , b)
module _ {A : Type{ℓₒ₁}} ⦃ equiv-A : Equiv{ℓₑ₁}(A) ⦄ {B : Type{ℓₒ₂}} ⦃ equiv-B : Equiv{ℓₑ₂}(B) ⦄ where
instance
swap-function : Function ⦃ Tuple-equiv ⦃ equiv-A ⦄ ⦃ equiv-B ⦄ ⦄ ⦃ Tuple-equiv ⦄ (Tuple.swap)
Function.congruence swap-function = Tuple.swap
module _ {A : Type{ℓₒ}} ⦃ equiv : Equiv{ℓₑ}(A) ⦄ where
instance
repeat-function : Function(Tuple.repeat{A = A})
Function.congruence repeat-function = Tuple.repeat
module _
{A₁ : Type{ℓₒ₁}} ⦃ equiv-A₁ : Equiv{ℓₑ₁}(A₁) ⦄
{A₂ : Type{ℓₒ₂}} ⦃ equiv-A₂ : Equiv{ℓₑ₂}(A₂) ⦄
{B₁ : Type{ℓₒ₃}} ⦃ equiv-B₁ : Equiv{ℓₑ₃}(B₁) ⦄
{B₂ : Type{ℓₒ₄}} ⦃ equiv-B₂ : Equiv{ℓₑ₄}(B₂) ⦄
{f : A₁ → A₂} ⦃ func-f : Function(f) ⦄
{g : B₁ → B₂} ⦃ func-g : Function(g) ⦄
where
instance
map-function : Function(Tuple.map f g)
Function.congruence map-function = Tuple.map (congruence₁(f)) (congruence₁(g))
module _
{A : Type{ℓₒ₁}} ⦃ equiv-A : Equiv{ℓₑ₁}(A) ⦄
{B : Type{ℓₒ₂}} ⦃ equiv-B : Equiv{ℓₑ₂}(B) ⦄
{C : Type{ℓₒ₃}} ⦃ equiv-C : Equiv{ℓₑ₃}(C) ⦄
where
instance
associateLeft-function : Function(Tuple.associateLeft {A = A}{B = B}{C = C})
Function.congruence associateLeft-function = Tuple.associateLeft
instance
associateRight-function : Function(Tuple.associateRight {A = A}{B = B}{C = C})
Function.congruence associateRight-function = Tuple.associateRight
|
Cubical/Foundations/Isomorphism.agda | howsiyu/cubical | 0 | 11846 | <filename>Cubical/Foundations/Isomorphism.agda
{-
Theory about isomorphisms
- Definitions of [section] and [retract]
- Definition of isomorphisms ([Iso])
- Any isomorphism is an equivalence ([isoToEquiv])
-}
{-# OPTIONS --safe #-}
module Cubical.Foundations.Isomorphism where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv.Base
private
variable
ℓ ℓ' : Level
A B C : Type ℓ
-- Section and retract
module _ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} where
section : (f : A → B) → (g : B → A) → Type ℓ'
section f g = ∀ b → f (g b) ≡ b
-- NB: `g` is the retraction!
retract : (f : A → B) → (g : B → A) → Type ℓ
retract f g = ∀ a → g (f a) ≡ a
record Iso {ℓ ℓ'} (A : Type ℓ) (B : Type ℓ') : Type (ℓ-max ℓ ℓ') where
no-eta-equality
constructor iso
field
fun : A → B
inv : B → A
rightInv : section fun inv
leftInv : retract fun inv
isIso : (A → B) → Type _
isIso {A = A} {B = B} f = Σ[ g ∈ (B → A) ] Σ[ _ ∈ section f g ] retract f g
isoFunInjective : (f : Iso A B) → (x y : A) → Iso.fun f x ≡ Iso.fun f y → x ≡ y
isoFunInjective f x y h = sym (Iso.leftInv f x) ∙∙ cong (Iso.inv f) h ∙∙ Iso.leftInv f y
isoInvInjective : (f : Iso A B) → (x y : B) → Iso.inv f x ≡ Iso.inv f y → x ≡ y
isoInvInjective f x y h = sym (Iso.rightInv f x) ∙∙ cong (Iso.fun f) h ∙∙ Iso.rightInv f y
-- Any iso is an equivalence
module _ (i : Iso A B) where
open Iso i renaming ( fun to f
; inv to g
; rightInv to s
; leftInv to t)
private
module _ (y : B) (x0 x1 : A) (p0 : f x0 ≡ y) (p1 : f x1 ≡ y) where
fill0 : I → I → A
fill0 i = hfill (λ k → λ { (i = i1) → t x0 k
; (i = i0) → g y })
(inS (g (p0 (~ i))))
fill1 : I → I → A
fill1 i = hfill (λ k → λ { (i = i1) → t x1 k
; (i = i0) → g y })
(inS (g (p1 (~ i))))
fill2 : I → I → A
fill2 i = hfill (λ k → λ { (i = i1) → fill1 k i1
; (i = i0) → fill0 k i1 })
(inS (g y))
p : x0 ≡ x1
p i = fill2 i i1
sq : I → I → A
sq i j = hcomp (λ k → λ { (i = i1) → fill1 j (~ k)
; (i = i0) → fill0 j (~ k)
; (j = i1) → t (fill2 i i1) (~ k)
; (j = i0) → g y })
(fill2 i j)
sq1 : I → I → B
sq1 i j = hcomp (λ k → λ { (i = i1) → s (p1 (~ j)) k
; (i = i0) → s (p0 (~ j)) k
; (j = i1) → s (f (p i)) k
; (j = i0) → s y k })
(f (sq i j))
lemIso : (x0 , p0) ≡ (x1 , p1)
lemIso i .fst = p i
lemIso i .snd = λ j → sq1 i (~ j)
isoToIsEquiv : isEquiv f
isoToIsEquiv .equiv-proof y .fst .fst = g y
isoToIsEquiv .equiv-proof y .fst .snd = s y
isoToIsEquiv .equiv-proof y .snd z = lemIso y (g y) (fst z) (s y) (snd z)
isoToEquiv : Iso A B → A ≃ B
isoToEquiv i .fst = i .Iso.fun
isoToEquiv i .snd = isoToIsEquiv i
isoToPath : Iso A B → A ≡ B
isoToPath {A = A} {B = B} f i =
Glue B (λ { (i = i0) → (A , isoToEquiv f)
; (i = i1) → (B , idEquiv B) })
open Iso
invIso : Iso A B → Iso B A
fun (invIso f) = inv f
inv (invIso f) = fun f
rightInv (invIso f) = leftInv f
leftInv (invIso f) = rightInv f
compIso : Iso A B → Iso B C → Iso A C
fun (compIso i j) = fun j ∘ fun i
inv (compIso i j) = inv i ∘ inv j
rightInv (compIso i j) b = cong (fun j) (rightInv i (inv j b)) ∙ rightInv j b
leftInv (compIso i j) a = cong (inv i) (leftInv j (fun i a)) ∙ leftInv i a
composesToId→Iso : (G : Iso A B) (g : B → A) → G .fun ∘ g ≡ idfun B → Iso B A
fun (composesToId→Iso _ g _) = g
inv (composesToId→Iso j _ _) = fun j
rightInv (composesToId→Iso i g path) b =
sym (leftInv i (g (fun i b))) ∙∙ cong (λ g → inv i (g (fun i b))) path ∙∙ leftInv i b
leftInv (composesToId→Iso _ _ path) b i = path i b
idIso : Iso A A
fun idIso = idfun _
inv idIso = idfun _
rightInv idIso _ = refl
leftInv idIso _ = refl
LiftIso : Iso A (Lift {i = ℓ} {j = ℓ'} A)
fun LiftIso = lift
inv LiftIso = lower
rightInv LiftIso _ = refl
leftInv LiftIso _ = refl
isContr→Iso : isContr A → isContr B → Iso A B
fun (isContr→Iso _ Bctr) _ = Bctr .fst
inv (isContr→Iso Actr _) _ = Actr .fst
rightInv (isContr→Iso _ Bctr) = Bctr .snd
leftInv (isContr→Iso Actr _) = Actr .snd
isProp→Iso : (Aprop : isProp A) (Bprop : isProp B) (f : A → B) (g : B → A) → Iso A B
fun (isProp→Iso _ _ f _) = f
inv (isProp→Iso _ _ _ g) = g
rightInv (isProp→Iso _ Bprop f g) b = Bprop (f (g b)) b
leftInv (isProp→Iso Aprop _ f g) a = Aprop (g (f a)) a
domIso : ∀ {ℓ} {C : Type ℓ} → Iso A B → Iso (A → C) (B → C)
fun (domIso e) f b = f (inv e b)
inv (domIso e) f a = f (fun e a)
rightInv (domIso e) f i x = f (rightInv e x i)
leftInv (domIso e) f i x = f (leftInv e x i)
-- Helpful notation
_Iso⟨_⟩_ : ∀ {ℓ ℓ' ℓ''} {B : Type ℓ'} {C : Type ℓ''} (X : Type ℓ) → Iso X B → Iso B C → Iso X C
_ Iso⟨ f ⟩ g = compIso f g
_∎Iso : ∀ {ℓ} (A : Type ℓ) → Iso A A
A ∎Iso = idIso {A = A}
infixr 0 _Iso⟨_⟩_
infix 1 _∎Iso
codomainIsoDep : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : A → Type ℓ'} {C : A → Type ℓ''}
→ ((a : A) → Iso (B a) (C a))
→ Iso ((a : A) → B a) ((a : A) → C a)
fun (codomainIsoDep is) f a = fun (is a) (f a)
inv (codomainIsoDep is) f a = inv (is a) (f a)
rightInv (codomainIsoDep is) f = funExt λ a → rightInv (is a) (f a)
leftInv (codomainIsoDep is) f = funExt λ a → leftInv (is a) (f a)
codomainIso : ∀ {ℓ ℓ' ℓ''} {A : Type ℓ} {B : Type ℓ'} {C : Type ℓ''}
→ Iso B C
→ Iso (A → B) (A → C)
codomainIso z = codomainIsoDep λ _ → z
Iso≡Set : isSet A → isSet B → (f g : Iso A B)
→ ((x : A) → f .fun x ≡ g .fun x)
→ ((x : B) → f .inv x ≡ g .inv x)
→ f ≡ g
fun (Iso≡Set hA hB f g hfun hinv i) x = hfun x i
inv (Iso≡Set hA hB f g hfun hinv i) x = hinv x i
rightInv (Iso≡Set hA hB f g hfun hinv i) x j =
isSet→isSet' hB (rightInv f x) (rightInv g x) (λ i → hfun (hinv x i) i) refl i j
leftInv (Iso≡Set hA hB f g hfun hinv i) x j =
isSet→isSet' hA (leftInv f x) (leftInv g x) (λ i → hinv (hfun x i) i) refl i j
|
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/case_statement.adb | ouankou/rose | 488 | 25442 | procedure Case_Statement is
begin
case True is
when True =>
null;
when False =>
null;
when others =>
null;
end case;
end Case_Statement;
|
libsrc/_DEVELOPMENT/math/float/math16/c/sdcc/cm16_sdcc_acos.asm | ahjelm/z88dk | 640 | 16651 | <gh_stars>100-1000
SECTION code_fp_math16
PUBLIC cm16_sdcc_acos
EXTERN cm16_sdcc_read1, acosf16
cm16_sdcc_acos:
call cm16_sdcc_read1
jp acosf16
|
programs/oeis/080/A080412.asm | neoneye/loda | 22 | 21767 | ; A080412: Exchange rightmost two binary digits of n > 1; a(0)=0, a(1)=2.
; 0,2,1,3,4,6,5,7,8,10,9,11,12,14,13,15,16,18,17,19,20,22,21,23,24,26,25,27,28,30,29,31,32,34,33,35,36,38,37,39,40,42,41,43,44,46,45,47,48,50,49,51,52,54,53,55,56,58,57,59,60,62,61,63,64,66,65,67,68,70,69,71,72,74,73,75,76,78,77,79,80,82,81,83,84,86,85,87,88,90,89,91,92,94,93,95,96,98,97,99
mov $1,$0
mul $0,2
add $1,10
mod $1,4
add $0,$1
sub $0,1
div $0,2
|
src/common/keccak-generic_keccakf-reference_permutation.ads | damaki/libkeccak | 26 | 13582 | <gh_stars>10-100
-------------------------------------------------------------------------------
-- Copyright (c) 2019, <NAME>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
-- * Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
-- * Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
-- * The name of the copyright holder may not 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 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.
-------------------------------------------------------------------------------
-- @summary
-- A reference implementation of the Keccak-f permutation.
--
-- @description
-- This package implements Keccak-p for an arbitrary lane size by following
-- the Keccak specification for each operation (Theta, Rho, Pi, Chi, and Iota)
-- as separate functions.
--
-- This isn't the fastest implementation of Keccak, but is easier to verify
-- against the specification and provides a reference implementation to which
-- optimised implementations can be tested against for correctness.
--
-- @group Keccak-f
generic
package Keccak.Generic_KeccakF.Reference_Permutation
is
generic
-- Number of rounds.
--
-- By default, the definition from The Keccak Reference is used.
Num_Rounds : Round_Count := 12 + (2 * Lane_Size_Log);
procedure Permute (A : in out State)
with Global => null,
Depends => (A => A);
-- Permute the Keccak state.
--
-- @param A The Keccak state to permute.
private
procedure Theta (A : in State;
AR : out State)
with Global => null,
Depends => (AR => A),
Inline;
procedure Rho (A : in State;
AR : out State)
with Global => null,
Depends => (AR => A),
Inline;
procedure Pi (A : in State;
AR : out State)
with Global => null,
Depends => (AR => A),
Inline;
procedure Rho_Pi (A : in out State)
with Global => null,
Depends => (A => A),
Inline;
procedure Chi_Iota (A : in State;
AR : out State;
RI : in Round_Index)
with Global => null,
Depends => (AR => (A, RI)),
Inline;
end Keccak.Generic_KeccakF.Reference_Permutation;
|
reserve.xkas06.asm | n00btube/sm-energy-sizing | 0 | 5410 | ; By [n00btube](https://github.com/n00btube) aka Adam, February 2015.
; MIT license.
; There _may_ be a newer version on the GitHub.
lorom
; IMPORTANT ADDRESSES:
; 7E:09D4 - max reserve tank energy
; 7E:09D6 - current reserve tank energy
; 84:8986 - where the reserve tank PLM changes Samus's energy
; 84:E909 - size of a reserve tank
; 84:EFD3-FFFF - free space we're going to park code in
; the normal routine calculates the fresh size of a reserve tank, then carries
; on without leaving us room to mod anything. So, we'll overwrite its STA
; with a JSR and then put the STA as our first instruction. Both the STA and
; JSR are 3 bytes so that everything lines up perfectly.
; Address of existing instruction (part of the block starting at 84:8968)
org $84898D
JSR hijack_reserve
; This is an address you can move around the free space here as desired,
; you just need 14 bytes ($0E bytes) of room for it.
; 7 bytes ($07 bytes) if you take out the optional section.
org $84FFE0
; add single tank routine
hijack_reserve:
STA $09D4 ; instruction we overwrote, increase capacity
; OPTIONAL: ---------------------------------------
; If you leave this section IN: reserves will have exactly one tank's worth of
; energy. Best combined with single-tank.xkas06.asm.
; If you delete this section: reserves will completely fill when collecting a
; reserve tank, just like how E-tanks work in the original game.
LDA $09D6 ; load current reserves
; this add re-uses the value that was loaded earlier in the routine, as Y
; hasn't been changed since then.
CLC
ADC $0000,Y ; add value from 0 bytes after Y register (reserve tank size)
; END OPTIONAL SECTION ----------------------------
STA $09D6 ; save back to current reserves
RTS ; done.
|
oeis/211/A211479.asm | neoneye/loda-programs | 11 | 162517 | ; A211479: Number of -1..1 arrays x(i) of n+1 elements i=1..n+1 with x(i)+x(j), x(i+1)+x(j+1), -(x(i)+x(j+1)), and -(x(i+1)+x(j)) having two, three or four distinct values for every i<=n and j<=n.
; Submitted by <NAME>
; 8,22,58,150,382,962,2402,5958,14702,36130,88498,216198,527038,1282562,3116738,7565190,18345422,44452642,107643922,260526918,630270622,1524213890,3684989858,8906776518,21523708718,52004525602,125633423218,303472698630,732981473662,1770240952322,4275073991042,10323610159878,24928736761742,60193968585250,145342443736018,350930395664838,847306314280798,2045749182656642,4939216996454498,11925007809286470,28790881882469102,69510070109108002,167817619170451762,405158502589544838,978161012628608062
mov $2,1
lpb $0
sub $0,1
add $4,2
add $5,$2
mul $2,2
add $5,$4
mov $3,$5
mov $5,$4
add $4,$3
lpe
add $5,$4
mov $0,$5
mul $0,2
add $0,8
|
vbox/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-RegCtxRestore.asm | Nurzamal/rest_api_docker | 0 | 247574 | ; $Id: bs3-cmn-RegCtxRestore.asm 72133 2018-05-06 23:55:06Z vboxsync $
;; @file
; BS3Kit - Bs3RegCtxRestore.
;
;
; 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.
;
%include "bs3kit-template-header.mac"
BS3_EXTERN_SYSTEM16 Bs3Gdt
BS3_EXTERN_DATA16 g_bBs3CurrentMode
BS3_EXTERN_DATA16 g_fBs3TrapNoV86Assist
%if TMPL_BITS != 64
BS3_EXTERN_DATA16 g_uBs3CpuDetected
%endif
TMPL_BEGIN_TEXT
BS3_EXTERN_CMN Bs3Syscall
BS3_EXTERN_CMN Bs3Panic
TMPL_BEGIN_TEXT
;;
; Restores the given register context.
;
; @param pRegCtx
; @param fFlags
; @uses All registers and may trash stack immediately before the resume point.
;
; @note Only respects the BS3_MODE_CODE_MASK part of pRegCtx->bMode.
;
%if TMPL_BITS == 16
BS3_PROC_BEGIN_CMN Bs3RegCtxRestore_aborts, BS3_PBC_FAR ; special entry point for when watcom applies __aborts
BS3_PROC_BEGIN_CMN Bs3RegCtxRestore_aborts, BS3_PBC_NEAR ; special entry point for when watcom applies __aborts
CPU 8086
xor xAX, xAX
push xAX ; fake return address.
push xAX
jmp _Bs3RegCtxRestore_f16
%elif TMPL_BITS == 32
BS3_PROC_BEGIN_CMN Bs3RegCtxRestore_aborts, BS3_PBC_NEAR ; special entry point for when watcom applies __aborts
push 0feedfaceh ; fake return address.
%endif
BS3_PROC_BEGIN_CMN Bs3RegCtxRestore, BS3_PBC_HYBRID
BS3_CALL_CONV_PROLOG 2
push xBP
mov xBP, xSP
;
; If we're not in ring-0, ask the kernel to restore it for us (quicker
; and less problematic if we're in a funny context right now with weird
; CS or SS values).
;
%if TMPL_BITS == 16
cmp byte [BS3_DATA16_WRT(g_bBs3CurrentMode)], BS3_MODE_RM
je .in_ring0
test byte [BS3_DATA16_WRT(g_bBs3CurrentMode)], BS3_MODE_CODE_V86
jnz .do_syscall_restore_ctx
%endif
mov ax, ss
test al, 3
jz .in_ring0
.do_syscall_restore_ctx:
%if TMPL_BITS != 16
.do_syscall_restore_ctx_restore_ds:
mov cx, ds
mov xSI, [xBP + xCB*2]
movzx edx, word [xBP + xCB*3]
mov eax, BS3_SYSCALL_RESTORE_CTX
%else
mov si, [bp + xCB + cbCurRetAddr]
mov cx, [bp + xCB + cbCurRetAddr + 2]
mov dx, [bp + xCB + cbCurRetAddr + sCB]
mov ax, BS3_SYSCALL_RESTORE_CTX
%endif
call Bs3Syscall
call Bs3Panic
%if TMPL_BITS == 16
.do_syscall_restore_ctx_restore_ds:
push es
pop ds
jmp .do_syscall_restore_ctx
%endif
;
; Prologue. Loads ES with BS3KIT_GRPNM_DATA16/FLAT (for g_bBs3CurrentMode
; and g_uBs3CpuDetected), DS:xBX with pRegCtx and fFlags into xCX.
;
.in_ring0:
%if TMPL_BITS == 16
mov ax, BS3_SEL_DATA16
mov es, ax
lds bx, [bp + xCB + cbCurRetAddr]
mov cx, [bp + xCB + cbCurRetAddr + sCB]
%elif TMPL_BITS == 32
mov ax, BS3_SEL_R0_DS32
mov ds, ax
mov xBX, [xBP + xCB*2]
movzx xCX, word [xBP + xCB*3]
%else
mov ax, BS3_SEL_R0_DS64
mov ds, ax
mov xBX, [xBP + xCB*2]
movzx xCX, word [xBP + xCB*3]
%endif
%if TMPL_BITS != 64
; Restoring a 64-bit context is best done from 64-bit code.
mov al, [xBX + BS3REGCTX.bMode]
test al, BS3_MODE_CODE_64
jnz .do_syscall_restore_ctx_restore_ds
%endif
; The remainder must be done with interrupts disabled.
cli
;
; Update g_bs3CurrentMode.
;
%if TMPL_BITS == 64
mov al, [xBX + BS3REGCTX.bMode]
%endif
and al, BS3_MODE_CODE_MASK
mov ah, [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_bBs3CurrentMode)]
and ah, ~BS3_MODE_CODE_MASK
or al, ah
mov [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_bBs3CurrentMode)], al
;
; Set g_fBs3TrapNoV86Assist if BS3REGCTXRESTORE_F_NO_V86_ASSIST specified.
;
test cl, BS3REGCTXRESTORE_F_NO_V86_ASSIST
jz .no_f_no_v86_assist
mov byte [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_fBs3TrapNoV86Assist)], 1
.no_f_no_v86_assist:
%if TMPL_BITS == 16
;
; Check what the CPU can do.
;
cmp byte [es:BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80386
jae .restore_full
; Do the 80286 specifics first.
cmp byte [es:BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80286
jb .restore_16_bit_ancient
CPU 286
lmsw [bx + BS3REGCTX.cr0]
cmp byte [es:BS3_DATA16_WRT(g_bBs3CurrentMode)], BS3_MODE_RM
je .restore_16_bit_ancient
lldt [bx + BS3REGCTX.ldtr]
; TR - complicated because we need to clear the busy bit. ASSUMES GDT.
str ax
cmp ax, [bx + BS3REGCTX.tr]
je .skip_tr_286
mov di, word [xBX + BS3REGCTX.tr]
or di, di ; check for null.
jz .load_tr_286
push ds
push BS3_SEL_SYSTEM16
pop ds
add di, Bs3Gdt wrt BS3SYSTEM16
add di, X86DESCGENERIC_BIT_OFF_TYPE / 8
and byte [di], ~(X86_SEL_TYPE_SYS_TSS_BUSY_MASK << (X86DESCGENERIC_BIT_OFF_TYPE % 8))
pop ds
.load_tr_286:
ltr [bx + BS3REGCTX.tr]
.skip_tr_286:
.restore_16_bit_ancient:
CPU 8086
; Some general registers.
mov cx, [bx + BS3REGCTX.rcx]
mov dx, [bx + BS3REGCTX.rdx]
; Do the return frame and final registers (keep short as we're not quite
; NMI safe here if pRegCtx is on the stack).
cmp byte [es:BS3_DATA16_WRT(g_bBs3CurrentMode)], BS3_MODE_RM
mov di, [bx + BS3REGCTX.rsp]
je .restore_16_bit_same_privilege
cmp byte [bx + BS3REGCTX.bCpl], 0
je .restore_16_bit_same_privilege
mov ax, [bx + BS3REGCTX.ss]
push ax
mov ax, [bx + BS3REGCTX.rsp]
push ax
mov ax, [bx + BS3REGCTX.rflags]
push ax
mov ax, [bx + BS3REGCTX.cs]
push ax
mov ax, [bx + BS3REGCTX.rip]
push ax
mov ax, [bx + BS3REGCTX.ds]
push ax
mov si, [bx + BS3REGCTX.rsi]
mov di, [bx + BS3REGCTX.rdi]
mov es, [bx + BS3REGCTX.es]
mov ax, [bx + BS3REGCTX.rax]
mov bp, [bx + BS3REGCTX.rbp] ; restore late for better stacks.
mov bx, [bx + BS3REGCTX.rbx]
pop ds
iret
.restore_16_bit_same_privilege:
sub di, 2*5 ; iret frame + pop ds
mov si, di
mov es, [bx + BS3REGCTX.ss] ; ES is target stack segment.
cld
mov ax, [bx + BS3REGCTX.ds]
stosw
mov ax, [bx + BS3REGCTX.rbp] ; Restore esp as late as possible for better stacks.
stosw
mov ax, [bx + BS3REGCTX.rip]
stosw
mov ax, [bx + BS3REGCTX.cs]
stosw
mov ax, [bx + BS3REGCTX.rflags]
stosw
mov di, [bx + BS3REGCTX.rdi]
mov es, [bx + BS3REGCTX.es]
mov ax, [bx + BS3REGCTX.rax]
mov ss, [bx + BS3REGCTX.ss]
mov sp, si
mov si, [bx + BS3REGCTX.rsi]
mov bx, [bx + BS3REGCTX.rbx]
pop ds
pop bp
iret
CPU 386
%endif
.restore_full:
;
; 80386 or later.
; For 32-bit and 16-bit versions, we always use 32-bit iret.
;
; Restore control registers if they've changed.
test cl, BS3REGCTXRESTORE_F_SKIP_CRX
jnz .skip_control_regs
test byte [xBX + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR0_IS_MSW | BS3REG_CTX_F_NO_CR2_CR3
jnz .skip_control_regs
test byte [xBX + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR4 ; (old 486s and 386s didn't have CR4)
jnz .skip_cr4
%if TMPL_BITS != 64
test word [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_F_CPUID
jz .skip_cr4
%endif
mov sAX, [xBX + BS3REGCTX.cr4]
mov sDX, cr4
cmp sAX, sDX
je .skip_cr4
mov cr4, sAX
.skip_cr4:
mov sAX, [xBX + BS3REGCTX.cr0]
mov sDX, cr0
cmp sAX, sDX
je .skip_cr0
mov cr0, sAX
.skip_cr0:
mov sAX, [xBX + BS3REGCTX.cr3]
mov sDX, cr3
cmp sAX, sDX
je .skip_cr3
mov cr3, sAX
.skip_cr3:
mov sAX, [xBX + BS3REGCTX.cr2]
mov sDX, cr2
cmp sAX, sDX
je .skip_cr2
mov cr2, sAX
.skip_cr2:
;
; Restore
;
%if TMPL_BITS != 64
; We cannot restore ldtr and tr if we're in real-mode.
cmp byte [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_bBs3CurrentMode)], BS3_MODE_RM
je .skip_control_regs
%endif
test byte [xBX + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_TR_LDTR
jnz .skip_control_regs
; LDTR
sldt ax
cmp ax, [xBX + BS3REGCTX.ldtr]
je .skip_ldtr
lldt [xBX + BS3REGCTX.ldtr]
.skip_ldtr:
; TR - complicated because we need to clear the busy bit. ASSUMES GDT.
str ax
cmp ax, [xBX + BS3REGCTX.tr]
je .skip_tr
movzx edi, word [xBX + BS3REGCTX.tr]
or edi, edi ; check for null.
jz .load_tr
%if TMPL_BITS == 16
push ds
push BS3_SEL_SYSTEM16
pop ds
add xDI, Bs3Gdt wrt BS3SYSTEM16
%else
add xDI, Bs3Gdt wrt FLAT
%endif
add xDI, X86DESCGENERIC_BIT_OFF_TYPE / 8
and byte [xDI], ~(X86_SEL_TYPE_SYS_TSS_BUSY_MASK << (X86DESCGENERIC_BIT_OFF_TYPE % 8))
%if TMPL_BITS == 16
pop ds
%endif
.load_tr:
ltr [xBX + BS3REGCTX.tr]
.skip_tr:
.skip_control_regs:
%if TMPL_BITS == 64
;
; 64-bit returns are simple because ss:rsp are always restored.
;
; A small complication here when returning to a 16-bit stack (only
; applicable to 16-bit and 32-bit code), iret doesn't touch the high
; ESP bits and we can easily later end up with trap handlers
; accessing memory never intended as stack.
;
mov rcx, qword [xBX + BS3REGCTX.rsp] ; (also 1st param for conv call below)
cmp rcx, 0ffffh
ja .iretq_maybe_annoying_16bit_stack
cmp rsp, 0ffffh
ja .iretq_maybe_annoying_16bit_stack
.iretq_ok:
movzx eax, word [xBX + BS3REGCTX.ss]
push rax
push qword [xBX + BS3REGCTX.rsp]
push qword [xBX + BS3REGCTX.rflags]
movzx eax, word [xBX + BS3REGCTX.cs]
push rax
push qword [xBX + BS3REGCTX.rip]
.iretq_restore_regs_and_iret:
mov es, [xBX + BS3REGCTX.es]
mov fs, [xBX + BS3REGCTX.fs]
mov gs, [xBX + BS3REGCTX.gs]
mov rax, [xBX + BS3REGCTX.rax]
mov rdx, [xBX + BS3REGCTX.rdx]
mov rcx, [xBX + BS3REGCTX.rcx]
mov rsi, [xBX + BS3REGCTX.rsi]
mov rdi, [xBX + BS3REGCTX.rdi]
mov r8, [xBX + BS3REGCTX.r8]
mov r9, [xBX + BS3REGCTX.r9]
mov r10, [xBX + BS3REGCTX.r10]
mov r11, [xBX + BS3REGCTX.r11]
mov r12, [xBX + BS3REGCTX.r12]
mov r13, [xBX + BS3REGCTX.r13]
mov r14, [xBX + BS3REGCTX.r14]
mov r15, [xBX + BS3REGCTX.r15]
mov rbp, [xBX + BS3REGCTX.rbp] ; restore late for better stacks.
mov ds, [xBX + BS3REGCTX.ds]
mov rbx, [xBX + BS3REGCTX.rbx]
iretq
.iretq_maybe_annoying_16bit_stack:
movzx edx, word [xBX + BS3REGCTX.ss] ; (also 2nd param for conv call below)
lar eax, dx
jnz .iretq_ok
test eax, X86LAR_F_D | X86LAR_F_L
jnz .iretq_ok ; Returning to a big of long SS needs not extra work.
lar eax, word [xBX + BS3REGCTX.cs]
jnz .iretq_ok
test eax, X86LAR_F_L
jnz .iretq_ok ; It doesn't matter when returning to 64-bit code.
; Convert ss:sp to a flat address.
BS3_EXTERN_CMN Bs3SelFar32ToFlat32NoClobber
call Bs3SelFar32ToFlat32NoClobber
mov rdi, rax
; 2nd return frame (32-bit, same CPL).
mov eax, [xBX + BS3REGCTX.rflags]
mov [rdi - 4], eax
movzx eax, word [xBX + BS3REGCTX.cs]
mov [rdi - 8], eax
mov eax, [xBX + BS3REGCTX.rip]
mov [rdi - 12], eax
mov ecx, [xBX + BS3REGCTX.rsp]
sub cx, 12
mov [rdi - 16], ecx
; 1st return frame.
movzx eax, word [xBX + BS3REGCTX.ss]
push rax ; new 16-bit SS
sub cx, 4
push rcx ; new esp
mov rax, [xBX + BS3REGCTX.rflags]
and rax, ~(X86_EFL_NT | X86_EFL_TF)
push rax ; rflags
AssertCompile(BS3_SEL_RING_SHIFT == 8)
mov eax, BS3_SEL_R0_CS32
add ah, [xBX + BS3REGCTX.bCpl]
or al, [xBX + BS3REGCTX.bCpl]
push rax ; 32-bit CS
push .iretq_pop_real_esp_and_iret_again wrt FLAT
jmp .iretq_restore_regs_and_iret
BS3_SET_BITS 32
.iretq_pop_real_esp_and_iret_again:
pop esp
iretd
BS3_SET_BITS 64
%else
;
; 32-bit/16-bit is more complicated as we have three different iret frames.
;
mov al, [BS3_ONLY_16BIT(es:) BS3_DATA16_WRT(g_bBs3CurrentMode)]
cmp al, BS3_MODE_RM
je .iretd_same_cpl_rm
test dword [xBX + BS3REGCTX.rflags], X86_EFL_VM
jnz .restore_v8086
cmp byte [xBX + BS3REGCTX.bCpl], 0
je .iretd_same_cpl
;
; IRETD to different CPL. Frame includes ss:esp.
;
.iretd_different_cpl:
or eax, 0ffffffffh ; poison unused parts of segment pushes
mov ax, [xBX + BS3REGCTX.ss]
push eax
push dword [xBX + BS3REGCTX.rsp]
push dword [xBX + BS3REGCTX.rflags]
mov ax, [xBX + BS3REGCTX.cs]
push eax
push dword [xBX + BS3REGCTX.rip]
push dword [xBX + BS3REGCTX.rbp] ; Restore esp as late as possible for better stacks.
mov ax, [xBX + BS3REGCTX.ds]
push xAX
mov es, [xBX + BS3REGCTX.es]
mov fs, [xBX + BS3REGCTX.fs]
mov gs, [xBX + BS3REGCTX.gs]
mov eax, [xBX + BS3REGCTX.rax]
mov edx, [xBX + BS3REGCTX.rdx]
mov ecx, [xBX + BS3REGCTX.rcx]
mov esi, [xBX + BS3REGCTX.rsi]
%if TMPL_BITS == 16 ; if SS is 16-bit, we will not be able to restore the high word.
;; @todo 16-bit stack will also mess us up in 32-bit code, so this needs fixing (see 64-bit above).
mov edi, [xBX + BS3REGCTX.rsp]
mov di, sp
mov esp, edi
%endif
mov edi, [xBX + BS3REGCTX.rdi]
mov ebx, [xBX + BS3REGCTX.rbx]
pop ds
pop ebp
iretd
;
; IRETD to same CPL (includes real mode).
;
.iretd_same_cpl_rm:
; Use STOSD/ES:EDI to create the frame.
mov es, [xBX + BS3REGCTX.ss]
mov esi, [xBX + BS3REGCTX.rsp]
sub esi, 5*4
movzx edi, si
jmp .es_edi_is_pointing_to_return_frame_location
.iretd_same_cpl:
; Use STOSD/ES:EDI to create the frame.
mov es, [xBX + BS3REGCTX.ss]
mov edi, [xBX + BS3REGCTX.rsp]
sub edi, 5*4
; Which part of the stack pointer is actually used depends on the SS.D/B bit.
lar eax, [xBX + BS3REGCTX.ss]
jnz .using_32_bit_stack_pointer
test eax, X86LAR_F_D
jnz .using_32_bit_stack_pointer
.using_16_bit_stack_pointer:
mov esi, edi ; save rsp for later.
movzx edi, di
jmp .es_edi_is_pointing_to_return_frame_location
.using_32_bit_stack_pointer:
mov esi, edi
.es_edi_is_pointing_to_return_frame_location:
cld
mov ax, [xBX + BS3REGCTX.ds]
o32 stosd
mov eax, [xBX + BS3REGCTX.rbp] ; Restore esp as late as possible for better stacks.
o32 stosd
mov eax, [xBX + BS3REGCTX.rip]
o32 stosd
mov ax, [xBX + BS3REGCTX.cs]
o32 stosd
mov eax, [xBX + BS3REGCTX.rflags]
o32 stosd
mov es, [xBX + BS3REGCTX.es]
mov fs, [xBX + BS3REGCTX.fs]
mov gs, [xBX + BS3REGCTX.gs]
mov eax, [xBX + BS3REGCTX.rax]
mov edx, [xBX + BS3REGCTX.rdx]
mov ecx, [xBX + BS3REGCTX.rcx]
mov edi, [xBX + BS3REGCTX.rdi]
mov ebp, [xBX + BS3REGCTX.rbp] ; restore late for better stacks.
mov ss, [xBX + BS3REGCTX.ss]
mov esp, esi
mov esi, [xBX + BS3REGCTX.rsi]
mov ebx, [xBX + BS3REGCTX.rbx]
o32 pop ds
pop ebp
iretd
;
; IRETD to v8086 mode. Frame includes ss:esp and the 4 data segment registers.
;
.restore_v8086:
or eax, 0ffffffffh ; poison unused parts of segment pushes
mov eax, [xBX + BS3REGCTX.gs]
push eax
mov eax, [xBX + BS3REGCTX.fs]
push eax
mov eax, [xBX + BS3REGCTX.ds]
push eax
mov eax, [xBX + BS3REGCTX.es]
push eax
mov eax, [xBX + BS3REGCTX.ss]
push eax
push dword [xBX + BS3REGCTX.rsp]
push dword [xBX + BS3REGCTX.rflags]
mov ax, [xBX + BS3REGCTX.cs]
push eax
push dword [xBX + BS3REGCTX.rip]
mov eax, [xBX + BS3REGCTX.rax]
mov edx, [xBX + BS3REGCTX.rdx]
mov ecx, [xBX + BS3REGCTX.rcx]
mov esi, [xBX + BS3REGCTX.rsi]
mov edi, [xBX + BS3REGCTX.rdi]
mov ebp, [xBX + BS3REGCTX.rbp] ; restore late for better stacks.
mov ebx, [xBX + BS3REGCTX.rbx]
iretd
%endif
BS3_PROC_END_CMN Bs3RegCtxRestore
|
source/amf/utp/amf-utp-test_logs.ads | svn2github/matreshka | 24 | 15700 | <reponame>svn2github/matreshka<gh_stars>10-100
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, <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$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.String_Collections;
limited with AMF.UML.Behaviors;
package AMF.Utp.Test_Logs is
pragma Preelaborate;
type Utp_Test_Log is limited interface;
type Utp_Test_Log_Access is
access all Utp_Test_Log'Class;
for Utp_Test_Log_Access'Storage_Size use 0;
not overriding function Get_Base_Behavior
(Self : not null access constant Utp_Test_Log)
return AMF.UML.Behaviors.UML_Behavior_Access is abstract;
-- Getter of TestLog::base_Behavior.
--
not overriding procedure Set_Base_Behavior
(Self : not null access Utp_Test_Log;
To : AMF.UML.Behaviors.UML_Behavior_Access) is abstract;
-- Setter of TestLog::base_Behavior.
--
not overriding function Get_Tester
(Self : not null access constant Utp_Test_Log)
return AMF.String_Collections.Set_Of_String is abstract;
-- Getter of TestLog::tester.
--
not overriding function Get_Executed_At
(Self : not null access constant Utp_Test_Log)
return AMF.Optional_String is abstract;
-- Getter of TestLog::executedAt.
--
not overriding procedure Set_Executed_At
(Self : not null access Utp_Test_Log;
To : AMF.Optional_String) is abstract;
-- Setter of TestLog::executedAt.
--
not overriding function Get_Duration
(Self : not null access constant Utp_Test_Log)
return AMF.Optional_String is abstract;
-- Getter of TestLog::duration.
--
not overriding procedure Set_Duration
(Self : not null access Utp_Test_Log;
To : AMF.Optional_String) is abstract;
-- Setter of TestLog::duration.
--
not overriding function Get_Verdict
(Self : not null access constant Utp_Test_Log)
return AMF.Utp.Utp_Verdict is abstract;
-- Getter of TestLog::verdict.
--
not overriding procedure Set_Verdict
(Self : not null access Utp_Test_Log;
To : AMF.Utp.Utp_Verdict) is abstract;
-- Setter of TestLog::verdict.
--
not overriding function Get_Verdict_Reason
(Self : not null access constant Utp_Test_Log)
return AMF.Optional_String is abstract;
-- Getter of TestLog::verdictReason.
--
not overriding procedure Set_Verdict_Reason
(Self : not null access Utp_Test_Log;
To : AMF.Optional_String) is abstract;
-- Setter of TestLog::verdictReason.
--
not overriding function Get_Sut_Version
(Self : not null access constant Utp_Test_Log)
return AMF.Optional_String is abstract;
-- Getter of TestLog::sutVersion.
--
not overriding procedure Set_Sut_Version
(Self : not null access Utp_Test_Log;
To : AMF.Optional_String) is abstract;
-- Setter of TestLog::sutVersion.
--
end AMF.Utp.Test_Logs;
|
VirtualBox-5.0.0/src/VBox/HostDrivers/Support/win/SUPDrvA-win.asm | egraba/vbox_openbsd | 1 | 178727 | ; $Id: SUPDrvA-win.asm $
;; @file
; VirtualBox Support Driver - Windows NT specific assembly parts.
;
;
; Copyright (C) 2006-2015 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 "iprt/asmdefs.mac"
BEGINCODE
%ifdef RT_ARCH_AMD64
%define _DbgPrint DbgPrint
%endif
extern _DbgPrint
%if 1 ; see alternative in SUPDrv-win.cpp
;;
; Kind of alias for DbgPrint
export NAME(SUPR0Printf)
BEGINPROC SUPR0Printf
jmp _DbgPrint
ENDPROC SUPR0Printf
%endif
%ifdef VBOX_WITH_HARDENING
%ifdef RT_ARCH_X86
;
; Faking up ZwQueryVirtualMemory on XP and W2K3 where it's not exported.
; Using ZwOpenFile as a helper as it has the name number of parameters.
;
extern IMPNAME(ZwOpenFile@24)
BEGINPROC supdrvNtQueryVirtualMemory_Xxx
%macro NtQueryVirtualMemorySyscall 1
GLOBALNAME supdrvNtQueryVirtualMemory_ %+ %1
mov eax, %1
jmp supdrvNtQueryVirtualMemory_Jump
%endm
NtQueryVirtualMemorySyscall 0xAF
NtQueryVirtualMemorySyscall 0xB0
NtQueryVirtualMemorySyscall 0xB1
NtQueryVirtualMemorySyscall 0xB2
NtQueryVirtualMemorySyscall 0xB3
NtQueryVirtualMemorySyscall 0xB4
NtQueryVirtualMemorySyscall 0xB5
NtQueryVirtualMemorySyscall 0xB6
NtQueryVirtualMemorySyscall 0xB7
NtQueryVirtualMemorySyscall 0xB8
NtQueryVirtualMemorySyscall 0xB9
NtQueryVirtualMemorySyscall 0xBA
NtQueryVirtualMemorySyscall 0xBB
NtQueryVirtualMemorySyscall 0xBC
NtQueryVirtualMemorySyscall 0xBD
NtQueryVirtualMemorySyscall 0xBE
supdrvNtQueryVirtualMemory_Jump:
mov edx, IMP2(ZwOpenFile@24)
lea edx, [edx + 5]
jmp edx
ENDPROC supdrvNtQueryVirtualMemory_Xxx
%endif
%ifdef RT_ARCH_AMD64
;
; Faking up ZwQueryVirtualMemory on XP64 and W2K3-64 where it's not exported.
; The C code locates and verifies the essentials in ZwRequestWaitReplyPort.
;
extern NAME(g_pfnKiServiceLinkage)
extern NAME(g_pfnKiServiceInternal)
BEGINPROC supdrvNtQueryVirtualMemory_Xxx
%macro NtQueryVirtualMemorySyscall 1
GLOBALNAME supdrvNtQueryVirtualMemory_ %+ %1
mov eax, %1
jmp supdrvNtQueryVirtualMemory_Jump
%endm
NtQueryVirtualMemorySyscall 0x1F
NtQueryVirtualMemorySyscall 0x20
NtQueryVirtualMemorySyscall 0x21
NtQueryVirtualMemorySyscall 0x22
NtQueryVirtualMemorySyscall 0x23
supdrvNtQueryVirtualMemory_Jump:
cli
mov r10, rsp ; save call frame pointer.
mov r11, [NAME(g_pfnKiServiceLinkage) wrt rip]
push 0
push 0
push r10 ; call frame pointer (incoming rsp).
pushfq
push 10h
push r11 ; r11 = KiServiceLinkage (ret w/ unwind info)
jmp qword [NAME(g_pfnKiServiceInternal) wrt rip]
ENDPROC supdrvNtQueryVirtualMemory_Xxx
%endif
%endif ; VBOX_WITH_HARDENING
|
archive/agda-2/Oscar/Data/Product.agda | m0davis/oscar | 0 | 10228 |
module Oscar.Data.Product where
open import Data.Product public using (Σ; _,_; proj₁; proj₂; ∃; ∃₂; _×_)
|
libsrc/_DEVELOPMENT/math/integer/l_divu_32_32x16.asm | meesokim/z88dk | 0 | 12845 |
INCLUDE "clib_cfg.asm"
SECTION code_math
PUBLIC l_divu_32_32x16, l0_divu_32_32x16
; compute: dehl = dehl / bc, dehl' = dehl % bc
; alters : af, bc, de, hl, bc', de', hl', ix
; alternate entry (l0_divu_32_32x16)
; skips divide by zero check
IF __CLIB_OPT_IMATH <= 50
EXTERN l_small_divu_32_32x32, l0_small_divu_32_32x32
l_divu_32_32x16:
scf
l0_divu_32_32x16:
push bc
exx
pop hl
ld de,0
jp nc, l0_small_divu_32_32x32
jp l_small_divu_32_32x32
ENDIF
IF __CLIB_OPT_IMATH > 50
EXTERN l_fast_divu_32_32x16, l0_fast_divu_32_32x16
defc l_divu_32_32x16 = l_fast_divu_32_32x16
defc l0_divu_32_32x16 = l0_fast_divu_32_32x16
ENDIF
|
programs/oeis/020/A020720.asm | neoneye/loda | 22 | 6513 | <filename>programs/oeis/020/A020720.asm<gh_stars>10-100
; A020720: Pisot sequences E(7,9), P(7,9).
; 7,9,12,16,21,28,37,49,65,86,114,151,200,265,351,465,616,816,1081,1432,1897,2513,3329,4410,5842,7739,10252,13581,17991,23833,31572,41824,55405,73396,97229,128801,170625,226030,299426,396655,525456,696081,922111,1221537,1618192,2143648,2839729,3761840,4983377,6601569,8745217,11584946,15346786,20330163,26931732,35676949,47261895,62608681,82938844,109870576,145547525,192809420,255418101,338356945,448227521,593775046,786584466,1042002567,1380359512,1828587033,2422362079,3208946545,4250949112,5631308624,7459895657,9882257736,13091204281,17342153393,22973462017,30433357674,40315615410,53406819691,70748973084,93722435101,124155792775,164471408185,217878227876,288627200960,382349636061,506505428836,670976837021,888855064897,1177482265857,1559831901918,2066337330754,2737314167775,3626169232672,4803651498529,6363483400447,8429820731201
add $0,8
seq $0,134816 ; Padovan's spiral numbers.
|
Sources/Model/arrow_p.adb | ForYouEyesOnly/Space-Convoy | 1 | 21186 | <gh_stars>1-10
--
-- Jan & <NAME>, Australia, July 2011
--
with GL, GL.Materials, GLOBE_3D.Math;
package body Arrow_P is
-- Pretty output: FALSE
use GL, GL.Materials, GLOBE_3D, GLOBE_3D.Math;
-- begin Separator # 1
-- VRML: [# triangle mesh
-- ]
matos_1 : constant Material_type := (
ambient => (0.0, 0.0, 0.0, 1.0),
specular => (0.0, 0.0, 0.0, 1.0),
diffuse => (1.0, 1.0, 1.0, 1.0),
emission => (0.0, 0.0, 0.0, 1.0),
shininess => 128.0
);
coord_1 : constant Point_3D_array :=
((3.0, 5.0, -3.0), -- VRML: [# coord point 0
-- ]
(-2.142857, 5.0, -2.142857), (-1.285714, 5.0, -2.142857), (-0.428571, 5.0, -2.142857), (0.428571, 5.0, -2.142857),
(1.285714, 5.0, -2.142857), (2.142857, 5.0, -2.142857), (-2.142857, 5.0, -1.285714), (-1.285714, 5.0, -1.285714), (-0.428571, 5.0, -1.285714),
(0.428571, 5.0, -1.285714), (1.285714, 5.0, -1.285714), (2.142857, 5.0, -1.285714), (-2.142857, 5.0, -0.428571), (-1.285714, 5.0, -0.428571),
(1.285714, 5.0, -0.428571), (2.142857, 5.0, -0.428571), (-2.142857, 5.0, 0.428571), (-1.285714, 5.0, 0.428571), (1.285714, 5.0, 0.428571),
(2.142857, 5.0, 0.428571), (-2.142857, 5.0, 1.285714), (-1.285714, 5.0, 1.285714), (-0.428571, 5.0, 1.285714), (0.428571, 5.0, 1.285714),
(1.285714, 5.0, 1.285714), -- VRML: [# coord point 25
-- ]
(2.142857, 5.0, 1.285714), (-2.142857, 5.0, 2.142857), (-1.285714, 5.0, 2.142857), (-0.428571, 5.0, 2.142857),
(0.428571, 5.0, 2.142857), (1.285714, 5.0, 2.142857), (2.142857, 5.0, 2.142857), (-3.0, 5.0, -3.0), (-3.0, 5.0, -2.4),
(-3.0, 5.0, -1.8), (-3.0, 5.0, -1.2), (-3.0, 5.0, -0.6), (-3.0, 5.0, 0.0), (-3.0, 5.0, 0.6),
(-3.0, 5.0, 1.2), (-3.0, 5.0, 1.8), (-3.0, 5.0, 2.4), (3.0, 5.0, 3.0), (3.0, 5.0, 2.4),
(3.0, 5.0, 1.8), (3.0, 5.0, 1.2), (3.0, 5.0, 0.6), (3.0, 5.0, 0.0), (3.0, 5.0, -0.6),
(3.0, 5.0, -1.2), -- VRML: [# coord point 50
-- ]
(3.0, 5.0, -1.8), (3.0, 5.0, -2.4), (2.4, 5.0, -3.0), (1.8, 5.0, -3.0),
(1.2, 5.0, -3.0), (0.6, 5.0, -3.0), (0.0, 5.0, -3.0), (-0.6, 5.0, -3.0), (-1.2, 5.0, -3.0),
(-1.8, 5.0, -3.0), (-2.4, 5.0, -3.0), (-3.0, 5.0, 3.0), (-2.4, 5.0, 3.0), (-1.8, 5.0, 3.0),
(-1.2, 5.0, 3.0), (-0.6, 5.0, 3.0), (0.0, 5.0, 3.0), (0.6, 5.0, 3.0), (1.2, 5.0, 3.0),
(1.8, 5.0, 3.0), (2.4, 5.0, 3.0), (1.0, 5.0, 1.0), (0.5, 5.0, 1.0), (-0.0, 5.0, 1.0),
(-0.5, 5.0, 1.0), -- VRML: [# coord point 75
-- ]
(-1.0, 5.0, 1.0), (1.0, 5.0, -1.0), (1.0, 5.0, -0.5), (1.0, 5.0, -0.0),
(1.0, 5.0, 0.5), (-1.0, 5.0, -1.0), (-0.5, 5.0, -1.0), (-0.0, 5.0, -1.0), (0.5, 5.0, -1.0),
(-1.0, 5.0, 0.5), (-1.0, 5.0, 0.0), (-1.0, 5.0, -0.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(-3.0, 5.0, -3.0), (-3.0, 5.0, 3.0), (-1.5, 2.5, -1.5), (-3.0, 5.0, -2.4), (-3.0, 5.0, -1.8),
(-3.0, 5.0, -1.2), (-3.0, 5.0, -0.6), (-3.0, 5.0, 0.0), (-3.0, 5.0, 0.6), (-3.0, 5.0, 1.2),
(-3.0, 5.0, 1.8), -- VRML: [# coord point 100
-- ]
(-3.0, 5.0, 2.4), (-1.5, 2.5, 1.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(3.0, 5.0, -3.0), (3.0, 5.0, 3.0), (1.5, 2.5, -1.5), (3.0, 5.0, -2.4), (3.0, 5.0, -1.8),
(3.0, 5.0, -1.2), (3.0, 5.0, -0.6), (3.0, 5.0, 0.0), (3.0, 5.0, 0.6), (3.0, 5.0, 1.2),
(3.0, 5.0, 1.8), (3.0, 5.0, 2.4), (1.5, 2.5, 1.5), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(1.5, 2.5, -1.5), (-3.0, 5.0, -3.0), (3.0, 5.0, -3.0), (-1.5, 2.5, -1.5), (-2.4, 5.0, -3.0),
(-1.8, 5.0, -3.0), -- VRML: [# coord point 125
-- ]
(-1.2, 5.0, -3.0), (-0.6, 5.0, -3.0), (0.0, 5.0, -3.0), (0.6, 5.0, -3.0),
(1.2, 5.0, -3.0), (1.8, 5.0, -3.0), (2.4, 5.0, -3.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0),
(-3.0, 5.0, 3.0), (3.0, 5.0, 3.0), (-1.5, 2.5, 1.5), (1.5, 2.5, 1.5), (-2.4, 5.0, 3.0),
(-1.8, 5.0, 3.0), (-1.2, 5.0, 3.0), (-0.6, 5.0, 3.0), (0.0, 5.0, 3.0), (0.6, 5.0, 3.0),
(1.2, 5.0, 3.0), (1.8, 5.0, 3.0), (2.4, 5.0, 3.0), (-1.0, 9.0, 1.0), (-1.0, 9.0, -1.0),
(1.0, 9.0, 1.0), -- VRML: [# coord point 150
-- ]
(1.0, 9.0, -1.0), (-1.0, 5.0, 1.0), (-1.0, 9.0, 1.0), (1.0, 9.0, 1.0),
(-0.5, 5.0, 1.0), (-0.0, 5.0, 1.0), (0.5, 5.0, 1.0), (1.0, 5.0, 1.0), (1.0, 9.0, 1.0),
(1.0, 5.0, -1.0), (1.0, 9.0, -1.0), (1.0, 5.0, 1.0), (1.0, 5.0, 0.5), (1.0, 5.0, -0.0),
(1.0, 5.0, -0.5), (1.0, 9.0, -1.0), (-1.0, 5.0, -1.0), (-1.0, 9.0, -1.0), (1.0, 5.0, -1.0),
(0.5, 5.0, -1.0), (-0.0, 5.0, -1.0), (-0.5, 5.0, -1.0), (-1.0, 5.0, -1.0), (-1.0, 9.0, -1.0),
(-1.0, 9.0, 1.0), -- VRML: [# coord point 175
-- ]
(-1.0, 5.0, -0.5), (-1.0, 5.0, 0.0), (-1.0, 5.0, 0.5), (-1.0, 5.0, 1.0) -- 180
);
-- VRML: [# 180 vertices
-- ]
-- begin Separator # 2
-- VRML: [#triangle mesh
-- ]
idx_2 : constant Idx_4_array_array :=
((9, 3, 2, 0), -- VRML: [# triangle 0
-- ]
(9, 2, 8, 0), (10, 4, 3, 0), (10, 3, 9, 0), (11, 5, 4, 0), (11, 4, 10, 0), (12, 6, 5, 0), (12, 5, 11, 0),
(13, 7, 6, 0), (13, 6, 12, 0), (15, 9, 8, 0), (15, 8, 14, 0), (17, 13, 12, 0), (17, 12, 16, 0), (19, 15, 14, 0), (19, 14, 18, 0),
(21, 17, 16, 0), (21, 16, 20, 0), (23, 19, 18, 0), (23, 18, 22, 0), (27, 21, 20, 0), (27, 20, 26, 0), (29, 23, 22, 0), (29, 22, 28, 0),
(30, 24, 23, 0), (30, 23, 29, 0), -- VRML: [# triangle 25
-- ]
(31, 25, 24, 0), (31, 24, 30, 0), (32, 26, 25, 0), (32, 25, 31, 0), (33, 27, 26, 0), (33, 26, 32, 0),
(35, 62, 34, 0), (2, 35, 36, 0), (62, 35, 2, 0), (61, 62, 2, 0), (3, 60, 61, 0), (3, 59, 60, 0), (58, 59, 4, 0), (3, 4, 59, 0),
(4, 5, 58, 0), (3, 61, 2, 0), (36, 8, 2, 0), (8, 38, 14, 0), (39, 14, 38, 0), (37, 38, 8, 0), (37, 8, 36, 0), (84, 10, 83, 0),
(82, 83, 10, 0), (88, 82, 15, 0), (9, 15, 82, 0), -- VRML: [# triangle 50
-- ]
(82, 10, 9, 0), (87, 88, 15, 0), (10, 84, 11, 0), (6, 56, 57, 0), (57, 5, 6, 0),
(5, 57, 58, 0), (55, 56, 6, 0), (7, 54, 55, 0), (53, 1, 54, 0), (52, 53, 7, 0), (54, 7, 53, 0), (7, 13, 52, 0), (7, 55, 6, 0),
(78, 16, 12, 0), (78, 12, 11, 0), (79, 16, 78, 0), (78, 11, 85, 0), (80, 16, 79, 0), (51, 13, 50, 0), (17, 50, 13, 0), (52, 13, 51, 0),
(21, 49, 17, 0), (50, 17, 49, 0), (80, 20, 16, 0), (85, 11, 84, 0), -- VRML: [# triangle 75
-- ]
(40, 18, 39, 0), (22, 40, 41, 0), (42, 22, 41, 0), (18, 40, 22, 0),
(86, 87, 19, 0), (19, 87, 15, 0), (77, 86, 19, 0), (77, 24, 76, 0), (19, 23, 77, 0), (23, 24, 77, 0), (39, 18, 14, 0), (43, 28, 42, 0),
(64, 43, 63, 0), (28, 43, 64, 0), (65, 28, 64, 0), (67, 30, 29, 0), (29, 65, 66, 0), (29, 66, 67, 0), (65, 29, 28, 0), (68, 30, 67, 0),
(42, 28, 22, 0), (75, 76, 24, 0), (20, 81, 73, 0), (25, 74, 75, 0), (25, 75, 24, 0), -- VRML: [# triangle 100
-- ]
(73, 74, 25, 0), (26, 73, 25, 0), (48, 21, 27, 0),
(49, 21, 48, 0), (47, 48, 27, 0), (46, 47, 27, 0), (26, 20, 73, 0), (81, 20, 80, 0), (69, 32, 31, 0), (31, 68, 69, 0), (32, 69, 70, 0),
(71, 32, 70, 0), (45, 46, 33, 0), (33, 46, 27, 0), (72, 45, 33, 0), (33, 71, 72, 0), (45, 72, 44, 0), (71, 33, 32, 0), (31, 30, 68, 0),
(94, 91, 93, 0), (103, 93, 90, 0), (103, 98, 93, 0), (93, 95, 94, 0), (95, 93, 96, 0), (93, 97, 96, 0), -- VRML: [# triangle 125
-- ]
(103, 99, 98, 0), (93, 98, 97, 0),
(103, 101, 100, 0), (103, 92, 102, 0), (103, 102, 101, 0), (103, 100, 99, 0), (109, 108, 106, 0), (118, 105, 108, 0), (118, 108, 113, 0), (108, 109, 110, 0),
(110, 111, 108, 0), (108, 111, 112, 0), (118, 113, 114, 0), (108, 112, 113, 0), (118, 115, 116, 0), (118, 117, 107, 0), (118, 116, 117, 0), (118, 114, 115, 0),
(125, 124, 122, 0), (121, 120, 124, 0), (121, 124, 129, 0), (124, 125, 126, 0), (126, 127, 124, 0), (124, 127, 128, 0), (121, 129, 130, 0), -- VRML: [# triangle 150
-- ]
(124, 128, 129, 0),
(121, 131, 132, 0), (121, 133, 123, 0), (121, 132, 133, 0), (121, 130, 131, 0), (139, 138, 134, 0), (140, 136, 138, 0), (139, 144, 138, 0), (138, 141, 140, 0),
(141, 138, 142, 0), (138, 143, 142, 0), (139, 145, 144, 0), (138, 144, 143, 0), (139, 147, 146, 0), (139, 137, 148, 0), (139, 148, 147, 0), (139, 146, 145, 0),
(151, 150, 149, 0), (150, 151, 152, 0), (154, 153, 156, 0), (157, 154, 156, 0), (155, 157, 158, 0), (158, 159, 155, 0), (154, 157, 155, 0), (160, 163, 164, 0),
-- VRML: [# triangle 175
-- ]
(165, 160, 164, 0), (162, 165, 166, 0), (166, 161, 162, 0), (160, 165, 162, 0), (167, 170, 171, 0), (172, 167, 171, 0), (169, 172, 173, 0), (173, 168, 169, 0),
(167, 172, 169, 0), (175, 174, 177, 0), (178, 175, 177, 0), (176, 178, 179, 0), (179, 180, 176, 0), (175, 178, 176, 0) -- 190
);
-- VRML: [# 190 triangles
-- ]
-- last index now: 0
-- end Separator # 2
-- VRML: [#triangle mesh
-- ]
-- last index now: 0
-- end Separator # 2
-- VRML: [# triangle mesh
-- ]
procedure Create (
object : in out GLOBE_3D.p_Object_3D;
object_scale : GLOBE_3D.Real;
centre : GLOBE_3D.Point_3D
)
is
face_0 : Face_type; -- takes defaults values
begin
object :=
new Object_3D (Max_points => 180, Max_faces => 190);
object.all.Centre := centre;
Set_name (object.all, "insect_body");
face_0.skin := material_only;
face_0.material := VRML_Defaults;
-- Creating separator # 1
if Almost_zero (object_scale - 1.0) then
object.all.Point (1 .. 180) := coord_1;
else
for p in 1 .. 180 loop
object.all.Point (0 + p) := object_scale * coord_1 (p);
end loop;
end if;
face_0.material := matos_1;
-- Creating separator # 2
for f in 1 .. 190 loop
face_0.P := idx_2 (f);
object.all.face (0 + f) := face_0;
end loop;
end Create;
end Arrow_P;
-- Converted by Wrl2Ada
|
test/asset/agda-stdlib-1.0/Data/Vec/Relation/Equality/Setoid.agda | omega12345/agda-mode | 0 | 608 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Binary.Equality.Setoid directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Data.Vec.Relation.Equality.Setoid
{a ℓ} (S : Setoid a ℓ) where
open import Data.Vec.Relation.Binary.Equality.Setoid S public
|
oeis/084/A084431.asm | neoneye/loda-programs | 11 | 83000 | <gh_stars>10-100
; A084431: Expansion of (1 + 6*x + 5*x^2)/((1-2*x)*(1+2*x)).
; 1,6,9,24,36,96,144,384,576,1536,2304,6144,9216,24576,36864,98304,147456,393216,589824,1572864,2359296,6291456,9437184,25165824,37748736,100663296,150994944,402653184,603979776,1610612736,2415919104,6442450944,9663676416,25769803776,38654705664,103079215104,154618822656,412316860416,618475290624,1649267441664,2473901162496,6597069766656,9895604649984,26388279066624,39582418599936,105553116266496,158329674399744,422212465065984,633318697598976,1688849860263936,2533274790395904,6755399441055744
mov $1,2
pow $1,$0
mov $2,$0
mod $2,2
add $2,3
mul $1,$2
div $1,2
mul $1,3
div $1,2
mov $0,$1
|
asm/control.asm | anizzomc/damocles64 | 0 | 162718 | <filename>asm/control.asm
;
; control.asm
;
; Created on: Aug 28, 2011
; Author: anizzomc
;
GLOBAL halt
SECTION .text
halt:
cli
hlt
|
src/util/oli/app/ar2lst.asm | olifink/qspread | 0 | 165185 | ; make array to list
include win1_mac_oli
section utility
xdef ut_ar2lst
;+++
; make array to list
;
; Entry Exit
; d1.l array type (0=abs,1=rel) preserved
; a0 array descriptor preserved
; a1 ptr to list space preserved
;---
ut_ar2lst subr a0/a1/d1/d2
xjsr ut_arinf ; get array information
bra.s lpe
lp move.l a0,(a1)+
add.w d2,a0
lpe dbra d1,lp
move.l #0,(a1) ; 0 is end of list marker
subend
end
|
src/sound.adb | JeremyGrosser/the_grid | 0 | 20990 | <reponame>JeremyGrosser/the_grid
with Picosystem.Pins;
with RP.Clock;
with RP.Timer;
with RP.GPIO;
with Picosystem.LED;
package body Sound is
use RP.Timer;
use RP.PWM;
P : constant PWM_Point := To_PWM (Picosystem.Pins.AUDIO);
Stop_At : Time := Time'First;
Playing : Boolean := False;
procedure Initialize is
use RP.GPIO;
begin
if not RP.PWM.Initialized then
RP.PWM.Initialize;
end if;
Set_Mode (P.Slice, Free_Running);
Set_Divider (P.Slice, Divider'Last);
Set_Duty_Cycle (P.Slice, P.Channel, 0);
Enable (P.Slice);
Picosystem.Pins.AUDIO.Configure (Output, Floating, RP.GPIO.PWM);
end Initialize;
procedure Update is
begin
if Playing then
Picosystem.LED.Set_Color (16#FF0000#);
else
Picosystem.LED.Set_Color (16#00FF00#);
end if;
if Playing and then Clock >= Stop_At then
Stop;
end if;
end Update;
function Is_Playing
return Boolean
is (Playing);
procedure Play
(Note : Notes;
Octave : Octaves;
Length : Milliseconds)
is
use type RP.PWM.Period;
Div : constant RP.PWM.Divider := Lookup_Div (Octave);
Interval : constant RP.PWM.Period := Lookup_Interval (Octave, Note);
begin
Set_Divider (P.Slice, Div);
Set_Interval (P.Slice, Interval);
Set_Duty_Cycle (P.Slice, P.Channel, Interval / 1000); -- TODO volume control?
if Length = 0 then
Stop_At := Time'Last;
else
Stop_At := Clock + RP.Timer.Milliseconds (Length);
end if;
Playing := True;
end Play;
procedure Stop is
begin
RP.PWM.Set_Duty_Cycle (P.Slice, P.Channel, 0);
Playing := False;
end Stop;
end Sound;
|
tools/scitools/conf/understand/ada/ada95/s-tasmem.ads | brucegua/moocos | 1 | 13599 | <gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K _ M E M O R Y --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU Library General Public License as published by the --
-- Free Software Foundation; either version 2, or (at your option) any --
-- later version. GNARL is distributed in the hope that it will be use- --
-- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- --
-- eral Library Public License for more details. You should have received --
-- a copy of the GNU Library General Public License along with GNARL; see --
-- file COPYING.LIB. If not, write to the Free Software Foundation, 675 --
-- Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
-- Used for, Storage_Count
package System.Task_Memory is
procedure Low_Level_Free (A : System.Address);
-- Free a previously allocated block, guaranteed to be tasking safe
function Low_Level_New
(Size : System.Storage_Elements.Storage_Count)
return System.Address;
-- Allocate a block, guaranteed to be tasking safe. The block always has
-- the maximum possible required alignment for any possible data type.
function Unsafe_Low_Level_New
(Size : System.Storage_Elements.Storage_Count)
return System.Address;
-- Allocate a block, not guaranteed to be tasking safe. The block always
-- has the maximum possible required alignment for any possible data type.
end System.Task_Memory;
|
alloy/models/voxels/lego.als | AaronMorais/TheParallaxProject | 0 | 2992 | abstract sig Brick {
voxels : set Voxel,
colour : one Colour
}
sig OneOne, OneTwo, OneThree, OneFour, TwoTwo, LBrick, TwoThree, TwoFour,
OneOnePlate, OneTwoPlate, OneThreePlate, OneFourPlate, LPlate,
TwoTwoPlate, TwoThreePlate, TwoFourPlate, ThreeThreePlate extends Brick {}
fun length[] : Brick -> Int {
OneOne->1 + OneTwo->2 + OneThree->3 + OneFour->4 + TwoTwo->2 + LBrick->2 + TwoThree->2 + TwoFour->2 +
OneOnePlate->1 + OneTwoPlate->2 + OneThreePlate->3 + OneFourPlate->4 + LPlate->2 +
TwoTwoPlate->2 + TwoThreePlate->2 + TwoFourPlate->2 + ThreeThreePlate -> 3}
fun width[] : Brick -> Int {
OneOne->1 + OneTwo->1 + OneThree->1 + OneFour->1 + TwoTwo->2 + LBrick->2 + TwoThree->3 + TwoFour->4 +
OneOnePlate->1 + OneTwoPlate->1 + OneThreePlate->1 + OneFourPlate->1 + LPlate->2 +
TwoTwoPlate->2 + TwoThreePlate->3 + TwoFourPlate->4 + ThreeThreePlate -> 3}
fun height[] : Brick -> Int {
OneOne->3 + OneTwo->3 + OneThree->3 + OneFour->3 + TwoTwo->3 + LBrick->3 + TwoThree->3 + TwoFour->3 +
OneOnePlate->1 + OneTwoPlate->1 + OneThreePlate->1 + OneFourPlate->1 + LPlate->1 +
TwoTwoPlate->1 + TwoThreePlate->1 + TwoFourPlate->1 + ThreeThreePlate -> 1}
fun volume[] : Brick -> Int {
OneOne->3 + OneTwo->6 + OneThree->9 + OneFour->12 + TwoTwo->12 + LBrick->9 + TwoThree->18 + TwoFour->24 +
OneOnePlate->1 + OneTwoPlate->2 + OneThreePlate->3 + OneFourPlate->4 + LPlate->3 +
TwoTwoPlate->4 + TwoThreePlate->6 + TwoFourPlate->8 + ThreeThreePlate -> 9}
fun inventory[] : Brick -> Int {
OneOne->10 + OneTwo->10 + OneThree->10 + OneFour->10 + TwoTwo->10 + LBrick->10 + TwoThree->10 + TwoFour->10 +
OneOnePlate->10 + OneTwoPlate->10 + OneThreePlate->10 + OneFourPlate->10 + LPlate->10 +
TwoTwoPlate->10 + TwoThreePlate->10 + TwoFourPlate->10 + ThreeThreePlate -> 10}
-- a set comprehension to tell us which bricks are connected to which others
fun connected[] : Brick->Brick {
{b1, b2 : Brick | connected[b1,b2] && b1 != b2 }
}
-- the definition of what it means for two bricks to be connected
-- functions and predicates are in different name spaces,
-- so it is ok to have a pred and a fun with the same name
pred connected[b1, b2 : one Brick] {
some v1 : b1.voxels |
some v2 : b2.voxels | aboveOrBelow[v1, v2]
}
pred above[v1, v2 : one Voxel] {
v1.x = v2.x
v1.z = v2.z
v1.y = next[v2.y]
}
pred aboveOrBelow[v1, v2 : one Voxel] {
above[v1,v2] or above[v2,v1]
}
pred xAdjacent[v1,v2 : one Voxel] {
v1.y = v2.y
v1.z = v2.z
v1.x = next[v2.x] or next[v1.x] = v2.x
}
pred zAdjacent[v1,v2 : one Voxel] {
v1.y = v2.y
v1.x = v2.x
v1.z = next[v2.z] or next[v1.z] = v2.z
}
fun adjacent[] : Voxel -> Voxel {
{v1, v2 : Voxel | xAdjacent[v1,v2] or zAdjacent[v1,v2] or aboveOrBelow[v1,v2]}
}
fun xAdjacent[] : Voxel -> Voxel {
{v1, v2 : Voxel | xAdjacent[v1,v2]}
}
fun zAdjacent[] : Voxel -> Voxel {
{v1, v2 : Voxel | zAdjacent[v1,v2] }
}
fun yAdjacent[] : Voxel -> Voxel {
{v1, v2 : Voxel | aboveOrBelow[v1,v2] }
}
abstract sig Colour {}
one sig Red, Blue, Yellow extends Colour {}
fact WellPlaced {
-- all Voxels are assigned to some brick
Brick.voxels = Voxel
-- Bricks have the proper volume
all b : Brick | b.volume = #(b.voxels)
-- Each Voxel is occupied by exactly one Brick
all v : Voxel | one voxels.v
-- Each brick occupies contiguous voxels
all b : Brick | all v: b.voxels | b.voxels = v.*(b.voxels <: adjacent :> b.voxels)
-- Every brick is connected to some other brick
(#Brick > 1) => Brick in Brick.connected
-- Every brick is (transitively) connected to every other brick
all b : Brick | b.*connected = Brick
-- Bricks are only as long and wide as the brick type allows
all b : Brick | all v : b.voxels |
(#(v.*(b.voxels <: xAdjacent :> b.voxels)) = b.length and
#(v.*(b.voxels <: zAdjacent :> b.voxels)) = b.width) or
(#(v.*(b.voxels <: xAdjacent :> b.voxels)) = b.width and
#(v.*(b.voxels <: zAdjacent :> b.voxels)) = b.length)
-- Each voxel in the brick must be the same colour as the brick
all b : Brick | all v : b.voxels | v.colour = b.colour
-- Each brick is only as tall as brick allows
all b : Brick | all v : b.voxels |
#(v.*(b.voxels <: yAdjacent :> b.voxels)) = b.height
-- There must be at least one TwoTwo brick used
#(OneOne <: Brick) <= OneOne.inventory
#(OneTwo <: Brick) <= OneTwo.inventory
#(OneThree <: Brick) <= OneThree.inventory
#(OneFour <: Brick) <= OneFour.inventory
#(TwoTwo <: Brick) <= TwoTwo.inventory
#(TwoThree <: Brick) <= TwoThree.inventory
#(LBrick <: Brick) <= LBrick.inventory
#(TwoFour <: Brick) <= TwoFour.inventory
#(OneTwoPlate <: Brick) <= OneTwoPlate.inventory
#(OneOnePlate <: Brick) <= OneOnePlate.inventory
#(OneThreePlate <: Brick) <= OneThreePlate.inventory
#(OneFourPlate <: Brick) <= OneFourPlate.inventory
#(TwoTwoPlate <: Brick) <= TwoTwoPlate.inventory
#(TwoThreePlate <: Brick) <= TwoThreePlate.inventory
#(TwoFourPlate <: Brick) <= TwoFourPlate.inventory
#(LPlate <: Brick) <= LPlate.inventory
#(ThreeThreePlate <: Brick) <= ThreeThreePlate.inventory
}
pred build {}
run build for 8 but 8 Int |
src/Equality/Id.agda | nad/equality | 3 | 2593 | ------------------------------------------------------------------------
-- The cubical identity type
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Equality.Id where
open import Equality
import Equality.Path as P
open import Prelude
import Agda.Builtin.Cubical.Id as Id
------------------------------------------------------------------------
-- Equality
infix 4 _≡_
_≡_ : ∀ {a} {A : Type a} → A → A → Type a
_≡_ = Id.Id
refl : ∀ {a} {A : Type a} {x : A} → x ≡ x
refl = Id.conid P.1̲ P.refl
------------------------------------------------------------------------
-- Various derived definitions and properties
reflexive-relation : ∀ ℓ → Reflexive-relation ℓ
Reflexive-relation._≡_ (reflexive-relation _) = _≡_
Reflexive-relation.refl (reflexive-relation _) = λ _ → refl
equality-with-J₀ : ∀ {a p} → Equality-with-J₀ a p reflexive-relation
Equality-with-J₀.elim equality-with-J₀ = λ P r → Id.primIdJ
(λ _ → P) (r _)
Equality-with-J₀.elim-refl equality-with-J₀ = λ _ _ → refl
equivalence-relation⁺ : ∀ ℓ → Equivalence-relation⁺ ℓ
equivalence-relation⁺ _ = J₀⇒Equivalence-relation⁺ equality-with-J₀
equality-with-paths :
∀ {a p} → P.Equality-with-paths a p equivalence-relation⁺
equality-with-paths =
P.Equality-with-J₀⇒Equality-with-paths equality-with-J₀
open P.Derived-definitions-and-properties equality-with-paths public
hiding (_≡_; refl; reflexive-relation; equality-with-J₀)
open import Equality.Path.Isomorphisms equality-with-paths public
|
source/web/tools/a2js/webapi/dom/webapi-dom-elements.ads | svn2github/matreshka | 24 | 3560 | <reponame>svn2github/matreshka
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Web API Definition --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014-2018, <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$
------------------------------------------------------------------------------
with WebAPI.DOM.Child_Nodes;
with WebAPI.DOM.HTML_Collections;
with WebAPI.DOM.Nodes;
with WebAPI.DOM.Non_Document_Type_Child_Nodes;
with WebAPI.DOM.Parent_Nodes;
with WebAPI.DOM.Rects;
with WebAPI.DOM.Token_Lists;
package WebAPI.DOM.Elements is
pragma Preelaborate;
type Element is limited interface
and WebAPI.DOM.Child_Nodes.Child_Node
and WebAPI.DOM.Nodes.Node
and WebAPI.DOM.Non_Document_Type_Child_Nodes.Non_Document_Type_Child_Node
and WebAPI.DOM.Parent_Nodes.Parent_Node;
type Element_Access is access all Element'Class
with Storage_Size => 0;
-- XXX Not implemented
--
-- interface Element : Node {
-- [SameObject] readonly attribute Attr[] attributes;
-- };
not overriding function Get_Namespace_URI
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "namespaceURI";
not overriding function Get_Prefix
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "prefix";
not overriding function Get_Local_Name
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "localName";
not overriding function Get_Tag_Name
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "tagName";
not overriding function Get_Id
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "id";
not overriding procedure Set_Id
(Self : not null access Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "id";
not overriding function Get_Class_Name
(Self : not null access constant Element)
return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "className";
not overriding procedure Set_Class_Name
(Self : not null access Element;
To : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Property_Setter,
Link_Name => "className";
not overriding function Get_Class_List
(Self : not null access constant Element)
return WebAPI.DOM.Token_Lists.DOM_Token_List_Access is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "classList";
not overriding function Get_Attribute
(Self : not null access constant Element;
Name : WebAPI.DOM_String) return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getAttribute";
not overriding function Get_Attribute_NS
(Self : not null access constant Element;
Namespace : WebAPI.DOM_String;
Local_Name : WebAPI.DOM_String) return WebAPI.DOM_String is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getAttributeNS";
not overriding procedure Set_Attribute
(Self : not null access Element;
Name : WebAPI.DOM_String;
Value : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "setAttribute";
not overriding procedure Set_Attribute_NS
(Self : not null access Element;
Namespace : WebAPI.DOM_String;
Local_Name : WebAPI.DOM_String;
Value : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "setAttributeNS";
not overriding procedure Remove_Attribute
(Self : not null access Element;
Name : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "removeAttribute";
not overriding procedure Remove_Attribute_NS
(Self : not null access Element;
Namespace : WebAPI.DOM_String;
Local_Name : WebAPI.DOM_String) is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "removeAttributeNS";
not overriding function Has_Attribute
(Self : not null access constant Element;
Name : WebAPI.DOM_String) return Boolean is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "hasAttribute";
not overriding function Has_Attribute_NS
(Self : not null access constant Element;
Namespace : WebAPI.DOM_String;
Local_Name : WebAPI.DOM_String) return Boolean is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "hasAttributeNS";
not overriding function Get_Elements_By_Tag_Name
(Self : not null access constant Element;
Local_Name : WebAPI.DOM_String)
return WebAPI.DOM.HTML_Collections.HTML_Collection is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getElementsByTagName";
not overriding function Get_Elements_By_Tag_Name_NS
(Self : not null access constant Element;
Namespace : WebAPI.DOM_String;
Local_Name : WebAPI.DOM_String)
return WebAPI.DOM.HTML_Collections.HTML_Collection is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getElementsByTagNameNS";
not overriding function Get_Elements_By_Class_Name
(Self : not null access constant Element;
Class_Name : WebAPI.DOM_String)
return WebAPI.DOM.HTML_Collections.HTML_Collection is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getElementsByClassName";
----------------------------------
-- CSSOM View Module Extensions --
----------------------------------
-- partial interface Element {
-- sequence<DOMRect> getClientRects();
-- void scrollIntoView();
-- void scrollIntoView((boolean or object) arg
-- );
-- void scroll(optional ScrollToOptions options
-- );
-- void scroll(unrestricted double x
-- , unrestricted double y
-- );
-- void scrollTo(optional ScrollToOptions options
-- );
-- void scrollTo(unrestricted double x
-- , unrestricted double y
-- );
-- void scrollBy(optional ScrollToOptions options
-- );
-- void scrollBy(unrestricted double x
-- , unrestricted double y
-- );
not overriding function Get_Bounding_Client_Rect
(Self : not null access constant Element)
return WebAPI.DOM.Rects.DOM_Rect_Access is abstract
with Import => True,
Convention => JavaScript_Method,
Link_Name => "getBoundingClientRect";
not overriding function Get_Scroll_Width
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "scrollWidth";
not overriding function Get_Scroll_Height
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "scrollHeight";
not overriding function Get_Scroll_Top
(Self : not null access constant Element)
return DOM_Double is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "scrollTop";
not overriding function Get_Scroll_Left
(Self : not null access constant Element)
return DOM_Double is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "scrollLeft";
not overriding function Get_Client_Top
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "clientTop";
not overriding function Get_Client_Left
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "clientLeft";
not overriding function Get_Client_Width
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "clientWidth";
not overriding function Get_Client_Height
(Self : not null access constant Element)
return DOM_Long is abstract
with Import => True,
Convention => JavaScript_Property_Getter,
Link_Name => "clientHeight";
end WebAPI.DOM.Elements;
|
programs/oeis/229/A229481.asm | neoneye/loda | 22 | 2315 | ; A229481: Final digit of 1^n + 2^n + ... + n^n.
; 0,1,5,6,4,5,1,4,2,5,5,6,0,1,5,0,8,3,9,0,6,1,5,6,0,5,1,4,8,5,5,6,6,1,5,0,4,3,9,0,2,1,5,6,6,5,1,4,4,5,5,6,2,1,5,0,0,3,9,0,8,1,5,6,2,5,1,4,0,5,5,6,8,1,5,0,6,3,9,0,4,1,5,6,8,5,1,4,6,5,5,6,4,1,5,0,2,3,9,0
mov $2,$0
lpb $0
mov $3,$0
sub $0,1
pow $3,$2
add $1,$3
lpe
mod $1,10
mov $0,$1
|
agda-stdlib/src/Data/Empty.agda | DreamLinuxer/popl21-artifact | 5 | 733 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- Empty type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Empty where
------------------------------------------------------------------------
-- Definition
-- Note that by default the empty type is not universe polymorphic as it
-- often results in unsolved metas. See `Data.Empty.Polymorphic` for a
-- universe polymorphic variant.
data ⊥ : Set where
------------------------------------------------------------------------
-- Functions
⊥-elim : ∀ {w} {Whatever : Set w} → ⊥ → Whatever
⊥-elim ()
|
programs/oeis/260/A260260.asm | karttu/loda | 0 | 99790 | ; A260260: a(n) = n*(16*n^2 - 21*n + 7)/2.
; 0,1,29,132,358,755,1371,2254,3452,5013,6985,9416,12354,15847,19943,24690,30136,36329,43317,51148,59870,69531,80179,91862,104628,118525,133601,149904,167482,186383,206655,228346,251504,276177,302413,330260,359766,390979,423947,458718,495340,533861,574329,616792,661298,707895,756631,807554,860712,916153,973925,1034076,1096654,1161707,1229283,1299430,1372196,1447629,1525777,1606688,1690410,1776991,1866479,1958922,2054368,2152865,2254461,2359204,2467142,2578323,2692795,2810606,2931804,3056437,3184553,3316200,3451426,3590279,3732807,3879058,4029080,4182921,4340629,4502252,4667838,4837435,5011091,5188854,5370772,5556893,5747265,5941936,6140954,6344367,6552223,6764570,6981456,7202929,7429037,7659828,7895350,8135651,8380779,8630782,8885708,9145605,9410521,9680504,9955602,10235863,10521335,10812066,11108104,11409497,11716293,12028540,12346286,12669579,12998467,13332998,13673220,14019181,14370929,14728512,15091978,15461375,15836751,16218154,16605632,16999233,17399005,17804996,18217254,18635827,19060763,19492110,19929916,20374229,20825097,21282568,21746690,22217511,22695079,23179442,23670648,24168745,24673781,25185804,25704862,26231003,26764275,27304726,27852404,28407357,28969633,29539280,30116346,30700879,31292927,31892538,32499760,33114641,33737229,34367572,35005718,35651715,36305611,36967454,37637292,38315173,39001145,39695256,40397554,41108087,41826903,42554050,43289576,44033529,44785957,45546908,46316430,47094571,47881379,48676902,49481188,50294285,51116241,51947104,52786922,53635743,54493615,55360586,56236704,57122017,58016573,58920420,59833606,60756179,61688187,62629678,63580700,64541301,65511529,66491432,67481058,68480455,69489671,70508754,71537752,72576713,73625685,74684716,75753854,76833147,77922643,79022390,80132436,81252829,82383617,83524848,84676570,85838831,87011679,88195162,89389328,90594225,91809901,93036404,94273782,95522083,96781355,98051646,99333004,100625477,101929113,103243960,104570066,105907479,107256247,108616418,109988040,111371161,112765829,114172092,115589998,117019595,118460931,119914054,121379012,122855853
mov $14,$0
mov $16,$0
lpb $16,1
clr $0,14
mov $0,$14
sub $16,1
sub $0,$16
mov $11,$0
mov $13,$0
lpb $13,1
mov $0,$11
sub $13,1
sub $0,$13
mov $1,$0
lpb $0,1
mul $1,$5
mov $8,6
mul $8,$0
add $1,$8
sub $1,9
mul $1,8
add $1,3
mov $0,$1
gcd $0,8
lpe
add $12,$1
lpe
add $15,$12
lpe
mov $1,$15
|
llvm-gcc-4.2-2.9/gcc/ada/a-convec.adb | vidkidz/crossbridge | 1 | 19993 | <reponame>vidkidz/crossbridge
------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . V E C T O R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2006 Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- This unit was originally developed by <NAME>. --
------------------------------------------------------------------------------
with Ada.Containers.Generic_Array_Sort;
with Ada.Unchecked_Deallocation;
with System; use type System.Address;
package body Ada.Containers.Vectors is
type Int is range System.Min_Int .. System.Max_Int;
type UInt is mod System.Max_Binary_Modulus;
procedure Free is
new Ada.Unchecked_Deallocation (Elements_Type, Elements_Access);
---------
-- "&" --
---------
function "&" (Left, Right : Vector) return Vector is
LN : constant Count_Type := Length (Left);
RN : constant Count_Type := Length (Right);
begin
if LN = 0 then
if RN = 0 then
return Empty_Vector;
end if;
declare
RE : Elements_Type renames
Right.Elements (Index_Type'First .. Right.Last);
Elements : constant Elements_Access :=
new Elements_Type'(RE);
begin
return (Controlled with Elements, Right.Last, 0, 0);
end;
end if;
if RN = 0 then
declare
LE : Elements_Type renames
Left.Elements (Index_Type'First .. Left.Last);
Elements : constant Elements_Access :=
new Elements_Type'(LE);
begin
return (Controlled with Elements, Left.Last, 0, 0);
end;
end if;
declare
N : constant Int'Base := Int (LN) + Int (RN);
Last_As_Int : Int'Base;
begin
if Int (No_Index) > Int'Last - N then
raise Constraint_Error with "new length is out of range";
end if;
Last_As_Int := Int (No_Index) + N;
if Last_As_Int > Int (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type (Last_As_Int);
LE : Elements_Type renames
Left.Elements (Index_Type'First .. Left.Last);
RE : Elements_Type renames
Right.Elements (Index_Type'First .. Right.Last);
Elements : constant Elements_Access :=
new Elements_Type'(LE & RE);
begin
return (Controlled with Elements, Last, 0, 0);
end;
end;
end "&";
function "&" (Left : Vector; Right : Element_Type) return Vector is
LN : constant Count_Type := Length (Left);
begin
if LN = 0 then
declare
subtype Elements_Subtype is
Elements_Type (Index_Type'First .. Index_Type'First);
Elements : constant Elements_Access :=
new Elements_Subtype'(others => Right);
begin
return (Controlled with Elements, Index_Type'First, 0, 0);
end;
end if;
declare
Last_As_Int : Int'Base;
begin
if Int (Index_Type'First) > Int'Last - Int (LN) then
raise Constraint_Error with "new length is out of range";
end if;
Last_As_Int := Int (Index_Type'First) + Int (LN);
if Last_As_Int > Int (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type (Last_As_Int);
LE : Elements_Type renames
Left.Elements (Index_Type'First .. Left.Last);
subtype ET is Elements_Type (Index_Type'First .. Last);
Elements : constant Elements_Access := new ET'(LE & Right);
begin
return (Controlled with Elements, Last, 0, 0);
end;
end;
end "&";
function "&" (Left : Element_Type; Right : Vector) return Vector is
RN : constant Count_Type := Length (Right);
begin
if RN = 0 then
declare
subtype Elements_Subtype is
Elements_Type (Index_Type'First .. Index_Type'First);
Elements : constant Elements_Access :=
new Elements_Subtype'(others => Left);
begin
return (Controlled with Elements, Index_Type'First, 0, 0);
end;
end if;
declare
Last_As_Int : Int'Base;
begin
if Int (Index_Type'First) > Int'Last - Int (RN) then
raise Constraint_Error with "new length is out of range";
end if;
Last_As_Int := Int (Index_Type'First) + Int (RN);
if Last_As_Int > Int (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type (Last_As_Int);
RE : Elements_Type renames
Right.Elements (Index_Type'First .. Right.Last);
subtype ET is Elements_Type (Index_Type'First .. Last);
Elements : constant Elements_Access := new ET'(Left & RE);
begin
return (Controlled with Elements, Last, 0, 0);
end;
end;
end "&";
function "&" (Left, Right : Element_Type) return Vector is
begin
if Index_Type'First >= Index_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type'First + 1;
subtype ET is Elements_Type (Index_Type'First .. Last);
Elements : constant Elements_Access := new ET'(Left, Right);
begin
return (Controlled with Elements, Last, 0, 0);
end;
end "&";
---------
-- "=" --
---------
function "=" (Left, Right : Vector) return Boolean is
begin
if Left'Address = Right'Address then
return True;
end if;
if Left.Last /= Right.Last then
return False;
end if;
for J in Index_Type range Index_Type'First .. Left.Last loop
if Left.Elements (J) /= Right.Elements (J) then
return False;
end if;
end loop;
return True;
end "=";
------------
-- Adjust --
------------
procedure Adjust (Container : in out Vector) is
begin
if Container.Last = No_Index then
Container.Elements := null;
return;
end if;
declare
E : constant Elements_Access := Container.Elements;
L : constant Index_Type := Container.Last;
begin
Container.Elements := null;
Container.Last := No_Index;
Container.Busy := 0;
Container.Lock := 0;
Container.Elements := new Elements_Type'(E (Index_Type'First .. L));
Container.Last := L;
end;
end Adjust;
------------
-- Append --
------------
procedure Append (Container : in out Vector; New_Item : Vector) is
begin
if Is_Empty (New_Item) then
return;
end if;
if Container.Last = Index_Type'Last then
raise Constraint_Error with "vector is already at its maximum length";
end if;
Insert
(Container,
Container.Last + 1,
New_Item);
end Append;
procedure Append
(Container : in out Vector;
New_Item : Element_Type;
Count : Count_Type := 1)
is
begin
if Count = 0 then
return;
end if;
if Container.Last = Index_Type'Last then
raise Constraint_Error with "vector is already at its maximum length";
end if;
Insert
(Container,
Container.Last + 1,
New_Item,
Count);
end Append;
--------------
-- Capacity --
--------------
function Capacity (Container : Vector) return Count_Type is
begin
if Container.Elements = null then
return 0;
end if;
return Container.Elements'Length;
end Capacity;
-----------
-- Clear --
-----------
procedure Clear (Container : in out Vector) is
begin
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
Container.Last := No_Index;
end Clear;
--------------
-- Contains --
--------------
function Contains
(Container : Vector;
Item : Element_Type) return Boolean
is
begin
return Find_Index (Container, Item) /= No_Index;
end Contains;
------------
-- Delete --
------------
procedure Delete
(Container : in out Vector;
Index : Extended_Index;
Count : Count_Type := 1)
is
begin
if Index < Index_Type'First then
raise Constraint_Error with "Index is out of range (too small)";
end if;
if Index > Container.Last then
if Index > Container.Last + 1 then
raise Constraint_Error with "Index is out of range (too large)";
end if;
return;
end if;
if Count = 0 then
return;
end if;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
declare
I_As_Int : constant Int := Int (Index);
Old_Last_As_Int : constant Int := Index_Type'Pos (Container.Last);
Count1 : constant Int'Base := Count_Type'Pos (Count);
Count2 : constant Int'Base := Old_Last_As_Int - I_As_Int + 1;
N : constant Int'Base := Int'Min (Count1, Count2);
J_As_Int : constant Int'Base := I_As_Int + N;
begin
if J_As_Int > Old_Last_As_Int then
Container.Last := Index - 1;
else
declare
J : constant Index_Type := Index_Type (J_As_Int);
E : Elements_Type renames Container.Elements.all;
New_Last_As_Int : constant Int'Base := Old_Last_As_Int - N;
New_Last : constant Index_Type :=
Index_Type (New_Last_As_Int);
begin
E (Index .. New_Last) := E (J .. Container.Last);
Container.Last := New_Last;
end;
end if;
end;
end Delete;
procedure Delete
(Container : in out Vector;
Position : in out Cursor;
Count : Count_Type := 1)
is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Position.Index > Container.Last then
raise Program_Error with "Position index is out of range";
end if;
Delete (Container, Position.Index, Count);
-- This is the old behavior, prior to the York API (2005/06):
-- if Position.Index <= Container.Last then
-- Position := (Container'Unchecked_Access, Position.Index);
-- else
-- Position := No_Element;
-- end if;
-- This is the behavior specified by the York API:
Position := No_Element;
end Delete;
------------------
-- Delete_First --
------------------
procedure Delete_First
(Container : in out Vector;
Count : Count_Type := 1)
is
begin
if Count = 0 then
return;
end if;
if Count >= Length (Container) then
Clear (Container);
return;
end if;
Delete (Container, Index_Type'First, Count);
end Delete_First;
-----------------
-- Delete_Last --
-----------------
procedure Delete_Last
(Container : in out Vector;
Count : Count_Type := 1)
is
Index : Int'Base;
begin
if Count = 0 then
return;
end if;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
Index := Int'Base (Container.Last) - Int'Base (Count);
if Index < Index_Type'Pos (Index_Type'First) then
Container.Last := No_Index;
else
Container.Last := Index_Type (Index);
end if;
end Delete_Last;
-------------
-- Element --
-------------
function Element
(Container : Vector;
Index : Index_Type) return Element_Type
is
begin
if Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
return Container.Elements (Index);
end Element;
function Element (Position : Cursor) return Element_Type is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
return Element (Position.Container.all, Position.Index);
end Element;
--------------
-- Finalize --
--------------
procedure Finalize (Container : in out Vector) is
X : Elements_Access := Container.Elements;
begin
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
Container.Elements := null;
Container.Last := No_Index;
Free (X);
end Finalize;
----------
-- Find --
----------
function Find
(Container : Vector;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
is
begin
if Position.Container /= null then
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Position.Index > Container.Last then
raise Program_Error with "Position index is out of range";
end if;
end if;
for J in Position.Index .. Container.Last loop
if Container.Elements (J) = Item then
return (Container'Unchecked_Access, J);
end if;
end loop;
return No_Element;
end Find;
----------------
-- Find_Index --
----------------
function Find_Index
(Container : Vector;
Item : Element_Type;
Index : Index_Type := Index_Type'First) return Extended_Index
is
begin
for Indx in Index .. Container.Last loop
if Container.Elements (Indx) = Item then
return Indx;
end if;
end loop;
return No_Index;
end Find_Index;
-----------
-- First --
-----------
function First (Container : Vector) return Cursor is
begin
if Is_Empty (Container) then
return No_Element;
end if;
return (Container'Unchecked_Access, Index_Type'First);
end First;
-------------------
-- First_Element --
-------------------
function First_Element (Container : Vector) return Element_Type is
begin
return Element (Container, Index_Type'First);
end First_Element;
-----------------
-- First_Index --
-----------------
function First_Index (Container : Vector) return Index_Type is
pragma Unreferenced (Container);
begin
return Index_Type'First;
end First_Index;
---------------------
-- Generic_Sorting --
---------------------
package body Generic_Sorting is
---------------
-- Is_Sorted --
---------------
function Is_Sorted (Container : Vector) return Boolean is
begin
if Container.Last <= Index_Type'First then
return True;
end if;
declare
E : Elements_Type renames Container.Elements.all;
begin
for I in Index_Type'First .. Container.Last - 1 loop
if E (I + 1) < E (I) then
return False;
end if;
end loop;
end;
return True;
end Is_Sorted;
-----------
-- Merge --
-----------
procedure Merge (Target, Source : in out Vector) is
I : Index_Type'Base := Target.Last;
J : Index_Type'Base;
begin
if Target.Last < Index_Type'First then
Move (Target => Target, Source => Source);
return;
end if;
if Target'Address = Source'Address then
return;
end if;
if Source.Last < Index_Type'First then
return;
end if;
if Source.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
Target.Set_Length (Length (Target) + Length (Source));
J := Target.Last;
while Source.Last >= Index_Type'First loop
pragma Assert (Source.Last <= Index_Type'First
or else not (Source.Elements (Source.Last) <
Source.Elements (Source.Last - 1)));
if I < Index_Type'First then
Target.Elements (Index_Type'First .. J) :=
Source.Elements (Index_Type'First .. Source.Last);
Source.Last := No_Index;
return;
end if;
pragma Assert (I <= Index_Type'First
or else not (Target.Elements (I) <
Target.Elements (I - 1)));
if Source.Elements (Source.Last) < Target.Elements (I) then
Target.Elements (J) := Target.Elements (I);
I := I - 1;
else
Target.Elements (J) := Source.Elements (Source.Last);
Source.Last := Source.Last - 1;
end if;
J := J - 1;
end loop;
end Merge;
----------
-- Sort --
----------
procedure Sort (Container : in out Vector)
is
procedure Sort is
new Generic_Array_Sort
(Index_Type => Index_Type,
Element_Type => Element_Type,
Array_Type => Elements_Type,
"<" => "<");
begin
if Container.Last <= Index_Type'First then
return;
end if;
if Container.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (vector is locked)";
end if;
Sort (Container.Elements (Index_Type'First .. Container.Last));
end Sort;
end Generic_Sorting;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
if Position.Container = null then
return False;
end if;
return Position.Index <= Position.Container.Last;
end Has_Element;
------------
-- Insert --
------------
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
New_Item : Element_Type;
Count : Count_Type := 1)
is
N : constant Int := Count_Type'Pos (Count);
First : constant Int := Int (Index_Type'First);
New_Last_As_Int : Int'Base;
New_Last : Index_Type;
New_Length : UInt;
Max_Length : constant UInt := UInt (Count_Type'Last);
Dst : Elements_Access;
begin
if Before < Index_Type'First then
raise Constraint_Error with
"Before index is out of range (too small)";
end if;
if Before > Container.Last
and then Before > Container.Last + 1
then
raise Constraint_Error with
"Before index is out of range (too large)";
end if;
if Count = 0 then
return;
end if;
declare
Old_Last_As_Int : constant Int := Int (Container.Last);
begin
if Old_Last_As_Int > Int'Last - N then
-- ???
-- The purpose of this test is to ensure that the calculation of
-- New_Last_As_Int (see below) doesn't overflow.
-- This isn't quite right, since the only requirements are:
-- V.Last <= Index_Type'Last
-- V.Length <= Count_Type'Last
-- To be strictly correct there's no (explicit) requirement that
-- Old_Last + N <= Int'Last
-- However, there might indeed be an implied requirement, since
-- machine constraints dictate that
-- Index_Type'Last <= Int'Last
-- and so this check is perhaps proper after all.
-- This shouldn't be an issue in practice, since it can only
-- happen when N is very large, or V.Last is near Int'Last.
-- N isn't likely to be large, since there's probably not enough
-- storage.
-- V.Last would only be large if IT'First is very large (and
-- V.Length has some "normal" size). But typically IT'First is
-- either 0 or 1.
raise Constraint_Error with "new length is out of range";
end if;
New_Last_As_Int := Old_Last_As_Int + N;
if New_Last_As_Int > Int (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
New_Length := UInt (New_Last_As_Int - First + Int'(1));
if New_Length > Max_Length then
raise Constraint_Error with "new length is out of range";
end if;
New_Last := Index_Type (New_Last_As_Int);
end;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
if Container.Elements = null then
declare
subtype Elements_Subtype is
Elements_Type (Index_Type'First .. New_Last);
begin
Container.Elements := new Elements_Subtype'(others => New_Item);
end;
Container.Last := New_Last;
return;
end if;
if New_Last <= Container.Elements'Last then
declare
E : Elements_Type renames Container.Elements.all;
begin
if Before <= Container.Last then
declare
Index_As_Int : constant Int'Base :=
Index_Type'Pos (Before) + N;
Index : constant Index_Type := Index_Type (Index_As_Int);
begin
E (Index .. New_Last) := E (Before .. Container.Last);
E (Before .. Index_Type'Pred (Index)) :=
(others => New_Item);
end;
else
E (Before .. New_Last) := (others => New_Item);
end if;
end;
Container.Last := New_Last;
return;
end if;
declare
C, CC : UInt;
begin
C := UInt'Max (1, Container.Elements'Length);
while C < New_Length loop
if C > UInt'Last / 2 then
C := UInt'Last;
exit;
end if;
C := 2 * C;
end loop;
if C > Max_Length then
C := Max_Length;
end if;
if Index_Type'First <= 0
and then Index_Type'Last >= 0
then
CC := UInt (Index_Type'Last) + UInt (-Index_Type'First) + 1;
else
CC := UInt (Int (Index_Type'Last) - First + 1);
end if;
if C > CC then
C := CC;
end if;
declare
Dst_Last : constant Index_Type :=
Index_Type (First + UInt'Pos (C) - 1);
begin
Dst := new Elements_Type (Index_Type'First .. Dst_Last);
end;
end;
declare
Src : Elements_Type renames Container.Elements.all;
begin
Dst (Index_Type'First .. Index_Type'Pred (Before)) :=
Src (Index_Type'First .. Index_Type'Pred (Before));
if Before <= Container.Last then
declare
Index_As_Int : constant Int'Base :=
Index_Type'Pos (Before) + N;
Index : constant Index_Type := Index_Type (Index_As_Int);
begin
Dst (Before .. Index_Type'Pred (Index)) := (others => New_Item);
Dst (Index .. New_Last) := Src (Before .. Container.Last);
end;
else
Dst (Before .. New_Last) := (others => New_Item);
end if;
exception
when others =>
Free (Dst);
raise;
end;
declare
X : Elements_Access := Container.Elements;
begin
Container.Elements := Dst;
Container.Last := New_Last;
Free (X);
end;
end Insert;
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
New_Item : Vector)
is
N : constant Count_Type := Length (New_Item);
begin
if Before < Index_Type'First then
raise Constraint_Error with
"Before index is out of range (too small)";
end if;
if Before > Container.Last
and then Before > Container.Last + 1
then
raise Constraint_Error with
"Before index is out of range (too large)";
end if;
if N = 0 then
return;
end if;
Insert_Space (Container, Before, Count => N);
declare
Dst_Last_As_Int : constant Int'Base :=
Int'Base (Before) + Int'Base (N) - 1;
Dst_Last : constant Index_Type := Index_Type (Dst_Last_As_Int);
begin
if Container'Address /= New_Item'Address then
Container.Elements (Before .. Dst_Last) :=
New_Item.Elements (Index_Type'First .. New_Item.Last);
return;
end if;
declare
subtype Src_Index_Subtype is Index_Type'Base range
Index_Type'First .. Before - 1;
Src : Elements_Type renames
Container.Elements (Src_Index_Subtype);
Index_As_Int : constant Int'Base :=
Int (Before) + Src'Length - 1;
Index : constant Index_Type'Base :=
Index_Type'Base (Index_As_Int);
Dst : Elements_Type renames
Container.Elements (Before .. Index);
begin
Dst := Src;
end;
if Dst_Last = Container.Last then
return;
end if;
declare
subtype Src_Index_Subtype is Index_Type'Base range
Dst_Last + 1 .. Container.Last;
Src : Elements_Type renames
Container.Elements (Src_Index_Subtype);
Index_As_Int : constant Int'Base :=
Dst_Last_As_Int - Src'Length + 1;
Index : constant Index_Type :=
Index_Type (Index_As_Int);
Dst : Elements_Type renames
Container.Elements (Index .. Dst_Last);
begin
Dst := Src;
end;
end;
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Vector)
is
Index : Index_Type'Base;
begin
if Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Is_Empty (New_Item) then
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Vector;
Position : out Cursor)
is
Index : Index_Type'Base;
begin
if Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Is_Empty (New_Item) then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item, Count);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Element_Type;
Position : out Cursor;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item, Count);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
Count : Count_Type := 1)
is
New_Item : Element_Type; -- Default-initialized value
pragma Warnings (Off, New_Item);
begin
Insert (Container, Before, New_Item, Count);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
Position : out Cursor;
Count : Count_Type := 1)
is
New_Item : Element_Type; -- Default-initialized value
pragma Warnings (Off, New_Item);
begin
Insert (Container, Before, New_Item, Position, Count);
end Insert;
------------------
-- Insert_Space --
------------------
procedure Insert_Space
(Container : in out Vector;
Before : Extended_Index;
Count : Count_Type := 1)
is
N : constant Int := Count_Type'Pos (Count);
First : constant Int := Int (Index_Type'First);
New_Last_As_Int : Int'Base;
New_Last : Index_Type;
New_Length : UInt;
Max_Length : constant UInt := UInt (Count_Type'Last);
Dst : Elements_Access;
begin
if Before < Index_Type'First then
raise Constraint_Error with
"Before index is out of range (too small)";
end if;
if Before > Container.Last
and then Before > Container.Last + 1
then
raise Constraint_Error with
"Before index is out of range (too large)";
end if;
if Count = 0 then
return;
end if;
declare
Old_Last_As_Int : constant Int := Int (Container.Last);
begin
if Old_Last_As_Int > Int'Last - N then -- see Insert ???
raise Constraint_Error with "new length is out of range";
end if;
New_Last_As_Int := Old_Last_As_Int + N;
if New_Last_As_Int > Int (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
New_Length := UInt (New_Last_As_Int - First + Int'(1));
if New_Length > Max_Length then
raise Constraint_Error with "new length is out of range";
end if;
New_Last := Index_Type (New_Last_As_Int);
end;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
if Container.Elements = null then
Container.Elements :=
new Elements_Type (Index_Type'First .. New_Last);
Container.Last := New_Last;
return;
end if;
if New_Last <= Container.Elements'Last then
declare
E : Elements_Type renames Container.Elements.all;
begin
if Before <= Container.Last then
declare
Index_As_Int : constant Int'Base :=
Index_Type'Pos (Before) + N;
Index : constant Index_Type := Index_Type (Index_As_Int);
begin
E (Index .. New_Last) := E (Before .. Container.Last);
end;
end if;
end;
Container.Last := New_Last;
return;
end if;
declare
C, CC : UInt;
begin
C := UInt'Max (1, Container.Elements'Length);
while C < New_Length loop
if C > UInt'Last / 2 then
C := UInt'Last;
exit;
end if;
C := 2 * C;
end loop;
if C > Max_Length then
C := Max_Length;
end if;
if Index_Type'First <= 0
and then Index_Type'Last >= 0
then
CC := UInt (Index_Type'Last) + UInt (-Index_Type'First) + 1;
else
CC := UInt (Int (Index_Type'Last) - First + 1);
end if;
if C > CC then
C := CC;
end if;
declare
Dst_Last : constant Index_Type :=
Index_Type (First + UInt'Pos (C) - 1);
begin
Dst := new Elements_Type (Index_Type'First .. Dst_Last);
end;
end;
declare
Src : Elements_Type renames Container.Elements.all;
begin
Dst (Index_Type'First .. Index_Type'Pred (Before)) :=
Src (Index_Type'First .. Index_Type'Pred (Before));
if Before <= Container.Last then
declare
Index_As_Int : constant Int'Base :=
Index_Type'Pos (Before) + N;
Index : constant Index_Type := Index_Type (Index_As_Int);
begin
Dst (Index .. New_Last) := Src (Before .. Container.Last);
end;
end if;
exception
when others =>
Free (Dst);
raise;
end;
declare
X : Elements_Access := Container.Elements;
begin
Container.Elements := Dst;
Container.Last := New_Last;
Free (X);
end;
end Insert_Space;
procedure Insert_Space
(Container : in out Vector;
Before : Cursor;
Position : out Cursor;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert_Space (Container, Index, Count => Count);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert_Space;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Vector) return Boolean is
begin
return Container.Last < Index_Type'First;
end Is_Empty;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Vector;
Process : not null access procedure (Position : Cursor))
is
V : Vector renames Container'Unrestricted_Access.all;
B : Natural renames V.Busy;
begin
B := B + 1;
begin
for Indx in Index_Type'First .. Container.Last loop
Process (Cursor'(Container'Unchecked_Access, Indx));
end loop;
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Iterate;
----------
-- Last --
----------
function Last (Container : Vector) return Cursor is
begin
if Is_Empty (Container) then
return No_Element;
end if;
return (Container'Unchecked_Access, Container.Last);
end Last;
------------------
-- Last_Element --
------------------
function Last_Element (Container : Vector) return Element_Type is
begin
return Element (Container, Container.Last);
end Last_Element;
----------------
-- Last_Index --
----------------
function Last_Index (Container : Vector) return Extended_Index is
begin
return Container.Last;
end Last_Index;
------------
-- Length --
------------
function Length (Container : Vector) return Count_Type is
L : constant Int := Int (Container.Last);
F : constant Int := Int (Index_Type'First);
N : constant Int'Base := L - F + 1;
begin
return Count_Type (N);
end Length;
----------
-- Move --
----------
procedure Move
(Target : in out Vector;
Source : in out Vector)
is
begin
if Target'Address = Source'Address then
return;
end if;
if Target.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (Target is busy)";
end if;
if Source.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (Source is busy)";
end if;
declare
Target_Elements : constant Elements_Access := Target.Elements;
begin
Target.Elements := Source.Elements;
Source.Elements := Target_Elements;
end;
Target.Last := Source.Last;
Source.Last := No_Index;
end Move;
----------
-- Next --
----------
function Next (Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Position.Index < Position.Container.Last then
return (Position.Container, Position.Index + 1);
end if;
return No_Element;
end Next;
----------
-- Next --
----------
procedure Next (Position : in out Cursor) is
begin
if Position.Container = null then
return;
end if;
if Position.Index < Position.Container.Last then
Position.Index := Position.Index + 1;
else
Position := No_Element;
end if;
end Next;
-------------
-- Prepend --
-------------
procedure Prepend (Container : in out Vector; New_Item : Vector) is
begin
Insert (Container, Index_Type'First, New_Item);
end Prepend;
procedure Prepend
(Container : in out Vector;
New_Item : Element_Type;
Count : Count_Type := 1)
is
begin
Insert (Container,
Index_Type'First,
New_Item,
Count);
end Prepend;
--------------
-- Previous --
--------------
procedure Previous (Position : in out Cursor) is
begin
if Position.Container = null then
return;
end if;
if Position.Index > Index_Type'First then
Position.Index := Position.Index - 1;
else
Position := No_Element;
end if;
end Previous;
function Previous (Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Position.Index > Index_Type'First then
return (Position.Container, Position.Index - 1);
end if;
return No_Element;
end Previous;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Container : Vector;
Index : Index_Type;
Process : not null access procedure (Element : Element_Type))
is
V : Vector renames Container'Unrestricted_Access.all;
B : Natural renames V.Busy;
L : Natural renames V.Lock;
begin
if Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
B := B + 1;
L := L + 1;
begin
Process (V.Elements (Index));
exception
when others =>
L := L - 1;
B := B - 1;
raise;
end;
L := L - 1;
B := B - 1;
end Query_Element;
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type))
is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
Query_Element (Position.Container.all, Position.Index, Process);
end Query_Element;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Vector)
is
Length : Count_Type'Base;
Last : Index_Type'Base := No_Index;
begin
Clear (Container);
Count_Type'Base'Read (Stream, Length);
if Length > Capacity (Container) then
Reserve_Capacity (Container, Capacity => Length);
end if;
for J in Count_Type range 1 .. Length loop
Last := Last + 1;
Element_Type'Read (Stream, Container.Elements (Last));
Container.Last := Last;
end loop;
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Position : out Cursor)
is
begin
raise Program_Error with "attempt to stream vector cursor";
end Read;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Container : in out Vector;
Index : Index_Type;
New_Item : Element_Type)
is
begin
if Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
if Container.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (vector is locked)";
end if;
Container.Elements (Index) := New_Item;
end Replace_Element;
procedure Replace_Element
(Container : in out Vector;
Position : Cursor;
New_Item : Element_Type)
is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor denotes wrong container";
end if;
Replace_Element (Container, Position.Index, New_Item);
end Replace_Element;
----------------------
-- Reserve_Capacity --
----------------------
procedure Reserve_Capacity
(Container : in out Vector;
Capacity : Count_Type)
is
N : constant Count_Type := Length (Container);
begin
if Capacity = 0 then
if N = 0 then
declare
X : Elements_Access := Container.Elements;
begin
Container.Elements := null;
Free (X);
end;
elsif N < Container.Elements'Length then
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
declare
subtype Array_Index_Subtype is Index_Type'Base range
Index_Type'First .. Container.Last;
Src : Elements_Type renames
Container.Elements (Array_Index_Subtype);
subtype Array_Subtype is
Elements_Type (Array_Index_Subtype);
X : Elements_Access := Container.Elements;
begin
Container.Elements := new Array_Subtype'(Src);
Free (X);
end;
end if;
return;
end if;
if Container.Elements = null then
declare
Last_As_Int : constant Int'Base :=
Int (Index_Type'First) + Int (Capacity) - 1;
begin
if Last_As_Int > Index_Type'Pos (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type (Last_As_Int);
subtype Array_Subtype is
Elements_Type (Index_Type'First .. Last);
begin
Container.Elements := new Array_Subtype;
end;
end;
return;
end if;
if Capacity <= N then
if N < Container.Elements'Length then
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
declare
subtype Array_Index_Subtype is Index_Type'Base range
Index_Type'First .. Container.Last;
Src : Elements_Type renames
Container.Elements (Array_Index_Subtype);
subtype Array_Subtype is
Elements_Type (Array_Index_Subtype);
X : Elements_Access := Container.Elements;
begin
Container.Elements := new Array_Subtype'(Src);
Free (X);
end;
end if;
return;
end if;
if Capacity = Container.Elements'Length then
return;
end if;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
declare
Last_As_Int : constant Int'Base :=
Int (Index_Type'First) + Int (Capacity) - 1;
begin
if Last_As_Int > Index_Type'Pos (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
declare
Last : constant Index_Type := Index_Type (Last_As_Int);
subtype Array_Subtype is
Elements_Type (Index_Type'First .. Last);
E : Elements_Access := new Array_Subtype;
begin
declare
Src : Elements_Type renames
Container.Elements (Index_Type'First .. Container.Last);
Tgt : Elements_Type renames
E (Index_Type'First .. Container.Last);
begin
Tgt := Src;
exception
when others =>
Free (E);
raise;
end;
declare
X : Elements_Access := Container.Elements;
begin
Container.Elements := E;
Free (X);
end;
end;
end;
end Reserve_Capacity;
----------------------
-- Reverse_Elements --
----------------------
procedure Reverse_Elements (Container : in out Vector) is
begin
if Container.Length <= 1 then
return;
end if;
if Container.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (vector is locked)";
end if;
declare
I, J : Index_Type;
E : Elements_Type renames Container.Elements.all;
begin
I := Index_Type'First;
J := Container.Last;
while I < J loop
declare
EI : constant Element_Type := E (I);
begin
E (I) := E (J);
E (J) := EI;
end;
I := I + 1;
J := J - 1;
end loop;
end;
end Reverse_Elements;
------------------
-- Reverse_Find --
------------------
function Reverse_Find
(Container : Vector;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
is
Last : Index_Type'Base;
begin
if Position.Container /= null
and then Position.Container /= Container'Unchecked_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Position.Container = null
or else Position.Index > Container.Last
then
Last := Container.Last;
else
Last := Position.Index;
end if;
for Indx in reverse Index_Type'First .. Last loop
if Container.Elements (Indx) = Item then
return (Container'Unchecked_Access, Indx);
end if;
end loop;
return No_Element;
end Reverse_Find;
------------------------
-- Reverse_Find_Index --
------------------------
function Reverse_Find_Index
(Container : Vector;
Item : Element_Type;
Index : Index_Type := Index_Type'Last) return Extended_Index
is
Last : Index_Type'Base;
begin
if Index > Container.Last then
Last := Container.Last;
else
Last := Index;
end if;
for Indx in reverse Index_Type'First .. Last loop
if Container.Elements (Indx) = Item then
return Indx;
end if;
end loop;
return No_Index;
end Reverse_Find_Index;
---------------------
-- Reverse_Iterate --
---------------------
procedure Reverse_Iterate
(Container : Vector;
Process : not null access procedure (Position : Cursor))
is
V : Vector renames Container'Unrestricted_Access.all;
B : Natural renames V.Busy;
begin
B := B + 1;
begin
for Indx in reverse Index_Type'First .. Container.Last loop
Process (Cursor'(Container'Unchecked_Access, Indx));
end loop;
exception
when others =>
B := B - 1;
raise;
end;
B := B - 1;
end Reverse_Iterate;
----------------
-- Set_Length --
----------------
procedure Set_Length (Container : in out Vector; Length : Count_Type) is
begin
if Length = Vectors.Length (Container) then
return;
end if;
if Container.Busy > 0 then
raise Program_Error with
"attempt to tamper with elements (vector is busy)";
end if;
if Length > Capacity (Container) then
Reserve_Capacity (Container, Capacity => Length);
end if;
declare
Last_As_Int : constant Int'Base :=
Int (Index_Type'First) + Int (Length) - 1;
begin
Container.Last := Index_Type'Base (Last_As_Int);
end;
end Set_Length;
----------
-- Swap --
----------
procedure Swap (Container : in out Vector; I, J : Index_Type) is
begin
if I > Container.Last then
raise Constraint_Error with "I index is out of range";
end if;
if J > Container.Last then
raise Constraint_Error with "J index is out of range";
end if;
if I = J then
return;
end if;
if Container.Lock > 0 then
raise Program_Error with
"attempt to tamper with cursors (vector is locked)";
end if;
declare
EI : Element_Type renames Container.Elements (I);
EJ : Element_Type renames Container.Elements (J);
EI_Copy : constant Element_Type := EI;
begin
EI := EJ;
EJ := EI_Copy;
end;
end Swap;
procedure Swap (Container : in out Vector; I, J : Cursor) is
begin
if I.Container = null then
raise Constraint_Error with "I cursor has no element";
end if;
if J.Container = null then
raise Constraint_Error with "J cursor has no element";
end if;
if I.Container /= Container'Unrestricted_Access then
raise Program_Error with "I cursor denotes wrong container";
end if;
if J.Container /= Container'Unrestricted_Access then
raise Program_Error with "J cursor denotes wrong container";
end if;
Swap (Container, I.Index, J.Index);
end Swap;
---------------
-- To_Cursor --
---------------
function To_Cursor
(Container : Vector;
Index : Extended_Index) return Cursor
is
begin
if Index not in Index_Type'First .. Container.Last then
return No_Element;
end if;
return Cursor'(Container'Unchecked_Access, Index);
end To_Cursor;
--------------
-- To_Index --
--------------
function To_Index (Position : Cursor) return Extended_Index is
begin
if Position.Container = null then
return No_Index;
end if;
if Position.Index <= Position.Container.Last then
return Position.Index;
end if;
return No_Index;
end To_Index;
---------------
-- To_Vector --
---------------
function To_Vector (Length : Count_Type) return Vector is
begin
if Length = 0 then
return Empty_Vector;
end if;
declare
First : constant Int := Int (Index_Type'First);
Last_As_Int : constant Int'Base := First + Int (Length) - 1;
Last : Index_Type;
Elements : Elements_Access;
begin
if Last_As_Int > Index_Type'Pos (Index_Type'Last) then
raise Constraint_Error with "Length is out of range";
end if;
Last := Index_Type (Last_As_Int);
Elements := new Elements_Type (Index_Type'First .. Last);
return Vector'(Controlled with Elements, Last, 0, 0);
end;
end To_Vector;
function To_Vector
(New_Item : Element_Type;
Length : Count_Type) return Vector
is
begin
if Length = 0 then
return Empty_Vector;
end if;
declare
First : constant Int := Int (Index_Type'First);
Last_As_Int : constant Int'Base := First + Int (Length) - 1;
Last : Index_Type;
Elements : Elements_Access;
begin
if Last_As_Int > Index_Type'Pos (Index_Type'Last) then
raise Constraint_Error with "Length is out of range";
end if;
Last := Index_Type (Last_As_Int);
Elements := new Elements_Type'(Index_Type'First .. Last => New_Item);
return Vector'(Controlled with Elements, Last, 0, 0);
end;
end To_Vector;
--------------------
-- Update_Element --
--------------------
procedure Update_Element
(Container : in out Vector;
Index : Index_Type;
Process : not null access procedure (Element : in out Element_Type))
is
B : Natural renames Container.Busy;
L : Natural renames Container.Lock;
begin
if Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
B := B + 1;
L := L + 1;
begin
Process (Container.Elements (Index));
exception
when others =>
L := L - 1;
B := B - 1;
raise;
end;
L := L - 1;
B := B - 1;
end Update_Element;
procedure Update_Element
(Container : in out Vector;
Position : Cursor;
Process : not null access procedure (Element : in out Element_Type))
is
begin
if Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Position.Container /= Container'Unrestricted_Access then
raise Program_Error with "Position cursor denotes wrong container";
end if;
Update_Element (Container, Position.Index, Process);
end Update_Element;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Vector)
is
begin
Count_Type'Base'Write (Stream, Length (Container));
for J in Index_Type'First .. Container.Last loop
Element_Type'Write (Stream, Container.Elements (J));
end loop;
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Position : Cursor)
is
begin
raise Program_Error with "attempt to stream vector cursor";
end Write;
end Ada.Containers.Vectors;
|
ANTLRTestProjects/antbased/Options/grammar/myorg/mypackage/AllPossibleOptionsWithinAPackage2.g4 | timboudreau/ANTLR4-Plugins-for-NetBeans | 1 | 6451 | grammar AllPossibleOptionsWithinAPackage2;
/*
Next Java import statement are parsed for hyperlinks
*/
@header {
package myorg.mypackage;
}
/*
block comment
*/
options
{ // a line comment
language='Java'; // there is no check for the string value
// All next hyperlinks must be functional
superClass=anotherorg.anotherpackage.MySuperClass2; // If previous class file does not exist then error messsge
tokenVocab=MyTokenFile2; // If previous token file does not exist then error messsge
TokenLabelType=anotherorg.anotherpackage.MyToken2; // If previous class file does not exist then error messsge
} // line comment
rule1 : 'a'; // a foo parser rule for enabling to generate code |
Week_8-9/25 - aad.asm | iamruveyda/KBU-Mikro | 1 | 96257 | <filename>Week_8-9/25 - aad.asm
.model small
.data
.code
main proc
MOV AX,3539H ;AX=3539. ASCII for 59
AND AX,0F0FH ;AH=05,AL=09 unpacked BCD data
AAD ;AX=003BH hex equivalent of 59
MOV BH,08H ;divide by 08
DIV BH ;3B/08 gives AL=07,AH=03
OR AX,3030H ;AL=37H (quotient) AH=33H (rem)
endp
end main |
chrissalo/dot1.asm | mikepea/vectrex-playground | 5 | 10864 | <gh_stars>1-10
;***************************************************************************
; DEFINE SECTION
;***************************************************************************
include "VECTREX.I" ; vectrex function includes
; start of vectrex memory with cartridge name...
org 0
;***************************************************************************
; HEADER SECTION
;***************************************************************************
db "g GCE 1998", $80 ; 'g' is copyright sign
dw music1 ; music from the rom
db $F8, $50, $20, -$56 ; height, width, rel y, rel x
; (from 0,0)
db "PLOT A DOT",$80 ; some game information,
; ending with $80
db 0 ; end of game header
;***************************************************************************
; CODE SECTION
;***************************************************************************
; here the cartridge program starts off
main:
jsr Wait_Recal ; Vectrex BIOS recalibration
jsr Intensity_5F ; Sets the intensity of the
; vector beam to $5f
; special attention here!!!
jsr Dot_here ; Plot a dot at the center of
; the screen
bra main ; and repeat forever
;***************************************************************************
end main
;***************************************************************************
|
oeis/084/A084173.asm | neoneye/loda-programs | 11 | 98152 | <reponame>neoneye/loda-programs<filename>oeis/084/A084173.asm
; A084173: a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
; 1,3,5,13,27,59,121,249,503,1015,2037,4085,8179,16371,32753,65521,131055,262127,524269,1048557,2097131,4194283,8388585,16777193,33554407,67108839,134217701,268435429,536870883,1073741795,2147483617,4294967265,8589934559,17179869151,34359738333,68719476701,137438953435,274877906907,549755813849,1099511627737,2199023255511,4398046511063,8796093022165,17592186044373,35184372088787,70368744177619,140737488355281,281474976710609,562949953421263,1125899906842575,2251799813685197,4503599627370445
mov $1,2
pow $1,$0
div $0,2
sub $1,$0
sub $1,1
mul $1,2
add $1,1
mov $0,$1
|
programs/oeis/158/A158546.asm | neoneye/loda | 22 | 17506 | <gh_stars>10-100
; A158546: a(n) = 144*n^2 + 12.
; 12,156,588,1308,2316,3612,5196,7068,9228,11676,14412,17436,20748,24348,28236,32412,36876,41628,46668,51996,57612,63516,69708,76188,82956,90012,97356,104988,112908,121116,129612,138396,147468,156828,166476,176412,186636,197148,207948,219036,230412,242076,254028,266268,278796,291612,304716,318108,331788,345756,360012,374556,389388,404508,419916,435612,451596,467868,484428,501276,518412,535836,553548,571548,589836,608412,627276,646428,665868,685596,705612,725916,746508,767388,788556,810012,831756,853788,876108,898716,921612,944796,968268,992028,1016076,1040412,1065036,1089948,1115148,1140636,1166412,1192476,1218828,1245468,1272396,1299612,1327116,1354908,1382988,1411356
pow $0,2
mul $0,144
add $0,12
|
src/util-properties.adb | Letractively/ada-util | 0 | 11899 | <reponame>Letractively/ada-util
-----------------------------------------------------------------------
-- properties -- Generic name/value property management
-- Copyright (C) 2001, 2002, 2003, 2006, 2008, 2009, 2010, 2011, 2012, 2014 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Properties.Factories;
with Ada.Strings.Unbounded.Text_IO;
package body Util.Properties is
use Ada.Text_IO;
use Ada.Strings.Unbounded.Text_IO;
use Interface_P;
procedure Load_Property (Name : out Unbounded_String;
Value : out Unbounded_String;
File : in File_Type;
Prefix : in String := "";
Strip : in Boolean := False);
function Exists (Self : in Manager'Class;
Name : in String) return Boolean is
begin
-- There is not yet an implementation, no property
if Self.Impl = null then
return False;
end if;
return Exists (Self.Impl.all, +Name);
end Exists;
function Exists (Self : in Manager'Class;
Name : in Value) return Boolean is
begin
-- There is not yet an implementation, no property
if Self.Impl = null then
return False;
end if;
return Exists (Self.Impl.all, Name);
end Exists;
function Get (Self : in Manager'Class;
Name : in String) return Value is
begin
if Self.Impl = null then
raise NO_PROPERTY with "No property: '" & Name & "'";
end if;
return Get (Self.Impl.all, +Name);
end Get;
function Get (Self : in Manager'Class;
Name : in Value) return Value is
begin
if Self.Impl = null then
raise NO_PROPERTY with "No property: '" & To_String (Name) & "'";
end if;
return Get (Self.Impl.all, Name);
end Get;
function Get (Self : in Manager'Class;
Name : in String) return String is
begin
if Self.Impl = null then
raise NO_PROPERTY with "No property: '" & Name & "'";
end if;
return -Get (Self.Impl.all, +Name);
end Get;
function Get (Self : in Manager'Class;
Name : in Value) return String is
begin
if Self.Impl = null then
raise NO_PROPERTY;
end if;
return -Get (Self.Impl.all, Name);
end Get;
function Get (Self : in Manager'Class;
Name : in String;
Default : in String) return String is
Prop_Name : constant Value := +Name;
begin
if Exists (Self, Prop_Name) then
return Get (Self, Prop_Name);
else
return Default;
end if;
end Get;
procedure Check_And_Create_Impl (Self : in out Manager) is
begin
if Self.Impl = null then
Util.Properties.Factories.Initialize (Self);
elsif Util.Concurrent.Counters.Value (Self.Impl.Count) > 1 then
declare
Old : Interface_P.Manager_Access := Self.Impl;
Is_Zero : Boolean;
begin
Self.Impl := Create_Copy (Self.Impl.all);
Util.Concurrent.Counters.Increment (Self.Impl.Count);
Util.Concurrent.Counters.Decrement (Old.Count, Is_Zero);
if Is_Zero then
Delete (Old.all, Old);
end if;
end;
end if;
end Check_And_Create_Impl;
procedure Insert (Self : in out Manager'Class;
Name : in String;
Item : in String) is
begin
Check_And_Create_Impl (Self);
Insert (Self.Impl.all, +Name, +Item);
end Insert;
-- ------------------------------
-- Set the value of the property. The property is created if it
-- does not exists.
-- ------------------------------
procedure Set (Self : in out Manager'Class;
Name : in String;
Item : in String) is
begin
Check_And_Create_Impl (Self);
Set (Self.Impl.all, +Name, +Item);
end Set;
-- ------------------------------
-- Set the value of the property. The property is created if it
-- does not exists.
-- ------------------------------
procedure Set (Self : in out Manager'Class;
Name : in String;
Item : in Value) is
begin
Check_And_Create_Impl (Self);
Set (Self.Impl.all, +Name, Item);
end Set;
-- ------------------------------
-- Set the value of the property. The property is created if it
-- does not exists.
-- ------------------------------
procedure Set (Self : in out Manager'Class;
Name : in Unbounded_String;
Item : in Value) is
begin
Check_And_Create_Impl (Self);
Set (Self.Impl.all, Name, Item);
end Set;
-- ------------------------------
-- Remove the property given its name.
-- ------------------------------
procedure Remove (Self : in out Manager'Class;
Name : in String) is
begin
if Self.Impl = null then
raise NO_PROPERTY;
end if;
Check_And_Create_Impl (Self);
Remove (Self.Impl.all, +Name);
end Remove;
-- ------------------------------
-- Remove the property given its name.
-- ------------------------------
procedure Remove (Self : in out Manager'Class;
Name : in Value) is
begin
if Self.Impl = null then
raise NO_PROPERTY;
end if;
Check_And_Create_Impl (Self);
Remove (Self.Impl.all, Name);
end Remove;
-- ------------------------------
-- Iterate over the properties and execute the given procedure passing the
-- property name and its value.
-- ------------------------------
procedure Iterate (Self : in Manager'Class;
Process : access procedure (Name, Item : Value)) is
begin
if Self.Impl /= null then
Self.Impl.Iterate (Process);
end if;
end Iterate;
-- ------------------------------
-- Return the name of the properties defined in the manager.
-- When a prefix is specified, only the properties starting with
-- the prefix are returned.
-- ------------------------------
function Get_Names (Self : in Manager;
Prefix : in String := "") return Name_Array is
begin
if Self.Impl = null then
declare
Empty : Name_Array (1 .. 0);
begin
return Empty;
end;
else
return Get_Names (Self.Impl.all, Prefix);
end if;
end Get_Names;
procedure Adjust (Object : in out Manager) is
begin
if Object.Impl /= null then
Util.Concurrent.Counters.Increment (Object.Impl.Count);
end if;
end Adjust;
procedure Finalize (Object : in out Manager) is
Is_Zero : Boolean;
begin
if Object.Impl /= null then
Util.Concurrent.Counters.Decrement (Object.Impl.Count, Is_Zero);
if Is_Zero then
Delete (Object.Impl.all, Object.Impl);
end if;
end if;
end Finalize;
procedure Set_Property_Implementation (Self : in out Manager;
Impl : in Interface_P.Manager_Access) is
begin
if Self.Impl = null then
Self.Impl := Impl;
-- Self.Impl.Count := 1;
end if;
end Set_Property_Implementation;
procedure Load_Property (Name : out Unbounded_String;
Value : out Unbounded_String;
File : in File_Type;
Prefix : in String := "";
Strip : in Boolean := False) is
pragma Unreferenced (Strip);
Line : Unbounded_String;
Pos : Natural;
Len : Natural;
begin
while not End_Of_File (File) loop
Line := Get_Line (File);
Len := Length (Line);
if Len /= 0 and then Element (Line, 1) /= '#' then
Pos := Index (Line, "=");
if Pos > 0 and then Prefix'Length > 0 and then Index (Line, Prefix) = 1 then
Name := Unbounded_Slice (Line, Prefix'Length + 1, Pos - 1);
Value := Tail (Line, Len - Pos);
return;
elsif Pos > 0 and Prefix'Length = 0 then
Name := Head (Line, Pos - 1);
Value := Tail (Line, Len - Pos);
return;
end if;
end if;
end loop;
Name := Null_Unbounded_String;
Value := Null_Unbounded_String;
end Load_Property;
procedure Load_Properties (Self : in out Manager'Class;
File : in File_Type;
Prefix : in String := "";
Strip : in Boolean := False) is
Name, Value : Unbounded_String;
begin
loop
Load_Property (Name, Value, File, Prefix, Strip);
exit when Name = Null_Unbounded_String;
Set (Self, Name, Value);
end loop;
exception
when End_Error =>
return;
end Load_Properties;
procedure Load_Properties (Self : in out Manager'Class;
Path : in String;
Prefix : in String := "";
Strip : in Boolean := False) is
F : File_Type;
begin
Open (F, In_File, Path);
Load_Properties (Self, F, Prefix, Strip);
Close (F);
end Load_Properties;
-- ------------------------------
-- Copy the properties from FROM which start with a given prefix.
-- If the prefix is empty, all properties are copied. When <b>Strip</b> is True,
-- the prefix part is removed from the property name.
-- ------------------------------
procedure Copy (Self : in out Manager'Class;
From : in Manager'Class;
Prefix : in String := "";
Strip : in Boolean := False) is
Names : constant Name_Array := From.Get_Names;
begin
for I in Names'Range loop
declare
Name : Unbounded_String renames Names (I);
begin
if Prefix'Length = 0 or else Index (Name, Prefix) = 1 then
if Strip and Prefix'Length > 0 then
declare
S : constant String := Slice (Name, Prefix'Length + 1, Length (Name));
begin
Self.Set (+(S), From.Get (Name));
end;
else
Self.Set (Name, From.Get (Name));
end if;
end if;
end;
end loop;
end Copy;
end Util.Properties;
|
programs/oeis/340/A340086.asm | neoneye/loda | 22 | 24172 | <filename>programs/oeis/340/A340086.asm
; A340086: a(1) = 0, for n > 1, a(n) = A000265(n-1) / gcd(n-1, A336466(n)).
; 0,1,1,3,1,5,1,7,1,9,1,11,1,13,7,15,1,17,1,19,5,21,1,23,3,25,13,9,1,29,1,31,1,33,17,35,1,37,19,39,1,41,1,43,11,45,1,47,1,49,25,17,1,53,27,55,7,57,1,59,1,61,31,63,1,13,1,67,17,23,1,71,1,73,37,25,19,77,1,79,5,81,1,83,21,85,43,87,1,89,5,91,23,93,47,95,1,97,49,99
seq $0,340083 ; a(n) = (n-1) / gcd(n-1, A003958(n)).
lpb $0
dif $0,2
lpe
|
bm-1/examples/music-demosong.asm | bushy555/ZX-Spectrum-1-Bit-Routines | 59 | 21144 | ;bm-1 demo song
;************************************************************************************************************************************************
;song sequence
dw ptn3
dw ptn4
mloop ;sequence loop point (mandatory)
dw ptn5
dw ptn5
dw ptn6
dw ptn7
dw 0 ;sequence end marker (mandatory)
;************************************************************************************************************************************************
;pattern data
;
;DATA FORMAT: ctrl0/drum param|0 (Z = end, C=no updates, PV = drum1, M = drum2)
; ctrl1/patch1_7 (Z = no patch update, PV = skip patch 1-6, S = skip patch 8-11, C = skip all)
; [patch_ptr, div1, [(if div1&0x8000) param1]]
; ctrl2/patch2_7 (Z = no patch update, PV = skip patch 1-6, S = skip patch 8-11, C = skip all)
; [patch_ptr, div2, [(if div2&0x8000) param2]]
; ctrl3/speed (Z = no tbl_ptr update)
;
;
; dr_cfg p1_7 patch1 div1 par1 p2_7 patch2 div2 par2 speed tbl_ptr
; ctrl0 ctrl1 ctrl2 ctrl3
ptn3 dw #0000, #0f00, patch4, a3|#8000,#8010,#0000, patch0, rest, #9000, arpvol1
dw #0001, #9040
dw #0000, #0040, a3|#8000,#8010,#0001, #9000, arpvol2
dw #0001, #9040
dw #0000, #0040, g3|#8000,#8010,#0001, #9000, arpvol3
dw #0001, #9040
dw #0000, #0040, g3|#8000,#8010,#0001, #9000, arpvol4
dw #0001, #9040
db #40
ptn4 dw #0000, #0f00, patch4, a3|#8000,#8010,#9f00, patch3, a0|#8000,#8000,#9000, arpvol1
dw #0001, #9040
dw #0000, #0040, a3|#8000,#8010,#0001, #9000, arpvol2
dw #0001, #9040
dw #0000, #0040, g3|#8000,#8010,#0040, g0|#8000,#8000,#9000, arpvol3
dw #0001, #9040
dw #0000, #0040, g3|#8000,#8010,#0001, #9000, arpvol4
dw #0000, #0001, #0040, b0|#8000,#8000,#6c40
dw #0000, #0001, #0040, c1|#8000,#8000,#1240
dw #0000, #0001, #0040, b0|#8000,#8000,#1240
db #40
ptn7 dw #0c04, #0f00, patch4, a3|#8000,#8010,#0700, patch2, a1, #1200, arpvol1 ;90
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, a1, #0f40
dw #1080, #0001, #0040, ais1, #0340
dw #0000, #0001, #0040, b1, #0340
dw #0000, #0001, #0040, c2, #0340
dw #1080, #0001, #0040, cis2, #0340
dw #0000, #0001, #0040, d2, #0340
dw #0000, #0001, #0040, dis2, #0340
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, a3|#8000,#8010,#0040, g2, #1200, arpvol2
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, g2, #0f40
dw #1080, #0001, #0040, e2, #0940
dw #1080, #0001, #0040, d2, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0001, #1200, arpvol3
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0040, d2, #0940
dw #1080, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0040, e2, #1200, arpvol4
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, e2, #0f40
dw #1080, #0001, #0040, d2, #0940
dw #1080, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #1080, #0001, #0001, #0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0700, patch2, d2, #0f40
dw #0c04, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, b1, #0940
db #40
ptn6 dw #0c04, #0f00, patch4, a3|#8000,#8010,#0f00, patch1, a1, #1200, arpvol1 ;90
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, a1, #0f40
dw #0000, #0001, #0040, ais1, #0340
dw #0000, #0001, #0040, b1, #0340
dw #0000, #0001, #0040, c2, #0340
dw #0000, #0001, #0040, cis2, #0340
dw #0000, #0001, #0040, d2, #0340
dw #0000, #0001, #0040, dis2, #0340
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0040, a3|#8000,#8010,#0040, g2, #1200, arpvol2
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, g2, #0f40
dw #0000, #0001, #0040, e2, #0940
dw #0000, #0001, #0040, d2, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, e2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0c04, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0001, #1200, arpvol3
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0040, d2, #0940
dw #0000, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0040, e2, #1200, arpvol4
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, e2, #0f40
dw #0000, #0001, #0040, d2, #0940
dw #0000, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #0c04, #0001, #0040, d2, #1240
dw #0000, #0001, #0001, #0940
dw #0000, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0340
dw #0000, #0001, #0f00, patch1, d2, #0f40
dw #0c04, #0001, #0040, c2, #0940
dw #0c04, #0001, #0040, b1, #0940
db #40
ptn5 dw #0c04, #0f00, patch4, a3|#8000,#8010,#9f00, patch3, rest, #1200, arpvol1 ;90
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #0c04, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, a3|#8000,#8010,#0040, rest, #1200, arpvol2
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, a0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0040, rest, #1200, arpvol3
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #0c04, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0040, g3|#8000,#8010,#0040, rest, #1200, arpvol4
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, g0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, b0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #1080, #0001, #0040, b0|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #0c04, #0001, #0040, rest, #1240
dw #1080, #0001, #0040, c1|#8000,#6000,#0940
dw #1080, #0001, #0001, #0940
dw #4080, #0001, #0f00, patch5, #a174, #7040,#0640
dw #0000, #0001, #9f00, patch3, rest, #0c40
dw #0c04, #0001, #0040, b0|#8000,#6000,#0940
dw #0c04, #0001, #0001, #0940
db #40
;************************************************************************************************************************************************
;patch data
;4, 6, or 10 bytes of code, depending on ctrl1/ctrl2
patch0
reset_all ;macro supplied by patches.h
patch1
saw_wave
patch2 ;expects param1_7 = #07 (rlca)
harmonics
patch3
sid_sound_ch2
patch4
duty_vol_ch1
patch5
noise_vol_ch2
;************************************************************************************************************************************************
;fx table data
;
;tbl_flags: Z = stop tbl_exec, C= no update, S = tbl_jump, PV = execute function (addr follows)
;if no flags set or function executed that jumps to tblStdUpdate, second ctrlbyte follows: Z = skip freq_div1, C=skip generic_param1,
; S = skip freq_div2, PV = skip generic_param2
;data follows in order: freq_div1, generic_param1, freq_div2, generic_param2
stopfx
db #40
arpvol1
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8020
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8070
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8020
arpvol1lp
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, e4
db #01
db #01
dw #0000, #0084, a3, #8010
dw #0080, arpvol1lp
arpvol2
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8020
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8070
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8020
arpvol2lp
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, a3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, a3, #8010
dw #0080, arpvol2lp
arpvol3
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8020
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8070
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8060
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8050
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8040
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8030
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8020
arpvol3lp
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, c4
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8010
dw #0080, arpvol3lp
arpvol4
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8020
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8030
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8040
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8050
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8060
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8070
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8060
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8050
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8040
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8030
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8020
arpvol4lp
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0085, g3
db #01
db #01
dw #0000, #0085, b3
db #01
db #01
dw #0000, #0085, d4
db #01
db #01
dw #0000, #0084, g3, #8010
dw #0080, arpvol4lp
;************************************************************************************************************************************************ |
src/giza-widget-frame.adb | Fabien-Chouteau/Giza | 7 | 23979 | <filename>src/giza-widget-frame.adb
------------------------------------------------------------------------------
-- --
-- Giza --
-- --
-- Copyright (C) 2015 <NAME> (<EMAIL>) --
-- --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
package body Giza.Widget.Frame is
----------
-- Draw --
----------
overriding
procedure Draw (This : in out Instance;
Ctx : in out Context.Class;
Force : Boolean := True) is
begin
if This.Dirty or else Force then
if not This.BG_Disabled then
Draw (Background.Instance (This), Ctx, Force);
end if;
if not This.Frame_Disabled then
Ctx.Set_Color (This.FG);
Ctx.Rounded_Rectangle (((0, 0), This.Get_Size), This.Radius);
end if;
if not This.Img_Disabled and then This.Img /= null then
Ctx.Draw_Image (This.Img.all,
((This.Get_Size.W - This.Img.Size.W) / 2,
(This.Get_Size.H - This.Img.Size.H) / 2));
end if;
This.Set_Dirty (False);
end if;
end Draw;
--------------------
-- Set_Foreground --
--------------------
procedure Set_Foreground (This : in out Instance; FG : Color) is
begin
This.FG := FG;
end Set_Foreground;
--------------------
-- Get_Foreground --
--------------------
function Get_Foreground (This : Instance) return Color is (This.FG);
-------------------
-- Invert_Colors --
-------------------
procedure Invert_Colors (This : in out Instance) is
Tmp_C : Color;
Tmp_Img : Image.Ref;
begin
Tmp_C := This.FG;
This.FG := This.Get_Background;
This.Set_Background (Tmp_C);
Tmp_Img := This.Invert_Img;
This.Invert_Img := This.Img;
This.Img := Tmp_Img;
end Invert_Colors;
---------------
-- Set_Image --
---------------
procedure Set_Image (This : in out Instance;
Img : not null Image.Ref)
is
begin
This.Img := Img;
This.Img_Disabled := False;
end Set_Image;
----------------------
-- Set_Invert_Image --
----------------------
procedure Set_Invert_Image (This : in out Instance;
Img : not null Image.Ref)
is
begin
This.Invert_Img := Img;
This.Img_Disabled := False;
end Set_Invert_Image;
------------------------
-- Disable_Background --
------------------------
procedure Disable_Background (This : in out Instance) is
begin
This.BG_Disabled := True;
end Disable_Background;
-------------------
-- Disable_Frame --
-------------------
procedure Disable_Frame (This : in out Instance) is
begin
This.Frame_Disabled := True;
end Disable_Frame;
-------------------
-- Disable_Image --
-------------------
procedure Disable_Image (This : in out Instance) is
begin
This.Img_Disabled := True;
end Disable_Image;
end Giza.Widget.Frame;
|
programs/oeis/247/A247841.asm | neoneye/loda | 22 | 178694 | <gh_stars>10-100
; A247841: a(n) = Sum_{k=2..n} 8^k.
; 0,64,576,4672,37440,299584,2396736,19173952,153391680,1227133504,9817068096,78536544832,628292358720,5026338869824,40210710958656,321685687669312,2573485501354560,20587884010836544,164703072086692416,1317624576693539392,10540996613548315200,84327972908386521664,674623783267092173376,5396990266136737387072,43175922129093899096640,345407377032751192773184,2763259016262009542185536,22106072130096076337484352,176848577040768610699874880,1414788616326148885598999104,11318308930609191084791992896,90546471444873528678335943232,724371771558988229426687545920,5794974172471905835413500367424,46359793379775246683308002939456,370878347038201973466464023515712,2967026776305615787731712188125760,23736214210444926301853697505006144,189889713683559410414829580040049216
mov $1,8
pow $1,$0
div $1,7
mul $1,64
mov $0,$1
|
src/sqlite3.ads | faelys/lithium3 | 1 | 11470 | <reponame>faelys/lithium3<filename>src/sqlite3.ads
pragma Style_Checks (Off);
--
-- Copyright (c) 2009, 2012 <NAME> <<EMAIL>>
--
-- Permission to use, copy, modify, and distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--
with Ada.Strings.Unbounded;
with Interfaces.C;
package SQLite3 is
type SQLite3_DB is private;
type SQLite3_Statement is private;
type Error_Code is new Long_Integer;
subtype SQL_Parameter_Index is Integer range 1 .. Integer'Last;
subtype SQL_Column_Index is Integer;
type Int is new Interfaces.C.Int;
SQLITE_OK : constant Error_Code := 0;
SQLITE_ERROR : constant Error_Code := 1;
SQLITE_ROW : constant Error_Code := 100;
SQLITE_DONE : constant Error_Code := 101;
SQLITE_TRANSIENT : constant := -1;
procedure Open (Filename : in String;
Handle : out SQLite3_DB;
Status : out Error_Code);
procedure Close (Handle : in out SQLite3_DB; Status : out Error_Code);
procedure Prepare (Handle : SQLite3_DB;
Sql : String;
SQL_Handle : out SQLite3_Statement;
Status : out Error_Code);
procedure Step (SQL_Handle : SQLite3_Statement; Status : out Error_Code);
procedure Finish (SQL_Handle : SQLite3_Statement; Status : out Error_Code);
procedure Reset (SQL_Handle : SQLite3_Statement; Status : out Error_Code);
procedure Clear_Bindings (SQL_Handle : SQLite3_Statement;
Status : out Error_Code);
procedure Bind (SQL_Handle : SQLite3_Statement;
Index : SQL_Parameter_Index;
Value : Integer;
Status : out Error_Code);
procedure Bind (SQL_Handle : SQLite3_Statement;
Index : SQL_Parameter_Index;
Value : Long_Integer;
Status : out Error_Code);
procedure Bind (SQL_Handle : SQLite3_Statement;
Index : SQL_Parameter_Index;
Value : Ada.Strings.Unbounded.Unbounded_String;
Status : out Error_Code);
procedure Bind (SQL_Handle : SQLite3_Statement;
Index : SQL_Parameter_Index;
Value : String;
Status : out Error_Code);
procedure Bind (SQL_Handle : SQLite3_Statement;
Index : SQL_Parameter_Index;
Value : Interfaces.C.double;
Status : out Error_Code);
procedure Column (SQL_Handle : SQLite3_Statement;
Index : SQL_Column_Index;
Value : out Int);
procedure Column (SQL_Handle : SQLite3_Statement;
Index : SQL_Column_Index;
Value : out Ada.Strings.Unbounded.Unbounded_String);
procedure Busy_Timeout (Handle : SQLite3_DB;
ms : Interfaces.C.int;
Status : out Error_Code);
function Error_Message (Handle : SQLite3_DB) return String;
private
type DB_Private is null record;
type DB_Private_Access is access all DB_Private;
type SQLite3_DB is record
Ptr : aliased DB_Private_Access;
end record;
type Statement_Private is null record;
type Statement_Private_Access is access all Statement_Private;
type SQLite3_Statement is record
Ptr : aliased Statement_Private_Access;
end record;
end SQLite3;
|
dense_AD_src/dense_ad.ads | sciencylab/lagrangian-solver | 0 | 27599 | <filename>dense_AD_src/dense_ad.ads
with Numerics, Numerics.Dense_Matrices;
use Numerics, Numerics.Dense_Matrices;
generic
Num : in Nat;
package Dense_AD is
type Evaluation_Level is (Value, Gradient, Hessian);
subtype Vector is Real_Vector (1 .. Num);
subtype Matrix is Real_Matrix (1 .. Num, 1 .. Num);
type AD_Type is private;
type AD_Vector is array (1 .. Num) of AD_Type;
procedure Set_Evaluation_Level (Value : in Evaluation_Level)
with Inline => True;
function Get_Evaluation_Level return Evaluation_Level with Inline => True;
function Var (X : in Real;
I : in Nat;
Dx : in Real := 1.0) return AD_Type with Pre => I <= Num;
function Const (X : in Real) return AD_Type;
function Var (X : in Vector) return AD_Vector
with Pre => X'Length = Num;
function Val (X : in AD_Type) return Real;
function Grad (X : in AD_Type) return Vector;
function Hessian (X : in AD_Type) return Matrix;
function "+" (X, Y : in AD_Type) return AD_Type;
function "-" (X, Y : in AD_Type) return AD_Type;
function "*" (X, Y : in AD_Type) return AD_Type;
function "/" (X, Y : in AD_Type) return AD_Type;
function "**" (X : in AD_Type; K : in Integer) return AD_Type;
function "**" (X : in AD_Type; K : in Real) return AD_Type;
function Sqrt (X : in AD_Type) return AD_Type is (X ** 0.5);
function Square (X : in AD_Type) return AD_Type is (X ** 2);
function Cube (X : in AD_Type) return AD_Type is (X ** 3);
function "+" (X : in AD_Type) return AD_Type is (X) with Inline => True;
function "-" (X : in AD_Type) return AD_Type;
function "+" (X : in Real; Y : in AD_Type) return AD_Type;
function "+" (X : in AD_Type; Y : in Real) return AD_Type is (Y + X);
function "-" (X : in Real; Y : in AD_Type) return AD_Type;
function "-" (X : in AD_Type; Y : in Real) return AD_Type;
function "*" (X : in Real; Y : in AD_Type) return AD_Type;
function "*" (X : in AD_Type; Y : in Real) return AD_Type is (Y * X);
function "/" (X : in Real; Y : in AD_Type) return AD_Type is (X * (Y ** (-1)));
function "/" (X : in AD_Type; Y : in Real) return AD_Type is ((1.0 / Y) * X)
with Pre => Y /= 0.0;
function Sin (X : in AD_Type) return AD_Type;
function Cos (X : in AD_Type) return AD_Type;
function Tan (X : in AD_Type) return AD_Type;
function Sec (X : in AD_Type) return AD_Type is (1.0 / Sin (X));
function Csc (X : in AD_Type) return AD_Type is (1.0 / Cos (X));
function Cot (X : in AD_Type) return AD_Type is (1.0 / Tan (X));
function Exp (X : in AD_Type) return AD_Type;
function Log (X : in AD_Type) return AD_Type;
function Sinh (X : in AD_Type) return AD_Type;
function Cosh (X : in AD_Type) return AD_Type;
function Tanh (X : in AD_Type) return AD_Type;
function Sech (X : in AD_Type) return AD_Type is (1.0 / Sinh (X));
function Csch (X : in AD_Type) return AD_Type is (1.0 / Cosh (X));
function Coth (X : in AD_Type) return AD_Type is (1.0 / Tanh (X));
function Sign (X : in AD_Type) return Real;
------------- procedures ----------------------
procedure Print (X : in AD_Type);
private
Level : Evaluation_Level := Hessian;
type AD_Type is
record
Val : Real;
Grad : Vector;
Hessian : Matrix;
end record;
G0 : constant Vector := (others => 0.0);
H0 : constant Matrix := (others => (others => 0.0));
end Dense_AD;
|
Scripts/mark_vmkernel.scpt | cgx027/iterm2_scripts | 0 | 401 | tell application "iTerm2"
tell current session of current window
write text "esxcli system syslog mark -s ''"
end tell
end tell
|
altair.asm | jorgicor/altair | 0 | 23722 | ; ----------------------------------------------------------------------------
; Altair, CIDLESA's 1981 arcade game remade for the ZX Spectrum and
; Amstrad CPC.
;
; Project started 23 Sep 2013.
; ----------------------------------------------------------------------------
#include "c_config.asm"
#ifdef ZX
#include "c_lib_zx.asm"
#endif
#ifdef CPC
#include "c_lib_cpc.asm"
#endif
#include "const.asm"
#ifdef ZX
.org $8000
#endif
#ifdef CPC
.org $40
#endif
start
di
#ifdef ZX
; Set Stack Pointer.
ld sp,0
#endif
#ifdef CPC
; Set Stack Pointer.
ld sp,$c000
; Init cpc hardware.
call init_cpc
; Set palette.
ld hl,palette
call set_pal
#endif
; Detect if AY sound chip is present.
call detect_ay
; Clear vram.
xor a
call clrscr
; Set border color.
ld a,BORDER_GAME
call set_border_color
; Install interrupt routine.
ld hl,interrupt
call install_irq
#ifdef ZX
; Prepare alien images.
ld hl,pmir0
call mirims
#endif
#ifdef CPC
call init_pixmask
#endif
; Init back buffer addresses.
call init_bbuf
; Clear backbuffer.
ld a,ABUFCLR
call clrbbuf
; Set first state.
ld a,STATE_DISCLAIMER
call set_state
; Main loop.
theloop
call update_state
; Increment frame counter.
ld hl,frames
inc (hl)
jr theloop
; ------------------------------
; 'tochrp' To Character Position
; ------------------------------
;
; In A pixel coordinate.
; Out A character coordinates.
; Saves BC, DE, HL.
tochrp and $f8
rrca
rrca
rrca
ret
; ---------------------
; 'drsprs' Draw Sprites
; ---------------------
; Runs through the Sprite Table and draws all sprites.
drsprs
ld b,NSPRS
ld hl,sprtab
drsprs1 push bc
call drspr
pop bc
djnz drsprs1
ret
; --------------------------------
; 'chrfix' Fix Dimension For Color
; --------------------------------
; Given the y position in pixels and the height in pixels, calculate
; the y position character aligned and the height in characters that
; is needed to fill the area.
;
; In E y position in pixels. C height in pixels.
; Out E y in characters. C height in characters.
; Saves HL
chrfix
; Set height in characters to (y & 7 + h + 7) / 8.
ld a,e
and 7
add a,c
add a,7
call tochrp
ld c,a
; Set y position in characters.
ld a,e
call tochrp
ld e,a
ret
; -----------------------------
; 'getspr' Get Free Sprite Slot
; -----------------------------
; Finds a free sprite slot between [D,E[.
;
; In [D,E[ slots where to find.
; Out HL address of slot. CY 0 if found, 1 if no free slot.
getspr ld hl,sprtab
ld c,SPRSZ
ld b,NSPRS
call gtslot
ret
; --------------------
; 'freesp' Free Sprite
; --------------------
; Frees sprite pointed by IY.
;
; In IY Sprite Pointer.
; Saves AF, BC, DE, HL.
freesp ld (iy+SP_ITL),0
ld (iy+SP_ITH),0
ld (iy+SP_ANL),0
ld (iy+SP_ANH),0
ret
; --------------------
; 'freeob' Free Object
; --------------------
; Frees object pointed by IX.
;
; In IX Object Pointer.
; Saves AF, BC, DE, HL.
freeob ld (ix+OB_FUL),0
ld (ix+OB_FUH),0
ret
; ------------------
; 'getob' Get Object
; ------------------
; Finds a free object slot in the Object Table.
;
; In [D,E[ slots where to find.
; Out HL address of slot. CY 0 if found, 1 if no free slot.
getob ld hl,objtab
ld c,OBJSZ
ld b,NOBJS
call gtslot
ret
; -----------------
; 'gtslot' Get Slot
; -----------------
; Finds a structure in an array of structures. If the first word is 0
; this means that the structure is free.
;
; In [D,E[ slots where to find. C size of structure.
; B table size. HL table address.
; Out HL address of slot. CY 0 if found, 1 if no free slot.
gtslot
; A will count until we reach E or NOBJS.
xor a
gtslot2 cp b
jr z,gtslot3
cp e
jr z,gtslot3
; We only consider the slot if it is equal or greater than D.
cp d
jr c,gtslot1
; Check if we have a free slot.
push af
ld a,(hl)
inc hl
or (hl)
dec hl
jr z,gtslot4
pop af
; Go to next slot.
gtslot1 push bc
ld b,0
add hl,bc
pop bc
inc a
jr gtslot2
; Find none. Exit with CY 1.
gtslot3 scf
ret
; Found. Exit with CY 0.
gtslot4 pop af
or a
ret
; --------------------------------
; 'exobs' Execute Object Behaviors
; --------------------------------
; Runs through the Object Table and executes the behavior for each if
; if any.
exobs
ld b,NOBJS
ld hl,objtab
exobs1 push bc
call exob
pop bc
djnz exobs1
ret
; ------------------------------
; 'exob' Execute Object Behavior
; ------------------------------
; Executes the behavior of an object, if any. Goes to the next object.
;
; In HL Object address.
; Out HL Adrress of next Object.
exob
; Set IX to Object pointer.
push hl
push hl
pop ix
; Get behavior function.
ld l,(ix+OB_FUL)
ld h,(ix+OB_FUH)
; If behavior function address is 0, go to next object.
; Else execute behavior.
ld a,h
or l
jr z,exob1
call jphl
; Point HL to next Object.
exob1 pop hl
ld bc,OBJSZ
add hl,bc
ret
; ---------
; 'kfeedbk'
; ---------
;
; Sound to make when keys pressed in menus etc.
kfeedbk
push bc
push de
push hl
ld hl,+BEEP_FREQX256(440*256)
ld de,+BEEP_MS(440*256, 25)
call beep
pop hl
pop de
pop bc
ret
; N rects filled and current rect pointer.
;nrects .db 0
;rectp .dw reclst
; Frame counter.
frames .db 0
; Cheats.
cheats_god .db CHEATS_GOD
cheats_rst .db CHEATS_RST
#include "lib.asm"
#ifdef ZX
#include "lib_zx.asm"
#include "altair_zx.asm"
#include "font_zx.asm"
#endif
#ifdef CPC
#include "lib_cpc.asm"
#include "altair_cpc.asm"
#endif
#include "states.asm"
#include "gameplay_st.asm"
#include "drmach.asm"
#include "menu_st.asm"
#include "attract_st.asm"
#include "options_st.asm"
#include "killed_st.asm"
#include "round_st.asm"
#include "name_st.asm"
#include "disclaimer_st.asm"
#include "dedicate_st.asm"
#include "gameover_st.asm"
#include "hud.asm"
#include "anim.asm"
#include "obfun.asm"
#include "timer.asm"
#include "interr.asm"
#include "sound.asm"
#include "altair_snd.asm"
#include "images.asm"
endp .equ $
#include "ram.asm"
.echo "Number of sprites "
.echo NSPRS
.echo "\nNumber of rects "
.echo MAXRECS
.echo "\nTotal program memory: "
.echo (eofram - start)
.echo " bytes.\n"
.echo "Cheats adresses:\nInvincible: "
.echo cheats_god
.echo "\nPass level: "
.echo cheats_rst
.echo "\n"
.end
|
solutions/28-three sort/clobber and pivot - bad.asm | Ernesto-Alvarez/HRM-Puzzles | 0 | 100365 | <reponame>Ernesto-Alvarez/HRM-Puzzles
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
b:
COMMENT 1
INBOX
COPYTO 0
COPYTO 1
COMMENT 2
INBOX
SUB 0
JUMPN c
ADD 0
COPYTO 1
JUMP d
c:
ADD 0
COPYTO 0
d:
COMMENT 0
INBOX
COPYTO 5
SUB 0
JUMPN f
COPYFROM 0
OUTBOX
COMMENT 3
COPYFROM 5
SUB 1
JUMPN e
COPYFROM 1
OUTBOX
COPYFROM 5
OUTBOX
JUMP a
e:
COPYFROM 5
OUTBOX
JUMP g
f:
COPYFROM 5
OUTBOX
COPYFROM 0
OUTBOX
g:
COPYFROM 1
OUTBOX
JUMP b
DEFINE COMMENT 0
eJyzZGBgiBJsldssyLq5ULhpd43IxD1MkhP3BCok7zygZLINKM3wWDcisctUK+6mjWV8iMP01MNOwnky
zpmtWU7LO2/asExgtSyc/su8cLqtmfOUx6bbu2zNeOoXmq+rMLJNLP5tn1gc4tBfBjInsqAvuDWnPmhj
xtrQS8kRiZXJ01OTEpelbUj4kl2ZPL+8Mpmn/ktaRZtY0bFuv3KWCYwVzlNOFMksFs3asXZjBghnrQCZ
IzUrXvfMrDMmN2Yr59+YvWGf+7yV57cv+H5lx4pJ9w+vbL5XuirkNkjdwZnCedsXCOcxjIJRMApwAgAD
lmC+;
DEFINE COMMENT 1
eJzTY2BgKJQuvishff8gk+T19UySv6O2SAp5S0hPc5os52HLr3Xb1F3/tilQGYOKTEPpQa3+Mn6tfZUg
/mL3oKmL3Z23h3pUnQHxkxJ<KEY>
DEFINE COMMENT 2
<KEY>9VW3rq+/fGvFmld3OlcxjIJR
QAcAAAEWt/4;
DEFINE COMMENT 3
eJyzY2Bg+C5fp79A30DL2NVAC8hlmGbmr7PQPMJuofm8EAGrxGIBK7M/IHGHsIV7RaIm7lFIrlz5IvXv
ghephdNnp4lM/J/+tLclpaM9L6mj/WL0017TUJnFTT7BO847v39q6fz/P0ivTdr//1yZL76B2AVV3R8K
qjbsu1L9bePcOu9lNc1J06xajSfP71PZyjxh4h7mCV1np0w12WY4x2TboYUH9k9bevARSN/Mo+w/7fe+
O3Rh14o1F3YZT965Iz8wYYe/zoVdSxQ+7l2ikHPwkcrRg4Iaz4/0Goic5LKsOHXEteKUkLfISSWfGXu3
pQvt/JIduv1L9p9tRzMYRsEoGAVgAAC3iHP0;
|
programs/oeis/109/A109168.asm | karttu/loda | 1 | 94858 | <gh_stars>1-10
; A109168: Continued fraction expansion of the constant x (A109169) such that the continued fraction of 2*x yields the continued fraction of x interleaved with the positive even numbers.
; 1,2,2,4,3,4,4,8,5,6,6,8,7,8,8,16,9,10,10,12,11,12,12,16,13,14,14,16,15,16,16,32,17,18,18,20,19,20,20,24,21,22,22,24,23,24,24,32,25,26,26,28,27,28,28,32,29,30,30,32,31,32,32,64,33,34,34,36,35,36,36,40,37,38,38
add $0,1
mov $1,256
gcd $1,$0
add $1,$0
div $1,2
|
1.1-Malloc/src/boot/log.asm | CedricFauth/VIteen-a-16-bit-OS | 13 | 27218 |
;-----------------------------------------------
; bootloader library by <NAME>
;-----------------------------------------------
; printing absolute addresses of all segments
see_segments: ; params: none
push ax
; info message
mov ax, seg_string
call printstr
; example for addr of cs (code segment)
mov ax, cs_string ; addr of 'cs at...' in ax
call printstr ; print message
; now printing the actual address
mov ax, cs ; addr of cs in ax
shl ax, 0x4 ; ax * 16 = absolute address
call printhex ; print number in ax
mov ax, ds_string
call printstr
mov ax, ds
shl ax, 0x4
call printhex
mov ax, ss_string
call printstr
mov ax, ss
shl ax, 0x4
call printhex
mov ax, es_string
call printstr
mov ax, es
shl ax, 0x4
call printhex
call println
; return
pop ax
ret
; message buffers
seg_string db '[+] Segments initialized',0x0
cs_string db 0xa,0xd,' CS at ',0x0
ds_string db 0xa,0xd,' DS at ',0x0
ss_string db 0xa,0xd,' SS at ',0x0
es_string db 0xa,0xd,' ES at ',0x0
|
oeis/344/A344461.asm | neoneye/loda-programs | 11 | 20699 | ; A344461: a(n) = Sum_{d|n} d^gcd(d,n/d).
; Submitted by <NAME>
; 1,3,4,9,6,12,8,29,37,18,12,60,14,24,24,341,18,273,20,134,32,36,24,236,3151,42,784,240,30,72,32,4645,48,54,48,48789,38,60,56,574,42,96,44,548,3462,72,48,21740,823593,103203,72,750,54,6888,72,1072,80,90,60,1160
add $0,1
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
mov $4,$3
cmp $3,$2
cmp $3,0
mul $3,$0
sub $0,1
gcd $4,$3
pow $3,$4
add $1,$3
lpe
add $1,1
mov $0,$1
|
src/Data/Vec/Extra.agda | metaborg/mj.agda | 10 | 651 | module Data.Vec.Extra where
open import Data.Product hiding (map; zip)
open import Data.Nat
open import Data.Fin
open import Data.Vec
open import Relation.Binary.PropositionalEquality
open import Function
map-with-∈ : ∀ {a}{A : Set a}{b n}{B : Set b}
(xs : Vec A n) → (∀ i {x} → lookup i xs ≡ x → B) → Vec B n
map-with-∈ [] f = []
map-with-∈ (x ∷ xs) f = f zero refl ∷ map-with-∈ xs (λ i x → f (suc i) refl)
|
linux64/lesson22.asm | mashingan/notes-asmtutor | 1 | 25407 | <reponame>mashingan/notes-asmtutor
format ELF64 executable 3
entry start
include 'procs.inc'
segment readable
filename db 'filecreate.txt', 0h
segment readable executable
start:
mov rsi, 0777 ; set all permission read, write execute
mov rdi, filename
mov rax, 85 ; SYS_CREAT kernel opcode 85
syscall
call quitProgram
|
Numeral/Natural/Oper/Proofs/Multiplication.agda | Lolirofle/stuff-in-agda | 6 | 12233 | module Numeral.Natural.Oper.Proofs.Multiplication where
open import Logic.Propositional
open import Numeral.Natural
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Proofs
open import Numeral.Natural.Oper.Proofs.Order
open import Numeral.Natural.Relation
open import Numeral.Natural.Relation.Order
open import Numeral.Natural.Relation.Order.Classical
open import Numeral.Natural.Relation.Order.Proofs
open import Relator.Equals
open import Relator.Equals.Proofs
open import Structure.Operator
import Structure.Operator.Names as Names
open import Structure.Operator.Properties
open import Structure.Relator.Properties
open import Syntax.Transitivity
instance
[⋅][−₀]-distributivityᵣ : Distributivityᵣ(_⋅_)(_−₀_)
Distributivityᵣ.proof([⋅][−₀]-distributivityᵣ) {x}{y}{z} = p{x}{y}{z} where
p : ∀{x y z : ℕ} → ((x −₀ y) ⋅ z) ≡ (x ⋅ z) −₀ (y ⋅ z)
p {x} {y} {𝟎} = [≡]-intro
p {x} {y} {𝐒 z} with [≥]-or-[<] {x}{y}
... | [∨]-introₗ gt =
(x −₀ y) ⋅ 𝐒(z) 🝖[ _≡_ ]-[]
(x −₀ y) + ((x −₀ y) ⋅ z) 🝖[ _≡_ ]-[ congruence₂ᵣ(_+_)(x −₀ y) (p {x}{y}{z}) ]
(x −₀ y) + ((x ⋅ z) −₀ (y ⋅ z)) 🝖[ _≡_ ]-[ [+][−₀]-almost-associativity {x −₀ y} ([≤]-with-[⋅]ᵣ {c = z} gt) ]-sym
((x −₀ y) + (x ⋅ z)) −₀ (y ⋅ z) 🝖[ _≡_ ]-[ congruence₂ₗ(_−₀_)(y ⋅ z) (commutativity(_+_) {x −₀ y}{x ⋅ z}) ]
((x ⋅ z) + (x −₀ y)) −₀ (y ⋅ z) 🝖[ _≡_ ]-[ congruence₂ₗ(_−₀_)(y ⋅ z) ([+][−₀]-almost-associativity {x ⋅ z} gt) ]-sym
(((x ⋅ z) + x) −₀ y) −₀ (y ⋅ z) 🝖[ _≡_ ]-[ congruence₂ₗ(_−₀_)(y ⋅ z) (congruence₂ₗ(_−₀_)(y) (commutativity(_+_) {x ⋅ z}{x})) ]
((x + (x ⋅ z)) −₀ y) −₀ (y ⋅ z) 🝖[ _≡_ ]-[ [−₀][−₀]-to-[−₀][+] {x + (x ⋅ z)}{y}{y ⋅ z} ]
(x + (x ⋅ z)) −₀ (y + (y ⋅ z)) 🝖[ _≡_ ]-[]
(x ⋅ 𝐒(z)) −₀ (y ⋅ 𝐒(z)) 🝖-end
... | [∨]-introᵣ lt =
(x −₀ y) ⋅ 𝐒(z) 🝖[ _≡_ ]-[ congruence₂ₗ(_⋅_)(𝐒(z)) ([↔]-to-[→] [−₀]-when-0 (sub₂(_<_)(_≤_) lt)) ]
𝟎 ⋅ 𝐒(z) 🝖[ _≡_ ]-[ absorberₗ(_⋅_)(𝟎) {𝐒(z)} ]
𝟎 🝖[ _≡_ ]-[ [↔]-to-[→] [−₀]-when-0 ([≤]-with-[+] ⦃ sub₂(_<_)(_≤_) lt ⦄ ⦃ [≤]-with-[⋅]ᵣ {c = z} (sub₂(_<_)(_≤_) lt) ⦄) ]-sym
(x + (x ⋅ z)) −₀ (y + (y ⋅ z)) 🝖-end
-- TODO: This is a specialized distributivity-equivalence-by-commutativity
instance
[⋅][−₀]-distributivityₗ : Distributivityₗ(_⋅_)(_−₀_)
Distributivityₗ.proof([⋅][−₀]-distributivityₗ) {x}{y}{z} = p{x}{y}{z} where
p : ∀{x y z : ℕ} → (x ⋅ (y −₀ z)) ≡ (x ⋅ y) −₀ (x ⋅ z)
p{x}{y}{z} =
x ⋅ (y −₀ z) 🝖[ _≡_ ]-[ commutativity(_⋅_) {x}{y −₀ z} ]
(y −₀ z) ⋅ x 🝖[ _≡_ ]-[ distributivityᵣ(_⋅_)(_−₀_) {y}{z}{x} ]
(y ⋅ x) −₀ (z ⋅ x) 🝖[ _≡_ ]-[ congruence₂(_−₀_) (commutativity(_⋅_) {y}{x}) (commutativity(_⋅_) {z}{x}) ]
(x ⋅ y) −₀ (x ⋅ z) 🝖-end
[⋅]-cancellationₗ : ∀{x} → ⦃ pos : Positive(x) ⦄ → (Names.CancellationOnₗ(_⋅_)(x))
[⋅]-cancellationₗ {𝐒 a}{b}{c} p with [<]-trichotomy {b}{c}
... | [∨]-introₗ ([∨]-introₗ lt) with () ← [<]-to-[≢] ([<]-with-[⋅]ₗ {a = a} lt) p
... | [∨]-introₗ ([∨]-introᵣ eq) = eq
... | [∨]-introᵣ gt with () ← [>]-to-[≢] ([<]-with-[⋅]ₗ {a = a} gt) p
[⋅]-cancellationᵣ : ∀{x} → ⦃ pos : Positive(x) ⦄ → (Names.CancellationOnᵣ(_⋅_)(x))
[⋅]-cancellationᵣ {𝐒 c}{a}{b} p with [<]-trichotomy {a}{b}
... | [∨]-introₗ ([∨]-introₗ lt) with () ← [<]-to-[≢] ([<]-with-[⋅]ᵣ {c = c} lt) p
... | [∨]-introₗ ([∨]-introᵣ eq) = eq
... | [∨]-introᵣ gt with () ← [>]-to-[≢] ([<]-with-[⋅]ᵣ {c = c} gt) p
|
programs/oeis/189/A189458.asm | karttu/loda | 1 | 90196 | ; A189458: a(n) = n+[nr/s]+[nt/s]; r=2, s=sqrt(2), t=1+sqrt(2).
; 3,7,12,15,20,24,27,32,36,41,44,48,53,56,61,65,70,73,77,82,85,90,94,97,102,106,111,114,119,123,126,131,135,140,143,147,152,155,160,164,167,172,176,181,184,189,193,196,201,205,210,213,217,222,225,230,234,239,242,246,251,254,259,263,266,271,275,280,283,287,292,295,300,304,309,312,316,321,324,329,333,336,341,345,350,353,358,362,365,370,374,379,382,386,391,394,399,403,408,411,415,420,423,428,432,435,440,444,449,452,456,461,464,469,473,478,481,485,490,493,498,502,505,510,514,519,522,527,531,534,539,543,548,551,555,560,563,568,572,575,580,584,589,592,597,601,604,609,613,618,621,625,630,633,638,642,647,650,654,659,662,667,671,674,679,683,688,691,696,700,703,708,712,717,720,724,729,732,737,741,744,749,753,758,761,766,770,773,778,782,787,790,794,799,802,807,811,816,819,823,828,831,836,840,843,848,852,857,860,864,869,872,877,881,886,889,893,898,901,906,910,913,918,922,927,930,935,939,942,947,951,956,959,963,968,971,976,980,983,988,992,997,1000,1005,1009,1012,1017,1021,1026,1029
cal $0,188302 ; Positions of 1 in A188300; complement of A188301.
sub $0,1
mov $1,$0
sub $1,6
div $1,2
mul $1,2
sub $1,2
div $1,2
add $1,3
|
examples/HelloWorld.g4 | fwcd/cfg-to-regex | 0 | 3903 | <gh_stars>0
grammar HelloWorld;
hello : 'Hello';
world : 'World';
hello_world : hello hello_world world | ', ';
|
tools/yasm/tests/nasm/dir.asm | fasttr-org/ftr | 0 | 87768 | [bits]
[bits 16]
[bits 32]
[bits 16:16]
[bits 16 16]
[section .data align=16]
[section .data blah=5]
[absolute 20]
[absolute 0x50 20:5]
[blah ask]
[section blah align=4]
[section blah align=16]
[common tst 4]
[common tre]
|
programs/oeis/212/A212765.asm | neoneye/loda | 22 | 29067 | <gh_stars>10-100
; A212765: Number of (w,x,y,z) with all terms in {0,...,n}, w even and x, y, and z odd.
; 0,1,2,16,24,81,108,256,320,625,750,1296,1512,2401,2744,4096,4608,6561,7290,10000,11000,14641,15972,20736,22464,28561,30758,38416,41160,50625,54000,65536,69632,83521,88434,104976,110808,130321,137180
mov $1,$0
add $0,1
pow $0,2
div $0,4
add $1,1
div $1,2
pow $1,2
mul $0,$1
|
oeis/028/A028076.asm | neoneye/loda-programs | 11 | 29778 | <gh_stars>10-100
; A028076: Expansion of 1/((1-3x)(1-6x)(1-7x)(1-10x)).
; Submitted by <NAME>
; 1,26,435,5980,73721,849966,9381535,100546160,1055929941,10932713506,112061907035,1140487891140,11548313690161,116513300146646,1172500867726935,11777524096712920,118148491080002381,1184131514779885386,11860044495183801235,118732769101850403500,1188261272381984114601,11889191667255022105726,118938232519972791249935,1189708115592037867874880,11899371165428942580074821,119009798581424585680823666,1190210935467645793259353035,11902902049230988017092359060,119034581636075996815253931041
mov $1,1
mov $2,$0
mov $3,$0
lpb $2
mov $0,$3
mul $1,10
sub $2,1
sub $0,$2
seq $0,17931 ; Expansion of 1/((1-3x)(1-6x)(1-7x)).
add $1,$0
lpe
mov $0,$1
|
src/fot/Agsy/GroupTheory.agda | asr/fotc | 11 | 2597 | <filename>src/fot/Agsy/GroupTheory.agda
------------------------------------------------------------------------------
-- Group theory properties using Agsy
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- Tested with the development version of the Agda standard library on
-- 02 February 2012.
module Agsy.GroupTheory where
open import Data.Product
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
infix 8 _⁻¹
infixl 7 _·_
------------------------------------------------------------------------------
-- Group theory axioms
postulate
G : Set -- The universe.
ε : G -- The identity element.
_·_ : G → G → G -- The binary operation.
_⁻¹ : G → G -- The inverse function.
assoc : ∀ x y z → x · y · z ≡ x · (y · z)
leftIdentity : ∀ x → ε · x ≡ x
rightIdentity : ∀ x → x · ε ≡ x
leftInverse : ∀ x → x ⁻¹ · x ≡ ε
rightInverse : ∀ x → x · x ⁻¹ ≡ ε
-- Properties
y≡x⁻¹[xy] : ∀ a b → b ≡ a ⁻¹ · (a · b)
y≡x⁻¹[xy] a b = {!-t 20 -m!} -- Agsy fails
x≡[xy]y⁻¹ : ∀ a b → a ≡ (a · b) · b ⁻¹
x≡[xy]y⁻¹ a b = {!-t 20 -m!} -- Agsy fails
rightIdentityUnique : Σ G λ u → (∀ x → x · u ≡ x) ×
(∀ u' → (∀ x → x · u' ≡ x) → u ≡ u')
rightIdentityUnique = {!-t 20 -m!} -- Agsy fails
-- ε
-- , rightIdentity
-- , λ x x' → begin
-- ε ≡⟨ sym (x' ε) ⟩
-- ε · x ≡⟨ leftIdentity x ⟩
-- x
-- ∎
rightIdentityUnique' : ∀ x u → x · u ≡ x → ε ≡ u
rightIdentityUnique' x u xu≡x = {!-t 20 -m!} -- Agsy fails
leftIdentityUnique : Σ G λ u → (∀ x → u · x ≡ x) ×
(∀ u' → (∀ x → u' · x ≡ x) → u ≡ u')
leftIdentityUnique = {!-t 20 -m!} -- Agsy fails
-- ε
-- , leftIdentity
-- , λ x x' → begin
-- ε ≡⟨ sym (x' ε) ⟩
-- x · ε ≡⟨ rightIdentity x ⟩
-- x
-- ∎
leftIdentityUnique' : ∀ x u → u · x ≡ x → ε ≡ u
leftIdentityUnique' x u ux≡x = {!-t 20 -m!}
rightCancellation : ∀ x y z → y · x ≡ z · x → y ≡ z
rightCancellation x y z = λ hyp → {!-t 20 -m!} -- Agsy fails
leftCancellation : ∀ x y z → x · y ≡ x · z → y ≡ z
leftCancellation x y z = λ hyp → {!-t 20 -m!} -- Agsy fails
leftCancellationER : (x y z : G) → x · y ≡ x · z → y ≡ z
leftCancellationER x y z x·y≡x·z =
begin
y ≡⟨ sym (leftIdentity y) ⟩
ε · y ≡⟨ subst (λ t → ε · y ≡ t · y) (sym (leftInverse x)) refl ⟩
x ⁻¹ · x · y ≡⟨ assoc (x ⁻¹) x y ⟩
x ⁻¹ · (x · y) ≡⟨ subst (λ t → x ⁻¹ · (x · y) ≡ x ⁻¹ · t) x·y≡x·z refl ⟩
x ⁻¹ · (x · z) ≡⟨ sym (assoc (x ⁻¹) x z) ⟩
x ⁻¹ · x · z ≡⟨ subst (λ t → x ⁻¹ · x · z ≡ t · z) (leftInverse x) refl ⟩
ε · z ≡⟨ leftIdentity z ⟩
z
∎
rightInverseUnique : ∀ x → Σ G λ r → (x · r ≡ ε) ×
(∀ r' → x · r' ≡ ε → r ≡ r')
rightInverseUnique x = {!-t 20 -m!} -- Agsy fails
rightInverseUnique' : ∀ x r → x · r ≡ ε → x ⁻¹ ≡ r
rightInverseUnique' x r = λ hyp → {!-t 20 -m!} -- Agsy fails
leftInverseUnique : ∀ x → Σ G λ l → (l · x ≡ ε) ×
(∀ l' → l' · x ≡ ε → l ≡ l')
leftInverseUnique x = {!-t 20 -m!} -- Agsy fails
⁻¹-involutive : ∀ x → x ⁻¹ ⁻¹ ≡ x
⁻¹-involutive x = {!-t 20 -m!} -- Agsy fails
inverseDistribution : ∀ x y → (x · y) ⁻¹ ≡ y ⁻¹ · x ⁻¹
inverseDistribution x y = {!-t 20 -m!} -- Agsy fails
-- If the square of every element is the identity, the system is
-- commutative. From: TPTP 6.4.0. File: Problems/GRP/GRP001-2.p
x²≡ε→comm : (∀ a → a · a ≡ ε) → ∀ {b c d} → b · c ≡ d → c · b ≡ d
x²≡ε→comm hyp {b} {c} {d} bc≡d = {!-t 20 -m!} -- Agsy fails
|
commands/shutdown.asm | alexbelm48/AtieDOS | 33 | 22107 | <filename>commands/shutdown.asm
; AtieDOS 2.10 Shutdown Command
; Copyright (c) 2020 AtieSoftware.
; See LICENSE in root folder
command_shutdown:
call os_command_init
mov bx, .ARE_YOU_SURE_SHUTDOWN_MSG
call os_print_string
call os_keystroke_echo
cmp ah, [KEY_Y]
je .shutdown
jmp .exit
.shutdown:
mov ax, 0x1000
mov ax, ss
mov sp, 0xf000
mov ax, 0x5307
mov bx, 0x0001
mov cx, 0x0003
int 0x15
call os_print_new_line
mov bx, .SHUTDOWN_ERROR
call os_print_string
.exit:
call os_command_finish
.ARE_YOU_SURE_SHUTDOWN_MSG: db "Are you sure that you want to shutdown the computer? [y/n] ", 0
.SHUTDOWN_ERROR: db "Could not shutdown the computer.", 0 |
test/Test/Compile/Golden/andGate/andGate-output.agda | vehicle-lang/vehicle | 9 | 11989 | -- WARNING: This file was generated automatically by Vehicle
-- and should not be modified manually!
-- Metadata
-- - Agda version: 2.6.2
-- - AISEC version: 0.1.0.1
-- - Time generated: ???
{-# OPTIONS --allow-exec #-}
open import Vehicle
open import Vehicle.Data.Tensor
open import Data.Product
open import Data.Integer as ℤ using (ℤ)
open import Data.Rational as ℚ using (ℚ)
open import Data.Fin as Fin using (Fin; #_)
open import Data.List
module andGate-temp-output where
postulate andGate : Tensor ℚ (2 ∷ []) → Tensor ℚ (1 ∷ [])
Truthy : ℚ → Set
Truthy x = x ℚ.≥ ℤ.+ 1 ℚ./ 2
Falsey : ℚ → Set
Falsey x = x ℚ.≤ ℤ.+ 1 ℚ./ 2
ValidInput : ℚ → Set
ValidInput x = ℤ.+ 0 ℚ./ 1 ℚ.≤ x × x ℚ.≤ ℤ.+ 1 ℚ./ 1
CorrectOutput : ℚ → (ℚ → Set)
CorrectOutput x1 x2 = let y = andGate (x1 ∷ (x2 ∷ [])) (# 0) in (Truthy x1 × Truthy x2 → Truthy y) × ((Truthy x1 × Falsey x2 → Falsey y) × ((Falsey x1 × Truthy x2 → Falsey y) × (Falsey x1 × Falsey x2 → Falsey y)))
abstract
andGateCorrect : ∀ (x1 : ℚ) → ∀ (x2 : ℚ) → ValidInput x1 × ValidInput x2 → CorrectOutput x1 x2
andGateCorrect = checkSpecification record
{ proofCache = "/home/matthew/Code/AISEC/vehicle/proofcache.vclp"
} |
supers-ineffective.xkas-06.asm | n00btube/sm-missile-doors | 0 | 1219 | ; Copyright 2015 Adam <https://github.com/n00btube>
; MIT license.
; There _could_ be newer versions available on GitHub.
; Derp. JAM found a hex tweak for this very thing. It just NOPs out the
; super missile CMP/BEQ right there at $84:BD58.
;
; The only reasons to use THIS are:
; 1. if you like ASM as much as I do
; 2. if wasting cycles on five NOPs per projectile hit bugs you
lorom
; red door hit detection: rewrite in place, no free space used
org $84BD58
CMP #$0100 ; check regular missile instead of super
BEQ $05 ; $BD62, regular missile code
JMP $BD74 ; non-reaction code
|
Sept10/1.asm | s10singh97/Microprocessor_Lab | 0 | 166064 |
;Hex to ASCII
MVI a,54h
ani 0Fh
mvi d,30H
mvi e,37H
cpi 0aH
jc less
add e
sta 4000H
hlt
less: add d
sta 4000H
hlt |
alloy4fun_models/trashltl/models/11/DPn5QZKWH9RWtZPpj.als | Kaixi26/org.alloytools.alloy | 0 | 66 | <reponame>Kaixi26/org.alloytools.alloy<gh_stars>0
open main
pred idDPn5QZKWH9RWtZPpj_prop12 {
always eventually all f:File | f in Trash
}
pred __repair { idDPn5QZKWH9RWtZPpj_prop12 }
check __repair { idDPn5QZKWH9RWtZPpj_prop12 <=> prop12o } |
oeis/274/A274324.asm | neoneye/loda-programs | 11 | 26862 | ; A274324: Number of partitions of n^3 into at most two parts.
; 1,1,5,14,33,63,109,172,257,365,501,666,865,1099,1373,1688,2049,2457,2917,3430,4001,4631,5325,6084,6913,7813,8789,9842,10977,12195,13501,14896,16385,17969,19653,21438,23329,25327,27437,29660,32001,34461,37045,39754,42593,45563,48669,51912,55297,58825,62501,66326,70305,74439,78733,83188,87809,92597,97557,102690,108001,113491,119165,125024,131073,137313,143749,150382,157217,164255,171501,178956,186625,194509,202613,210938,219489,228267,237277,246520,256001,265721,275685,285894,296353,307063,318029
pow $0,3
add $0,2
div $0,2
|
oeis/139/A139600.asm | neoneye/loda-programs | 11 | 26440 | <gh_stars>10-100
; A139600: Square array T(n,k) = n*(k-1)*k/2+k, of nonnegative numbers together with polygonal numbers, read by antidiagonals upwards.
; Submitted by Jon Maiga
; 0,0,1,0,1,2,0,1,3,3,0,1,4,6,4,0,1,5,9,10,5,0,1,6,12,16,15,6,0,1,7,15,22,25,21,7,0,1,8,18,28,35,36,28,8,0,1,9,21,34,45,51,49,36,9,0,1,10,24,40,55,66,70,64,45,10,0,1,11,27,46,65,81,91,92,81,55,11,0,1,12,30,52,75,96,112,120,117,100,66,12,0,1,13,33,58,85,111,133,148
lpb $0
add $1,1
sub $0,$1
lpe
sub $1,$0
sub $0,1
sub $1,1
mul $1,$0
add $0,1
add $1,$0
mul $1,$0
add $0,$1
div $0,2
|
src/asf-components-utils-factory.adb | jquorning/ada-asf | 12 | 8837 | -----------------------------------------------------------------------
-- core-factory -- Factory for Core UI Components
-- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Calendar;
with Ada.Exceptions;
with Ada.Strings.Maps;
with ASF.Views.Nodes;
with ASF.Locales;
with ASF.Components.Utils.Files;
with ASF.Components.Utils.Flush;
with ASF.Components.Utils.Scripts;
with ASF.Components.Utils.Escapes;
with ASF.Components.Utils.Beans;
with ASF.Components.Html.Messages;
with ASF.Applications.Main;
with Util.Log.Loggers;
with Util.Properties.Bundles;
with Util.Dates.Formats;
with Util.Dates.ISO8601;
with Util.Beans.Objects.Time;
with Util.Locales;
with Util.Encoders.SHA256;
with Util.Strings.Transforms; use Util.Strings;
package body ASF.Components.Utils.Factory is
use ASF.Components.Base;
-- The logger
Log : constant Util.Log.Loggers.Logger
:= Util.Log.Loggers.Create ("ASF.Components.Utils.Factory");
function Create_File return UIComponent_Access;
function Create_Flush return UIComponent_Access;
function Create_Script return UIComponent_Access;
function Create_Escape return UIComponent_Access;
function Create_Set return UIComponent_Access;
-- -------------------------
-- ------------------------------
-- Create a UIFile component
-- ------------------------------
function Create_File return UIComponent_Access is
begin
return new ASF.Components.Utils.Files.UIFile;
end Create_File;
-- ------------------------------
-- Create a UIFlush component
-- ------------------------------
function Create_Flush return UIComponent_Access is
begin
return new ASF.Components.Utils.Flush.UIFlush;
end Create_Flush;
-- ------------------------------
-- Create a UIScript component
-- ------------------------------
function Create_Script return UIComponent_Access is
begin
return new ASF.Components.Utils.Scripts.UIScript;
end Create_Script;
-- ------------------------------
-- Create a UIEscape component
-- ------------------------------
function Create_Escape return UIComponent_Access is
begin
return new ASF.Components.Utils.Escapes.UIEscape;
end Create_Escape;
-- ------------------------------
-- Create a UISetBean component
-- ------------------------------
function Create_Set return UIComponent_Access is
begin
return new ASF.Components.Utils.Beans.UISetBean;
end Create_Set;
use ASF.Views.Nodes;
URI : aliased constant String := "http://code.google.com/p/ada-asf/util";
ESCAPE_TAG : aliased constant String := "escape";
FILE_TAG : aliased constant String := "file";
FLUSH_TAG : aliased constant String := "flush";
SCRIPT_TAG : aliased constant String := "script";
SET_TAG : aliased constant String := "set";
-- ------------------------------
-- Register the HTML component factory.
-- ------------------------------
procedure Register (Factory : in out ASF.Factory.Component_Factory) is
begin
ASF.Factory.Register (Factory,
URI => URI'Access,
Name => ESCAPE_TAG'Access,
Tag => Create_Component_Node'Access,
Create => Create_Escape'Access);
ASF.Factory.Register (Factory,
URI => URI'Access,
Name => FILE_TAG'Access,
Tag => Create_Component_Node'Access,
Create => Create_File'Access);
ASF.Factory.Register (Factory,
URI => URI'Access,
Name => FLUSH_TAG'Access,
Tag => Create_Component_Node'Access,
Create => Create_Flush'Access);
ASF.Factory.Register (Factory,
URI => URI'Access,
Name => SCRIPT_TAG'Access,
Tag => Create_Component_Node'Access,
Create => Create_Script'Access);
ASF.Factory.Register (Factory,
URI => URI'Access,
Name => SET_TAG'Access,
Tag => Create_Component_Node'Access,
Create => Create_Set'Access);
end Register;
-- Truncate the string representation represented by <b>Value</b> to
-- the length specified by <b>Size</b>.
function Escape_Javascript (Value : EL.Objects.Object) return EL.Objects.Object;
-- Escape the string using XML escape rules.
function Escape_Xml (Value : EL.Objects.Object) return EL.Objects.Object;
-- Translate the value into an ISO8606 date.
function To_ISO8601 (Value : in EL.Objects.Object) return EL.Objects.Object;
-- Encode the string for URL.
function Url_Encode (Value : in EL.Objects.Object) return EL.Objects.Object;
-- Encode the object into a SHA256.
function SHA256 (Value : in EL.Objects.Object) return EL.Objects.Object;
function SHA256_Base64 (Value : in EL.Objects.Object) return EL.Objects.Object;
-- Format a date using the given date pattern.
function Format_Date (Date : in EL.Objects.Object;
Format : in EL.Objects.Object) return EL.Objects.Object;
-- Translate a value using a resource bundle and applying a prefix for the translation.
function Translate (Bundle : in EL.Objects.Object;
Prefix : in EL.Objects.Object;
Value : in EL.Objects.Object) return EL.Objects.Object;
procedure Set_Functions (Mapper : in out EL.Functions.Function_Mapper'Class) is
begin
Mapper.Set_Function (Name => "escapeJavaScript",
Namespace => URI,
Func => Escape_Javascript'Access);
Mapper.Set_Function (Name => "escapeXml",
Namespace => URI,
Func => Escape_Xml'Access);
Mapper.Set_Function (Name => "formatDate",
Namespace => URI,
Func => Format_Date'Access);
Mapper.Set_Function (Name => "iso8601",
Namespace => URI,
Func => To_ISO8601'Access);
Mapper.Set_Function (Name => "hasMessage",
Namespace => URI,
Func => ASF.Components.Html.Messages.Has_Message'Access,
Optimize => False);
Mapper.Set_Function (Name => "urlEncode",
Namespace => URI,
Func => Url_Encode'Access,
Optimize => False);
Mapper.Set_Function (Name => "translate",
Namespace => URI,
Func => Translate'Access);
Mapper.Set_Function (Name => "sha256base64",
Namespace => URI,
Func => SHA256_Base64'Access);
Mapper.Set_Function (Name => "sha256",
Namespace => URI,
Func => SHA256'Access);
end Set_Functions;
function Escape_Javascript (Value : EL.Objects.Object) return EL.Objects.Object is
Result : Ada.Strings.Unbounded.Unbounded_String;
Content : constant String := EL.Objects.To_String (Value);
begin
Transforms.Escape_Javascript (Content => Content,
Into => Result);
return EL.Objects.To_Object (Result);
end Escape_Javascript;
function Escape_Xml (Value : EL.Objects.Object) return EL.Objects.Object is
Result : Ada.Strings.Unbounded.Unbounded_String;
Content : constant String := EL.Objects.To_String (Value);
begin
Transforms.Escape_Xml (Content => Content,
Into => Result);
return EL.Objects.To_Object (Result);
end Escape_Xml;
-- ------------------------------
-- Translate the value into an ISO8606 date.
-- ------------------------------
function To_ISO8601 (Value : in EL.Objects.Object) return EL.Objects.Object is
D : constant Ada.Calendar.Time := Util.Beans.Objects.Time.To_Time (Value);
S : constant String := Util.Dates.ISO8601.Image (D);
begin
return Util.Beans.Objects.To_Object (S);
end To_ISO8601;
-- ------------------------------
-- Format a date using the given date pattern.
-- ------------------------------
function Format_Date (Date : in EL.Objects.Object;
Format : in EL.Objects.Object) return EL.Objects.Object is
Context : constant ASF.Contexts.Faces.Faces_Context_Access := ASF.Contexts.Faces.Current;
Locale : constant Util.Locales.Locale := Context.Get_Locale;
Bundle : ASF.Locales.Bundle;
begin
begin
ASF.Applications.Main.Load_Bundle (Context.Get_Application.all,
Name => "asf",
Locale => Util.Locales.To_String (Locale),
Bundle => Bundle);
exception
when E : Util.Properties.Bundles.NO_BUNDLE =>
Log.Error ("Cannot localize dates: {0}", Ada.Exceptions.Exception_Message (E));
end;
declare
Time : constant Ada.Calendar.Time := Util.Beans.Objects.Time.To_Time (Date);
Pattern : constant String := Util.Beans.Objects.To_String (Format);
Result : constant String := Util.Dates.Formats.Format (Pattern, Time, Bundle);
begin
return EL.Objects.To_Object (Result);
end;
end Format_Date;
-- ------------------------------
-- Translate a value using a resource bundle and applying a prefix for the translation.
-- ------------------------------
function Translate (Bundle : in EL.Objects.Object;
Prefix : in EL.Objects.Object;
Value : in EL.Objects.Object) return EL.Objects.Object is
Bean : access Util.Beans.Basic.Readonly_Bean'Class;
begin
Bean := Util.Beans.Objects.To_Bean (Bundle);
if Bean = null then
return Value;
else
return Bean.Get_Value (EL.Objects.To_String (Prefix) & EL.Objects.To_String (Value));
end if;
end Translate;
use Ada.Strings.Maps;
Conversion : constant String (1 .. 16) := "0123456789ABCDEF";
Url_Encode_Set : constant Ada.Strings.Maps.Character_Set
:= Ada.Strings.Maps.To_Set (Span => (Low => Character'Val (0),
High => ' '))
or
Ada.Strings.Maps.To_Set (Span => (Low => Character'Val (128),
High => Character'Val (255)))
or
Ada.Strings.Maps.To_Set (":/?#[]@!$&'""()*+,;=");
-- ------------------------------
-- Encode the string for URL.
-- ------------------------------
function Url_Encode (Value : in EL.Objects.Object) return EL.Objects.Object is
S : constant String := Util.Beans.Objects.To_String (Value);
T : String (1 .. S'Length * 3);
Pos : Positive := 1;
C : Character;
begin
for I in S'Range loop
C := S (I);
if Ada.Strings.Maps.Is_In (C, Url_Encode_Set) then
T (Pos) := '%';
T (Pos + 1) := Conversion (1 + Character'Pos (C) / 16);
T (Pos + 2) := Conversion (1 + Character'Pos (C) mod 16);
Pos := Pos + 3;
else
T (Pos) := C;
Pos := Pos + 1;
end if;
end loop;
return Util.Beans.Objects.To_Object (T (1 .. Pos - 1));
end Url_Encode;
-- ------------------------------
-- Encode the object into a SHA256.
-- ------------------------------
function SHA256_Base64 (Value : in EL.Objects.Object) return EL.Objects.Object is
Content : constant String := Util.Beans.Objects.To_String (Value);
Context : Util.Encoders.SHA256.Context;
Result : Util.Encoders.SHA256.Base64_Digest;
begin
Util.Encoders.SHA256.Update (Context, Content);
Util.Encoders.SHA256.Finish_Base64 (Context, Result);
return Util.Beans.Objects.To_Object (Result);
end SHA256_Base64;
-- ------------------------------
-- Encode the object into a SHA256.
-- ------------------------------
function SHA256 (Value : in EL.Objects.Object) return EL.Objects.Object is
Content : constant String := Util.Beans.Objects.To_String (Value);
Context : Util.Encoders.SHA256.Context;
Result : Util.Encoders.SHA256.Digest;
begin
Util.Encoders.SHA256.Update (Context, Content);
Util.Encoders.SHA256.Finish (Context, Result);
return Util.Beans.Objects.To_Object (Result);
end SHA256;
end ASF.Components.Utils.Factory;
|
1-source-files/original-sources/converted_source_files/a.qcode_6.asm | markmoxon/elite-a-beebasm | 16 | 2285 | <reponame>markmoxon/elite-a-beebasm<gh_stars>10-100
.d_3469
LDA &65
ORA #&A0
STA &65
.d_3468
RTS
.d_3470
LDA &65
AND #&40
BEQ d_3479
JSR d_34d3
.d_3479
LDA &4C
STA &D1
LDA &4D
CMP #&20
BCC d_3487
LDA #&FE
BNE d_348f
.d_3487
ASL &D1
ROL A
ASL &D1
ROL A
SEC
ROL A
.d_348f
STA &81
LDY #&01
LDA (&67),Y
ADC #&04
BCS d_3469
STA (&67),Y
JSR l_2316
LDA &1B
CMP #&1C
BCC d_34a8
LDA #&FE
BNE d_34b1
.d_34a8
ASL &82
ROL A
ASL &82
ROL A
ASL &82
ROL A
.d_34b1
DEY
STA (&67),Y
LDA &65
AND #&BF
STA &65
AND #&08
BEQ d_3468
LDY #&02
LDA (&67),Y
TAY
.d_34c3
LDA &F9,Y
STA (&67),Y
DEY
CPY #&06
BNE d_34c3
LDA &65
ORA #&40
STA &65
.d_34d3
LDY #&00
LDA (&67),Y
STA &81
INY
LDA (&67),Y
BPL d_34e0
EOR #&FF
.d_34e0
LSR A
LSR A
LSR A
ORA #&01
STA &80
INY
LDA (&67),Y
STA &8F
LDA &01
PHA
LDY #&06
.d_34f1
LDX #&03
.d_34f3
INY
LDA (&67),Y
STA &D2,X
DEX
BPL d_34f3
STY &93
LDY #&02
.d_34ff
INY
LDA (&67),Y
EOR &93
STA &FFFD,Y
CPY #&06
BNE d_34ff
LDY &80
.d_350d
JSR d_3f85
STA &88
LDA &D3
STA &82
LDA &D2
JSR d_354b
BNE d_3545
CPX #&BF
BCS d_3545
STX &35
LDA &D5
STA &82
LDA &D4
JSR d_354b
BNE d_3533
LDA &35
JSR draw_pixel
.d_3533
DEY
BPL d_350d
LDY &93
CPY &8F
BCC d_34f1
PLA
STA &01
LDA &0906
STA &03
RTS
.d_3545
JSR d_3f85
JMP d_3533
.d_354b
STA &83
JSR d_3f85
ROL A
BCS d_355e
JSR l_21fa
ADC &82
TAX
LDA &83
ADC #&00
RTS
.d_355e
JSR l_21fa
STA &D1
LDA &82
SBC &D1
TAX
LDA &83
SBC #&00
RTS
.d_356d
JSR show_missle
LDA #&7F
STA &63
STA &64
LDA home_tech
AND #&02
ORA #&80
JMP ins_ship
.d_3580
\ LDA cmdr_legal
\ BEQ legal_over
\legal_next
\ DEC cmdr_legal
\ LSR a
\ BNE legal_next
\legal_over
\\ LSR cmdr_legal
LDA hype_dist
LDY #3
.legal_div
LSR hype_dist+1
ROR A
DEY
BNE legal_div
SEC
SBC cmdr_legal
BCC legal_over
LDA #&FF
.legal_over
EOR #&FF
STA cmdr_legal
JSR init_ship
LDA &6D
AND #&03
ADC #&03
STA &4E
ROR A
STA &48
STA &4B
JSR d_356d
LDA &6F
AND #&07
ORA #&81
STA &4E
LDA &71
AND #&03
STA &48
STA &47
LDA #&00
STA &63
STA &64
LDA #&81
JSR ins_ship
.d_35b1
LDA &87
BNE d_35d8
.d_35b5
LDY &03C3
.d_35b8
JSR rnd_seq
ORA #&08
STA &0FA8,Y
STA &88
JSR rnd_seq
STA &0F5C,Y
STA &34
JSR rnd_seq
STA &0F82,Y
STA &35
JSR d_1910
DEY
BNE d_35b8
.d_35d8
JMP l_3283
.d_3619
LDA #&95
JSR tube_write
TXA
JMP tube_write
.d_3624
DEX
RTS
.d_3626
INX
BEQ d_3624
.d_3629
DEC energy
PHP
BNE d_3632
INC energy
.d_3632
PLP
RTS
.d_3642
ASL A
TAX
LDA #&00
ROR A
TAY
LDA #&14
STA &81
TXA
JSR l_2316
LDX &1B
TYA
BMI d_3658
LDY #&00
RTS
.d_3658
LDY #&FF
TXA
EOR #&FF
TAX
INX
RTS
.d_3634
JSR d_3694
LDY #&25
LDA &0320
BNE d_station
LDY &9F \ finder
.d_station
JSR d_42ae
LDA &34
JSR d_3642
TXA
ADC #&C3
STA &03A8
LDA &35
JSR d_3642
STX &D1
LDA #&CC
SBC &D1
STA &03A9
LDA #&F0
LDX &36
BPL d_3691
LDA #&FF
.d_3691
STA &03C5
.d_3694
LDA &03A9
STA &35
LDA &03A8
STA &34
LDA &03C5
STA &91
CMP #&F0
BNE d_36ac
\d_36a7:
JSR d_36ac
DEC &35
.d_36ac
LDA #&90
JSR tube_write
LDA &34
JSR tube_write
LDA &35
JSR tube_write
LDA &91
JMP tube_write
.d_36e4
SEC \ reduce damage
SBC new_shields
BCC n_shok
.n_through
STA &D1
LDX #&00
LDY #&08
LDA (&20),Y
BMI d_36fe
LDA f_shield
SBC &D1
BCC d_36f9
STA f_shield
.n_shok
RTS
.d_36f9
STX f_shield
BCC d_370c
.d_36fe
LDA r_shield
SBC &D1
BCC d_3709
STA r_shield
RTS
.d_3709
STX r_shield
.d_370c
ADC energy
STA energy
BEQ d_3716
BCS d_3719
.d_3716
JMP d_41c6
.d_3719
JSR d_43b1
JMP d_45ea
.d_371f
LDA &0901,Y
STA &D2,X
LDA &0902,Y
PHA
AND #&7F
STA &D3,X
PLA
AND #&80
STA &D4,X
INY
INY
INY
INX
INX
INX
RTS
.ship_addr
EQUW &0900, &0925, &094A, &096F, &0994, &09B9, &09DE, &0A03
EQUW &0A28, &0A4D, &0A72, &0A97, &0ABC
.ship_ptr
TXA
ASL A
TAY
LDA ship_addr,Y
STA &20
LDA ship_addr+&01,Y
STA &21
RTS
.d_3740
JSR draw_stn
LDX #&81
STX &66
LDX #&FF
STX &63
INX
STX &64
STX ship_type+&01
STX &67
LDA cmdr_legal
BPL n_enemy
LDX #&04
.n_enemy
STX &6A
LDX #&0A
JSR d_37fc
JSR d_37fc
STX &68
JSR d_37fc
LDA #&02
.ins_ship
STA &D1
LDX #&00
.d_376c
LDA ship_type,X
BEQ d_3778
INX
CPX #&0C
BCC d_376c
.d_3776
CLC
.d_3777
RTS
.d_3778
JSR ship_ptr
LDA &D1
BMI d_37d1
ASL A
TAY
LDA ship_data+1,Y
BEQ d_3776
STA &1F
LDA ship_data,Y
STA &1E
CPY #&04
BEQ d_37c1
LDY #&05
LDA (&1E),Y
STA &06
LDA &03B0
SEC
SBC &06
STA &67
LDA &03B1
SBC #&00
STA &68
LDA &67
SBC &20
TAY
LDA &68
SBC &21
BCC d_3777
BNE d_37b7
CPY #&25
BCC d_3777
.d_37b7
LDA &67
STA &03B0
LDA &68
STA &03B1
.d_37c1
LDY #&0E
LDA (&1E),Y
STA &69
LDY #&13
LDA (&1E),Y
AND #&07
STA &65
LDA &D1
.d_37d1
STA ship_type,X
TAX
BMI d_37e5
CPX #&03
BCC d_37e2
CPX #&0B
BCS d_37e2
INC &033E
.d_37e2
INC &031E,X
.d_37e5
LDY &D1
LDA ship_flags,Y
AND #&6F
ORA &6A
STA &6A
LDY #&24
.d_37f2
LDA &46,Y
STA (&20),Y
DEY
BPL d_37f2
SEC
RTS
.d_37fc
LDA &46,X
EOR #&80
STA &46,X
INX
INX
RTS
.d_3805
LDX #&FF
.d_3807
STX &45
LDX cmdr_misl
DEX
JSR d_383d
STY target
RTS
.d_3813
LDA #&20
STA &30
ASL A
JSR sound
.draw_ecm
LDA #&93
JMP tube_write
.draw_stn
LDA #&92
JMP tube_write
.d_383d
CPX #4
BCC n_mok
LDX #3
.n_mok
JMP put_missle
.d_3856
LDA &46
STA &1B
LDA &47
STA &1C
LDA &48
JSR d_3cfa
BCS d_388d
LDA &40
ADC #&80
STA &D2
TXA
ADC #&00
STA &D3
LDA &49
STA &1B
LDA &4A
STA &1C
LDA &4B
EOR #&80
JSR d_3cfa
BCS d_388d
LDA &40
ADC #&60
STA &E0
TXA
ADC #&00
STA &E1
CLC
.d_388d
RTS
.d_388e
LDA &8C
LSR A
BCS d_3896
JMP d_3bed
.d_3896
JMP d_3c30
.d_3899
LDA &4E
BMI d_388e
CMP #&30
BCS d_388e
ORA &4D
BEQ d_388e
JSR d_3856
BCS d_388e
LDA #&60
STA &1C
LDA #&00
STA &1B
JSR d_297e
LDA &41
BEQ d_38bd
LDA #&F8
STA &40
.d_38bd
LDA &8C
LSR A
BCC d_38c5
JMP l_33cb
.d_38c5
JSR d_3bed
JSR d_3b76
BCS d_38d1
LDA &41
BEQ d_38d2
.d_38d1
RTS
.d_38d2
LDA &8C
CMP #&80
BNE d_3914
LDA &40
CMP #&06
BCC d_38d1
LDA &54
EOR #&80
STA &1B
LDA &5A
JSR d_3cdb
LDX #&09
JSR d_3969
STA &9B
STY &09
JSR d_3969
STA &9C
STY &0A
LDX #&0F
JSR d_3ceb
JSR d_3987
LDA &54
EOR #&80
STA &1B
LDA &60
JSR d_3cdb
LDX #&15
JSR d_3ceb
JMP d_3987
.d_3914
LDA &5A
BMI d_38d1
LDX #&0F
JSR d_3cba
CLC
ADC &D2
STA &D2
TYA
ADC &D3
STA &D3
JSR d_3cba
STA &1B
LDA &E0
SEC
SBC &1B
STA &E0
STY &1B
LDA &E1
SBC &1B
STA &E1
LDX #&09
JSR d_3969
LSR A
STA &9B
STY &09
JSR d_3969
LSR A
STA &9C
STY &0A
LDX #&15
JSR d_3969
LSR A
STA &9D
STY &0B
JSR d_3969
LSR A
STA &9E
STY &0C
LDA #&40
STA &8F
LDA #&00
STA &94
BEQ d_398b
.d_3969
LDA &46,X
STA &1B
LDA &47,X
AND #&7F
STA &1C
LDA &47,X
AND #&80
JSR d_297e
LDA &40
LDY &41
BEQ d_3982
LDA #&FE
.d_3982
LDY &43
INX
INX
RTS
.d_3987
LDA #&1F
STA &8F
.d_398b
LDX #&00
STX &93
DEX
STX &92
.d_3992
LDA &94
AND #&1F
TAX
LDA _07C0,X
STA &81
LDA &9D
JSR l_21fa
STA &82
LDA &9E
JSR l_21fa
STA &40
LDX &94
CPX #&21
LDA #&00
ROR A
STA &0E
LDA &94
CLC
ADC #&10
AND #&1F
TAX
LDA _07C0,X
STA &81
LDA &9C
JSR l_21fa
STA &42
LDA &9B
JSR l_21fa
STA &1B
LDA &94
ADC #&0F
AND #&3F
CMP #&21
LDA #&00
ROR A
STA &0D
LDA &0E
EOR &0B
STA &83
LDA &0D
EOR &09
JSR scale_angle
STA &D1
BPL d_39fb
TXA
EOR #&FF
CLC
ADC #&01
TAX
LDA &D1
EOR #&7F
ADC #&00
STA &D1
.d_39fb
TXA
ADC &D2
STA &76
LDA &D1
ADC &D3
STA &77
LDA &40
STA &82
LDA &0E
EOR &0C
STA &83
LDA &42
STA &1B
LDA &0D
EOR &0A
JSR scale_angle
EOR #&80
STA &D1
BPL d_3a30
TXA
EOR #&FF
CLC
ADC #&01
TAX
LDA &D1
EOR #&7F
ADC #&00
STA &D1
.d_3a30
JSR l_1a16
CMP &8F
BEQ d_3a39
BCS d_3a45
.d_3a39
LDA &94
CLC
ADC &95
AND #&3F
STA &94
JMP d_3992
.d_3a45
RTS
.d_3b76
JSR l_35b7
BCS d_3a45
LDA #&00
STA &0EC0
LDX &40
LDA #&08
CPX #&08
BCC d_3b8e
LSR A
CPX #&3C
BCC d_3b8e
LSR A
.d_3b8e
STA &95
JMP circle
.d_3bed
LDY &0EC0
BNE d_3c26
.d_3bf2
CPY &6B
BCS d_3c26
LDA &0F0E,Y
CMP #&FF
BEQ d_3c17
STA &37
LDA &0EC0,Y
STA &36
JSR draw_line
INY
\ LDA &90
\ BNE d_3bf2
LDA &36
STA &34
LDA &37
STA &35
JMP d_3bf2
.d_3c17
INY
LDA &0EC0,Y
STA &34
LDA &0F0E,Y
STA &35
INY
JMP d_3bf2
.d_3c26
LDA #&01
STA &6B
LDA #&FF
STA &0EC0
.d_3c2f
RTS
.d_3c30
LDA &0E00
BMI d_3c2f
LDA &28
STA &26
LDA &29
STA &27
LDY #&BF
.d_3c3f
LDA &0E00,Y
BEQ d_3c47
JSR l_1909
.d_3c47
DEY
BNE d_3c3f
DEY
STY &0E00
RTS
.d_3cba
JSR d_3969
STA &1B
LDA #&DE
STA &81
STX &80
JSR price_mult
LDX &80
LDY &43
BPL d_3cd8
EOR #&FF
CLC
ADC #&01
BEQ d_3cd8
LDY #&FF
RTS
.d_3cd8
LDY #&00
RTS
.d_3cdb
STA &81
JSR d_2a3c
LDX &54
BMI d_3ce6
EOR #&80
.d_3ce6
LSR A
LSR A
STA &94
RTS
.d_3ceb
JSR d_3969
STA &9D
STY &0B
JSR d_3969
STA &9E
STY &0C
RTS
.d_3cfa
JSR d_297e
LDA &43
AND #&7F
ORA &42
BNE d_3cb8
LDX &41
CPX #&04
BCS d_3d1e
LDA &43
BPL d_3d1e
LDA &40
EOR #&FF
ADC #&01
STA &40
TXA
EOR #&FF
ADC #&00
TAX
CLC
.d_3d1e
RTS
.d_3cb8
SEC
RTS
.d_3d74
LDA &1B
STA &03B0
LDA &1C
STA &03B1
RTS
.d_3d7f
LDX &84
JSR d_3dd8
LDX &84
JMP d_1376
.d_3d89
JSR init_ship
JSR l_32b0
STA ship_type+&01
STA &0320
JSR draw_stn
LDA #&06
STA &4B
LDA #&81
JMP ins_ship
.d_3da1
LDX #&FF
.d_3da3
INX
LDA ship_type,X
BEQ d_3d74
CMP #&01
BNE d_3da3
TXA
ASL A
TAY
LDA ship_addr,Y
STA ptr
LDA ship_addr+&01,Y
STA ptr+&01
LDY #&20
LDA (ptr),Y
BPL d_3da3
AND #&7F
LSR A
CMP &96
BCC d_3da3
BEQ d_3dd2
SBC #&01
ASL A
ORA #&80
STA (ptr),Y
BNE d_3da3
.d_3dd2
LDA #&00
STA (ptr),Y
BEQ d_3da3
.d_3dd8
STX &96
CPX &45
BNE d_3de8
LDY #&EE
JSR d_3805
LDA #&C8
JSR d_45c6
.d_3de8
LDY &96
LDX ship_type,Y
CPX #&02
BEQ d_3d89
CPX #&1F
BNE d_3dfd
LDA cmdr_mission
ORA #&02
STA cmdr_mission
.d_3dfd
CPX #&03
BCC d_3e08
CPX #&0B
BCS d_3e08
DEC &033E
.d_3e08
DEC &031E,X
LDX &96
LDY #&05
LDA (&1E),Y
LDY #&21
CLC
ADC (&20),Y
STA &1B
INY
LDA (&20),Y
ADC #&00
STA &1C
.d_3e1f
INX
LDA ship_type,X
STA &0310,X
BNE d_3e2b
JMP d_3da1
.d_3e2b
ASL A
TAY
LDA ship_data,Y
STA ptr
LDA ship_data+1,Y
STA ptr+&01
LDY #&05
LDA (ptr),Y
STA &D1
LDA &1B
SEC
SBC &D1
STA &1B
LDA &1C
SBC #&00
STA &1C
TXA
ASL A
TAY
LDA ship_addr,Y
STA ptr
LDA ship_addr+&01,Y
STA ptr+&01
LDY #&24
LDA (ptr),Y
STA (&20),Y
DEY
LDA (ptr),Y
STA (&20),Y
DEY
LDA (ptr),Y
STA &41
LDA &1C
STA (&20),Y
DEY
LDA (ptr),Y
STA &40
LDA &1B
STA (&20),Y
DEY
.d_3e75
LDA (ptr),Y
STA (&20),Y
DEY
BPL d_3e75
LDA ptr
STA &20
LDA ptr+&01
STA &21
LDY &D1
.d_3e86
DEY
LDA (&40),Y
STA (&1B),Y
TYA
BNE d_3e86
BEQ d_3e1f
.rand_posn
JSR init_ship
JSR rnd_seq
STA &46
STX &49
STA &06
LSR A
ROR &48
LSR A
ROR &4B
LSR A
STA &4A
TXA
AND #&1F
STA &47
LDA #&50
SBC &47
SBC &4A
STA &4D
JMP rnd_seq
.d_3eb8
LDX cmdr_galxy
DEX
BNE d_3ecc
LDA cmdr_homex
CMP #&90
BNE d_3ecc
LDA cmdr_homey
CMP #&21
BEQ d_3ecd
.d_3ecc
CLC
.d_3ecd
RTS
.d_3f62
JSR rand_posn \ IN
CMP #&F5
ROL A
ORA #&C0
STA &66
.d_3f85
CLC
JMP rnd_seq
.d_3f9a
JSR rnd_seq
LSR A
STA &66
STA &63
ROL &65
AND #&0F
STA &61
JSR rnd_seq
BMI d_3fb9
LDA &66
ORA #&C0
STA &66
LDX #&10
STX &6A
.d_3fb9
LDA #&0B
LDX #&03
JMP hordes
.d_3fc0
JSR d_1228
DEC &034A
BEQ d_3f54
BPL d_3fcd
INC &034A
.d_3fcd
DEC &8A
BEQ d_3fd4
.d_3fd1
JMP d_40db
.d_3f54
LDA &03A4
JSR d_45c6
LDA #&00
STA &034A
JMP d_3fcd
.d_3fd4
LDA &0341
BNE d_3fd1
JSR rnd_seq
CMP #&33 \ trader fraction
BCS d_402e
LDA &033E
CMP #&03
BCS d_402e
JSR rand_posn \ IN
BVS d_3f9a
ORA #&6F
STA &63
LDA &0320
BNE d_4033
TXA
BCS d_401e
AND #&0F
STA &61
BCC d_4022
.d_401e
ORA #&7F
STA &64
.d_4022
JSR rnd_seq
CMP #&0A
AND #&01
ADC #&05
BNE horde_plain
.d_402e
LDA &0320
BEQ d_4036
.d_4033
JMP d_40db
.d_4036
JSR d_41a6
ASL A
LDX &032E
BEQ d_4042
ORA cmdr_legal
.d_4042
STA &D1
JSR d_3f62
CMP &D1
BCS d_4050
LDA #&10
.horde_plain
LDX #&00
BEQ hordes
.d_4050
LDA &032E
BNE d_4033
DEC &0349
BPL d_4033
INC &0349
LDA cmdr_mission
AND #&0C
CMP #&08
BNE d_4070
JSR rnd_seq
CMP #&C8
BCC d_4070
JSR d_320e
.d_4070
JSR rnd_seq
LDY home_govmt
BEQ d_4083
CMP #&78
BCS d_4033
AND #&07
CMP home_govmt
BCC d_4033
.d_4083
CPX #&64
BCS d_40b2
INC &0349
AND #&03
ADC #&19
TAY
JSR d_3eb8
BCC d_40a8
LDA #&F9
STA &66
LDA cmdr_mission
AND #&03
LSR A
BCC d_40a8
ORA &033D
BEQ d_40aa
.d_40a8
TYA
EQUB &2C
.d_40aa
LDA #&1F
JSR ins_ship
JMP d_40db
.d_40b2
LDA #&11
LDX #&07
.hordes
STA horde_base+1
STX horde_mask+1
JSR rnd_seq
CMP #&F8
BCS horde_large
STA &89
TXA
AND &89
AND #&03
.horde_large
AND #&07
STA &0349
STA &89
.d_40b9
JSR rnd_seq
STA &D1
TXA
AND &D1
.horde_mask
AND #&FF
STA &0FD2
.d_40c8
LDA &0FD2
CLC
.horde_base
ADC #&00
INC &61 \ space out horde
INC &47
INC &4A
JSR ins_ship
CMP #&18
BCS d_40d7
DEC &0FD2
BPL d_40c8
.d_40d7
DEC &89
BPL d_40b9
.d_40db
LDX #&FF
TXS
LDX laser_t
BEQ d_40e6
DEC laser_t
.d_40e6
JSR console
JSR d_3634
LDA &87
BEQ d_40f8
\ AND x_flag
\ LSR A
\ BCS d_40f8
LDY #&02
JSR y_sync
\ JSR sync
.d_40f8
JSR d_44af
JSR chk_dirn
.d_40fb
PHA
LDA &2F
BNE d_locked
PLA
JSR check_mode
JMP d_3fc0
.d_locked
PLA
JSR d_416c
JMP d_3fc0
.check_mode
CMP #&76
BNE not_status
JMP status
.not_status
CMP #&14
BNE not_long
JMP long_map
.not_long
CMP #&74
BNE not_short
JMP short_map
.not_short
CMP #&75
BNE not_data
JSR snap_hype
JMP data_onsys
.not_data
CMP #&77
BNE not_invnt
JMP inventory
.not_invnt
CMP #&16
BNE not_price
JMP mark_price
.not_price
CMP #&32
BEQ distance
CMP #&43
BNE not_find
LDA &87
AND #&C0
BEQ n_finder
LDA dockedp
BNE not_map
JMP find_plant
.n_finder
LDA dockedp
BEQ not_map
LDA &9F
EOR #&25
STA &9F
JMP sync
.not_map
RTS
.not_find
CMP #&36
BNE not_home
\ STA &06
LDA &87
AND #&C0
BEQ not_map
\ LDA &2F
\ BNE not_map
\ LDA &06
JSR map_cursor
JSR set_home
\ JSR map_cursor
JMP map_cursor
.not_home
CMP #&21
BNE not_cour
LDA &87
AND #&C0
BEQ not_map
LDA cmdr_cour
ORA cmdr_cour+1
BEQ not_map
JSR map_cursor
LDA cmdr_courx
STA data_homex
LDA cmdr_coury
STA data_homey
JSR map_cursor
.distance
LDA &87
AND #&C0
BEQ not_map
JSR snap_cursor
STA vdu_stat
JSR write_planet
LDA #&80
STA vdu_stat
LDA #&01
STA cursor_x
INC cursor_y
JMP show_nzdist
.not_cour
BIT dockedp
BMI flying
CMP #&20
BNE not_launch
JSR l_3c91
BMI jump_stay
JMP launch
.jump_stay
JMP stay_here
.not_launch
CMP #&73
BNE not_equip
JMP equip
.not_equip
CMP #&71
BNE not_buy
JMP buy_cargo
.not_buy
CMP #&47
BNE not_disk
JSR disk_menu
BCC not_loaded
JMP not_loadc
.not_loaded
JMP start_loop
.not_disk
CMP #&72
BNE not_sell
JMP sell_cargo
.not_sell
CMP #&54
BNE not_hype
JSR clr_line
LDA #&0F
STA cursor_x
LDA #&CD
JMP write_msg1
.flying
CMP #&20
BNE d_4135
JMP d_3292
.d_4135
CMP #&71
BCC d_4143
CMP #&74
BCS d_4143
AND #&03
TAX
JMP d_5493
.d_4143
CMP #&54
BNE not_hype
JMP d_3011
.d_416c
LDA &2F
BEQ d_418a
DEC &2E
BNE d_418a
LDX &2F
DEX
JSR d_30ac
LDA #&05
STA &2E
LDX &2F
JSR d_30ac
DEC &2F
BNE d_418a
JMP d_3254
.d_41a6
LDA cmdr_cargo+&03
CLC
ADC cmdr_cargo+&06
ASL A
ADC cmdr_cargo+&0A
.d_418a
RTS
.not_hype
LDA &87
AND #&C0
BEQ d_418a
JMP add_dirn
.d_41b2
LDA #&E0
.d_41b4
CMP &47
BCC d_41be
CMP &4A
BCC d_41be
CMP &4D
.d_41be
RTS
.d_41bf
ORA &47
ORA &4A
ORA &4D
RTS
.d_41c6
JSR d_43b1
JSR clr_common
ASL &7D
ASL &7D
LDX #&18
JSR d_3619
JSR clr_scrn
JSR d_54eb
JSR d_35b5
LDA #&0C
STA cursor_y
STA cursor_x
LDA #&92
JSR l_323f
.d_41e9
JSR d_3f62
LSR A
LSR A
STA &46
LDY #&00
STY &87
STY &47
STY &4A
STY &4D
STY &66
DEY
STY &8A
\ STY &0346
EOR #&2A
STA &49
ORA #&50
STA &4C
TYA
JSR write_0346
TXA
AND #&8F
STA &63
ROR A
AND #&87
STA &64
LDX #&05
\LDA &5607
\BEQ d_421e
BCC d_421e
DEX
.d_421e
JSR d_251d
JSR rnd_seq
AND #&80
LDY #&1F
STA (&20),Y
LDA ship_type+&04
BEQ d_41e9
JSR d_44a4
STA &7D
.d_4234
JSR d_1228
JSR read_0346
BNE d_4234
LDX #&1F
JSR d_3619
JMP d_1220
.launch
JSR d_4255
JSR clr_boot
LDA #&FF
STA &8E
STA &87
STA dockedp
LDA #&20
JMP d_40fb
.d_4255
LDA #0
STA &9F \ reset finder
.d_427e
LDX #&00
LDA home_tech
CMP #&0A
BCS mix_station
INX
.mix_station
LDY #&02
JSR install_ship
LDY #9
.mix_retry
LDA #0
STA &34
.mix_match
JSR rnd_seq
CMP #ship_total \ # POSSIBLE SHIPS
BCS mix_match
ASL A
ASL A
STA &35
TYA
AND #&07
TAX
LDA mix_bits,X
LDX &35
CPY #16
BCC mix_byte2
CPY #24
BCC mix_byte3
INX \24-28
.mix_byte3
INX \16-23
.mix_byte2
INX \8-15
AND ship_bits,X
BEQ mix_fail
.mix_try
JSR rnd_seq
LDX &35
CMP ship_bytes,X
BCC mix_ok
.mix_fail
DEC &34
BNE mix_match
LDX #ship_total*4
.mix_ok
STY &36
CPX #52 \ ANACONDA?
BEQ mix_anaconda
CPX #116 \ DRAGON?
BEQ mix_dragon
TXA
LSR A
LSR A
TAX
.mix_install
JSR install_ship
LDY &36
.mix_next
INY
CPY #15
BNE mix_skip
INY
INY
.mix_skip
CPY #29
BNE mix_retry
RTS
.mix_anaconda
LDX #13
LDY #14
JSR install_ship
LDX #14
LDY #15
JMP mix_install
.mix_dragon
LDX #29
LDY #14
JSR install_ship
LDX #17
LDY #15
JMP mix_install
.mix_bits
EQUB &01, &02, &04, &08, &10, &20, &40, &80
.d_42ae
LDX #&00
JSR d_371f
JSR d_371f
JSR d_371f
.d_42bd
LDA &D2
ORA &D5
ORA &D8
ORA #&01
STA &DB
LDA &D3
ORA &D6
ORA &D9
.d_42cd
ASL &DB
ROL A
BCS d_42e0
ASL &D2
ROL &D3
ASL &D5
ROL &D6
ASL &D8
ROL &D9
BCC d_42cd
.d_42e0
LDA &D3
LSR A
ORA &D4
STA &34
LDA &D6
LSR A
ORA &D7
STA &35
LDA &D9
LSR A
ORA &DA
STA &36
JMP l_3bd6
.d_434e
LDX &033E
LDA ship_type+&02,X
ORA &033E \ no jump if any ship
ORA &0320
ORA &0341
BNE d_439f
LDY &0908
BMI d_4368
TAY
JSR d_1c43
LSR A
BEQ d_439f
.d_4368
LDY &092D
BMI d_4375
LDY #&25
JSR d_1c41
LSR A
BEQ d_439f
.d_4375
LDA #&81
STA &83
STA &82
STA &1B
LDA &0908
JSR scale_angle
STA &0908
LDA &092D
JSR scale_angle
STA &092D
LDA #&01
STA &87
STA &8A
LSR A
STA &0349
LDX view_dirn
JMP d_5493
.d_439f
LDA #&28
JMP sound
.d_43b1
JSR sound_10
LDA #&18
JMP sound
.d_43be
LDX #&01
JSR d_2590
BCC d_4418
LDA #&78
JSR d_45c6
.n_sound30
LDA #&30
JMP sound
.d_4418
RTS
.d_43ce
INC cmdr_kills
BNE d_43db
INC cmdr_kills+&01
LDA #&65
JSR d_45c6
.d_43db
LDX #&07
.d_43dd
STX &D1
LDA #&18
JSR pp_sound
LDA &4D
LSR A
LSR A
AND &D1
ORA #&F1
STA &0B
JSR sound_rdy
.sound_10
LDA #&10
JMP sound
.d_4429
LDA #&96
JSR tube_write
TYA
JSR tube_write
LDA b_flag
JSR tube_write
JSR tube_read
BPL b_quit
STA last_key,Y
.b_quit
RTS
.d_4473
LDA &033F
BNE d_44c7
LDY #&01
JSR d_4429
INY
JSR d_4429
JSR scan_fire
EOR #&10
STA &0307
LDX #&01
JSR adval
ORA #&01
STA adval_x
LDX #&02
JSR adval
EOR y_flag
STA adval_y
JMP d_4555
.d_44a4
LDA #&00
LDY #&10
.d_44a8
STA last_key,Y
DEY
BNE d_44a8
RTS
.d_44af
JSR d_44a4
LDA &2F
BEQ d_open
JMP d_4555
.d_open
LDA k_flag
BNE d_4473
LDY #&07
.d_44bc
JSR d_4429
DEY
BNE d_44bc
LDA &033F
BEQ d_4526
.d_44c7
JSR init_ship
LDA #&60
STA &54
ORA #&80
STA &5C
STA &8C
LDA &7D \ ? Too Fast
STA &61
JSR d_2346
LDA &61
CMP #&16
BCC d_44e3
LDA #&16
.d_44e3
STA &7D
LDA #&FF
LDX #&00
LDY &62
BEQ d_44f3
BMI d_44f0
INX
.d_44f0
STA &0301,X
.d_44f3
LDA #&80
LDX #&00
ASL &63
BEQ d_450f
BCC d_44fe
INX
.d_44fe
BIT &63
BPL d_4509
LDA #&40
STA adval_x
LDA #&00
.d_4509
STA &0303,X
LDA adval_x
.d_450f
STA adval_x
LDA #&80
LDX #&00
ASL &64
BEQ d_4523
BCS d_451d
INX
.d_451d
STA &0305,X
LDA adval_y
.d_4523
STA adval_y
.d_4526
LDX adval_x
LDA #&07
LDY &0303
BEQ d_4533
JSR d_2a16
.d_4533
LDY &0304
BEQ d_453b
JSR d_2a26
.d_453b
STX adval_x
ASL A
LDX adval_y
LDY &0305
BEQ d_454a
JSR d_2a26
.d_454a
LDY &0306
BEQ d_4552
JSR d_2a16
.d_4552
STX adval_y
.d_4555
JSR scan_10
STX last_key
CPX #&69
BNE d_459c
.d_455f
JSR sync
JSR scan_10
CPX #&51
BNE d_456e
LDA #&00
STA s_flag
.d_456e
LDY #&40
.d_4570
JSR tog_flags
INY
CPY #&48
BNE d_4570
CPX #&10
BNE d_457f
STX s_flag
.d_457f
CPX #&70
BNE d_4586
JMP d_1220
.d_4586
\ CPX #&37
\ BNE dont_dump
\ JSR printer
\dont_dump
CPX #&59
BNE d_455f
.d_459c
LDA &87
BNE d_45b4
LDY #&10
.d_45a4
JSR d_4429
DEY
CPY #&07
BNE d_45a4
.d_45b4
RTS
.d_45b5
STX &034A
PHA
LDA &03A4
JSR d_45dd
PLA
EQUB &2C
.cargo_mtok
ADC #&D0
.d_45c6
LDX #&00
STX vdu_stat
LDY #&09
STY cursor_x
LDY #&16
STY cursor_y
CPX &034A
BNE d_45b5
STY &034A
STA &03A4
.d_45dd
JSR de_token
LSR &034B
BCC d_45b4
LDA #&FD
JMP de_token
.d_45ea
JSR rnd_seq
BMI d_45b4
\ CPX #&17
CPX #&18
BCS d_45b4
\ LDA cmdr_cargo,X
LDA cmdr_hold,X
BEQ d_45b4
LDA &034A
BNE d_45b4
LDY #&03
STY &034B
\ STA cmdr_cargo,X
STA cmdr_hold,X
DEX
BMI d_45c1
CPX #&11
BEQ d_45c1
TXA
BCC cargo_mtok
.d_460e
CMP #&12
BNE equip_mtok \BEQ l_45c4
\l_45c4
LDA #&6F-&6B-1
\ EQUB &2C
.d_45c1
\ LDA #&6C
ADC #&6B-&5D
\ EQUB &2C
.equip_mtok
ADC #&5D
INC new_hold \**
BNE d_45c6
.d_4889
JMP d_3899
.d_488c
LDA &8C
BMI d_4889
JMP l_400f
.d_50a0
LDA &65
AND #&A0
BNE d_50cb
LDA &8A
EOR &84
AND #&0F
BNE d_50b1
JSR l_3e06
.d_50b1
LDX &8C
BPL d_50b8
JMP d_533d
.d_50b8
LDA &66
BPL d_50cb
CPX #&01
BEQ d_50c8
LDA &8A
EOR &84
AND #&07
BNE d_50cb
.d_50c8
JSR d_217a
.d_50cb
JSR d_5558
LDA &61
ASL A
ASL A
STA &81
LDA &50
AND #&7F
JSR l_21fa
STA &82
LDA &50
LDX #&00
JSR d_524a
LDA &52
AND #&7F
JSR l_21fa
STA &82
LDA &52
LDX #&03
JSR d_524a
LDA &54
AND #&7F
JSR l_21fa
STA &82
LDA &54
LDX #&06
JSR d_524a
LDA &61
CLC
ADC &62
BPL d_510d
LDA #&00
.d_510d
LDY #&0F
CMP (&1E),Y
BCC d_5115
LDA (&1E),Y
.d_5115
STA &61
LDA #&00
STA &62
LDX &31
LDA &46
EOR #&FF
STA &1B
LDA &47
JSR d_2877
STA &1D
LDA &33
EOR &48
LDX #&03
JSR d_5308
STA &9E
LDA &1C
STA &9C
EOR #&FF
STA &1B
LDA &1D
STA &9D
LDX &2B
JSR d_2877
STA &1D
LDA &9E
EOR &7B
LDX #&06
JSR d_5308
STA &4E
LDA &1C
STA &4C
EOR #&FF
STA &1B
LDA &1D
STA &4D
JSR d_2879
STA &1D
LDA &9E
STA &4B
EOR &7B
EOR &4E
BPL d_517d
LDA &1C
ADC &9C
STA &49
LDA &1D
ADC &9D
STA &4A
JMP d_519d
.d_517d
LDA &9C
SBC &1C
STA &49
LDA &9D
SBC &1D
STA &4A
BCS d_519d
LDA #&01
SBC &49
STA &49
LDA #&00
SBC &4A
STA &4A
LDA &4B
EOR #&80
STA &4B
.d_519d
LDX &31
LDA &49
EOR #&FF
STA &1B
LDA &4A
JSR d_2877
STA &1D
LDA &32
EOR &4B
LDX #&00
JSR d_5308
STA &48
LDA &1D
STA &47
LDA &1C
STA &46
.d_51bf
LDA &7D
STA &82
LDA #&80
LDX #&06
JSR d_524c
LDA &8C
AND #&81
CMP #&81
BEQ d_frig
JMP l_14f2
.d_frig
RTS
.d_524a
AND #&80
.d_524c
ASL A
STA &83
LDA #&00
ROR A
STA &D1
LSR &83
EOR &48,X
BMI d_526f
LDA &82
ADC &46,X
STA &46,X
LDA &83
ADC &47,X
STA &47,X
LDA &48,X
ADC #&00
ORA &D1
STA &48,X
RTS
.d_526f
LDA &46,X
SEC
SBC &82
STA &46,X
LDA &47,X
SBC &83
STA &47,X
LDA &48,X
AND #&7F
SBC #&00
ORA #&80
EOR &D1
STA &48,X
BCS d_52a0
LDA #&01
SBC &46,X
STA &46,X
LDA #&00
SBC &47,X
STA &47,X
LDA #&00
SBC &48,X
AND #&7F
ORA &D1
STA &48,X
.d_52a0
RTS
.d_5308
TAY
EOR &48,X
BMI d_531c
LDA &1C
CLC
ADC &46,X
STA &1C
LDA &1D
ADC &47,X
STA &1D
TYA
RTS
.d_531c
LDA &46,X
SEC
SBC &1C
STA &1C
LDA &47,X
SBC &1D
STA &1D
BCC d_532f
TYA
EOR #&80
RTS
.d_532f
LDA #&01
SBC &1C
STA &1C
LDA #&00
SBC &1D
STA &1D
TYA
RTS
.d_533d
LDA &8D
EOR #&80
STA &81
LDA &46
STA &1B
LDA &47
STA &1C
LDA &48
JSR d_2782
LDX #&03
JSR d_1d4c
LDA &41
STA &9C
STA &1B
LDA &42
STA &9D
STA &1C
LDA &2A
STA &81
LDA &43
STA &9E
JSR d_2782
LDX #&06
JSR d_1d4c
LDA &41
STA &1B
STA &4C
LDA &42
STA &1C
STA &4D
LDA &43
STA &4E
EOR #&80
JSR d_2782
LDA &43
AND #&80
STA &D1
EOR &9E
BMI d_53a8
LDA &40
CLC
ADC &9B
LDA &41
ADC &9C
STA &49
LDA &42
ADC &9D
STA &4A
LDA &43
ADC &9E
JMP d_53db
.d_53a8
LDA &40
SEC
SBC &9B
LDA &41
SBC &9C
STA &49
LDA &42
SBC &9D
STA &4A
LDA &9E
AND #&7F
STA &1B
LDA &43
AND #&7F
SBC &1B
STA &1B
BCS d_53db
LDA #&01
SBC &49
STA &49
LDA #&00
SBC &4A
STA &4A
LDA #&00
SBC &1B
ORA #&80
.d_53db
EOR &D1
STA &4B
LDA &8D
STA &81
LDA &49
STA &1B
LDA &4A
STA &1C
LDA &4B
JSR d_2782
LDX #&00
JSR d_1d4c
LDA &41
STA &46
LDA &42
STA &47
LDA &43
STA &48
JMP d_51bf
.d_5404
DEX
BNE d_5438
LDA &48
EOR #&80
STA &48
LDA &4E
EOR #&80
STA &4E
LDA &50
EOR #&80
STA &50
LDA &54
EOR #&80
STA &54
LDA &56
EOR #&80
STA &56
LDA &5A
EOR #&80
STA &5A
LDA &5C
EOR #&80
STA &5C
LDA &60
EOR #&80
STA &60
RTS
.d_5438
LDA #&00
CPX #&02
ROR A
STA &9A
EOR #&80
STA &99
LDA &46
LDX &4C
STA &4C
STX &46
LDA &47
LDX &4D
STA &4D
STX &47
LDA &48
EOR &99
TAX
LDA &4E
EOR &9A
STA &48
STX &4E
LDY #&09
JSR d_546c
LDY #&0F
JSR d_546c
LDY #&15
.d_546c
LDA &46,Y
LDX &4A,Y
STA &4A,Y
STX &46,Y
LDA &47,Y
EOR &99
TAX
LDA &4B,Y
EOR &9A
STA &47,Y
STX &4B,Y
.d_5486
RTS
.d_5487
STX view_dirn
JSR clr_scrn
JSR d_54aa
JMP d_35b1
.d_5493
LDA #&00
LDY &87
BNE d_5487
CPX view_dirn
BEQ d_5486
STX view_dirn
JSR clr_scrn
JSR d_1a05
JSR d_35d8
.d_54aa
LDY view_dirn
LDA cmdr_laser,Y
BEQ d_5486
LDA #&80
STA &73
LDA #&48
STA &74
LDA #&14
STA &75
JSR map_cross
LDA #&0A
STA &75
JMP map_cross
.iff_xor
EQUB &00, &00, &0F \, &FF, &F0 overlap
.iff_base
EQUB &FF, &F0, &FF, &F0, &FF
.d_5557
RTS
.d_5558
LDA &65
AND #&10
BEQ d_5557
LDA &8C
BMI d_5557
LDX cmdr_hold \ iff code
BEQ iff_not
LDY #&24
LDA (&20),Y
ASL A
ASL A
BCS iff_cop
ASL A
BCS iff_trade
LDY &8C
DEY
BEQ iff_missle
CPY #&08
BCC iff_aster
INX \ X=4
.iff_missle
INX \ X=3
.iff_aster
INX \ X=2
.iff_cop
INX \ X=1
.iff_trade
INX \ X=0
.iff_not
LDA iff_base,X
STA &91
LDA iff_xor,X
STA &37
LDA &47
ORA &4A
ORA &4D
AND #&C0
BNE d_5557
LDA &47
CLC
LDX &48
BPL d_5581
EOR #&FF
ADC #&01
.d_5581
ADC #&7B
STA &34
LDA &4D
LSR A
LSR A
CLC
LDX &4E
BPL d_5591
EOR #&FF
SEC
.d_5591
ADC #&23
EOR #&FF
STA ptr
LDA &4A
LSR A
CLC
LDX &4B
BMI d_55a2
EOR #&FF
SEC
.d_55a2
ADC ptr
BPL d_55b0
CMP #&C2
BCS d_55ac
LDA #&C2
.d_55ac
CMP #&F7
BCC d_55b2
.d_55b0
LDA #&F6
.d_55b2
STA &35
SEC
SBC ptr
TAX
LDA #&91
JSR tube_write
LDA &34
JSR tube_write
LDA &35
JSR tube_write
LDA &91
JSR tube_write
LDA &37
JSR tube_write
TXA
JSR tube_write
LDX #0
RTS
|
programs/oeis/011/A011197.asm | jmorken/loda | 1 | 22925 | <gh_stars>1-10
; A011197: a(n) = n*(n+1)*(2*n+1)*(3*n+1)*(4*n+1)/6.
; 0,20,315,1820,6630,18480,43225,89320,168300,295260,489335,774180,1178450,1736280,2487765,3479440,4764760,6404580,8467635,11031020,14180670,18011840,22629585,28149240,34696900,42409900,51437295,61940340,74092970,88082280,104109005,122388000,143148720,166635700,193109035,222844860,256135830,293291600,334639305,380524040,431309340,487377660,549130855,616990660,691399170,772819320,861735365,958653360,1064101640,1178631300,1302816675,1437255820,1582570990,1739409120,1908442305,2090368280,2285910900,2495820620,2720874975,2961879060,3219666010,3495097480,3789064125,4102486080,4436313440,4791526740,5169137435,5570188380,5995754310,6446942320,6924892345,7430777640,7965805260,8531216540,9128287575,9758329700,10422689970,11122751640,11859934645,12635696080,13451530680,14308971300,15209589395,16154995500,17146839710,18186812160,19276643505,20418105400,21613010980,22863215340,24170616015,25537153460,26964811530,28455617960,30011644845,31635009120,33327873040,35092444660,36930978315,38845775100,40839183350,42913599120,45071466665,47315278920,49647577980,52070955580,54588053575,57201564420,59914231650,62728850360,65648267685,68675383280,71813149800,75064573380,78432714115,81920686540,85531660110,89268859680,93135565985,97135116120,101270904020,105546380940,109965055935,114530496340,119246328250,124116237000,129143967645,134333325440,139688176320,145212447380,150910127355,156785267100,162841980070,169084442800,175516895385,182143641960,188969051180,195997556700,203233657655,210681919140,218346972690,226233516760,234346317205,242690207760,251270090520,260090936420,269157785715,278475748460,288050004990,297885806400,307988475025,318363404920,329016062340,339951986220,351176788655,362696155380,374515846250,386641695720,399079613325,411835584160,424915669360,438326006580,452072810475,466162373180,480601064790,495395333840,510551707785,526076793480,541977277660,558259927420,574931590695,591999196740,609469756610,627350363640,645648193925,664370506800,683524645320,703118036740,723158192995,743652711180,764609274030,786035650400,807939695745,830329352600,853212651060,876597709260,900492733855,924906020500,949845954330,975321010440,1001339754365,1027910842560,1055043022880,1082745135060,1111026111195,1139894976220,1169360848390,1199432939760,1230120556665,1261433100200,1293380066700,1325971048220,1359215733015,1393123906020,1427705449330,1462970342680,1498928663925,1535590589520,1572966395000,1611066455460,1649901246035,1689481342380,1729817421150,1770920260480,1812800740465,1855469843640,1898938655460,1943218364780,1988320264335,2034255751220,2081036327370,2128673600040,2177179282285,2226565193440,2276843259600,2328025514100,2380124097995,2433151260540,2487119359670,2542040862480,2597928345705,2654794496200,2712652111420,2771514099900,2831393481735,2892303389060,2954257066530,3017267871800,3081349276005,3146514864240,3212778336040,3280153505860,3348654303555,3418294774860,3489089081870,3561051503520,3634196436065,3708538393560,3784092008340,3860872031500
mov $1,1
mul $1,$0
mov $2,1
mov $3,31
lpb $3
mul $1,$2
add $2,$0
div $3,2
lpe
div $1,30
mul $1,5
|
Focus Desktop/Focus Desktop/Resources/changeState.scpt | InstaRobot/focus-desktop | 26 | 441 | if (do shell script "defaults read com.apple.finder CreateDesktop") is equal to "1" then
do shell script "defaults write com.apple.finder CreateDesktop -bool false"
else
do shell script "defaults write com.apple.finder CreateDesktop -bool true"
end if
do shell script "killall Finder"
return 1
|
PseudoPopParser/Population.g4 | NPsim/P3 | 23 | 5078 | <gh_stars>10-100
grammar Population;
/*
* Parser Rules
*/
key
: MISSION
// | DIR_BASE
// | DIR_INCLUDE
| TEMPLATES
| WAVE
| WAVESPAWN
| RANDOMPLACEMENT
| PERIODICSPAWN
| WHEN
| TFBOT
| TANK
| SENTRYGUN
| SQUAD
| MOB
| RANDOMCHOICE
| ITEMATTRIBUTES
| CHARACTERATTRIBUTES
| EVENTCHANGEATTRIBUTES
| STARTWAVEOUTPUT
| INITWAVEOUTPUT
| FIRSTSPAWNOUTPUT
| LASTSPAWNOUTPUT
| DONEOUTPUT
| ONKILLEDOUTPUT
| ONBOMBDROPPEDOUTPUT
| WHERE
| CLOSESTPOINT
| STARTINGCURRENCY
| FIXEDRESPAWNWAVETIME
| RESPAWNWAVETIME
| CANBOTSATTACKWHILEINSPAWNROOM
| ISENDLESS
| ADVANCED
| ADDSENTRYBUSTERWHENDAMAGEDEALTEXCEEDS
| ADDSENTRYBUSTERWHENKILLCOUNTEXCEEDS
| MININTERVAL
| MAXINTERVAL
| EVENTPOPFILE
| TARGET
| ACTION
| OBJECTIVE
| INITIALCOOLDOWN
| BEGINATWAVE
| RUNFORTHISMANYWAVES
| COOLDOWNTIME
| DESIREDCOUNT
| DESCRIPTION
| SOUND
| WAITWHENDONE
| CHECKPOINT
| TOTALCURRENCY
| TOTALCOUNT
| MAXACTIVE
| SPAWNCOUNT
| SUPPORT
| RANDOMSPAWN
| WAITBEFORESTARTING
| WAITFORALLSPAWNED
| WAITFORALLDEAD
| WAITBETWEENSPAWNS
| WAITBETWEENSPAWNSAFTERDEATH
| STARTWAVEWARNINGSOUND
| FIRSTSPAWNWARNINGSOUND
| LASTSPAWNWARNINGSOUND
| DONEWARNINGSOUND
| MINIMUMSEPARATION
| NAVAREAFILTER
| WHEN
| SHOULDPRESERVESQUAD
| FORMATIONSIZE
| COUNT
| TEMPLATE
| NAME
| ITEMNAME
| ATTRIBUTES
| CLASS
| CLASSICON
| HEALTH
| SCALE
| AUTOJUMPMIN
| AUTOJUMPMAX
| SKILL
| WEAPONRESTRICTIONS
| BEHAVIORMODIFIERS
| MAXVISIONRANGE
| ITEM
| TELEPORTWHERE
| TAG
| SPEED
| SKIN
| STARTINGPATHTRACKNODE
| LEVEL
;
value
: STRING
| key
| NUMBER
;
generic_kv
: value value
;
generic_collection
: value '{' generic_collection_body* endc
;
generic_collection_body
: generic_kv
| generic_collection
;
popfile
: directive* population? EOF
;
population
: value '{' population_body* endc
;
directive
: DIR_BASE value
| DIR_INCLUDE value
;
population_body
: STARTINGCURRENCY value
| FIXEDRESPAWNWAVETIME value
| ADVANCED value
| EVENTPOPFILE value
| CANBOTSATTACKWHILEINSPAWNROOM value
| RESPAWNWAVETIME value
| ISENDLESS value
| ADDSENTRYBUSTERWHENDAMAGEDEALTEXCEEDS value
| ADDSENTRYBUSTERWHENKILLCOUNTEXCEEDS value
| TEMPLATES '{' templates_body* '}' // value is name of the template
| MISSION '{' mission_body* '}'
| WAVE '{' wave_body* endc
| RANDOMPLACEMENT '{' randomplacement_body* '}'
| PERIODICSPAWN '{' periodicspawn_body* '}'
| generic_kv
| generic_collection
;
templates_body
: value '{' template_body* endc
;
template_body
// Generic
: TEMPLATE value
| NAME value
// TFBot
| ATTRIBUTES value
| CLASS value
| CLASSICON value
| HEALTH value
| SCALE value
| AUTOJUMPMIN value
| AUTOJUMPMAX value
| SKILL value
| WEAPONRESTRICTIONS value
| BEHAVIORMODIFIERS value
| MAXVISIONRANGE value
| ITEM value
| TELEPORTWHERE value
| TAG value
| ITEMATTRIBUTES '{' itemattributes_body* endc
| CHARACTERATTRIBUTES '{' characterattributes_body* '}'
| EVENTCHANGEATTRIBUTES '{' eventchangeattributes_body*? '}'
// WaveSpawn
| TOTALCURRENCY value
| TOTALCOUNT value
| WHERE value
| MAXACTIVE value
| SPAWNCOUNT value
| SUPPORT value
| WAITFORALLDEAD value
| WAITFORALLSPAWNED value
| WAITBEFORESTARTING value
| WAITBETWEENSPAWNS value
| WAITBETWEENSPAWNSAFTERDEATH value
| RANDOMSPAWN value
| STARTWAVEWARNINGSOUND value
| STARTWAVEOUTPUT '{' output_body* '}'
| FIRSTSPAWNWARNINGSOUND value
| FIRSTSPAWNOUTPUT '{' output_body* '}'
| LASTSPAWNWARNINGSOUND value
| LASTSPAWNOUTPUT '{' output_body* '}'
| DONEWARNINGSOUND value
| DONEOUTPUT '{' output_body* '}'
| spawners
| generic_kv
| generic_collection
;
wave_body
: DESCRIPTION value
| SOUND value
| WAITWHENDONE value
| CHECKPOINT value
| STARTWAVEOUTPUT '{' output_body* '}'
| INITWAVEOUTPUT '{' output_body* '}'
| DONEOUTPUT '{' output_body* '}'
| WAVESPAWN '{' wavespawn_body* '}'
| generic_kv
| generic_collection
;
wavespawn_body
: TEMPLATE value
| NAME value
| TOTALCURRENCY value
| TOTALCOUNT value
| WHERE value
| MAXACTIVE value
| SPAWNCOUNT value
| SUPPORT value
| WAITFORALLDEAD value
| WAITFORALLSPAWNED value
| WAITBEFORESTARTING value
| WAITBETWEENSPAWNS value
| WAITBETWEENSPAWNSAFTERDEATH value
| RANDOMSPAWN value
| STARTWAVEWARNINGSOUND value
| STARTWAVEOUTPUT '{' output_body* '}'
| FIRSTSPAWNWARNINGSOUND value
| FIRSTSPAWNOUTPUT '{' output_body* '}'
| LASTSPAWNWARNINGSOUND value
| LASTSPAWNOUTPUT '{' output_body* '}'
| DONEWARNINGSOUND value
| DONEOUTPUT '{' output_body* '}'
| spawners
| generic_kv
| generic_collection
;
randomplacement_body
: COUNT value
| MINIMUMSEPARATION value
| NAVAREAFILTER value
| spawners
| generic_kv
| generic_collection
;
periodicspawn_body
: WHERE value
| WHEN ( value | '{' when_body* '}' )
| spawners
| generic_kv
| generic_collection
;
when_body
: MININTERVAL value
| MAXINTERVAL value
| generic_kv
| generic_collection
;
mission_body
: OBJECTIVE value
| INITIALCOOLDOWN value
| WHERE value
| BEGINATWAVE value
| RUNFORTHISMANYWAVES value
| COOLDOWNTIME value
| DESIREDCOUNT value
| spawners
| generic_kv
| generic_collection
;
spawners
: TFBOT '{' tfbot_body*? endc
| TANK '{' tank_body*? '}'
| SENTRYGUN '{' sentrygun_body*? '}'
| SQUAD '{' squad_body*? '}'
| MOB '{' mob_body*? '}'
| RANDOMCHOICE '{' randomchoice_body*? '}'
| generic_kv
| generic_collection
;
squad_body
: SHOULDPRESERVESQUAD value
| FORMATIONSIZE value
| spawners
| generic_kv
| generic_collection
;
mob_body
: COUNT value
| spawners
| generic_kv
| generic_collection
;
randomchoice_body
: spawners
| generic_kv
| generic_collection
;
tfbot_body
: TEMPLATE value
| NAME value
| ATTRIBUTES value
| CLASS value
| CLASSICON value
| HEALTH value
| SCALE value
| AUTOJUMPMIN value
| AUTOJUMPMAX value
| SKILL value
| WEAPONRESTRICTIONS value
| BEHAVIORMODIFIERS value
| MAXVISIONRANGE value
| ITEM value
| TELEPORTWHERE value
| TAG value
| ITEMATTRIBUTES '{' itemattributes_body* endc
| CHARACTERATTRIBUTES '{' characterattributes_body* '}'
| EVENTCHANGEATTRIBUTES '{' eventchangeattributes_body*? '}'
| generic_kv
| generic_collection
;
tank_body
: HEALTH value
| SPEED value
| NAME value
| SKIN value
| STARTINGPATHTRACKNODE value
| ONKILLEDOUTPUT '{' output_body* '}'
| ONBOMBDROPPEDOUTPUT '{' output_body* '}'
| generic_kv
| generic_collection
;
sentrygun_body
: LEVEL value
| generic_kv
| generic_collection
;
itemattributes_body
: ITEMNAME value
| value value
| generic_kv
| generic_collection
;
characterattributes_body
: value value
| generic_collection
;
eventchangeattributes_body
: value '{' eventattributes_body* '}'
;
eventattributes_body
: ATTRIBUTES value
| SKILL value
| WEAPONRESTRICTIONS value
| BEHAVIORMODIFIERS value
| MAXVISIONRANGE value
| ITEM value
| TAG value
| ITEMATTRIBUTES '{' itemattributes_body* '}'
| CHARACTERATTRIBUTES '{' characterattributes_body* '}'
| generic_kv
| generic_collection
;
output_body
: TARGET value
| ACTION value
;
endc // Parser anchor method
: '}'
;
/*
* Lexer Rules
*/
COMMENT
: '//' ~[\r\n]* -> skip
;
VALVE_TOKEN
: '[$' [a-zA-Z0-9]+ ']' ~[\r\n]* -> skip
;
WS
: [ \r\t\n]+ -> skip
;
fragment A : [Aa] ;
fragment B : [Bb] ;
fragment C : [Cc] ;
fragment D : [Dd] ;
fragment E : [Ee] ;
fragment F : [Ff] ;
fragment G : [Gg] ;
fragment H : [Hh] ;
fragment I : [Ii] ;
fragment J : [Jj] ;
fragment K : [Kk] ;
fragment L : [Ll] ;
fragment M : [Mm] ;
fragment N : [Nn] ;
fragment O : [Oo] ;
fragment P : [Pp] ;
fragment Q : [Qq] ;
fragment R : [Rr] ;
fragment S : [Ss] ;
fragment T : [Tt] ;
fragment U : [Uu] ;
fragment V : [Vv] ;
fragment W : [Ww] ;
fragment X : [Xx] ;
fragment Y : [Yy] ;
fragment Z : [Zz] ;
// Collections - General
MISSION : M I S S I O N | '"' MISSION '"' ;
TEMPLATES : T E M P L A T E S | '"' TEMPLATES '"' ;
WAVE : W A V E | '"' WAVE '"' ;
WAVESPAWN : W A V E S P A W N | '"' WAVESPAWN '"' ;
RANDOMPLACEMENT : R A N D O M P L A C E M E N T | '"' RANDOMPLACEMENT '"' ;
PERIODICSPAWN : P E R I O D I C S P A W N | '"' PERIODICSPAWN '"' ;
WHEN : W H E N | '"' WHEN '"' ;
// Collections - Spawners
TFBOT : T F B O T | '"' TFBOT '"' ;
TANK : T A N K | '"' TANK '"' ;
SENTRYGUN : S E N T R Y G U N | '"' SENTRYGUN '"' ;
SQUAD : S Q U A D | '"' SQUAD '"' ;
MOB : M O B | '"' MOB '"' ;
RANDOMCHOICE : R A N D O M C H O I C E | '"' RANDOMCHOICE '"' ;
// Collections - Attributes
ITEMATTRIBUTES : I T E M A T T R I B U T E S | '"' ITEMATTRIBUTES '"' ;
CHARACTERATTRIBUTES : C H A R A C T E R A T T R I B U T E S | '"' CHARACTERATTRIBUTES '"' ;
EVENTCHANGEATTRIBUTES : E V E N T C H A N G E A T T R I B U T E S | '"' EVENTCHANGEATTRIBUTES '"' ;
// REVERTGATEBOTSBEHAVIOR : R E V E R T G A T E B O T S B E H A V I O R | '"' REVERTGATEBOTSBEHAVIOR '"' ;
// DEFAULT : D E F A U L T | '"' DEFAULT '"' ;
// Collections - Outputs
STARTWAVEOUTPUT : S T A R T W A V E O U T P U T | '"' STARTWAVEOUTPUT '"' ;
INITWAVEOUTPUT : I N I T W A V E O U T P U T | '"' INITWAVEOUTPUT '"' ;
FIRSTSPAWNOUTPUT : F I R S T S P A W N O U T P U T | '"' FIRSTSPAWNOUTPUT '"' ;
LASTSPAWNOUTPUT : L A S T S P A W N O U T P U T | '"' LASTSPAWNOUTPUT '"' ;
DONEOUTPUT : D O N E O U T P U T | '"' DONEOUTPUT '"' ;
ONKILLEDOUTPUT : O N K I L L E D O U T P U T | '"' ONKILLEDOUTPUT '"' ;
ONBOMBDROPPEDOUTPUT : O N B O M B D R O P P E D O U T P U T | '"' ONBOMBDROPPEDOUTPUT '"' ;
// Keys - General
DIR_BASE : '#' B A S E | '"' DIR_BASE '"' ;
DIR_INCLUDE : '#' I N C L U D E | '"' DIR_INCLUDE '"' ;
WHERE : W H E R E | '"' WHERE '"' ;
CLOSESTPOINT : C L O S E S T P O I N T | '"' CLOSESTPOINT '"' ;
STARTINGCURRENCY : S T A R T I N G C U R R E N C Y | '"' STARTINGCURRENCY '"' ;
FIXEDRESPAWNWAVETIME : F I X E D R E S P A W N W A V E T I M E | '"' STARTINGCURRENCY '"' ;
RESPAWNWAVETIME : R E S P A W N W A V E T I M E | '"' RESPAWNWAVETIME '"' ;
CANBOTSATTACKWHILEINSPAWNROOM
: C A N B O T S A T T A C K W H I L E I N S P A W N R O O M | '"' CANBOTSATTACKWHILEINSPAWNROOM '"' ;
ISENDLESS : I S E N D L E S S | '"' ISENDLESS '"' ;
ADVANCED : A D V A N C E D | '"' ADVANCED '"' ;
ADDSENTRYBUSTERWHENDAMAGEDEALTEXCEEDS
: A D D S E N T R Y B U S T E R W H E N D A M A G E D E A L T E X C E E D S | '"' ADDSENTRYBUSTERWHENDAMAGEDEALTEXCEEDS '"' ;
ADDSENTRYBUSTERWHENKILLCOUNTEXCEEDS
: A D D S E N T R Y B U S T E R W H E N K I L L C O U N T E X C E E D S | '"' ADDSENTRYBUSTERWHENKILLCOUNTEXCEEDS '"' ;
MININTERVAL : M I N I N T E R V A L | '"' MININTERVAL '"' ;
MAXINTERVAL : M A X I N T E R V A L | '"' MAXINTERVAL '"' ;
EVENTPOPFILE : E V E N T P O P F I L E | '"' EVENTPOPFILE '"' ;
TARGET : T A R G E T | '"' TARGET '"' ;
ACTION : A C T I O N | '"' ACTION '"' ;
// Keys - Mission
OBJECTIVE : O B J E C T I V E | '"' OBJECTIVE '"' ;
INITIALCOOLDOWN : I N I T I A L C O O L D O W N | '"' INITIALCOOLDOWN '"' ;
BEGINATWAVE : B E G I N A T W A V E | '"' BEGINATWAVE '"' ;
RUNFORTHISMANYWAVES : R U N F O R T H I S M A N Y W A V E S | '"' RUNFORTHISMANYWAVES '"' ;
COOLDOWNTIME : C O O L D O W N T I M E | '"' COOLDOWNTIME '"' ;
DESIREDCOUNT : D E S I R E D C O U N T | '"' DESIREDCOUNT '"' ;
// Keys - Wave
DESCRIPTION : D E S C R I P T I O N | '"' DESCRIPTION '"' ;
SOUND : S O U N D | '"' SOUND '"' ;
WAITWHENDONE : W A I T W H E N D O N E | '"' WAITWHENDONE '"' ;
CHECKPOINT : C H E C K P O I N T | '"' CHECKPOINT '"' ;
// Keys - WaveSpawn
TOTALCURRENCY : T O T A L C U R R E N C Y | '"' TOTALCURRENCY '"' ;
TOTALCOUNT : T O T A L C O U N T | '"' TOTALCOUNT '"' ;
MAXACTIVE : M A X A C T I V E | '"' MAXACTIVE '"' ;
SPAWNCOUNT : S P A W N C O U N T | '"' SPAWNCOUNT '"' ;
SUPPORT : S U P P O R T | '"' SUPPORT '"' ;
RANDOMSPAWN : R A N D O M S P A W N | '"' RANDOMSPAWN '"' ;
WAITBEFORESTARTING : W A I T B E F O R E S T A R T I N G | '"' WAITBEFORESTARTING '"' ;
WAITFORALLSPAWNED : W A I T F O R A L L S P A W N E D | '"' WAITFORALLSPAWNED '"' ;
WAITFORALLDEAD : W A I T F O R A L L D E A D | '"' WAITFORALLDEAD '"' ;
WAITBETWEENSPAWNS : W A I T B E T W E E N S P A W N S | '"' WAITBETWEENSPAWNS '"' ;
WAITBETWEENSPAWNSAFTERDEATH
: W A I T B E T W E E N S P A W N S A F T E R D E A T H | '"' WAITBETWEENSPAWNSAFTERDEATH '"' ;
STARTWAVEWARNINGSOUND : S T A R T W A V E W A R N I N G S O U N D | '"' STARTWAVEWARNINGSOUND '"' ;
FIRSTSPAWNWARNINGSOUND : F I R S T S P A W N W A R N I N G S O U N D | '"' FIRSTSPAWNWARNINGSOUND '"' ;
LASTSPAWNWARNINGSOUND : L A S T S P A W N W A R N I N G S O U N D | '"' LASTSPAWNWARNINGSOUND '"' ;
DONEWARNINGSOUND : D O N E W A R N I N G S O U N D | '"' DONEWARNINGSOUND '"' ;
// Keys - RandomPlacement
MINIMUMSEPARATION : M I N I M U M S E P A R A T I O N | '"' MINIMUMSEPARATION '"' ;
NAVAREAFILTER : N A V A R E A F I L T E R | '"' NAVAREAFILTER '"' ;
// Keys - PeriodicSpawn
// WHEN : W H E N | '"' WHEN '"' ;
// Keys - Spawners
SHOULDPRESERVESQUAD : S H O U L D P R E S E R V E S Q U A D | '"' SHOULDPRESERVESQUAD '"' ;
FORMATIONSIZE : F O R M A T I O N S I Z E | '"' FORMATIONSIZE '"' ;
COUNT : C O U N T | '"' COUNT '"' ;
// Keys - TFBots
TEMPLATE : T E M P L A T E | '"' TEMPLATE '"' ;
NAME : N A M E | '"' NAME '"' ;
ITEMNAME : I T E M N A M E | '"' ITEMNAME '"' ;
ATTRIBUTES : A T T R I B U T E S | '"' ATTRIBUTES '"' ;
CLASS : C L A S S | '"' CLASS '"' ;
CLASSICON : C L A S S I C O N | '"' CLASSICON '"' ;
HEALTH : H E A L T H | '"' HEALTH '"' ;
SCALE : S C A L E | '"' SCALE '"' ;
AUTOJUMPMIN : A U T O J U M P M I N | '"' AUTOJUMPMIN '"' ;
AUTOJUMPMAX : A U T O J U M P M A X | '"' AUTOJUMPMAX '"' ;
SKILL : S K I L L | '"' SKILL '"' ;
WEAPONRESTRICTIONS : W E A P O N R E S T R I C T I O N S | '"' WEAPONRESTRICTIONS '"' ;
BEHAVIORMODIFIERS : B E H A V I O R M O D I F I E R S | '"' BEHAVIORMODIFIERS '"' ;
MAXVISIONRANGE : M A X V I S I O N R A N G E | '"' MAXVISIONRANGE '"' ;
ITEM : I T E M | '"' ITEM '"' ;
TELEPORTWHERE : T E L E P O R T W H E R E | '"' TELEPORTWHERE '"' ;
TAG : T A G | '"' TAG '"' ;
// Keys - Tank
SPEED : S P E E D | '"' SPEED '"' ;
SKIN : S K I N | '"' SKIN '"' ;
STARTINGPATHTRACKNODE : S T A R T I N G P A T H T R A C K N O D E | '"' STARTINGPATHTRACKNODE '"' ;
// Keys - Sentry Gun
LEVEL : L E V E L | '"' LEVEL '"' ;
// Miscellaneous
NUMBER
: DIGIT+
| DIGIT+ '.' DIGIT+
| '.' DIGIT+
| '-' NUMBER
| '"' NUMBER '"'
;
fragment DIGIT
: [0-9]
;
STRING
: ~[" \r\n\t{}]+
| '"' (ESC | ~'"')* '"'
;
fragment ESC
: '\\' (["\\/nrt])
; |
libsrc/_DEVELOPMENT/adt/bv_priority_queue/c/sccz80/bv_priority_queue_shrink_to_fit.asm | jpoikela/z88dk | 640 | 175127 | <reponame>jpoikela/z88dk
; int bv_priority_queue_shrink_to_fit(bv_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_bv_priority_queue
PUBLIC bv_priority_queue_shrink_to_fit
EXTERN asm_bv_priority_queue_shrink_to_fit
defc bv_priority_queue_shrink_to_fit = asm_bv_priority_queue_shrink_to_fit
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _bv_priority_queue_shrink_to_fit
defc _bv_priority_queue_shrink_to_fit = bv_priority_queue_shrink_to_fit
ENDIF
|
custom/Launch-Apps.applescript | lewg/oh-my-zsh | 0 | 110 | ignoring application responses
tell application "Slack" to launch
tell application "Microsoft Outlook" to launch
end ignoring
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.