ajout des types + union pour compil

This commit is contained in:
2021-12-16 22:42:33 +01:00
parent b475bc7636
commit b166386724
3 changed files with 46 additions and 10 deletions

29
lfo.c Normal file
View File

@@ -0,0 +1,29 @@
#include<stdio.h>
#include<stdlib.h>
#include<time.h> /* Utilisé pour obtenir une adresse de démarrage aléatoire */
union mars_instruction {
long long instruction;
struct
{
unsigned char codeop;
unsigned char modea;
unsigned char modeb;
unsigned char align;
short int arga;
short int argb;
} mars;
};
int main(int argc, char* argv[]){
union mars_instruction toto;
toto.mars.codeop = 2;
toto.mars.arga = 2;
toto.mars.argb = 8;
printf("%llx\n", toto.instruction);
}