Author Topic: Asm code issue  (Read 264 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.539
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 789
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: 521
  • Country: au
  • Liked: 336
Re: Asm code issue
« Reply #3 on: 01:50, 10 June 18 »
nico24,

It looks like you have relocatable code.

rpalmer