Friday, December 22, 2023

CICS PAM

 Page allocation map describes the current DSA usage. Each PAM subpool entry is 16 bytes long describing each subpool.  It records the subpool ID and the number of pages assigned in the subpool. It also contain the FAQE pointers which chain up the free area ms within the pages which can be used for future requests. Program subpool does jot uses FAQE because the basic allocation for program is on page. Task storage also does not use FAQE. He pointers are kept in TCA instead. 

PAM also contains other fields like page size of DSA, the cushion size, the address of the first DSA page etc. 

the address shifting factor field contain a value depending on the page size (2K or 4K) and is used with the starting virtual address of DSA to conveniently deride the DsA page number for an arbitrary address or to locate the starting address of an arbitrary DSA page 

CICS DSA

 DSA constitute the memory area left over after all the program, buffer, tables, control blocks are allocated. DSA is divided into pages. Each pages are assigned to a different CICS subpools. Subspool determines how the storage is allocated to requests made. 

Examples of subpools are for control, telecom, task, RPL and program etc. program subpool pages are allocated from the top of DSA. Programs generally uses more space per request. The other subpools uses relatively smaller chunk of space 

CICS SCP

 Storage Control Program managed the DSA allocation. SCP issues GETMAIN and FREEMAIN macro to obtain and release memory for DSA. It monitor the usage so that it can issue warning (based on the storage cushion value) and perform recovery is storage is depleted.  Requests are queued when this happens. 

Monday, December 18, 2023

CICS TCA

The system TCA contains information used by the CICS control programs. It contains anchor points for task storage acquired by the transaction. It also contain pointer to COBOL working storage (TGT). 


The user TCA has s used to communicate information of request to CICS. It contains space for register save for KCP, SCP and for calling temp storage, file control and transient storage module  

Friday, June 2, 2023

Scaled Numeric Representation

 Scaled numeric upscale a the fractional part to whole number by multiplying its base. For example for base 10, the value of 2.4 is scaled up to 240 by multiplying with 100. Once the number is scaled up, it can be involved in calculation like a normal binary number. The result will then scaled back accordingly.  

Fixed point real number

Fixed point means the decimal point is fixed at a certain bit position.  For examples, one can use 8 bits for the number and another 8 bits for the fraction.  The number point is interpreted as the usual binary representation, signed or unsigned.  Each bit in the fraction part is interpreted based on its bit position.  The value at position n (counted from left to right) = 1/(2^n) or 2^-n

For example if the fraction = 10011111,

1/(2^1) = 1/2 = 0.5

0/(2^2) = 0/4 = 0

0/(2^3) = 0/8 = 0

1/(2^4) = 1/16 = 0.0625

1/(2^5) = 1/32 = 0.03125

1/(2^6) = 1/64 = 0.015625

1/(2^7) = 1/128 = 0.0078125

1/(2^8) = 1/256 = 0.00390625

The decimal value is = 0.5 + 0 + 0 + 0.0625 + 0.03125 + 0.015625 + 0.0078125 + 0.00390625 = 

Fixed point is popular in the past when floating point unit is not available.  Even with FPU become a standard hardware component equipped in all modern processor, fixed point is still used in game because it is still more efficient than floating point calculation   

Comparing to using BCD (binary coded decimal), fixed point has higher resolution  for example 8bits can be used to represent BCD values from .00 to .99  8 bus in fixed point representation can represent 2^n fraction value  

Fixed point still cannot be used to represent all real number and only an approximation (eg 1/3).


Tuesday, May 2, 2023

Bootsect

Bootsect (bootsect.s) is 1 sector in length and loaded to memory location x07C00 (31,744B) by BIOS interrupt 13.  Bootsect runs in real mode which addresses 1MB (20 bit address. 1MB = 1,048,576B).  BIOS IVT is loaded in x00000 to x003FF by BIOS (256 interrupts with 4 bytes each total 1KB), followed by BIOS data (256B from x00400 to x004FF).  The interrupt service routine is 8KB in length and is loaded to x0E05B, which is 56KB after.  So the memory is not used from about 65KB and up to where BIOS is located at xFE000 for 8KB until the end of the real memory.

Once Bootsect is loaded and starts to run, it will load the next 2 sectors from the boot device into memory.  The 2 sectors contain the set up program (setup.s).

Before reading in setup.s, Bootsect firstly relocates itself from x07C00 (BOOTSEG at address ~32K) to x09000 (INITSEG at address 576K).  Bootsect the establishes the stack at x9FF00 (address ~655K) with ~63KB space from end of INITSEG.  

Bootsect uses interrupt x13h (disk service program) to load setup program to memory at address x90200 (512KB = 1 sector after bootsect.s) for 5 sectors (2.5KB or A00).  

Bootsect then loads the system modules into memory.  Bootsect uses interrupt x13h again and loads 240 sectors (120KB) into x10000 (address at 65K, after the BIOS IVT, BIOS data and IVT service routine).  As this takes some time to load so many sectors from floppy disk, Bootsect will display "Loading System...." message on the console.  System modules span from x10000 to x11E00 (up to address ~73K).

Lastly, bootsect inspects the root device number and record in at 01A964 (root_dev) in system data.  Bootsect than transfers the execution to the set up program at x90200.