setcerr(106, ""); /* operand count mismatch */
return;
}
- if(!*(cmdl->label)) {
+ if(!cmdl->label[0]) {
setcerr(107, ""); /* no label in START */
return;
}
{
int i;
void (*cmdptr)();
- for(i = 0; *(cmdtbl[i].name); i++) {
+ for(i = 0; cmdtbl[i].name[0]; i++) {
if(strcmp(cmdl->cmd, cmdtbl[i].name) == 0) {
cmdptr = cmdtbl[i].ptr;
(*cmdptr)(cmdl, pass);
bool assembletok(const CMDLINE *cmdl, PASS pass)
{
/* 命令がない場合 */
- if(!*(cmdl->cmd)) {
+ if(!cmdl->cmd[0]) {
return true;
}
/* アセンブラ命令またはマクロ命令の書込 */
stat = (cerr->num == 0) ? true : false;
if(cmdl != NULL) {
if(stat == true) {
- if(pass == FIRST && *(cmdl->label)) {
+ if(pass == FIRST && cmdl->label[0]) {
stat = addlabel(asptr->prog, cmdl->label, asptr->ptr);
}
}
setcerr(208, ""); /* SVC input - memory overflow */
break;
}
- sys->memory[sys->cpu->gr[1]+i] = *(buf + i);
+ sys->memory[sys->cpu->gr[1] + i] = buf[i];
}
sys->memory[sys->cpu->gr[2]] = i + 1;
FREE(buf);
}
qsort(l, s, sizeof(*l), compare_adr);
for(i = 0; i < s; i++) {
- if(*(l[i]->prog)) {
+ if(l[i]->prog[0]) {
fprintf(stdout, "%s.", l[i]->prog);
}
fprintf(stdout, "%s ---> #%04X\n", l[i]->label, l[i]->adr);