The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree
Warning [2] Undefined array key "bas" - Line: 4649 - File: inc/functions.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/functions.php 4649 errorHandler->error_callback
/inc/functions_post.php 1034 get_attachment_icon
/inc/functions_post.php 856 get_post_attachments
/showthread.php 917 build_postbit
Warning [2] Trying to access array offset on value of type null - Line: 4649 - File: inc/functions.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/functions.php 4649 errorHandler->error_callback
/inc/functions_post.php 1034 get_attachment_icon
/inc/functions_post.php 856 get_post_attachments
/showthread.php 917 build_postbit




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add more library functions
#7
britlion Wrote:I completely agree I need other people to test these. I didn't write the original code, just reworked it from well known sources into shape; which means there are likely to be bugs.

I'll look into this one after work today.
I've made some changes to your routine. Please download and compare.

Some corrections:
  • Removed the LD DE,(XXXX) block. It's useless and might corrupt the HEAP
  • Check if HL==0 (NULL) at the beginning of the asm code, and return if so (this can happen if not enough memory)
  • Remove the FASTCALL and, instead of returning immediately, jump to the end of subroutine whenever required. The string ByVal parameters must be freed upon return, or there will be a memory leak (yes, the same that happened with print64 Tongue)
  • Make as much labels as possible LOCAL, so it won't pollute namespace and won't collide with other routines. E.g. nextchar label could be used in many other routines (e.g. print64).
Have a look at this file, please and tell me (it works ok to me). Also, if you notice something to fix up, please do so and post it back.


Attached Files
.bas   print42.bas (Size: 15.68 KB / Downloads: 168)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)