Jump to content
IGNORED

MA Pascal : open(1,"D:mulbi.bin",...) with bget , bput ?


Recommended Posts

It does not include:


1. Case, Goto statements. Avoided by using If and While statements.

2. Records and multidimensional arrays. Avoided by using one-dimensional arrays and linear index calculation functions.

3. Recursion.

4. File operations.

Link to comment
Share on other sites

I believe Tebe will release new version sometime, but I believe he is also occupied with his life and other projects. Please give him time and we can expect new version with new features. Language already offers ways of doing things, specifically with integrated assembly (using asm command).

Link to comment
Share on other sites

I have something here for me tinkered with ASM for MAD Pascal.

I can write a file loaded with get.


but I believe that this ASM for a procedure in Pascal MAD is not entirely true.

I do not know where because the "equ" aim for in the procedure.


It lacks a variable transfer for string "D: MULBI.BIN" for Screen and address for file-lenght.



Greeting





procedure fileget;
begin
asm
{
iccom equ $342
icbadr equ $344
icblen equ $348
icaux equ $34a
ciov equ $e456

ldx #$10
lda #12
sta iccom,x
jsr ciov

ldx #$10
lda #3
sta iccom,x
lda #<file
sta icbadr,x
lda #>file
sta icbadr+1,x
lda #4
sta icaux,x
jsr ciov

ldx #$10
lda #7
sta iccom,x
lda #$60
sta icbadr,x
lda #$90 ; screen $9060
sta icbadr+1,x
lda #$0
sta icblen,x
lda #$f ; file-lengt $f00 (3480)
sta icblen+1,x
jsr ciov

ldx #$10
lda #12
sta iccom,x
jsr ciov

rts

file dta c'D:MULBI.BIN'
};
end;

Edited by funkheld
Link to comment
Share on other sites

Hi good afternoon.

now works with FileGet:


FileGet (namew, scr, lenght);


greeting


atari.hea:

...........


iocb = $340 ; IOCB

iocom = iocb+2 ; Komenda dla IOCB

ioadr = iocb+4 ; (2) Adres bufora dla IOCB

iolen = iocb+8 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>!!!!!! new

ioaux1 = iocb+10 ; Bajt pomocniczy 1 IOCB

ioaux2 = iocb+11 ; Bajt pomocniczy 2 IOCB

...........






var
dlist: array [0..52] of word;
name: string;
scr,lenght,namew:word;

procedure InitDlist(a: word);
begin
dlist[0]:=$7070; dlist[1]:=$4d70;
dlist[2]:=$9060;
dlist[3]:=$0d0d; dlist[4]:=$0d0d; dlist[5]:=$0d0d; dlist[6]:=$0d0d;dlist[7]:=$0d0d;
dlist[8]:=$0d0d; dlist[9]:=$0d0d; dlist[10]:=$0d0d; dlist[11]:=$0d0d;dlist[12]:=$0d0d;
dlist[13]:=$0d0d; dlist[14]:=$0d0d; dlist[15]:=$0d0d; dlist[16]:=$0d0d;dlist[17]:=$0d0d;
dlist[18]:=$0d0d; dlist[19]:=$0d0d; dlist[20]:=$0d0d; dlist[21]:=$0d0d;dlist[22]:=$0d0d;
dlist[23]:=$0d0d; dlist[24]:=$0d0d; dlist[25]:=$0d0d; dlist[26]:=$0d0d;dlist[27]:=$0d0d;
dlist[28]:=$0d0d; dlist[29]:=$0d0d; dlist[30]:=$0d0d; dlist[31]:=$0d0d;dlist[32]:=$0d0d;
dlist[33]:=$0d0d; dlist[34]:=$0d0d; dlist[35]:=$0d0d; dlist[36]:=$0d0d;dlist[37]:=$0d0d;
dlist[38]:=$0d0d; dlist[39]:=$0d0d; dlist[40]:=$0d0d; dlist[41]:=$0d0d;dlist[42]:=$0d0d;
dlist[43]:=$0d0d; dlist[44]:=$0d0d; dlist[45]:=$0d0d; dlist[46]:=$0d0d;dlist[47]:=$0d0d;
dlist[48]:=$0d0d; dlist[49]:=$0d0d; dlist[50]:=$0d41;
dlist[51]:=a;
end;

procedure fileget(namew,scr,lenght:word);
begin
asm
{
stx @sp
ldx #$10
lda #12
sta iocom,x
jsr ciov

ldx #$10
lda #3
sta iocom,x
mwa namew ioadr,x
lda #4
sta ioaux1,x
jsr ciov

ldx #$10
lda #7
sta iocom,x
mwa scr ioadr,x
mwa lenght iolen,x
jsr ciov

ldx #$10
lda #12
sta iocom,x
jsr ciov

ldx @sp
rts
};
end;

begin
InitDlist(word(@dlist));

InitGraph(7);
DPoke(560,word(@dlist));
DPoke($58,36960);

name:='D:MULBI.BIN';
namew:=word(@name);
scr:=$9060;
lenght:=$f00;

fileget(namew,scr,lenght);

repeat
until keypressed;

end.

Edited by funkheld
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...