Author Topic: how to load data at end of program  (Read 6003 times)

Offline MajorDill

  • Jr. Member
  • *
  • Posts: 5
how to load data at end of program
« on: October 06, 2016, 03:10:04 AM »
I want to load another program at the end of my currently executing program then jump into that.   It would seem to be rather easy to 'db' a byte at the end of the first program and dump the next program + 10 bytes or so after that.  I was just wondering if there was a more elegant way to define the address of the end of a program?   

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: how to load data at end of program
« Reply #1 on: October 06, 2016, 06:02:36 AM »
Code: [Select]
the_end:

Frequently, executable memory is read-only. You may need to work around that. What's your OS?

Best,
Frank


Offline MajorDill

  • Jr. Member
  • *
  • Posts: 5
Re: how to load data at end of program
« Reply #2 on: October 07, 2016, 04:21:52 AM »
homebrew OS like menuet or mikeos...it was late at nite and my brain was fried and it does seem like a stupid question after some sleep.  I don't know what I was looking for...anyway...thanks for no snarky comments...I'll sleep on any further questions before asking them.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: how to load data at end of program
« Reply #3 on: October 07, 2016, 09:01:43 AM »
No such thing as a stupid question. Although we did used to say, "ASCII foolish question, get a foolish ANSI."

Best,
Frank