projects
/
YACASL2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
READMEのCASL II仕様書へのリンクを修正
[YACASL2.git]
/
n2word
/
getint.c
1
#include <stdio.h>
2
#include "casl2.h"
3
#include "assemble.h"
4
5
int main(){
6
int i;
7
WORD r;
8
char *str[] = {
9
"0", "01", "1a", "-5G", "123", "32767", "32768", "32769",
10
"-1", "-2345", "-32768", "-32769", "-32770"
11
};
12
for(i = 0; i < sizeof(str)/sizeof(str[0]); i++) {
13
r = n2word(str[i]);
14
printf("%s\t0x%04x", str[i], r);
15
if(cerrno > 0) {
16
printf("\tError - %d\t%s", cerrno, cerrmsg);
17
freecerr();
18
}
19
printf("\n");
20
}
21
return 0;
22
}