q/src/asm/Instructions.go
2025-03-13 16:57:13 +01:00

22 lines
602 B
Go

package asm
// Comment adds a comment at the current position.
func (a *Assembler) Comment(text string) {
a.Label(COMMENT, Label{Name: text, Type: CommentLabel})
}
// DLLCall calls a function in a DLL file.
func (a *Assembler) DLLCall(name string) {
a.Label(DLLCALL, Label{Name: name, Type: ExternLabel})
}
// Return returns back to the caller.
func (a *Assembler) Return() {
a.Instructions = append(a.Instructions, Instruction{Mnemonic: RETURN})
}
// Syscall executes a kernel function.
func (a *Assembler) Syscall() {
a.Instructions = append(a.Instructions, Instruction{Mnemonic: SYSCALL})
}