root/test/unit/addcerrlist/cmd.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 #include <stdio.h>
   2 #include "cerr.h"
   3 
   4 CERR cerr_0[] = {
   5     { 126, "source file is not specified" },
   6 };
   7 
   8 CERR cerr_1[] = {
   9     { 101, "label already defined" },
  10     { 102, "label table is full" },
  11     { 103, "label not found" },
  12     { 104, "label length is too long" },
  13     { 105, "no command in the line" },
  14     { 106, "operand mismatch in assemble command" },
  15     { 107, "no label in START" },
  16     { 108, "not command of operand \"r\"" },
  17     { 109, "not command of operand \"r1,r2\"" },
  18     { 110, "not command of operand \"r,adr[,x]\"" },
  19     { 111, "not command of operand \"adr[,x]\"" },
  20     { 112, "not command of no operand" },
  21     { 113, "operand too many in COMET II command" },
  22     { 117, "operand too many in DC" },
  23     { 118, "operand length too long" },
  24     { 119, "out of COMET II memory" },
  25     { 120, "GR0 in operand x" },
  26     { 121, "cannot get operand token" },
  27     { 122, "cannot create hash table" },
  28     { 123, "unclosed quote" },
  29     { 124, "more than one character in literal" },
  30     { 125, "not GR in operand x" },
  31 };
  32 
  33 CERR cerr_2[] = {
  34     { 114, "not integer" },
  35     { 115, "not hex" },
  36     { 116, "out of hex range" },
  37 };
  38 
  39 CERR cerr_3[] = {
  40     { 114, "not integer" },
  41     { 115, "not hex" },
  42     { 116, "out of hex range" },
  43 };
  44 
  45 CERR cerr_4[] = {
  46     { 201, "Load object file - full of COMET II memory" },
  47 };
  48 
  49 CERR cerr_5[] = {
  50     { 202, "SVC input - out of Input memory" },
  51     { 203, "SVC output - out of COMET II memory" },
  52     { 204, "Program Register (PR) - out of COMET II memory" },
  53     { 205, "Stack Pointer (SP) - cannot allocate stack buffer" },
  54     { 206, "Address - out of COMET II memory" },
  55     { 207, "Stack Pointer (SP) - out of COMET II memory" },
  56 };
  57 
  58 int main(){
  59     CERRLIST *p;
  60     /* エラーの追加 */
  61     addcerrlist(ARRAYSIZE(cerr_0), cerr_0);
  62     addcerrlist(ARRAYSIZE(cerr_1), cerr_1);
  63     addcerrlist(ARRAYSIZE(cerr_2), cerr_2);
  64     addcerrlist(ARRAYSIZE(cerr_3), cerr_3);
  65     addcerrlist(ARRAYSIZE(cerr_4), cerr_4);
  66     addcerrlist(ARRAYSIZE(cerr_5), cerr_5);
  67     for(p = cerrlist; p != NULL; p = p->next) {
  68         printf("%d: %s\n", p->cerr->num, p->cerr->msg);
  69     }
  70     return 0;
  71 }

/* [<][>][^][v][top][bottom][index][help] */