Write a C program consisting of the following functions to create a library. You
ID: 3560347 • Letter: W
Question
Write a C program consisting of the following functions to create a library. You cannot use any standard library function. You have to use in-line assembly language program of x86 along with int $128 (software interrupt) for GCC assembler.
The header file myl.h is as follows:
#ifndef _MYL_H
#define _MYL_H
#define ERR 1
#define OK 0
int prints(char *);
int printi(int);
int readi(int *eP); // *eP is for error, if the input is not an integer
int readf(float *); // return value is error or OK
int printf(float);
int prints(char *);
#endif
Explanation / Answer
WriteMyString.c:
header.h: