User Tools

Site Tools


operational_statements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
operational_statements [2020/02/21 09:31]
jtwine [Display]
operational_statements [2020/11/16 22:05] (current)
adminz [Display]
Line 1: Line 1:
 ===== Operational Statements ===== ===== Operational Statements =====
-Here we cover the statements that are used for creating code units and performing operations within the 9010A unit and the UUT.  ​Basically ​these are the 10LC equivalents to the keypresses you would use when manually operating the 9010A interactively.+Here we cover the statements that are used for creating code units and performing operations within the 9010A unit and the UUT.  ​Usually ​these are the 10LC equivalents to the keypresses you would use when manually operating the 9010A interactively.
  
  
Line 6: Line 6:
 The ''​Program''​ statement marks the start of a callable unit of code.  Programs in 10LC are normally referenced by symbolic name and are converted to numeric identifiers that the 9010A uses.  A Program'​s numeric identifier is automatically assigned by the compiler. ​ If necessary, you can force use of a specific program number as well. The ''​Program''​ statement marks the start of a callable unit of code.  Programs in 10LC are normally referenced by symbolic name and are converted to numeric identifiers that the 9010A uses.  A Program'​s numeric identifier is automatically assigned by the compiler. ​ If necessary, you can force use of a specific program number as well.
  
-Programs can call other programs via the ''​Execute''​ statement, and up to 10 nested calls are supported.  ​+Programs can call other programs via the ''​Execute''​ statement, and up to 10 nested calls are supported.  ​Note that recursion is not supported at any call level.
  
 The syntax of the ''​Program''​ statement is: ''​Program <​name>;''​ or ''​Program <​name>​ <​number>;''​ The syntax of the ''​Program''​ statement is: ''​Program <​name>;''​ or ''​Program <​name>​ <​number>;''​
Line 30: Line 30:
 The ''​Execute''​ statement allows one program to call another as a //​subroutine//​. ​ When this happens, the state of Registers ''​0''​ through ''​7''​ are saved and later restored when the called program exits. ​ Any changes made to those registers by the called program are lost when the called program returns. ​ Those registers are also set to zero before the called program starts execution. ​ These registers are called **local registers**,​ because their values are local to the program being executed. The ''​Execute''​ statement allows one program to call another as a //​subroutine//​. ​ When this happens, the state of Registers ''​0''​ through ''​7''​ are saved and later restored when the called program exits. ​ Any changes made to those registers by the called program are lost when the called program returns. ​ Those registers are also set to zero before the called program starts execution. ​ These registers are called **local registers**,​ because their values are local to the program being executed.
  
-Registers ''​8''​ through ''​F''​ are not saved and restored - they are passed to the called program intact and any changes made to them by the called program remains intact when the called program returns. ​ This allows those registers ​registers to be used to pass information to and from other called programs. ​ These registers are called **global registers**,​ because their values are global to all programs being executed.+Registers ''​8''​ through ''​F''​ are not saved and restored - they are passed to the called program intact and any changes made to them by the called program remains intact when the called program returns. ​ This allows those registers to be used to pass information to and from other called programs. ​ These registers are called **global registers**,​ because their values are global to all programs being executed.
  
 The syntax of the ''​Execute''​ statement is: ''​Execute <​name>;''​ or ''​Execute <​number>;''​ The syntax of the ''​Execute''​ statement is: ''​Execute <​name>;''​ or ''​Execute <​number>;''​
Line 80: Line 80:
 | ''​+''​ | When the first character in the string, it causes the remaining string to be appended to any data currently being displayed | | ''​+''​ | When the first character in the string, it causes the remaining string to be appended to any data currently being displayed |
    
-To display a special character normally, double it.  The number of printable characters is limited to 32, which is the number of characters the 9010A'​s display can show without scrolling.+To display a special character normally, double it.  The number of printable characters is limited to 32, which is the number of characters the 9010A'​s display can show without scrolling.  A trailing space in the display string is handled correctly by 10LC - you do not have to manually place an underscore for a trailing space to work correctly, like you would need to with 9LC.
  
 This statement supports single character Register identifiers (''​0-9''​ and ''​A-F''​),​ proper Register names (e.g. ''​REG4''​),​ and register Aliases. ​ Support for register aliases is preliminary and although it works in my tests, there may be the occasional snag. This statement supports single character Register identifiers (''​0-9''​ and ''​A-F''​),​ proper Register names (e.g. ''​REG4''​),​ and register Aliases. ​ Support for register aliases is preliminary and although it works in my tests, there may be the occasional snag.
Line 98: Line 98:
 **Note:** The only catch is that //​currently//​ in 10LC a register identifier must terminated by a space or the end of the display string. ​ For example: **Note:** The only catch is that //​currently//​ in 10LC a register identifier must terminated by a space or the end of the display string. ​ For example:
 <code c> <code c>
-Display "RegA is $A@RegA"; ​   // This Will Not Work +Display "RegA is $A@RegA"; ​      ​// This Will Not Work 
-Display "RegA is $A @RegA"; ​  ​// This Will Work+Display "RegA is $ACurrently"; ​  // This Will Not Work 
 + 
 +Display "RegA is $A @RegA"; ​     // This Will Work 
 +Display "RegA is $A Currently";  ​// This Will Work
 </​code>​ </​code>​
 ==== Read ==== ==== Read ====
Line 161: Line 164:
  
 A warning will be emitted because the value 0x220 exceeds the maximum value of an 8-bit word. A warning will be emitted because the value 0x220 exceeds the maximum value of an 8-bit word.
 +
 +
 +==== WriteEx ====
 +The ''​WriteEx''​ allows you to set a starting place in memory followed by a list of values. ​ 10LC will automatically //unroll// this ''​WriteEx''​ statement into multiple ''​Write''​ statements, automatically incrementing the address as it goes.  Numeric values, Aliases and Registers can all be used.  ​
 +
 +The syntax of the ''​WriteEx''​ statement is: ''​WriteEx @ <​address>​ = <​value>,​ [<​Value>​...];''​.
 +
 +<code c>
 +WriteEx @ 0x1000 = 1 2 4 0x10 0x20 0x40 ThisIsAnAlias Reg4;
 +</​code>​
 +
 +The above code will compile into the equivalent of the following discrete ''​Write''​ statements:
 +
 +<code c>
 +Write @ 1000 = 1;
 +Write @ 1001 = 2;
 +Write @ 1002 = 4;
 +Write @ 1003 = 0x10;
 +Write @ 1004 = 0x20;
 +Write @ 1005 = 0x40;
 +Write @ 1006 = xx;     // xx Would Be Replaced With The Value Of ThisIsAnAlias
 +Write @ 1007 = Reg4;
 +</​code>​
 +
 +
 +
 ==== WriteCtrl ==== ==== WriteCtrl ====
 The ''​WriteCtrl''​ statement is used to set control lines to a specific value. ​ This is equivalent to the standard ''​WRITE CTL''​ statement in 9LC.  ​ The ''​WriteCtrl''​ statement is used to set control lines to a specific value. ​ This is equivalent to the standard ''​WRITE CTL''​ statement in 9LC.  ​
Line 224: Line 253:
  
 ==== LongRAMTest ==== ==== LongRAMTest ====
-The ''​LongRAMTest''​ statement is..+The ''​LongRAMTest''​ statement is used to perform a more extensive RAM test than the ''​ShortRAMTest''​ statement In addition to the same tests performed by ''​ShortRAMTest''​ it also performs pattern-sensitivity tests
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​RAM LONG''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​LongRAMTest''​ statement is: ''​LongRAMTest From <​start>​ To <end>;'' ​ The address range can be omitted if RAM areas are present in the address map.
  
 <code c> <code c>
-Template;+LongRAMTest;​ 
 +LongRAMTest From 0x1000 To 0x1400;
 </​code>​ </​code>​
  
  
 ==== ShortRAMTest ==== ==== ShortRAMTest ====
-The ''​ShortRAMTest''​ statement is..+The ''​ShortRAMTest''​ statement is used to perform basic RAM tests that can help identify hardware problems with RAM as well as uncover stuck bits and decoding errors
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​RAM SHORT''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​ShortRAMTest''​ statement is: ''​ShortRAMTestFrom <​start>​ To <end>;'' ​ The address range can be omitted if RAM areas are present in the address map.
  
 <code c> <code c>
-Template;+ShortRAMTest;​ 
 +ShortRAMTest From 0x0A00 To 0x1A00;
 </​code>​ </​code>​
  
  
 ==== ROMTest ==== ==== ROMTest ====
-The ''​ROMTest''​ statement is..+The ''​ROMTest''​ statement is used to confirm that a specified address range is readable and also calculates a signature value based on the data contained in that range It can also be used to compare the calculated checksum against a known value.
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​ROM TEST''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​ROMTest''​ statement is: ''​ROMTest From <​start>​ To <end> CSum <​checksum>​;'' ​ The address and range can be omitted if ROM areas are present in the address map.  The checksum can also be omitted to inhibit the checksum compare.
  
 <code c> <code c>
-Template;+ROMTest; 
 +ROMTest From 0x2000 To 0x2400 CSum 0xF1C3; 
 +ROMTest From 0x2000 To 0x2400;
 </​code>​ </​code>​
  
  
 ==== IOTest ==== ==== IOTest ====
-The ''​IOTest''​ statement is..+The ''​IOTest''​ statement is used to test read/write bits in I/O areas/​registers.
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​IO TEST''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​IOTest''​ statement is: ''​IOTestFrom <​start>​ To <end> Bits <​bitmask>​;'' ​ The address and range can be omitted if I/O areas are present in the address map.  ​
  
 <code c> <code c>
-Template;+IOTest; 
 +IOTest From 0x3000 To 0x3004 Bits 0x28;
 </​code>​ </​code>​
  
  
 ==== Ramp ==== ==== Ramp ====
-The ''​Ramp''​ statement ​is... +The ''​Ramp''​ statement ​performs a sequence of write operations at the specific location The first write is ''​0x00''​ (all bits set to zero) and successive writes are made after incrementing this value until all bits are set to one For example, on an 8-bit architecture,​ the range of values would be ''​0x00''​ to ''​0xFF''​.
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​RAMP''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​RAMP''​ statement is: ''​RAMP @ <​address>​;''​
  
 <code c> <code c>
-Template;+RAMP @ 0x4242;
 </​code>​ </​code>​
  
  
 ==== Walk ==== ==== Walk ====
-The ''​Walk''​ statement ​is... +The ''​Walk''​ statement ​performs a sequence of write operations at the specific location, but instead of incrementing a value, it rotates the bits of the value first write is the specified value and then the bits in the value are rotated once and the write is repeated This repeats until all bits have been rotated through all possible positions.
  
-This is equivalent to the ''​TEMP''​ statement in 9LC. +This is equivalent to the ''​WALK''​ statement in 9LC. 
  
-The syntax of the ''​Template''​ statement is: ''​Template;''​+The syntax of the ''​WALK''​ statement is: ''​WALK @ <​address>​ <​value>​;''​
  
 <code c> <code c>
-Template;+WALK @ 0x4242 0xA5;
 </​code>​ </​code>​
  
operational_statements.1582299076.txt.gz · Last modified: 2020/02/21 09:31 by jtwine