Interrupt system implemented, some new programs.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "Assm-util.h"
|
||||
|
||||
#define MAX_LABELS 256
|
||||
#define MAX_VECTORS 256
|
||||
|
||||
typedef struct {
|
||||
char* label;
|
||||
@@ -19,8 +20,28 @@ typedef struct {
|
||||
int type;
|
||||
} Label;
|
||||
|
||||
// One line of the Vector Segment, once it has been worked out.
|
||||
typedef struct {
|
||||
char* name; // What it was called, or NULL for a device, which is named by its port.
|
||||
uint8_t index; // Which vector in its table.
|
||||
uint16_t base; // Which table: software or hardware.
|
||||
uint16_t handler; // Where the handler ended up.
|
||||
} VectorEntry;
|
||||
|
||||
void freeLabelList();
|
||||
|
||||
void freeVectorList();
|
||||
|
||||
// Reads the Vector Segment: allocates a number to every named vector, works out which
|
||||
// vector each device line means, and resolves the handlers. Runs after the labels are
|
||||
// known, because a handler is named by its label.
|
||||
void populateVectorTable(intermediateElement *intermediateArray, int arraySize);
|
||||
|
||||
// Turns each vector name used as an operand of SWI into the number it was given.
|
||||
void fillInVectorReferences(intermediateElement *intermediateArray, int arraySize);
|
||||
|
||||
int vectorCount();
|
||||
|
||||
void populateLabelTable(intermediateElement *intermediateArray, int arraySize);
|
||||
|
||||
void fillInLabelAddresses(intermediateElement *intermediateArray, int arraySize);
|
||||
|
||||
Reference in New Issue
Block a user