IBM Basic assembly language and successors: Difference between revisions

Content deleted Content added
Changed "BNO" to "BNE". "BNE" is the extended mnemonic for "branch not equal"
Line 3:
==General characteristics==
 
The architecture of IBM mainframes has taken many forms over the years, including System/360, System/370 XA, ESA/390, and [[z/Architecture]]. Each of these architectures has preservedretained [[compatibility]] with most of the features of its predecessor. "'''BAL'''" uses the native [[instruction set]] of these machines. It is thus as close to the hardware as a typical programmer is likely to get.
 
The instruction set consists of the low-level operations supported by the hardware, such as
* "loadLoad" ('''L''') - copy a value from memory to a register),
* "storeStore" ('''ST''') - copy a value from a register to memory),
* "compareCompare" ('''C''') - compare twoa values)register value with a value in memory,
* "shiftShift" ('''SLL,SRL''') - move the bits of a register left or right), and
* "executeExecute channelChannel programProgram" ('''EXCP''') - perform an I/O operation such as reading data from a disk or tape (usually by the Operating System).
The extreme simplicity of these operations means that a program written in Assembler will usually be much longer and harder to read than an equivalent program in, say, [[COBOL]] or [[Fortran]]. In the past, the speed of hand-coded Assembler programs was often felt to make up for this drawback, but with the advent of optimizing compilers, "'''[[C]]'''" for the mainframe, and other advances, Assembler has lost much of its appeal. IBM continues to upgrade the assemblerAssembler, however, and it is still used when the need for speed or very fine control is paramount.
 
==A small example==