I need to code a program that takes input from a given register (sending bytes) to a printer and the first sentence has to be the student name in uppercase which I tried with toupper() by converting the register to a given variable (char ch;), though the given result was not met.
The next one is for the faculty number (it says in "condensed" font? Not sure what that is supposed to mean, please correct me if I'm wrong but I take it as it's supposed to be all lowercase?)
Finally, the last given sentence should print the date on the screen as well but unfortunately it doesn't say whether it should take the system date or whatever. (I've done it using printf and written the current date)
Here is the code I've written so far: (the toupper() function does not work)
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <bios.h>
#include <string.h>
#include <ctype.h>
void main()
{
int i; char ch; char row[1000];
union REGS r;
clrscr();
memset(row,0,sizeof(row));
r.h.ah=0; // function 0h
int86(0x16,&r,&r);
for(i=0; i<1;i++)
{
ch = row[i];
printf("student name", toupper(ch));
ch = r.h.al;
r.h.ah=0;
int86(0x17,&r,&r);
r.x.dx=0;
printf("\n");
printf("16630960",row[i]);
row[i]=r.h.al;
r.h.ah=0;
int86(0x17,&r,&r);
r.x.dx=0;
printf("\n");
printf("10-04-2022",row[i]);
row[i]=r.h.al;
r.h.ah=0;
int86(0x17,&r,&r);
r.x.dx=0;
}
r.h.ah=0;
r.h.al=0x0A;
r.x.dx=0;
int86(0x17,&r,&r);
getch();
delay(100);
}