Skip to content

[beep] make it round#1813

Merged
ghaerr merged 1 commit intoghaerr:masterfrom
floriangit:beep_makeit_round
Feb 18, 2024
Merged

[beep] make it round#1813
ghaerr merged 1 commit intoghaerr:masterfrom
floriangit:beep_makeit_round

Conversation

@floriangit
Copy link
Contributor

  1. adding author and adding documentation
  2. remove the SIGKILL handling, since this will never get caught in userland

We are now exactly with 1024bytes of the executable on x86_16: 0x3c0 for .text, 0x10 for .data and 0x30 for .bss
Main sizes analysed by map-files in .text are in almost same sizes:

  1. signal handling (also the signal callback is inserted)
  2. atol
  3. usleep
  4. divisions (ldiv from ia16-ldivmodu.o and udiv/umod from libgcc.a)

IMO removing the switch/case from beep_signal would deterior code readability, since now it's easy to catch what is handled and what not. Your mileage may vary, it would save only 16 bytes, though.

Happy beeping!

2) remove the SIGKILL handling, since this will never get caught in
   userland
@floriangit
Copy link
Contributor Author

o.mp4

Cannot beat the quality of a 40-year old PC speaker! 🥇

@ghaerr
Copy link
Owner

ghaerr commented Feb 18, 2024

Thanks for the update!

removing the switch/case from beep_signal would deterior code readability, since now it's easy to catch what is handled and what not.

True, but also only the two signals that are specified in calls to signal will ever be routed through beep_signal.

@ghaerr ghaerr merged commit 0e94872 into ghaerr:master Feb 18, 2024
@toncho11
Copy link
Contributor

There can be a C function provided by the compiler or ELKS source code that does the beep. It could be added to https://gitlab.com/tkchia/libi86 of @tkchia . Hmm, the libi86 has been moved from github to gitlab.

@toncho11
Copy link
Contributor

@floriangit
Copy link
Contributor Author

Is this a beep function https://gitlab.com/tkchia/libi86/-/blame/master/common/libi86/internal/graph.h#L273 ?

Hi @toncho11, I think this is same as I mentioned in the initial commit:
#1796

Yes, outputting \a will beep, but only if bound to a local TTY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants