News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Fran123

calling to the program basic from assembler

Started by Fran123, 12:41, 14 April 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fran123

Hello

I have a BASIC program in &170 address. I want to invoque it from ASM code. How can I do it?

Thank you.

pelrun

#1
There's no simple way of doing that. Check out the March 89 issue of Amstrad Computer User for the gory details if you must.

Amstrad Computer User 52

MoteroV4

From BASIC you had to make a CALL to the ASM code. You just need to come back with a RET.
Released cpc games: Memtrainer, El Gerente (Remake)

Longshot

Hello.
Try with this ... ;)

CALL #B900
SCF
JP #EA7B
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

McArti0

:D pressing buttons on the keyboard

call &bd19 ;wait v-sync
ld a,2
ld (&b8bF),a ;set scan keyboard two interrupt after v-sync
call &bd19 ;wait v-sync

ld a,255-4
ld (&b645),a     ;pressed R

call &bd19 ;wait v-sync
ld (&b644),a     ;pressed U

call &bd19 ;wait v-sync
ld a,255-64
ld (&b644),a     ;pressed N

call &bd19 ;wait v-sync
ld (&b63F),a     ;pressed ENTER

RET ;return to BASIC

possible GOTO 123
CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

McArti0

>:( correction
org #4000

call &bd19 ;wait v-sync
ld a,3
ld (&b8bF),a ;set scan keyboard two interrupt after v-sync

call &bd19 ;wait v-sync
halt
ld a,255-4
ld (&b645),a ;pressed R

call &bd19 ;wait v-sync
halt
ld (&b644),a ;pressed U

call &bd19 ;wait v-sync
halt
ld a,255-64
ld (&b644),a ;pressed N

call &bd19 ;wait v-sync
halt
ld (&b63F),a ;pressed ENTER

RET ;return to BASIC

CPC 6128, Whole 6128 and Only 6128, with .....
NewPAL v3 for use all 128kB RAM by CRTC as VRAM
TYPICAL :) TV Funai 22FL532/10 with VGA-RGB-in.

Powered by SMFPacks Menu Editor Mod