B
    ฐใณaฒ  ใ               @   sB  G d d dZ G dd de ZG dd de ZG dd de ZG dd	 d	e ZG d
d de ZG dd de ZG dd de ZG dd de ZG dd de Z	G dd de Z
G dd de ZG dd de ZG dd de ZG dd de ZG dd de ZG d d! d!e ZG d"d# d#e ZG d$d% d%e ZG d&d' d'e ZG d(d) d)e ZG d*d+ d+e ZG d,d- d-e ZG d.d/ d/e ZG d0d1 d1e ZG d2d3 d3e ZG d4d5 d5e ZG d6d7 d7e ZG d8d9 d9e ZG d:d; d;e ZG d<d= d=e ZG d>d? d?e ZG d@dA dAe Z G dBdC dCe Z!G dDdE dEe Z"G dFdG dGe Z#dHS )Ic               @   s`   e Zd ZdZdd Zedd Zedd Zedd Zed	d
 Zdd Z	dd Z
dd ZdS )ฺInstructionzRepresents an URCL instruction.c             G   s   t || _d S )N)ฺlistฺOperands)ฺselfZoperandsฉ r   ๚U/mnt/chromeos/GoogleDrive/MyDrive/Programming/Python/URCL/URCL-Toolkit/instruction.pyฺ__init__   s    zInstruction.__init__c             C   s
   | j d S )N้    )r   )r   r   r   r   ฺOperandA   s    zInstruction.OperandAc             C   s
   | j d S )Nr   )r   )r   r   r   r   ฺOperandB
   s    zInstruction.OperandBc             C   s
   | j d S )N้   )r   )r   r   r   r   r
      s    c             C   s
   | j d S )N้   )r   )r   r   r   r   ฺOperandC   s    zInstruction.OperandCc             C   s
   t | jS )z/Get the number of operands in this instruction.)ฺlenr   )r   r   r   r   ฺGetOperandCount   s    zInstruction.GetOperandCountc             C   s   | j S )z/Get a list of the operands in this instruction.)r   )r   r   r   r   ฺGetOperands   s    zInstruction.GetOperandsc             C   s$   | j  dt ddd | jD ก S )z$Convert the instruction to a string.๚ c             S   s   g | ]}t |qS r   )ฺstr)ฺ.0Zoperandr   r   r   ๚
<listcomp>   s    z'Instruction.__str__.<locals>.<listcomp>)ฺ	Operationr   ฺjoinr   )r   r   r   r   ฺ__str__   s    zInstruction.__str__N)ฺ__name__ฺ
__module__ฺ__qualname__ฺ__doc__r   ฺpropertyr	   r
   r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd Zd ZdS )ฺNOPN)r   r   r   r   r   r   r   r   r      s    r   c               @   s   e Zd Zd ZdZdS )ฺHLTz	stops sttN)r   r   r   r   r   r   r   r   r   r       s   r   c               @   s   e Zd Zd ZdS )ฺBRKN)r   r   r   r   r   r   r   r   r   #   s    r   c               @   s   e Zd Zd ZdS )ฺADDN)r   r   r   r   r   r   r   r   r    %   s    r    c               @   s   e Zd Zd ZdS )ฺSUBN)r   r   r   r   r   r   r   r   r!   &   s    r!   c               @   s   e Zd Zd ZdS )ฺINCN)r   r   r   r   r   r   r   r   r"   '   s    r"   c               @   s   e Zd Zd ZdS )ฺDECN)r   r   r   r   r   r   r   r   r#   (   s    r#   c               @   s   e Zd Zd ZdS )ฺMLTN)r   r   r   r   r   r   r   r   r$   )   s    r$   c               @   s   e Zd Zd ZdS )ฺDIVN)r   r   r   r   r   r   r   r   r%   *   s    r%   c               @   s   e Zd Zd ZdS )ฺMODN)r   r   r   r   r   r   r   r   r&   +   s    r&   c               @   s   e Zd Zd ZdS )ฺORN)r   r   r   r   r   r   r   r   r'   ,   s    r'   c               @   s   e Zd Zd ZdS )ฺANDN)r   r   r   r   r   r   r   r   r(   -   s    r(   c               @   s   e Zd Zd ZdS )ฺXORN)r   r   r   r   r   r   r   r   r)   .   s    r)   c               @   s   e Zd Zd ZdS )ฺNOTN)r   r   r   r   r   r   r   r   r*   /   s    r*   c               @   s   e Zd Zd ZdS )ฺLSHN)r   r   r   r   r   r   r   r   r+   0   s    r+   c               @   s   e Zd Zd ZdS )ฺRSHN)r   r   r   r   r   r   r   r   r,   1   s    r,   c               @   s   e Zd ZdZdS )ฺBSLZRSLN)r   r   r   r   r   r   r   r   r-   2   s    r-   c               @   s   e Zd Zd ZdS )ฺBSRN)r   r   r   r   r   r   r   r   r.   3   s    r.   c               @   s   e Zd Zd ZdS )ฺMOVN)r   r   r   r   r   r   r   r   r/   5   s    r/   c               @   s   e Zd Zd ZdS )ฺIMMN)r   r   r   r   r   r   r   r   r0   6   s    r0   c               @   s   e Zd Zd ZdS )ฺLODN)r   r   r   r   r   r   r   r   r1   7   s    r1   c               @   s   e Zd Zd ZdS )ฺSTRN)r   r   r   r   r   r   r   r   r2   8   s    r2   c               @   s   e Zd Zd ZdS )ฺCPYN)r   r   r   r   r   r   r   r   r3   9   s    r3   c               @   s   e Zd Zd ZdS )ฺPSHN)r   r   r   r   r   r   r   r   r4   ;   s    r4   c               @   s   e Zd Zd ZdS )ฺPOPN)r   r   r   r   r   r   r   r   r5   <   s    r5   c               @   s   e Zd Zd ZdS )ฺCALN)r   r   r   r   r   r   r   r   r6   =   s    r6   c               @   s   e Zd Zd ZdS )ฺRETN)r   r   r   r   r   r   r   r   r7   >   s    r7   c               @   s   e Zd Zd ZdS )ฺJMPN)r   r   r   r   r   r   r   r   r8   @   s    r8   c               @   s   e Zd Zd ZdS )ฺBRZN)r   r   r   r   r   r   r   r   r9   A   s    r9   c               @   s   e Zd Zd ZdS )ฺBNZN)r   r   r   r   r   r   r   r   r:   B   s    r:   c               @   s   e Zd Zd ZdS )ฺBREN)r   r   r   r   r   r   r   r   r;   C   s    r;   c               @   s   e Zd Zd ZdS )ฺBNEN)r   r   r   r   r   r   r   r   r<   D   s    r<   c               @   s   e Zd Zd ZdS )ฺBRLN)r   r   r   r   r   r   r   r   r=   E   s    r=   c               @   s   e Zd Zd ZdS )ฺBLEN)r   r   r   r   r   r   r   r   r>   F   s    r>   c               @   s   e Zd Zd ZdS )ฺBRGN)r   r   r   r   r   r   r   r   r?   G   s    r?   N)$r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r   r   r   r   ฺ<module>   sF   