Jump to content

Photo

a little 68K asm help


6 replies to this topic

#1 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • 347 posts
  • RAP SUCKS!

Posted Mon Sep 24, 2018 7:40 PM

hi all,

 

I am trying to get the following program to run:

       ORG    $6000

NUM1   DS.W   1
NUM2   DS.W   1
RESULT DS.W   1

START  MOVE.W NUM1,D1    ;FETCH FIRST NUMBER

       ADD.W  NUM2,D1    ;ADD SECOND NUMBER

       MOVE.W D1,RESULT  ;STORE RESULT

       RTS

       END



I am using Seka assembler.

 

can anyone help?

 

Fedepede?

 

thank you

 



#2 ggn OFFLINE  

ggn

    Stargunner

  • 1,472 posts
  • Location:Athens, Greece

Posted Tue Sep 25, 2018 2:58 AM

How are you running this? I can only assume that you're doing a "jsr $6006" somewhere?

If you're trying to build a TOS executable then it certainly won't run.

More info is required :).

#3 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • Topic Starter
  • 347 posts
  • RAP SUCKS!

Posted Tue Sep 25, 2018 9:05 AM

I just type "g" and Seka asks for breakpoints, i press enter (for none, I guess)

 

and it runs.

 

but not like it should.

 

thanks

 

oh and not trying to build an executable, just play with it inside the assembler



#4 swapd0 ONLINE  

swapd0

    Moonsweeper

  • 414 posts

Posted Tue Oct 2, 2018 5:38 AM

You are using DS.W 1(Define a Storage), I think that you want to use DC.W 1(Define a Constant).



#5 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • Topic Starter
  • 347 posts
  • RAP SUCKS!

Posted Tue Oct 2, 2018 8:43 AM

right, thank you.

 

now i know what those stand for!

 

great



#6 fedepede04 OFFLINE  

fedepede04

    Chopper Commander

  • 141 posts

Posted Tue Nov 20, 2018 11:27 PM

yes its dc.w you need, seka does not know the ds.w function. if you need a data array in seka you have to do blk.w



#7 Wally1 OFFLINE  

Wally1

    Moonsweeper

  • Topic Starter
  • 347 posts
  • RAP SUCKS!

Posted Sat Nov 24, 2018 4:08 AM

okay

 

great






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users