No description, website, or topics provided.
Assembly
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Makefile
README.md
argv.s
connect.s
handle_ident.s
handle_msg.s
handle_ping.s
handler.s
line.s
main.s
util.s

README.md

armbot

armbot is an irc bot written in armv6-linux-gnueabi assembler.

features

  • connect to a non-ssl irc server
  • ping/pong
  • join a channel
  • respond to "armbot: source"

motivation

lol

requirements to run on x86_64

  • qemu-arm
  • as/ld with armv6 target
  • (optional) gdb with armv6 target for debugging

It may be necessary to change the XPREFIX variable in the Makefile to match the local cross-compilation binaries.

running

# you can conveniently change the server, port, name, nick, channel info
# in the connect.s and handle_ident.s configuration files.
make run
# to run with arguments, copy the output and append desired arguments

debugging

make debug
gdb armbot # in another terminal, you have to use a gdb with arm targeting
(gdb) target remote localhost:9000
(gdb) disas

todo

  • command line options
  • modules in C
  • ssl connectivity

bugs

  • there's a heisenbug in handle_ident.s, and that branch is skipped and replaced by a hack.

resources

ARM Reference: http://ozark.hendrix.edu/~burch/cs/230/arm-ref.pdf

ARM EABI: new syscall entry convention: http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=3105/4

syscall numbers (for me) found in: /usr/armv6j-hardfloat-linux-gnueabi/usr/include/asm/unistd.h