gipu/vm/vmas.h

22 lines
494 B
C
Raw Normal View History

2017-05-14 13:07:24 +01:00
#ifndef VMAS_H
#define VMAS_H
2017-05-14 21:10:58 +01:00
#include <stdint.h>
#define DEFAULT_STACKSIZE 0x100
#define DEFAULT_CODESIZE 0x300
#define DEFAULT_DATASIZE 0x100
2017-05-14 13:07:24 +01:00
class VMAddrSpace {
2017-05-14 21:10:58 +01:00
private:
uint32_t stacksize, codesize, datasize;
2017-05-14 13:07:24 +01:00
public:
2017-05-14 21:10:58 +01:00
VMAddrSpace();
VMAddrSpace(uint32_t ss, uint32_t cs, uint32_t ds);
uint8_t *stack, *code, *data;
bool allocate(void);
bool insStack(uint8_t *buf, uint8_t size);
bool insCode(uint8_t *buf, uint8_t size);
bool insData(uint8_t *buf, uint8_t size);
2017-05-14 13:07:24 +01:00
};
#endif