How to initialize stack pointer in assembly language?

Dear all,

         I have a problem in my assembly code while intialising the stack pointer.By default its being initialized by 0FF.In the assembler SRA 740 ,code has already been written by some other people.I need to make some modifications.so i am trying to run the code already being used,but couldnot go beyond the below instruction.

stack :        .blkb 47;

stack_top :  .blkb 1;

{some code has given in between}

s = > stack_top;(stucked)

debugger is encountering a problem with this instruction.My point is how to decide the RAM area,and out of RAM how to fine the range of stack memory locations so that i can intialize my stack pointer.Due to this problem HEW has crashed.Any help will be appreciated.Thanks in advance.

Parents
  • I found the solution with the help of memory map in the new processsor.Since the stack is occupying 47 bytes and it is under the .section r,and r=100(Given in the dat file),I got to know the stack pointer is assigned  with the address 147H.I made some modification in the CPUM register ,selected the bit "stack selection page 1" and set the clock also .Then it started executing the program.Thanks.

Reply
  • I found the solution with the help of memory map in the new processsor.Since the stack is occupying 47 bytes and it is under the .section r,and r=100(Given in the dat file),I got to know the stack pointer is assigned  with the address 147H.I made some modification in the CPUM register ,selected the bit "stack selection page 1" and set the clock also .Then it started executing the program.Thanks.

Children
No Data