Well are you "sure" you mean "machine language"? There is a difference between machine language and "assembly language".
Assembly language is a more "user friendly" representation of machine code. In assembly language, what you write consists of commands like "mov, rts, bra", etc. (move, return, branch, etc.)
Where as, machine code consists of 0's and 1's only.
It's been a while since I've written machine code, but, the best way to do is write the assembly code first, and then goto and figure out the equivalent machine opcode from the manual and write that in after.
So to write "machine code", the best way to do it is in 2 phases. 1) Assembly and then 2) machine.