Giter VIP home page Giter VIP logo

Comments (8)

markpizz avatar markpizz commented on August 19, 2024

Hi Harry,

You raise two issues here, but maybe we can address both in the same place.

  1. This 'seems' OK. There are some register scoping issues I've been thinking about which may interleave with this idea. Send me diffs for scp.c.
  2. I think this capability already exists. There is provision for per simulator commands which are looked-up before the standard command table is consulted. It would be best if command verbs didn't collide so the imbedded help wouldn't be confusing, but that would be the only negative for name collisions. I'm most familiar with the VAX simulator and I know that it implemented a BOOT command using this mechanism.... Look at what fills in sim_vm_cmd in the VAX simulator...

from simh.

markpizz avatar markpizz commented on August 19, 2024

Also, several VAX simulators (VAX780) implement a FLOAD command which for your simulator can have pretty much any set of arguments and/or flags you want.

from simh.

doon386 avatar doon386 commented on August 19, 2024

Mark,

Here is the diff between the original scp.c from v3.9 and what I'm
currently using. The change is in find_reg() (~line 3897) and it allows
for register names that contain a "." to be used. (Oddly enough, simh
already will display registers with an embedded ".", just not deposit to
them.)

I understand your concern regarding name collisions with the standard
command tables and the Help system. I've implemented several per
simulator commands, but I just love the idea of extension

Thanks,
Harry Reed

===== Cut here 8< ===== Cut Here 8< =====

25a26

08-May-12 RMS Fixed memory leaks in save/restore (Peter Schorn)
2347c2348,2349

< if (r != SCPE_OK)

                if (r != SCPE_OK) {
                    free (mbuf);

2348a2351
}
2552c2555,2558

< READ_I (blkcnt); /* block count */

            if (sim_fread (&blkcnt, sizeof (blkcnt), 1, rfile) == 
  1. {
    free (mbuf); /* read blk
    cnt /
    return SCPE_IOERR;
    }
    2556c2562,2563
    < if (limit <= 0) /
    invalid or

err? */

            if (limit <= 0) {                       /* invalid or 

err? */
free (mbuf);
2557a2565
}
2563c2571,2572

< if (r != SCPE_OK)

                if (r != SCPE_OK) {
                    free (mbuf);

2564a2574
}
3897c3907

< } while (isalnum (_tptr) || (tptr == '') || (tptr == ''));

} while (isalnum (*tptr) || (*tptr == '*') || (*tptr == '_') || 

(*tptr == '.')); // HWR 12 Nov 2012 - Added '.' (so far so good)

On 3/8/13 11:15 AM, Mark Pizzolato wrote:

Hi Harry,

You raise two issues here, but maybe we can address both in the same
place.

  1. This 'seems' OK. There are some register scoping issues I've been
    thinking about which may interleave with this idea. Send me diffs for
    scp.c.
  2. I think this capability already exists. There is provision for per
    simulator commands which are looked-up before the standard command
    table is consulted. It would be best if command verbs didn't collide
    so the imbedded help wouldn't be confusing, but that would be the only
    negative for name collisions. I'm most familiar with the VAX simulator
    and I know that it implemented a BOOT command using this mechanism....
    Look at what fills in sim_vm_cmd in the VAX simulator...


Reply to this email directly or view it on GitHub
#36 (comment).

from simh.

markpizz avatar markpizz commented on August 19, 2024

Hi Harry,

I've added the (*tptr == '.') to the logic parsing register names. I think this should meet your needs for point 1.

I think the existing functionality allows you to add your own unique commands or replacement command processors to your simulator.

Let me know if there are other things you find or need.

Please migrate your simulator to the current codebase and supply any future patch suggestions against that.

Thanks.

Please send me ([email protected]) your email address, so I can contact you directly if needed in the future.

  • Mark Pizzolato

from simh.

doon386 avatar doon386 commented on August 19, 2024

Thanks Mark!

My plan is to migrate to v4 when it goes "gold" or do you think that the
current codebase is satisfactory for production?

Harry

On 3/11/13 12:39 PM, Mark Pizzolato wrote:

Hi Harry,

I've added the (*tptr == '.') to the logic parsing register names. I
think this should meet your needs for point 1.

I think the existing functionality allows you to add your own unique
commands or replacement command processors to your simulator.

Let me know if there are other things you find or need.

Please migrate your simulator to the current codebase and supply any
future patch suggestions against that.

Thanks.

Please send me ([email protected] mailto:[email protected]) your
email address, so I can contact you directly if needed in the future.

  • Mark Pizzolato


Reply to this email directly or view it on GitHub
#36 (comment).

Harry W. Reed | Never ascribe to malice that which can
[email protected] | adequately be explained by stupidity.
+--------------------+--------------------+----------------------------------+
"Of all tyrannies a tyranny sincerely exercised for the good of its victims
may be the most oppressive. It may be better to live under robber barons
than under omnipotent moral busybodies, The robber baron's cruelty may
sometimes sleep, his cupidity may at some point be satiated; but those who
torment us for own good will torment us without end, for they do so with
the approval of their own conscience." - C.S. Lewis, God in the Dock
+--------------------+--------------------+----------------------------------+
"Truth often suffers more by the heat of its defenders than the arguments
of its opponents." -- Sir William Penn

"Right is right, even if everyone is against it; and wrong is wrong, even
if everyone is for it." -- Sir William Penn
+--------------------+--------------------+----------------------------------+
If the assumptions are wrong, the conclusions aren't likely to be very good.

Corollary: If men neglect to pay plumbers and philosophers neither their pipes
nor their theories will hold water.
+--------------------+--------------------+----------------------------------+
When people start to comment on the form of the message, it is a sign that they
have problems accepting the truth of the message -- ???
+--------------------+--------------------+----------------------------------+
"It is proof of a base and low mind for one to wish to think with the masses
or majority, merely because the majority is the majority. Truth does not
change because it is, or is not, believed by a majority of the people."
Giordano Bruno
+--------------------+--------------------+----------------------------------+
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

from simh.

markpizz avatar markpizz commented on August 19, 2024

Functionality for a new simulator is stable. Everything in the current codebase is better and/or more stable than 3.9 for all existing simulators. Migration should be trivial or at worst easy.

Some of the future advanced features aren't yet enabled by default (i.e. currently inhibited by compile time defines or lack of them). In any case, these are all 'refinements' which may enhance performance or timing consistency, but shouldn't be needed one way or another for a simulator to work.

There are many bugfixes, cleanups and enhancements in the framework which are worth migrating to and you might find as a useful base to work from (i.e. support for imbedded help, physical serial ports for console and/or simulated devices, virtual & physical disk support), etc.

from simh.

markpizz avatar markpizz commented on August 19, 2024

I've just reviewed the details of the help implementation and if a simulator defines a command which is identical to one which is in the base set of commands, then the simulator specific implementation takes precedence both at execution time and during the display of help information. This addresses your second suggestion so I'm closing this issue.

I encourage you to merge the V4 code base now.

I'm closing this issue. If you have other suggestions or issues feel free to open other issues.

Thanks.

  • Mark Pizzolato

from simh.

doon386 avatar doon386 commented on August 19, 2024

OK, that'll do.

Thanks,
Harry Reed

On 3/12/13 11:18 AM, Mark Pizzolato wrote:

I've just reviewed the details of the help implementation and if a
simulator defines a command which is identical to one which is in the
base set of commands, then the simulator specific implementation takes
precedence both at execution time and during the display of help
information. This addresses your second suggestion so I'm closing this
issue.

I encourage you to merge the V4 code base now.

I'm closing this issue. If you have other suggestions or issues feel
free to open other issues.

Thanks.

  • Mark Pizzolato


Reply to this email directly or view it on GitHub
#36 (comment).

Harry W. Reed | Never ascribe to malice that which can
[email protected] | adequately be explained by stupidity.
+--------------------+--------------------+----------------------------------+
"Of all tyrannies a tyranny sincerely exercised for the good of its victims
may be the most oppressive. It may be better to live under robber barons
than under omnipotent moral busybodies, The robber baron's cruelty may
sometimes sleep, his cupidity may at some point be satiated; but those who
torment us for own good will torment us without end, for they do so with
the approval of their own conscience." - C.S. Lewis, God in the Dock
+--------------------+--------------------+----------------------------------+
"Truth often suffers more by the heat of its defenders than the arguments
of its opponents." -- Sir William Penn

"Right is right, even if everyone is against it; and wrong is wrong, even
if everyone is for it." -- Sir William Penn
+--------------------+--------------------+----------------------------------+
If the assumptions are wrong, the conclusions aren't likely to be very good.

Corollary: If men neglect to pay plumbers and philosophers neither their pipes
nor their theories will hold water.
+--------------------+--------------------+----------------------------------+
When people start to comment on the form of the message, it is a sign that they
have problems accepting the truth of the message -- ???
+--------------------+--------------------+----------------------------------+
"It is proof of a base and low mind for one to wish to think with the masses
or majority, merely because the majority is the majority. Truth does not
change because it is, or is not, believed by a majority of the people."
Giordano Bruno
+--------------------+--------------------+----------------------------------+
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw

from simh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.