Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //please forgive me... :(
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #define MAX_LEN 6 //maximum instruction length is 6 characters: jmp, jpi, jpz, jpc, jps, stm, ldm
- #define MED_LEN 5 //medium length: mov r, clr r
- #define MIN_LEN 3 //minimum length: nop, add, sub, and, or, not, xor
- int main()
- {
- FILE *file = fopen("input.asm","rb");
- char str_buf[MIN_LEN + 1];
- fgets(str_buf, MIN_LEN + 1, file);
- printf("%s\n", str_buf);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement