Author Topic: Hisoft C - does anybody have "firmware.lib"?  (Read 422 times)

0 Members and 1 Guest are viewing this topic.

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Hisoft C - does anybody have "firmware.lib"?
« on: 14:06, 24 July 18 »

edit: Thanks to AMSDOS, I've managed to copy/paste one file (FIRM1.LIB) together from the disk viewer in WinAPE. I've attached it to this post for future travellers.


--------------------------------------------

On page 109 of the Hisoft C manual, it says:


Quote
Another library called "firmware.lib" is also available which provides direct access to all the jumpblock entries. This can be bought direct from Hisoft.


I know I can use inline to use opcodes to do this myself, but the manual hints that I need to protect registers which makes the referenced file seem more attractive.



« Last Edit: 18:38, 26 July 18 by sno0ks »

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 590
  • Country: de
  • Reincarnation of TFM
  • Liked: 268
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #1 on: 18:01, 24 July 18 »
Sorry, no, but there is one for Small-C, but I can't upload DSK's here.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2018.08.23)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Ver.: 2018.08.15)

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #2 on: 18:11, 24 July 18 »
Interesting, thanks. Can you zip the dsk file to upload it, or is there another reason you can't?

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 590
  • Country: de
  • Reincarnation of TFM
  • Liked: 268
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #3 on: 19:05, 24 July 18 »

Interesting, thanks. Can you zip the dsk file to upload it?
You could use this link. Be quick  ;)
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2018.08.23)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Ver.: 2018.08.15)

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #4 on: 19:52, 24 July 18 »
Thanks, but the link isn't available to guests. Is there an issue with posting files here?

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.453
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 707
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #5 on: 13:26, 26 July 18 »
A Sector View of the Hisoft C Disk on CPC-Power in the Files Tab reveals a series of Files called FIRM1..6.LIB, but are in User area 229 (I can't remember if that's the Deleted area, but don't know what else that would be since the deleted area resides up there somewhere).


I also found another copy of HisoftC on David Cantrell's Mirror site in the Unclassified/Lang Folder all by itself!
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #6 on: 14:31, 26 July 18 »
Thanks for the research, it would be really nice to have a look at it!

I'll start rolling my own until that magic moment. I'll think it only dangerous using inline when it's.. well... inline since function calls need to stash registers (somebody please correct me if anything I ever say is wrong btw).

I've sanitised the syscall section of The Amstrad CPC Firmware Guide so I can automate at least part of that process, but probably will just get the essentials together. I can at least spit out helpful #defines or asm directives now:


Code: [Select]
_KL_CHOKE_OFF                equ &BCC8
_KL_ROM_WALK                 equ &BCCB
_KL_INIT_BACK                equ &BCCE
_KL_LOG_EXT                  equ &BCD1
_KL_FIND_COMMAND             equ &BCD4
_KL_NEW_FRAME_FLY            equ &BCD7
_KL_ADD_FRAME_FLY            equ &BCDA
_KL_DEL_FRAME_FLY            equ &BCDD
_KL_NEW_FAST_TICKER          equ &BCE0
_KL_ADD_FAST_TICKER          equ &BCE3
_KL_DEL_FAST_TICKER          equ &BCE6
_KL_ADD_TICKER               equ &BCE9
_KL_DEL_TICKER               equ &BCEC
_KL_INIT_EVENT               equ &BCEF
_KL_EVENT                    equ &BCF2
_KL_SYNC_RESET               equ &BCF5
_KL_DEL_SYNCHRONOUS          equ &BCF8
_KL_NEXT_SYNC                equ &BCFB
_KL_DO_SYNC                  equ &BCFE
_KL_DONE_SYNC                equ &BD01
_KL_EVENT_DISABLE            equ &BD04
_KL_EVENT_ENABLE             equ &BD07
_KL_DISARM_EVENT             equ &BD0A
_KL_TIME_PLEASE              equ &BD0D
_KL_TIME_SET                 equ &BD10
_RESET_ENTRY                 equ &0000
_LOW_JUMP                    equ &0008
_KL_LOW_PCHL                 equ &000B
_PCBC_INSTRUCTION            equ &000E
_SIDE_CALL                   equ &0010
_KL_SIDE_PCHL                equ &0013
_PCDE_INSTRUCTION            equ &0016
_FAR_CALL                    equ &0018
_KL_FAR_PCHL                 equ &001B
_PCHL_INSTRUCTION            equ &001E
_RAM_LAM                     equ &0020
_KL_FAR_CALL                 equ &0023
_FIRM_JUMP                   equ &0028
_USER_RESTART                equ &0030
_INTERRUPT_ENTRY             equ &0038
_EXT_INTERRUPT               equ &003B
_KL_U_ROM_ENABLE             equ &B900
_KL_U_ROM_DISABLE            equ &B903
_KL_L_ROM_ENABLE             equ &B906
_KL_L_ROM_DISABLE            equ &B909
_KL_ROM_RESTORE              equ &B90C
_KL_ROM_SELECT               equ &B90F
_KL_CURR_SELECTION           equ &B912
_KL_PROBE_ROM                equ &B915
_KL_ROM_DESELECT             equ &B918
_KL_LDIR                     equ &B91B
_KL_LDDR                     equ &B91E
_KL_POLL_SYNCHRONOUS         equ &B921
_KL_SCAN_NEEDED              equ &B92A
_KM_INITIALISE               equ &BB00
_KM_RESET                    equ &BB03
_KM_WAIT_CHAR                equ &BB06
_KM_READ_CHAR                equ &BB09
_KM_CHAR_RETURN              equ &BB0C
_KM_SET_EXPAND               equ &BB0F
_KM_GET_EXPAND               equ &BB12
_KM_EXP_BUFFER               equ &BB15
_KM_WAIT_KEY                 equ &BB18
_KM_READ_KEY                 equ &BB1B
_KM_TEST_KEY                 equ &BB1E
_KM_GET_STATE                equ &BB21
_KM_GET_JOYSTICK             equ &BB24
_KM_SET_TRANSLATE            equ &BB27
_KM_GET_TRANSLATE            equ &BB2A
_KM_SET_SHIFT                equ &BB2D
_KM_GET_SHIFT                equ &BB30
_KM_SET_CONTROL              equ &BB33
_KM_GET_CONTROL              equ &BB36
_KM_SET_REPEAT               equ &BB39
_KM_GET_REPEAT               equ &BB3C
_KM_SET_DELAY                equ &BB3F
_KM_GET_DELAY                equ &BB42
_KM_ARM_BREAK                equ &BB45
_KM_DISARM_BREAK             equ &BB48
_KM_BREAK_EVENT              equ &BB4B
_TXT_INITIALISE              equ &BB4E
_TXT_RESET                   equ &BB51
_TXT_VDU_ENABLE              equ &BB54
_TXT_VDU_DISABLE             equ &BB57
_TXT_OUTPUT                  equ &BB5A
_TXT_WR_CHAR                 equ &BB5D
_TXT_RD_CHAR                 equ &BB60
_TXT_SET_GRAPHIC             equ &BB63
_TXT_WIN_ENABLE              equ &BB66
_TXT_GET_WINDOW              equ &BB69
_TXT_CLEAR_WINDOW            equ &BB6C
_TXT_SET_COLUMN              equ &BB6F
_TXT_SET_ROW                 equ &BB72
_TXT_SET_CURSOR              equ &BB75
_TXT_GET_CURSOR              equ &BB78
_TXT_CUR_ENABLE              equ &BB7B
_TXT_CUR_DISABLE             equ &BB7E
_TXT_CUR_ON                  equ &BB81
_TXT_CUR_OFF                 equ &BB84
_TXT_VALIDATE                equ &BB87
_TXT_PLACE_CURSOR            equ &BB8A
_TXT_REMOVE_CURSOR           equ &BB8D
_TXT_SET_PEN                 equ &BB90
_TXT_GET_PEN                 equ &BB93
_TXT_SET_PAPER               equ &BB96
_TXT_GET_PAPER               equ &BB99
_TXT_INVERSE                 equ &BB9C
_TXT_SET_BACK                equ &BB9F
_TXT_GET_BACK                equ &BBA2
_TXT_GET_MATRIX              equ &BBA5
_TXT_SET_MATRIX              equ &BBA8
_TXT_SET_M_TABLE             equ &BBAB
_TXT_GET_M_TABLE             equ &BBAE
_TXT_GET_CONTROLS            equ &BBB1
_TXT_STR_SELECT              equ &BBB4
_TXT_SWAP_STREAMS            equ &BBB7
_GRA_INITIALISE              equ &BBBA
_GRA_RESET                   equ &BBBD
_GRA_MOVE_ABSOLUTE           equ &BBC0
_GRA_MOVE_RELATIVE           equ &BBC3
_GRA_ASK_CURSOR              equ &BBC6
_GRA_SET_ORIGIN              equ &BBC9
_GRA_GET_ORIGIN              equ &BBCC
_GRA_WIN_WIDTH               equ &BBCF
_GRA_WIN_HEIGHT              equ &BBD2
_GRA_GET_W_WIDTH             equ &BBD5
_GRA_GET_W_HEIGHT            equ &BBD8
_GRA_CLEAR_WINDOW            equ &BBDB
_GRA_SET_PEN                 equ &BBDE
_GRA_GET_PEN                 equ &BBE1
_GRA_SET_PAPER               equ &BBE4
_GRA_GET_PAPER               equ &BBE7
_GRA_PLOT_ABSOLUTE           equ &BBEA
_GRA_PLOT_RELATIVE           equ &BBED
_GRA_TEST_ABSOLUTE           equ &BBF0
_GRA_TEST_RELATIVE           equ &BBF3
_GRA_LlNE_ABSOLUTE           equ &BBF6
_GRA_LINE_RELATIVE           equ &BBF9
_GRA_WR_CHAR                 equ &BBFC
_SCR_INITIALISE              equ &BBFF
_SCR_RESET                   equ &BC02
_SCR_SET_OFFSET              equ &BC05
_SCR_SET_BASE                equ &BC08
_SCR_GET_LOCATION            equ &BC0B
_SCR_SET_MODE                equ &BC0E
_SCR_GET_MODE                equ &BC11
_SCR_CLEAR                   equ &BC14
_SCR_CHAR_LIMITS             equ &BC17
_SCR_CHAR_POSITION           equ &BC1A
_SCR_DOT_POSITION            equ &BC1D
_SCR_NEXT_BYTE               equ &BC20
_SCR_PREV_BYTE               equ &BC23
_SCR_NEXT_LINE               equ &BC26
_SCR_PREV_LINE               equ &BC29
_SCR_INK_ENCODE              equ &BC2C
_SCR_INK_DECODE              equ &BC2F
_SCR_SET_INK                 equ &BC32
_SCR_GET_INK                 equ &BC35
_SCR_SET_BORDER              equ &BC38
_SCR_GET_BORDER              equ &BC3B
_SCR_SET_FLASHING            equ &BC3E
_SCR_GET_FLASHING            equ &BC41
_SCR_FILL_BOX                equ &BC44
_SCR_FLOOD_BOX               equ &BC17
_SCR_CHAR_INVERT             equ &BC4A
_SCR_HW_ROLL                 equ &BC4D
_SCR_SW_ROLL                 equ &BCS0
_SCR_UNPACK                  equ &BC53
_SCR_REPACK                  equ &BC56
_SCR_ACCESS                  equ &BC59
_SCR_PIXELS                  equ &BC5C
_SCR_HORIZONTAL              equ &BC5F
_SCR_VERTICAL                equ &BC62
_CAS_INITIALISE              equ &BC65
_CAS_SET_SPEED               equ &BC68
_CAS_NOISY                   equ &BC6B
_CAS_START_MOTOR             equ &BC6E
_CAS_STOP_MOTOR              equ &BC71
_CAS_RESTORE_MOTOR           equ &BC74
_xCAS_IN_OPEN                equ &BC77
_xCAS_IN_CLOSE               equ &BC7A
_xCAS_IN_ABANDON             equ &BC7D
_xCAS_IN_CHAR                equ &BC80
_xCAS_IN_DIRECT              equ &BC83
_xCAS_RETURN                 equ &BC86
_xCAS_TEST_EOF               equ &BC89
_xCAS_OUT_OPEN               equ &BC8C
_xCAS_OUT_CLOSE              equ &BC8F
_xCAS_OUT_ABANDON            equ &BC92
_xCAS_OUT_CHAR               equ &BC95
_xCAS_OUT_DIRECT             equ &BC98
_xCAS_CATALOG                equ &BC9B
_CAS_WRITE                   equ &BC9E
_CAS_READ                    equ &BCA1
_CAS_CHECK                   equ &BCA4
_BIOS_SET_MESSAGE            equ &C033
_BIOS_SETUP_DISC             equ &C036
_BIOS_SELECT_FORMAT          equ &C039
_BIOS_READ_SECTOR            equ &C03C
_BIOS_WRITE_SECTOR           equ &C03F
_BIOS_FORMAT_TRACK           equ &C042
_BIOS_MOVE_TRACK             equ &C045
_BIOS_GET_STATUS             equ &C048
_BIOS_SET_RETRY_COUNT        equ &C04B
_GET_SECTOR_DATA             equ &C56C
_SOUND_RESET                 equ &BCA7
_SOUND_QUEUE                 equ &BCAA
_SOUND_CHECK                 equ &BCAD
_SOUND_ARM_EVENT             equ &BCB0
_SOUND_RELEASE               equ &BCB3
_SOUND_HOLD                  equ &BCB6
_SOUND_CONTINUE              equ &BCB9
_SOUND_AMPL_ENVELOPE         equ &BCBC
_SOUND_TONE_ENVELOPE         equ &BCBF
_SOUND_A_ADDRESS             equ &BCC2
_SOUND_T_ADDRESS             equ &BCC5
_MC_BOOT_PROGRAM             equ &BD13
_MC_START_PROGRAM            equ &BD16
_MC_WAIT_FLYBACK             equ &BD19
_MC_SET_MODE                 equ &BD1C
_MC_SCREEN_OFFSET            equ &BD1F
_MC_CLEAR_INKS               equ &BD22
_MC_SET_INKS                 equ &BD25
_MC_RESET_PRINTER            equ &BD28
_MC_PRINT_CHAR               equ &BD2B
_MC_BUSY_PRINTER             equ &BD2E
_MC_SEND_PRINTER             equ &BD31
_MC_SOUND_REGISTER           equ &BD34
_JUMP_RESTORE                equ &BD37
_KM_SET_LOCKS                equ &BD3A
_KM_FLUSH                    equ &BD3D
_TXT_ASK_STATE               equ &BD40
_GRA_DEFAULT                 equ &BD43
_GRA_SET_BACK                equ &BD46
_GRA_SET_FIRST               equ &BD49
_GRA_SET_LINE_MASK           equ &BD4C
_GRA_FROM_USER               equ &BD4F
_GRA_FILL                    equ &BD52
_SCR_SET_POSITION            equ &BD55
_MC_PRINT_TRANSLATION        equ &BD58
_KL_BANK_SWITCH              equ &BD5B
_TXT_DRAW_CURSOR             equ &BDCD
_TXT_UNDRAW_CURSOR           equ &BDD0
_TXT_WRITE_CHAR              equ &BDD3
_TXT_UNWRITE                 equ &BDD6
_TXT_OUT_ACTION              equ &BDD9
_GRA_PLOT                    equ &BDDC
_GRA_TEST                    equ &BDDF
_GRA_LINE                    equ &BDE2
_SCR_READ                    equ &BDE5
_SCR_WRITE                   equ &BDE8
_SCR_MODE_CLEAR              equ &BDEB
_KM_TEST_BREAK               equ &BDEE
_MC_WAIT_PRINTER             equ &BDF1
_KM_SCAN_KEYS                equ &BDF4
_MOVE_REAL                   equ &BDC1
_INTEGER_TO_REAL             equ &BD64
_BINARY_TO_REAL              equ &BD67
_REAL_TO_INTEGER             equ &BD6A
_REAL_TO_BINARY              equ &BD6D
_REAL_FIX                    equ &BD70
_REAL_INT                    equ &BD73
_REAL_x10_POW_A              equ &BD79
_REAL_ADDITION               equ &BD7C
_REAL_REVERSE_SUBTRACTION    equ &BD82
_REAL_MULTIPLICATION         equ &BD85
_REAL_DIVISION               equ &BD88
_REAL_COMPARISON             equ &BD8E
_REAL_UNARY_MINUS            equ &BD91
_REAL_SIGNUM_DIV_SGN         equ &BD94
_SET_ANGLE_MODE              equ &BD97
_REAL_PI                     equ &BD9A
_REAL_SQR                    equ &BD9D
_REAL_POWER                  equ &BDA0
_REAL_LOG                    equ &BDA3
_REAL_LOG_10                 equ &BDA6
_REAL_EXP                    equ &BDA9
_REAL_SINE                   equ &BDAC
_REAL_COSINE                 equ &BDAF
_REAL_TANGENT                equ &BDB2
_REAL_ARCTANGENT             equ &BDB5
_REAL_SUBTRACTION            equ &BD5B
_REAL_EXPONENT_ADDITION      equ &BD67
_INTEGER_ADDITION            equ &BDAC
_INTEGER_SUBTRACTION         equ &BDAF
_INTEGER_REVERSE_SUBTRACTION equ &BDB2
_INTEGER_MULTIPLICATION      equ &BDB5
_INTEGER_DIVISION            equ &BDB8
_INTEGER_DIVISION_2          equ &BDBB
_INTEGER_COMPARISON          equ &BDC4
_INTEGER_UNARY_MINUS         equ &BDC7
_INTEGER_SIGNUM_DIV_SGN      equ &BDCA
_TEXT_INPUT                  equ &BD5E
_REAL_RND                    equ &BD7F
_REAL_RN                     equ &BD8B

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 590
  • Country: de
  • Reincarnation of TFM
  • Liked: 268
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #7 on: 15:53, 26 July 18 »
Yes, for CP/M and native CPC-OS files get moved to user 229 = &E5 to delete them. Attention: If you want to restore them check if the block numbers are overwritten or not.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2018.08.23)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Ver.: 2018.08.15)

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #8 on: 18:43, 26 July 18 »
@AMSDOS : thanks for the pointer, I've attached the file I could retrieve to the OP. It's the full "The Key Manager" section from The Amstrad Firmware Guide and so there must be another dozen or so for other sections.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.453
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 707
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #9 on: 13:17, 27 July 18 »
Unfortunately I'm unsure what Hisoft-C has when it comes to handling the firmware. For example in Small-C, the Library used to make CPC-OS code sets aside some assembly code for handling the firmware, which uses a series of PUSH..POP statements for protecting the registers. A few years ago I was playing around with this, unfortunately I can't remember what for, obtaining values from firmware I think, though it wasn't at all fun I seem to recall.
* Using some of the hardly used Amstrad compilers :D
* I use Firmware in my Assembly code :P
* Have interpreted some BASIC 1.1 programs for BASIC 1.0. :)

Offline sno0ks

  • CPC464
  • **
  • Posts: 11
  • Country: gb
  • Liked: 3
Re: Hisoft C - does anybody have "firmware.lib"?
« Reply #10 on: 01:05, 28 July 18 »
It seems to be okay because the inline code is limited to the body of simple functions. It seems that register clobbering issues would only arise when more is going on within functions where inline asm is employed. Time will tell.  :D