Results 1 to 4 of 4

Thread: Visual Basic for MS-DOS

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2000
    Posts
    135

    Question

    Hello

    I need to call the "Int86x" type of interrupt call, not the following which is for a different call type:

    CALL INTERRUPT(&H21, regs, regs)

    Does Visual Basic for ms-dos support the Int86x call?

    I need to call an interrupt something like this:
    CALL int86x(&H60, InRegs, OutRegs, SegRegs)

    Can anyone help me please!!

    Cheers

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Qbasic can do that.
    As can any language that can handle assembly language

    VB can't do jack to help you here though
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  3. #3
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    Wrong.
    Vb for dos can do that. Allow me to post code samples and the declaration i use myself. Note, you have to include a library that comes with it. You can either use the include.bi file or just use my declaration.
    DECLARE SUB interrupt (intnum%, iReg AS RegType, oReg AS RegType)

    Type RegType
    ax As Integer
    bx As Integer
    cx As Integer
    dx As Integer
    bp As Integer
    si As Integer
    di As Integer
    flags As Integer
    ds As Integer
    es As Integer
    End Type
    Keep in mind that you need both a .qlb and a .lib. Include the .qlb when loading your project. When it compiles, it should find the .lib automatically. If it doesn't you willhave to use the dos compiler.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    read_sector:
    If sector > 0 Then
    If e_o_d = 13 Then
    sector = sector - 1
    GoSub read_sector2: sector = sector + 1
    spare_data = sector_data
    End If
    End If
    read_sector2:
    iReg.ax = Drive
    iReg.bx = VarPtr(packet)
    iReg.ds = VARSEG(packet)
    iReg.cx = &HFFFF
    Mid$(packet, 1, 4) = MKL$(sector)
    Mid$(packet, 5, 2) = MKI$(1)
    Mid$(packet, 7, 2) = MKI$(VarPtr(sector_data))
    Mid$(packet, 9, 2) = MKI$(VARSEG(sector_data))
    interrupt &H25, iReg, oReg
    Return

    write_sector:
    iReg.ax = Drive
    iReg.bx = VarPtr(packet)
    iReg.ds = VARSEG(packet)
    iReg.cx = &HFFFF
    Mid$(packet, 1, 4) = MKL$(sector)
    Mid$(packet, 5, 2) = MKI$(1)
    Mid$(packet, 7, 2) = MKI$(VarPtr(sector_data))
    Mid$(packet, 9, 2) = MKI$(VARSEG(sector_data))
    interrupt &H26, iReg, oReg
    Return

    mouse_reset:
    iReg.ax = 0
    interrupt &H33, iReg, oReg
    Return

    mouse_on:
    iReg.ax = 1
    interrupt &H33, iReg, oReg
    Return

    mouse_hide:
    iReg.ax = 2
    interrupt &H33, iReg, oReg
    Return

    mouse_position:
    iReg.ax = 3
    interrupt &H33, iReg, oReg
    mouse_buttons = oReg.bx
    If oReg.cx / 8 + 1 <> x_pos Or oReg.dx / 8 + 1 <> y_pos Then
    t = 0
    m_x_pos = oReg.cx / 8 + 1
    m_y_pos = oReg.dx / 8 + 1
    GoSub restore_char
    x_pos = m_x_pos
    y_pos = m_y_pos
    GoSub get_new
    Call show_code
    GoSub show_cursor

    End If
    Return
    pen_position:
    iReg.ax = &H400
    interrupt &H10, iReg, oReg
    If oReg.ax And 256 = 1 Then
    GoSub restore_char
    x_pos = (oReg.ax And 255) + 1
    y_pos = oReg.bx / 8 + 1
    GoSub position_mouse_cursor
    GoSub get_new
    End If
    Return
    position_mouse_cursor:

    iReg.ax = 4
    iReg.cx = (x_pos - 1) * 8
    iReg.dx = (y_pos - 1) * 8
    interrupt &H33, iReg, oReg

    Return

    drv_info:
    Color 1, 7
    iReg.ax = &H3600
    iReg.dx = Drive + 1
    interrupt &H21, iReg, oReg
    sectors_per_cluster = oReg.ax: free_clusters = oReg.bx: bytes_per_sector = oReg.cx: total_clusters = oReg.dx
    total_sectors = sectors_per_cluster * total_clusters

    If total_sectors = 708 Then b_o_d = 5: e_o_d = 11: fat_type$ = "FAT 12": fat_allocation_size$ = " 2 sectors "
    If total_sectors = 3352 Then b_o_d = 7: e_o_d = 7: fat_type$ = "FAT 8": fat_allocation_size$ = " 4 sectors "
    If total_sectors = 2371 Then b_o_d = 15: e_o_d = 28: fat_type$ = "FAT 12": fat_allocation_size$ = " 2 sectors "
    If total_sectors = 2847 Then b_o_d = 19: e_o_d = 32: fat_type$ = "FAT 12": fat_allocation_size$ = " 1 sector "
    If total_sectors = 1426 Then b_o_d = 7: e_o_d = 13: fat_type$ = "FAT 12": fat_allocation_size$ = " 2 sectors "

    real_total_sectors = total_sectors + e_o_d
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width