ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Referência de fonte: SRC/CAT.CC

Referência de fonte: SRC/CAT.CC

Registro determinístico da fonte. O conteúdo completo do arquivo é reproduzido abaixo; esta página não substitui a interpretação arquitetural dos capítulos autorais.

Identidade do arquivo

Campo Valor
Path SRC/CAT.CC
Lines 46
Bytes 655
SHA-256 47c39e202a48af5d1a58f3305f8126a2233336d5351d6c714866b33302736f68
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Dependências sintáticas detectadas

Linha Include
1 LIB/STR.H
2 LIB/STR.CC

Símbolos detectados

Linha Símbolo
4 main

Fonte completa

O bloco seguinte é o arquivo textual integral na revisão indicada. Não há elisão, abreviação ou paráfrase.

#include "LIB/STR.H"
#include "LIB/STR.CC"

void main() {
  char buf[128];
  int fd;
  int n;
  int i;
  int c;
  int len;
  viewport(320, 200);
  fd = fopen("SRC/HELLO.TXT");
  if (fd < 0) {
    clear(4);
    while (1) {
      if (key(1)) {
        return;
      }
      wait(1);
    }
  }
  n = fread(fd, buf, 127);
  fclose(fd);
  if (n < 0) {
    n = 0;
  }
  if (n > 127) {
    n = 127;
  }
  storeb(buf + n, 0);
  len = strlen(buf);
  while (1) {
    if (key(1)) {
      return;
    }
    clear(1);
    i = 0;
    while (i < len) {
      c = loadb(buf + i);
      rect(8 + i * 2, 70, 2, 10 + (c % 16), 14);
      i = i + 1;
    }
    wait(1);
  }
}

Papel deste registro

O atlas garante rastreabilidade arquivo-a-arquivo. Responsabilidade, invariantes, ownership, concorrência, segurança, desempenho e interação entre subsistemas pertencem aos capítulos autorais e devem citar este arquivo quando aplicável.

Registro do documento ID: source-47c39e202a48af5d Reviewed source: da3df29cb397 Class: generated-source-reference