News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: .org & .area (MIPS Assembly)  (Read 574 times)

SleepyFist

  • Hero Member
  • *****
  • Posts: 806
    • View Profile
.org & .area (MIPS Assembly)
« on: May 05, 2018, 02:51:16 pm »
I'm just wondering what the difference is and how to work with them
As far as I understand .org defines a start point then adds data consecutively from that point,
but i'm a little unsure about .area, from the description it sounds like a limited area version of .org?
Iv'e got this debug code, lightly butchered, where the pointer tables? use .org and the actual text data is set to use .area

// Debug Texts
.align 4
.area 0x02008858 - .
Debug0: // 0087E4
.stringn "", 0xFF
.align 4
Debug1: // 00883C
.stringn "", 0xFF
.endarea

// Debug Table
.org 0x02008858
.align 4
DebugTextEntry0:
.dw 0x0, 0x0, 0x0, 0x0
DebugTextEntry1:
.dw 0x0, 0x0, 0x0, 0x0

This is just debug junk, and directly after is a sizable chunk of dialogue in the same format,
what I'd like to do is to add the areas of both together and then change the .org address of the main dialogue pointers to match, but when I do this, for some reason I start getting the wrong text cropping up in the wrong dialogue boxes among other things, and I don't understand why? maybe there's a snafu with the pointers themselves when I do this?

The game in question is Shindou Mario 64, I'm back to work on it after sitting on it for far too long,
but a good portion of assembly is still way over my head.
Sleepy's Tune of the week|| The Jetzons - Hard Times || https://youtu.be/H2OWC5Hosv8

Gemini

  • Hero Member
  • *****
  • Posts: 2004
  • 時を越えよう、そして彼女の元に戻ろう
    • View Profile
    • Apple of Eden
Re: .org & .area (MIPS Assembly)
« Reply #1 on: May 05, 2018, 06:37:29 pm »
.area is used to define a range of how much room you have available for assembling code or data. If what you assemble will end up overflowing what .area specifies, you'll get an error.
I am the lord, you all know my name, now. I got it all: cash, money, and fame.

SleepyFist

  • Hero Member
  • *****
  • Posts: 806
    • View Profile
Re: .org & .area (MIPS Assembly)
« Reply #2 on: May 05, 2018, 08:11:43 pm »
Thanks for the info, overflow errors have been the bane of this project for the start

I guess I just need to work out why its having a conniption when I combine the debug space with the main dialogue area than and work from there.
Sleepy's Tune of the week|| The Jetzons - Hard Times || https://youtu.be/H2OWC5Hosv8