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

Assembler Debugger Evaluates Boolean Expressions to be True or False

IP.com Disclosure Number: IPCOM000014921D
Original Publication Date: 2001-Nov-08
Included in the Prior Art Database: 2003-Jun-20
Document File: 3 page(s) / 68K

Publishing Venue

IBM

Abstract

Assembler Debugger Evaluates Boolean Expressions to be True or False Invention Disclosure Overview: The invention adds to the TPF Assembler Debugger for Visual Age Client the capability to evaluate to a TRUE or FALSE condition, a plurality of assembler expressions which additionally include Boolean operators, comparison operators and parentheses. Such expression will be referred to as Boolean expressions in this document. Boolean and comparison operators supported in Boolean expressions are: Operator Operation

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

Page 1 of 3

Assembler Debugger Evaluates Boolean Expressions to be True or False Invention Disclosure Overview:

    The invention adds to the TPF Assembler Debugger for Visual Age Client the capability to evaluate to a TRUE or FALSE condition, a plurality of assembler expressions which additionally include Boolean operators, comparison operators and parentheses. Such expression will be referred to as Boolean expressions in this document.

Boolean and comparison operators supported in Boolean expressions are:

Operator Operation

&& and || or
< lessthan > greaterthan == equal
!= not equal

Examples of Boolean expressions are:

R2==10 R2!=10 (R2&&R3)||(R4>R5) R2<10 SYMBOL+10(R1,R2)>SYMBOL(R1,R2)

The advantage the invention offers is the ability to set breakpoints in an assembler debugger conditionally upon multiple assembler expressions. For example, the assembler debugger now has the capability set a breakpoint on an assembler instruction and have processing stop on that instruction only if the contents of a register are equal to a specific number. Consider the following assembler code excerpt:

      LA R1,10 LOOP DS 0H LR R2,R1

BCT R1,LOOP

SR R2,R2

In the excerpt above, a line breakpoint with the Boolean expression R2==4 could be set on the instruction LR R2,R1. Thus execution would stop only when the contents of R2 are 4. Or a line breakpoint with the Boolean expression (R2>0)&&(R2<5) could be used also. It this case, execution would stop when the contents of R2 are 4, 3, 2 or 1.

Invention Disclosure details:

The invention solves the problem by a software method of creating a purely arithmetic postfix form queue representation of a singular assembler expression or plurality of assembler expressions and Boolean and/or comparison operators. The postfix form queue expression can then be evaluated to a value in the case of a singular assembler expression or be evaluated to be true or false in the case of a Boolean expression. The advantage of the invention is that it creates a simple mathematical representation of a complex non-mathematical expression which facilitates straight-forward evaluation.

The invention uses UNIX utilities Lex and Yacc to perform a lexical analysis and grammatical analysis of an expression string, identifying valid assembler expressions and Boolean and comparison operators and

1

Page 2 of 3

parentheses. Upon a successful analysis, it then converts all non-arithmetic assembler expressions to infix arithmetic form. It does this by converting the left parentheses representing the boundary between the displacement and base to a plus operator. And by converting the comma between the index and base registers to a plus operator where appropriate. Unary operators and explicit length in assembler expressions are handled also. Examples follow. It then converts the infix arithmetic form Boolean expression to a postfix form queue to facilitate easy evaluation.

The Job of Lex:

The job of the lexer is to locate and validate tokens in a string and add...