mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-03 18:29:53 +00:00
27 lines
433 B
C
27 lines
433 B
C
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
|
|
||
|
char string[BUFSIZ];
|
||
|
int i;
|
||
|
|
||
|
while(1) {
|
||
|
fgets(string,BUFSIZ,stdin);
|
||
|
if (feof(stdin)) goto done;
|
||
|
|
||
|
printf(";# %s\n",string);
|
||
|
printf(".byte\t");
|
||
|
|
||
|
printf("$%X",string[0]+128);
|
||
|
|
||
|
for (i=1;i<strlen(string);i++) {
|
||
|
printf(",$%X",string[i]+128);
|
||
|
}
|
||
|
printf("\n");
|
||
|
|
||
|
}
|
||
|
done:
|
||
|
return 0;
|
||
|
}
|