Browsing this Thread:
1 Anonymous Users
Re: comment charger et executer un programme basic depuis une routine assembleur
|
||||
---|---|---|---|---|
Modérateur
![]() ![]() ![]() |
Il faut que ca soit le basic qui l'interprete...
J'peux pas t'aider la dessus, jamais réfléchis à la chose (je ne vois pas trop l'interet non plus). Demande à Tom & Jerry il devrait pouvoir te renseigner ;)
Posted on: 21/01/2014 19:20
|
|||
|
Re: comment charger et executer un programme basic depuis une routine assembleur
|
||||
---|---|---|---|---|
Chti nouveau
![]() ![]() ![]() |
J'ai trouvé ce code qui charge un programme BASIC et appel la commande BASIC "LIST". On voit bien le listing du programme défilé sans problème.
Par contre, la commande "RUN" ne fonctionne pas et ne lance pas le programme. Bizarre. Ici, le code ASM : .cas_in_open equ &bc77 .cas_in_direct equ &bc83 .cas_in_close equ &bc7a org &100 call load_file call run_file ret .load_file ;; B = length of the filename in characters ld b,end_filename-filename ;; HL = address of the start of the filename ld hl,filename ;; DE = address of a 2k buffer ;; ;; in disc mode: this buffer is not used when CAS IN DIRECT ;; firmware function is used, so it is safe to put it anywhere ;; you want. ld de,0 ;; firmware function to open a file for reading call cas_in_open ;; cas_in_open returns: ;; if file was opened successfully: ;; - carry is true ;; - HL contains address of the file's AMSDOS header ;; - DE contains the load address of the file (from the header) ;; - BC contains the length of the file (from the file header) ;; - A contains the file type (2 for binary files) ;; firmware function to load the entire file ;; this will work with files that have a AMSDOS header (ASCII ;; files do not have a header) ;; HL = load address ld hl,&170 ;; read file call cas_in_direct ;; firmware function to close a file opened for reading call cas_in_close ret .end_load_file ;; the filename to load ;; disc filenames are a maximum of 12 characters long ;; 8 characters for name, and 3 characters for extension .filename defb "BALLS.BAS" .end_filename .run_file LD HL,stat DI EXX LD B,&7F RES 3,C OUT (C),C EXX EI JP &C0B4 ret .end_run_file .stat defm 'LIST' .end_stat
Posted on: 19/02/2018 17:29
|
|||
|
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You can attach files to posts.
You cannot post without approval.
You can use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.