Скачиваний:
12
Добавлен:
01.05.2014
Размер:
1.52 Кб
Скачать
// Compiler Runtime Library and Program Actual Entry Code
// Contains low-level input\output operations for being used in assembler code



extern "C" 
{


#include <stdio.h>
#include <string.h>



// Entry code concept. The feature is that actual entry code is located here (main function), but it
// transfer control immediately to assembler (asmentry function)


extern void asmentry();


void main()
{
	asmentry();
}



// Reading operations. Nothing specific here, functions recieve pointer parameter, which will contain
// input value, no value is returned by function itself


void read_char( char *Dest )
{
    scanf("%c", Dest);
}

void read_int( int* Dest )
{
	scanf("%d",Dest);
}

void read_str( char* Dest )
{
	gets(Dest);
}

void read_flt( float* Dest)
{
	scanf("%f",Dest);
}


// Writing operations. Parameter contains a value to be outputed to screen, strings are outputed through
// pointer to first symbol. No return value is expected yet...

void write_char(char Value)
{
    printf("%c", Value);
}

void write_int(int Value)
{
	printf("%i", Value);
}

void write_flt(float Value)
{
	printf("%g", Value);    // print without trailing zeroes
}

void write_str(char* Val)
{
	printf("%s",Val);
}

void write_ln()
{
	printf("\n");
}


// String operations -------------------

// Copying str to dest
void copy_str(char *dest, char *str)
{
    strcpy(dest, str);
}

// Appends str to dest
void concat_str(char *str1, char *str2, char *dest)
{
    strcpy(dest, str1);
    strcat(dest, str2);
}

} // extern "C"
Соседние файлы в папке Bin
  • #
    01.05.2014387 б11ARITHM.OBJ
  • #
    01.05.2014603 б11CONDIT.OBJ
  • #
    01.05.2014986 б11LOGIC.OBJ
  • #
    01.05.20141.52 Кб12RunTime.cpp
  • #
    01.05.20141.01 Кб11RUNTIME.OBJ
  • #
    01.05.2014875 б11STACK.OBJ
  • #
    01.05.2014401 б11TEST.OBJ
  • #
    01.05.2014372 б11UNTITLED.OBJ
  • #
    01.05.2014445 б11_MY_TEST.OBJ