News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Calling a Ulifac RSX command

Started by ivavilagu, 15:34, 03 April 25

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

ivavilagu

Hi,

|man is a ulifac rsx command for listing files in memory (not on the screen). How could I call the command from assembly code?

arnoldemu

See the SOFT968 manual:

https://www.cpcwiki.eu/index.php/Soft968:_CPC_464/664/6128_Firmware

especially section 10.6 in https://www.cpcwiki.eu/imgs/f/f6/S968se10.pdf

and also: https://www.cpcwiki.eu/imgs/7/71/S968se15.pdf

You need to use KL_FIND_COMMAND (&BCD4) to find the command and then setup A and IX. before calling it. 
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

ivavilagu

Thanks for the information!!!

ivavilagu

Hi again,

trying to call an RSX command (e.g. |DISC) fails to find it. My knowledge of ASM is limited. Using sdasz80 under Cpctelera


kl_find_command = 0xbcd4
kl_far_call = 0x0018

;;----------------------------------------------------------------
;; STEP 1: Find RSX command, store access information

ld hl, #cmd_man
call kl_find_command
jp nc, change_border

ld (man_command), hl ;; store address of function
ld a, c
ld (man_command+2), a ;; store "rom select" of function

;;----------------------------------------------------------------
;; STEP 2: Execute RSX command without parameters

call kl_far_call
.dw man_command
ret



change_border:
    ld   bc, #0x7f10
    out  (c), c
    ld   c, #0x4c
    out  (c), c
    ret

;;-------------------------------------------------------------
;; This is initialised if the RSX command is found.

man_command:
    .dw 0 ;; address of function
    .db 0 ;; "rom select" to access function

;;-------------------------------------------------------------

;; the name of the function
cmd_man:
    .db 'D', 'I', 'S', 'C' + 0x80

Bread80

If you're not running under BASIC then the ROM(s) won't be initialised. To initialise a single ROM call KL_INIT_BACK. To initialise all ROMs call KL_ROM_WALK.

ivavilagu

Quote from: Bread80 on 16:19, 14 April 25If you're not running under BASIC then the ROM(s) won't be initialised. To initialise a single ROM call KL_INIT_BACK. To initialise all ROMs call KL_ROM_WALK.
Thanks!!!!

Powered by SMFPacks Menu Editor Mod