- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
void branch(int *cnt, int accum, int nxt, int comn) {
printf("accum %d %d\n", accum, comn);
if (accum < 0 && comn == 41) {
*cnt = nxt;
} else if (accum == 0 && comn == 42) {
*cnt = nxt;
} else if (comn == 40) {
*cnt = nxt;
}
else {
(*cnt)++;
}
}
void dump(int word[]) {
int d = 0, x;
printf("%3c", ' ');
while (d != 10) {
printf("%5d ", d);
d++;
}
for (d = 0; d != MEM; d++) {
x = word[d];
if (0 == (d % 10))
puts(" "), printf("%3d", d);
printf(x >= 0 ? " +%.4X" : " %.4d", x);
}
puts(" ");
}
void dump_file(int word[]) {
int d = 0, x;
FILE *flrun;
flrun = fopen("wrt.txt", "w+");
fprintf(flrun, "%3c", ' ');
while (d != 10) {
fprintf(flrun, "%5d ", d);
d++;
}
for (d = 0; d != MEM; d++) {
x = word[d];
if (0 == (d % 10))
fprintf(flrun, "\n"), fprintf(flrun, "%3d", d);
fprintf(flrun, x >= 0 ? " +%.4X" : " %.4d", x);
}
}
long long_var(long var) {
long step = 1;
do {
step *= 10;
} while (var /= step);
return (step / 10);
}
KAPA6AXCKuu_nemyx 02.10.2023 21:50 # 0
guest6 02.10.2023 22:33 # 0
KAPA6AXCKuu_nemyx 03.10.2023 00:19 # 0
guest6 02.10.2023 22:33 # 0