Well, yeah... if you just say "mov [0x8000fa80], 40", Nasm will complain "operation size not specified". We'd need to say "mov byte [0x8000fa90], 40", or "mov word [0x8000fa90], 40" (unlikely, but possible), or "mov dword [0x8000fa90], 40", depending on what you wanted to do. But neither of your patches are for Nasm - different syntax. I think, for Gas, you'd want "movl $40, (0x8000fa90)". Really not a Nasm question. (and not a "beginner" question, for sure!) (and that "40" probably wants to be "0x40", dunno...)
If you want to learn enough programming to do it, we can help you get started, but it's going to be a long road. And in the end, you'll probably still need advice from someone who's done it. I wish I could help you more, but this is like "I want to do brain surgery, but I don't know anything about medicine". Seems that way to me, anyway...
Best,
Frank