EMULATOR_PDP_11
STEPIC Учебный проект на 'С', эмулятор PDP_11 в стиле ООП
Loading...
Searching...
No Matches
command_p.h File Reference
#include "types/types.h"
Include dependency graph for command_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  command_t
 

Functions

void command_do_halt (struct pdp_11_t *, address_word_t, word_t)
 
void command_do_add (struct pdp_11_t *, address_word_t, word_t)
 
void command_do_mov (struct pdp_11_t *, address_word_t, word_t)
 
void command_do_inc (struct pdp_11_t *, address_word_t, word_t)
 
void command_do_unknown (struct pdp_11_t *, address_word_t, word_t)
 

Variables

byte_t commands_list
 

Function Documentation

◆ command_do_add()

void command_do_add ( struct pdp_11_t pdp,
address_word_t  addr,
word_t  word_command 
)
92{
93 struct pdp_11_t *ptr_pdp = pdp;
94 if (ptr_pdp)
95 printf("\b");
96 print_command(addr, word_command, (byte_t *) "add");
97}
void print_command(address_word_t addr, word_t word_command, byte_t *name_command)
Definition command.c:51
Definition pdp_11_p.h:4
unsigned char byte_t
Definition types.h:6
Here is the call graph for this function:

◆ command_do_halt()

void command_do_halt ( struct pdp_11_t pdp,
address_word_t  addr,
word_t  word_command 
)
77{
78 pdp_11_t *ptr_pdp = (pdp_11_t *) pdp;
79 word_t * ptr_pc = ptr_pdp->PC;
80 *ptr_pc += 2;
81 print_command(addr, word_command, (byte_t *) "halt");
83 PRINT_RESULT("THE END!!!", "");
84
85 pdp_destroy(pdp);
86 free(pdp);
87 exit(0);
88}
void command_reg_dump(struct pdp_11_t *pdp)
Definition command.c:57
#define PRINT_RESULT(fmt,...)
Definition logger.h:34
void pdp_destroy(struct pdp_11_t *)
Освобождает ресурсы, связанные с экземпляром PDP-11.
Definition pdp_11.c:60
word_t * PC
Definition pdp_11_p.h:16
unsigned short int word_t
Definition types.h:7
Here is the call graph for this function:

◆ command_do_inc()

void command_do_inc ( struct pdp_11_t pdp,
address_word_t  addr,
word_t  word_command 
)
110{
111 struct pdp_11_t *ptr_pdp = pdp;
112 if (ptr_pdp)
113 printf("\b");
114 print_command(addr, word_command, (byte_t *) "inc");
115}
Here is the call graph for this function:

◆ command_do_mov()

void command_do_mov ( struct pdp_11_t pdp,
address_word_t  addr,
word_t  word_command 
)
101{
102 struct pdp_11_t *ptr_pdp = pdp;
103 if (ptr_pdp)
104 printf("\b");
105 print_command(addr, word_command, (byte_t *) "mov");
106}
Here is the call graph for this function:

◆ command_do_unknown()

void command_do_unknown ( struct pdp_11_t pdp,
address_word_t  addr,
word_t  word_command 
)
121{
122 struct pdp_11_t *ptr_pdp = pdp;
123 if (ptr_pdp)
124 printf("\b");
125 print_command(addr, word_command, (byte_t *) "unknown");
126}
Here is the call graph for this function:

Variable Documentation

◆ commands_list

byte_t commands_list
extern