First in Basic and later in machine code (for speed reasons).
It could also be programmed directly in assembly code or machine code.