Jump to content

Recommended Posts

If I want to write in ASM I know MADS essentials ;)

 

I try to loop 10 [] etc.

 

write/line always ends with "repeat until keypressed" and so on.

 

I must wait, to early for me ;) 

Share this post


Link to post
Share on other sites
4 minutes ago, zbyti said:

write/line always ends with "repeat until keypressed" and so on.

That is not write/line, Meta does that on a DOS with a menu to enable you to read the output.

Share this post


Link to post
Share on other sites
./compile test.meta 
Compiling file test.meta

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0curl: (6) Could not resolve host: atari8.metaproject.frl

Result is in file program.xex

 

Share this post


Link to post
Share on other sites

Interesting:

 

count: 10

repeat count [write/line count: 10 - count]

write/line "end"

atari000.png.c59066880c8eb527c239060f49817ecd.png

 

count: 10

repeat count [write/line count: 10 + count]

write/line "end"

atari001.png.65da45c5484760f33725d74a65a4f929.png

count: 10

repeat count [write/line count: count + 1]

write/line "end"

atari002.png.b97c91d0a3ab873e355bd0b2f42c5a90.png

 

count: 10

repeat count [write/line count: count - 1]

write/line "end"

atari003.png.301209c9d9addcec013cdd6f037b1f02.png

Share this post


Link to post
Share on other sites
1 minute ago, Kaj de Vos said:

Correct again, but now you have a 16-bit counter instead of 8-bit.

but why 8-bit counter produced 0,10,0,10... and 16-bit correctly only 0?

Edited by zbyti

Share this post


Link to post
Share on other sites
count: 10

repeat count [write/line count: 10 - count]

and

count: 1000

repeat count [write/line count: 1000 - count]

are not the same?

Share this post


Link to post
Share on other sites

Actually,

count= 10

would give you an 8-bit loop.

 

2 minutes ago, zbyti said:

count: 10 - count

is different from

3 minutes ago, zbyti said:

count: 1000 - count

no?

Share this post


Link to post
Share on other sites
19 minutes ago, Kaj de Vos said:

That's correct, count is not used as the counter variable.

 

14 minutes ago, Kaj de Vos said:

If you want that, use

for count 10 []

 

 

Share this post


Link to post
Share on other sites

Why if I subtract 10 from 10 I have alternating result and if 1000 from 1000 is still 0.

 

I don't get it, the counter VARIABLE doesn't overlap and it's still not 0 in the first case.

 

--- EDIT ---

 

I understand repeat has its internal counter, I ask about MY variable.

Edited by zbyti

Share this post


Link to post
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...