Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
non-paged supervisor code calling paged application code
#6
(2026-02-17, 08:28 AM)boriel Wrote: This is something also being worked on... for the moment you can call "submodules" compiled in paged memory. @Duefectu has documented how to do it.

Thank you.

I've gotten my code to compile to asm...

Code:
PS D:\zxnext\projects\demo> .\build.ps1
zxbc.py 1.18.5
...compiling:  core
core.bas:70: warning: [W150] Parameter 'x' is never used
core.bas:70: warning: [W150] Parameter 'y' is never used
core.bas:70: warning: [W150] Parameter 'char' is never used
core.bas:70: warning: [W150] Parameter 'colour' is never used
...compiling:  stage-init
stage-include.bas:10: warning: [W170] Function 's_ram_copy' is never called and has been ignored
stage-include.bas:24: warning: [W170] Function 's_print_char_at' is never called and has been ignored
...compiling:  stage-left
stage-include.bas:3: warning: [W170] Function 's_next_reg' is never called and has been ignored
stage-include.bas:10: warning: [W170] Function 's_ram_copy' is never called and has been ignored
stage-include.bas:17: warning: [W170] Function 's_clear_screen' is never called and has been ignored
stage-include.bas:31: warning: [W170] Function 's_print_string_at' is never called and has been ignored
...compiling:  stage-right
stage-include.bas:3: warning: [W170] Function 's_next_reg' is never called and has been ignored
stage-include.bas:10: warning: [W170] Function 's_ram_copy' is never called and has been ignored
stage-include.bas:17: warning: [W170] Function 's_clear_screen' is never called and has been ignored
stage-include.bas:31: warning: [W170] Function 's_print_string_at' is never called and has been ignored
PS D:\zxnext\projects\demo>


...using thisPowerShell:

Code:
$ErrorActionPreference = 'Stop'

Function Abort {
    Param( [string]$Text )
    Write-Error $Text
    Break Script
}

$Compiler = 'D:\zxnext\boriel\zxbc.py'
python $Compiler --version

$Assembler = 'unknown'


# compile the core engine, this sits at address 0 and contains the IM1 interrupt vector...
Write-Host '...compiling:  core'
# ...help says this:  headerless mode: omit ASM prologue and epilogue
# ...I have no idea as yet whether I need either or neither or both...
python $Compiler core.bas -f asm -o core.asm --org 0 -W140 -W160 --headerless --explicit --strict --zxnext -i --arch zxnext --opt-strategy size --heap-address 16000 --heap-size 383
$Status = $LastExitCode
If ( $Status -ne 0 ) { Abort "...failed, status:  $Status" }


# compile the paged stage modules, these all target the MMU3 slot at $6000 (24576)...
$Stages = @( 'init', 'left', 'right' )
ForEach ( $Stage In $Stages ) {
    $Name = "stage-$($Stage)"
    Write-Host "...compiling:  $Name"
    python $Compiler "$($Name).bas" -f asm -o "$($Name).asm" --org 24576 -W150 --headerless --explicit --strict --zxnext -i --arch zxnext --opt-strategy size --heap-address 32000 --heap-size 767
    $Status = $LastExitCode
    If ( $Status -ne 0 ) { Abort "...failed, status:  $Status" }
}


Break Script


So, I have four new ".asm" files...

...does anyone have any tips on how I can assemble them join them together in to some kind of '.nex' package ?  Please Smile     thank you!
Reply


Messages In This Thread
RE: non-paged supervisor code calling paged application code - by sdo303 - 2026-02-17, 06:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)