njvm/SDA.c
Elias Bennour 88271c91ca fix prog1.bin not working
add debug parameter
add nja-mac
2023-12-04 01:20:41 +01:00

28 lines
404 B
C

//
// Created by Nils on 03.12.2023
//
#ifndef SDA
#define SDA
#include <stdio.h>
struct sda {
int *size;
unsigned int *sda;
};
unsigned int getSDA(int i, struct sda s) {
return s.sda[i];
}
void setSDA(int point, int val, struct sda s) {
s.sda[point] = val;
}
void printSDA(struct sda s) {
for (int i = 0; i < *s.size; i++) {
printf("%i\n", getSDA(i, s));
}
}
#endif