Memory Full

Forum / Development

Orgams - The Users Speak!

first previous Page: 1 2 3 4 next last

Hicks * 22 Mar 2019 09:18:05 * Modified at 09:19:00

It would be quite convenient to add an operand allowing us to reverse the LSB & MSB of a WORD, for example:

    WORD   &0BEB   ; write &EB,&0B
    RWORD  &0BEB   ; write &0B,&EB


But there is maybe already a way to do that without a new operand?

m_dr_m * 22 Mar 2019 15:00:44

Be creative!

   MACRO RWORD m
     BYTE m/&100,m and &ff
   ENDM

   RWORD(&0bed - 2)  ; Writes &0b,&eb

Hicks * 24 Mar 2019 18:25:07

Good idea, it fits very well!

Hicks * 14 Jun 2019 00:40:01 * Modified at 00:40:40

With repeated blocs, it will be convenient to be able to shorter the last one, for example like that:

8 ** [
ld (hl),a
set 3,h
ld (hl),a
res 3,h
...
ld (hl),a
add hl,bc
] - 1



Here, 7 complete blocs, and the last one without the last byte (-1) because 'add hl,bc' is useless. Or something equivalent.

Maybe more elegant than:

IF # < 7
add hl,bc
END

toms * 14 Jun 2019 16:50:01

In the example you suggest, is it better that the "-1" means -1 byte or -1 instruction?

If it's instruction related, it's easier to use (however, in some cases it could prevent clever tricks).

m_dr_m * 14 Jun 2019 17:24:54

Not sure about the elegance of « -1 »:
• Error prone
• Not self documenting (Exhibit A: Toms' question)

Considering « # » is already known, « if #<7 » is more explicit.
By the way, a label should be used, to prevent changing the number of iteration while overlooking the test.

Another option to 'exit' the loop: C-like 'break'.

width ** [
   ld (de),a
BREAK if #=width-1
  inc e
]



Another option to know we've reached the last iteration: implicit pseudo-label.

width ** [
   ld (de),a
BREAK if __LAST__
   inc e
]



Or, a bit more cryptic:

width ** [ ld (de),a / inc e ]



Don't forget code is more often read than written, some verbosity doesn't hurt.

m_dr_m * 15 Jun 2019 14:11:01

What's with the set 3 / res 3 by the way?

ast * 16 Jun 2019 11:42:05 * Modified at 11:42:32

@m_dr_m : no way !!

:D

m_dr_m * 16 Jun 2019 14:48:50

More precisely: what's with the res 3 ?

m_dr_m * 19 Jun 2019 11:36:52

In the next version "Erratic Endeavour", one shall be able to enter RSXs in monogams.
Thus, I consider switching to firmware screen dimensions (80x25).

WDYT?

m_dr_m * 24 Jun 2019 09:40:37

Important!

Version EE will allow to include source files. Actually, I plan to name the directive IMPORT, since it doesn't strictly account to textual inclusion (by design, the included source cannot see the labels of the parent source).

Now there is another point: If two sources (A and B) both import a source L (useful routines, aka library) and a main root source imports A and B. We don't want L to be duplicated.
* For MACROs it's not a big deal since Orgams could reconcile them.
* For routines it's annoying.

We might use a "PRAGMA ONCE" directive, but I'm not fond of it.
The default should correspond to the most frequent usage.

So, I'm considering: only the first occurence of an import loads the source. In the rare case we actually want to include something several time, we'll just put it in a MACRO and invoke the MACRO at each place.

WDYT?

Hicks * 29 Jun 2019 11:32:40

Oh, set 3/res 3 was a mistake, I would like to write set 3/set 4 (classical '2us' BC26).

Thanks for the workaround solution for last iteration of a repeated code. But am I wrong or they are not yet implanted in Orgams? Is there already other implicit pseudo-labels (__LAST__) to know? (if yes, useful to include in the documentation?)

Firmware screen dimensions for Monogams (not Trace I guess): I think that's ok, a high height was mostly useful for the dump.

Nice news for the EE version!
'IMPORT library' is cool, but do you plan something like 'FROM library IMPORT keytest'? But it will be needed to put some balises to define 'keytest' in the source...

The situation you are mentionning won't be very commun I think so it seems to be ok for the MACRO tips to bypass the problem.

m_dr_m * 30 Jun 2019 15:07:09

None of these is available. The incoming priority is arithmetic comparators, so we'll stick to «  if # < width-1  » option. No other pseudo label than $, $$, #, ##, ### yet.

Thanks for the screen dimensions feedback. Anyway, the futurs prepares a full-blown hex editor (for files, snapshots or memory views), which will have it's own format (likely 25 lines of a customizable number of bytes up to 16. 25x16 > 31*8).

« 'IMPORT library' is cool, but do you plan something like 'FROM library IMPORT keytest'?
 »


No, because I think it's best to put such routines in macro which don't emit code anyway. You might write:

import "toolbox"

  ld a,&45:call test_key

test_key TEST_KEY():RET



The interesting point is that you could inline instead:

 ld a,&45:TEST_KEY() 



Which is might be beneficial for compression purpose, even if used more than once.

Also you'll be able to pass flags to imported source in order to activate or deactivated some part with conditional assembling.

m_dr_m * 08 Jul 2019 03:01:22

Tip of the day. Expressions work uniformly.

  BYTE "!"  ; &21
  ld a,"!"  ; &3e,&21

And in Monogams
?"!"
&0021   33    %00000000  00100001 

Hicks * 28 Jul 2019 17:25:43 * Modified at 17:28:46

Bug report (maybe already know): using # pseudo-label outside [ and ] bounds = olala (source corrupted!).

m_dr_m * 28 Jul 2019 17:40:12

Cannot reproduce:

Line 1: Unexpected # here
 >>>       ld a,#  
 



Please indicate which version you are using and the snippet producing the failure.

Hicks * 28 Jul 2019 17:44:57 * Modified at 17:46:30

Just try for example:

ld a,#*2


With 9.06.2019 version.

m_dr_m * 28 Jul 2019 18:01:38

Oh, thanks for the exploration!
I've found a way to reproduce: bug #E9.
So I hope that to be fixed soon.

ast * 30 Jul 2019 12:56:23

Is it possible to add rsx access into monogams ?

m_dr_m * 30 Jul 2019 19:32:53

Yes, incoming! Todo #21

Preventive warning: there will be a small mismatch for memory in &axxx-&bfff.
* m#b000 will continue to show program's memory.
* |burn,&b000,&e000,&100,13 will read firmware's memory.

Hicks * 09 Aug 2019 14:32:55 * Modified at 14:33:20

I would like to avoid to have to copy and paste at the begining of my sources all my macros.
At the moment, what is the clever way to avoid this with Orgams?
Two sources? Import? Include?

m_dr_m * 09 Aug 2019 18:03:21

Since import isn't available yet, macros must be in the source using them.
You could either have a skeleton source or a macros.txt file to include (CTRL-I) when needed.

Any help is welcome to make the import directive available.

m_dr_m * 29 Sep 2019 11:31:36 * Modified at 11:32:18

Incoming: Call stack.

So if you have for instance:

test_insert_row
   [...]
   call prepare_row
   call insert_row
   [...]

insert_row
   [...]
   call new_chunk
   call update_checksum
   [...]

new_chunk
   [...]
   ASSERT(every_is_fine)   <-- Breakpoint here.
   [...]



We will see in trace:

-- Main entry ---
  test_insert_row +&12
  insert_row +&1a
> new_chunk +&0f (most recent)



I haven't found yet which shortcut to use to navigate up/down to call stack.
Something + up/down.

Users, speak!

m_dr_m * 29 Sep 2019 16:00:27

Hesitation between:

Shift Up/Down
C Up/Down ('C' as call stack)

Hicks * 01 Oct 2019 23:06:02

Mini-feedback: it's sometimes useful to do CTRL+DEL, load a new source, and CTRL+P just in order to copy one line from one source to another, but the inserted line is empty...

first previous Page: 1 2 3 4 next last