Sei sulla pagina 1di 4

c   

    



            
!      "    
# !     $ %         &
$ !     ' %     &
' !     c
( !     
) !     
* !     #
+ !     $
c !     '
 !     (
 !     )
# !     *
$ !     +
' !     c
( !     
) !      
‘

The 360 architecture is a 32-bit machine, in which the standard word size is 32 bits.

The 360 architecture has:-

16 general purpose 32-bit registers, 0 to 15 (usually Equated to the labels "R0" through
"R15")
4 floating point 64-bit registers numbered 0, 2, 4 and 6, and
a 64-bit Program Status Word (PSW). The program status word is composed of the privileged
bit, the program counter, and the memory protection key.

The privileged bit indicates the state of the program that is currently executing.

There are two states, problem and supervisor.

?   is where all user software operates. Problem state applications have
restrictions including memory read and write restrictions, and cannot directly issue I/O
instructions.

    is reserved for the operating system and any of its components.

The memory protection key is 4 bits and determines which memory areas
the particular program has access to. Pages of the computer's memory are
marked with certain protection keys, and only a program running with the
same key (or key of zero) may write to a particular section of memory.
-ertain registers on the 360 are "reserved" either by hardware
requirements, or by convention.

º  is generally used in a number of instructions as a placeholder


to indicate a lack of action. Many (non-ºº) instructions treat use of register
0 as having no value (equivalent to low storage - address X'00000000' in
memory - which is usually protected unless operating in supervisor state.)

º  is, by convention, used to point to the list of arguments (32 bit
addresses) passed to a called subroutine, and for passing arguments for
operating system calls (SV-'s). It is also used by the Translate and Test
instruction TRT specifically.

º  may be used by some instructions for additional parameters or


return values.

º  is, by convention, used to point to a save area for storing the
passed registers by a called subroutine. It is the logical equivalent of a
"stack pointer" on processors that have a stack.

º  is, by convention, used to provide the address for a called
subroutine to return to the caller.

º  is, by convention, used to provide the entry point address of a
called subroutine and to provide the initial base register for the subroutine.
The subroutine may continue to use register 15 as its base register if it is
short (and doesn't itself call a lower level subroutine) or, more typically, it
will save this register (and others) immediately in the provided save area
and use a different register (or set of registers) for the base. Also, register
15 may be used by some operating systems to provide some arguments
for SV-'s. Its use for this purpose bears some similarity to the Program
-ounter register on some mini and microcomputers. Register 15, by
convention, is also frequently used as a return value from called
subroutines, often set to an index value (0,4,8,12 etc), suitable for direct
use in a branch table immediately after return.
‘

‘
  ‘ ‘‘‘‘ 
‘ 
‘ ‘ 
‘ 
‘

‘‘‘

‘‘‘  !"‘

‘‘‘#‘$%&'())‘

‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ *‘‘+'(),(‘

‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ #‘‘-,'(,,(‘

 ‘‘ .‘
‘
‘/
‘
‘
‘‘  ‘01‘/ ‘'(),(‘ ‘'()2(‘ ‘
/‘‘ 
‘ 
‘ 3‘  ‘
‘ ‘ 
‘ 

‘ ‘ (‘.‘4 ‘ ‘
‘ 3‘.3‘
‘‘ 

‘ ‘ /‘

‘‘‘ ‘ ‘‘‘ 
‘ 
‘ 
‘  ‘ ‘ 55‘


13‘/ ‘
‘‘ 
‘ ‘ 1  ‘   5‘

‘-‘

‘‘#‘‘$%&'(,,(‘

‘‘‘‘‘‘‘‘‘‘‘‘‘ *‘‘‘+‘0(6,(‘

‘‘‘‘‘‘‘‘‘‘‘‘‘ #‘‘0(//(‘

 ‘
‘ ‘‘‘


 ‘  
‘77‘

-8 ‘ ‘/ ‘  
‘1 
‘‘

-9‘:‘/ ‘  
‘‘  ‘ /‘‘ ‘ ‘  ‘‘

-6 ‘/ ‘  
‘‘ ‘  ‘

-% / ‘  
‘‘ ‘ ‘‘

/ ‘ 3‘1
‘. ‘
‘‘‘
‘ ‘.‘‘/ ‘ 

‘  ‘ /‘ 0‘ /‘1  ‘
 ‘‘‘
‘ ‘ 3‘
‘ ‘ 
‘  ‘ /‘‘

, ‘
‘ ‘ ‘ ‘ ‘. ‘
‘ ‘ ‘

‘// ‘ ‘ ‘  ‘
‘ ‘

   ‘;1
‘< ‘ ‘ ‘ .‘  ‘
‘ ‘‘

-5  ‘ ‘‘
‘ /‘ 
‘1  ‘ 
‘‘1  ‘ ‘  55
‘  ‘ ‘
=
‘ 
‘ ‘‘ ‘ 
‘1  ‘ ‘  ‘  ‘
‘-9‘‘
"‘‘-6‘-$>?-9@‘
$5 ‘ ‘1  ‘ 
.
3‘

‘‘‘‘‘‘‘-$, 
‘
‘
‘ ‘‘  ‘ /‘ 0‘

‘
 ‘-$‘
‘‘

!
‘A-$‘
‘
‘
‘
FILEASM -SE-T
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SAVE+4
LA 13,SAVE
OPEN (IND-B,(INPUT))
OPEN (OUTD-B,(OUTPUT))
IOLOOP MV- INAREA,=80-' '
GET IND-B,INAREA
MVI OUT-ARR,-' '
MV- OUTLINE(80),INAREA
PUT OUTD-B,OUTAREA
B IOLOOP
FINISH -LOSE (IND-B)
-LOSE (OUTD-B)
EXIT L 13,SAVE+4
LM 14,12,12(13)
XR 15,15
BR 14
IND-B D-B DSORG=PS,MA-RF=(GM),DDNAME=SYSIN,EODAD=FINISH,
X
RE-FM=FB,LRE-L=80,BLKSIZE=0
OUTD-B D-B DSORG=PS,MA-RF=(PM),DDNAME=OUTPUT,
X
RE-FM=FBA,LRE-L=133,BLKSIZE=0
INAREA DS -L80
OUTAREA DS 0-L133
OUT-ARR D- -L1' '
OUTLINE D- -L132' '
SAVE DS 18F
END ‘

‘‘‘‘‘‘‘‘‘‘‘‘‘

Potrebbero piacerti anche