LMS 2012
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
bytecodeassembler.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include "
lmstypes.h
"
3
#include "
bytecodes.h
"
4
5
#include "prg.c"
6
7
int
main
(
void
)
8
{
9
FILE *pFile;
10
ULONG
FileSize;
11
ULONG
*pFileSize;
12
char
PrgNameBuf[255];
13
char
PrgNamePath[255];
14
getcwd(PrgNamePath,250);
15
16
snprintf
(PrgNameBuf,255,
"prg.rbf"
);
17
pFile = fopen (PrgNameBuf,
"wb"
);
18
if
(pFile !=
NULL
)
19
{
20
FileSize =
sizeof
(
prg
);
21
#ifndef OLD_HEADER
22
pFileSize = (
ULONG
*)&
prg
[4];
23
*pFileSize = FileSize;
24
#endif
25
fwrite (
prg
,1,FileSize,pFile);
26
fclose (pFile);
27
printf(
"%d bytes\r\n"
,FileSize);
28
}
29
else
30
{
31
printf(
"\r\nImage file not created !!!!!\r\n"
);
32
}
33
34
return
(0);
35
}
snprintf
#define snprintf
Definition:
c_input.c:141
prg
UBYTE prg[]
Definition:
p0.c:1
bytecodes.h
ULONG
unsigned int ULONG
Basic Type used to symbolise 32 bit unsigned values.
Definition:
lmstypes.h:31
lmstypes.h
main
int main(void)
Definition:
bytecodeassembler.c:7
NULL
#define NULL
Definition:
pru_can_emulation_api.h:37
ev3sources-master-2
lms2012
lmssrc
adk
lmststasm
bytecodeassembler.c
Generated on Tue Jul 29 2014 19:20:28 for LMS 2012 by
1.8.7