Setup environment pointer for getenv/putenv. Patch from Eric Norum

<eric@cls.usask.ca>.
This commit is contained in:
Joel Sherrill
1999-10-04 13:42:45 +00:00
parent 473b4e58d0
commit 936f288915
2 changed files with 16 additions and 6 deletions

View File

@@ -396,8 +396,8 @@ ZEROLOOPTEST:
bcs.s ZEROLOOP | No, skip bcs.s ZEROLOOP | No, skip
movel #stack_init,a7 | set master stack pointer movel #stack_init,a7 | set master stack pointer
movel d0,a7@- | environp pea env | envp
movel d0,a7@- | argv pea arg | argv
movel d0,a7@- | argc movel d0,a7@- | argc
jsr SYM(boot_card) | Call C main jsr SYM(boot_card) | Call C main
@@ -422,11 +422,16 @@ BEGIN_DATA_DCL
.align 2 .align 2
PUBLIC (environ) PUBLIC (environ)
SYM (environ): SYM (environ):
.long 0 .long env
PUBLIC (_M68kSpuriousInterruptCount) PUBLIC (_M68kSpuriousInterruptCount)
SYM (_M68kSpuriousInterruptCount): SYM (_M68kSpuriousInterruptCount):
.long 0 .long 0
END_DATA_DCL END_DATA_DCL
BEGIN_BSS
env: .long 0
arg: .long 0
END_BSS
END END

View File

@@ -396,8 +396,8 @@ ZEROLOOPTEST:
bcs.s ZEROLOOP | No, skip bcs.s ZEROLOOP | No, skip
movel #stack_init,a7 | set master stack pointer movel #stack_init,a7 | set master stack pointer
movel d0,a7@- | environp pea env | envp
movel d0,a7@- | argv pea arg | argv
movel d0,a7@- | argc movel d0,a7@- | argc
jsr SYM(boot_card) | Call C main jsr SYM(boot_card) | Call C main
@@ -422,11 +422,16 @@ BEGIN_DATA_DCL
.align 2 .align 2
PUBLIC (environ) PUBLIC (environ)
SYM (environ): SYM (environ):
.long 0 .long env
PUBLIC (_M68kSpuriousInterruptCount) PUBLIC (_M68kSpuriousInterruptCount)
SYM (_M68kSpuriousInterruptCount): SYM (_M68kSpuriousInterruptCount):
.long 0 .long 0
END_DATA_DCL END_DATA_DCL
BEGIN_BSS
env: .long 0
arg: .long 0
END_BSS
END END