EMULATOR_PDP_11
STEPIC Учебный проект на 'С', эмулятор PDP_11 в стиле ООП
Loading...
Searching...
No Matches
test_reg.c File Reference
#include "pdp_11/pdp_11.h"
#include "pdp_11/pdp_11_p.h"
#include "pdp_11/register/register_p.h"
#include "tests/test.h"
#include "tests/test_pdp/test_pdp.h"
#include "utils/logger/logger.h"
#include "utils/utils.h"
#include <assert.h>
#include <stdio.h>
Include dependency graph for test_reg.c:

Functions

int test_reg (struct pdp_11_t *pdp)
 

Function Documentation

◆ test_reg()

int test_reg ( struct pdp_11_t pdp)
14{
15 assert(pdp);
16 *(((pdp_11_t *) pdp)->R0) = 01000;
17 DEBUG("\n\n*(pdp->R0) = 1000;\n", "");
18 pdp_11_t *ptr_pdp = (pdp_11_t *) pdp;
19 reg_t * ptr_regist = (reg_t *) ptr_pdp->regist;
20 assert(*(ptr_pdp->R0) == ptr_regist->R0);
21 DEBUG("\n\npdp->regist->R0 = %o;\n\n", ptr_regist->R0);
22 DEBUG("\n\n(*(pdp->R0) == pdp->regist->R0)\n", "SUCCES");
23 INFO("\n\nTHE REGISTER TEST WAS SUCCESSFUL\n", "");
24 return 0;
25}
#define INFO(fmt,...)
Definition logger.h:37
#define DEBUG(fmt,...)
Definition logger.h:40
Definition pdp_11_p.h:4
struct reg_t * regist
Definition pdp_11_p.h:7
Definition register_p.h:2
Here is the caller graph for this function: