Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: Mxalloc?
Posted by: evil Aug,30.2013-15:20 

It looks like he's using C, I took for granted that the libs will do a proper init with Mshrink.. But what do I know, I never learned that jibberish language :)



An init in non-jibbersih that will allow for Malloc() use looks like this:

move.l 4(sp),a5 ;address to basepage
move.l $0c(a5),d0 ;length of text segment
add.l $14(a5),d0 ;length of data segment
add.l $1c(a5),d0 ;length of bss segment
add.l #$100,d0 ;length of basepage
add.l #$1000,d0 ;length of stackpointer
move.l a5,d1 ;address to basepage
add.l d0,d1 ;end of program
and.l #-2,d1 ;make address even
move.l d1,sp ;new stackspace

move.l d0,-(sp) ;mshrink()
move.l a5,-(sp)
move.w d0,-(sp)
move.w #$4a,-(sp)
trap #1
lea 12(sp),sp


--
Anders Eriksson
ae@dhs.nu








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Mxalloc? Sdw Aug,29.2013-17:59
  Re: Mxalloc? AdamK Aug,29.2013-20:59
  Re: Mxalloc? evil Aug,29.2013-21:29
    Re: Mxalloc? ggn Aug,30.2013-09:45
    Re: Mxalloc? Cyprian Aug,30.2013-12:02
      Re: Mxalloc? evil Aug,30.2013-15:20


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson