Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 May, 2013, 05:51:30 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1] 2   Go Down
  Print  
Author Topic: 68K ASM Help -  (Read 1218 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« on: 09 January, 2012, 03:46:14 »
0

I am just learning Assembly for the 68K series and I was wondering if anybody could provide a breakdown of how certain things work. I have a TI-89 Titanium, I consider myself a decently experienced z80 programmer, and I understand math. I have difficulty learning mnemonics, so I will probably ask questions multiple times about how certain instructions work until I solidly understand it.

The assembler I am using is an on-calc assembler that seems to work beautifully. It is the only thing I could understand how to install because my computer skills are massively lacking. Anyways, I looked at the source for a "hello world" program and I was just absolutely confused. I think that move instructions move data between registers and RAM and I believe the stack and PC, but there are operators and whatnot that I am not following. The instructions used are all unfamiliar to me:

movem.l       d4/a5,-(a7)
I am assuming this writes using d4 and a5 to the address pointed to by a7? Does the negative mean it decrements A7 ? I saw somewhere that A7 was a stack register
move.l         HeapAllocPtr*4(a5),a0
I have no clue what this syntax means. I checked out the hex and that helped me realise that it is like a 2 byte instruction followed by 0288h (which is HeapAlloc*4). But what does it mean to be right before (a5) ?
jsr              (a0)
Is this some kind of relative jump?
pea.l           3840
Does the .l mean it is a "long" operation? The hex has a 32-bit value equal to 3840. But what does pea mean and what does it do?
tst.l            d4
I cannot even begin... "tst" looks like test, so is this some way to check if an event has happened with d4?
beq.s          nomem
I haven't a clue, but since nomem is a label, does this jump
move.l        #3840,(a7)
Does this push an immediate value to the stack?
pea.l          LCD_MEM
I've not a clue... LCD_MEM seems to have a value of 4C00h, but this seems to be different from the last pea.l instruction (the hex is 4079h as opposed to 4879h, so this tells me that it is just a flag difference or a slight difference in operation from my experience with z80 hex)

lea.l          12(a7),a7
I don't get the syntax Undecided
pea.l          Hello_World(pc)
again, I is slightly different from the first pea.l (the hex is 487A versus 4879). This tells me that it is the same style if it were like z80
clr.l            -(a7)
I am not sure what clr.l is...


Sorry for all of the questions Undecided tutorials don't generally help me much and I am still not understanding them yet, so this is why I turn to y'all. I am sure that, left to my own devices long enough, I could figure it all out on my own (I did that with z80), but I think it would be a lot neater if I could start programming soon. I am hoping that I can port some of my better known z80 attempts to 68K and  I also think this experience will be very helpful for understanding assembly on other processors. Thank you much in advance!
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: 12 May, 2013, 18:15:03
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #1 on: 09 January, 2012, 07:41:27 »
+1

Wow! Just today i was asking about resources for 68k assembly programming. I think you might be interested in this:
http://www.cs.tcu.edu/people/professors/nute/systems/68K_Instr.pdf
movem means MOVEMultiple (registers). I think the .l and .w mean longword and word respectively.
So maybe "movem.l d4/a5,-(a7)" would load the d4 register at (a7), decrement, then load a5 register at (a7-4
The next part:
move.l         $C8,a5
move.l         HeapAllocPtr*4(a5),a0
jsr              (a0)
...is essentially a 68k B_CALL (ROM_CALL). I suppose $C8 is the address of the rom call table, and the what the second command does is store the longword (i guess each romcall pointer takes up 4 bytes, hence the *4), using the value in a5 as an offset, then stores it into a0. Jsr (Jump to SubRoutine) jumps to the address held in a0.

pea = push effective address. So pea.l pushes the address that follows onto the stack.

tst: Yep, this is TeST. I think it basically is like an "or a" in z80, or cp 0, it tests if the register = 0.

beq.s nomem: bra is branch (jr), bXX are the conditions. BEQ is Branch on EQual, aka jr z. The .s means short, i think the default is 16 bits, not 8.

"move.l        #3840,(a7) Does this push an immediate value to the stack?"
Yep.

lea.l 12(a7),a7: Load Effective Address. a7+12 to a7. The (a7) is an offset, though i'm not sure if it uses the value of the register or the value of the address pointed to by the register. It looks like this might clear up the stack?

clr = clear, set register to 0.

A lot of the information i've found (TI specific, that is) is in French, but none of it too comprehensive and don't really explain things in much detail. A lot of old tutorials appear to have disappeared due to offline sites. I'd be interested in trying to learn 68k asm together, if you're interested in changing thoughts/ideas/etc. Anyway, good luck!

EDIT: So yea, the $ROM_CALL(a5) takes the address pointed to by a5 as the offset (so the address that $C8 points to). AaronTheGreat recommended technoplaza to me, which is the first tutorial i've found which really explains things well for someone who is just starting and has no idea about the entirely different syntax from the z80. It's not very long, but maybe worthwhile checking out.
« Last Edit: 09 January, 2012, 08:03:04 by chickendude » Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #2 on: 09 January, 2012, 08:14:07 »
0

Wow, thank you much! And I am okay with sharing what I learn, but I may be the weaker individual, so you may be doing most of the sharing Undecided Also, I know a little french, so some of the french documentation might help me. I have never had to read any technical stuff in french, though.
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: 12 May, 2013, 18:15:03
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #3 on: 09 January, 2012, 08:44:36 »
+1

Here's (a very short) one i found, in French:
http://www.squalenet.net/fr/ti/tutorial_asm/

Kevin Koffler also wrote a guide, in French, but it looks like they translated it to English:
http://members.chello.at/gerhard.kofler/kevin/ti89prog/asmnstb.htm

And "ZGuide" appears to have been popular, too. I haven't looked through it yet though.
http://www.ticalc.org/archives/files/fileinfo/59/5957.html

Also, i stumbled across this, for the Atari ST:
http://atariste.free.fr/asm/assembleur.html

Ticalc has a couple more:
http://www.ticalc.org/pub/text/68k/

Finding a comprehensive ASSEMBLY tutorial seems to be a bit complicated, probably because of TIGCC. I'm sure there are some books out there, though. There's also an 89 version of Phoenix Wink
Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #4 on: 09 January, 2012, 09:00:58 »
0

This has so far been very helpful, thanks! I wonder what my first program should be... maybe a bouncing thing or pong? Thank you much for your help so far!
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Jim Bauwens
Lua! Nspire! Linux!
Editor
LV10 31337 u53r (Next: 2000)
*
Offline Offline

Gender: Male
Last Login: Today at 00:21:22
Date Registered: 28 February, 2011, 22:32:12
Location: Belgium
Posts: 1733


Total Post Ratings: +180

View Profile WWW
« Reply #5 on: 09 January, 2012, 10:41:27 »
0

What about grammer for the 68k Cheesy
Logged

chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: 12 May, 2013, 18:15:03
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #6 on: 09 January, 2012, 12:32:32 »
0

This has so far been very helpful, thanks! I wonder what my first program should be... maybe a bouncing thing or pong? Thank you much for your help so far!
What? No Hello World?! And what about the little dot that moves around the screen? Also, the 89's LCD is like the 86's, right? In that you don't have to send data to a port to update, just an address in memory? You could make a grayscale pong Wink

Btw, what do people use to emulate the 89? TiEmu?

EDIT: Oh, and i've also learned quite a bit, so thanks for bringing this discussion up. There's a few boards at yAronet which have (well, had Undecided) a lot of discussion on 68k asm programming, it might be fun to look through their old programming help archives. A lot of really knowledgeable people post(ed) there, you'll probably recognize a few of their names from games you've played. Smiley

EDIT2: If you don't have it already, you might want to check out TIGCC. I've read that all the ROM CALLS are documented there.
« Last Edit: 09 January, 2012, 12:38:19 by chickendude » Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #7 on: 09 January, 2012, 17:51:03 »
0

What about grammer for the 68k Cheesy
That is one thing I was thinking of, but I am trying to figure out if I should. TI-89 BASIC is pretty powerful as it is.
Also, the 89's LCD is like the 86's, right? In that you don't have to send data to a port to update, just an address in memory? You could make a grayscale pong Wink
That is what I want to do Cheesy And yes, the LCD is mapped to RAM, so it should make grayscale fairly easy Smiley
Btw, what do people use to emulate the 89? TiEmu?
I've no clue o.o TiEmu is the one recommended on Technoplaza.
EDIT: Oh, and i've also learned quite a bit, so thanks for bringing this discussion up. There's a few boards at yAronet which have (well, had Undecided) a lot of discussion on 68k asm programming, it might be fun to look through their old programming help archives. A lot of really knowledgeable people post(ed) there, you'll probably recognize a few of their names from games you've played. Smiley
Cool! I will poke around there Smiley
EDIT2: If you don't have it already, you might want to check out TIGCC. I've read that all the ROM CALLS are documented there.
Yeah, I think I should do that. I have not done it yet Undecided
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Art_of_camelot
The matrix has you.. ಠ_ಠ
Support Staff
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:35:25
Date Registered: 30 August, 2008, 04:55:55
Location: Dr. Light's Laboratory
Posts: 4384


Total Post Ratings: +149

View Profile WWW
« Reply #8 on: 09 January, 2012, 18:07:11 »
0

As far as emulation is concerned I'd ask Ranman or AaroneousTheGreat, or either of the Bauwen brothers. I'm not sure what the popular emulator is for the 68k series. 68k ASM would be interesting. Whenever I tried learning in the past though it seemed hard to find decent information, even back then. Undecided
Logged

Projects:
TBA! Coming to an 83+ near you!

NerdTests.com says I'm a Cool Nerd King.  Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum!


Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #9 on: 09 January, 2012, 18:19:01 »
0

Yeah, I am searching sites like UTI that have a section for z80 and 68k assembly, but I have found almost nothing Sad Oh well, maybe chickendude and I can bring life back to 68k Asm development Smiley
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Art_of_camelot
The matrix has you.. ಠ_ಠ
Support Staff
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:35:25
Date Registered: 30 August, 2008, 04:55:55
Location: Dr. Light's Laboratory
Posts: 4384


Total Post Ratings: +149

View Profile WWW
« Reply #10 on: 09 January, 2012, 18:20:26 »
0

You guys would like totally be my heroes. Cheesy
Logged

Projects:
TBA! Coming to an 83+ near you!

NerdTests.com says I'm a Cool Nerd King.  Click here to take the Nerd Test, get nerdy images and jokes, and write on the nerd forum!


Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #11 on: 09 January, 2012, 18:22:34 »
0

I am already learning a decent amount, I think and since I learned z80 hex in terms of TI-BASIC, then z80 mnemonics using z80 hex and now M68k in z80 terms, I think I can break it all down to BASIC Cheesy Maybe I can help folks, too, but this technoplaza link is really good for me Smiley

EDIT: Okay, so for now I have been learning C for the TI-89 instead. It was really easy to download and install TIGCC and TiEmu and that really helped a lot. I got excited with it, so I made a program to draw inverted lines whos endpoints bounce around the screen at different speeds. It is 299 bytes on calc, so I think that is a decent size.

Spoiler for Hidden:
#include <tigcclib.h>

void _main(void) {
    void *kbq = kbd_queue();
    int x, y, c, d, a, b, e, f, key;
    x=y=key=a=b=0;
    c=1;
    d=2;
    e=3;
    f=2;
    clrscr();
    while (key != 263) {
        DrawLine(x,y,a,b,A_XOR);
        x=x+c;
        y=y+d;
        a=a+e;
        b=b+f;
        if (x==0) {
          c=-c;
        }
        if (x>149) {
          c=-c;
        }
        if (y==0) {
          d=-d;
        }
        if (y>89) {
          d=-d;
        }
        if (a==0) {
          e=-e;
        }
        if (a > 149) {
          e=-e;
        }
        if (b==0) {
          f=-f;
        }
        if (b > 89) {
          f=-f;
        }
        OSdequeue(&key, kbq);
    }
}

* hello.89z (0.38 KB - downloaded 15 times.)
« Last Edit: 10 January, 2012, 01:09:43 by Xeda112358 » Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


chickendude
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Female
Last Login: 12 May, 2013, 18:15:03
Date Registered: 06 September, 2008, 11:27:30
Posts: 435

Total Post Ratings: +66

View Profile
« Reply #12 on: 11 January, 2012, 12:35:35 »
0

When i get some free time i'm gonna spend a couple evenings trying to wet my feet in 68k asm. I'm not entirely sure what the difference between the normal registers and the address registers are (i know a7 is reserved for the stack). Have you started your pong game yet? Cheesy I was thinking of doing a 68k version of my old prgmBAD game i made like.. 10 years ago:
http://www.ticalc.org/archives/files/fileinfo/267/26730.html
Xeda, it was also ported in C to the 89, maybe you would be interested in the source Wink
http://www.ticalc.org/archives/files/fileinfo/240/24065.html
Logged
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Today at 03:03:13
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3739


Topic starter
Total Post Ratings: +598

View Profile
« Reply #13 on: 11 January, 2012, 16:56:35 »
0

There are data registers and address registers, from what I see. pretty much, traditionally the D registers contain data for intermediary operations whereas the A registers contain addresses to calls, jump tables, et cetera. A7 is indeed the stack and A6 is the stack frame (I do not understand what a "stack frame" is).

So if I was going to make a routine to multiply two, 96-bit numbers, I would use D0D1D3 for the first number and D4D5D6 for the second. Or, if it was stored in memory (the two numbers), I would store the location of the numbers in A0 and A1 and the output location in A2.
Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Lionel Debroux
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 19:24:33
Date Registered: 17 December, 2009, 09:37:25
Location: France
Posts: 1853

Total Post Ratings: +208

View Profile WWW
« Reply #14 on: 31 January, 2012, 09:01:40 »
0

Maybe a bit of necroposting here, but I don't attend this section very often... now that there seem to be several TI-68k programmers, I should attend the C and ASM help sections more often Smiley

There are two emulators for TI-68k calculators: VTI and TIEmu. TIEmu supports the V200 and 89T, it's more accurate and more complete than VTI is, and has a native Linux version - but conversely, it's more heavyweight Smiley
As mentioned in another topic, TIGCC is unmaintained for practical purposes. Its la(te)st release was made more than five years ago, and even bugfixes for 10-year-old crasher bugs are not backported from GCC4TI - let alone optimizations, new functions (ROM_CALLs and others), portability improvements, etc.
GCC4TI is still maintained, though the latest release was made more than two years and a half ago.

The Technoplaza tutorials are said to be good, indeed.

Quote
So if I was going to make a routine to multiply two, 96-bit numbers, I would use D0D1D3 for the first number and D4D5D6 for the second. Or, if it was stored in memory (the two numbers), I would store the location of the numbers in A0 and A1 and the output location in A2.
Why not d0-d2 for the first number, and d3-d5 for the second ? Smiley
In pure ASM, you can use the former calling convention; however, if you want to use such routines from C code, you'd have to use the second one: memory operands.
Logged

Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.388 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.