Author Topic: Simple ASM tasks  (Read 4545 times)

0 Members and 1 Guest are viewing this topic.

Offline johnbchron

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +1/-0
  • RiskALungForDiving
    • View Profile
Simple ASM tasks
« on: March 01, 2018, 11:56:43 am »
Hey guys, so I see all over the web people who post hex codes that do things like invert the screen or make keys repeat faster, but how do I do basic things in shell-less assembly? For example manipulate a variable or draw a shape? Any help is appreciated.
Just a dude who is really bored in school... and a huge nerd.
Click here to give me an internet!
 <a href="http://www.freebiebitcoin.com">Earn free bitcoin</a>

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Simple ASM tasks
« Reply #1 on: March 01, 2018, 12:39:35 pm »
I would suggest going through one or both of these tutorials:
https://t.eeems.ca/ASMin28Days/welcome.html
https://t.eeems.ca/Z80ASM/index.htm
/e

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Simple ASM tasks
« Reply #2 on: March 01, 2018, 06:30:11 pm »
What do you mean by "manipulate a variable?" A bunch of those codes you may have found take input and then output a value by manipulating a variable.


If you decide to try assembly, look into how variables are stored and look into bcalls like the following:
_RclAns
_StoAns
_ChkFindSym
rFindSym (don't use the bcall, use the rst)
_SetXXOP1
_SetXXOP2
_SetXXXXOP2
_OP2ToOP1


Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Simple ASM tasks
« Reply #3 on: March 02, 2018, 03:31:22 pm »



Those are good places to start if you want to learn asm. I’m going to try to persuade you to use Axe Parser for whatever it is you are trying to do.

I assume you don’t know much about assembler for a couple reasons. You listed drawing a shape as a simple task - it isn’t. Also, variables don’t work the way you think they do, there are only registers and memory.
If you aren’t very comfortable with the concept of pointers then I suggest you learn or stick with ti-basic since everything after it relies heavily on them.
Axe can do just about everything asm can and it is much easier to learn and code. I know Axe and assembler quite well and I still code mainly in Axe because it is easier to use and gets the job done. Something that I can create in minutes in Axe can take a half hour in asm

Let me say it again: Unless you are trying to do some REALLY crazy things or have other assembly programming experience I would go to Axe for whatever you are trying to create.
I'm still around... kind of.

Offline johnbchron

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +1/-0
  • RiskALungForDiving
    • View Profile
Re: Simple ASM tasks
« Reply #4 on: March 02, 2018, 06:29:13 pm »
Yeah, I know a decent amount of Axe, but I am just one of those guys who likes to make things (programs) as efficient as possible, and I figured ASM would be faster/more direct in anything it does. I will wait until I am much better at Axe until I try to undertake ASM. Thanks!
Just a dude who is really bored in school... and a huge nerd.
Click here to give me an internet!
 <a href="http://www.freebiebitcoin.com">Earn free bitcoin</a>

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Simple ASM tasks
« Reply #5 on: March 08, 2018, 04:49:34 pm »
ASM isn't very hard to learn, but if you want to do anything interesting with it, you need a good understanding of how the CPU works. Axe simplifies things a great deal by providing a ton of convenience functions for the most common tasks. Makes things much easier than building from scratch in ASM.
Also, assembly isn't necessarily faster than Axe, but if you are really good at it, then you'll be able to write smaller and more optimized programs, and it's quite fun.