Author Topic: Mimas by Benjamin Moody  (Read 59227 times)

0 Members and 1 Guest are viewing this topic.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #225 on: November 23, 2010, 04:25:07 pm »
Hum... Just tried Mimas. It's the first in-calculator Asm( developper, right?

Or are there more?
It's the first competent one :P
Says the guy that wrote two programs with a "non-competent" one that are on my calc. (Greyscale Tunnel and XtraVar) :P

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Mimas by Benjamin Moody
« Reply #226 on: November 23, 2010, 04:39:46 pm »
Hum... Just tried Mimas. It's the first in-calculator Asm( developper, right?

Or are there more?
It's the first competent one :P
Says the guy that wrote two programs with a "non-competent" one that are on my calc. (Greyscale Tunnel and XtraVar) :P

Lol, nice job leaving out your own assembler ;)

No, it's the first competent one written in assembly.
« Last Edit: November 23, 2010, 04:40:13 pm by Deep Thought »




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #227 on: November 23, 2010, 05:32:26 pm »
Hah, an asm program to program in Asm, how funny!

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #228 on: November 23, 2010, 08:25:32 pm »
Most C compilers are written in C ;)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #229 on: November 23, 2010, 08:28:33 pm »
Most C compilers are written in C ;)

except the first ;)


Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #230 on: November 23, 2010, 09:41:35 pm »
I've writen a Scheme interpreter in Scheme before.  :)
« Last Edit: November 23, 2010, 09:42:12 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Mimas by Benjamin Moody
« Reply #231 on: November 23, 2010, 09:57:27 pm »
I've writen a Scheme interpreter in Scheme before.  :)
now that's just silly :P
Hmm, someone should attempt to make a BASIC interpreter in BASIC (with DCS's help of course)
/e

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Mimas by Benjamin Moody
« Reply #232 on: November 23, 2010, 11:55:54 pm »
Lol Quigibo XD

I think someone tried to write a BASIC interpreter in TI-BASIC before. There was also an alternative language interpreted using TI-BASIC that was about 3 times slower than TI-BASIC, but 3 times smaller.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #233 on: November 28, 2010, 10:23:38 am »
Now that I know a little basic, I'd like a help from you guys. Using Mimas, I can program Assembly in calculator...

Is the syntax EXACTLY the same as in computer?

So...

Code: [Select]
#include "ti83plus.inc"
.org 40339
.db t2ByteTok, tAsmCmp

VariableNameTest .equ 666
ThisIsZero .equ 0
B_CALL _ClrLCDFull
ld a, VariableNameTest

add a, ThisisZero
ld h,2
ld l, 154

B_CALL _DispHL
B_CALL _getKey
B_CALL _ClrLCDFull
ret

I could do this?

EDIT: When I type this:

VariableNameTest .equ 666

it gives me 'UNKNOWN FUNCTION'
« Last Edit: November 28, 2010, 11:42:48 am by ScoutDavid »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #234 on: November 28, 2010, 11:44:20 am »
Use '=' instead of '.equ'. :)  Mimas doesn't support '.equ' yet. :D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #235 on: November 28, 2010, 11:51:22 am »
Use '=' instead of '.equ'. :)  Mimas doesn't support '.equ' yet. :D

That works better, but when I compile this:
Code: [Select]
VAR = 666
OTHERVAR = 0
BCALL ClrLCDFull
ld a, VAR

add a, OTHERVAR
ld h,2
ld l, 154

BCALL DispHL
BCALL GetKey
BCALL ClrLCDFull
ret

And compile it, I get:

Code: [Select]
Error

Argument 029Ah out of range

I have no idea what this means :S

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Mimas by Benjamin Moody
« Reply #236 on: November 28, 2010, 12:09:55 pm »
VAR is 666, which is a 2-byte number. A is only a one-byte register, so you can't load VAR into A.

EDIT: 2222th post!
« Last Edit: November 28, 2010, 12:14:39 pm by Deep Thought »




Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #237 on: November 28, 2010, 12:11:42 pm »
VAR is 666, which is a 2-byte number. A is only a one-byte register, so you can't load VAR into A.

1. Deep Thought, you have 2222 posts hahaha
2.
Code: [Select]
#include "ti83plus.inc"
.org 40339
.db t2ByteTok, tAsmCmp

VariableNameTest .equ 666
ThisIsZero .equ 0
B_CALL _ClrLCDFull
ld a, VariableNameTest

add a, ThisisZero
ld h,2
ld l, 154

B_CALL _DispHL
B_CALL _getKey
B_CALL _ClrLCDFull
ret

This works in the computer, though.

3.
Code: [Select]
VAR = 666
B_CALL _ClrLCDFull

ld HL, VAR
B_CALL _DispHL
B_CALL _getKey
B_CALL _ClrLCDFull
ret

What about this?

ASHBAD_ALVIN

  • Guest
Re: Mimas by Benjamin Moody
« Reply #238 on: November 28, 2010, 02:59:12 pm »
Code: [Select]
#include "ti83plus.inc"
.org $9D95
.db t2ByteTok, tAsmCmp

VariableNameTest .equ 666
ThisIsZero .equ 0
B_CALL _ClrLCDFull
ld bc, VariableNameTest

add c, ThisisZero
ld h, 2
ld l, 154

B_CALL _DispHL
B_CALL _getKey
B_CALL _ClrLCDFull
ret

anything over 255 is a 16 bit number, and requires a 16 bit register.  BC is a good one to use when not using HL or DE.  And, you can't really use AF much for that type of thing.  So BC == good. 

To add to BC, you can add C and that zero var, which (I think) conserves more space like a byte or two and is faster.  C is the small byte of BC, so when you add 1 to that, BC is equal to old BC plus one.  When you add to B however, BC is equal to old BC plus 256.  that is because B is the high byte, which takes care of the numbers higher than 255 for the BC register.  You may want to study this a lot and get it down before going too much further though, and I'm sure that hot dog's tutorial will explain it better than me. 

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Mimas by Benjamin Moody
« Reply #239 on: November 28, 2010, 03:26:59 pm »
To add a one-byte number to and register pair, you need to use a. (add c,NUM is not a valid instruction)
Here's an adaptation from a routine to add a to hl:
Code: [Select]
ld a,num_to_add
add c
ld c,a
adc a,b
sub c
ld b,a
This takes care of carry and everything.
Also, what register you use should be determined by the circumstances (like what routines you will be calling, for example, or what instructions are valid).
« Last Edit: November 28, 2010, 03:27:29 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.