- Top Stats

Top Posters Top Topic Starters Top Topics
AMSDOS 1287
arnoldemu 1128
TFM 1124
ervin 745
ronaldo 402
AMSDOS 55
arnoldemu 51
ervin 42
EgoTrip 35
Arnaud 33
FutureOS corner - 69483 Views TFM/FS 07:12, 01 October 10
Example Z80 as... - 64670 Views arnoldemu 10:59, 04 April 10
#CPCtelera 1.4... - 32381 Views ronaldo 13:59, 11 May 15
BASIC programm... - 29822 Views arnoldemu 16:23, 22 May 09
CHAMP Assemble... - 24621 Views Bruce Abbo... 12:59, 16 January 14


Author Topic: Asm code issue  (Read 299 times)

0 Members and 1 Guest are viewing this topic.

Offline nico24

  • CPC464
  • **
  • Posts: 16
  • Country: us
  • Liked: 8
Asm code issue
« on: 21:52, 09 June 18 »
Hi all,
I typed in this ASM code from Amstrad Seminal. It is pretty short (it is in Spanish). When i run it I just get the standard Amstrad coloured weirdness.
Any ideas where I'm going wrong? I can post the original code screen capture if you need.
The only thing I can think in terms of copying the printed article is 8 and Bs being wrong. All other characters have been checked.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.565
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 826
Re: Asm code issue
« Reply #1 on: 01:10, 10 June 18 »

Maybe it's just where the program needs to be called, so in my ASM game the Execution Address is where I conveniently put ORG &8000, but in this example there's what appears to be a whole bunch of routines, 10 memory variables and then this bit of code:


Code: [Select]
;Colocar tlraguisantes
LD HL,#C230
LD (nuevo),HL
LD HL,#90DC
LD (nuevod),HL
LD HL,#0518
LD (filas),HL
CALL situar


it's got no label name before it and the last routine before the addressed variables:


Code: [Select]

c2:
ADD A,E
LD E,A
LD A,(HL)
SUB E
RET




has a return. So it looks like the execution address will be at where it has ;Colocar tlraguisantes
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline nico24

  • CPC464
  • **
  • Posts: 16
  • Country: us
  • Liked: 8
Re: Asm code issue
« Reply #2 on: 01:38, 10 June 18 »
Thanks - I'll have a look at that. It makes sense. I'll see if the original article mentions anything too.

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 526
  • Country: au
  • Liked: 338
Re: Asm code issue
« Reply #3 on: 01:50, 10 June 18 »
nico24,

It looks like you have relocatable code.

rpalmer