Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Enabled Disabled Count Manipulation

IP.com Disclosure Number: IPCOM000073421D
Original Publication Date: 1970-Dec-01
Included in the Prior Art Database: 2005-Feb-22
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Siegel, JJ: AUTHOR

Abstract

Manipulation of the same counter by both Enabled and Disabled code presents problems in communication. The normal technique to add a unit to or to subtract it from a one-byte counter is: Add IC REG,COUNTER Subtract IC REG,COUNTER LA REG,1(REG) BCTR REG,0 STC REG,COUNTER STC REG,COUNTER.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Enabled Disabled Count Manipulation

Manipulation of the same counter by both Enabled and Disabled code presents problems in communication. The normal technique to add a unit to or to subtract it from a one-byte counter is: Add IC REG,COUNTER Subtract IC REG,COUNTER LA REG,1(REG) BCTR REG,0 STC REG,COUNTER STC REG,COUNTER.

If Enabled Code is in the process of using this technique for updating the counter and an interrupt occurs causing Disabled Code to update the same counter, flags must be used to communicate to the Disabled Code that Enabled Code was attempting to update.

If the Enabled Routine uses a Translate Instruction to Change the Counter, the communication requirement by flags is removed.

The Translate instruction can be used to increment or decrement the counter by altering the reference to the Translate Table.

Given a Table: TBL DC X'00-01-02-03----09-0A----0F' and given that the
counter will never exceed X'0F' or go negative. To add one to the counter: TR Counter (1), TBL+1 To add two TR Counter (1), TBL+2 To subtract one TR Counter(1), TBL-1.

This technique is usable for a one-byte counter that can vary in count over any interval in the range from 0 - 255 (X'00' to X'FF') by providing a table covering the full range of the numbers to which the counter is restricted.

1