lookslikegoasm

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: BSD-3-Clause Imports: 2 Imported by: 2

README

lookslikegoasm

This is a package that tries to determine if the given Assembly source code looks like Go/Plan9 style Assembly or Intel/AT&T style Assembly.

The Consider function returns true if it looks like Go/Plan9 style assembly.

The utility in cmd can be installed with:

go install github.com/xyproto/lookslikegoasm/cmd/lookslikegoasm@latest

Example use:

package main

import (
    "fmt"

    "lookslikegoasm"
)

func main() {
    goPlan9Source := `
    TEXT hello(SB), $0-0
    MOVQ AX, BX
    ADDQ $1, AX
    CALL somefunction
    `

    if lookslikegoasm.Consider(goPlan9Source) {
        fmt.Println("This looks like Go/Plan9 Assembly")
    } else {
        fmt.Println("This does not look like Go/Plan9 Assembly")
    }
}

General info:

  • Version: 1.0.0
  • License: BSD-3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Consider

func Consider(sourceCode string) bool

Consider checks if the given source code looks more like Go/Plan9 Assembly than Intel or AT&T style Assembly. Returns true if it looks like Go/Plan9 Assembly. Note that this is not an exact science!

Types

This section is empty.

Directories

Path Synopsis
cmd
lookslikegoasm command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL