OSDK C and the scanf() function
Posted: Sat Jul 21, 2018 12:22 pm
Hello,
I'm quickly testing C programming in OSDK 1.11 and want to use the scanf() function.
Has anyone tried it before ?
I'm testing the following :
However, at the moment I get the following answer from the linker :
I'm quickly testing C programming in OSDK 1.11 and want to use the scanf() function.
Has anyone tried it before ?
I'm testing the following :
Code: Select all
//
// Using the Scanf() ANSI-C function
//
#include <stdio.h>
void main()
{
char my_str[256];
printf("What is your name ?\n");
scanf("%s", my_str);
printf("Hello %s!\n", my_str);
}
Dear Oric fellows, any idea of what I'm doing wrong? (attached is my C tiny program)Building the program HWSIMPLE at adress $800
Compiling MAIN.C
- preprocess
- compile
- convert C to assembly code
- cleanup output
Linking
D:\apps\dev\osdk\sample\c\scanf
Assembling
ldx #262
D:\apps\dev\osdk\sample\c\scanf\MAIN.s(3): 08bd:Overflow error
scanbuf reserve 256
D:\apps\dev\osdk\sample\c\scanf\scanf.s(8): 090d:Syntax error
fieldcount db 0
D:\apps\dev\osdk\sample\c\scanf\sscanf.s(53): 0973:Syntax error
numberscan dw 0
D:\apps\dev\osdk\sample\c\scanf\sscanf.s(166): 0a42:Syntax error
signscan db 0
D:\apps\dev\osdk\sample\c\scanf\sscanf.s(167): 0a42:Label defined error
Break after 5 errors
ERROR : Build failed.
Press any key to continue . . .