Welcome, Guest. Please login or register.

Author Topic: wb program init in assembler  (Read 5265 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: wb program init in assembler
« on: March 03, 2003, 03:02:22 PM »
Heh. I'll shut up then  :-D
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: wb program init in assembler
« Reply #1 on: March 03, 2003, 04:50:30 PM »
Yeah, I should know this stuff, but the truth is i've never written my own code to handle this (some coder gave me a "wbstartup.i" which i've always used in assembler, and in C i just used the compiler startup code.

In future i promise to check my facts first ;)
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: wb program init in assembler
« Reply #2 on: March 03, 2003, 05:01:47 PM »
Quote

However, programs run from CLI *MUST* call Permit() for each Forbid() since the final 'rts' drops back to shell, and does not terminate the process


This is true, but in most cases Forbid()/Permit() pairs can and should be avoided; Semaphores come in very handy here :)
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: wb program init in assembler
« Reply #3 on: March 03, 2003, 05:27:30 PM »
Quote

This is true, but in most cases ObtainSemaphore()/ReleaseSemaphore() pairs can and should be avoided; Locking-free design come in very handy here :))


Considering that the Amiga doesn't have proper threads, when using multithreaded programs, Semaphores can be very useful for things like access to memory pools, lists that could be modified by other threads, etc. etc.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: wb program init in assembler
« Reply #4 on: March 03, 2003, 05:38:14 PM »
Yeah, tbh, my pedanticism is a little bit of face saving. I have my pride, you know :)
Playstation Network ID: xeron6