BBC BASIC for Windows
« Calling SYS and BB4W OS Routines from Assembler »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:29pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Calling SYS and BB4W OS Routines from Assembler  (Read 604 times)
mohsen
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 39
xx Calling SYS and BB4W OS Routines from Assembler
« Thread started on: Nov 23rd, 2008, 6:55pm »

Calling SYS and BB4W OS Routines from Assembler
=====================================


I have some code that contains CALLs to BB4W OS Routines (mostly "Oswrch"), using CALL "oswrch", etc.

Rather than having the Assembler code built into the Program and assembled everytime it is run (duplication of space "source and code") I plan to assemble the code, save it into a separate file, then load it into DIMed memory and call the required routines from the program.

In fact, I have some 40+ assembly code routines I use to get some functions/tasks execute faster and rather than calling them through a source code library and assembling them everytime the program is run, I plan to build them as one code file with entry points (Jump) table header so that they can be used as an assembly code library.

My question, is that: as some of the code contains calls to Oswrch type routines (I assume the same also applies to SYS calls), will these calls work when the code is loaded into memory and executed.

The reason for asking, is that I have noticed that the CALL "oswrch" instruction uses the opcode "E8" which means "call procedure with displacement relative to next instruction".
Which means that the offset following the opcode is an offset to the interpreter internal "osworch" code or the SYS code.

Appreciate if someone can confirm this, and what possible alternatives can be used to be able to build a standalone library code that can be loaded into memory and executed.

Thanks
« Last Edit: Nov 23rd, 2008, 6:56pm by mohsen » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls