Skip to content

Request for OSCLI call to be added to bbc_kernal.mfk #143

@dbolli

Description

@dbolli

I thought it might be useful to add this OSCLI call to bbc_kernal.mfk
as an example.

// OSCLI. Send a string to command line
// Input: X = Lo Byte of address of command string ($0D terminated)
//		Y = Hi Byte of address of command string ($0D terminated)
asm void oscli(word register(xy) cmd) @$FFF7 extern

Can be called using a string array or a string directly

array oscli_cat = "*.{x0D}"        // Display disk directory catalog

[ in main() ]

	oscli( oscli_cat )

	oscli( "*TYPE !BOOT{x0D}" )

Assembles as

; 
;line:47:hello_world_extended.mfk
;       oscli( oscli_cat )
    LDY #hi(oscli_cat.array)
    LDX #lo(oscli_cat.array)
    JSR $FFF7
; 
;line:49:hello_world_extended.mfk
;       oscli( "*TYPE !BOOT{x0D}" )
    LDY #hi(textliteral$2a545950452021424f4f540d.array)
    LDX #lo(textliteral$2a545950452021424f4f540d.array)
    JSR $FFF7

Thank you for your great work creating and maintaining the Millfork repository 👍

Regards,

Derek.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions